#checking a storage block about a specific item

1 messages · Page 1 of 1 (latest)

rustic oriole
#

I want to know if there is an easier way to check a storage block for a specific item other than just repeating /execute if items block ~ ~ ~ container.26 white_wool for each container slot

worn cape
#

you can use container.* to check all slots

rustic oriole
#

so if I used that what would the command be for it to check all slots and when it finds the item it replaces it with something else

worn cape
#

if you want to know which slot it is in you wouldn't use container.*

rustic oriole
#

so there isnt an easier way to do that?

worn cape
#

the easier way is to put the condition in the item modifier

#

item modifiers allow conditions to stop them from running

rustic oriole
#

can you explain what item modifiers are and how I can use them to do I want to do please?

worn cape
#

they are the best way to modify items inside any inventory, for most purposes.

#

misode has a good generator for them

gilded adderBOT
rustic oriole
#

alright i'll check it out tysm for the help!

worn cape
#

they work on a single slot, but you can make them conditional

#

and they can do any modification you can imagine whilst preserving existing components

#

to a certain degree

rustic oriole
#

thanks again