aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1019-Fix-tripwire-disarming-not-working-as-intended.patch
blob: 46a8a52189e4880e89db36e730fef23a73c131a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: DungeonDev <dungeondevtn@gmail.com>
Date: Sun, 2 Jul 2023 02:34:54 +0100
Subject: [PATCH] Fix tripwire disarming not working as intended

Fixes MC-129055

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 d9b3877257b31ca1b5acc4a47fbf5b993de69ae0..efd8d77a441fd334ea4c09c5e31c6d946c1ae0b7 100644
--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
@@ -201,9 +201,8 @@ public class TripWireHookBlock extends Block {
                     BlockState iblockdata4 = aiblockdata[l];
 
                     if (iblockdata4 != null) {
+                        if (world.getBlockState(blockposition2).is(Blocks.TRIPWIRE) || io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowTripwireDisarmingExploits) { // Paper - Fix tripwire disarming not working as intended
                         world.setBlock(blockposition2, (BlockState) iblockdata4.trySetValue(TripWireHookBlock.ATTACHED, flag4), 3);
-                        if (!world.getBlockState(blockposition2).isAir()) {
-                            ;
                         }
                     }
                 }