PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockFluids.patch
CraftBukkit/Spigot 8398e12b34 Update to Minecraft 1.20.3
By: md_5 <git@md-5.net>
2023-12-06 03:40:00 +11:00

36 lines
1.9 KiB
Diff

--- 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;
}
}