use of stevekung.mods.moreplanets.client.gui.GuiShieldGenerator in project MorePlanets by SteveKunG.
the class PacketSimpleMP method handleClientSide.
@Override
@SideOnly(Side.CLIENT)
public void handleClientSide(EntityPlayer player) {
BlockPos pos;
switch(this.type) {
case C_ADD_ENTITY_ID:
String entityIDAdd = (String) this.data.get(0);
if (!ClientEventHandler.entityId.contains(entityIDAdd)) {
ClientEventHandler.entityId.add(entityIDAdd);
}
break;
case C_REMOVE_ENTITY_ID:
String entityIDRemove = (String) this.data.get(0);
ClientEventHandler.entityId.remove(entityIDRemove);
break;
case C_REMOVE_GUIDE_POS:
pos = (BlockPos) this.data.get(0);
ClientEventHandler.receiverRenderPos.remove(pos);
break;
case C_RELOAD_RENDERER:
ClientEventHandler.loadRenderers = true;
break;
case C_SWITCH_SHIELD_GENERATOR_GUI:
pos = (BlockPos) this.data.get(0);
boolean isConfig = (boolean) this.data.get(2);
if (pos != null) {
TileEntity tile = player.world.getTileEntity(pos);
if (tile != null && tile instanceof TileEntityShieldGenerator) {
FMLClientHandler.instance().getClient().displayGuiScreen(isConfig ? new GuiShieldGeneratorConfig(player.inventory, (TileEntityShieldGenerator) tile) : new GuiShieldGenerator(player.inventory, (TileEntityShieldGenerator) tile));
}
player.openContainer.windowId = (Integer) this.data.get(1);
}
break;
case C_REMOVE_GENERATOR_GUIDE_POS:
pos = (BlockPos) this.data.get(0);
ClientEventHandler.wasteRenderPos.remove(pos);
break;
default:
break;
}
}
Aggregations