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
@@ -31,14 +31,14 @@ public class CellInventory implements ICellInventory
static final String ITEM_TYPE_TAG = "it";
static final String ITEM_COUNT_TAG = "ic";
static final String ITEM_SLOT = "#";
static final String ITEM_SLOTCOUNT = "@";
static final String ITEM_SLOT_COUNT = "@";
static final String ITEM_PRE_FORMATTED_COUNT = "PF";
static final String ITEM_PRE_FORMATTED_SLOT = "PF#";
static final String ITEM_PRE_FORMATTED_NAME = "PN";
static final String ITEM_PRE_FORMATTED_FUZZY = "FP";
static protected String[] ITEM_SLOT_ARR;
static protected String[] ITEM_SLOTCOUNT_ARR;
static protected String[] ITEM_SLOT_COUNT_ARR;
final protected NBTTagCompound tagCompound;
protected int MAX_ITEM_TYPES = 63;
@@ -70,7 +70,7 @@ public class CellInventory implements ICellInventory
ItemStack t = ItemStack.loadItemStackFromNBT( tagCompound.getCompoundTag( ITEM_SLOT_ARR[x] ) );
if ( t != null )
{
t.stackSize = tagCompound.getInteger( ITEM_SLOTCOUNT_ARR[x] );
t.stackSize = tagCompound.getInteger( ITEM_SLOT_COUNT_ARR[x] );
if ( t.stackSize > 0 )
{
@@ -106,17 +106,17 @@ public class CellInventory implements ICellInventory
}
/*
* NBTBase tagSlotCount = tagCompound.getTag( ITEM_SLOTCOUNT_ARR[x] ); if ( tagSlotCount instanceof
* NBTBase tagSlotCount = tagCompound.getTag( ITEM_SLOT_COUNT_ARR[x] ); if ( tagSlotCount instanceof
* NBTTagInt ) ((NBTTagInt) tagSlotCount).data = (int) v.getStackSize(); else
*/
tagCompound.setInteger( ITEM_SLOTCOUNT_ARR[x], (int) v.getStackSize() );
tagCompound.setInteger( ITEM_SLOT_COUNT_ARR[x], (int) v.getStackSize() );
x++;
}
// NBTBase tagType = tagCompound.getTag( ITEM_TYPE_TAG );
// NBTBase tagCount = tagCompound.getTag( ITEM_COUNT_TAG );
short oldStoreditems = storedItems;
short oldStoredItems = storedItems;
/*
* if ( tagType instanceof NBTTagShort ) ((NBTTagShort) tagType).data = storedItems = (short) cellItems.size();
@@ -130,10 +130,10 @@ public class CellInventory implements ICellInventory
tagCompound.setInteger( ITEM_COUNT_TAG, storedItemCount = itemCount );
// clean any old crusty stuff...
for (; x < oldStoreditems && x < MAX_ITEM_TYPES; x++)
for (; x < oldStoredItems && x < MAX_ITEM_TYPES; x++)
{
tagCompound.removeTag( ITEM_SLOT_ARR[x] );
tagCompound.removeTag( ITEM_SLOTCOUNT_ARR[x] );
tagCompound.removeTag( ITEM_SLOT_COUNT_ARR[x] );
}
if ( container != null )
@@ -144,12 +144,12 @@ public class CellInventory implements ICellInventory
if ( ITEM_SLOT_ARR == null )
{
ITEM_SLOT_ARR = new String[MAX_ITEM_TYPES];
ITEM_SLOTCOUNT_ARR = new String[MAX_ITEM_TYPES];
ITEM_SLOT_COUNT_ARR = new String[MAX_ITEM_TYPES];
for (int x = 0; x < MAX_ITEM_TYPES; x++)
{
ITEM_SLOT_ARR[x] = ITEM_SLOT + x;
ITEM_SLOTCOUNT_ARR[x] = ITEM_SLOTCOUNT + x;
ITEM_SLOT_COUNT_ARR[x] = ITEM_SLOT_COUNT + x;
}
}
@@ -349,9 +349,9 @@ public class CellInventory implements ICellInventory
return blackList.contains( (input.getItemDamage() << Platform.DEF_OFFSET) | Item.getIdFromItem( input.getItem() ) );
}
private boolean isEmpty(IMEInventory meinv)
private boolean isEmpty(IMEInventory meInventory)
{
return meinv.getAvailableItems( AEApi.instance().storage().createItemList() ).isEmpty();
return meInventory.getAvailableItems( AEApi.instance().storage().createItemList() ).isEmpty();
}
@Override
@@ -369,8 +369,8 @@ public class CellInventory implements ICellInventory
if ( CellInventory.isStorageCell( sharedItemStack ) )
{
IMEInventory meinv = getCell( sharedItemStack, null );
if ( meinv != null && !isEmpty( meinv ) )
IMEInventory meInventory = getCell( sharedItemStack, null );
if ( meInventory != null && !isEmpty( meInventory ) )
return input;
}
@@ -32,8 +32,8 @@ public class CellInventoryHandler extends MEInventoryHandler<IAEItemStack> imple
{
Object o = this.internal;
if ( o instanceof MEPassthru )
o = ((MEPassthru) o).getInternal();
if ( o instanceof MEPassThrough )
o = ((MEPassThrough) o).getInternal();
return (ICellInventory) (o instanceof ICellInventory ? o : null);
}
@@ -31,7 +31,7 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
if ( i instanceof IMEInventoryHandler )
internal = (IMEInventoryHandler<T>) i;
else
internal = new MEPassthru<T>( i, channel );
internal = new MEPassThrough<T>( i, channel );
monitor = internal instanceof IMEMonitor ? (IMEMonitor<T>) internal : null;
}
@@ -15,7 +15,7 @@ import appeng.api.storage.data.IItemList;
import appeng.util.Platform;
import appeng.util.inv.ItemListIgnoreCrafting;
public class MEMonitorPassthu<T extends IAEStack<T>> extends MEPassthru<T> implements IMEMonitor<T>, IMEMonitorHandlerReceiver<T>
public class MEMonitorPassThrough<T extends IAEStack<T>> extends MEPassThrough<T> implements IMEMonitor<T>, IMEMonitorHandlerReceiver<T>
{
HashMap<IMEMonitorHandlerReceiver<T>, Object> listeners = new HashMap();
@@ -23,7 +23,7 @@ public class MEMonitorPassthu<T extends IAEStack<T>> extends MEPassthru<T> imple
public BaseActionSource changeSource;
public MEMonitorPassthu(IMEInventory<T> i, StorageChannel channel) {
public MEMonitorPassThrough(IMEInventory<T> i, StorageChannel channel) {
super( i, channel );
if ( i instanceof IMEMonitor )
monitor = (IMEMonitor<T>) i;
@@ -96,9 +96,9 @@ public class MEMonitorPassthu<T extends IAEStack<T>> extends MEPassthru<T> imple
while (i.hasNext())
{
Entry<IMEMonitorHandlerReceiver<T>, Object> e = i.next();
IMEMonitorHandlerReceiver<T> recv = e.getKey();
if ( recv.isValid( e.getValue() ) )
recv.postChange( this, change, source );
IMEMonitorHandlerReceiver<T> receiver = e.getKey();
if ( receiver.isValid( e.getValue() ) )
receiver.postChange( this, change, source );
else
i.remove();
}
@@ -111,9 +111,9 @@ public class MEMonitorPassthu<T extends IAEStack<T>> extends MEPassthru<T> imple
while (i.hasNext())
{
Entry<IMEMonitorHandlerReceiver<T>, Object> e = i.next();
IMEMonitorHandlerReceiver<T> recv = e.getKey();
if ( recv.isValid( e.getValue() ) )
recv.onListUpdate();
IMEMonitorHandlerReceiver<T> receiver = e.getKey();
if ( receiver.isValid( e.getValue() ) )
receiver.onListUpdate();
else
i.remove();
}
@@ -9,7 +9,7 @@ import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
public class MEPassthru<T extends IAEStack<T>> implements IMEInventoryHandler<T>
public class MEPassThrough<T extends IAEStack<T>> implements IMEInventoryHandler<T>
{
private IMEInventory<T> internal;
@@ -20,7 +20,7 @@ public class MEPassthru<T extends IAEStack<T>> implements IMEInventoryHandler<T>
return internal;
}
public MEPassthru(IMEInventory<T> i, StorageChannel channel) {
public MEPassThrough(IMEInventory<T> i, StorageChannel channel) {
this.channel = channel;
setInternal( i );
}