aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/level/block/BlockCocoa.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockCocoa.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/level/block/BlockCocoa.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockCocoa.patch b/patch-remap/og/net/minecraft/world/level/block/BlockCocoa.patch
new file mode 100644
index 0000000000..3e8d91fa13
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/level/block/BlockCocoa.patch
@@ -0,0 +1,29 @@
+--- 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 MapCodec<BlockCocoa> CODEC = simpleCodec(BlockCocoa::new);
+@@ -61,7 +63,7 @@
+ int i = (Integer) iblockdata.getValue(BlockCocoa.AGE);
+
+ if (i < 2) {
+- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, i + 1), 2);
++ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
+ }
+ }
+
+@@ -131,7 +133,7 @@
+
+ @Override
+ public void performBonemeal(WorldServer worldserver, RandomSource randomsource, BlockPosition blockposition, IBlockData iblockdata) {
+- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, (Integer) iblockdata.getValue(BlockCocoa.AGE) + 1), 2);
++ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, (Integer) iblockdata.getValue(BlockCocoa.AGE) + 1), 2); // CraftBukkit
+ }
+
+ @Override