mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-28 11:29:12 +00:00
29 lines
2.1 KiB
Diff
29 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Wed, 14 Jun 2023 12:07:07 +0800
|
|
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..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);
|
|
|
|
if (flag) {
|
|
- boolean flag1 = iblockdata.getBlock() instanceof TrapDoorBlock || this.canSurviveOn(world, blockposition1, iblockdata);
|
|
+ boolean flag1 = (!top.leavesmc.leaves.LeavesConfig.redstoneDontCantOnTrapDoor && iblockdata.getBlock() instanceof TrapDoorBlock) || this.canSurviveOn(world, blockposition1, iblockdata); // Leaves - behavior to 1.19
|
|
|
|
if (flag1 && RedStoneWireBlock.shouldConnectTo(world.getBlockState(blockposition1.above()))) {
|
|
if (iblockdata.isFaceSturdy(world, blockposition1, direction.getOpposite())) {
|