#Error when moving dimensions [closed]

5 messages · Page 1 of 1 (latest)

pliant latch
#

I'm coding a portal and when I have to teleport the player (in the onEntityCollision method) I get the world with MinecraftServer#getWorld(Key)
entity.moveToWorld(world.getServer().getWorld(LIBRARY_WORLD_KEY));

I'm getting a very big error that doesnt seem to be of any use (attached)
Yes I am only executing this on the server
Yes I am checking if the entity can use portals

opaque raft
#

are you checking that the world it returns is not null?

pliant latch
#

Fixed it by using entity.teleport

#

I have no clue why it works