From 44336b8510d7be39c5fd1f42b298eddedc3ae539 Mon Sep 17 00:00:00 2001 From: DungeonDev Date: Tue, 2 Apr 2024 12:15:49 +0200 Subject: [PATCH] Add config option for tripwire disarming fix Fixes #10382 Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> --- .../server/Fix-tripwire-disarming-not-working-as-intended.patch | 2 +- patches/server/Paper-config-files.patch | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patches/server/Fix-tripwire-disarming-not-working-as-intended.patch b/patches/server/Fix-tripwire-disarming-not-working-as-intended.patch index b3470ed5c5..cb574fcf89 100644 --- a/patches/server/Fix-tripwire-disarming-not-working-as-intended.patch +++ b/patches/server/Fix-tripwire-disarming-not-working-as-intended.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 BlockState iblockdata4 = aiblockdata[l]; if (iblockdata4 != null) { -+ if (world.getBlockState(blockposition2).is(Blocks.TRIPWIRE)) { // Paper - Fix tripwire disarming not working as intended ++ 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()) { - ; diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index b67772b44a..a3653ddf30 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -635,6 +635,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public UnsupportedSettings unsupportedSettings; + + public class UnsupportedSettings extends ConfigurationPart { ++ @Comment("This setting controls if the broken behavior of disarmed tripwires not breaking should be allowed. This also allows for dupes") ++ public boolean allowTripwireDisarmingExploits = false; + @Comment("This setting allows for exploits related to end portals, for example sand duping") + public boolean allowUnsafeEndPortalTeleportation = false; + @Comment("This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.")