diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockCactus.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/world/level/block/BlockCactus.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockCactus.patch b/patch-remap/og/net/minecraft/world/level/block/BlockCactus.patch new file mode 100644 index 0000000000..83fdc4bebd --- /dev/null +++ b/patch-remap/og/net/minecraft/world/level/block/BlockCactus.patch @@ -0,0 +1,30 @@ +--- a/net/minecraft/world/level/block/BlockCactus.java ++++ b/net/minecraft/world/level/block/BlockCactus.java +@@ -22,6 +22,8 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + ++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++ + public class BlockCactus extends Block { + + public static final MapCodec<BlockCactus> CODEC = simpleCodec(BlockCactus::new); +@@ -64,7 +66,7 @@ + int j = (Integer) iblockdata.getValue(BlockCactus.AGE); + + if (j == 15) { +- worldserver.setBlockAndUpdate(blockposition1, this.defaultBlockState()); ++ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, this.defaultBlockState()); // CraftBukkit + IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockCactus.AGE, 0); + + worldserver.setBlock(blockposition, iblockdata1, 4); +@@ -119,7 +121,9 @@ + + @Override + public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { ++ CraftEventFactory.blockDamage = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); // CraftBukkit + entity.hurt(world.damageSources().cactus(), 1.0F); ++ CraftEventFactory.blockDamage = null; // CraftBukkit + } + + @Override |