mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-29 20:09:23 +00:00
--------- Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Fortern <blueten.ki@gmail.com> Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com> Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
32 lines
1.6 KiB
Diff
32 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Mon, 3 Feb 2025 16:42:23 +0800
|
|
Subject: [PATCH] Fix trapdoor feature
|
|
|
|
|
|
diff --git a/net/minecraft/world/level/block/TrapDoorBlock.java b/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
index a2140d22dc58aa2df1afbeb5170d04fd65739d55..fcea4fa82e97fc262726cfcf9c4f8002b66700f5 100644
|
|
--- a/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
+++ b/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
@@ -139,6 +139,8 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
|
hasNeighborSignal = eventRedstone.getNewCurrent() > 0;
|
|
}
|
|
// CraftBukkit end
|
|
+
|
|
+ /* Leaves - it is feature, not bug!
|
|
// Paper start - break redstone on trapdoors early
|
|
boolean open = state.getValue(TrapDoorBlock.OPEN) != hasNeighborSignal;
|
|
// note: this must run before any state for this block/its neighbours are written to the world
|
|
@@ -157,8 +159,9 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
|
}
|
|
}
|
|
}
|
|
- if (open) {
|
|
- // Paper end - break redstone on trapdoors early
|
|
+ */
|
|
+
|
|
+ if (state.getValue(TrapDoorBlock.OPEN) != hasNeighborSignal) {
|
|
state = state.setValue(OPEN, hasNeighborSignal);
|
|
this.playSound(null, level, pos, hasNeighborSignal);
|
|
}
|