public class TeleportationUtils
extends java.lang.Object
| Constructor and Description |
|---|
TeleportationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.entity.Entity |
teleportEntity(net.minecraft.entity.Entity entity,
net.minecraft.util.RegistryKey<net.minecraft.world.World> dimension,
double xCoord,
double yCoord,
double zCoord,
float yaw,
float pitch) |
static net.minecraft.entity.Entity |
teleportEntityTo(net.minecraft.entity.Entity entity,
net.minecraft.util.math.BlockPos target,
net.minecraft.util.RegistryKey<net.minecraft.world.World> destinationDimension,
float yaw,
float pitch)
From Mekanism (MIT licensed) TileEntityTeleporter#teleportEntityTo with a couple minor validation and direction tweaks.
|
public static net.minecraft.entity.Entity teleportEntity(net.minecraft.entity.Entity entity,
net.minecraft.util.RegistryKey<net.minecraft.world.World> dimension,
double xCoord,
double yCoord,
double zCoord,
float yaw,
float pitch)
public static net.minecraft.entity.Entity teleportEntityTo(net.minecraft.entity.Entity entity,
net.minecraft.util.math.BlockPos target,
net.minecraft.util.RegistryKey<net.minecraft.world.World> destinationDimension,
float yaw,
float pitch)
entity - Entity to teleport.target - Target position.destinationDimension - Target dimension.yaw - Yaw the entity will have after teleporting.pitch - Pitch the entity will have after teleporting.