diff options
Diffstat (limited to 'patches/server/0970-Call-BlockGrowEvent-for-the-pitcher-crop.patch')
-rw-r--r-- | patches/server/0970-Call-BlockGrowEvent-for-the-pitcher-crop.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0970-Call-BlockGrowEvent-for-the-pitcher-crop.patch b/patches/server/0970-Call-BlockGrowEvent-for-the-pitcher-crop.patch new file mode 100644 index 0000000000..98e7c69d60 --- /dev/null +++ b/patches/server/0970-Call-BlockGrowEvent-for-the-pitcher-crop.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lulu13022002 <[email protected]> +Date: Fri, 9 Jun 2023 13:04:42 +0200 +Subject: [PATCH] Call BlockGrowEvent for the pitcher crop + + +diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +index 849c0ae6ca30691134f51e5d4d5da372e0e728bd..d2e8aafb8db17f2426dd83353c0cfdeaf0d372aa 100644 +--- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +@@ -126,7 +126,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl + private void grow(ServerLevel world, BlockState state, BlockPos pos, int amount) { + int i = Math.min(state.getValue(AGE) + amount, 4); + if (this.canGrow(world, pos, state, i)) { +- world.setBlock(pos, state.setValue(AGE, Integer.valueOf(i)), 2); ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, pos, state.setValue(AGE, Integer.valueOf(i)), 2)) return; // Paper + if (i >= 3) { + BlockPos blockPos = pos.above(); + world.setBlock(blockPos, copyWaterloggedFrom(world, pos, this.defaultBlockState().setValue(AGE, Integer.valueOf(i)).setValue(HALF, DoubleBlockHalf.UPPER)), 3); |