From c6d737528ddb14e360471b39eb97f65e959f88a2 Mon Sep 17 00:00:00 2001 From: Remynfv <15258372+Remynfv@users.noreply.github.com> Date: Fri, 30 Sep 2022 03:33:31 -0700 Subject: [PATCH] use BlockFormEvent for mud converting into clay (#8398) Co-authored-by: Legitimoose --- ...rmEvent-for-mud-converting-into-clay.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 patches/server/0918-use-BlockFormEvent-for-mud-converting-into-clay.patch diff --git a/patches/server/0918-use-BlockFormEvent-for-mud-converting-into-clay.patch b/patches/server/0918-use-BlockFormEvent-for-mud-converting-into-clay.patch new file mode 100644 index 0000000000..9e935dca74 --- /dev/null +++ b/patches/server/0918-use-BlockFormEvent-for-mud-converting-into-clay.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Legitimoose +Date: Thu, 29 Sep 2022 16:25:50 -0700 +Subject: [PATCH] use BlockFormEvent for mud converting into clay + + +diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java +index ef15adf66ea994d15a7d2718dd3d22cd07c31f98..ce4265a9cf01db335a6a88b91ae5e6ff4518ef92 100644 +--- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java +@@ -213,10 +213,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + if (((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState.is(Blocks.MUD) && fluidtype == Fluids.WATER) { + BlockState iblockdata1 = Blocks.CLAY.defaultBlockState(); + +- world.setBlockAndUpdate(((PointedDripstoneBlock.FluidInfo) optional.get()).pos, iblockdata1); ++ // Paper start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, iblockdata1)) { + Block.pushEntitiesUp(((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState, iblockdata1, world, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos); + world.gameEvent(GameEvent.BLOCK_CHANGE, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, GameEvent.Context.of(iblockdata1)); + world.levelEvent(1504, blockposition1, 0); ++ } ++ //Paper end + } else { + BlockPos blockposition2 = PointedDripstoneBlock.findFillableCauldronBelowStalactiteTip(world, blockposition1, fluidtype); +