From af1176dcef5eb16402361f07997cf0763c8c47ca Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Fri, 20 Sep 2013 13:33:44 -0400 Subject: [PATCH] Added Taro and Wheat Grass --- common/biomesoplenty/api/BlockReferences.java | 2 ++ .../biomes/BiomeDecoratorBOP.java | 25 ++++++++++++++++++ .../biomesoplenty/blocks/BlockBOPFoliage.java | 2 +- .../blocks/renderers/FoliageRenderer.java | 2 +- .../itemblocks/ItemBlockFoliage.java | 2 +- resources/assets/biomesoplenty/lang/en_US.xml | 2 ++ .../biomesoplenty/textures/blocks/taro.png | Bin 0 -> 660 bytes .../textures/blocks/wheatgrass.png | Bin 0 -> 529 bytes 8 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 resources/assets/biomesoplenty/textures/blocks/taro.png create mode 100644 resources/assets/biomesoplenty/textures/blocks/wheatgrass.png diff --git a/common/biomesoplenty/api/BlockReferences.java b/common/biomesoplenty/api/BlockReferences.java index ac119eacb..312ab8dc4 100644 --- a/common/biomesoplenty/api/BlockReferences.java +++ b/common/biomesoplenty/api/BlockReferences.java @@ -69,6 +69,8 @@ public class BlockReferences { bamboo (Blocks.bamboo, 0), + wheatGrassItem (Blocks.foliage, 10), + taroItem (Blocks.foliage, 9), poisonIvyItem (Blocks.foliage, 7), sproutItem (Blocks.foliage, 5), bushItem (Blocks.foliage, 4), diff --git a/common/biomesoplenty/biomes/BiomeDecoratorBOP.java b/common/biomesoplenty/biomes/BiomeDecoratorBOP.java index e0c9b09eb..cea707b88 100644 --- a/common/biomesoplenty/biomes/BiomeDecoratorBOP.java +++ b/common/biomesoplenty/biomes/BiomeDecoratorBOP.java @@ -36,6 +36,7 @@ import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenPumpkin; import net.minecraft.world.gen.feature.WorldGenReed; import net.minecraft.world.gen.feature.WorldGenSand; +import net.minecraft.world.gen.feature.WorldGenTallGrass; import net.minecraft.world.gen.feature.WorldGenWaterlily; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.MinecraftForge; @@ -198,6 +199,8 @@ public class BiomeDecoratorBOP extends BiomeDecorator public WorldGenerator potatoGen; public WorldGenerator sproutGen; public WorldGenerator bushGen; + public WorldGenerator taroGen; + public WorldGenerator wheatGrassGen; public WorldGenerator berryBushGen; public WorldGenerator tinyCactusGen; public WorldGenerator aloeGen; @@ -290,6 +293,8 @@ public class BiomeDecoratorBOP extends BiomeDecorator public int sproutsPerChunk; public int bushesPerChunk; public int berryBushesPerChunk; + public int taroPerChunk; + public int wheatGrassPerChunk; public int tinyCactiPerChunk; public int aloePerChunk; public int deathbloomsPerChunk; @@ -462,6 +467,8 @@ public class BiomeDecoratorBOP extends BiomeDecorator thornGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 5); bushGen = new WorldGenBOPBush(Blocks.foliage.get().blockID, 4); berryBushGen = new WorldGenBOPFlowers(Blocks.foliage.get().blockID, 8); + taroGen = new WorldGenBOPBush(Blocks.foliage.get().blockID, 9); + wheatGrassGen = new WorldGenTallGrass(Blocks.foliage.get().blockID, 10); tinyCactusGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 12); aloeGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 12); coralGen = new WorldGenCoral(Blocks.coral.get().blockID, 4); @@ -559,6 +566,8 @@ public class BiomeDecoratorBOP extends BiomeDecorator sproutsPerChunk = 0; bushesPerChunk = 0; berryBushesPerChunk = 0; + taroPerChunk = 0; + wheatGrassPerChunk = 0; tinyCactiPerChunk = 0; poisonIvyPerChunk = 0; aloePerChunk = 0; @@ -1242,6 +1251,22 @@ public class BiomeDecoratorBOP extends BiomeDecorator var5 = chunk_Z + randomGenerator.nextInt(16) + 8; berryBushGen.generate(currentWorld, randomGenerator, var3, var4, var5); } + + for (var2 = 0; var2 < taroPerChunk; ++var2) + { + var3 = chunk_X + randomGenerator.nextInt(16) + 8; + var4 = randomGenerator.nextInt(256); + var5 = chunk_Z + randomGenerator.nextInt(16) + 8; + taroGen.generate(currentWorld, randomGenerator, var3, var4, var5); + } + + for (var2 = 0; var2 < wheatGrassPerChunk; ++var2) + { + var3 = chunk_X + randomGenerator.nextInt(16) + 8; + var4 = randomGenerator.nextInt(256); + var5 = chunk_Z + randomGenerator.nextInt(16) + 8; + wheatGrassGen.generate(currentWorld, randomGenerator, var3, var4, var5); + } for (var2 = 0; var2 < poisonIvyPerChunk; ++var2) { diff --git a/common/biomesoplenty/blocks/BlockBOPFoliage.java b/common/biomesoplenty/blocks/BlockBOPFoliage.java index bc6359b71..a5118c2fd 100644 --- a/common/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/common/biomesoplenty/blocks/BlockBOPFoliage.java @@ -36,7 +36,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPFoliage extends BlockFlower implements IShearable { - private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "taro", "wheatgrass"}; private Icon[] textures; diff --git a/common/biomesoplenty/blocks/renderers/FoliageRenderer.java b/common/biomesoplenty/blocks/renderers/FoliageRenderer.java index db011557d..635c6d355 100644 --- a/common/biomesoplenty/blocks/renderers/FoliageRenderer.java +++ b/common/biomesoplenty/blocks/renderers/FoliageRenderer.java @@ -138,7 +138,7 @@ public class FoliageRenderer implements ISimpleBlockRenderingHandler d2 += ((i1 >> 24 & 15L) / 15.0F - 0.5D) * 0.5D; } - if (renderer.blockAccess.getBlockMetadata(par2, par3, par4) == 10) { + if (renderer.blockAccess.getBlockMetadata(par2, par3, par4) == 10 && renderer.blockAccess.getBlockId(par2, par3, par4) == Blocks.flowers.get().blockID) { renderer.drawCrossedSquares(par1Block, renderer.blockAccess.getBlockMetadata(par2, par3, par4), d0, d1 - 1, d2, 1.0F); } else { renderer.drawCrossedSquares(par1Block, renderer.blockAccess.getBlockMetadata(par2, par3, par4), d0, d1, d2, 1.0F); diff --git a/common/biomesoplenty/itemblocks/ItemBlockFoliage.java b/common/biomesoplenty/itemblocks/ItemBlockFoliage.java index c907b976f..255125f8e 100644 --- a/common/biomesoplenty/itemblocks/ItemBlockFoliage.java +++ b/common/biomesoplenty/itemblocks/ItemBlockFoliage.java @@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class ItemBlockFoliage extends ItemColored { - private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "taro", "wheatgrass"}; @SideOnly(Side.CLIENT) private Icon[] textures; private static final int GRASSTOP = 6; diff --git a/resources/assets/biomesoplenty/lang/en_US.xml b/resources/assets/biomesoplenty/lang/en_US.xml index 487823e5f..7b1d9c310 100644 --- a/resources/assets/biomesoplenty/lang/en_US.xml +++ b/resources/assets/biomesoplenty/lang/en_US.xml @@ -70,6 +70,8 @@ High Grass Poison Ivy Berry Bush + Taro + Wheat Grass Giant Red Flower Giant Yellow Flower diff --git a/resources/assets/biomesoplenty/textures/blocks/taro.png b/resources/assets/biomesoplenty/textures/blocks/taro.png new file mode 100644 index 0000000000000000000000000000000000000000..58febd80e93920bdaf092ca0a427b6723bb6c0e0 GIT binary patch literal 660 zcmV;F0&D$=P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qRNAp5A00065Nkl1tv@5QRG$H#83xaX0>O z-xWpwDJD^)2x8tv6c;oa1%0!c`D(nGWTv2Q)7^DWRiCPBFptM$Y&M&5xm@P{{$9^4 zdw6)z_3rLY?=h#-`D0ZBNYK9o--A9rK4iPy3hREq7vlf3$z&qK;ZS7?= zl}hT7NJN^=rZgH2nayT$I-L}p&1U}+Sb~H?Aqj`W;`MqBPpDR_O28e@;yIm8N6%BK zlxXQFx>zjadcCT;@pxPTfj~f(%cY8UKA%-oo|4IAgldUVFlr(Y?`4m3N2!46%<*{q zY8|D2mH+wqDQ|CY3MQCNP`bn6FuUDOTZY2|xC0U}f;5aG}PV#K;! zE}8%*sil{$tyW73$WCyrR@3qxA0M@qh{fd5wp=dvr|g?)1(qm~keOC-$;uo6qB0V3 z&QtW{d0q0000l)wy literal 0 HcmV?d00001 diff --git a/resources/assets/biomesoplenty/textures/blocks/wheatgrass.png b/resources/assets/biomesoplenty/textures/blocks/wheatgrass.png new file mode 100644 index 0000000000000000000000000000000000000000..fd7b44c379df698f495c359890c69e46924dc65a GIT binary patch literal 529 zcmV+s0`C2ZP)N2bPDNB8 zb~7$DE-^7j^FlWO00E6jL_t(IPqk9Xio!q;%}080jS&~zP;p;C(GXO`gBvP(5CtzD zL=Z*rpyGmGRZcyp13e(j9HuU>>h-JFRp}`I9=qL+zSFCe| z0dT+H%O;PeoFb73Fc=Jy&1OSxwOXlC zsZb~sLM?80xm-Xgc)Vt_i37jiPxJX4>#zxP9*+muXf%io%H^_bvREu2R#lbq`8*|) zNeCFb-7ZGw-`eeVllk#PSS%Lu`Fv>BG>!OGyk0LblgXet8jZpr9*;x!UQ1D4c~K18 TQJLPD00000NkvXXu0mjfczWWc literal 0 HcmV?d00001