I am making a map for my friends and I now i am working on a money system and getting money out of you account is already done but now i am stuck because i need to detect 16 or more gold nuggets with a name and collor in a players inventory i tried:
execute at @p[nbt={Inventory:[{id:"minecraft:gold_nugget",Count:16b,tag:{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"bold\":\"true\"}"}}}]},distance=..5] run scoreboard players add @p Gold 16 an
and then a chain command with conditional:
execute at @p[nbt={Inventory:[{id:"minecraft:gold_nugget",tag:{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"bold\":\"true\"}"}}}]},distance=..6] run clear @p minecraft:gold_nugget{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"bold\":\"true\"}"}} 16
But with this setup it detects when a player has a stack of 16 and i want it to dect if a player has a minimum of 16 so can anynbody please help me thank you! =)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey,
I am making a map for my friends and I now i am working on a money system and getting money out of you account is already done but now i am stuck because i need to detect 16 or more gold nuggets with a name and collor in a players inventory i tried:
execute at @p[nbt={Inventory:[{id:"minecraft:gold_nugget",Count:16b,tag:{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"bold\":\"true\"}"}}}]},distance=..5] run scoreboard players add @p Gold 16 an
and then a chain command with conditional:
execute at @p[nbt={Inventory:[{id:"minecraft:gold_nugget",tag:{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"bold\":\"true\"}"}}}]},distance=..6] run clear @p minecraft:gold_nugget{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"bold\":\"true\"}"}} 16
But with this setup it detects when a player has a stack of 16 and i want it to dect if a player has a minimum of 16 so can anynbody please help me thank you! =)