From 1994b2cb0370c802ed41364fc44cf25490264d6d Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Sun, 26 May 2013 15:36:28 -0400 Subject: [PATCH] Added Hot Springs biome and Jacaranda trees. --- Planned Features.txt | 16 -- src/minecraft/biomesoplenty/api/Biomes.java | 1 + .../biomes/BiomeDecoratorBOP.java | 11 + .../biomes/BiomeGenHeathland.java | 6 +- .../biomes/BiomeGenHillsNew.java | 11 + .../biomes/BiomeGenHotSprings.java | 40 +++ .../biomes/BiomeGenOceanKelp.java | 19 ++ .../biomesoplenty/blocks/BlockBOPSapling.java | 10 + .../configuration/BOPBiomes.java | 15 +- .../configuration/BOPBlocks.java | 18 +- .../integration/BWG4Integration.java | 1 + .../integration/ForestryIntegration.java | 3 + .../integration/ThaumcraftIntegration.java | 12 + .../liquids/BlockSpringWaterFlowing.java | 13 + .../liquids/BlockSpringWaterStill.java | 16 +- .../biomesoplenty/world/WorldTypeBOP.java | 4 + .../biomesoplenty/worldgen/WorldGenHeath.java | 244 ------------------ .../worldgen/WorldGenJacaranda.java | 123 +++++++++ .../worldgen/WorldGenJacarandaShrub.java | 63 +++++ .../worldgen/WorldGenJadeTree.java | 143 ---------- .../worldgen/WorldGenOutback.java | 2 +- .../worldgen/WorldGenPineTree.java | 2 +- 22 files changed, 353 insertions(+), 420 deletions(-) create mode 100644 src/minecraft/biomesoplenty/biomes/BiomeGenHotSprings.java delete mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java create mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenJacaranda.java create mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenJacarandaShrub.java delete mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenJadeTree.java diff --git a/Planned Features.txt b/Planned Features.txt index bb822fa5a..3631146a1 100644 --- a/Planned Features.txt +++ b/Planned Features.txt @@ -20,22 +20,6 @@ Omega Essence: Mined from Omega Essence Ore. Used to turn Origin blocks bac --- -BIOMES CHANGES: - -Bayou: Trees in the water. - -Heathland: Change tree generation. - -Mangrove: Tweak the tree generation. Change height values. - ---- - -OVERWORLD BIOMES: - -Hot Springs: Geysers, pools of water and lava, and decaying spruce trees. - ---- - NETHER BIOMES: Corrupted Sands: Soulsand, bramble, thorns. diff --git a/src/minecraft/biomesoplenty/api/Biomes.java b/src/minecraft/biomesoplenty/api/Biomes.java index 660770689..bacf68962 100644 --- a/src/minecraft/biomesoplenty/api/Biomes.java +++ b/src/minecraft/biomesoplenty/api/Biomes.java @@ -41,6 +41,7 @@ public class Biomes public static Optional grove = Optional.absent(); public static Optional heathland = Optional.absent(); public static Optional highland = Optional.absent(); + public static Optional hotSprings = Optional.absent(); public static Optional icyHills = Optional.absent(); public static Optional jadeCliffs = Optional.absent(); public static Optional lushDesert = Optional.absent(); diff --git a/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java b/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java index 791d2800e..39bb8d943 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java @@ -23,6 +23,7 @@ import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.Ev import java.util.Random; import biomesoplenty.api.Blocks; +import biomesoplenty.api.Liquids; import biomesoplenty.configuration.BOPBlocks; import biomesoplenty.worldgen.WorldGenAlgae; import biomesoplenty.worldgen.WorldGenAsh; @@ -338,6 +339,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator protected int waterLakesPerChunk; protected int lavaLakesPerChunk; protected int netherLavaPerChunk; + protected int hotSpringsPerChunk; /** True if decorator should generate surface lava & water */ public boolean generateLakes; @@ -513,6 +515,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator this.waterLakesPerChunk = 0; this.lavaLakesPerChunk = 0; this.netherLavaPerChunk = 0; + this.hotSpringsPerChunk = 0; this.quicksandPerChunk = 0; this.quicksand2PerChunk = 0; this.crystalsPerChunk = 0; @@ -601,6 +604,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; (new WorldGenNetherLava(Block.lavaMoving.blockID)).generate(this.currentWorld, this.randomGenerator, var3, var4, var5); } + + for (var2 = 0; var2 < hotSpringsPerChunk; ++var2) + { + var3 = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + var4 = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(112) + 8) + 8); + var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLakes(Liquids.springWaterFlowing.get().blockID)).generate(this.currentWorld, this.randomGenerator, var3, var4, var5); + } if (this.generateAsh) { diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenHeathland.java b/src/minecraft/biomesoplenty/biomes/BiomeGenHeathland.java index b7a1c5e64..d94ea66f0 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenHeathland.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenHeathland.java @@ -2,7 +2,7 @@ package biomesoplenty.biomes; import java.util.Random; -import biomesoplenty.worldgen.WorldGenHeath; +import biomesoplenty.worldgen.WorldGenJacarandaShrub; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenShrub; @@ -18,7 +18,7 @@ public class BiomeGenHeathland extends BiomeGenBase this.spawnableCreatureList.clear(); this.theBiomeDecorator = new BiomeDecoratorBOP(this); this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; - this.customBiomeDecorator.treesPerChunk = 2; + this.customBiomeDecorator.treesPerChunk = 3; this.customBiomeDecorator.grassPerChunk = 10; this.customBiomeDecorator.purpleFlowersPerChunk = 30; this.customBiomeDecorator.deadBushPerChunk = 2; @@ -31,7 +31,7 @@ public class BiomeGenHeathland extends BiomeGenBase */ public WorldGenerator getRandomWorldGenForTrees(Random par1Random) { - return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenShrub(0, 0) : new WorldGenHeath(false)); + return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenJacarandaShrub(0, 0) : (par1Random.nextInt(2) == 0 ? new WorldGenShrub(0, 0) : this.worldGeneratorTrees)); } /** diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenHillsNew.java b/src/minecraft/biomesoplenty/biomes/BiomeGenHillsNew.java index 91543ad4e..5b6a025b9 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenHillsNew.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenHillsNew.java @@ -2,6 +2,8 @@ package biomesoplenty.biomes; import java.util.Random; +import biomesoplenty.worldgen.WorldGenJacaranda; + import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; @@ -18,9 +20,18 @@ public class BiomeGenHillsNew extends BiomeGenBase super(par1); this.theBiomeDecorator = new BiomeDecoratorBOP(this); this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; + this.customBiomeDecorator.treesPerChunk = 1; this.customBiomeDecorator.violetsPerChunk = 5; this.theWorldGenerator = new WorldGenMinable(Block.silverfish.blockID, 8); } + + /** + * Gets a WorldGen appropriate for this biome. + */ + public WorldGenerator getRandomWorldGenForTrees(Random par1Random) + { + return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenJacaranda(false) : this.worldGeneratorTrees); + } public void decorate(World par1World, Random par2Random, int par3, int par4) { diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenHotSprings.java b/src/minecraft/biomesoplenty/biomes/BiomeGenHotSprings.java new file mode 100644 index 000000000..655cc6ee1 --- /dev/null +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenHotSprings.java @@ -0,0 +1,40 @@ +package biomesoplenty.biomes; + +import java.util.Random; + +import biomesoplenty.api.Liquids; +import biomesoplenty.worldgen.WorldGenPineTree; +import biomesoplenty.worldgen.WorldGenTaiga6; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenTaiga2; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenHotSprings extends BiomeGenBase +{ + private BiomeDecoratorBOP customBiomeDecorator; + + public BiomeGenHotSprings(int par1) + { + super(par1); + this.topBlock = (byte)Block.stone.blockID; + this.fillerBlock = (byte)Block.stone.blockID; + this.theBiomeDecorator = new BiomeDecoratorBOP(this); + this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; + this.customBiomeDecorator.treesPerChunk = 3; + this.customBiomeDecorator.grassPerChunk = -999; + this.customBiomeDecorator.outbackPerChunk = 5; + this.customBiomeDecorator.hotSpringsPerChunk = 25; + this.customBiomeDecorator.lavaLakesPerChunk = 5; + } + + /** + * Gets a WorldGen appropriate for this biome. + */ + public WorldGenerator getRandomWorldGenForTrees(Random par1Random) + { + return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenPineTree() : new WorldGenTaiga6(false)); + } +} diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenOceanKelp.java b/src/minecraft/biomesoplenty/biomes/BiomeGenOceanKelp.java index 3a74f1acd..362a57280 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenOceanKelp.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenOceanKelp.java @@ -2,15 +2,34 @@ package biomesoplenty.biomes; import java.util.Random; +import biomesoplenty.api.Blocks; +import biomesoplenty.configuration.BOPBlocks; + import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenTallGrass; +import net.minecraft.world.gen.feature.WorldGenerator; public class BiomeGenOceanKelp extends BiomeGenBase { + private BiomeDecoratorBOP customBiomeDecorator; + public BiomeGenOceanKelp(int par1) { super(par1); + this.theBiomeDecorator = new BiomeDecoratorBOP(this); + this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; + this.customBiomeDecorator.grassPerChunk = 50; this.spawnableCreatureList.clear(); } + + + /** + * Gets a WorldGen appropriate for this biome. + */ + public WorldGenerator getRandomWorldGenForGrass(Random par1Random) + { + return new WorldGenTallGrass(Blocks.coral.get().blockID, 0); + } } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java index 66c8bca16..e3e70c092 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java @@ -21,8 +21,10 @@ import biomesoplenty.worldgen.WorldGenBambooTree2; import biomesoplenty.worldgen.WorldGenCherry1; import biomesoplenty.worldgen.WorldGenCherry2; import biomesoplenty.worldgen.WorldGenDeadTree2; +import biomesoplenty.worldgen.WorldGenJacaranda; import biomesoplenty.worldgen.WorldGenMaple; import biomesoplenty.worldgen.WorldGenMystic2; +import biomesoplenty.worldgen.WorldGenNetherBush; import biomesoplenty.worldgen.WorldGenOminous1; import biomesoplenty.worldgen.WorldGenOminous2; import biomesoplenty.worldgen.WorldGenOriginTree; @@ -179,6 +181,14 @@ public class BlockBOPSapling extends BlockSapling case 12: // White Cherry Tree obj = new WorldGenCherry2(false); + break; + + case 13: // Hellbark + obj = new WorldGenNetherBush(); + break; + + case 14: // Jacaranda + obj = new WorldGenJacaranda(false); break; } } diff --git a/src/minecraft/biomesoplenty/configuration/BOPBiomes.java b/src/minecraft/biomesoplenty/configuration/BOPBiomes.java index fa34a609f..28a53b108 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPBiomes.java +++ b/src/minecraft/biomesoplenty/configuration/BOPBiomes.java @@ -98,6 +98,7 @@ public class BOPBiomes { Biomes.grove = Optional.of((new BiomeGenGrove(BOPConfiguration.groveID)).setColor(9286496).setBiomeName("Grove").setTemperatureRainfall(0.4F, 0.8F).setMinMaxHeight(0.0F, 0.1F)); Biomes.heathland = Optional.of((new BiomeGenHeathland(BOPConfiguration.heathlandID)).setColor(353825).setBiomeName("Heathland").func_76733_a(5159473).setTemperatureRainfall(0.8F, 0.1F).setMinMaxHeight(0.1F, 0.3F)); Biomes.highland = Optional.of((new BiomeGenHighland(BOPConfiguration.highlandID)).setColor(6316128).setBiomeName("Highland").setMinMaxHeight(0.9F, 1.9F).setTemperatureRainfall(0.5F, 0.5F)); + Biomes.hotSprings = Optional.of((new BiomeGenHotSprings(BOPConfiguration.hotSpringsID)).setColor(10486015).setBiomeName("Hot Springs").setMinMaxHeight(0.2F, 0.5F).setTemperatureRainfall(0.5F, 0.8F)); Biomes.icyHills = Optional.of((new BiomeGenIcyHills(BOPConfiguration.icyHillsID)).setColor(14090235).setBiomeName("Icy Hills").setEnableSnow().setTemperatureRainfall(0.0F, 0.0F).setMinMaxHeight(0.1F, 0.8F)); Biomes.jadeCliffs = Optional.of((new BiomeGenJadeCliffs(BOPConfiguration.jadeCliffsID)).setColor(14090235).setBiomeName("Jade Cliffs").setTemperatureRainfall(0.5F, 0.1F).setMinMaxHeight(0.1F, 2.0F)); Biomes.lushDesert = Optional.of((new BiomeGenLushDesert(BOPConfiguration.lushDesertID)).setColor(16421912).setBiomeName("Lush Desert").setTemperatureRainfall(0.8F, 0.2F).setMinMaxHeight(0.1F, 0.9F)); @@ -119,8 +120,8 @@ public class BOPBiomes { Biomes.oasis = Optional.of((new BiomeGenOasis(BOPConfiguration.oasisID)).setColor(16421912).setBiomeName("Oasis").setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.1F, 0.2F)); - Biomes.oceanCoral = Optional.of((new BiomeGenOceanCoral(BOPConfiguration.oceanCoralID)).setColor(10486015).setBiomeName("Coral Reef").setMinMaxHeight(-0.1F, -0.1F).setTemperatureRainfall(0.5F, 0.9F)); - Biomes.oceanKelp = Optional.of((new BiomeGenOceanKelp(BOPConfiguration.oceanKelpID)).setColor(10486015).setBiomeName("Kelp Forest").setMinMaxHeight(-0.1F, -0.1F).setTemperatureRainfall(0.5F, 0.9F)); + Biomes.oceanCoral = Optional.of((new BiomeGenOceanCoral(BOPConfiguration.oceanCoralID)).setColor(10486015).setBiomeName("Coral Reef").setMinMaxHeight(-0.4F, -0.1F).setTemperatureRainfall(0.5F, 0.9F)); + Biomes.oceanKelp = Optional.of((new BiomeGenOceanKelp(BOPConfiguration.oceanKelpID)).setColor(10486015).setBiomeName("Kelp Forest").setMinMaxHeight(-0.4F, -0.1F).setTemperatureRainfall(0.5F, 0.9F)); Biomes.ominousWoods = Optional.of((new BiomeGenOminousWoods(BOPConfiguration.ominousWoodsID)).setColor(353825).setBiomeName("Ominous Woods").setDisableRain().func_76733_a(5159473).setTemperatureRainfall(0.8F, 0.9F)); Biomes.orchard = Optional.of((new BiomeGenOrchard(BOPConfiguration.orchardID)).setColor(9286496).setBiomeName("Orchard").setTemperatureRainfall(0.8F, 0.4F)); @@ -204,6 +205,7 @@ public class BOPBiomes { BiomeDictionary.registerBiomeType(Biomes.grove.get(), Type.FOREST); BiomeDictionary.registerBiomeType(Biomes.heathland.get(), Type.PLAINS); BiomeDictionary.registerBiomeType(Biomes.highland.get(), Type.HILLS, Type.MOUNTAIN); + BiomeDictionary.registerBiomeType(Biomes.hotSprings.get(), Type.HILLS, Type.FOREST, Type.WATER); BiomeDictionary.registerBiomeType(Biomes.icyHills.get(), Type.FROZEN, Type.HILLS); BiomeDictionary.registerBiomeType(Biomes.jadeCliffs.get(), Type.FOREST, Type.MOUNTAIN); BiomeDictionary.registerBiomeType(Biomes.lushDesert.get(), Type.DESERT, Type.PLAINS); @@ -300,6 +302,7 @@ public class BOPBiomes { addSpawnBiome(Biomes.grove); addSpawnBiome(Biomes.heathland); addSpawnBiome(Biomes.highland); + addSpawnBiome(Biomes.hotSprings); addSpawnBiome(Biomes.jadeCliffs); addSpawnBiome(Biomes.lushDesert); addSpawnBiome(Biomes.lushSwamp); @@ -374,6 +377,7 @@ public class BOPBiomes { addVillageBiome(Biomes.grove, BOPConfiguration.groveVillage); addVillageBiome(Biomes.heathland, BOPConfiguration.heathlandVillage); addVillageBiome(Biomes.highland, BOPConfiguration.highlandVillage); + addVillageBiome(Biomes.hotSprings, BOPConfiguration.hotSpringsVillage); addVillageBiome(Biomes.jadeCliffs, BOPConfiguration.jadeCliffsVillage); addVillageBiome(Biomes.lushDesert, BOPConfiguration.lushDesertVillage); addVillageBiome(Biomes.lushSwamp, BOPConfiguration.lushSwampVillage); @@ -452,6 +456,7 @@ public class BOPBiomes { addStrongholdBiome(Biomes.grove); addStrongholdBiome(Biomes.heathland); addStrongholdBiome(Biomes.highland); + addStrongholdBiome(Biomes.hotSprings); addStrongholdBiome(Biomes.icyHills); addStrongholdBiome(Biomes.jadeCliffs); addStrongholdBiome(Biomes.lushDesert); @@ -599,6 +604,9 @@ public class BOPBiomes { if (BOPConfiguration.highlandGen) registerBiome(Biomes.highland); + + if (BOPConfiguration.hotSpringsGen) + registerBiome(Biomes.hotSprings); if (BOPConfiguration.icyHillsGen) registerBiome(Biomes.icyHills); @@ -903,6 +911,9 @@ public class BOPBiomes { if (BOPConfiguration.highlandGen) addBiomeToWorldTypes(getWorldTypes(), Biomes.highland); + + if (BOPConfiguration.hotSpringsGen) + addBiomeToWorldTypes(getWorldTypes(), Biomes.hotSprings); if (BOPConfiguration.icyHillsGen) addBiomeToWorldTypes(getWorldTypes(), Biomes.icyHills); diff --git a/src/minecraft/biomesoplenty/configuration/BOPBlocks.java b/src/minecraft/biomesoplenty/configuration/BOPBlocks.java index 52fe98c0d..b88d50fc4 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPBlocks.java +++ b/src/minecraft/biomesoplenty/configuration/BOPBlocks.java @@ -335,7 +335,7 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(),1,5), "Dying Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.colorizedSaplings.get(),1,4), "Willow Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.colorizedSaplings.get(),1,5), "Pine Sapling"); - LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(), 1, 13), "Hell Bark Sapling"); + LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(), 1, 13), "Hellbark Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(), 1, 14), "Jacaranda Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(),1,0), "Apple Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(),1,9), "Origin Sapling"); @@ -403,9 +403,9 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 8), "Redwood Wood Planks"); LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 9), "Willow Wood Planks"); LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 10), "Bamboo Thatching"); - LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 11), "Pine Planks"); - LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 12), "Hell Bark Planks"); - LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 13), "Jacaranda Planks"); + LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 11), "Pine Wood Planks"); + LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 12), "Hellbark Wood Planks"); + LanguageRegistry.addName(new ItemStack(Blocks.planks.get(), 1, 13), "Jacaranda Wood Planks"); LanguageRegistry.addName(new ItemStack(Blocks.logs1.get(),1,0), "Acacia Wood"); LanguageRegistry.addName(new ItemStack(Blocks.logs1.get(),1,1), "Cherry Wood"); @@ -423,7 +423,7 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.logs3.get(),1,3), "Giant Flower Stem"); LanguageRegistry.addName(new ItemStack(Blocks.logs4.get(),1,0), "Pine Wood"); - LanguageRegistry.addName(new ItemStack(Blocks.logs4.get(),1,1), "Hell Bark Wood"); + LanguageRegistry.addName(new ItemStack(Blocks.logs4.get(),1,1), "Hellbark Wood"); LanguageRegistry.addName(new ItemStack(Blocks.logs4.get(),1,2), "Jacaranda Wood"); LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,0), "Yellow Autumn Leaves"); @@ -439,7 +439,7 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,1), "Pink Cherry Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,2), "Maple Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,3), "White Cherry Leaves"); - LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,4), "Hell Bark Leaves"); + LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,4), "Hellbark Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,5), "Jacaranda Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.woodenDoubleSlab1.get(),1,0), "Acacia Wood Slab"); @@ -453,7 +453,7 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.woodenDoubleSlab2.get(),1,0), "Redwood Wood Slab"); LanguageRegistry.addName(new ItemStack(Blocks.woodenDoubleSlab2.get(),1,1), "Willow Wood Slab"); LanguageRegistry.addName(new ItemStack(Blocks.woodenDoubleSlab2.get(),1,2), "Pine Wood Slab"); - LanguageRegistry.addName(new ItemStack(Blocks.woodenDoubleSlab2.get(),1,3), "Hell Bark Slab"); + LanguageRegistry.addName(new ItemStack(Blocks.woodenDoubleSlab2.get(),1,3), "Hellbark Wood Slab"); LanguageRegistry.addName(new ItemStack(Blocks.woodenDoubleSlab2.get(),1,4), "Jacaranda Wood Slab"); LanguageRegistry.addName(new ItemStack(Blocks.woodenSingleSlab1.get(),1,0), "Acacia Wood Slab"); @@ -467,7 +467,7 @@ public class BOPBlocks { LanguageRegistry.addName(new ItemStack(Blocks.woodenSingleSlab2.get(),1,0), "Redwood Wood Slab"); LanguageRegistry.addName(new ItemStack(Blocks.woodenSingleSlab2.get(),1,1), "Willow Wood Slab"); LanguageRegistry.addName(new ItemStack(Blocks.woodenSingleSlab2.get(),1,2), "Pine Wood Slab"); - LanguageRegistry.addName(new ItemStack(Blocks.woodenSingleSlab2.get(),1,3), "Hell Bark Slab"); + LanguageRegistry.addName(new ItemStack(Blocks.woodenSingleSlab2.get(),1,3), "Hellbark Wood Slab"); LanguageRegistry.addName(new ItemStack(Blocks.woodenSingleSlab2.get(),1,4), "Jacaranda Wood Slab"); LanguageRegistry.addName(Blocks.acaciaStairs.get(), "Acacia Wood Stairs"); @@ -481,7 +481,7 @@ public class BOPBlocks { LanguageRegistry.addName(Blocks.redwoodStairs.get(), "Redwood Wood Stairs"); LanguageRegistry.addName(Blocks.willowStairs.get(), "Willow Wood Stairs"); LanguageRegistry.addName(Blocks.pineStairs.get(), "Pine Wood Stairs"); - LanguageRegistry.addName(Blocks.hellBarkStairs.get(), "Hell Bark Stairs"); + LanguageRegistry.addName(Blocks.hellBarkStairs.get(), "Hellbark Wood Stairs"); LanguageRegistry.addName(Blocks.jacarandaStairs.get(), "Jacaranda Wood Stairs"); LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,3), "Redwood Leaves"); diff --git a/src/minecraft/biomesoplenty/integration/BWG4Integration.java b/src/minecraft/biomesoplenty/integration/BWG4Integration.java index 5c1fb6a5b..8b9384142 100644 --- a/src/minecraft/biomesoplenty/integration/BWG4Integration.java +++ b/src/minecraft/biomesoplenty/integration/BWG4Integration.java @@ -54,6 +54,7 @@ public class BWG4Integration if(Biomes.lushDesert.isPresent()) { DefaultBiomeList.addBiome("BoP: Lush Desert", Biomes.lushDesert.get(), 4); } if(Biomes.jadeCliffs.isPresent()) { DefaultBiomeList.addBiome("BoP: Jade Cliffs", Biomes.jadeCliffs.get(), 2); } if(Biomes.icyHills.isPresent()) { DefaultBiomeList.addBiome("BoP: Icy Hills", Biomes.icyHills.get(), 1); } + if(Biomes.hotSprings.isPresent()) { DefaultBiomeList.addBiome("BoP: Hot Springs", Biomes.hotSprings.get(), 2); } if(Biomes.highland.isPresent()) { DefaultBiomeList.addBiome("BoP: Highland", Biomes.highland.get(), 2); } if(Biomes.heathland.isPresent()) { DefaultBiomeList.addBiome("BoP: Heathland", Biomes.heathland.get(), 4); } if(Biomes.grove.isPresent()) { DefaultBiomeList.addBiome("BoP: Grove", Biomes.grove.get(), 2); } diff --git a/src/minecraft/biomesoplenty/integration/ForestryIntegration.java b/src/minecraft/biomesoplenty/integration/ForestryIntegration.java index 4c655a9f4..ef718750a 100644 --- a/src/minecraft/biomesoplenty/integration/ForestryIntegration.java +++ b/src/minecraft/biomesoplenty/integration/ForestryIntegration.java @@ -66,6 +66,7 @@ public class ForestryIntegration //Warm - Damp //Jungle Hives EnumTemperature.warmBiomeIds.add(BOPConfiguration.bambooForestID); + EnumTemperature.warmBiomeIds.add(BOPConfiguration.hotSpringsID); EnumTemperature.warmBiomeIds.add(BOPConfiguration.sacredSpringsID); EnumTemperature.warmBiomeIds.add(BOPConfiguration.tropicalRainforestID); EnumTemperature.warmBiomeIds.add(BOPConfiguration.promisedLandSwampID); @@ -76,6 +77,7 @@ public class ForestryIntegration EnumTemperature.warmBiomeIds.add(BOPConfiguration.jungleNewID); EnumHumidity.dampBiomeIds.add(BOPConfiguration.bambooForestID); + EnumHumidity.dampBiomeIds.add(BOPConfiguration.hotSpringsID); EnumHumidity.dampBiomeIds.add(BOPConfiguration.sacredSpringsID); EnumHumidity.dampBiomeIds.add(BOPConfiguration.tropicalRainforestID); EnumHumidity.dampBiomeIds.add(BOPConfiguration.promisedLandSwampID); @@ -309,6 +311,7 @@ public class ForestryIntegration BackpackManager.backpackItems[FORESTER].add(new ItemStack(Blocks.logs1.get(), 1, OreDictionary.WILDCARD_VALUE)); BackpackManager.backpackItems[FORESTER].add(new ItemStack(Blocks.logs2.get(), 1, OreDictionary.WILDCARD_VALUE)); BackpackManager.backpackItems[FORESTER].add(new ItemStack(Blocks.logs3.get(), 1, OreDictionary.WILDCARD_VALUE)); + BackpackManager.backpackItems[FORESTER].add(new ItemStack(Blocks.logs4.get(), 1, OreDictionary.WILDCARD_VALUE)); BackpackManager.backpackItems[FORESTER].add(new ItemStack(Blocks.colorizedSaplings.get(), 1, OreDictionary.WILDCARD_VALUE)); BackpackManager.backpackItems[FORESTER].add(new ItemStack(Blocks.saplings.get(), 1, OreDictionary.WILDCARD_VALUE)); BackpackManager.backpackItems[FORESTER].add(new ItemStack(Blocks.leaves1.get(), 1, OreDictionary.WILDCARD_VALUE)); diff --git a/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java b/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java index dd8dc765f..c58346887 100644 --- a/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java +++ b/src/minecraft/biomesoplenty/integration/ThaumcraftIntegration.java @@ -40,6 +40,9 @@ public class ThaumcraftIntegration { ThaumcraftApi.registerObjectTag(getBID("redwoodLog"), getBMeta("redwoodLog"), (new ObjectTags()).add(EnumTag.WOOD, 8)); ThaumcraftApi.registerObjectTag(getBID("willowLog"), getBMeta("willowLog"), (new ObjectTags()).add(EnumTag.WOOD, 8)); + ThaumcraftApi.registerObjectTag(getBID("pineLog"), getBMeta("pineLog"), (new ObjectTags()).add(EnumTag.WOOD, 8)); + ThaumcraftApi.registerObjectTag(getBID("hellBarkLog"), getBMeta("hellBarkLog"), (new ObjectTags()).add(EnumTag.WOOD, 8).add(EnumTag.FIRE, 2)); + ThaumcraftApi.registerObjectTag(getBID("jacarandaLog"), getBMeta("jacarandaLog"), (new ObjectTags()).add(EnumTag.WOOD, 8)); ThaumcraftApi.registerObjectTag(getBID("deadLog"), getBMeta("deadLog"), (new ObjectTags()).add(EnumTag.WOOD, 8)); ///Working ThaumcraftApi.registerObjectTag(getBID("bigFlowerStem"), getBMeta("bigFlowerStem"), (new ObjectTags()).add(EnumTag.FLOWER, 4).add(EnumTag.MAGIC, 1)); @@ -54,6 +57,9 @@ public class ThaumcraftIntegration { ThaumcraftApi.registerObjectTag(getBID("palmPlank"), getBMeta("palmPlank"), (new ObjectTags()).add(EnumTag.WOOD, 2)); ThaumcraftApi.registerObjectTag(getBID("redwoodPlank"), getBMeta("redwoodPlank"), (new ObjectTags()).add(EnumTag.WOOD, 2)); ThaumcraftApi.registerObjectTag(getBID("willowPlank"), getBMeta("willowPlank"), (new ObjectTags()).add(EnumTag.WOOD, 2)); + ThaumcraftApi.registerObjectTag(getBID("pinePlank"), getBMeta("pinePlank"), (new ObjectTags()).add(EnumTag.WOOD, 2)); + ThaumcraftApi.registerObjectTag(getBID("hellBarkPlank"), getBMeta("hellBarkPlank"), (new ObjectTags()).add(EnumTag.WOOD, 2).add(EnumTag.FIRE, 2)); + ThaumcraftApi.registerObjectTag(getBID("jacarandaPlank"), getBMeta("jacarandaPlank"), (new ObjectTags()).add(EnumTag.WOOD, 2)); ThaumcraftApi.registerObjectTag(getBID("bambooThatching"), getBMeta("bambooThatching"), (new ObjectTags()).add(EnumTag.WATER, 14).add(EnumTag.PLANT, 14)); //Leaves @@ -73,6 +79,9 @@ public class ThaumcraftIntegration { ThaumcraftApi.registerObjectTag(getBID("orangeAutumnLeaves"), getBMeta("orangeAutumnLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2)); ThaumcraftApi.registerObjectTag(getBID("pinkCherryLeaves"), getBMeta("pinkCherryLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2)); ThaumcraftApi.registerObjectTag(getBID("whiteCherryLeaves"), getBMeta("whiteCherryLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2)); + ThaumcraftApi.registerObjectTag(getBID("pineLeaves"), getBMeta("pineLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2)); + ThaumcraftApi.registerObjectTag(getBID("hellBarkLeaves"), getBMeta("hellBarkLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2)); + ThaumcraftApi.registerObjectTag(getBID("jacarandaLeaves"), getBMeta("jacarandaLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2).add(EnumTag.FIRE, 2)); ThaumcraftApi.registerObjectTag(getBID("bambooLeaves"), getBMeta("bambooLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2)); ThaumcraftApi.registerObjectTag(getBID("originLeaves"), getBMeta("originLeaves"), (new ObjectTags()).add(EnumTag.PLANT, 2)); ThaumcraftApi.registerObjectTag(getBID("appleLeavesFruitless"), getBMeta("appleLeavesFruitless"), (new ObjectTags()).add(EnumTag.PLANT, 2)); @@ -95,6 +104,9 @@ public class ThaumcraftIntegration { ThaumcraftApi.registerObjectTag(getBID("appleSapling"), getBMeta("appleSapling"), (new ObjectTags()).add(EnumTag.WOOD, 4).add(EnumTag.PLANT, 2)); ThaumcraftApi.registerObjectTag(getBID("originSapling"), getBMeta("originSapling"), (new ObjectTags()).add(EnumTag.WOOD, 4).add(EnumTag.PLANT, 2)); ThaumcraftApi.registerObjectTag(getBID("yellowAutumnSapling"), getBMeta("yellowAutumnSapling"), (new ObjectTags()).add(EnumTag.WOOD, 4).add(EnumTag.PLANT, 2)); + ThaumcraftApi.registerObjectTag(getBID("pineSapling"), getBMeta("pineSapling"), (new ObjectTags()).add(EnumTag.WOOD, 4).add(EnumTag.PLANT, 2)); + ThaumcraftApi.registerObjectTag(getBID("hellBarkSapling"), getBMeta("hellBarkSapling"), (new ObjectTags()).add(EnumTag.WOOD, 4).add(EnumTag.PLANT, 2).add(EnumTag.FIRE, 2)); + ThaumcraftApi.registerObjectTag(getBID("jacarandaSapling"), getBMeta("jacarandaSapling"), (new ObjectTags()).add(EnumTag.WOOD, 4).add(EnumTag.PLANT, 2)); ThaumcraftApi.registerObjectTag(getBID("bambooSapling"), getBMeta("bambooSapling"), (new ObjectTags()).add(EnumTag.WOOD, 4).add(EnumTag.PLANT, 2)); //Blocks diff --git a/src/minecraft/biomesoplenty/liquids/BlockSpringWaterFlowing.java b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterFlowing.java index af877b102..d3401b11a 100644 --- a/src/minecraft/biomesoplenty/liquids/BlockSpringWaterFlowing.java +++ b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterFlowing.java @@ -41,6 +41,19 @@ public class BlockSpringWaterFlowing extends BlockFlowing implements ILiquid int l = par1World.getBlockMetadata(par2, par3, par4); par1World.setBlock(par2, par3, par4, this.blockID + 1, l, 2); } + + /** + * A randomly called display update to be able to add particles or other items for display + */ + public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + super.randomDisplayTick(par1World, par2, par3, par4, par5Random); + + if (par5Random.nextInt(6) == 0) + { + par1World.spawnParticle("smoke", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.0F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D); + } + } @Override public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) diff --git a/src/minecraft/biomesoplenty/liquids/BlockSpringWaterStill.java b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterStill.java index b025f0b79..4422d89ce 100644 --- a/src/minecraft/biomesoplenty/liquids/BlockSpringWaterStill.java +++ b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterStill.java @@ -1,5 +1,7 @@ package biomesoplenty.liquids; +import java.util.Random; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockStationary; @@ -36,6 +38,19 @@ public class BlockSpringWaterStill extends BlockStationary implements ILiquid { return 16777215; } + + /** + * A randomly called display update to be able to add particles or other items for display + */ + public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + super.randomDisplayTick(par1World, par2, par3, par4, par5Random); + + if (par5Random.nextInt(6) == 0) + { + par1World.spawnParticle("smoke", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.0F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D); + } + } @Override public void onBlockAdded(World par1World, int x, int y, int z) @@ -49,7 +64,6 @@ public class BlockSpringWaterStill extends BlockStationary implements ILiquid par1World.setBlock(par2, par3, par4, this.blockID - 1, l, 2); par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID - 1, this.tickRate(par1World)); } - @Override public void onEntityCollidedWithBlock(World par1World, int x, int y, int z, Entity par5Entity) diff --git a/src/minecraft/biomesoplenty/world/WorldTypeBOP.java b/src/minecraft/biomesoplenty/world/WorldTypeBOP.java index 63fa8d2b0..da5c78dc2 100644 --- a/src/minecraft/biomesoplenty/world/WorldTypeBOP.java +++ b/src/minecraft/biomesoplenty/world/WorldTypeBOP.java @@ -142,6 +142,10 @@ public class WorldTypeBOP extends WorldType { addNewBiome(Biomes.highland); } + if (BOPConfiguration.hotSpringsGen == true) + { + addNewBiome(Biomes.hotSprings); + } if (BOPConfiguration.icyHillsGen == true) { addNewBiome(Biomes.icyHills); diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java b/src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java deleted file mode 100644 index 55da00c76..000000000 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java +++ /dev/null @@ -1,244 +0,0 @@ -package biomesoplenty.worldgen; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.util.Direction; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenerator; - -public class WorldGenHeath extends WorldGenerator -{ - /** The minimum height of a generated tree. */ - private final int minTreeHeight; - - /** True if this tree should grow Vines. */ - private final boolean vinesGrow; - - /** The metadata value of the wood to use in tree generation. */ - private final int metaWood; - - /** The metadata value of the leaves to use in tree generation. */ - private final int metaLeaves; - - public WorldGenHeath(boolean par1) - { - this(par1, 1, 0, 0, false); - } - - public WorldGenHeath(boolean par1, int par2, int par3, int par4, boolean par5) - { - super(par1); - this.minTreeHeight = par2; - this.metaWood = par3; - this.metaLeaves = par4; - this.vinesGrow = par5; - } - - public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) - { - int var6 = par2Random.nextInt(4) + this.minTreeHeight; - boolean var7 = true; - - if (par4 >= 1 && par4 + var6 + 1 <= 256) - { - int var8; - byte var9; - int var11; - int var12; - - for (var8 = par4; var8 <= par4 + 1 + var6; ++var8) - { - var9 = 1; - - if (var8 == par4) - { - var9 = 0; - } - - if (var8 >= par4 + 1 + var6 - 2) - { - var9 = 2; - } - - for (int var10 = par3 - var9; var10 <= par3 + var9 && var7; ++var10) - { - for (var11 = par5 - var9; var11 <= par5 + var9 && var7; ++var11) - { - if (var8 >= 0 && var8 < 256) - { - var12 = par1World.getBlockId(var10, var8, var11); - - if (var12 != 0 && var12 != Block.leaves.blockID && var12 != Block.grass.blockID && var12 != Block.dirt.blockID && var12 != Block.wood.blockID) - { - var7 = false; - } - } - else - { - var7 = false; - } - } - } - } - - if (!var7) - { - return false; - } - else - { - var8 = par1World.getBlockId(par3, par4 - 1, par5); - - if ((var8 == Block.grass.blockID || var8 == Block.dirt.blockID) && par4 < 256 - var6 - 1) - { - this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID); - var9 = 3; - byte var18 = 0; - int var13; - int var14; - int var15; - - for (var11 = par4 - var9 + var6; var11 <= par4 + var6; ++var11) - { - var12 = var11 - (par4 + var6); - var13 = var18 + 1 - var12 / 2; - - for (var14 = par3 - var13; var14 <= par3 + var13; ++var14) - { - var15 = var14 - par3; - - for (int var16 = par5 - var13; var16 <= par5 + var13; ++var16) - { - int var17 = var16 - par5; - - if ((Math.abs(var15) != var13 || Math.abs(var17) != var13 || par2Random.nextInt(2) != 0 && var12 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var14, var11, var16)]) - { - this.setBlockAndMetadata(par1World, var14, var11, var16, Block.leaves.blockID, this.metaLeaves); - } - } - } - } - - for (var11 = 0; var11 < var6; ++var11) - { - var12 = par1World.getBlockId(par3, par4 + var11, par5); - - if (var12 == 0 || var12 == Block.leaves.blockID) - { - this.setBlockAndMetadata(par1World, par3, par4 + var11, par5, Block.wood.blockID, this.metaWood); - - if (this.vinesGrow && var11 > 0) - { - if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3 - 1, par4 + var11, par5)) - { - this.setBlockAndMetadata(par1World, par3 - 1, par4 + var11, par5, Block.vine.blockID, 8); - } - - if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3 + 1, par4 + var11, par5)) - { - this.setBlockAndMetadata(par1World, par3 + 1, par4 + var11, par5, Block.vine.blockID, 2); - } - - if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3, par4 + var11, par5 - 1)) - { - this.setBlockAndMetadata(par1World, par3, par4 + var11, par5 - 1, Block.vine.blockID, 1); - } - - if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3, par4 + var11, par5 + 1)) - { - this.setBlockAndMetadata(par1World, par3, par4 + var11, par5 + 1, Block.vine.blockID, 4); - } - } - } - } - - if (this.vinesGrow) - { - for (var11 = par4 - 3 + var6; var11 <= par4 + var6; ++var11) - { - var12 = var11 - (par4 + var6); - var13 = 2 - var12 / 2; - - for (var14 = par3 - var13; var14 <= par3 + var13; ++var14) - { - for (var15 = par5 - var13; var15 <= par5 + var13; ++var15) - { - if (par1World.getBlockId(var14, var11, var15) == Block.leaves.blockID) - { - if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var14 - 1, var11, var15) == 0) - { - this.growVines(par1World, var14 - 1, var11, var15, 8); - } - - if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var14 + 1, var11, var15) == 0) - { - this.growVines(par1World, var14 + 1, var11, var15, 2); - } - - if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var14, var11, var15 - 1) == 0) - { - this.growVines(par1World, var14, var11, var15 - 1, 1); - } - - if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var14, var11, var15 + 1) == 0) - { - this.growVines(par1World, var14, var11, var15 + 1, 4); - } - } - } - } - } - - if (par2Random.nextInt(5) == 0 && var6 > 5) - { - for (var11 = 0; var11 < 2; ++var11) - { - for (var12 = 0; var12 < 4; ++var12) - { - if (par2Random.nextInt(4 - var11) == 0) - { - var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); - } - } - } - } - } - - return true; - } - else - { - return false; - } - } - } - else - { - return false; - } - } - - /** - * Grows vines downward from the given block for a given length. Args: World, x, starty, z, vine-length - */ - private void growVines(World par1World, int par2, int par3, int par4, int par5) - { - this.setBlockAndMetadata(par1World, par2, par3, par4, Block.vine.blockID, par5); - int var6 = 4; - - while (true) - { - --par3; - - if (par1World.getBlockId(par2, par3, par4) != 0 || var6 <= 0) - { - return; - } - - this.setBlockAndMetadata(par1World, par2, par3, par4, Block.vine.blockID, par5); - --var6; - } - } -} diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenJacaranda.java b/src/minecraft/biomesoplenty/worldgen/WorldGenJacaranda.java new file mode 100644 index 000000000..26c1cb34c --- /dev/null +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenJacaranda.java @@ -0,0 +1,123 @@ +package biomesoplenty.worldgen; + +import java.util.Random; + +import biomesoplenty.api.Blocks; +import biomesoplenty.configuration.BOPBlocks; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenJacaranda extends WorldGenerator +{ + public WorldGenJacaranda(boolean par1) + { + super(par1); + } + + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + int var6 = par2Random.nextInt(3) + 5; + boolean var7 = true; + + if (par4 >= 1 && par4 + var6 + 1 <= 256) + { + int var8; + int var10; + int var11; + int var12; + + for (var8 = par4; var8 <= par4 + 1 + var6; ++var8) + { + byte var9 = 1; + + if (var8 == par4) + { + var9 = 0; + } + + if (var8 >= par4 + 1 + var6 - 2) + { + var9 = 2; + } + + for (var10 = par3 - var9; var10 <= par3 + var9 && var7; ++var10) + { + for (var11 = par5 - var9; var11 <= par5 + var9 && var7; ++var11) + { + if (var8 >= 0 && var8 < 256) + { + var12 = par1World.getBlockId(var10, var8, var11); + + if (var12 != 0 && var12 != Blocks.leaves2.get().blockID) + { + var7 = false; + } + } + else + { + var7 = false; + } + } + } + } + + if (!var7) + { + return false; + } + else + { + var8 = par1World.getBlockId(par3, par4 - 1, par5); + + if ((var8 == Block.grass.blockID || var8 == Block.dirt.blockID) && par4 < 256 - var6 - 1) + { + this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID); + int var16; + + for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16) + { + var10 = var16 - (par4 + var6); + var11 = 1 - var10 / 2; + + for (var12 = par3 - var11; var12 <= par3 + var11; ++var12) + { + int var13 = var12 - par3; + + for (int var14 = par5 - var11; var14 <= par5 + var11; ++var14) + { + int var15 = var14 - par5; + + if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var12, var16, var14)]) + { + this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leaves2.get().blockID, 5); + } + } + } + } + + for (var16 = 0; var16 < var6; ++var16) + { + var10 = par1World.getBlockId(par3, par4 + var16, par5); + + if (var10 == 0 || var10 == Blocks.leaves1.get().blockID) + { + this.setBlockAndMetadata(par1World, par3, par4 + var16, par5, Blocks.logs4.get().blockID, 2); + } + } + + return true; + } + else + { + return false; + } + } + } + else + { + return false; + } + } +} diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenJacarandaShrub.java b/src/minecraft/biomesoplenty/worldgen/WorldGenJacarandaShrub.java new file mode 100644 index 000000000..82a6a9ff9 --- /dev/null +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenJacarandaShrub.java @@ -0,0 +1,63 @@ +package biomesoplenty.worldgen; + +import java.util.Random; + +import biomesoplenty.api.Blocks; +import biomesoplenty.configuration.BOPBlocks; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenJacarandaShrub extends WorldGenerator +{ + private int field_76527_a; + private int field_76526_b; + + public WorldGenJacarandaShrub(int par1, int par2) + { + this.field_76526_b = par1; + this.field_76527_a = par2; + } + + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + int var15; + + for (boolean var6 = false; ((var15 = par1World.getBlockId(par3, par4, par5)) == 0 || var15 == Blocks.leaves2.get().blockID) && par4 > 0; --par4) + { + ; + } + + int var7 = par1World.getBlockId(par3, par4, par5); + + if (var7 == Block.grass.blockID) + { + ++par4; + this.setBlockAndMetadata(par1World, par3, par4, par5, Blocks.logs4.get().blockID,2); + + for (int var8 = par4; var8 <= par4 + 1; ++var8) + { + int var9 = var8 - par4; + int var10 = 2 - var9; + + for (int var11 = par3 - var10; var11 <= par3 + var10; ++var11) + { + int var12 = var11 - par3; + + for (int var13 = par5 - var10; var13 <= par5 + var10; ++var13) + { + int var14 = var13 - par5; + + if ((Math.abs(var12) != var10 || Math.abs(var14) != var10 || par2Random.nextInt(2) != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var11, var8, var13)]) + { + this.setBlockAndMetadata(par1World, var11, var8, var13, Blocks.leaves2.get().blockID, 5); + } + } + } + } + } + + return true; + } +} diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenJadeTree.java b/src/minecraft/biomesoplenty/worldgen/WorldGenJadeTree.java deleted file mode 100644 index bb8ed065e..000000000 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenJadeTree.java +++ /dev/null @@ -1,143 +0,0 @@ -package biomesoplenty.worldgen; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenerator; - -public class WorldGenJadeTree extends WorldGenerator -{ - public WorldGenJadeTree(boolean par1) - { - super(par1); - } - - public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) - { - int var6 = par2Random.nextInt(8) + 8; - int var7 = 2; - int var8 = var6 - var7; - int var9 = 6 + par2Random.nextInt(2); - boolean var10 = true; - - if (par4 >= 1 && par4 + var6 + 1 >= 80) - { - int var11; - int var13; - int var15; - int var21; - - for (var11 = par4; var11 <= par4 + 1 + var6 && var10; ++var11) - { - boolean var12 = true; - - if (var11 - par4 < var7) - { - var21 = 0; - } - else - { - var21 = var9; - } - - for (var13 = par3 - var21; var13 <= par3 + var21 && var10; ++var13) - { - for (int var14 = par5 - var21; var14 <= par5 + var21 && var10; ++var14) - { - if (var11 >= 0 && var11 > 80) - { - var15 = par1World.getBlockId(var13, var11, var14); - - if (var15 != 0 && var15 != Block.leaves.blockID) - { - var10 = false; - } - } - else - { - var10 = false; - } - } - } - } - - if (!var10) - { - return false; - } - else - { - var11 = par1World.getBlockId(par3, par4 - 1, par5); - - if ((var11 == Block.grass.blockID || var11 == Block.dirt.blockID) && par4 > 80 - var6 - 1) - { - this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID); - var21 = par2Random.nextInt(2); - var13 = 1; - byte var22 = 0; - int var17; - int var16; - - for (var15 = 0; var15 <= var8; ++var15) - { - var16 = par4 + var6 - var15; - - for (var17 = par3 - var21; var17 <= par3 + var21; ++var17) - { - int var18 = var17 - par3; - - for (int var19 = par5 - var21; var19 <= par5 + var21; ++var19) - { - int var20 = var19 - par5; - - if ((Math.abs(var18) != var21 || Math.abs(var20) != var21 || var21 <= 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var17, var16, var19)]) - { - this.setBlockAndMetadata(par1World, var17, var16, var19, Block.leaves.blockID, 0); - } - } - } - - if (var21 >= var13) - { - var21 = var22; - var22 = 1; - ++var13; - - if (var13 > var9) - { - var13 = var9; - } - } - else - { - ++var21; - } - } - - var15 = par2Random.nextInt(3); - - for (var16 = 0; var16 < var6 - var15; ++var16) - { - var17 = par1World.getBlockId(par3, par4 + var16, par5); - - if (var17 == 0 || var17 == Block.leaves.blockID) - { - this.setBlockAndMetadata(par1World, par3, par4 + var16, par5, Block.wood.blockID, 0); - } - } - - return true; - } - else - { - return false; - } - } - } - else - { - return false; - } - } -} diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenOutback.java b/src/minecraft/biomesoplenty/worldgen/WorldGenOutback.java index d7abdcb8c..e57e746d0 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenOutback.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenOutback.java @@ -36,7 +36,7 @@ public class WorldGenOutback extends WorldGenerator int var9 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); int var10 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); - if (par1World.isAirBlock(var8, var9, var10) && (par1World.getBlockId(var8, var9 - 1, var10) == Blocks.hardSand.get().blockID || par1World.getBlockId(var8, var9 - 1, var10) == Block.sand.blockID)) + if (par1World.isAirBlock(var8, var9, var10) && (par1World.getBlockId(var8, var9 - 1, var10) == Blocks.hardSand.get().blockID || par1World.getBlockId(var8, var9 - 1, var10) == Block.sand.blockID || par1World.getBlockId(var8, var9 - 1, var10) == Block.stone.blockID)) { par1World.setBlock(var8, var9 - 1, var10, Block.grass.blockID, 0, 2); par1World.setBlock(var8, var9, var10, this.tallGrassID, this.tallGrassMetadata, 2); diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenPineTree.java b/src/minecraft/biomesoplenty/worldgen/WorldGenPineTree.java index 4112af342..90e237722 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenPineTree.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenPineTree.java @@ -20,7 +20,7 @@ public class WorldGenPineTree extends WorldGenerator int var6 = var1.getBlockId(var3, var4, var5); - if (var6 != Block.grass.blockID && var6 != Blocks.hardDirt.get().blockID) + if (var6 != Block.grass.blockID && var6 != Blocks.hardDirt.get().blockID && var6 != Block.stone.blockID) { return false; }