From 6ccd3f590d78a3eb6db8cbd009e039c7541e3b42 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Tue, 21 May 2013 16:35:04 -0400 Subject: [PATCH] More work on Nether biomes. --- .../biomesoplenty/biomes/BiomeGenNetherGarden.java | 2 +- .../biomesoplenty/biomes/BiomeGenNetherLava.java | 5 +++-- .../biomesoplenty/blocks/BlockBOPColorizedSapling.java | 8 ++++++++ .../biomesoplenty/blocks/BlockBOPSapling.java | 10 +++++++++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenNetherGarden.java b/src/minecraft/biomesoplenty/biomes/BiomeGenNetherGarden.java index c2934b84f..14bc69abf 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenNetherGarden.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenNetherGarden.java @@ -29,7 +29,7 @@ public class BiomeGenNetherGarden extends BiomeGenBase this.customBiomeDecorator.mushroomsPerChunk = 30; this.customBiomeDecorator.bigMushroomsPerChunk = 30; this.customBiomeDecorator.netherWartPerChunk = 3; - this.customBiomeDecorator.netherGrassPerChunk = 8; + this.customBiomeDecorator.netherGrassPerChunk = 10; this.customBiomeDecorator.glowshroomsPerChunk = 3; this.customBiomeDecorator.toadstoolsPerChunk = 5; this.spawnableMonsterList.clear(); diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenNetherLava.java b/src/minecraft/biomesoplenty/biomes/BiomeGenNetherLava.java index a9a3a394a..171f93194 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenNetherLava.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenNetherLava.java @@ -11,6 +11,7 @@ import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; import net.minecraft.world.gen.feature.WorldGenerator; +import net.minecraft.world.gen.feature.WorldGenFire; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.EntityMagmaCube; import net.minecraft.entity.monster.EntityPigZombie; @@ -27,7 +28,7 @@ public class BiomeGenNetherLava extends BiomeGenBase this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; this.topBlock = (byte)Block.netherrack.blockID; this.fillerBlock = (byte)Block.netherrack.blockID; - this.customBiomeDecorator.grassPerChunk = 15; + this.customBiomeDecorator.grassPerChunk = 8; this.customBiomeDecorator.netherLavaPerChunk = 20; this.customBiomeDecorator.generateAsh = true; this.spawnableMonsterList.clear(); @@ -45,7 +46,7 @@ public class BiomeGenNetherLava extends BiomeGenBase */ public WorldGenerator getRandomWorldGenForGrass(Random par1Random) { - return new WorldGenDeadlands(); + return new WorldGenFire(); } public void decorate(World par1World, Random par2Random, int par3, int par4) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java index dd73c1783..a774d3b22 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java @@ -82,6 +82,14 @@ public class BlockBOPColorizedSapling extends BlockSapling else return this.canPlaceBlockOnSide(world, x, y, z, side); } + + protected boolean canThisPlantGrowOnThisBlockID(int blockID, int metadata) + { + if (metadata == 1) //Mangrove + return blockID == Block.sand.blockID; + else + return blockID == Block.grass.blockID || blockID == Block.dirt.blockID || blockID == Block.tilledField.blockID; + } @Override public void updateTick(World world, int x, int y, int z, Random random) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java index 1e3c98ece..6e4ba2482 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java @@ -79,7 +79,7 @@ public class BlockBOPSapling extends BlockSapling switch (meta) { case 7: // Loftwood - return id == Blocks.holyGrass.get().blockID; + return id == Blocks.holyGrass.get().blockID || id == Block.grass.blockID; default: return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID; @@ -87,6 +87,14 @@ public class BlockBOPSapling extends BlockSapling else return this.canPlaceBlockOnSide(world, x, y, z, side); } + + protected boolean canThisPlantGrowOnThisBlockID(int blockID, int metadata) + { + if (metadata == 7) //Loftwood + return blockID == Blocks.holyGrass.get().blockID || blockID == Block.grass.blockID; + else + return blockID == Block.grass.blockID || blockID == Block.dirt.blockID || blockID == Block.tilledField.blockID; + } @Override public void updateTick(World world, int x, int y, int z, Random random)