diff --git a/src/main/java/org/auioc/mcmod/arnicalib/utils/game/EntityUtils.java b/src/main/java/org/auioc/mcmod/arnicalib/utils/game/EntityUtils.java index dbbcb5bd..6fd5be7f 100644 --- a/src/main/java/org/auioc/mcmod/arnicalib/utils/game/EntityUtils.java +++ b/src/main/java/org/auioc/mcmod/arnicalib/utils/game/EntityUtils.java @@ -4,7 +4,7 @@ import java.util.function.Function; import java.util.function.Predicate; import javax.annotation.Nullable; -import net.minecraft.core.BlockPos; +import net.minecraft.core.Vec3i; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntitySelector; import net.minecraft.world.entity.LivingEntity; @@ -23,10 +23,14 @@ public class EntityUtils { /*================================================================================================================*/ // #region Teleport - public static void teleportTo(Entity entity, BlockPos pos) { + public static void teleportTo(Entity entity, Vec3i pos) { entity.teleportTo(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D); } + public static void teleportTo(Entity entity, Vec3 pos) { + entity.teleportTo(pos.x, pos.y, pos.z); + } + // #endregion Teleport /*================================================================================================================*/