"Temporarily" disable cross-dimension entity teleports
This commit is contained in:
parent
539879dbd7
commit
c05336ac9f
|
@ -56,9 +56,11 @@ public class ItemSigilTeleposition extends ItemSigilBase {
|
|||
BlockPos blockPos = new BlockPos(getValue(stack.getTagCompound(), Constants.NBT.X_COORD), getValue(stack.getTagCompound(), Constants.NBT.Y_COORD), getValue(stack.getTagCompound(), Constants.NBT.Z_COORD)).up();
|
||||
if (world.provider.getDimension() == getValue(stack.getTagCompound(), Constants.NBT.DIMENSION_ID)) {
|
||||
TeleportQueue.getInstance().addITeleport(new Teleports.TeleportSameDim(blockPos, player, getOwnerUUID(stack), true));
|
||||
} else {
|
||||
TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(blockPos, player, getOwnerUUID(stack), world, getValue(stack.getTagCompound(), Constants.NBT.DIMENSION_ID), true));
|
||||
}
|
||||
// FIXME - Fix cross-dimension teleports causing major desync
|
||||
// } else {
|
||||
// TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(blockPos, player, getOwnerUUID(stack), world, getValue(stack.getTagCompound(), Constants.NBT.DIMENSION_ID), true));
|
||||
// }
|
||||
}
|
||||
return super.onItemRightClick(world, player, hand);
|
||||
}
|
||||
|
|
|
@ -104,19 +104,21 @@ public class TileTeleposer extends TileInventory implements ITickable {
|
|||
TeleportQueue.getInstance().addITeleport(new Teleports.TeleportSameDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), true));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!originalWorldEntities.isEmpty()) {
|
||||
for (Entity entity : originalWorldEntities) {
|
||||
TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), getWorld(), focusWorld.provider.getDimension(), true));
|
||||
}
|
||||
}
|
||||
|
||||
if (!focusWorldEntities.isEmpty()) {
|
||||
for (Entity entity : focusWorldEntities) {
|
||||
TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), focusWorld, getWorld().provider.getDimension(), true));
|
||||
}
|
||||
}
|
||||
}
|
||||
// FIXME - Fix cross-dimension teleports causing major desync
|
||||
// } else {
|
||||
// if (!originalWorldEntities.isEmpty()) {
|
||||
// for (Entity entity : originalWorldEntities) {
|
||||
// TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), getWorld(), focusWorld.provider.getDimension(), true));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (!focusWorldEntities.isEmpty()) {
|
||||
// for (Entity entity : focusWorldEntities) {
|
||||
// TeleportQueue.getInstance().addITeleport(new Teleports.TeleportToDim(new BlockPos(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()), entity, focusStack.getTagCompound().getString(Constants.NBT.OWNER_UUID), focusWorld, getWorld().provider.getDimension(), true));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue