Added Taro and Wheat Grass

This commit is contained in:
Matt Caughey 2013-09-20 13:33:44 -04:00
parent 5ca033f33c
commit af1176dcef
8 changed files with 32 additions and 3 deletions

View file

@ -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),

View file

@ -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;
@ -1243,6 +1252,22 @@ public class BiomeDecoratorBOP extends BiomeDecorator
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)
{
if (BOPConfigurationTerrainGen.poisonIvyGen)

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -70,6 +70,8 @@
<entry key="tile.bop.foliage.highgrasstop.name">High Grass</entry>
<entry key="tile.bop.foliage.poisonivy.name">Poison Ivy</entry>
<entry key="tile.bop.foliage.berrybush.name">Berry Bush</entry>
<entry key="tile.bop.foliage.taro.name">Taro</entry>
<entry key="tile.bop.foliage.wheatgrass.name">Wheat Grass</entry>
<entry key="tile.bop.petals.bigflowerred.name">Giant Red Flower</entry>
<entry key="tile.bop.petals.bigfloweryellow.name">Giant Yellow Flower</entry>

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B