Fixed how the saplings grow

This commit is contained in:
Amnet 2013-04-25 01:31:48 +02:00
parent ff149f05a0
commit 26c8eb2679
2 changed files with 24 additions and 0 deletions

View file

@ -62,6 +62,18 @@ public class BlockBOPColorizedSapling extends BlockSapling
list.add(new ItemStack(blockID, 1, i)); list.add(new ItemStack(blockID, 1, i));
} }
@Override
public void updateTick(World world, int x, int y, int z, Random random)
{
if (world.isRemote)
return;
this.checkFlowerChange(world, x, y, z);
if (world.getBlockLightValue(x, y + 1, z) >= 9 && random.nextInt(7) == 0)
this.growTree(world, x, y, z, random);
}
@Override @Override
public void growTree(World world, int x, int y, int z, Random random) public void growTree(World world, int x, int y, int z, Random random)
{ {

View file

@ -68,6 +68,18 @@ public class BlockBOPSapling extends BlockSapling
list.add(new ItemStack(blockID, 1, i)); list.add(new ItemStack(blockID, 1, i));
} }
@Override
public void updateTick(World world, int x, int y, int z, Random random)
{
if (world.isRemote)
return;
this.checkFlowerChange(world, x, y, z);
if (world.getBlockLightValue(x, y + 1, z) >= 9 && random.nextInt(7) == 0)
this.growTree(world, x, y, z, random);
}
@Override @Override
public void growTree(World world, int x, int y, int z, Random random) public void growTree(World world, int x, int y, int z, Random random)
{ {