From 2c07231eebcddb43f0f976002aefe02bf2e8195f Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 7 Mar 2020 00:08:51 +0000 Subject: [PATCH] Validate tripwire hook placement before update --- ...ripwire-hook-placement-before-update.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Spigot-Server-Patches/0446-Validate-tripwire-hook-placement-before-update.patch diff --git a/Spigot-Server-Patches/0446-Validate-tripwire-hook-placement-before-update.patch b/Spigot-Server-Patches/0446-Validate-tripwire-hook-placement-before-update.patch new file mode 100644 index 000000000..40b73d7be --- /dev/null +++ b/Spigot-Server-Patches/0446-Validate-tripwire-hook-placement-before-update.patch @@ -0,0 +1,21 @@ +From c1584ce207e7ae55546647f5a4436c475f95c42a Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Sat, 7 Mar 2020 00:07:51 +0000 +Subject: [PATCH] Validate tripwire hook placement before update + + +diff --git a/src/main/java/net/minecraft/server/BlockTripwireHook.java b/src/main/java/net/minecraft/server/BlockTripwireHook.java +index 1b9d889af..a5e6e94fe 100644 +--- a/src/main/java/net/minecraft/server/BlockTripwireHook.java ++++ b/src/main/java/net/minecraft/server/BlockTripwireHook.java +@@ -149,6 +149,7 @@ public class BlockTripwireHook extends Block { + + this.a(world, blockposition, flag4, flag5, flag2, flag3); + if (!flag) { ++ if (world.getType(blockposition).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate + world.setTypeAndData(blockposition, (IBlockData) iblockdata3.set(BlockTripwireHook.FACING, enumdirection), 3); + if (flag1) { + this.a(world, blockposition, enumdirection); +-- +2.25.0 +