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/BlockCocoa.patch

30 Zeilen
1.4 KiB
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/BlockCocoa.java
+++ b/net/minecraft/server/BlockCocoa.java
2018-07-15 02:00:00 +02:00
@@ -3,6 +3,8 @@
import java.util.Random;
2018-07-15 02:00:00 +02:00
import javax.annotation.Nullable;
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+
2016-02-29 22:32:46 +01:00
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
2018-08-26 04:00:00 +02:00
public static final BlockStateInteger AGE = BlockProperties.T;
2018-07-15 02:00:00 +02:00
@@ -21,7 +23,7 @@
int i = ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue();
if (i < 2) {
2018-07-15 02:00:00 +02:00
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(i + 1)), 2);
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(i + 1)), 2); // CraftBukkkit
}
}
2018-07-15 02:00:00 +02:00
@@ -109,7 +111,7 @@
}
public void b(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
2018-07-15 02:00:00 +02:00
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() + 1)), 2);
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() + 1)), 2); // CraftBukkit
}
2018-07-15 02:00:00 +02:00
public TextureType c() {