#how to switch entity's dimension minecraft?
1 messages · Page 1 of 1 (latest)
help please
Entity.moveToWorld
wth
What mappings are you using
Check the argument type
TeleportTo is for portals
entity.teleport()
i believe flags can be null
to get the correct dimension you do:
ServerWorld serverWorld = world.getServer().getWorld(World.OVERWORLD)// or you mods dimension level key
public static final RegistryKey<World> YOUR_LEVEL_KEY = RegistryKey.of(RegistryKeys.WORLD,
Identifier.of("modid:moddimension"));
so i need something like this?
you don't have to make it a variable if you are using it directly
so only put world.getServer().getWorld(World.OVERWORLD)
and you then have to fill in the rest of the arguments
(world.getServer().getWorld(World.OVERWORLD), x, y, z, null, entity.getYaw(), entity.getPitch())
it crashes game
:\
