hello everybody, good night, i need help with the [DataTag] part of this command /clear (i am working with minecraft 1.12.2),as you can see, i am createing
a mini shop but i don't know how i can do this when the player don't have enough money he can't buy more until he have enough to buy again,I imagine it will be like something like that [cobblestone_min = 32] so you can buy with 32 stone (but It doesn't work like that) . I need help with this please help thanks.
It is set to unconditional and needs redstone (there is a button on the front of it to activate it) This detects how much cobblestone is in the nearest player's inventory and the /stats command running in the clock updates the ITEMS scoreboard objective. The next command block in that chain has the command
It is set to unconditional and always active. This takes 32 cobblestone from the nearest player if they have at least 32 cobblestone in their inventory. The final chain command block has the command
/give @p minecraft:iron_ingot 16
You can obviously give the player anything you want I was just using iron to see if worked. Importantly it is set to conditional and always active, it will only run if the cobblestone was taken from the player.