diff --git a/common/biomesoplenty/api/Biomes.java b/common/biomesoplenty/api/Biomes.java index f0a7259d9..90dcf5a29 100644 --- a/common/biomesoplenty/api/Biomes.java +++ b/common/biomesoplenty/api/Biomes.java @@ -69,6 +69,7 @@ public class Biomes public static Optional netherDesert = Optional.absent(); public static Optional netherLava = Optional.absent(); public static Optional netherBone = Optional.absent(); + public static Optional netherBlood = Optional.absent(); public static Optional oasis = Optional.absent(); diff --git a/common/biomesoplenty/api/BlockReferences.java b/common/biomesoplenty/api/BlockReferences.java index f3bce590c..6b0398e18 100644 --- a/common/biomesoplenty/api/BlockReferences.java +++ b/common/biomesoplenty/api/BlockReferences.java @@ -109,6 +109,7 @@ public class BlockReferences { redRock (Blocks.redRock, 0), ash (Blocks.ash, 0), ashStone (Blocks.ashStone, 0), + flesh (Blocks.flesh, 0), hardIce (Blocks.hardIce, 0), originGrass (Blocks.originGrass, 0), longGrass (Blocks.longGrass, 0), diff --git a/common/biomesoplenty/api/Blocks.java b/common/biomesoplenty/api/Blocks.java index b4e8c5a76..705f8d3a8 100644 --- a/common/biomesoplenty/api/Blocks.java +++ b/common/biomesoplenty/api/Blocks.java @@ -13,6 +13,7 @@ public class Blocks // Worldgen Blocks public static Optional ash = Optional.absent(); public static Optional ashStone = Optional.absent(); + public static Optional flesh = Optional.absent(); public static Optional cragRock = Optional.absent(); public static Optional driedDirt = Optional.absent(); public static Optional hardDirt = Optional.absent(); diff --git a/common/biomesoplenty/biomes/nether/BiomeGenNetherBlood.java b/common/biomesoplenty/biomes/nether/BiomeGenNetherBlood.java new file mode 100644 index 000000000..609c4a62f --- /dev/null +++ b/common/biomesoplenty/biomes/nether/BiomeGenNetherBlood.java @@ -0,0 +1,32 @@ +package biomesoplenty.biomes.nether; + +import net.minecraft.block.Block; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.monster.EntityMagmaCube; +import net.minecraft.entity.monster.EntityPigZombie; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.SpawnListEntry; +import biomesoplenty.api.Blocks; +import biomesoplenty.biomes.BiomeDecoratorBOP; + +public class BiomeGenNetherBlood extends BiomeGenBase +{ + private BiomeDecoratorBOP customBiomeDecorator; + + public BiomeGenNetherBlood(int par1) + { + super(par1); + theBiomeDecorator = new BiomeDecoratorBOP(this); + customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; + topBlock = (byte)Blocks.flesh.get().blockID; + fillerBlock = (byte)Blocks.flesh.get().blockID; + customBiomeDecorator.gravesPerChunk = 1; + spawnableMonsterList.clear(); + spawnableCreatureList.clear(); + spawnableWaterCreatureList.clear(); + spawnableCaveCreatureList.clear(); + spawnableMonsterList.add(new SpawnListEntry(EntityGhast.class, 50, 4, 4)); + spawnableMonsterList.add(new SpawnListEntry(EntityPigZombie.class, 100, 4, 4)); + spawnableMonsterList.add(new SpawnListEntry(EntityMagmaCube.class, 1, 4, 4)); + } +} diff --git a/common/biomesoplenty/blocks/BlockFlesh.java b/common/biomesoplenty/blocks/BlockFlesh.java new file mode 100644 index 000000000..be0105b52 --- /dev/null +++ b/common/biomesoplenty/blocks/BlockFlesh.java @@ -0,0 +1,80 @@ +package biomesoplenty.blocks; + +import static net.minecraftforge.common.ForgeDirection.UP; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeDirection; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Blocks; +import biomesoplenty.api.Items; + +public class BlockFlesh extends Block +{ + public BlockFlesh(int par1) + { + super(par1, Material.sponge); + this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + } + + @Override + public void registerIcons(IconRegister par1IconRegister) + { + blockIcon = par1IconRegister.registerIcon("biomesoplenty:flesh"); + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been + * cleared to be reused) + */ + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + float var5 = 0.125F; + return AxisAlignedBB.getAABBPool().getAABB(par2, par3, par4, par2 + 1, par3 + 1 - var5, par4 + 1); + } + + /** + * A randomly called display update to be able to add particles or other items for display + */ + @Override + public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + super.randomDisplayTick(par1World, par2, par3, par4, par5Random); + + if (par5Random.nextInt(4) == 0) + { + par1World.spawnParticle("tilecrack_" + String.valueOf(Blocks.flesh.get().blockID) + "_0", par2 + par5Random.nextFloat(), par3 - 0.4F, par4 + par5Random.nextFloat(), 0.0D, 0.0D, 0.0D); + } + + if (par5Random.nextInt(12) == 0) + { + par1World.spawnParticle("tilecrack_" + String.valueOf(Blocks.flesh.get().blockID) + "_0", par2 + par5Random.nextFloat(), par3 + 1.0F, par4 + par5Random.nextFloat(), 0.0D, 0.0D, 0.0D); + } + } + + @Override + public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) + { + if (entity instanceof EntityPlayer) + { + InventoryPlayer inventory = ((EntityPlayer)entity).inventory; + + if (inventory.armorInventory[0] != null && inventory.armorInventory[0].itemID == Items.wadingBoots.get().itemID) + { + return; + } + } + + entity.motionX *= 0.9D; + entity.motionZ *= 0.9D; + } +} diff --git a/common/biomesoplenty/configuration/BOPBiomes.java b/common/biomesoplenty/configuration/BOPBiomes.java index 56da119ba..bfc067663 100644 --- a/common/biomesoplenty/configuration/BOPBiomes.java +++ b/common/biomesoplenty/configuration/BOPBiomes.java @@ -104,6 +104,7 @@ import biomesoplenty.biomes.BiomeGenWoodland; import biomesoplenty.biomes.beach.BiomeGenBeachGravel; import biomesoplenty.biomes.beach.BiomeGenBeachOvergrown; import biomesoplenty.biomes.nether.BiomeGenNetherBase; +import biomesoplenty.biomes.nether.BiomeGenNetherBlood; import biomesoplenty.biomes.nether.BiomeGenNetherBone; import biomesoplenty.biomes.nether.BiomeGenNetherDesert; import biomesoplenty.biomes.nether.BiomeGenNetherGarden; @@ -239,6 +240,7 @@ public class BOPBiomes { Biomes.netherDesert = Optional.of((new BiomeGenNetherDesert(BOPConfigurationIDs.netherDesertID)).setColor(16711680).setBiomeName("Corrupted Sands").setDisableRain().setTemperatureRainfall(2.0F, 0.0F)); Biomes.netherLava = Optional.of((new BiomeGenNetherLava(BOPConfigurationIDs.netherLavaID)).setColor(16711680).setBiomeName("Phantasmagoric Inferno").setDisableRain().setTemperatureRainfall(2.0F, 0.0F)); Biomes.netherBone = Optional.of((new BiomeGenNetherBone(BOPConfigurationIDs.netherBoneID)).setColor(16711680).setBiomeName("Boneyard").setDisableRain().setTemperatureRainfall(2.0F, 0.0F)); + Biomes.netherBlood = Optional.of((new BiomeGenNetherBlood(BOPConfigurationIDs.netherBloodID)).setColor(16711680).setBiomeName("Bloody Heap").setDisableRain().setTemperatureRainfall(2.0F, 0.0F)); Biomes.oasis = Optional.of((new BiomeGenOasis(BOPConfigurationIDs.oasisID)).setColor(16421912).setBiomeName("Oasis").setTemperatureRainfall(0.9F, 0.7F).setMinMaxHeight(0.3F, 0.4F)); @@ -380,6 +382,7 @@ public class BOPBiomes { BiomeDictionary.registerBiomeType(Biomes.netherDesert.get(), Type.NETHER, Type.DESERT); BiomeDictionary.registerBiomeType(Biomes.netherLava.get(), Type.NETHER); BiomeDictionary.registerBiomeType(Biomes.netherBone.get(), Type.NETHER, Type.WASTELAND); + BiomeDictionary.registerBiomeType(Biomes.netherBone.get(), Type.NETHER); BiomeDictionary.registerBiomeType(Biomes.oasis.get(), Type.DESERT, Type.JUNGLE); diff --git a/common/biomesoplenty/configuration/BOPBlocks.java b/common/biomesoplenty/configuration/BOPBlocks.java index 2cfa5dd74..f9c29cd9e 100644 --- a/common/biomesoplenty/configuration/BOPBlocks.java +++ b/common/biomesoplenty/configuration/BOPBlocks.java @@ -38,6 +38,7 @@ import biomesoplenty.blocks.BlockBOPStairs.Category; import biomesoplenty.blocks.BlockBamboo; import biomesoplenty.blocks.BlockBones; import biomesoplenty.blocks.BlockCloud; +import biomesoplenty.blocks.BlockFlesh; import biomesoplenty.blocks.BlockGrave; import biomesoplenty.blocks.BlockIvy; import biomesoplenty.blocks.BlockLongGrass; @@ -128,6 +129,7 @@ public class BOPBlocks Blocks.driedDirt = Optional.of(new BlockBOPGeneric(BOPConfigurationIDs.driedDirtID, Material.rock, BlockType.DRIED_DIRT).setUnlocalizedName("bop.generic")); Blocks.redRock = Optional.of((new BlockBOPRedRock(BOPConfigurationIDs.redRockID)).setUnlocalizedName("bop.redRocks")); Blocks.ash = Optional.of((new BlockAsh(BOPConfigurationIDs.ashID)).setHardness(0.4F).setStepSound(Block.soundSandFootstep).setUnlocalizedName("bop.ash")); + Blocks.flesh = Optional.of((new BlockFlesh(BOPConfigurationIDs.fleshID)).setHardness(0.4F).setStepSound(Block.soundGravelFootstep).setUnlocalizedName("bop.flesh")); Blocks.plants = Optional.of((new BlockBOPPlant(BOPConfigurationIDs.plantsID)).setUnlocalizedName("bop.plants")); Blocks.flowers = Optional.of((new BlockBOPFlower(BOPConfigurationIDs.flowersID)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("bop.flowers")); Blocks.flowers2 = Optional.of((new BlockBOPFlower2(BOPConfigurationIDs.flowers2ID)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("bop.flowers2")); @@ -216,6 +218,7 @@ public class BOPBlocks GameRegistry.registerBlock(Blocks.driedDirt.get(), "bop.driedDirt"); GameRegistry.registerBlock(Blocks.redRock.get(), ItemBlockRedRock.class, "bop.redRock"); GameRegistry.registerBlock(Blocks.ash.get(), "bop.ash"); + GameRegistry.registerBlock(Blocks.flesh.get(), "bop.flesh"); GameRegistry.registerBlock(Blocks.plants.get(), ItemBlockPlant.class, "bop.plants"); GameRegistry.registerBlock(Blocks.flowers.get(), ItemBlockFlower.class, "bop.flowers"); GameRegistry.registerBlock(Blocks.flowers2.get(), ItemBlockFlower2.class, "bop.flowers2"); diff --git a/common/biomesoplenty/configuration/configfile/BOPConfigurationBiomeGen.java b/common/biomesoplenty/configuration/configfile/BOPConfigurationBiomeGen.java index 5633e37de..dc51b41df 100644 --- a/common/biomesoplenty/configuration/configfile/BOPConfigurationBiomeGen.java +++ b/common/biomesoplenty/configuration/configfile/BOPConfigurationBiomeGen.java @@ -106,6 +106,7 @@ public class BOPConfigurationBiomeGen public static boolean corruptedSandsGen; public static boolean phantasmagoricInfernoGen; public static boolean boneyardGen; + public static boolean bloodyHeapGen; // Beach variations public static boolean gravelBeachGen; @@ -220,6 +221,7 @@ public class BOPConfigurationBiomeGen corruptedSandsGen = config.get("Nether Biomes To Generate", "CorruptedSands", true).getBoolean(true); phantasmagoricInfernoGen = config.get("Nether Biomes To Generate", "PhantasmagoricInferno", true).getBoolean(true); boneyardGen = config.get("Nether Biomes To Generate", "Boneyard", true).getBoolean(true); + bloodyHeapGen = config.get("Nether Biomes To Generate", "BloodyHeap", true).getBoolean(true); // Beach variations gravelBeachGen = config.get("Beach Variations To Generate", "Gravel Beach", true).getBoolean(true); diff --git a/common/biomesoplenty/configuration/configfile/BOPConfigurationIDs.java b/common/biomesoplenty/configuration/configfile/BOPConfigurationIDs.java index 42dd36d2f..09ce1b638 100644 --- a/common/biomesoplenty/configuration/configfile/BOPConfigurationIDs.java +++ b/common/biomesoplenty/configuration/configfile/BOPConfigurationIDs.java @@ -19,6 +19,7 @@ public class BOPConfigurationIDs public static int redRockID; public static int ashID; public static int ashStoneID; + public static int fleshID; public static int hardIceID; public static int originGrassID; public static int longGrassID; @@ -216,6 +217,7 @@ public class BOPConfigurationIDs public static int netherDesertID; public static int netherLavaID; public static int netherBoneID; + public static int netherBloodID; public static int oasisID; @@ -316,6 +318,7 @@ public class BOPConfigurationIDs holyStoneID = config.getTerrainBlock("Terrain Block IDs - MUST BE BELOW 255", "Skystone ID", 171, null).getInt(); cragRockID = config.getTerrainBlock("Terrain Block IDs - MUST BE BELOW 255", "Crag Rock ID", 172, null).getInt(); longGrassID = config.getTerrainBlock("Terrain Block IDs - MUST BE BELOW 255", "Long Grass ID", 173, null).getInt(); + fleshID = config.getTerrainBlock("Terrain Block IDs - MUST BE BELOW 255", "Flesh ID", 174, null).getInt(); // Get Crafted Block ID's plantsID = config.getBlock("Plant ID", 1920, null).getInt(); @@ -472,6 +475,8 @@ public class BOPConfigurationIDs //23-79 ExtraBiomesXL + netherBloodID = config.get("Biome IDs", "Bloody Heap (Nether) ID", 30).getInt(); + lavenderFieldsID = config.get("Biome IDs", "Lavender Fields ID", 31).getInt(); tropicsMountainID = config.get("Biome IDs", "Tropics Mountain (Sub-Biome) ID", 32).getInt(); autumnHillsID = config.get("Biome IDs", "Autumn Hills ID", 33).getInt(); diff --git a/common/biomesoplenty/world/WorldProviderBOPhell.java b/common/biomesoplenty/world/WorldProviderBOPhell.java index 8ded65c7d..fbea88e6f 100644 --- a/common/biomesoplenty/world/WorldProviderBOPhell.java +++ b/common/biomesoplenty/world/WorldProviderBOPhell.java @@ -10,7 +10,7 @@ public class WorldProviderBOPhell extends WorldProviderHell @Override public void registerWorldChunkManager() { - if (Biomes.netherGarden.isPresent() || Biomes.netherDesert.isPresent() || Biomes.netherLava.isPresent() || Biomes.netherBone.isPresent()) + if (Biomes.netherGarden.isPresent() || Biomes.netherDesert.isPresent() || Biomes.netherLava.isPresent() || Biomes.netherBone.isPresent() || Biomes.netherBlood.isPresent()) { this.worldChunkMgr = new WorldChunkManagerBOPhell(worldObj); } diff --git a/common/biomesoplenty/world/layer/BiomeLayerBiomes.java b/common/biomesoplenty/world/layer/BiomeLayerBiomes.java index d6765efa4..3a966b89a 100644 --- a/common/biomesoplenty/world/layer/BiomeLayerBiomes.java +++ b/common/biomesoplenty/world/layer/BiomeLayerBiomes.java @@ -83,6 +83,13 @@ public class BiomeLayerBiomes extends BiomeLayer netherBiomes.add(Biomes.netherBone.get()); } } + if (Biomes.netherBlood.isPresent()) + { + if (BOPConfigurationBiomeGen.bloodyHeapGen) + { + netherBiomes.add(Biomes.netherBlood.get()); + } + } if (Biomes.netherBiomes.size() > 0) { netherBiomes.addAll(Biomes.netherBiomes); diff --git a/resources/assets/biomesoplenty/lang/en_US.lang b/resources/assets/biomesoplenty/lang/en_US.lang index a79bb4354..711fddc96 100644 --- a/resources/assets/biomesoplenty/lang/en_US.lang +++ b/resources/assets/biomesoplenty/lang/en_US.lang @@ -16,6 +16,7 @@ tile.bop.redRocks.redcobble.name=Red Rock Cobblestone tile.bop.redRocks.redbrick.name=Red Rock Bricks tile.bop.ash.name=Ash Block +tile.bop.flesh.name=Flesh tile.bop.plants.deadgrass.name=Dead Grass tile.bop.plants.desertgrass.name=Desert Grass diff --git a/resources/assets/biomesoplenty/textures/blocks/flesh.png b/resources/assets/biomesoplenty/textures/blocks/flesh.png new file mode 100644 index 000000000..1e73f9cd1 Binary files /dev/null and b/resources/assets/biomesoplenty/textures/blocks/flesh.png differ diff --git a/resources/assets/biomesoplenty/textures/blocks/item_moss.png b/resources/assets/biomesoplenty/textures/blocks/item_moss.png index 8455c9d31..2ec2fdeea 100644 Binary files a/resources/assets/biomesoplenty/textures/blocks/item_moss.png and b/resources/assets/biomesoplenty/textures/blocks/item_moss.png differ diff --git a/resources/assets/biomesoplenty/textures/blocks/log_cherry_heart.png b/resources/assets/biomesoplenty/textures/blocks/log_cherry_heart.png index e926b0a69..44ba63522 100644 Binary files a/resources/assets/biomesoplenty/textures/blocks/log_cherry_heart.png and b/resources/assets/biomesoplenty/textures/blocks/log_cherry_heart.png differ diff --git a/resources/assets/biomesoplenty/textures/blocks/log_cherry_side.png b/resources/assets/biomesoplenty/textures/blocks/log_cherry_side.png index 5ea030471..2f65b45c7 100644 Binary files a/resources/assets/biomesoplenty/textures/blocks/log_cherry_side.png and b/resources/assets/biomesoplenty/textures/blocks/log_cherry_side.png differ diff --git a/resources/assets/biomesoplenty/textures/blocks/log_dark_heart.png b/resources/assets/biomesoplenty/textures/blocks/log_dark_heart.png index e926b0a69..237d04480 100644 Binary files a/resources/assets/biomesoplenty/textures/blocks/log_dark_heart.png and b/resources/assets/biomesoplenty/textures/blocks/log_dark_heart.png differ diff --git a/resources/assets/biomesoplenty/textures/blocks/log_dead_heart.png b/resources/assets/biomesoplenty/textures/blocks/log_dead_heart.png index e926b0a69..7c1280f74 100644 Binary files a/resources/assets/biomesoplenty/textures/blocks/log_dead_heart.png and b/resources/assets/biomesoplenty/textures/blocks/log_dead_heart.png differ diff --git a/resources/assets/biomesoplenty/textures/blocks/plank_cherry.png b/resources/assets/biomesoplenty/textures/blocks/plank_cherry.png index ed16e2492..f30eb728a 100644 Binary files a/resources/assets/biomesoplenty/textures/blocks/plank_cherry.png and b/resources/assets/biomesoplenty/textures/blocks/plank_cherry.png differ