execute as @a[scores={carrot=1..},nbt={Inventory:[{Slot:-106b,id:"minecraft:carrot",Count:..15}]}] run trigger g_carrot add 1
I want to do is check if the player has less then 15 items in their inventory... if true it runs a trigger command. Any way of doing this without doing a clear command sort of thing?
Seems like you just have to make a long checking list...
Since ".." doesn't work like this in nbt argument. And every slot and their value is store under Inventory as a list, which means you will have a hard time for using "execute store ... run data get entity @s Inventory.[number].Count" to store the count value under a specific slot into scoreboard, since the red part is based on how many slot does the player used.
Any ideas how to get something like this working?
I want to do is check if the player has less then 15 items in their inventory... if true it runs a trigger command. Any way of doing this without doing a clear command sort of thing?
Seems like you just have to make a long checking list...
Since ".." doesn't work like this in nbt argument. And every slot and their value is store under Inventory as a list, which means you will have a hard time for using "execute store ... run data get entity @s Inventory.[number].Count" to store the count value under a specific slot into scoreboard, since the red part is based on how many slot does the player used.