From b2f1fb4451d8be6116c2ad6b8b1173debb8e65b1 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:26:17 +0800 Subject: [PATCH] Update container open passthrough --- patches/server/0079-Container-open-passthrough.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/patches/server/0079-Container-open-passthrough.patch b/patches/server/0079-Container-open-passthrough.patch index aa079bc5..1c359267 100644 --- a/patches/server/0079-Container-open-passthrough.patch +++ b/patches/server/0079-Container-open-passthrough.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Container open passthrough diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java -index 614777d15bcf4141a89d0a0f7bd880526c668ffd..f24bf88440976d6f3e12abe64d319fb6a7205896 100644 +index 614777d15bcf4141a89d0a0f7bd880526c668ffd..a9dc9431fab1cbb45119e61be6d7689a34247ed0 100644 --- a/src/main/java/net/minecraft/world/level/block/SignBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java -@@ -114,6 +114,22 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo +@@ -114,6 +114,25 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo return InteractionResult.SUCCESS; } else if (flag2) { return InteractionResult.SUCCESS; @@ -22,6 +22,9 @@ index 614777d15bcf4141a89d0a0f7bd880526c668ffd..f24bf88440976d6f3e12abe64d319fb6 + } + + BlockPos pos1 = pos.relative(hit.getDirection().getOpposite()); ++ if (this instanceof WallSignBlock || this instanceof WallHangingSignBlock) { ++ pos1 = pos.relative(state.getValue(HorizontalDirectionalBlock.FACING).getOpposite()); ++ } + if (world.getBlockEntity(pos1) instanceof net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity) { + BlockState state1 = world.getBlockState(pos1); + return state1.use(world, player, hand, hit.withPosition(pos1));