I'm trying to build a click detector, but I don't understand what's wrong with this command: execute as @e [tag = Dirt] at @s if entity @e [type = armor_stand, tag = RightClickDemodistance = .1, nbt = {HandItems: [{id: "minecraft: dirt", Count: 1b}, {}]}] run give @s diamond
Can somebody help me?
Tag = RightClickDemodistance = .1
either you mean a score or a day
With a score:
scores = {RightClickDemodistance = .1}
Or in a day:
tag = RightClickDemodistance
So is this = .1 unnecessary?
Depends on what you want to test
RightClickDemodistance is either a scoreboard or a tag. If it is a day, it is unnecessary, otherwise you will need it
Found the error, forgot a comma between RightClickDemo and Distance xD. But thanks anyway