mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-17 19:05:29 +00:00
add contents display on cells and fix pattern terminal encode overflow
This commit is contained in:
1 parent
a805df0e9e
commit
c087930016
8 files changed
+35
-1
No files matched your search
@@ -17,6 +17,7 @@ import appeng.items.contents.CellConfig;
|
||||
import appeng.items.contents.CellUpgrades;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.common.storage.CellType;
|
||||
@@ -52,8 +53,10 @@ public class ItemBasicFluidStorageCell extends AEBaseItem implements IStorageFlu
|
||||
private final int totalBytes;
|
||||
private final int perType;
|
||||
private final double idleDrain;
|
||||
private final ReadableNumberConverter format = ReadableNumberConverter.INSTANCE;
|
||||
private final static HashMap<Integer, IIcon> icon = new HashMap<>();
|
||||
|
||||
@SuppressWarnings("Guava")
|
||||
public ItemBasicFluidStorageCell( final CellType whichCell, final int kilobytes )
|
||||
{
|
||||
super( Optional.of( kilobytes + "k" ) );
|
||||
@@ -137,6 +140,17 @@ public class ItemBasicFluidStorageCell extends AEBaseItem implements IStorageFlu
|
||||
|
||||
lines.add( cellInventory.getStoredFluidTypes() + " " + GuiText.Of.getLocal() + ' ' + cellInventory.getTotalFluidTypes() + ' ' + GuiText.Types.getLocal() );
|
||||
|
||||
if (GuiScreen.isShiftKeyDown()) {
|
||||
if (cellInventory.getStoredFluidTypes() > 0) {
|
||||
lines.add(StatCollector.translateToLocal(NameConst.TT_CELL_CONTENTS));
|
||||
for (IAEFluidStack fluid : cellInventory.getContents()) {
|
||||
if (fluid != null) {
|
||||
lines.add(String.format(" %s x%smB", fluid.getFluidStack().getLocalizedName(), format.toWideReadableForm(fluid.getStackSize())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( handler.isPreformatted() )
|
||||
{
|
||||
final String list = (handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included : GuiText.Excluded).getLocal();
|
||||
|
||||
Reference in new issue
Block a user