--- a/net/minecraft/world/level/block/BlockCocoa.java +++ b/net/minecraft/world/level/block/BlockCocoa.java @@ -21,6 +21,8 @@ import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShapeCollision; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement { public static final int MAX_AGE = 2; @@ -55,7 +57,7 @@ int i = (Integer) iblockdata.get(BlockCocoa.AGE); if (i < 2) { - worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); + CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit } } @@ -125,7 +127,7 @@ @Override public void a(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) { - worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2); + CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2); // CraftBukkit } @Override