Scanner 1
This commit is contained in:
parent
1fbd1ac81a
commit
6198b220ee
10 changed files with 97 additions and 47 deletions
|
@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.V;
|
||||
|
||||
|
@ -304,10 +305,11 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier
|
|||
}
|
||||
|
||||
return new String[]{
|
||||
getLocalName(),
|
||||
EnumChatFormatting.BLUE+getLocalName()+EnumChatFormatting.RESET,
|
||||
"Stored Items:",
|
||||
GT_Utility.formatNumbers(mStored) + " EU /",
|
||||
GT_Utility.formatNumbers(mMax) + " EU"};
|
||||
EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(mStored) +EnumChatFormatting.RESET+ " EU /",
|
||||
EnumChatFormatting.RED+GT_Utility.formatNumbers(mMax) +EnumChatFormatting.RESET+ " EU"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
@ -659,13 +660,17 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
|
|||
@Override
|
||||
public String[] getInfoData() {
|
||||
return new String[]{
|
||||
mNEIName,
|
||||
EnumChatFormatting.BLUE + mNEIName + EnumChatFormatting.RESET,
|
||||
"Progress:",
|
||||
(mProgresstime / 20) + " secs",
|
||||
(mMaxProgresstime / 20) + " secs",
|
||||
EnumChatFormatting.GREEN + Integer.toString(mProgresstime) + EnumChatFormatting.RESET +" ticks",
|
||||
EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime) + EnumChatFormatting.RESET +" ticks",
|
||||
"Stored Energy:",
|
||||
getBaseMetaTileEntity().getStoredEU() + "EU",
|
||||
getBaseMetaTileEntity().getEUCapacity() + "EU"};
|
||||
EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU",
|
||||
EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU",
|
||||
"Probably uses:",
|
||||
EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t",
|
||||
EnumChatFormatting.RED + Integer.toString(mEUt==0?0:mAmperage) + EnumChatFormatting.RESET +" A"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -793,7 +794,21 @@ 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:",
|
||||
EnumChatFormatting.GREEN + Integer.toString(mProgresstime) + EnumChatFormatting.RESET +" ticks",
|
||||
EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime) + EnumChatFormatting.RESET +" ticks",
|
||||
"Stored Energy:",
|
||||
EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU",
|
||||
EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU",
|
||||
"Probably uses:",
|
||||
EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t",
|
||||
"Maximum total EU/t (to all Energy Hatches, not single ones)",
|
||||
EnumChatFormatting.RESET+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET,
|
||||
"Efficiency:",
|
||||
EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + "%",
|
||||
"Problems:",
|
||||
""+EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
@ -74,7 +75,13 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
|
|||
}
|
||||
|
||||
public String[] getInfoData() {
|
||||
return new String[]{"Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD};
|
||||
return new String[]{
|
||||
"Coordinates:",
|
||||
"X: "+EnumChatFormatting.GREEN+ this.mTargetX+EnumChatFormatting.RESET,
|
||||
"Y: "+EnumChatFormatting.GREEN+ this.mTargetY+EnumChatFormatting.RESET,
|
||||
"Z: "+EnumChatFormatting.GREEN+ this.mTargetZ+EnumChatFormatting.RESET,
|
||||
"Dimension: " + EnumChatFormatting.YELLOW+this.mTargetD+EnumChatFormatting.RESET
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,6 +31,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
@ -163,7 +164,13 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
|
|||
|
||||
|
||||
public String[] getInfoData() {
|
||||
return new String[]{"Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD};
|
||||
return new String[]{
|
||||
"Coordinates:",
|
||||
"X: "+ EnumChatFormatting.GREEN+ this.mTargetX+EnumChatFormatting.RESET,
|
||||
"Y: "+EnumChatFormatting.GREEN+ this.mTargetY+EnumChatFormatting.RESET,
|
||||
"Z: "+EnumChatFormatting.GREEN+ this.mTargetZ+EnumChatFormatting.RESET,
|
||||
"Dimension: " + EnumChatFormatting.YELLOW+this.mTargetD+EnumChatFormatting.RESET
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,6 +17,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -229,12 +230,12 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
@Override
|
||||
public String[] getInfoData() {
|
||||
return new String[]{
|
||||
"Diesel Engine",
|
||||
"Current Output: "+mEUt+" EU/t",
|
||||
"Fuel Consumption: "+fuelConsumption+"L/t",
|
||||
"Fuel Value: "+fuelValue+" EU/L",
|
||||
"Fuel Remaining: "+fuelRemaining+" Litres",
|
||||
"Current Efficiency: "+(mEfficiency/100)+"%"};
|
||||
EnumChatFormatting.BLUE+"Diesel Engine"+EnumChatFormatting.RESET,
|
||||
"Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t",
|
||||
"Fuel Consumption: "+EnumChatFormatting.YELLOW+fuelConsumption+EnumChatFormatting.RESET+"L/t",
|
||||
"Fuel Value: "+EnumChatFormatting.YELLOW+fuelValue+EnumChatFormatting.RESET+" EU/L",
|
||||
"Fuel Remaining: "+EnumChatFormatting.YELLOW+fuelRemaining+EnumChatFormatting.RESET+" Litres",
|
||||
"Current Efficiency: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.YELLOW+"%"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
|
@ -443,7 +444,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
|
|||
|
||||
@Override
|
||||
public String[] getInfoData() {
|
||||
String tier = tier() == 6 ? "I" : tier() == 7 ? "II" : "III";
|
||||
String tier = tier() == 6 ? EnumChatFormatting.RED+"I"+EnumChatFormatting.RESET : tier() == 7 ? EnumChatFormatting.YELLOW+"II"+EnumChatFormatting.RESET : EnumChatFormatting.GRAY+"III"+EnumChatFormatting.RESET;
|
||||
float plasmaOut = 0;
|
||||
int powerRequired = 0;
|
||||
if (this.mLastRecipe != null) {
|
||||
|
@ -454,10 +455,10 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
|
|||
}
|
||||
|
||||
return new String[]{
|
||||
"Fusion Reactor MK "+tier,
|
||||
"EU Required: "+powerRequired+"EU/t",
|
||||
"Stored EU: "+mEUStore+" / "+maxEUStore(),
|
||||
"Plasma Output: "+plasmaOut+"L/t"};
|
||||
EnumChatFormatting.BLUE+"Fusion Reactor MK "+EnumChatFormatting.RESET+tier,
|
||||
"EU Required: "+EnumChatFormatting.RED+powerRequired+EnumChatFormatting.RESET+"EU/t",
|
||||
"Stored EU: "+EnumChatFormatting.YELLOW+mEUStore+EnumChatFormatting.RESET+" / "+maxEUStore(),
|
||||
"Plasma Output: "+EnumChatFormatting.GREEN+plasmaOut+EnumChatFormatting.RESET+"L/t"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -199,8 +200,12 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M
|
|||
|
||||
@Override
|
||||
public String[] getInfoData() {
|
||||
String tRunning = mMaxProgresstime>0 ? "Turbine running":"Turbine stopped";
|
||||
String tMaintainance = getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" ;
|
||||
String tRunning = mMaxProgresstime>0 ?
|
||||
EnumChatFormatting.GREEN+"Turbine running"+EnumChatFormatting.RESET :
|
||||
EnumChatFormatting.RED+"Turbine stopped"+EnumChatFormatting.RESET;
|
||||
String tMaintainance = getIdealStatus() == getRepairStatus() ?
|
||||
EnumChatFormatting.GREEN+"No Maintainance issues"+EnumChatFormatting.RESET :
|
||||
EnumChatFormatting.RED+"Needs Maintainance"+EnumChatFormatting.RESET ;
|
||||
int tDura = 0;
|
||||
|
||||
if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) {
|
||||
|
@ -208,14 +213,15 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M
|
|||
}
|
||||
|
||||
return new String[]{
|
||||
"Large Turbine",
|
||||
EnumChatFormatting.BLUE+"Large Turbine"+EnumChatFormatting.RESET,
|
||||
tRunning,
|
||||
"Current Output: "+mEUt+" EU/t",
|
||||
"Optimal Flow: "+(int)realOptFlow+" L/t",
|
||||
"Fuel Remaining: "+storedFluid+"L",
|
||||
"Current Speed: "+(mEfficiency/100)+"%",
|
||||
"Turbine Damage: "+tDura+"%",
|
||||
tMaintainance};
|
||||
"Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t",
|
||||
"Optimal Flow: "+EnumChatFormatting.YELLOW+(int)realOptFlow+EnumChatFormatting.RESET+" L/t",
|
||||
"Fuel Remaining: "+EnumChatFormatting.YELLOW+storedFluid+EnumChatFormatting.RESET+"L",
|
||||
"Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%",
|
||||
"Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%",
|
||||
tMaintainance
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMachineBlock {
|
||||
public int mItemCount = 0;
|
||||
|
@ -181,18 +182,20 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
|
|||
|
||||
if (mItemStack == null) {
|
||||
return new String[]{
|
||||
"Quantum Chest",
|
||||
EnumChatFormatting.BLUE + "Quantum Chest"+ EnumChatFormatting.RESET,
|
||||
"Stored Items:",
|
||||
"No Items",
|
||||
Integer.toString(0),
|
||||
Integer.toString(getMaxItemCount())};
|
||||
EnumChatFormatting.YELLOW + "No Items"+ EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.GREEN + "0" + EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.RED + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET
|
||||
};
|
||||
}
|
||||
return new String[]{
|
||||
"Quantum Chest",
|
||||
EnumChatFormatting.BLUE + "Quantum Chest"+ EnumChatFormatting.RESET,
|
||||
"Stored Items:",
|
||||
mItemStack.getDisplayName(),
|
||||
Integer.toString(mItemCount),
|
||||
Integer.toString(getMaxItemCount())};
|
||||
EnumChatFormatting.YELLOW + mItemStack.getDisplayName() + EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.GREEN + Integer.toString(mItemCount) + EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.RED + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,6 +8,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
|
|||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class GT_MetaTileEntity_QuantumTank
|
||||
extends GT_MetaTileEntity_BasicTank {
|
||||
|
@ -101,18 +102,20 @@ public class GT_MetaTileEntity_QuantumTank
|
|||
|
||||
if (mFluid == null) {
|
||||
return new String[]{
|
||||
"Quantum Tank",
|
||||
EnumChatFormatting.BLUE + "Quantum Tank"+ EnumChatFormatting.RESET,
|
||||
"Stored Fluid:",
|
||||
"No Fluid",
|
||||
Integer.toString(0) + "L",
|
||||
Integer.toString(getCapacity()) + "L"};
|
||||
EnumChatFormatting.YELLOW + "No Fluid"+ EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.GREEN + Integer.toString(0) + " L"+ EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.RED + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET
|
||||
};
|
||||
}
|
||||
return new String[]{
|
||||
"Quantum Tank",
|
||||
EnumChatFormatting.BLUE + "Quantum Tank"+ EnumChatFormatting.RESET,
|
||||
"Stored Fluid:",
|
||||
mFluid.getLocalizedName(),
|
||||
Integer.toString(mFluid.amount) + "L",
|
||||
Integer.toString(getCapacity()) + "L"};
|
||||
EnumChatFormatting.YELLOW + mFluid.getLocalizedName()+ EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L"+ EnumChatFormatting.RESET,
|
||||
EnumChatFormatting.RED + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue