Class DimensionHelper
java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.DimensionHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.BlockPos
findLocation
(net.minecraft.server.level.ServerLevel world, net.minecraft.server.level.ServerPlayer player, double x, double y, double z) static net.minecraft.core.BlockPos
findPosition
(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction.Axis axis) static double[]
findSafeTeleportLocation
(net.minecraft.server.level.ServerLevel world, double x, double y, double z) static net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
getDimension
(String dimension) static net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
getDimension
(net.minecraft.resources.ResourceLocation key) static Optional<net.minecraft.server.level.ServerLevel>
static Optional<net.minecraft.server.level.ServerLevel>
getWorld
(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> key) static void
teleport
(net.minecraft.server.level.ServerPlayer entity, String dimension, double x, double y, double z) static void
teleport
(net.minecraft.server.level.ServerPlayer entity, String dimension, double x, double y, double z, float yaw, float pitch) static void
teleport
(net.minecraft.server.level.ServerPlayer entity, String dimension, double x, double y, double z, float yaw, float pitch, boolean safe)
-
Constructor Details
-
DimensionHelper
public DimensionHelper()
-
-
Method Details
-
teleport
public static void teleport(net.minecraft.server.level.ServerPlayer entity, String dimension, double x, double y, double z) -
teleport
public static void teleport(net.minecraft.server.level.ServerPlayer entity, String dimension, double x, double y, double z, float yaw, float pitch) -
teleport
public static void teleport(net.minecraft.server.level.ServerPlayer entity, String dimension, double x, double y, double z, float yaw, float pitch, boolean safe) -
findPosition
public static net.minecraft.core.BlockPos findPosition(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction.Axis axis) -
findLocation
public static net.minecraft.core.BlockPos findLocation(net.minecraft.server.level.ServerLevel world, net.minecraft.server.level.ServerPlayer player, double x, double y, double z) -
findSafeTeleportLocation
public static double[] findSafeTeleportLocation(net.minecraft.server.level.ServerLevel world, double x, double y, double z) -
getDimension
public static net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension(String dimension) -
getDimension
public static net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension(net.minecraft.resources.ResourceLocation key) -
getWorld
public static Optional<net.minecraft.server.level.ServerLevel> getWorld(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> key) -
getWorld
-