use of com.eriksonn.createaeronautics.contraptions.AirshipContraptionEntity in project Create_Aeronautics by Eriksonnaren.
the class ClientPacketHandler method handlePacket.
public static void handlePacket(AirshipUpdateSubcontraptionPacket msg, Supplier<NetworkEvent.Context> ctx) {
Map<Integer, AirshipContraptionEntity> allAirships = AirshipManager.INSTANCE.AllClientAirships;
if (allAirships.containsKey(msg.plotID)) {
AirshipContraptionEntity airship = allAirships.get(msg.plotID);
airship.updateSubcontraptionClient(msg.uuid, msg.nbt);
}
}
use of com.eriksonn.createaeronautics.contraptions.AirshipContraptionEntity in project Create_Aeronautics by Eriksonnaren.
the class ClientPacketHandler method handlePacket.
public static void handlePacket(AirshipBEUpdatePacket msg, Supplier<NetworkEvent.Context> ctx) {
Map<Integer, AirshipContraptionEntity> allAirships = AirshipManager.INSTANCE.AllClientAirships;
if (allAirships.containsKey(msg.airshipID)) {
AirshipContraptionEntity airship = allAirships.get(msg.airshipID);
TileEntity tileEntity = airship.fakeClientWorld.getBlockEntity(msg.pos);
if (tileEntity == null)
return;
tileEntity.handleUpdateTag(airship.fakeClientWorld.getBlockState(msg.pos), msg.nbt);
tileEntity.onDataPacket(ctx.get().getNetworkManager(), new SUpdateTileEntityPacket(msg.pos, msg.type, msg.nbt));
tileEntity.setLevelAndPosition(airship.fakeClientWorld, msg.pos);
}
}
use of com.eriksonn.createaeronautics.contraptions.AirshipContraptionEntity in project Create_Aeronautics by Eriksonnaren.
the class ClientPacketHandler method handlePacket.
public static void handlePacket(AirshipContraptionBlockUpdatePacket msg, Supplier<NetworkEvent.Context> ctx) {
Map<Integer, AirshipContraptionEntity> allAirships = AirshipManager.INSTANCE.AllClientAirships;
AirshipContraptionBlockUpdateInfo info = msg.getInfo();
if (allAirships.containsKey(info.airshipID)) {
AirshipContraptionEntity airship = allAirships.get(info.airshipID);
airship.handle(info);
}
}
use of com.eriksonn.createaeronautics.contraptions.AirshipContraptionEntity in project Create_Aeronautics by Eriksonnaren.
the class ClientPacketHandler method handlePacket.
public static void handlePacket(AirshipDestroySubcontraptionPacket msg, Supplier<NetworkEvent.Context> ctx) {
Map<Integer, AirshipContraptionEntity> allAirships = AirshipManager.INSTANCE.AllClientAirships;
if (allAirships.containsKey(msg.plotID)) {
AirshipContraptionEntity airship = allAirships.get(msg.plotID);
airship.destroySubcontraptionClient(msg.uuid);
}
}
Aggregations