mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-30 20:39:15 +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 872e52e13293a99d45f93d90d8fa7f6aa99d1f3a..2b57a82eeb98fffc47f37d073f7934e26a1a6221 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
@@ -157,6 +157,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
|
|
@@ -177,6 +179,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);
|
|
}
|