mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 18:39:23 +00:00
ClassInstanceMultiMap belongs to Minecraft vanilla entity storage. And is unused, since replaced by spottedleaf's entity storage (rewrite chunk system). However these patches might be useful for vanilla entity storage if is used.
24 lines
1.6 KiB
Diff
24 lines
1.6 KiB
Diff
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
|
|
|
|
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 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..af6a189b618c11573cd63e69bcd7ad4467e82fa6 100644
|
|
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
|
|
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
|
|
@@ -201,7 +201,7 @@ public class TripWireHookBlock extends Block {
|
|
BlockState blockState2 = blockStates[i2];
|
|
if (blockState2 != null) {
|
|
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
|
|
if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, flag2), 3); // Paper - prevent tripwire from updating
|
|
}
|
|
}
|