use of ValkyrienWarfareBase.Interaction.ShipNameUUIDData in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class DimensionPhysicsChunkManager method removeShipNameRegistry.
public void removeShipNameRegistry(PhysicsWrapperEntity wrapper) {
World shipWorld = wrapper.worldObj;
ShipNameUUIDData data = ShipNameUUIDData.get(shipWorld);
data.removeShipFromRegistry(wrapper);
}
use of ValkyrienWarfareBase.Interaction.ShipNameUUIDData in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class AirshipMapCommand method execute.
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
String term = args[0];
if (term.equals("tpto")) {
String shipName = args[1];
if (args.length > 2) {
for (int i = 2; i < args.length; i++) {
shipName += " " + args[i];
}
}
Entity player = sender.getCommandSenderEntity();
World world = player.worldObj;
ShipNameUUIDData data = ShipNameUUIDData.get(world);
if (data.ShipNameToLongMap.containsKey(shipName)) {
long shipUUIDMostSig = data.ShipNameToLongMap.get(shipName);
ShipUUIDToPosData posData = ShipUUIDToPosData.get(world);
ShipPositionData positionData = posData.getShipPositionData(shipUUIDMostSig);
double posX = positionData.shipPosition.X;
double posY = positionData.shipPosition.Y;
double posZ = positionData.shipPosition.Z;
if (player instanceof EntityPlayerMP) {
EntityPlayerMP playerMP = (EntityPlayerMP) player;
((EntityPlayerMP) player).connection.setPlayerLocation(posX, posY, posZ, 0, 0);
}
}
}
if (term.equals("help")) {
sender.addChatMessage(new TextComponentString("tpto"));
}
}
Aggregations