1

I am working on a datapack and would like the give the end dimension a coordinate scale like the nether (so it can be used for fast travel).

So I set the coordinate scale to 16 in the json file and it works fine, except... now the ender dragon doesnt spawn.

So is there a workaround? I was thinking I could just teleport the player to 16 times whatever their current coordinates are in the end, but in order to do this I would have to save their coordinates as a scoreboard (which I know how to do), but I cant seem to make variables work in a /tp command.

To recap: I would like a command to tp a player to 16 times their current x/z coordinates. Is this possible?

Edit: it was possible but I needed to use someone's datapack to do it, and it's very complicated.

3
  • When using a nether portal, the game does more than just creating a portal at that coords, it checks for the closest place that is spawnable. Do you care about that or do you just want a flat 1:16 scaling?
    – BunnyMerz
    Nov 10, 2021 at 3:20
  • Well im actually going to have the player "fall out of the end" and I currently have (roughly): execute at @p[dimension:the_end,ypos=..-50] run in overworld tp ~ 990 ~ The point being that wont be an issue. It works as I had hoped if I set the coordinate scale to 16, but that apparently makes the dragon not spawn so Im looking for a workaround.
    – Aceplante
    Nov 11, 2021 at 4:40
  • Well, I think my answer does just that, except I missunderstood and made it overworld->end . It looks like you are capable of fixing it, so you can edit the answer if it fits you. If it fits, and you want me to edit I can do it another day.
    – BunnyMerz
    Nov 11, 2021 at 6:09

1 Answer 1

1

To do a raw teleport to another dimensions with scaled coordinates, we will do:

  • Summon an armor_stand
  • Store X with execute scaled to 16
  • Store Y
  • Store Z with execute scaled to 16
  • Tp player to armorstand but in the end
  • Remove armorstand

And here are the command versions. You said you are making a datapack so you can make these commands a file and run execute as <player> run function <this function> and it should work just fine.

As stated by the OP, the armor stand quickly goes to unloaded chunks. Here is the solution to it, use execute as armor_stand run function, this way @s will be refering to the armor stand for the entire time, even when unloaded.

file_1:

execute in minecraft:overworld at @r run summon minecraft:armor_stand ~ ~ ~ {Tags:["scale"]}
tag @s add to_end
execute as @e[tag=scale,limit=1] at @s run function file_2
tag @s remove to_end

file_2:

execute store result entity @s Pos[0] double 16 run data get entity @a[limit=1,tag=to_end] Pos[0]
execute store result entity @s Pos[1] double 1 run data get entity @a[limit=1,tag=to_end] Pos[1]
execute store result entity @s Pos[2] double 16 run data get entity @a[limit=1,tag=to_end] Pos[2]
execute at @s in minecraft:the_end run tp @a[limit=1,tag=to_end] ~ ~ ~
kill @s

Tried at (1000, ~, 1000) and it worked.

4
  • sorry for the delay; I was working on worldgen stuff. So the teleport part doesnt seem to be working. Can you not execute at the armor stand if its out of render distance? ill test it more soon
    – Aceplante
    Nov 17, 2021 at 15:59
  • So yea it quickly goes out of render distance and doesnt work, just so you know. Im working on a scoreboard way.
    – Aceplante
    Nov 17, 2021 at 17:40
  • It shouldn't. I tested it and worked fine. I'll take a further look into it. Are you using datapacks or command blocks? In theory, the armor would only unrender at the end of the tick.
    – BunnyMerz
    Nov 17, 2021 at 19:18
  • It seems i was too close to (0, ~, 0), so the stand was nearby and loaded.
    – BunnyMerz
    Nov 17, 2021 at 20:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .