diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CactusBlock.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CactusBlock.java.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CactusBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CactusBlock.java.patch new file mode 100644 index 0000000000..584e14001b --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CactusBlock.java.patch @@ -0,0 +1,34 @@ +--- a/net/minecraft/world/level/block/CactusBlock.java ++++ b/net/minecraft/world/level/block/CactusBlock.java +@@ -21,6 +21,7 @@ + import net.minecraft.world.level.pathfinder.PathComputationType; + import net.minecraft.world.phys.shapes.CollisionContext; + import net.minecraft.world.phys.shapes.VoxelShape; ++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + + public class CactusBlock extends Block { + +@@ -67,8 +65,8 @@ + int j = (Integer) blockstate.getValue(CactusBlock.AGE); + + if (j == 15) { +- serverlevel.setBlockAndUpdate(blockpos1, this.defaultBlockState()); +- BlockState blockstate1 = (BlockState) blockstate.setValue(CactusBlock.AGE, 0); ++ CraftEventFactory.handleBlockGrowEvent(level, blockposition1, this.defaultBlockState()); // CraftBukkit ++ IBlockData iblockdata1 = (IBlockData) state.setValue(CactusBlock.AGE, 0); + + serverlevel.setBlock(blockpos, blockstate1, 4); + serverlevel.neighborChanged(blockstate1, blockpos1, this, blockpos, false); +@@ -125,9 +119,10 @@ + } + + @Override +- @Override +- public void entityInside(BlockState blockstate, Level level, BlockPos blockpos, Entity entity) { ++ public void entityInside(IBlockData state, Level level, BlockPos pos, Entity entity) { ++ CraftEventFactory.blockDamage = level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()); // CraftBukkit + entity.hurt(level.damageSources().cactus(), 1.0F); ++ CraftEventFactory.blockDamage = null; // CraftBukkit + } + + @Override |