How do I save a player's position and teleport them there later?

Started by PartiallyObscured on

Topic category: Help with MCreator software

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I save a player's position and teleport them there later?

Hey! I've been working on a mod and quickly encountered a problem I could fix by myself. I'm making an item that allows you to teleport to saved coordinates; shift-click to record coords and right-click to teleport. For some reason, instead of teleporting you to the location you set, you are teleported underground at roughly 0 ,-1, 0. Here are the images:

Code:

https://photos.google.com/photo/AF1QipN3-H5rsw5Hl_PRDVsPBF8SiB793E2rmiYtlZh1

In-game:

https://photos.google.com/photo/AF1QipN_FpPTgrrCBME5jLaqAZQMpP6YrscJ2Skd1pEh

https://photos.google.com/photo/AF1QipOxd7E_vDHbnFmdYBf_VgZfLbVJc0bnqDXTgpiS

I really can't figure this out... Any help is appreciated!

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
EDIT: I realized that the…
Sat, 10/21/2023 - 09:05

EDIT: I realized that the item teleports me to 0, 0, 0 every time. Hope this clears some confusion, cuz it didn't clear mine.