2021-03-16 09:00:00 +11:00
|
|
|
--- a/net/minecraft/world/level/block/BlockCocoa.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockCocoa.java
|
2023-12-06 03:40:00 +11:00
|
|
|
@@ -21,6 +21,8 @@
|
2021-03-16 09:00:00 +11:00
|
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
|
|
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
2014-11-26 08:32:16 +11:00
|
|
|
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
|
|
+
|
2016-03-01 08:32:46 +11:00
|
|
|
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
|
2014-11-26 08:32:16 +11:00
|
|
|
|
2023-12-06 03:40:00 +11:00
|
|
|
public static final MapCodec<BlockCocoa> CODEC = simpleCodec(BlockCocoa::new);
|
|
|
|
@@ -61,7 +63,7 @@
|
2021-11-22 09:00:00 +11:00
|
|
|
int i = (Integer) iblockdata.getValue(BlockCocoa.AGE);
|
2014-11-26 08:32:16 +11:00
|
|
|
|
|
|
|
if (i < 2) {
|
2021-11-22 09:00:00 +11:00
|
|
|
- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, i + 1), 2);
|
|
|
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
|
2014-11-26 08:32:16 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-06 03:40:00 +11:00
|
|
|
@@ -131,7 +133,7 @@
|
2014-11-26 08:32:16 +11:00
|
|
|
|
2019-04-23 12:00:00 +10:00
|
|
|
@Override
|
2022-06-08 02:00:00 +10:00
|
|
|
public void performBonemeal(WorldServer worldserver, RandomSource randomsource, BlockPosition blockposition, IBlockData iblockdata) {
|
2021-11-22 09:00:00 +11:00
|
|
|
- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, (Integer) iblockdata.getValue(BlockCocoa.AGE) + 1), 2);
|
|
|
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, (Integer) iblockdata.getValue(BlockCocoa.AGE) + 1), 2); // CraftBukkit
|
2014-11-26 08:32:16 +11:00
|
|
|
}
|
|
|
|
|
2019-04-23 12:00:00 +10:00
|
|
|
@Override
|