mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
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 336fcf4af0ffb416b5595a9e65172f36cc36aaa3..b6c8c4af91f9ca2288e97b9402ec88d56385e75d 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);
|
|
}
|