diff --git a/patches/server/0137-Configurable-tripwire-dupe.patch b/patches/server/0137-Configurable-tripwire-dupe.patch new file mode 100644 index 000000000..0d2b5fc0e --- /dev/null +++ b/patches/server/0137-Configurable-tripwire-dupe.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> +Date: Tue, 24 Dec 2024 13:28:56 -0500 +Subject: [PATCH] Configurable tripwire dupe + +Bring back MC-59471, MC-129055 on 1.21.2+, which fixed in 1.21.2 snapshots 24w33a and 24w36a + +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 c2589f42c467ca672417c24076313da51bb2dcbb..fda1f2840f5a79d99217bd0fa72f4a1b1a75eb7e 100644 +--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +@@ -206,7 +206,7 @@ public class TripWireHookBlock extends Block { + if (iblockdata4 != null) { + BlockState iblockdata5 = world.getBlockState(blockposition2); + +- if (iblockdata5.is(Blocks.TRIPWIRE) || iblockdata5.is(Blocks.TRIPWIRE_HOOK)) { ++ if (org.dreeam.leaf.config.modules.gameplay.ConfigurableTripWireDupe.enabled || iblockdata5.is(Blocks.TRIPWIRE) || iblockdata5.is(Blocks.TRIPWIRE_HOOK)) { // Leaf - Configurable tripwire dupe + world.setBlock(blockposition2, (BlockState) iblockdata4.trySetValue(TripWireHookBlock.ATTACHED, flag4), 3); + } + } +diff --git a/src/main/java/org/dreeam/leaf/config/modules/gameplay/ConfigurableTripWireDupe.java b/src/main/java/org/dreeam/leaf/config/modules/gameplay/ConfigurableTripWireDupe.java +new file mode 100644 +index 0000000000000000000000000000000000000000..b259b7023315b4632b05b511695c1f32b7890b9c +--- /dev/null ++++ b/src/main/java/org/dreeam/leaf/config/modules/gameplay/ConfigurableTripWireDupe.java +@@ -0,0 +1,18 @@ ++package org.dreeam.leaf.config.modules.gameplay; ++ ++import org.dreeam.leaf.config.ConfigModules; ++import org.dreeam.leaf.config.EnumConfigCategory; ++ ++public class ConfigurableTripWireDupe extends ConfigModules { ++ ++ public String getBasePath() { ++ return EnumConfigCategory.GAMEPLAY.getBaseKeyName(); ++ } ++ ++ public static boolean enabled = false; ++ ++ @Override ++ public void onLoaded() { ++ enabled = config.getBoolean(getBasePath() + ".allow-tripwire-dupe", enabled); ++ } ++}