-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix #5149: Items disappearing from shulkers #8219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mc1.20.1/dev
Are you sure you want to change the base?
Conversation
@Xicx99, this pull request is targeting the wrong branch. Pull requests should target the branch corresponding to the earliest supported Minecraft version unless the changes are specific to code that only exists for a newer Minecraft version. Please change the target branch, resolve any merge conflicts, and leave a message here so we can continue with the process of reviewing and merging this pull request. Thanks! |
Hello, |
Opening a new PR is fine. Alternatively you could make changes from 1.20.1 and force-push that to this branch. |
@@ -122,7 +123,7 @@ public static BlockState setZeroAge(BlockState blockState) { | |||
return blockState; | |||
} | |||
|
|||
public static int findAndRemoveInInventory(BlockState block, Player player, int amount) { | |||
public static int findAndRemoveInInventory(BlockState block, String nbtString, Player player, int amount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason for using String
here instead of just pass in the ItemStack
and use ItemStack#isSameItemSameComponents
?
Also please don't remove the original method, leave it as an overload so no breaking changes are introduced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was simply not aware that this method existed...
Now developing for 1.20.1 I will change that and use the equivalent method for it ItemStack#isSameItemSameTags
.
Thank you for pointing these out.
The item wand of symmetry was not handling the NBT information from the items. The fix consisted on making sure to also take into account this information when placing and removing the items.
@VoidLeech |
The item wand of symmetry was not handling the NBT information from the items.
The fix consisted on making sure to also take into account this information when looking for the item in the inventory, when placing the new item and when removing the item.
Created a simple test to confirm the fix.