From c68814f780c376eb4241717c5b6c81e4efc7a7f7 Mon Sep 17 00:00:00 2001 From: Technus Date: Sun, 17 Apr 2016 13:08:19 +0200 Subject: [PATCH] Adding Multismelter paraller count info to scanner, Adding EBF Heat Capacity to scanner, reformatting rest of scanner msgs to be unified --- .../GT_MetaTileEntity_BasicMachine.java | 3 ++- .../GT_MetaTileEntity_MultiBlockBase.java | 2 +- src/main/java/gregtech/api/util/GT_Utility.java | 1 + .../GT_MetaTileEntity_ElectricBlastFurnace.java | 14 +++++++++++++- .../multi/GT_MetaTileEntity_MultiFurnace.java | 14 +++++++++++++- 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 4ab9ad53..82147c88 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -660,7 +660,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B public String[] getInfoData() { return new String[]{ mNEIName, - "Progress:", (mProgresstime / 20) + " secs", + "Progress:", + (mProgresstime / 20) + " secs", (mMaxProgresstime / 20) + " secs", "Stored Energy:", getBaseMetaTileEntity().getStoredEU() + "EU", diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index ad019bff..6e8e8e1b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -776,7 +776,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { @Override public String[] getInfoData() { - return new String[]{"Progress:", (mProgresstime / 20) + "secs", (mMaxProgresstime / 20) + "secs", "Efficiency:", (mEfficiency / 100.0F) + "%", "Problems:", "" + (getIdealStatus() - getRepairStatus())}; + return new String[]{"Progress:", (mProgresstime / 20) + " secs", (mMaxProgresstime / 20) + " secs", "Efficiency: " + (mEfficiency / 100.0F) + "%", "Problems: " + (getIdealStatus() - getRepairStatus())}; } @Override diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 28b1dbad..32225279 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -11,6 +11,7 @@ import gregtech.api.events.BlockScanningEvent; import gregtech.api.interfaces.IDebugableBlock; import gregtech.api.interfaces.IProjectileItem; import gregtech.api.interfaces.tileentity.*; +import gregtech.api.interfaces.metatileentity.*; import gregtech.api.items.GT_EnergyArmor_Item; import gregtech.api.items.GT_Generic_Item; import gregtech.api.net.GT_Packet_Sound; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index e759e1bd..c0b42977 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -121,7 +121,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace return false; } - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + private boolean checkMachineFunction(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -194,6 +194,12 @@ public class GT_MetaTileEntity_ElectricBlastFurnace return true; } + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){ + boolean result= this.checkMachineFunction(aBaseMetaTileEntity,aStack); + if (!result) this.mHeatingCapacity=0; + return result; + } + public int getMaxEfficiency(ItemStack aStack) { return 10000; } @@ -213,4 +219,10 @@ public class GT_MetaTileEntity_ElectricBlastFurnace public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + + + @Override + public String[] getInfoData() { + return new String[]{"Heating Capacity: " + (this.mHeatingCapacity) + "K", "Progress:", (mProgresstime / 20) + " secs", (mMaxProgresstime / 20) + " secs", "Efficiency: " + (mEfficiency / 100.0F) + "%", "Problems: " + (getIdealStatus() - getRepairStatus())}; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index c5f7d0fc..00ed6f65 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -85,7 +85,7 @@ public class GT_MetaTileEntity_MultiFurnace return false; } - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + private boolean checkMachineFunction(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -148,6 +148,12 @@ public class GT_MetaTileEntity_MultiFurnace return true; } + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){ + boolean result= this.checkMachineFunction(aBaseMetaTileEntity,aStack); + if (!result) this.mLevel=0; + return result; + } + public int getMaxEfficiency(ItemStack aStack) { return 10000; } @@ -167,4 +173,10 @@ public class GT_MetaTileEntity_MultiFurnace public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + + @Override + public String[] getInfoData() { + + return new String[]{"Parallel smelting: " + this.mLevel*8, "Progress:", (mProgresstime / 20) + " secs", (mMaxProgresstime / 20) + " secs", "Efficiency: " + (mEfficiency / 100.0F) + "%", "Problems: " + (getIdealStatus() - getRepairStatus())}; + } }