ship.rotationPitch = (Float) this.data.get(0);
}
}
break;
case S_SET_ENTITY_FIRE:
Entity entity = player.worldObj.getEntityByID((Integer) this.data.get(0));
if (entity instanceof EntityLivingBase)
{
((EntityLivingBase) entity).setFire(3);
}
break;
case S_BIND_SPACE_STATION_ID:
if ((stats.spaceStationDimensionID == -1 || stats.spaceStationDimensionID == 0) && !ConfigManagerCore.disableSpaceStationCreation)
{
WorldUtil.bindSpaceStationToNewDimension(playerBase.worldObj, playerBase);
WorldUtil.getSpaceStationRecipe((Integer) this.data.get(0)).matches(playerBase, true);
}
break;
case S_UNLOCK_NEW_SCHEMATIC:
final Container container = player.openContainer;
if (container instanceof ContainerSchematic)
{
final ContainerSchematic schematicContainer = (ContainerSchematic) container;
ItemStack stack = schematicContainer.craftMatrix.getStackInSlot(0);
if (stack != null)
{
final ISchematicPage page = SchematicRegistry.getMatchingRecipeForItemStack(stack);
if (page != null)
{
SchematicRegistry.unlockNewPage(playerBase, stack);
if (--stack.stackSize <= 0)
{
stack = null;
}
schematicContainer.craftMatrix.setInventorySlotContents(0, stack);
schematicContainer.craftMatrix.markDirty();
GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_ADD_NEW_SCHEMATIC, new Object[] { page.getPageID() }), playerBase);
}
}
}
break;
case S_UPDATE_DISABLEABLE_BUTTON:
final TileEntity tileAt = player.worldObj.getTileEntity((Integer) this.data.get(0), (Integer) this.data.get(1), (Integer) this.data.get(2));
if (tileAt instanceof IDisableableMachine)
{
final IDisableableMachine machine = (IDisableableMachine) tileAt;
machine.setDisabled((Integer) this.data.get(3), !machine.getDisabled((Integer) this.data.get(3)));
}
break;
case S_ON_FAILED_CHEST_UNLOCK:
if (stats.chatCooldown == 0)
{
player.addChatMessage(new ChatComponentText(GCCoreUtil.translateWithFormat("gui.chest.warning.wrongkey", this.data.get(0))));
stats.chatCooldown = 100;
}
break;
case S_RENAME_SPACE_STATION:
final SpaceStationWorldData ssdata = SpaceStationWorldData.getStationData(playerBase.worldObj, (Integer) this.data.get(1), playerBase);
if (ssdata != null && ssdata.getOwner().equalsIgnoreCase(player.getGameProfile().getName()))
{
ssdata.setSpaceStationName((String) this.data.get(0));
ssdata.setDirty(true);
}
break;
case S_OPEN_EXTENDED_INVENTORY:
player.openGui(GalacticraftCore.instance, GuiIdsCore.EXTENDED_INVENTORY, player.worldObj, 0, 0, 0);
break;
case S_ON_ADVANCED_GUI_CLICKED_INT:
TileEntity tile1 = player.worldObj.getTileEntity((Integer) this.data.get(1), (Integer) this.data.get(2), (Integer) this.data.get(3));
switch ((Integer) this.data.get(0))
{
case 0:
if (tile1 instanceof TileEntityAirLockController)
{
TileEntityAirLockController airlockController = (TileEntityAirLockController) tile1;
airlockController.redstoneActivation = (Integer) this.data.get(4) == 1;
}
break;
case 1:
if (tile1 instanceof TileEntityAirLockController)
{
TileEntityAirLockController airlockController = (TileEntityAirLockController) tile1;
airlockController.playerDistanceActivation = (Integer) this.data.get(4) == 1;
}
break;
case 2:
if (tile1 instanceof TileEntityAirLockController)
{
TileEntityAirLockController airlockController = (TileEntityAirLockController) tile1;
airlockController.playerDistanceSelection = (Integer) this.data.get(4);
}
break;
case 3:
if (tile1 instanceof TileEntityAirLockController)
{
TileEntityAirLockController airlockController = (TileEntityAirLockController) tile1;
airlockController.playerNameMatches = (Integer) this.data.get(4) == 1;
}
break;
case 4:
if (tile1 instanceof TileEntityAirLockController)
{
TileEntityAirLockController airlockController = (TileEntityAirLockController) tile1;
airlockController.invertSelection = (Integer) this.data.get(4) == 1;
}
break;
case 5:
if (tile1 instanceof TileEntityAirLockController)
{
TileEntityAirLockController airlockController = (TileEntityAirLockController) tile1;
airlockController.lastHorizontalModeEnabled = airlockController.horizontalModeEnabled;
airlockController.horizontalModeEnabled = (Integer) this.data.get(4) == 1;
}
break;
case 6:
if (tile1 instanceof IBubbleProvider)
{
IBubbleProvider distributor = (IBubbleProvider) tile1;
distributor.setBubbleVisible((Integer) this.data.get(4) == 1);
}
break;
default:
break;
}
break;
case S_ON_ADVANCED_GUI_CLICKED_STRING:
TileEntity tile2 = player.worldObj.getTileEntity((Integer) this.data.get(1), (Integer) this.data.get(2), (Integer) this.data.get(3));
switch ((Integer) this.data.get(0))
{
case 0:
if (tile2 instanceof TileEntityAirLockController)
{
TileEntityAirLockController airlockController = (TileEntityAirLockController) tile2;
airlockController.playerToOpenFor = (String) this.data.get(4);
}
break;
default:
break;
}
break;
case S_UPDATE_SHIP_MOTION_Y:
int entityID = (Integer) this.data.get(0);
boolean up = (Boolean) this.data.get(1);
Entity entity2 = player.worldObj.getEntityByID(entityID);
if (entity2 instanceof EntityAutoRocket)
{
EntityAutoRocket autoRocket = (EntityAutoRocket) entity2;
autoRocket.motionY += up ? 0.02F : -0.02F;