#Execute as player standing somewhere
1 messages · Page 1 of 1 (latest)
/execute as @a[hasitem={item=<item>, location=slot.weapon.mainhand}] at @s if block <block> ~~-0.03~ run ...
Wait
What about a certain cord instead
@jade pulsar
/execute as @a[hasitem={item=<item>, location=slot.weapon.mainhand},x=<>,y=<>,z=<>,dy=<>] at @s if block <block> ~~-0.03~ run ...
Can I remove if block if i just want that cord
/execute as @a[hasitem={item=purple_stained_glass_pane,location=slot.weapon.mainhand},x=-12,y=54,z=29] at @s run w @s @s
its still executing and im not at that cord
dy=2
/execute as @a[hasitem={item=purple_stained_glass_pane,location=slot.weapon.mainhand},x=-12,y=54,z=29,dy=2] at @s run w @s @s
/execute positioned <cords> as @p[has_item={item=<item name>,location=slot.weapon.mainhand}] at @s run <command>
/execute positioned <block location> as @p[has_item={item=<item name>,location=slot.weapon.mainhand},r=1] at @s run <command>
What you want to trigger when the condition is true?
/execute at @a[x=<>,y=<>,z=<>,hasitem={item=<>,location=slot.weapon.mainhand}] as @p run /<>