PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockFluids.patch

37 lines
1.9 KiB
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/world/level/block/BlockFluids.java
+++ b/net/minecraft/world/level/block/BlockFluids.java
@@ -39,7 +39,7 @@
public class BlockFluids extends Block implements IFluidSource {
private static final Codec<FluidTypeFlowing> FLOWING_FLUID = BuiltInRegistries.FLUID.byNameCodec().comapFlatMap((fluidtype) -> {
- DataResult dataresult;
+ DataResult<FluidTypeFlowing> dataresult; // CraftBukkit - decompile error
if (fluidtype instanceof FluidTypeFlowing) {
FluidTypeFlowing fluidtypeflowing = (FluidTypeFlowing) fluidtype;
@@ -174,14 +174,20 @@
if (world.getFluidState(blockposition1).is(TagsFluid.WATER)) {
Block block = world.getFluidState(blockposition).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
- world.setBlockAndUpdate(blockposition, block.defaultBlockState());
- this.fizz(world, blockposition);
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, block.defaultBlockState())) {
+ this.fizz(world, blockposition);
+ }
+ // CraftBukkit end
return false;
}
if (flag && world.getBlockState(blockposition1).is(Blocks.BLUE_ICE)) {
- world.setBlockAndUpdate(blockposition, Blocks.BASALT.defaultBlockState());
- this.fizz(world, blockposition);
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.BASALT.defaultBlockState())) {
+ this.fizz(world, blockposition);
+ }
+ // CraftBukkit end
return false;
}
}