mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
b3a8254758
By: md_5 <git@md-5.net>
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
--- a/net/minecraft/world/level/block/BlockCocoa.java
|
|
+++ b/net/minecraft/world/level/block/BlockCocoa.java
|
|
@@ -21,6 +21,8 @@
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
+
|
|
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
|
|
|
|
public static final int MAX_AGE = 2;
|
|
@@ -55,7 +57,7 @@
|
|
int i = (Integer) iblockdata.get(BlockCocoa.AGE);
|
|
|
|
if (i < 2) {
|
|
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2);
|
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
|
|
}
|
|
}
|
|
|
|
@@ -125,7 +127,7 @@
|
|
|
|
@Override
|
|
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
|
|
}
|
|
|
|
@Override
|