Skip to content

Commit

Permalink
Add back configurable tripwire dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Feb 24, 2025
1 parent ab0e8da commit be4bee9
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ From: Dreeam <[email protected]>
Date: Tue, 24 Dec 2024 13:28:56 -0500
Subject: [PATCH] Configurable tripwire dupe

Removed since Paper 1.21.4

Bring back MC-59471, MC-129055 on 1.21.2+, which fixed in 1.21.2 snapshots 24w33a and 24w36a

Note: this is different from Paper's skip-tripwire-hook-placement-validation, that setting
handles tripwire hook dupe

diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
index 6a7e5a642e2eaf7d5dffadb81738f7385a38c0af..fa7e2c5406bb4bb755fb6e215dda5fe704b6bdf4 100644
index 9aace993c6c18f1a50610e4766225485984b8167..d62855ce6df9a52cdd8005a43a70353365a92230 100644
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
@@ -215,7 +215,7 @@ public class TripWireHookBlock extends Block {
Expand All @@ -17,6 +18,6 @@ index 6a7e5a642e2eaf7d5dffadb81738f7385a38c0af..fa7e2c5406bb4bb755fb6e215dda5fe7
BlockState blockState3 = level.getBlockState(blockPos1);
- if (blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) {
+ if (org.dreeam.leaf.config.modules.gameplay.ConfigurableTripWireDupe.enabled || blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) { // Leaf - Configurable tripwire dupe
level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3);
if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3); // Paper - prevent tripwire from updating
}
}

0 comments on commit be4bee9

Please sign in to comment.