diff --git a/src/main/java/org/dimdev/dimdoors/rift/targets/LimboTarget.java b/src/main/java/org/dimdev/dimdoors/rift/targets/LimboTarget.java index 7af5b8b3..bdacdf96 100644 --- a/src/main/java/org/dimdev/dimdoors/rift/targets/LimboTarget.java +++ b/src/main/java/org/dimdev/dimdoors/rift/targets/LimboTarget.java @@ -9,6 +9,7 @@ import org.dimdev.dimdoors.api.util.TeleportUtil; import org.dimdev.dimdoors.world.ModDimensions; import net.minecraft.entity.Entity; +import org.dimdev.dimdoors.world.pocket.VirtualLocation; public class LimboTarget extends VirtualTarget implements EntityTarget { public static final LimboTarget INSTANCE = new LimboTarget(); @@ -19,7 +20,7 @@ public class LimboTarget extends VirtualTarget implements EntityTarget { @Override public boolean receiveEntity(Entity entity, Vec3d relativePos, EulerAngle relativeAngle, Vec3d relativeVelocity) { - TeleportUtil.teleport(entity, ModDimensions.LIMBO_DIMENSION, entity.getPos(), relativeAngle, relativeVelocity); + TeleportUtil.teleport(entity, ModDimensions.LIMBO_DIMENSION, entity.getBlockPos().add(0, 255-entity.getBlockY(), 0), relativeAngle, relativeVelocity); return true; } diff --git a/src/main/java/org/dimdev/dimdoors/world/pocket/VirtualLocation.java b/src/main/java/org/dimdev/dimdoors/world/pocket/VirtualLocation.java index 250b78a9..0454a0df 100644 --- a/src/main/java/org/dimdev/dimdoors/world/pocket/VirtualLocation.java +++ b/src/main/java/org/dimdev/dimdoors/world/pocket/VirtualLocation.java @@ -93,7 +93,7 @@ public class VirtualLocation { BlockPos pos = getTopPos(world, new BlockPos(newX, 255, newZ)); return new Location(world, pos); } - private static BlockPos getTopPos(World world, BlockPos pos) { + public static BlockPos getTopPos(World world, BlockPos pos) { while(world.getBlockState(pos).isAir()) { pos = pos.down(); }