Skip to content

Commit

Permalink
Fix Redstone wire dont connect if on trapdoor
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Dec 12, 2023
1 parent 7279e57 commit 3f215d8
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ Subject: [PATCH] Redstone wire dont connect if on trapdoor


diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
index 507be06ad51b7a212e28d3ca6680e0e4b00f4233..36984ff7b8ffa253cf5279f89b056cf976f186bd 100644
index 507be06ad51b7a212e28d3ca6680e0e4b00f4233..a00cdca84be352528e54f8369bd12043f4fc776a 100644
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
@@ -174,7 +174,7 @@ public class RedStoneWireBlock extends Block {
@Override
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
if (direction == Direction.DOWN) {
- return !this.canSurviveOn(world, neighborPos, neighborState) ? Blocks.AIR.defaultBlockState() : state;
+ return top.leavesmc.leaves.LeavesConfig.redstoneDontCantOnTrapDoor ? state : !this.canSurviveOn(world, neighborPos, neighborState) ? Blocks.AIR.defaultBlockState() : state; // Leaves - behavior to 1.19
} else if (direction == Direction.UP) {
return this.getConnectionState(world, state, pos);
} else {
@@ -233,7 +233,7 @@ public class RedStoneWireBlock extends Block {
BlockState iblockdata = world.getBlockState(blockposition1);

Expand Down

0 comments on commit 3f215d8

Please sign in to comment.