Skip to content

Fix sign editing broken when container-passthrough enabled#822

Open
HyacinthHaru wants to merge 2 commits intoLeavesMC:masterfrom
HyacinthHaru:fix/sign-container-passthrough
Open

Fix sign editing broken when container-passthrough enabled#822
HyacinthHaru wants to merge 2 commits intoLeavesMC:masterfrom
HyacinthHaru:fix/sign-container-passthrough

Conversation

@HyacinthHaru
Copy link

借助 Claude 修复了 #821 ,发现是一个特别小的错误。

问题:

0056-Container-open-passthrough.patchSignBlock.useItemOn 方法中,告示牌背后没有容器时,代码返回了 InteractionResult.PASS 而非 InteractionResult.TRY_WITH_EMPTY_HAND

修复:

在补丁的第 46 行,将 useItemOn 方法中的 return InteractionResult.PASS; 改为 return InteractionResult.TRY_WITH_EMPTY_HAND;

这样一来,当告示牌背后没有容器时,交互会正确地流转到 useWithoutItem,潜行编辑告示牌的逻辑就能正常执行了。这是一个单行修复。

Copilot AI review requested due to automatic review settings February 23, 2026 07:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the container-passthrough feature where players were unable to edit signs when the feature was enabled. The issue was caused by returning the wrong InteractionResult type in the SignBlock.useItemOn method when no container was present behind a sign.

Changes:

  • Fixed sign editing by changing the return value from InteractionResult.PASS to InteractionResult.TRY_WITH_EMPTY_HAND when no container is found behind a sign in the container-passthrough patch

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MC-XiaoHei
Copy link
Member

MC-XiaoHei commented Feb 23, 2026

感谢你的贡献!修复是正确的但是patch的hash没有正确的更新,请查看contribute指南
我已经帮你进行了修复

MC-XiaoHei
MC-XiaoHei previously approved these changes Feb 23, 2026
@HyacinthHaru
Copy link
Author

感谢你的贡献!修复是正确的但是patch的hash没有正确的更新,请查看contribute指南 我已经帮你进行了修复

感谢指正

s-yh-china
s-yh-china previously approved these changes Feb 23, 2026
Copy link
Member

@s-yh-china s-yh-china left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢您对 Leaves 的贡献~
但是您的 commit 没签名,这导致我们不能直接合并到主仓库,您是否可以尝试对其进行签名呢?

@HyacinthHaru HyacinthHaru dismissed stale reviews from s-yh-china and MC-XiaoHei via 53ed285 February 23, 2026 11:09
@HyacinthHaru HyacinthHaru force-pushed the fix/sign-container-passthrough branch 2 times, most recently from 53ed285 to 15669b4 Compare February 23, 2026 11:21
@HyacinthHaru
Copy link
Author

感谢您对 Leaves 的贡献~ 但是您的 commit 没签名,这导致我们不能直接合并到主仓库,您是否可以尝试对其进行签名呢?

签了一下,辛苦再审下吧()

@MC-XiaoHei
Copy link
Member

hash没了(
我明天早上把这个处理一下吧

@MC-XiaoHei
Copy link
Member

PixPin_2026-02-24_09-35-11 看起来还是没签名(

@HyacinthHaru HyacinthHaru force-pushed the fix/sign-container-passthrough branch from 15669b4 to 2cd7ed7 Compare February 24, 2026 04:13
@HyacinthHaru HyacinthHaru force-pushed the fix/sign-container-passthrough branch from 2cd7ed7 to 8c080ff Compare February 24, 2026 04:27
@HyacinthHaru
Copy link
Author

PixPin_2026-02-24_09-35-11 看起来还是没签名(

Ok 终于整好了()
不好意思有点耽误了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants