Skip to main content
edited tags
Link
SF.
  • 18.2k
  • 21
  • 85
  • 149
Improved readability
Source Link
Joachim
  • 22.7k
  • 15
  • 77
  • 111

'/execute if entityentity' but with relative coordinates?

So, I basically want to use the below command:

/execute if entity @p[x=-1856.5,y=122.0,z=-133.5,distance=..3.5] run tp @p ~-4 ~1 ~

/execute if entity @p[x=-1856.5,y=122.0,z=-133.5,distance=..3.5] run tp @p ~-4 ~1 ~

but using relative coordinates to the command block instead of these specific ones. 
Is itthat possible?

Edit: Also, could iI compress various relative coordinates into one single command block? 
What iI mean is, for example (i'mI'm not sure if the syntax is correct):

/execute if entity @p[x=~1,y=~1,z=~1] and [x=~2,y=~2,z=~2] run tp @p ~-4 ~1 ~/execute if entity @p[x=~1,y=~1,z=~1] and [x=~2,y=~2,z=~2] run tp @p ~-4 ~1 ~

/execute if entity but with relative coordinates?

So, I basically want to use the below command:

/execute if entity @p[x=-1856.5,y=122.0,z=-133.5,distance=..3.5] run tp @p ~-4 ~1 ~

but using relative coordinates to the command block instead of these specific ones. Is it possible?

Edit: Also, could i compress various relative coordinates into one single command block? What i mean is, for example (i'm not sure the syntax is correct):

/execute if entity @p[x=~1,y=~1,z=~1] and [x=~2,y=~2,z=~2] run tp @p ~-4 ~1 ~

'/execute if entity' but with relative coordinates?

I want to use the below command:

/execute if entity @p[x=-1856.5,y=122.0,z=-133.5,distance=..3.5] run tp @p ~-4 ~1 ~

but using relative coordinates to the command block instead of these specific ones. 
Is that possible?

Edit: Also, could I compress various relative coordinates into one single command block? 
What I mean is, for example (I'm not sure if the syntax is correct):

/execute if entity @p[x=~1,y=~1,z=~1] and [x=~2,y=~2,z=~2] run tp @p ~-4 ~1 ~

added 241 characters in body; edited tags
Source Link
Aless
  • 25
  • 1
  • 4

So, I basically want to use the below command:

/execute if entity @p[x=-1856.5,y=122.0,z=-133.5,distance=..3.5] run tp @p ~-4 ~1 ~

but using relative coordinates to the command block instead of these specific ones. Is it possible?

Edit: Also, could i compress various relative coordinates into one single command block? What i mean is, for example (i'm not sure the syntax is correct):

/execute if entity @p[x=~1,y=~1,z=~1] and [x=~2,y=~2,z=~2] run tp @p ~-4 ~1 ~

So, I basically want to use the below command:

/execute if entity @p[x=-1856.5,y=122.0,z=-133.5,distance=..3.5] run tp @p ~-4 ~1 ~

but using relative coordinates to the command block instead of these specific ones. Is it possible?

So, I basically want to use the below command:

/execute if entity @p[x=-1856.5,y=122.0,z=-133.5,distance=..3.5] run tp @p ~-4 ~1 ~

but using relative coordinates to the command block instead of these specific ones. Is it possible?

Edit: Also, could i compress various relative coordinates into one single command block? What i mean is, for example (i'm not sure the syntax is correct):

/execute if entity @p[x=~1,y=~1,z=~1] and [x=~2,y=~2,z=~2] run tp @p ~-4 ~1 ~

added 15 characters in body; edited title
Source Link
Nzall
  • 19.7k
  • 15
  • 82
  • 117
Loading
Source Link
Aless
  • 25
  • 1
  • 4
Loading