From 26c8eb2679761f6f0ef3208d4709e5a5927062c1 Mon Sep 17 00:00:00 2001 From: Amnet Date: Thu, 25 Apr 2013 01:31:48 +0200 Subject: [PATCH] Fixed how the saplings grow --- .../blocks/BlockBOPColorizedSapling.java | 12 ++++++++++++ .../biomesoplenty/blocks/BlockBOPSapling.java | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java index 98f30df9f..97871662e 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java @@ -62,6 +62,18 @@ public class BlockBOPColorizedSapling extends BlockSapling 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 public void growTree(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 abc94c03d..66a868dbf 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java @@ -68,6 +68,18 @@ public class BlockBOPSapling extends BlockSapling 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 public void growTree(World world, int x, int y, int z, Random random) {