-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix shulkerboxes.sc 1.21 data components compability #398
base: master
Are you sure you want to change the base?
Conversation
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.
works perfectly
[item, count, tag] = e~'item'; | ||
items_left = __add_item_to_vacuum_sboxes(player, item, count, tag, true); | ||
count_to_remove = count - items_left; | ||
if (count_to_remove, modify(e, 'nbt_merge', '{Item:{Count:'+(count-count_to_remove)+'b}}')); | ||
if (count_to_remove, modify(e, 'nbt_merge', '{Item:{count:'+(count-count_to_remove)+'}}')); |
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.
Should Item be changed to item here?
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 just remembered that I need to answer this one. Item
should be uppercase. I tried with lowercase first but that did not work. My guess is that {Item:
is part of scarpet and not Minecraft, but I'm not too familiar with either one.
vacuum didn't work in pickup mode |
mb, it work, but only if you have full stack, insted of work even vith one item, like in original |
Due to changes in data components, the shulker boxes script stopped working in 1.20.5/1.21. This PR makes shulkerboxes.sc compatible with 1.21 (and possibly 1.20.5, but I haven't tested it)
What changed
Count
is now lowercasecount
BlockEntityTag.Items
is nowcomponents."minecraft:container"
components."minecraft:custom_data"
Testing (only tested in 1.21)
Note
I installed the vim plugin for scarpet, which reformatted the file, removing some trailing spaces. I can always split the PR into two if it needs to be more clear.