fabric-carpet
fabric-carpet copied to clipboard
[scarpet script] How can I interact with the inventory from a shulker box item?
Currently, inventory_*
functions only accepts block, entity or gui system as a paramter. Making it accepts nbt will be very useful.
but not every inventory_* functions could work on nbt...... for example, inventory_size(nbt) is not well defined🤔...since inventory size is not stored in nbt..... and inventory_remove(nbt) will change its argument...
a=somenbt;
inventory_remove(a);
and a
got changed after that? i dont know if that is what you want....
a
can be a l-value so most inventory_
functions will work. What I want actually is to easily operate the inventory of shulker box item.
That you could do with a scarpet script, no? Just grab the inventory items and use parse_nbt()
to turn it into a regular string, and that's it.