Improved readability of variables

Hopefully improved semantics of variables

Fixed typos

Added hyphenations
This commit is contained in:
thatsIch
2014-09-28 11:47:17 +02:00
parent 6b60a0996b
commit 76b147fd5b
220 changed files with 1643 additions and 1662 deletions
@@ -51,13 +51,13 @@ public class AppEngPacketHandlerBase
PACKET_MULTIPART(PacketMultiPart.class),
PACKET_PARTPLACEMENT(PacketPartPlacement.class),
PACKET_PART_PLACEMENT(PacketPartPlacement.class),
PACKET_LIGHTNING(PacketLightning.class),
PACKET_MATTERCANNON(PacketMatterCannon.class),
PACKET_MATTER_CANNON(PacketMatterCannon.class),
PACKET_MOCKEXPLOSION(PacketMockExplosion.class),
PACKET_MOCK_EXPLOSION(PacketMockExplosion.class),
PACKET_VALUE_CONFIG(PacketValueConfig.class),
@@ -128,7 +128,7 @@ public enum GuiBridge implements IGuiHandler
GUI_DRIVE(ContainerDrive.class, TileDrive.class, WORLD, SecurityPermissions.BUILD),
GUI_VIBRATIONCHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null),
GUI_VIBRATION_CHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null),
GUI_CONDENSER(ContainerCondenser.class, TileCondenser.class, WORLD, null),
@@ -140,7 +140,7 @@ public enum GuiBridge implements IGuiHandler
GUI_STORAGEBUS(ContainerStorageBus.class, PartStorageBus.class, WORLD, SecurityPermissions.BUILD),
GUI_FPLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD),
GUI_FORMATION_PLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD),
GUI_PRIORITY(ContainerPriority.class, IPriorityHost.class, WORLD, SecurityPermissions.BUILD),
@@ -151,13 +151,13 @@ public enum GuiBridge implements IGuiHandler
GUI_PATTERN_TERMINAL(ContainerPatternTerm.class, PartPatternTerminal.class, WORLD, SecurityPermissions.CRAFT),
// extends (Container/Gui) + Bus
GUI_LEVELEMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD),
GUI_LEVEL_EMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD),
GUI_SPATIALIOPORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD),
GUI_SPATIAL_IO_PORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD),
GUI_INSCRIBER(ContainerInscriber.class, TileInscriber.class, WORLD, null),
GUI_CELLWORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null),
GUI_CELL_WORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null),
GUI_MAC(ContainerMAC.class, TileMolecularAssembler.class, WORLD, null),
@@ -335,9 +335,9 @@ public enum GuiBridge implements IGuiHandler
{
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
GuiBridge ID = values()[ID_ORDINAL >> 4];
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
boolean stem = ((ID_ORDINAL >> 3) & 1) == 1;
if ( ID.type.isItem() && istem )
if ( ID.type.isItem() && stem )
{
ItemStack it = player.inventory.getCurrentItem();
Object myItem = getGuiObject( it, player, w, x, y, z );
@@ -387,9 +387,9 @@ public enum GuiBridge implements IGuiHandler
{
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
GuiBridge ID = values()[ID_ORDINAL >> 4];
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
boolean stem = ((ID_ORDINAL >> 3) & 1) == 1;
if ( ID.type.isItem() && istem )
if ( ID.type.isItem() && stem )
{
ItemStack it = player.inventory.getCurrentItem();
Object myItem = getGuiObject( it, player, w, x, y, z );
@@ -31,10 +31,10 @@ public class PacketConfigButton extends AppEngPacket
public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
{
EntityPlayerMP sender = (EntityPlayerMP) player;
AEBaseContainer aebc = (AEBaseContainer) sender.openContainer;
if ( aebc.getTarget() instanceof IConfigurableObject )
AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
if ( baseContainer.getTarget() instanceof IConfigurableObject )
{
IConfigManager cm = ((IConfigurableObject) aebc.getTarget()).getConfigManager();
IConfigManager cm = ((IConfigurableObject) baseContainer.getTarget()).getConfigManager();
Enum newState = Platform.rotateEnum( cm.getSetting( option ), rotationDirection, option.getPossibleValues() );
cm.putSetting( option, newState );
}
@@ -41,10 +41,10 @@ public class PacketCraftRequest extends AppEngPacket
if ( player.openContainer instanceof ContainerCraftAmount )
{
ContainerCraftAmount cca = (ContainerCraftAmount) player.openContainer;
Object targ = cca.getTarget();
if ( targ instanceof IGridHost )
Object target = cca.getTarget();
if ( target instanceof IGridHost )
{
IGridHost gh = (IGridHost) targ;
IGridHost gh = (IGridHost) target;
IGridNode gn = gh.getGridNode( ForgeDirection.UNKNOWN );
if ( gn == null )
return;
@@ -46,23 +46,23 @@ public class PacketInventoryAction extends AppEngPacket
EntityPlayerMP sender = (EntityPlayerMP) player;
if ( sender.openContainer instanceof AEBaseContainer )
{
AEBaseContainer aebc = (AEBaseContainer) sender.openContainer;
if ( action == InventoryAction.AUTOCRAFT )
AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
if ( action == InventoryAction.AUTO_CRAFT )
{
ContainerOpenContext context = aebc.openContext;
ContainerOpenContext context = baseContainer.openContext;
if ( context != null )
{
TileEntity te = context.getTile();
Platform.openGUI( sender, te, aebc.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );
Platform.openGUI( sender, te, baseContainer.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );
if ( sender.openContainer instanceof ContainerCraftAmount )
{
ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;
if ( aebc.getTargetStack() != null )
if ( baseContainer.getTargetStack() != null )
{
cca.craftingItem.putStack( aebc.getTargetStack().getItemStack() );
cca.whatToMake = aebc.getTargetStack();
cca.craftingItem.putStack( baseContainer.getTargetStack().getItemStack() );
cca.whatToMake = baseContainer.getTargetStack();
}
cca.detectAndSendChanges();
@@ -71,7 +71,7 @@ public class PacketInventoryAction extends AppEngPacket
}
else
{
aebc.doAction( sender, action, slot, id );
baseContainer.doAction( sender, action, slot, id );
}
}
}
@@ -76,7 +76,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket
gzReader.close();
// int uncompressedBytes = uncompressed.readableBytes();
// AELog.info( "Recv: " + originalBytes + " -> " + uncompressedBytes );
// AELog.info( "Receiver: " + originalBytes + " -> " + uncompressedBytes );
while (uncompressed.readableBytes() > 0)
list.add( AEItemStack.loadItemStackFromPacket( uncompressed ) );
@@ -108,8 +108,8 @@ public class PacketNEIRecipe extends AppEngPacket
if ( is != null )
{
IMEMonitor<IAEItemStack> stor = inv.getItemInventory();
IItemList all = stor.getStorageList();
IMEMonitor<IAEItemStack> storage = inv.getItemInventory();
IItemList all = storage.getStorageList();
IPartitionList<IAEItemStack> filter = ItemViewCell.createFilter( cct.getViewCells() );
for (int x = 0; x < craftMatrix.getSizeInventory(); x++)
@@ -120,15 +120,15 @@ public class PacketNEIRecipe extends AppEngPacket
if ( currentItem != null )
{
ic.setInventorySlotContents( x, currentItem );
ItemStack newis = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null;
ItemStack newItemStack = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null;
ic.setInventorySlotContents( x, PatternItem );
if ( newis == null || !Platform.isSameItemPrecise( newis, is ) )
if ( newItemStack == null || !Platform.isSameItemPrecise( newItemStack, is ) )
{
IAEItemStack in = AEItemStack.create( currentItem );
if ( in != null )
{
IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, stor, in,
IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, storage, in,
cct.getSource() );
if ( out != null )
craftMatrix.setInventorySlotContents( x, out.getItemStack() );
@@ -142,7 +142,7 @@ public class PacketNEIRecipe extends AppEngPacket
if ( PatternItem != null && currentItem == null )
{
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), stor, player.worldObj, r, is, ic,
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), storage, player.worldObj, r, is, ic,
PatternItem, x, all, realForFake, filter );
if ( whichItem == null )
@@ -155,7 +155,7 @@ public class PacketNEIRecipe extends AppEngPacket
if ( filter == null || filter.isListed( request ) )
{
request.setStackSize( 1 );
IAEItemStack out = Platform.poweredExtraction( energy, stor, request, cct.getSource() );
IAEItemStack out = Platform.poweredExtraction( energy, storage, request, cct.getSource() );
if ( out != null )
{
whichItem = out.getItemStack();
@@ -183,11 +183,11 @@ public class PacketNEIRecipe extends AppEngPacket
ByteBuf data = Unpooled.buffer();
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
DataOutputStream datao = new DataOutputStream( bytes );
DataOutputStream outputStream = new DataOutputStream( bytes );
data.writeInt( getPacketID() );
CompressedStreamTools.writeCompressed( recipe, datao );
CompressedStreamTools.writeCompressed( recipe, outputStream );
data.writeBytes( bytes.toByteArray() );
configureWrite( data );
@@ -51,8 +51,8 @@ public class PacketPatternSlot extends AppEngPacket
EntityPlayerMP sender = (EntityPlayerMP) player;
if ( sender.openContainer instanceof ContainerPatternTerm )
{
ContainerPatternTerm aebc = (ContainerPatternTerm) sender.openContainer;
aebc.craftOrGetItem( this );
ContainerPatternTerm patternTerminal = (ContainerPatternTerm) sender.openContainer;
patternTerminal.craftOrGetItem( this );
}
}