Merge pull request #1174 from Dimach/unstable-3

Added new function to GT scanner
This commit is contained in:
Blood-Asp 2017-09-03 14:43:42 +02:00 committed by GitHub
commit dc2a6073f0

View file

@ -14,6 +14,7 @@ import gregtech.api.interfaces.IProjectileItem;
import gregtech.api.interfaces.tileentity.*;
import gregtech.api.items.GT_EnergyArmor_Item;
import gregtech.api.items.GT_Generic_Item;
import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable;
import gregtech.api.net.GT_Packet_Sound;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.ItemData;
@ -1732,6 +1733,15 @@ public class GT_Utility {
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
}
try {
if (tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable) {
GT_MetaPipeEntity_Cable c = (GT_MetaPipeEntity_Cable) ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
tList.add("Max voltage last second " + c.mTransferredVoltageLast20);
tList.add("Max amperage last second " + c.mTransferredAmperageLast20);
}
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
}
try {
if (tTileEntity instanceof IBasicEnergyContainer && ((IBasicEnergyContainer) tTileEntity).getEUCapacity() > 0) {
tList.add(trans("179","Max IN: ") + ((IBasicEnergyContainer) tTileEntity).getInputVoltage() + trans("180"," EU"));