diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch new file mode 100644 index 0000000000..c36dbb9da2 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch @@ -0,0 +1,57 @@ +--- a/net/minecraft/world/level/material/LavaFluid.java ++++ b/net/minecraft/world/level/material/LavaFluid.java +@@ -84,10 +80,18 @@ + return; + } + +- BlockState blockState = level.getBlockState(blockPos); +- if (blockState.isAir()) { +- if (this.hasFlammableNeighbours(level, blockPos)) { +- level.setBlockAndUpdate(blockPos, BaseFireBlock.getState(level, blockPos)); ++ IBlockData iblockdata = level.getBlockState(blockposition1); ++ ++ if (iblockdata.isAir()) { ++ if (this.hasFlammableNeighbours(level, blockposition1)) { ++ // CraftBukkit start - Prevent lava putting something on fire ++ if (level.getBlockState(blockposition1).getBlock() != Blocks.FIRE) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(level, blockposition1, pos).isCancelled()) { ++ continue; ++ } ++ } ++ // CraftBukkit end ++ level.setBlockAndUpdate(blockposition1, BaseFireBlock.getState(level, blockposition1)); + return; + } + } else if (blockState.blocksMotion()) { +@@ -101,8 +106,16 @@ + return; + } + +- if (level.isEmptyBlock(blockPos1.above()) && this.isFlammable(level, blockPos1)) { +- level.setBlockAndUpdate(blockPos1.above(), BaseFireBlock.getState(level, blockPos1)); ++ if (level.isEmptyBlock(blockposition2.above()) && this.isFlammable(level, blockposition2)) { ++ // CraftBukkit start - Prevent lava putting something on fire ++ BlockPos up = blockposition2.above(); ++ if (level.getBlockState(up).getBlock() != Blocks.FIRE) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(level, up, pos).isCancelled()) { ++ continue; ++ } ++ } ++ // CraftBukkit end ++ level.setBlockAndUpdate(blockposition2.above(), BaseFireBlock.getState(level, blockposition2)); + } + } + } +@@ -195,7 +210,11 @@ + FluidState fluidState1 = level.getFluidState(pos); + if (this.is(FluidTags.LAVA) && fluidState1.is(FluidTags.WATER)) { + if (blockState.getBlock() instanceof LiquidBlock) { +- level.setBlock(pos, Blocks.STONE.defaultBlockState(), 3); ++ // CraftBukkit start ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level.getMinecraftWorld(), pos, Blocks.STONE.defaultBlockState(), 3)) { ++ return; ++ } ++ // CraftBukkit end + } + + this.fizz(level, pos); |