2
Hi, been working out a new currency system using a custom texture on the Nautilus Shell.
This is my starting command
/execute if entity @p[nbt={Inventory:[{id:"minecraft:nautilus_shell";Count:5b}]}]
I need to be able to execute even if the player has more than 5. I want players to see the item disappear from the inventory, so converting to a scoreboard is not the way I'd like to go if it is possible.
This is my starting command
/execute if entity @p[nbt={Inventory:[{id:"minecraft:nautilus_shell";Count:5b}]}]
I need to be able to execute even if the player has more than 5. I want players to see the item disappear from the inventory, so converting to a scoreboard is not the way I'd like to go if it is possible.
12
I agree with what the others have said, I think its unavoidable that you use scoreboards unless you wanna do it with tags or teams, but then you would manually have to create a lot of tags, e.g. If your currency goes up to 1000 coins, you would need to create 1000 tags unless you do some clever math stuff that could calculate the product of two tags or some s*** but thats way to complicated.
Then again, I don't understand why you can't use scoreboards if the players should see the item disappear from the inventory. You could just make it so that an entity that has a count higher or equal than five gets tagged and then slowly remove the amount you want to have disappear from the inventory.
Also, I don't know what exactly your trying to achieve so I could be wrong, but shouldn't the command be:
/execute AS entity @p[...] AT @s
I hope this somehow helps you.
Then again, I don't understand why you can't use scoreboards if the players should see the item disappear from the inventory. You could just make it so that an entity that has a count higher or equal than five gets tagged and then slowly remove the amount you want to have disappear from the inventory.
Also, I don't know what exactly your trying to achieve so I could be wrong, but shouldn't the command be:
/execute AS entity @p[...] AT @s
I hope this somehow helps you.
/execute as @p at @s means that the command block chose an entity at the entity's position.
/execute as @p just means that the command block has selected that entity and thats it. As the command itself is executed from a nearby command block to a player and only messing with its inventory instead of like spawning a mob, at @s isnt needed
/execute as @p just means that the command block has selected that entity and thats it. As the command itself is executed from a nearby command block to a player and only messing with its inventory instead of like spawning a mob, at @s isnt needed
yeah i know but what I was trying to say is more about the AS @p instead of IF entity @p.
/execute as entity @p[nbt={Inventory:[{id:"minecraft:nautilus_shell";Count:5b}]}] run clear @s nautilus_shell 5
Assuming you press a button somewhere and this command runs once, and the syntax is correct, this command should workYa it works...for exactly 5
rip, unfortunately the only other comment I agree with is JollyWinter's
[deleted]
I think if I design it so they press the button to buy, it runs the first 2 commands in order, it should work for multiple transactions
[deleted]
I have absolutely no idea what that command does but I would do a more simple currency system seen on many servers that basically uses nuggets as currency if not trya command block community discord server if pmc doesnt help
[deleted]
Why do you think using scoreboards stops players from seeing the items disappearing from the inventory?
