From 67ab2cd5160d273335a585f042fcc08d37ee0993 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 24 Jan 2024 21:49:24 +1100 Subject: [PATCH] SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot By: Doc --- .../world/level/block/DecoratedPotBlock.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 paper-server/nms-patches/net/minecraft/world/level/block/DecoratedPotBlock.patch diff --git a/paper-server/nms-patches/net/minecraft/world/level/block/DecoratedPotBlock.patch b/paper-server/nms-patches/net/minecraft/world/level/block/DecoratedPotBlock.patch new file mode 100644 index 0000000000..aa5909875d --- /dev/null +++ b/paper-server/nms-patches/net/minecraft/world/level/block/DecoratedPotBlock.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/world/level/block/DecoratedPotBlock.java ++++ b/net/minecraft/world/level/block/DecoratedPotBlock.java +@@ -230,6 +230,11 @@ + BlockPosition blockposition = movingobjectpositionblock.getBlockPos(); + + if (!world.isClientSide && iprojectile.mayInteract(world, blockposition) && iprojectile.mayBreak(world)) { ++ // CraftBukkit start - call EntityChangeBlockEvent ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(iprojectile, blockposition, this.getFluidState(iblockdata).createLegacyBlock())) { ++ return; ++ } ++ // CraftBukkit end + world.setBlock(blockposition, (IBlockData) iblockdata.setValue(DecoratedPotBlock.CRACKED, true), 4); + world.destroyBlock(blockposition, true, iprojectile); + }