3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 07:10:10 +01:00
Paper/nms-patches/BlockCocoa.patch

30 Zeilen
1.3 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 {
2020-06-25 02:00:00 +02:00
public static final BlockStateInteger AGE = BlockProperties.af;
@@ -27,7 +29,7 @@
2018-12-06 00:00:00 +01:00
int i = (Integer) iblockdata.get(BlockCocoa.AGE);
if (i < 2) {
2019-12-10 23:00:00 +01:00
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2);
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
}
}
2020-06-25 02:00:00 +02:00
@@ -97,7 +99,7 @@
2019-04-23 04:00:00 +02:00
@Override
2019-12-10 23:00:00 +01:00
public void a(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) {
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2);
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2); // CraftBukkit
}
2019-04-23 04:00:00 +02:00
@Override