use of micdoodle8.mods.galacticraft.planets.mars.client.gui.GuiSlimelingInventory in project Galacticraft by micdoodle8.
the class PacketSimpleMars method handleClientSide.
@SideOnly(Side.CLIENT)
@Override
public void handleClientSide(EntityPlayer player) {
EntityPlayerSP playerBaseClient = null;
if (player instanceof EntityPlayerSP) {
playerBaseClient = (EntityPlayerSP) player;
}
switch(this.type) {
case C_OPEN_CUSTOM_GUI:
int entityID = 0;
Entity entity = null;
switch((Integer) this.data.get(1)) {
case 0:
entityID = (Integer) this.data.get(2);
entity = player.worldObj.getEntityByID(entityID);
if (entity != null && entity instanceof EntitySlimeling) {
FMLClientHandler.instance().getClient().displayGuiScreen(new GuiSlimelingInventory(player, (EntitySlimeling) entity));
}
player.openContainer.windowId = (Integer) this.data.get(0);
break;
case 1:
entityID = (Integer) this.data.get(2);
entity = player.worldObj.getEntityByID(entityID);
if (entity != null && entity instanceof EntityCargoRocket) {
FMLClientHandler.instance().getClient().displayGuiScreen(new GuiCargoRocket(player.inventory, (EntityCargoRocket) entity));
}
player.openContainer.windowId = (Integer) this.data.get(0);
break;
}
break;
case C_OPEN_CUSTOM_GUI_TILE:
BlockPos pos;
TileEntity tile;
switch((Integer) this.data.get(1)) {
case 0:
pos = (BlockPos) this.data.get(2);
tile = player.worldObj.getTileEntity(pos);
if (tile != null && tile instanceof TileEntityLaunchController) {
FMLClientHandler.instance().getClient().displayGuiScreen(new GuiLaunchControllerAdvanced(player.inventory, (TileEntityLaunchController) tile));
}
player.openContainer.windowId = (Integer) this.data.get(0);
break;
}
break;
case C_BEGIN_CRYOGENIC_SLEEP:
pos = (BlockPos) this.data.get(0);
tile = player.worldObj.getTileEntity(pos);
if (tile instanceof TileEntityCryogenicChamber) {
((TileEntityCryogenicChamber) tile).sleepInBedAt(player, pos.getX(), pos.getY(), pos.getZ());
}
default:
break;
}
}
Aggregations