mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-18 08:36:13 +01:00
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
--- a/net/minecraft/server/BlockCocoa.java
|
|
+++ b/net/minecraft/server/BlockCocoa.java
|
|
@@ -3,6 +3,8 @@
|
|
import java.util.Random;
|
|
import javax.annotation.Nullable;
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
+
|
|
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
|
|
|
|
public static final BlockStateInteger AGE = BlockProperties.Z;
|
|
@@ -22,7 +24,7 @@
|
|
int i = (Integer) iblockdata.get(BlockCocoa.AGE);
|
|
|
|
if (i < 2) {
|
|
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2);
|
|
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
|
|
}
|
|
}
|
|
|
|
@@ -92,7 +94,7 @@
|
|
|
|
@Override
|
|
public void b(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
|
|
- 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
|
|
}
|
|
|
|
@Override
|