diff options
Diffstat (limited to 'patches/server/0371-Validate-tripwire-hook-placement-before-update.patch')
-rw-r--r-- | patches/server/0371-Validate-tripwire-hook-placement-before-update.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0371-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0371-Validate-tripwire-hook-placement-before-update.patch new file mode 100644 index 0000000000..9c50f803d4 --- /dev/null +++ b/patches/server/0371-Validate-tripwire-hook-placement-before-update.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder <[email protected]> +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/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +index 5efec24bbc23b6a4db29693cb875b8e2e7ece9e2..02a3e1ced592784b9c66927c76376c7ab413367d 100644 +--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +@@ -174,6 +174,7 @@ public class TripWireHookBlock extends Block { + + this.playSound(world, pos, flag4, flag5, flag2, flag3); + if (!beingRemoved) { ++ if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate + world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); + if (flag1) { + this.notifyNeighbors(world, pos, enumdirection); |