geforkt von Mirrors/Paper
20 Zeilen
1.4 KiB
Diff
20 Zeilen
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
|
|
@@ -0,0 +0,0 @@ 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);
|