Carpet

Carpet

2M Downloads

[scarpet script] How can I interact with the inventory from a shulker box item?

szdytom opened this issue · 3 comments

commented

Currently, inventory_* functions only accepts block, entity or gui system as a paramter. Making it accepts nbt will be very useful.

commented

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.

commented

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....

commented

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.