Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/BlockCrops.patch
2019-04-23 12:00:00 +10:00

30 Zeilen
1.0 KiB
Diff

--- a/net/minecraft/server/BlockCrops.java
+++ b/net/minecraft/server/BlockCrops.java
@@ -2,6 +2,8 @@
import java.util.Random;
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+
public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement {
public static final BlockStateInteger AGE = BlockProperties.ac;
@@ -52,7 +54,7 @@
float f = a((Block) this, (IBlockAccess) world, blockposition);
if (random.nextInt((int) (25.0F / f) + 1) == 0) {
- world.setTypeAndData(blockposition, this.setAge(i + 1), 2);
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.setAge(i + 1), 2); // CraftBukkit
}
}
}
@@ -67,7 +69,7 @@
i = j;
}
- world.setTypeAndData(blockposition, this.setAge(i), 2);
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.setAge(i), 2); // CraftBukkit
}
protected int a(World world) {