diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch new file mode 100644 index 0000000000..236f8f0879 --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/material/LavaFluid.java.patch @@ -0,0 +1,58 @@ +--- a/net/minecraft/world/level/material/LavaFluid.java ++++ b/net/minecraft/world/level/material/LavaFluid.java +@@ -87,9 +82,16 @@ + + BlockState blockstate = level.getBlockState(blockpos1); + +- if (blockstate.isAir()) { +- if (this.hasFlammableNeighbours(level, blockpos1)) { +- level.setBlockAndUpdate(blockpos1, BaseFireBlock.getState(level, blockpos1)); ++ 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()) { +@@ -104,8 +106,16 @@ + return; + } + +- if (level.isEmptyBlock(blockpos2.above()) && this.isFlammable(level, blockpos2)) { +- level.setBlockAndUpdate(blockpos2.above(), BaseFireBlock.getState(level, blockpos2)); ++ 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)); + } + } + } +@@ -209,9 +208,13 @@ + if (direction == Direction.DOWN) { + FluidState fluidstate1 = levelaccessor.getFluidState(blockpos); + +- if (this.is(FluidTags.LAVA) && fluidstate1.is(FluidTags.WATER)) { +- if (blockstate.getBlock() instanceof LiquidBlock) { +- levelaccessor.setBlock(blockpos, Blocks.STONE.defaultBlockState(), 3); ++ if (this.is(FluidTags.LAVA) && fluid1.is(FluidTags.WATER)) { ++ if (blockState.getBlock() instanceof LiquidBlock) { ++ // CraftBukkit start ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level.getMinecraftWorld(), pos, Blocks.STONE.defaultBlockState(), 3)) { ++ return; ++ } ++ // CraftBukkit end + } + + this.fizz(levelaccessor, blockpos); |