[修复] 铁砧砸物品后客户端物品数量不变 - #2
Merged
Merged
Conversation
CgAu3
pushed a commit
to CgAu3/AnvilCraft
that referenced
this pull request
Nov 15, 2025
🌟 实现部分方块状态 物品模型 方块模型的DataProvider
Gu-ZT
pushed a commit
that referenced
this pull request
Feb 16, 2026
This was referenced Jul 3, 2026
This was referenced Jul 11, 2026
Merged
This was referenced Aug 6, 2026
Merged
This was referenced Aug 13, 2026
This was referenced Aug 25, 2026
This was referenced Aug 29, 2026
This was referenced Sep 10, 2026
This was referenced Sep 18, 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.
原先bug原因:用
ItemEntity#setItem设置物品,必须与原先的物品不同,才会成功设置并同步到客户端(SynchedEntityData#set),而原先的代码里只是设置了itemStack的数量,然后把同一个对象设置回物品实体,所以没有通过不相等检验,因此没有同步到客户端。