0

I want to make a helmet that, when placed on a users head, gives them Night Vision. But for some reason I am having a hard time figuring this out, it seems that it is unable to detect custom tags which is weird because I have had no issues with this whatsoever in the past, but I am a tad bit rusty so it's probably something simple that I have just forgotten.

My code is as follows:

execute as @e[nbt={Inventory:[{Slot:103b,id:"minecraft:leather_helmet",tag:{NVG:1b}}]}] run effect give @s minecraft:night_vision

I found the issue, the give command I was using:

/give @s leather_helmet{tag:NVG}

does not work, does anyone know the proper syntax for this command?

1 Answer 1

1

I was stupid, apparently when tagging items with the /give command you do not need to specify tag:

The correct command for this would be /give @s leather_helmet{NVG:1b}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .