Removed Butterflies and Snails (To be merged with our upcoming mod, Familiar Fauna), fixed entity names to include BOP mod ID

This commit is contained in:
Forstride 2017-06-25 10:10:36 -04:00
parent fcdda72f35
commit 94f04fa1b3
44 changed files with 28 additions and 828 deletions

View File

@ -23,7 +23,6 @@ import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorColumns;
@ -64,7 +63,6 @@ public class BiomeGenBayou extends BOPOverworldBiome
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
// mud
IBlockPosQuery emptyGrassOrDirt = BlockQuery.buildAnd().withAirAbove().states(this.topBlock, this.fillerBlock).create();

View File

@ -23,7 +23,6 @@ import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorColumns;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -37,7 +36,6 @@ import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.init.Blocks;
@ -68,7 +66,6 @@ public class BiomeGenBog extends BOPOverworldBiome
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
// lakes
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(2.5F).waterLakeForBiome(this).create());

View File

@ -14,15 +14,13 @@ import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.BlockQueries;
import biomesoplenty.api.block.IBlockPosQuery;
import biomesoplenty.api.config.IBOPWorldSettings;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -67,7 +65,6 @@ public class BiomeGenChaparral extends BOPOverworldBiome
this.alternateFillerBlock = Blocks.STONE.getDefaultState();
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
this.canGenerateVillages = true;

View File

@ -23,8 +23,6 @@ import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -55,9 +53,6 @@ public class BiomeGenCherryBlossomGrove extends BOPOverworldBiome
this.addWeight(BOPClimates.COOL_TEMPERATE, 2);
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(2.3F);
this.addGenerator("flowers", GeneratorStage.FLOWERS, flowerGenerator);

View File

@ -22,7 +22,6 @@ import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorColumns;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -63,7 +62,6 @@ public class BiomeGenDeadSwamp extends BOPOverworldBiome
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
// mud
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(8).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());

View File

@ -17,7 +17,6 @@ import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
@ -46,7 +45,6 @@ public class BiomeGenEucalyptusForest extends BOPOverworldBiome
this.addWeight(BOPClimates.TROPICAL, 5);
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityParrot.class, 40, 1, 2));
// trees

View File

@ -26,7 +26,6 @@ import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorColumns;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -67,8 +66,6 @@ public class BiomeGenFen extends BOPOverworldBiome
}
this.addWeight(BOPClimates.COLD_SWAMP, 7);
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
// gravel
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());

View File

@ -14,7 +14,6 @@ import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
@ -36,8 +35,6 @@ public class BiomeGenFlowerField extends BOPOverworldBiome
this.canGenerateVillages = false;
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(50);
this.addGenerator("flowers", GeneratorStage.FLOWERS, flowerGenerator);

View File

@ -18,8 +18,6 @@ import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.block.BlockQuery;
import biomesoplenty.common.world.generator.GeneratorBigFlower;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -56,8 +54,6 @@ public class BiomeGenFlowerIsland extends BOPOverworldBiome
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// TODO: implement rosester? this.spawnableCreatureList.add(new SpawnListEntry(EntityRosester.class, 10, 4, 4));
// regular grass

View File

@ -19,7 +19,6 @@ import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorColumns;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
@ -53,7 +52,6 @@ public class BiomeGenGrassland extends BOPOverworldBiome {
this.canGenerateVillages = true;
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// lakes
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).waterLakeForBiome(this).amountPerChunk(0.2F).create());

View File

@ -17,7 +17,6 @@ import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -44,8 +43,6 @@ public class BiomeGenGrove extends BOPOverworldBiome
this.addWeight(BOPClimates.COOL_TEMPERATE, 7);
this.canGenerateVillages = true;
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// other plants
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SPROUT).create());

View File

@ -21,7 +21,6 @@ import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -62,8 +61,7 @@ public class BiomeGenLandOfLakes extends BOPOverworldBiome
this.beachBiomeLocation = ((BOPOverworldBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
}
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
this.spawnableWaterCreatureList.clear();
// gravel
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());

View File

@ -21,7 +21,6 @@ import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
@ -50,8 +49,6 @@ public class BiomeGenLavenderFields extends BOPOverworldBiome
this.addWeight(BOPClimates.MEDITERANEAN, 3);
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// flowers
this.addGenerator("lavender", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(50).with(BOPFlowers.LAVENDER).create());

View File

@ -22,7 +22,6 @@ import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorColumns;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -60,7 +59,6 @@ public class BiomeGenLushSwamp extends BOPOverworldBiome
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
// mud
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(1).maxRadius(8).with(BOPBlocks.mud.getDefaultState()).create());

View File

@ -18,7 +18,6 @@ import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
@ -59,8 +58,7 @@ public class BiomeGenMarsh extends BOPOverworldBiome
this.spawnableCreatureList.clear(); // none of your regular farmyard critters here
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
// mud
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(1).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());

View File

@ -12,8 +12,6 @@ import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
@ -49,9 +47,6 @@ public class BiomeGenMeadow extends BOPOverworldBiome
this.beachBiomeLocation = ((BOPOverworldBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
}
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());

View File

@ -20,7 +20,6 @@ import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
@ -55,7 +54,6 @@ public class BiomeGenMoor extends BOPOverworldBiome
this.addWeight(BOPClimates.COLD_SWAMP, 5);
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
// mud
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(1).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());

View File

@ -25,9 +25,7 @@ import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntityPixie;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorBigMushroom;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -75,9 +73,7 @@ public class BiomeGenMysticGrove extends BOPOverworldBiome
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityPixie.class, 4, 1, 1));
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityPixie.class, 2, 1, 2));
// hot springs
this.addGenerator("hot_springs", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).liquid(BOPBlocks.hot_spring_water).frozenLiquid((IBlockState)null).create());

View File

@ -10,8 +10,6 @@ import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -38,7 +36,6 @@ public class BiomeGenOrchard extends BOPOverworldBiome
this.canGenerateVillages = true;
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// trees
GeneratorWeighted treeGenerator = new GeneratorWeighted(5);

View File

@ -13,7 +13,6 @@ import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -45,7 +44,6 @@ public class BiomeGenPrairie extends BOPOverworldBiome
this.canGenerateVillages = true;
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());

View File

@ -10,7 +10,6 @@ import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
@ -26,7 +25,6 @@ import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.passive.EntityParrot;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome.SpawnListEntry;
public class BiomeGenRainforest extends BOPOverworldBiome
{
@ -46,7 +44,6 @@ public class BiomeGenRainforest extends BOPOverworldBiome
this.beachBiomeLocation = null;
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityParrot.class, 40, 1, 2));
// aand

View File

@ -1,38 +1,26 @@
package biomesoplenty.common.biome.overworld;
import java.util.Random;
import biomesoplenty.api.block.BlockQueries;
import biomesoplenty.api.config.IBOPWorldSettings;
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.api.enums.BOPGems;
import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
import biomesoplenty.common.world.generator.GeneratorOreSingle;
import biomesoplenty.common.world.generator.GeneratorWaterside;
import biomesoplenty.common.world.generator.GeneratorWeighted;
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
import biomesoplenty.common.world.generator.tree.GeneratorBush;
import biomesoplenty.common.world.generator.tree.GeneratorRedwoodTree;
import biomesoplenty.common.world.generator.tree.GeneratorRedwoodTreeThin;
import net.minecraft.block.BlockDirt;
import net.minecraft.block.BlockDoublePlant;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockFlower.EnumFlowerType;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.ChunkPrimer;
public class BiomeGenRedwoodForest extends BOPOverworldBiome
{

View File

@ -11,7 +11,6 @@ import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -46,7 +45,6 @@ public class BiomeGenSeasonalForest extends BOPOverworldBiome
}
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());

View File

@ -16,7 +16,6 @@ import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
@ -54,8 +53,6 @@ public class BiomeGenTemperateRainforest extends BOPOverworldBiome
this.beachBiomeLocation = ((BOPOverworldBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
}
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
// sand and gravel
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());

View File

@ -20,7 +20,6 @@ import biomesoplenty.api.enums.BOPTrees;
import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorColumns;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -35,8 +34,6 @@ import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.entity.passive.EntityParrot;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome;
public class BiomeGenTropicalIsland extends BOPOverworldBiome
{
@ -61,7 +58,6 @@ public class BiomeGenTropicalIsland extends BOPOverworldBiome
this.spawnableCreatureList.clear();
this.spawnableMonsterList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityParrot.class, 40, 1, 2));
clearWeights();

View File

@ -25,7 +25,6 @@ import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.world.generator.GeneratorColumns;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
@ -67,7 +66,6 @@ public class BiomeGenWetland extends BOPOverworldBiome
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
// mud
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(8).with(BOPBlocks.mud.getDefaultState()).create());

View File

@ -18,8 +18,6 @@ import biomesoplenty.api.enums.BOPPlants;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -52,9 +50,6 @@ public class BiomeGenWoodland extends BOPOverworldBiome
this.beachBiomeLocation = ((BOPOverworldBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
}
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
// sand
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());

View File

@ -1,371 +0,0 @@
/*******************************************************************************
* Copyright 2015-2016, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.entities;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import net.minecraft.entity.EntityFlying;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.entity.ai.EntityMoveHelper;
import net.minecraft.entity.monster.IMob;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.World;
public class EntityButterfly extends EntityFlying implements IMob {
private static final DataParameter<Byte> TYPE = EntityDataManager.<Byte>createKey(EntityButterfly.class, DataSerializers.BYTE);
public EntityButterfly(World worldIn) {
super(worldIn);
this.setSize(0.5F, 0.5F);
this.moveHelper = new EntityButterfly.ButterflyMoveHelper();
this.tasks.addTask(3, new EntityButterfly.AIButterflyRandomFly());
}
@Override
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(1.0D);
}
@Override
protected void entityInit()
{
super.entityInit();
this.dataManager.register(TYPE, Byte.valueOf((byte)0));
}
public void writeEntityToNBT(NBTTagCompound tagCompound)
{
super.writeEntityToNBT(tagCompound);
tagCompound.setInteger("ButterflyType", this.getButterflyType());
}
public void readEntityFromNBT(NBTTagCompound tagCompund)
{
super.readEntityFromNBT(tagCompund);
this.setButterflyType(tagCompund.getInteger("ButterflyType"));
}
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata)
{
livingdata = super.onInitialSpawn(difficulty, livingdata);
int i = this.rand.nextInt(3);
boolean flag = false;
if (livingdata instanceof EntityButterfly.ButterflyTypeData)
{
i = ((EntityButterfly.ButterflyTypeData)livingdata).typeData;
flag = true;
}
else
{
livingdata = new EntityButterfly.ButterflyTypeData(i);
}
this.setButterflyType(i);
return livingdata;
}
public int getButterflyType()
{
return (int) this.dataManager.get(TYPE);
}
public void setButterflyType(int butterflyTypeId)
{
this.dataManager.set(TYPE, Byte.valueOf((byte)butterflyTypeId));
}
@Override
public boolean canBePushed()
{
return false;
}
@Override
public boolean getCanSpawnHere()
{
BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ);
if (blockpos.getY() <= this.world.getSeaLevel())
{
return false;
}
else
{
if (blockpos.getY() >= 90)
{
return false;
}
else
{
int light = this.world.getLightFromNeighbors(blockpos);
return light > 8 && super.getCanSpawnHere();
}
}
}
// Helper class representing a point in space that the butterfly is targeting for some reason
class ButterflyMoveTargetPos
{
private EntityButterfly butterfly = EntityButterfly.this;
public double posX;
public double posY;
public double posZ;
public double distX;
public double distY;
public double distZ;
public double dist;
public double aimX;
public double aimY;
public double aimZ;
public ButterflyMoveTargetPos()
{
this(0, 0, 0);
}
public ButterflyMoveTargetPos(double posX, double posY, double posZ)
{
this.setTarget(posX, posY, posZ);
}
public void setTarget(double posX, double posY, double posZ)
{
this.posX = posX;
this.posY = posY;
this.posZ = posZ;
this.refresh();
}
public void refresh()
{
this.distX = this.posX - this.butterfly.posX;
this.distY = this.posY - this.butterfly.posY;
this.distZ = this.posZ - this.butterfly.posZ;
this.dist = (double)MathHelper.sqrt(this.distX * this.distX + this.distY * this.distY + this.distZ * this.distZ);
// (aimX,aimY,aimZ) is a unit vector in the direction we want to go
if (this.dist == 0.0D)
{
this.aimX = 0.0D;
this.aimY = 0.0D;
this.aimZ = 0.0D;
}
else
{
this.aimX = this.distX / this.dist;
this.aimY = this.distY / this.dist;
this.aimZ = this.distZ / this.dist;
}
}
public boolean isBoxBlocked(AxisAlignedBB box)
{
return !this.butterfly.world.getCollisionBoxes(this.butterfly, box).isEmpty();
}
// check nothing will collide with the butterfly in the direction of aim, for howFar units (or until the destination - whichever is closer)
public boolean isPathClear(double howFar)
{
howFar = Math.min(howFar, this.dist);
AxisAlignedBB box = this.butterfly.getEntityBoundingBox();
for (double i = 0.5D; i < howFar; ++i)
{
// check there's nothing in the way
if (this.isBoxBlocked(box.offset(this.aimX * i, this.aimY * i, this.aimZ * i)))
{
return false;
}
}
if (this.isBoxBlocked(box.offset(this.aimX * howFar, this.aimY * howFar, this.aimZ * howFar)))
{
return false;
}
return true;
}
}
class ButterflyMoveHelper extends EntityMoveHelper
{
// EntityMoveHelper has the boolean 'update' which is set to true when the target is changed, and set to false when a bearing is set
// So it means 'the target has changed but we're not yet heading for it'
// We'll re-use it here with a slightly different interpretation
// Here it will mean 'has a target and not yet arrived'
private EntityButterfly butterfly = EntityButterfly.this;
private int courseChangeCooldown = 0;
private double closeEnough = 0.3D;
private ButterflyMoveTargetPos targetPos = new ButterflyMoveTargetPos();
public ButterflyMoveHelper()
{
super(EntityButterfly.this);
}
@Override
public void setMoveTo(double x, double y, double z, double speedIn)
{
super.setMoveTo(x,y,z,speedIn);
this.targetPos.setTarget(x, y, z);
}
@Override
public void onUpdateMoveHelper()
{
// if we have arrived at the previous target, or we have no target to aim for, do nothing
if (this.action != Action.MOVE_TO) {return;}
if (this.courseChangeCooldown-- > 0) {
// limit the rate at which we change course
return;
}
this.courseChangeCooldown += this.butterfly.getRNG().nextInt(2) + 2;
// update the target position
this.targetPos.refresh();
// accelerate the butterfly towards the target
double acceleration = 0.1D;
this.butterfly.motionX += this.targetPos.aimX * acceleration;
this.butterfly.motionY += this.targetPos.aimY * acceleration;
this.butterfly.motionZ += this.targetPos.aimZ * acceleration;
// rotate to point at target
this.butterfly.renderYawOffset = this.butterfly.rotationYaw = -((float)Math.atan2(this.targetPos.distX, this.targetPos.distZ)) * 180.0F / (float)Math.PI;
// abandon this movement if we have reached the target or there is no longer a clear path to the target
if (!this.targetPos.isPathClear(5.0D))
{
//System.out.println("Abandoning move target - way is blocked" );
this.action = Action.WAIT;
} else if (this.targetPos.dist < this.closeEnough) {
//System.out.println("Arrived (close enough) dist:"+this.targetPos.dist);
this.action = Action.WAIT;
}
}
}
// AI class for implementing the random flying behaviour
class AIButterflyRandomFly extends EntityAIBase
{
private EntityButterfly butterfly = EntityButterfly.this;
private ButterflyMoveTargetPos targetPos = new ButterflyMoveTargetPos();
public AIButterflyRandomFly()
{
this.setMutexBits(1);
}
// should we choose a new random destination for the butterfly to fly to?
// yes, if the butterfly doesn't already have a destination
@Override
public boolean shouldExecute()
{
return !this.butterfly.getMoveHelper().isUpdating();
}
@Override
public boolean shouldContinueExecuting() {return false;}
// choose a a new random destination for the butterfly to fly to
@Override
public void startExecuting()
{
Random rand = this.butterfly.getRNG();
// pick a random nearby point and see if we can fly to it
if (this.tryGoingRandomDirection(rand, 2.0D)) {return;}
// pick a random closer point to fly to instead
if (this.tryGoingRandomDirection(rand, 2.0D)) {return;}
// try going straight along axes (try all 6 directions in random order)
List<EnumFacing> directions = Arrays.asList(EnumFacing.values());
Collections.shuffle(directions);
for (EnumFacing facing : directions)
{
if (this.tryGoingAlongAxis(rand, facing, 1.0D)) {return;}
}
}
// note y direction has a slight downward bias to stop them flying too high
public boolean tryGoingRandomDirection(Random rand, double maxDistance)
{
double dirX = ((rand.nextDouble() * 2.0D - 1.0D) * maxDistance);
double dirY = ((rand.nextDouble() * 2.0D - 1.1D) * maxDistance);
double dirZ = ((rand.nextDouble() * 2.0D - 1.0D) * maxDistance);
return this.tryGoing(dirX, dirY, dirZ);
}
public boolean tryGoingAlongAxis(Random rand, EnumFacing facing, double maxDistance)
{
double dirX = 0.0D;
double dirY = 0.0D;
double dirZ = 0.0D;
switch (facing.getAxis())
{
case X:
dirX = rand.nextDouble() * facing.getAxisDirection().getOffset() * maxDistance;
break;
case Y:
dirY = rand.nextDouble() * facing.getAxisDirection().getOffset() * maxDistance;
break;
case Z: default:
dirZ = rand.nextDouble() * facing.getAxisDirection().getOffset() * maxDistance;
break;
}
return this.tryGoing(dirX, dirY, dirZ);
}
public boolean tryGoing(double dirX, double dirY, double dirZ)
{
//System.out.println("("+dirX+","+dirY+","+dirZ+")");
this.targetPos.setTarget(this.butterfly.posX + dirX, this.butterfly.posY + dirY, this.butterfly.posZ + dirZ);
//System.out.println("Testing random move target distance:"+this.targetPos.dist+" direction:("+this.targetPos.aimX+","+this.targetPos.aimY+","+this.targetPos.aimZ+")");
boolean result = this.targetPos.isPathClear(5.0F);
if (result)
{
this.butterfly.getMoveHelper().setMoveTo(this.targetPos.posX, this.targetPos.posY, this.targetPos.posZ, 1.0D);
}
return result;
}
}
public static class ButterflyTypeData implements IEntityLivingData
{
public int typeData;
public ButterflyTypeData(int type)
{
this.typeData = type;
}
}
}

View File

@ -82,40 +82,29 @@ public class EntityPixie extends EntityFlying implements IMob {
}
}
// Checks to make sure the light is not too bright where the mob is spawning
// This is same code as for EntitySkeleton
protected boolean isValidLightLevel()
@Override
public boolean getCanSpawnHere()
{
BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ);
if (this.world.getLightFor(EnumSkyBlock.SKY, blockpos) > this.rand.nextInt(32))
if (blockpos.getY() <= this.world.getSeaLevel())
{
// TODO: not sure what's going on here...
return false;
}
else
{
int light = this.world.getLightFromNeighbors(blockpos);
// if it's thundering, force getSkylightSubtracted to 10 before calculating getLightFromNeighbors, then restore it
if (this.world.isThundering())
if (blockpos.getY() >= 90)
{
int oldSkyLightSubtracted = this.world.getSkylightSubtracted();
this.world.setSkylightSubtracted(10);
light = this.world.getLightFromNeighbors(blockpos);
this.world.setSkylightSubtracted(oldSkyLightSubtracted);
return false;
}
else
{
int light = this.world.getLightFromNeighbors(blockpos);
return light > 8 && super.getCanSpawnHere();
}
return light <= this.rand.nextInt(8);
}
}
@Override
public boolean getCanSpawnHere()
{
return this.isValidLightLevel() && super.getCanSpawnHere();
}
// TODO - move PixieMoveTargetPos and AIPixieRandomFly outside and implement in a more generic way, to be reused for pixie and wasp

View File

@ -1,58 +0,0 @@
/*******************************************************************************
* Copyright 2015-2016, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.entities;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.IMob;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
public class EntitySnail extends EntityLiving implements IMob {
public EntitySnail(World worldIn) {
super(worldIn);
this.setSize(0.5F, 0.5F);
}
@Override
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(3.0D);
}
@Override
public boolean getCanSpawnHere()
{
int x = MathHelper.floor(this.posX);
int y = MathHelper.floor(this.getEntityBoundingBox().minY);
int z = MathHelper.floor(this.posZ);
BlockPos blockpos = new BlockPos(x, y, z);
if (this.world.getBlockState(blockpos.down()).getBlock() != Blocks.GRASS && this.world.getBlockState(blockpos.down()).getBlock() != BOPBlocks.grass)
{
return false;
}
else
{
if (blockpos.getY() <= this.world.getSeaLevel())
{
return false;
}
else
{
return this.world.getLight(blockpos) > 6 && super.getCanSpawnHere();
}
}
}
}

View File

@ -1,65 +0,0 @@
package biomesoplenty.common.entities;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
public class ModelButterfly extends ModelBase
{
//fields
public ModelRenderer Body;
public ModelRenderer RightWing;
public ModelRenderer LeftWing;
public ModelRenderer Antennae;
public ModelButterfly()
{
this.textureWidth = 64;
this.textureHeight = 32;
this.LeftWing = new ModelRenderer(this, -9, 6);
this.LeftWing.setRotationPoint(1.0F, 23.0F, 5.0F);
this.LeftWing.addBox(0.0F, 0.0F, 0.0F, 6, 0, 9, 0.0F);
this.setRotation(LeftWing, -3.141592653589793F, 0.0F, 0.0F);
this.RightWing = new ModelRenderer(this, -9, 6);
this.RightWing.setRotationPoint(0.0F, 23.0F, 5.0F);
this.RightWing.addBox(0.0F, 0.0F, 0.0F, 6, 0, 9, 0.0F);
this.setRotation(RightWing, 0.0F, -3.141592653589793F, 0.0F);
this.Antennae = new ModelRenderer(this, 10, 0);
this.Antennae.setRotationPoint(-1.0F, 23.0F, -2.0F);
this.Antennae.addBox(0.0F, 0.0F, 0.0F, 3, 0, 2, 0.0F);
this.setRotation(Antennae, -3.141592653589793F, 0.0F, 0.0F);
this.Body = new ModelRenderer(this, 0, 0);
this.Body.setRotationPoint(0.0F, 23.0F, -2.0F);
this.Body.addBox(0.0F, 0.0F, 0.0F, 1, 1, 5, 0.0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
this.LeftWing.render(f5);
this.RightWing.render(f5);
this.Antennae.render(f5);
this.Body.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
@Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
RightWing.rotateAngleZ = -(MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.2F);
LeftWing.rotateAngleZ = MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.2F;
}
}

View File

@ -1,70 +0,0 @@
package biomesoplenty.common.entities;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelSnail extends ModelBase
{
//fields
ModelRenderer Shell;
ModelRenderer Body;
ModelRenderer Left_Eye;
ModelRenderer Right_Eye;
public ModelSnail()
{
textureWidth = 64;
textureHeight = 32;
Shell = new ModelRenderer(this, 0, 0);
Shell.addBox(-1F, 0F, -3F, 3, 8, 8);
Shell.setRotationPoint(0F, 14F, 0F);
Shell.setTextureSize(64, 32);
Shell.mirror = true;
setRotation(Shell, 0F, 0F, 0F);
Body = new ModelRenderer(this, 0, 16);
Body.addBox(0F, 0F, 0F, 3, 2, 12);
Body.setRotationPoint(-1F, 22F, -6F);
Body.setTextureSize(64, 32);
Body.mirror = true;
setRotation(Body, 0F, 0F, 0F);
Left_Eye = new ModelRenderer(this, 22, 12);
Left_Eye.addBox(0F, 0F, 0F, 1, 3, 1);
Left_Eye.setRotationPoint(1F, 19F, -5F);
Left_Eye.setTextureSize(64, 32);
Left_Eye.mirror = true;
setRotation(Left_Eye, 0F, 0F, 0F);
Right_Eye = new ModelRenderer(this, 22, 12);
Right_Eye.addBox(0F, 0F, 0F, 1, 3, 1);
Right_Eye.setRotationPoint(-1F, 19F, -5F);
Right_Eye.setTextureSize(64, 32);
Right_Eye.mirror = true;
setRotation(Right_Eye, 0F, 0F, 0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Shell.render(f5);
Body.render(f5);
Left_Eye.render(f5);
Right_Eye.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
@Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View File

@ -1,36 +0,0 @@
package biomesoplenty.common.entities;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderButterfly extends RenderLiving<EntityButterfly>
{
private static final ResourceLocation ORANGE = new ResourceLocation("biomesoplenty:textures/entity/butterfly/orange.png");
private static final ResourceLocation BLUE = new ResourceLocation("biomesoplenty:textures/entity/butterfly/blue.png");
private static final ResourceLocation PURPLE = new ResourceLocation("biomesoplenty:textures/entity/butterfly/purple.png");
public RenderButterfly(RenderManager renderManager)
{
super(renderManager, new ModelButterfly(), 0.25F);
this.shadowSize = 0.0F;
}
protected ResourceLocation getEntityTexture(EntityButterfly entity)
{
switch (entity.getButterflyType())
{
case 0:
default:
return ORANGE;
case 1:
return BLUE;
case 2:
return PURPLE;
}
}
}

View File

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright 2015-2016, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.entities;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderSnail extends RenderLiving<EntitySnail>
{
private static final ResourceLocation snailTextureLocation = new ResourceLocation("biomesoplenty:textures/entity/snail.png");
public RenderSnail(RenderManager renderManager)
{
super(renderManager, new ModelSnail(), 0.25F);
}
@Override
protected ResourceLocation getEntityTexture(EntitySnail entity)
{
return snailTextureLocation;
}
}

View File

@ -8,23 +8,14 @@
package biomesoplenty.common.init;
import java.util.Map;
import com.google.common.collect.Maps;
import biomesoplenty.common.command.BOPCommand;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntityPixie;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.entities.EntityWasp;
import biomesoplenty.common.entities.projectiles.EntityMudball;
import biomesoplenty.core.BiomesOPlenty;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityList.EntityEggInfo;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.registry.EntityRegistry;
@ -37,13 +28,11 @@ public class ModEntities
public static void init()
{
// projectiles
registerBOPEntity(EntityMudball.class, "mudball", 64, 10, true);
registerBOPEntity(EntityMudball.class, "biomesoplenty.mudball", 64, 10, true);
// mobs
registerBOPEntityWithSpawnEgg(EntityWasp.class, "wasp", 80, 3, true, 0xE5B013, 0x333234);
registerBOPEntityWithSpawnEgg(EntityPixie.class, "pixie", 80, 3, true, 0xFF99E9, 0xFFFFFF);
registerBOPEntityWithSpawnEgg(EntitySnail.class, "snail", 80, 3, true, 0xA694BC, 0xCDA26E);
registerBOPEntityWithSpawnEgg(EntityButterfly.class, "butterfly", 80, 3, true, 0x282828, 0xEF6F1F);
registerBOPEntityWithSpawnEgg(EntityWasp.class, "biomesoplenty.wasp", 80, 3, true, 0xE5B013, 0x333234);
registerBOPEntityWithSpawnEgg(EntityPixie.class, "biomesoplenty.pixie", 80, 3, true, 0xFF99E9, 0xFFFFFF);
}
// register an entity

View File

@ -10,7 +10,6 @@ package biomesoplenty.common.item;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.item.BOPItems;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntityPixie;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
@ -116,20 +115,6 @@ public class ItemJarEmpty extends Item
}
return true;
}
if (target instanceof EntityButterfly)
{
EntityButterfly butterfly = (EntityButterfly)target;
butterfly.setDead();
stack.setCount(stack.getCount() - 1);
ItemStack butterflyJar = new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.BUTTERFLY.ordinal());
EntityItem butterflyJarEntity = new EntityItem(player.world, player.posX, player.posY, player.posZ, butterflyJar);
if (!player.world.isRemote)
{
player.world.spawnEntity(butterflyJarEntity);
if (!(player instanceof FakePlayer)) {butterflyJarEntity.onCollideWithPlayer(player);}
}
return true;
}
return false;
}

View File

@ -9,14 +9,18 @@
package biomesoplenty.common.item;
import biomesoplenty.api.item.BOPItems;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntityPixie;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.util.*;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;
@ -26,14 +30,12 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
public class ItemJarFilled extends Item
{
public enum JarContents implements IStringSerializable
{
HONEY, BUTTERFLY, PIXIE;
HONEY, PIXIE;
@Override
public String getName()
@ -138,22 +140,6 @@ public class ItemJarFilled extends Item
}
}
public boolean releaseButterfly(ItemStack stack, World world, EntityPlayer player, Vec3d releasePoint)
{
if (world.provider.isSurfaceWorld())
{
EntityButterfly butterfly = new EntityButterfly(world);
butterfly.setLocationAndAngles(releasePoint.x, releasePoint.y, releasePoint.z, MathHelper.wrapDegrees(world.rand.nextFloat() * 360.0F), 0.0F);
world.spawnEntity(butterfly);
butterfly.playLivingSound();
if (stack.hasDisplayName()) {butterfly.setCustomNameTag(stack.getDisplayName());}
return true;
} else {
player.sendMessage(new TextComponentString("\u00a75Butterflies cannot survive in this environment!"));
return false;
}
}
@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand)
{
@ -172,16 +158,6 @@ public class ItemJarFilled extends Item
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
}
case BUTTERFLY:
if (this.getContentsType(stack) == JarContents.BUTTERFLY)
{
// release pixie into the air in front of the player (target distance 0.8, but will be closer if there's blocks in the way)
Vec3d releasePoint = this.getAirPositionInFrontOfPlayer(world, player, 0.8D);
this.releaseButterfly(stack, world, player, releasePoint);
this.emptyJar(stack, player, new ItemStack(BOPItems.jar_empty));
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
}
case HONEY: default:
return new ActionResult<ItemStack>(EnumActionResult.FAIL, stack);
}
@ -215,14 +191,6 @@ public class ItemJarFilled extends Item
Vec3d releasePoint = new Vec3d(player.posX + a * distX, player.posY + (double)player.getEyeHeight() + a * distY, player.posZ + a * distZ);
return this.releasePixie(stack, world, player, releasePoint) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
case BUTTERFLY:
double distX1 = hitX - player.posX;
double distY1 = hitY - (player.posY + (double)player.getEyeHeight());
double distZ1 = hitZ - player.posZ;
double a1 = 0.9D;
Vec3d releasePoint1 = new Vec3d(player.posX + a1 * distX1, player.posY + (double)player.getEyeHeight() + a1 * distY1, player.posZ + a1 * distZ1);
return this.releaseButterfly(stack, world, player, releasePoint1) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
// TODO: are you supposed to be able to pour out honey? How much should you get? Why don't we just use buckets?
case HONEY: default:
return EnumActionResult.SUCCESS;

View File

@ -8,7 +8,6 @@
package biomesoplenty.core;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -22,13 +21,9 @@ import biomesoplenty.client.particle.EntityTrailFX;
import biomesoplenty.client.texture.ForgeRedirectedResourcePack;
import biomesoplenty.common.block.IBOPBlock;
import biomesoplenty.common.config.MiscConfigurationHandler;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.entities.EntityPixie;
import biomesoplenty.common.entities.EntitySnail;
import biomesoplenty.common.entities.EntityWasp;
import biomesoplenty.common.entities.RenderButterfly;
import biomesoplenty.common.entities.RenderPixie;
import biomesoplenty.common.entities.RenderSnail;
import biomesoplenty.common.entities.RenderWasp;
import biomesoplenty.common.entities.projectiles.EntityMudball;
import biomesoplenty.common.entities.projectiles.RenderMudball;
@ -53,7 +48,6 @@ import net.minecraft.client.renderer.block.statemap.StateMap;
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.resources.AbstractResourcePack;
import net.minecraft.client.resources.IResourcePack;
import net.minecraft.client.resources.LegacyV2Adapter;
import net.minecraft.entity.Entity;
@ -93,8 +87,6 @@ public class ClientProxy extends CommonProxy
//Entity rendering and other stuff will go here in future
registerEntityRenderer(EntityWasp.class, RenderWasp.class);
registerEntityRenderer(EntityPixie.class, RenderPixie.class);
registerEntityRenderer(EntitySnail.class, RenderSnail.class);
registerEntityRenderer(EntityButterfly.class, RenderButterfly.class);
registerEntityRenderer(EntityMudball.class, RenderMudball.class);
replaceForgeResources();

View File

@ -108,7 +108,6 @@ item.jacaranda_door.name=Jacaranda Door
item.jar_empty.name=Empty Jar
item.jar_filled_honey.name=Honey Jar
item.jar_filled_pixie.name=Pixie Jar
item.jar_filled_butterfly.name=Butterfly Jar
item.magic_door.name=Magic Door
item.mahogany_door.name=Mahogany Door
item.mangrove_door.name=Mangrove Door
@ -438,7 +437,6 @@ tile.dried_sand.name=Dried Sand
tile.mud_brick.name=Mud Bricks
tile.crystal.name=Celestial Crystal
entity.butterfly.name=Butterfly
entity.pixie.name=Pixie
entity.snail.name=Snail
entity.wasp.name=Wasp
entity.biomesoplenty.mudball.name=Mudball
entity.biomesoplenty.pixie.name=Pixie
entity.biomesoplenty.wasp.name=Wasp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B