mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-21 15:59:33 +00:00
--------- Co-authored-by: MC_XiaoHei <xiaohei.xor7studio@foxmail.com> Co-authored-by: Bluemangoo <chenfy2006@qq.com>
30 lines
1.6 KiB
Diff
30 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: Sat, 20 May 2023 21:46:13 +0800
|
|
Subject: [PATCH] Fix trapdoor feature
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
index 2b5fdcb12dcd8730df24113b9a6d295f000dd9f6..527a77b96a06098aaa4adac5ed46b45851bba00b 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
@@ -153,6 +153,8 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
|
flag1 = eventRedstone.getNewCurrent() > 0;
|
|
}
|
|
// CraftBukkit end
|
|
+
|
|
+ /* Leaves - it is feature, not bug!
|
|
// Paper start - break redstone on trapdoors early
|
|
boolean open = (Boolean) state.getValue(TrapDoorBlock.OPEN) != flag1;
|
|
// note: this must run before any state for this block/its neighborus are written to the world
|
|
@@ -173,6 +175,9 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
|
}
|
|
if (open) {
|
|
// Paper end - break redstone on trapdoors early
|
|
+ */
|
|
+
|
|
+ if ((Boolean) state.getValue(TrapDoorBlock.OPEN) != flag1) {
|
|
state = (BlockState) state.setValue(TrapDoorBlock.OPEN, flag1);
|
|
this.playSound((Player) null, world, pos, flag1);
|
|
}
|