Fix sign editing broken when container-passthrough enabled#822
Open
HyacinthHaru wants to merge 2 commits intoLeavesMC:masterfrom
Open
Fix sign editing broken when container-passthrough enabled#822HyacinthHaru wants to merge 2 commits intoLeavesMC:masterfrom
HyacinthHaru wants to merge 2 commits intoLeavesMC:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
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.PASStoInteractionResult.TRY_WITH_EMPTY_HANDwhen 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.
Member
|
感谢你的贡献!修复是正确的但是patch的hash没有正确的更新,请查看contribute指南 |
MC-XiaoHei
previously approved these changes
Feb 23, 2026
Author
感谢指正 |
s-yh-china
previously approved these changes
Feb 23, 2026
53ed285
53ed285 to
15669b4
Compare
Author
签了一下,辛苦再审下吧() |
Member
|
hash没了( |
Member
15669b4 to
2cd7ed7
Compare
2cd7ed7 to
8c080ff
Compare
Author
MC-XiaoHei
approved these changes
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


借助 Claude 修复了 #821 ,发现是一个特别小的错误。
问题:
在
0056-Container-open-passthrough.patch的SignBlock.useItemOn方法中,告示牌背后没有容器时,代码返回了InteractionResult.PASS而非InteractionResult.TRY_WITH_EMPTY_HAND。修复:
在补丁的第 46 行,将
useItemOn方法中的return InteractionResult.PASS;改为return InteractionResult.TRY_WITH_EMPTY_HAND;这样一来,当告示牌背后没有容器时,交互会正确地流转到
useWithoutItem,潜行编辑告示牌的逻辑就能正常执行了。这是一个单行修复。