mojira.dev
MC-122715

/teleport command no longer prevents teleporting to invalid coordinates

The bug

Whenever I put in a number for the y-axis over 4096, it lets me teleport there. The +-30 million x and z limit is gone as well.

Inadvertently requesting to teleport out of bound can cause the game to crash or the player to be continuously kicked.

To reproduce

Just run /tp @s 100000000 ~ 100000000 and the game will freeze.

Linked issues

MC-122858 Teleport Bug Resolved MC-123026 Command parser does not check for int-overflows Resolved MC-125904 Out-of-bound Teleportations are Allowed and Crash the Game Resolved MC-136289 impossible to launch the map. Resolved MC-137199 i managed to TP out of world border and can't get back. no hacks involved Resolved

Attachments

Comments 13

The same problem occurs with the X and Z direction past the world border. Teleporting entities past the 32-bit limit (plus or minus a couple hundred blocks) will crash the game and can potentially crash the game indefinitely. My suspected theory is that when changing syntax to many commands in 1.13, the +-30 million x and z limit as well as the 4096 y limit for teleportation wasn't implemented (at least not yet).

Affects 18w22c

Can confirm in 1.13-pre5.

We need tp to go above the 4096 limit for it's even possible to exceed it in survival mode

Confirming on 19w07a after exiting perspective view of a Wither boss. Coordinates close to spawn (~1,000X ~90Y, ~0Z). Singleplayer world forever crashes upon loading and gives the option to return to server list.

Didn't start new thread as another user with a similar bug was classified as a duplicate of this one.

https://photos.app.goo.gl/P44eHDFqXwCVTpMp6

 

3 more comments

IMO the y axis limit should become 30 million, for parity with the x and z axes, even if you can't build there and lighting is glitched. Alternatively, it could be made to be 2^31.

The problem is caused because neither

net.minecraft.server.commands.TeleportCommand#performTeleport(CommandSourceStack, Entity, ServerLevel, double, double, double, Set<ClientboundPlayerPositionPacket.RelativeArgument>, float, float, TeleportCommand.LookAt)

nor

net.minecraft.server.network.ServerGamePacketListenerImpl#teleport(double, double, double, float, float, Set<ClientboundPlayerPositionPacket.RelativeArgument>)

are checking if the target would be inside the world border

Fixed in 20w06a.

this bug is related to MC-170951

Regressed in 20w07a for y coordinates (updated ticket), caused by the fix of MC-170951, issue cloned by: MC-172374

.

(Unassigned)

Confirmed

Important

Crash

/teleport, /tp

Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w48a, Minecraft 18w02a, ..., Minecraft 19w14b, Minecraft 1.14.2, Minecraft 1.14.3, 1.14.4, 1.15.2

20w06a

Retrieved