Merge pull request #8 from GTNewHorizons/Scanner-Update

Adding Multismelter paraller count info to scanner,
This commit is contained in:
Technus 2016-04-17 13:11:16 +02:00
commit 97cadb1a53
5 changed files with 30 additions and 4 deletions

View file

@ -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",

View file

@ -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

View file

@ -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;

View file

@ -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())};
}
}

View file

@ -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())};
}
}