mojira.dev
MC-170951

Cannot teleport entities outside of the world

How to reproduce

  1. Run this command to teleport yourself below bedrock

    /tp @s ~ -1 ~

    Notice you don't get teleported and you get "Invalid position for teleport"

Why we need this: a lot of data packs use this feature to remove mobs without the death animation showing as well as preventing sounds, item drops, slimes splitting, etc.

Linked issues

Attachments

Comments 3

if you mine down and mine the bedrock and go bellow then you do /tp @s ~ ~ ~ then it still says the error message

The ability to teleport entities into the void has been a common technique for years. Having it removed from the game and failing with an error is a significant breaking change for commands/datapacks.

I'd suggest a new "super kill" command that immediately disposes of entities without any of the aforementioned side-effects, but that still wouldn't fix all of the outdated datapacks.

This did not occur in 1.15. Apparently this was as a side effect of a bug fix for teleporting to coordinates that are too large causing a crash, which may have led the fix to limit negative y as well, which should not be necessary as it isn't a large number.

Misode

michael

Confirmed

Very Important

Commands

20w06a

20w07a

Retrieved