2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/BlockCocoa.java
|
|
|
|
+++ b/net/minecraft/server/BlockCocoa.java
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -3,6 +3,8 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
import java.util.Random;
|
2018-07-15 02:00:00 +02:00
|
|
|
import javax.annotation.Nullable;
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
|
|
+
|
2016-02-29 22:32:46 +01:00
|
|
|
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
public static final BlockStateInteger AGE = BlockProperties.Z;
|
|
|
|
@@ -22,7 +24,7 @@
|
2018-12-06 00:00:00 +01:00
|
|
|
int i = (Integer) iblockdata.get(BlockCocoa.AGE);
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
if (i < 2) {
|
2018-12-06 00:00:00 +01:00
|
|
|
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2);
|
|
|
|
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -92,7 +94,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2014-11-25 22:32:16 +01:00
|
|
|
public void b(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
|
2018-12-06 00:00:00 +01:00
|
|
|
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2);
|
|
|
|
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2); // CraftBukkit
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|