Teleporting to the Nether with entities



  • I'm making a datapack and I want to make it so that when people spawn on a certain block you teleport to the same block in the Nether. However, nothing happens.

    This is my code:

    execute as @e[tag=spawn] run execute if entity @a[tag=blazeborn,distance=0..1,scores={spawn=1..30}] run execute in the_nether run tp @a[tag=blazeborn,distance=0..1,scores={spawn=1..30}] ~ ~ ~
    


  • Distance doesn't work across dimensions.
    Also the execute command takes multiple arguments, so you don't need to do ... run execute ....

    I assume the entity with tag 'spawn' is an armor stand on the block you want to teleport from, although you could switch that out for a positioned statement in the execute.

    The fixed command would be:

    execute at @e[tag=spawn] as @a[tag=blazeborn,distance=0..1,scores={spawn=1..30}] in the_nether run tp @s ~ ~ ~
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2