This commit is contained in:
AlgorithmX2
2014-03-29 03:55:11 -05:00
4 changed files with 28 additions and 28 deletions
+2 -2
View File
@@ -72,8 +72,8 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv(); ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv();
if ( cd != null ) if ( cd != null )
{ {
l.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() ); l.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() );
l.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); l.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
/* /*
* if ( cd.isPreformatted() ) { String List = StatCollector.translateToLocal( cd.getListMode() == * if ( cd.isPreformatted() ) { String List = StatCollector.translateToLocal( cd.getListMode() ==
* ListMode.WHITELIST ? "AppEng.Gui.Whitelisted" : "AppEng.Gui.Blacklisted" ); if ( * ListMode.WHITELIST ? "AppEng.Gui.Whitelisted" : "AppEng.Gui.Blacklisted" ); if (
+2 -2
View File
@@ -73,8 +73,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv(); ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv();
if ( cd != null ) if ( cd != null )
{ {
lines.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() ); lines.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() );
lines.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); lines.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
} }
} }
} }
+2 -2
View File
@@ -58,8 +58,8 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv(); ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv();
if ( cd != null ) if ( cd != null )
{ {
lines.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() ); lines.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() );
lines.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); lines.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() );
} }
} }
} }
+22 -22
View File
@@ -59,7 +59,7 @@ public class CellInventory implements ICellInventory
cellItems.resetStatus(); // clears totals and stuff. cellItems.resetStatus(); // clears totals and stuff.
int types = (int) storedItemTypes(); int types = (int) getStoredItemTypes();
for (int x = 0; x < types; x++) for (int x = 0; x < types; x++)
{ {
@@ -194,7 +194,7 @@ public class CellInventory implements ICellInventory
} }
@Override @Override
public int BytesPerType() public int getBytesPerType()
{ {
return CellType.BytePerType( i ); return CellType.BytePerType( i );
} }
@@ -202,8 +202,8 @@ public class CellInventory implements ICellInventory
@Override @Override
public boolean canHoldNewItem() public boolean canHoldNewItem()
{ {
long bytesFree = freeBytes(); long bytesFree = getFreeBytes();
return (bytesFree > BytesPerType() || (bytesFree == BytesPerType() && unusedItemCount() > 0)) && remainingItemTypes() > 0; return (bytesFree > getBytesPerType() || (bytesFree == getBytesPerType() && getUnusedItemCount() > 0)) && getRemainingItemTypes() > 0;
} }
public static IMEInventoryHandler getCell(ItemStack o) public static IMEInventoryHandler getCell(ItemStack o)
@@ -258,22 +258,22 @@ public class CellInventory implements ICellInventory
} }
@Override @Override
public long totalBytes() public long getTotalBytes()
{ {
return CellType.getBytes( i ); return CellType.getBytes( i );
} }
@Override @Override
public long freeBytes() public long getFreeBytes()
{ {
return totalBytes() - usedBytes(); return getTotalBytes() - getUsedBytes();
} }
@Override @Override
public long usedBytes() public long getUsedBytes()
{ {
long bytesForItemCount = (storedItemCount() + unusedItemCount()) / 8; long bytesForItemCount = (getStoredItemCount() + getUnusedItemCount()) / 8;
return storedItemTypes() * BytesPerType() + bytesForItemCount; return getStoredItemTypes() * getBytesPerType() + bytesForItemCount;
} }
@Override @Override
@@ -283,13 +283,13 @@ public class CellInventory implements ICellInventory
} }
@Override @Override
public long storedItemTypes() public long getStoredItemTypes()
{ {
return storedItems; return storedItems;
} }
@Override @Override
public long storedItemCount() public long getStoredItemCount()
{ {
return storedItemCount; return storedItemCount;
} }
@@ -300,24 +300,24 @@ public class CellInventory implements ICellInventory
} }
@Override @Override
public long remainingItemTypes() public long getRemainingItemTypes()
{ {
long basedOnStorage = freeBytes() / BytesPerType(); long basedOnStorage = getFreeBytes() / getBytesPerType();
long baseOnTotal = getTotalItemTypes() - storedItemTypes(); long baseOnTotal = getTotalItemTypes() - getStoredItemTypes();
return basedOnStorage > baseOnTotal ? baseOnTotal : basedOnStorage; return basedOnStorage > baseOnTotal ? baseOnTotal : basedOnStorage;
} }
@Override @Override
public long remainingItemCount() public long getRemainingItemCount()
{ {
long remaining = freeBytes() * 8 + unusedItemCount(); long remaining = getFreeBytes() * 8 + getUnusedItemCount();
return remaining > 0 ? remaining : 0; return remaining > 0 ? remaining : 0;
} }
@Override @Override
public int unusedItemCount() public int getUnusedItemCount()
{ {
int div = (int) (storedItemCount() % 8); int div = (int) (getStoredItemCount() % 8);
if ( div == 0 ) if ( div == 0 )
{ {
@@ -369,7 +369,7 @@ public class CellInventory implements ICellInventory
IAEItemStack l = getCellItems().findPrecise( input ); IAEItemStack l = getCellItems().findPrecise( input );
if ( l != null ) if ( l != null )
{ {
long remainingItemSlots = remainingItemCount(); long remainingItemSlots = getRemainingItemCount();
if ( remainingItemSlots < 0 ) if ( remainingItemSlots < 0 )
return input; return input;
@@ -399,7 +399,7 @@ public class CellInventory implements ICellInventory
if ( canHoldNewItem() ) // room for new type, and for at least one item! if ( canHoldNewItem() ) // room for new type, and for at least one item!
{ {
int remainingItemCount = (int) remainingItemCount() - BytesPerType() * 8; int remainingItemCount = (int) getRemainingItemCount() - getBytesPerType() * 8;
if ( remainingItemCount > 0 ) if ( remainingItemCount > 0 )
{ {
if ( input.getStackSize() > remainingItemCount ) if ( input.getStackSize() > remainingItemCount )
@@ -518,7 +518,7 @@ public class CellInventory implements ICellInventory
{ {
if ( canHoldNewItem() ) if ( canHoldNewItem() )
return 1; return 1;
if ( remainingItemCount() > 0 ) if ( getRemainingItemCount() > 0 )
return 2; return 2;
return 3; return 3;
} }