Teleportin upon reaching dimensions

Started by gobblewobble on

Topic category: Help with modding (Java Edition)

Last seen on 02:25, 27. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Teleportin upon reaching dimensions

I'm making a dimension where if you go to the void you will teleport to the dimension and 300 blocks on the y axis. So far i've gotten the entrance to the dimension working but i can't make myself teleport to the specific co-ordinates and i keep ending up dying in the void when i reach the dimension.

My code is:
Event trigger - triggered by external call
or when (global trigger): Entity travels to a dimension
if [[ID of dimension [Event/target entity] is in] = [VoidDimension]]
do Set [Event/target entity] spawn to x: [x] y: [-319] z: [z]

Keep in mind i have also tried set location instead of set spawn. What do i need to change for the code to work?