diff --git a/items/storage/ItemBasicStorageCell.java b/items/storage/ItemBasicStorageCell.java index c2802508..73d630d6 100644 --- a/items/storage/ItemBasicStorageCell.java +++ b/items/storage/ItemBasicStorageCell.java @@ -72,8 +72,8 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv(); if ( cd != null ) { - l.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() ); - l.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); + l.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() ); + l.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); /* * if ( cd.isPreformatted() ) { String List = StatCollector.translateToLocal( cd.getListMode() == * ListMode.WHITELIST ? "AppEng.Gui.Whitelisted" : "AppEng.Gui.Blacklisted" ); if ( diff --git a/items/tools/powered/ToolMassCannon.java b/items/tools/powered/ToolMassCannon.java index f3b3ab6d..d2c06514 100644 --- a/items/tools/powered/ToolMassCannon.java +++ b/items/tools/powered/ToolMassCannon.java @@ -73,8 +73,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv(); if ( cd != null ) { - lines.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() ); - lines.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); + lines.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() ); + lines.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); } } } diff --git a/items/tools/powered/ToolPortableCell.java b/items/tools/powered/ToolPortableCell.java index ce529bfd..659ddeee 100644 --- a/items/tools/powered/ToolPortableCell.java +++ b/items/tools/powered/ToolPortableCell.java @@ -58,8 +58,8 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv(); if ( cd != null ) { - lines.add( cd.usedBytes() + " " + GuiText.Of.getLocal() + " " + cd.totalBytes() + " " + GuiText.BytesUsed.getLocal() ); - lines.add( cd.storedItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); + lines.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() ); + lines.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); } } } diff --git a/me/storage/CellInventory.java b/me/storage/CellInventory.java index d7727f51..c11edd8b 100644 --- a/me/storage/CellInventory.java +++ b/me/storage/CellInventory.java @@ -59,7 +59,7 @@ public class CellInventory implements ICellInventory cellItems.resetStatus(); // clears totals and stuff. - int types = (int) storedItemTypes(); + int types = (int) getStoredItemTypes(); for (int x = 0; x < types; x++) { @@ -194,7 +194,7 @@ public class CellInventory implements ICellInventory } @Override - public int BytesPerType() + public int getBytesPerType() { return CellType.BytePerType( i ); } @@ -202,8 +202,8 @@ public class CellInventory implements ICellInventory @Override public boolean canHoldNewItem() { - long bytesFree = freeBytes(); - return (bytesFree > BytesPerType() || (bytesFree == BytesPerType() && unusedItemCount() > 0)) && remainingItemTypes() > 0; + long bytesFree = getFreeBytes(); + return (bytesFree > getBytesPerType() || (bytesFree == getBytesPerType() && getUnusedItemCount() > 0)) && getRemainingItemTypes() > 0; } public static IMEInventoryHandler getCell(ItemStack o) @@ -258,22 +258,22 @@ public class CellInventory implements ICellInventory } @Override - public long totalBytes() + public long getTotalBytes() { return CellType.getBytes( i ); } @Override - public long freeBytes() + public long getFreeBytes() { - return totalBytes() - usedBytes(); + return getTotalBytes() - getUsedBytes(); } @Override - public long usedBytes() + public long getUsedBytes() { - long bytesForItemCount = (storedItemCount() + unusedItemCount()) / 8; - return storedItemTypes() * BytesPerType() + bytesForItemCount; + long bytesForItemCount = (getStoredItemCount() + getUnusedItemCount()) / 8; + return getStoredItemTypes() * getBytesPerType() + bytesForItemCount; } @Override @@ -283,13 +283,13 @@ public class CellInventory implements ICellInventory } @Override - public long storedItemTypes() + public long getStoredItemTypes() { return storedItems; } @Override - public long storedItemCount() + public long getStoredItemCount() { return storedItemCount; } @@ -300,24 +300,24 @@ public class CellInventory implements ICellInventory } @Override - public long remainingItemTypes() + public long getRemainingItemTypes() { - long basedOnStorage = freeBytes() / BytesPerType(); - long baseOnTotal = getTotalItemTypes() - storedItemTypes(); + long basedOnStorage = getFreeBytes() / getBytesPerType(); + long baseOnTotal = getTotalItemTypes() - getStoredItemTypes(); return basedOnStorage > baseOnTotal ? baseOnTotal : basedOnStorage; } @Override - public long remainingItemCount() + public long getRemainingItemCount() { - long remaining = freeBytes() * 8 + unusedItemCount(); + long remaining = getFreeBytes() * 8 + getUnusedItemCount(); return remaining > 0 ? remaining : 0; } @Override - public int unusedItemCount() + public int getUnusedItemCount() { - int div = (int) (storedItemCount() % 8); + int div = (int) (getStoredItemCount() % 8); if ( div == 0 ) { @@ -369,7 +369,7 @@ public class CellInventory implements ICellInventory IAEItemStack l = getCellItems().findPrecise( input ); if ( l != null ) { - long remainingItemSlots = remainingItemCount(); + long remainingItemSlots = getRemainingItemCount(); if ( remainingItemSlots < 0 ) return input; @@ -399,7 +399,7 @@ public class CellInventory implements ICellInventory 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 ( input.getStackSize() > remainingItemCount ) @@ -518,7 +518,7 @@ public class CellInventory implements ICellInventory { if ( canHoldNewItem() ) return 1; - if ( remainingItemCount() > 0 ) + if ( getRemainingItemCount() > 0 ) return 2; return 3; }