Started by
Squrikle
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I am working on a mod that adds a new dimension. Instead of a portal, I have a block that you right-click to teleport. Whenever the player right-clicks the block it teleports the player to the world spawn coordinates rather than their current coordinates and vice-versa from the dimension to the overworld.
When the block is clicked and the entity is in the overworld set a nbt variable to the position of the player. Call it overworldX , Y and Z. Teleport the player to dimX, dimY, dimZ
When the block is clicked and the entity is in your dimension set a nbt variable to the position of the player. Call it dimX, Y and Z
Teleport the player to overworldX, overworldY, overworldZ.