diff options
author | Technus <daniel112092@gmail.com> | 2016-11-18 00:56:22 +0100 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2016-11-18 00:56:22 +0100 |
commit | 9970cbd6ec0e90652cce2e267586cfcf17a3081a (patch) | |
tree | 99e0c09d687c386805654fc7ebdcd8334dfe036d /src/main/java/gregtech/api/metatileentity/implementations | |
parent | 6c6ad68791002d5a58f07ec44887ed8ecefc5351 (diff) | |
download | GT5-Unofficial-9970cbd6ec0e90652cce2e267586cfcf17a3081a.tar.gz GT5-Unofficial-9970cbd6ec0e90652cce2e267586cfcf17a3081a.tar.bz2 GT5-Unofficial-9970cbd6ec0e90652cce2e267586cfcf17a3081a.zip |
Remove some shit code, change some scanner.
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
2 files changed, 46 insertions, 15 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java index 4484347bd4..dbf5a3e4e3 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java @@ -59,6 +59,28 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { return true; } + //TODO rewrite for intake + //@Override + //public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + // super.onPostTick(aBaseMetaTileEntity, aTick); + // if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork()) { + // IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); + // if (tTileEntity != null) { + // for (boolean temp = true; temp && mFluid != null; ) { + // temp = false; + // FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), Math.max(1, mFluid.amount), false); + // if (tDrained != null) { + // int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); + // if (tFilledAmount > 0) { + // temp = true; + // tTileEntity.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), tFilledAmount, true), true); + // } + // } + // } + // } + // } + //} + @Override public boolean doesFillContainers() { return true; 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 3c3a89e745..fea8516b52 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 @@ -680,11 +680,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public ArrayList<ItemStack> getStoredOutputs() { ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); - for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { - if (isValidMetaTileEntity(tHatch)) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); - } - } + //for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { + // if (isValidMetaTileEntity(tHatch)) { + // rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); + // } + //} for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) { if (isValidMetaTileEntity(tHatch)) { for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { @@ -708,12 +708,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public ArrayList<ItemStack> getStoredInputs() { ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); - for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0)); - } - } + //for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { + // tHatch.mRecipeMap = getRecipeMap(); + // if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) { + // rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0)); + // } + //} for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch)) { @@ -849,17 +849,26 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + return new String[]{ "Progress:", EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", "Stored Energy:", - EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU", + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", "Probably uses: "+ - EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t", + EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t", "Maximum total power (to all Energy Hatches, not single ones): ", - EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t", + EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t * 2A", "Problems: "+ EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+ " Efficiency: "+ |