Skip to content

Commit e907565

Browse files
committed
Configurable tripwire dupe
1 parent a1415c3 commit e907565

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Dreeam <[email protected]>
3+
Date: Tue, 24 Dec 2024 13:28:56 -0500
4+
Subject: [PATCH] Configurable tripwire dupe
5+
6+
Bring back MC-59471, MC-129055 on 1.21.2+, which fixed in 1.21.2 snapshots 24w33a and 24w36a
7+
8+
diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
9+
index c2589f42c467ca672417c24076313da51bb2dcbb..fda1f2840f5a79d99217bd0fa72f4a1b1a75eb7e 100644
10+
--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
11+
+++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
12+
@@ -206,7 +206,7 @@ public class TripWireHookBlock extends Block {
13+
if (iblockdata4 != null) {
14+
BlockState iblockdata5 = world.getBlockState(blockposition2);
15+
16+
- if (iblockdata5.is(Blocks.TRIPWIRE) || iblockdata5.is(Blocks.TRIPWIRE_HOOK)) {
17+
+ if (org.dreeam.leaf.config.modules.gameplay.ConfigurableTripWireDupe.enabled || iblockdata5.is(Blocks.TRIPWIRE) || iblockdata5.is(Blocks.TRIPWIRE_HOOK)) { // Leaf - Configurable tripwire dupe
18+
world.setBlock(blockposition2, (BlockState) iblockdata4.trySetValue(TripWireHookBlock.ATTACHED, flag4), 3);
19+
}
20+
}
21+
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
22+
new file mode 100644
23+
index 0000000000000000000000000000000000000000..b259b7023315b4632b05b511695c1f32b7890b9c
24+
--- /dev/null
25+
+++ b/src/main/java/org/dreeam/leaf/config/modules/gameplay/ConfigurableTripWireDupe.java
26+
@@ -0,0 +1,18 @@
27+
+package org.dreeam.leaf.config.modules.gameplay;
28+
+
29+
+import org.dreeam.leaf.config.ConfigModules;
30+
+import org.dreeam.leaf.config.EnumConfigCategory;
31+
+
32+
+public class ConfigurableTripWireDupe extends ConfigModules {
33+
+
34+
+ public String getBasePath() {
35+
+ return EnumConfigCategory.GAMEPLAY.getBaseKeyName();
36+
+ }
37+
+
38+
+ public static boolean enabled = false;
39+
+
40+
+ @Override
41+
+ public void onLoaded() {
42+
+ enabled = config.getBoolean(getBasePath() + ".allow-tripwire-dupe", enabled);
43+
+ }
44+
+}

0 commit comments

Comments
 (0)