Make eternal fluid work again :hahayes:
This commit is contained in:
parent
163cb1031e
commit
2c84a4664f
2 changed files with 5 additions and 5 deletions
|
@ -53,7 +53,7 @@ public class EscapeTarget extends VirtualTarget implements EntityTarget { // TOD
|
|||
chat(entity, new TranslatableText("rifts.destinations.escape.rift_has_closed"));
|
||||
}
|
||||
if (ModDimensions.LIMBO_DIMENSION != null) {
|
||||
TeleportUtil.teleport(entity, ModDimensions.LIMBO_DIMENSION, new BlockPos(this.location.getX(), this.location.getY(), this.location.getZ()), 0);
|
||||
TeleportUtil.teleport(entity, ModDimensions.LIMBO_DIMENSION, new BlockPos(this.location.getX(), this.location.getY(), this.location.getZ()), entity.getYaw(1.0F));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -13,20 +13,20 @@ import net.minecraft.world.World;
|
|||
import net.fabricmc.fabric.api.dimension.v1.FabricDimensions;
|
||||
|
||||
public final class TeleportUtil {
|
||||
public static void teleport(Entity entity, World world, BlockPos pos, int yawOffset) {
|
||||
public static void teleport(Entity entity, World world, BlockPos pos, float yaw) {
|
||||
if (world.isClient) {
|
||||
throw new UnsupportedOperationException("Only supported on ServerWorld");
|
||||
}
|
||||
|
||||
teleport(entity, world, Vec3d.ofBottomCenter(pos), yawOffset);
|
||||
teleport(entity, world, Vec3d.ofBottomCenter(pos), yaw);
|
||||
}
|
||||
|
||||
public static void teleport(Entity entity, World world, Vec3d pos, float yawOffset) {
|
||||
public static void teleport(Entity entity, World world, Vec3d pos, float yaw) {
|
||||
if (world.isClient) {
|
||||
throw new UnsupportedOperationException("Only supported on ServerWorld");
|
||||
}
|
||||
|
||||
FabricDimensions.teleport(entity, (ServerWorld) world, new TeleportTarget(pos, entity.getVelocity(), entity.getYaw(1.0F) + yawOffset, entity.getPitch(1.0F)));
|
||||
FabricDimensions.teleport(entity, (ServerWorld) world, new TeleportTarget(pos, entity.getVelocity(), yaw, entity.getPitch(1.0F)));
|
||||
}
|
||||
|
||||
public static void teleport(ServerPlayerEntity player, Location location) {
|
||||
|
|
Loading…
Reference in a new issue