minecraft 1.16 check if player has item in range of 5 blocks code example
Example: minecraft 1.16 check if player has item in range of 5 blocks
execute if entity @a[nbt={Inventory:[{id:"minecraft:white_concrete"}]},distance=..5,limit=1] run say There are one or more players nearby with white concrete in their inventory!