aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0746-use-BlockFormEvent-for-mud-converting-into-clay.patch
diff options
context:
space:
mode:
authorNewwind <[email protected]>2024-08-31 19:29:50 +0100
committerGitHub <[email protected]>2024-08-31 20:29:50 +0200
commit509ea2fd17fa03ce04f86046098607733b8767ba (patch)
tree3f7c9a29481fafbb6ad9f846839ec8f4863d2363 /patches/server/0746-use-BlockFormEvent-for-mud-converting-into-clay.patch
parente01ddf46279fbb68d157749a906b7a2ecc60da1a (diff)
downloadPaper-509ea2fd17fa03ce04f86046098607733b8767ba.tar.gz
Paper-509ea2fd17fa03ce04f86046098607733b8767ba.zip
Fix horse armor desync (#11341)
Diffstat (limited to 'patches/server/0746-use-BlockFormEvent-for-mud-converting-into-clay.patch')
-rw-r--r--patches/server/0746-use-BlockFormEvent-for-mud-converting-into-clay.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/server/0746-use-BlockFormEvent-for-mud-converting-into-clay.patch b/patches/server/0746-use-BlockFormEvent-for-mud-converting-into-clay.patch
new file mode 100644
index 0000000000..8653ffd786
--- /dev/null
+++ b/patches/server/0746-use-BlockFormEvent-for-mud-converting-into-clay.patch
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Legitimoose <[email protected]>
+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 95cb7492ac691a8e8aa9894f701b802a7eda5446..a2bd54dae4b0460d200f6d5300194a7ef5a28830 100644
+--- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
+@@ -215,10 +215,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 - Call BlockFormEvent
++ 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((Holder) GameEvent.BLOCK_CHANGE, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, GameEvent.Context.of(iblockdata1));
+ world.levelEvent(1504, blockposition1, 0);
++ }
++ // Paper end - Call BlockFormEvent
+ } else {
+ BlockPos blockposition2 = PointedDripstoneBlock.findFillableCauldronBelowStalactiteTip(world, blockposition1, fluidtype);
+