From 5715a32d2901922503fd850f3a68503fb77467c3 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Wed, 20 Dec 2017 23:39:49 +1000 Subject: - Disabled some logging. % Minor Project Clean-up, added missing Override annotations to 100+ methods & removed pointless casts. % Moved Logging to it's own class. $ Fixed Multi-block handling of Pollution. $ Fixed the GT 5.09 material enabler system. (From My Side, it's still borked on GTs). + Added a Dynamic Proxy invocation for IMaterialHandler. + Added an AutoMap data type, which is a Auto-incremental ID'd Hashmap wrapper. --- .../basic/GT_MetaTileEntity_WorldAccelerator.java | 14 +-- .../GregtechMetaAtmosphericReconditioner.java | 28 ++--- .../basic/GregtechMetaPollutionCreator.java | 3 +- .../basic/GregtechMetaPollutionDetector.java | 4 +- ...regtechMetaTileEntity_CompactFusionReactor.java | 61 +++++---- .../machines/multi/GT4Entity_AutoCrafter.java | 18 +-- .../machines/multi/GT4Entity_ThermalBoiler.java | 4 +- .../machines/multi/GregtechMTE_NuclearReactor.java | 96 +++++++------- .../multi/GregtechMetaTileEntityAnimalFarm.java | 60 ++++----- .../GregtechMetaTileEntityGeneratorArray.java | 41 +++--- .../multi/GregtechMetaTileEntityTreeFarm.java | 139 ++++++++++----------- .../GregtechMetaTileEntity_AlloyBlastSmelter.java | 6 +- .../GregtechMetaTileEntity_CatalyticReactor.java | 54 ++++---- .../multi/GregtechMetaTileEntity_Cyclotron.java | 26 ++-- ...regtechMetaTileEntity_IndustrialCentrifuge.java | 38 +++--- .../GregtechMetaTileEntity_IndustrialCokeOven.java | 14 +-- ...echMetaTileEntity_IndustrialCuttingMachine.java | 20 +-- ...gtechMetaTileEntity_IndustrialElectrolyzer.java | 4 +- ...GregtechMetaTileEntity_IndustrialMacerator.java | 22 ++-- ...regtechMetaTileEntity_IndustrialPlatePress.java | 4 +- .../GregtechMetaTileEntity_IndustrialSifter.java | 82 ++++++------ .../GregtechMetaTileEntity_IndustrialSinter.java | 22 ++-- ...MetaTileEntity_IndustrialThermalCentrifuge.java | 34 ++--- ...GregtechMetaTileEntity_IndustrialWashPlant.java | 32 ++--- .../GregtechMetaTileEntity_IndustrialWireMill.java | 22 ++-- .../GregtechMetaTileEntity_MassFabricator.java | 56 ++++----- .../multi/GregtechMetaTileEntity_MultiTank.java | 73 ++++++----- ...chMetaTileEntity_PowerSubStationController.java | 79 ++++++------ .../multi/GregtechMetaTileEntity_Refinery.java | 52 ++++---- 29 files changed, 557 insertions(+), 551 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java index e0f94036a7..da3b8aa551 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java @@ -13,8 +13,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.api.objects.GT_RenderedTexture; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.player.PlayerUtils; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; @@ -213,8 +213,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered } } } catch (Exception e) { - Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash"); - Utils.LOG_ERROR(e.getMessage()); + Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash"); + Logger.ERROR(e.getMessage()); } } @@ -236,8 +236,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered } } } catch (Exception e) { - Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash"); - Utils.LOG_ERROR(e.getMessage()); + Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash"); + Logger.ERROR(e.getMessage()); } } @@ -316,8 +316,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered tBlock.updateTick(pWorld, pX, pY, pZ, pRnd); } } catch (Exception e) { - Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash"); - Utils.LOG_ERROR(e.getMessage()); + Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash"); + Logger.ERROR(e.getMessage()); } } } \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java index 69892ea995..b99ce19031 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java @@ -12,10 +12,10 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.general.ItemAirFilter; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.PollutionUtils; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.gui.basic.CONTAINER_PollutionCleaner; import gtPlusPlus.xmod.gregtech.api.gui.basic.GUI_PollutionCleaner; @@ -158,7 +158,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi //Use a Turbine if(hasRotor(stackRotor) && hasAirFilter(stackFilter)){ - Utils.LOG_WARNING("Found Turbine."); + Logger.WARNING("Found Turbine."); mBaseEff = (int) ((50.0F + (10.0F * ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolCombatDamage(stackRotor))) * 100); mOptimalAirFlow = (int) Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolStats(stackRotor).getSpeedMultiplier() * GT_MetaGenerated_Tool.getPrimaryMaterial(stackRotor).mToolSpeed * 50); @@ -168,8 +168,8 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi //Utils.LOG_WARNING("Pollution Cleaner [5]"); //Log Debug information. - Utils.LOG_WARNING("mBaseEff[1]:"+mBaseEff); - Utils.LOG_WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow); + Logger.WARNING("mBaseEff[1]:"+mBaseEff); + Logger.WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow); //Calculate The Voltage we are running long tVoltage = maxEUInput(); @@ -182,7 +182,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi //If no sides are free, how will you process the atmosphere? if (mAirSides > 0){ mPollutionReduction += (((mTier*2)*100)*mAirSides); //Was originally *100 - Utils.LOG_WARNING("mPollutionReduction[1]:"+mPollutionReduction); + Logger.WARNING("mPollutionReduction[1]:"+mPollutionReduction); //I stole this code mPollutionReduction = (MathUtils.safeInt((long)mPollutionReduction*this.mBaseEff)/100000)*mAirSides; @@ -193,7 +193,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi //Set a temp to remove variable to aleviate duplicate code. int toRemove = 0; - Utils.LOG_WARNING("mCurrentPollution[4]:"+mCurrentPollution); + Logger.WARNING("mCurrentPollution[4]:"+mCurrentPollution); if (mPollutionReduction <= mCurrentPollution){ //Clean some Air. toRemove = mPollutionReduction; @@ -207,10 +207,10 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi if (toRemove > 0){ if (damageTurbineRotor() && damageAirFilter()){ removePollution(toRemove); - Utils.LOG_WARNING("mNewPollution[4]:"+getCurrentChunkPollution()); + Logger.WARNING("mNewPollution[4]:"+getCurrentChunkPollution()); } else { - Utils.LOG_WARNING("Could not damage turbine rotor or Air Filter."); + Logger.WARNING("Could not damage turbine rotor or Air Filter."); aBaseMetaTileEntity.setActive(false); } } //End of pollution removal block. @@ -271,16 +271,16 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi } } - Utils.LOG_WARNING("Trying to do "+damageValue+" damage to the rotor."); + Logger.WARNING("Trying to do "+damageValue+" damage to the rotor."); //Damage Rotor //int rotorDurability = this.mInventory[this.SLOT_ROTOR].getItemDamage(); long rotorDamage = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); long rotorDurabilityMax = GT_MetaGenerated_Tool.getToolMaxDamage(this.mInventory[this.SLOT_ROTOR]); long rotorDurability = (rotorDurabilityMax - rotorDamage); - Utils.LOG_WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability); + Logger.WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability); if (rotorDurability > damageValue){ - Utils.LOG_WARNING("Damaging Rotor."); + Logger.WARNING("Damaging Rotor."); GT_ModHandler.damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue, 0, null); long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); @@ -293,14 +293,14 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi } if (rotorDurability <= 0) { - Utils.LOG_WARNING("Destroying Rotor."); + Logger.WARNING("Destroying Rotor."); this.mInventory[this.SLOT_ROTOR] = null; return false; } }else { - Utils.LOG_WARNING("Bad Rotor."); + Logger.WARNING("Bad Rotor."); return false; } } @@ -369,7 +369,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi else { //Do Damage ItemAirFilter.setFilterDamage(filter, currentUse+1); - Utils.LOG_WARNING("Filter Damage: "+currentUse); + Logger.WARNING("Filter Damage: "+currentUse); return true; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java index 77f139ccd8..d6286fb409 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java @@ -6,6 +6,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.PollutionUtils; import gtPlusPlus.core.util.Utils; @@ -394,7 +395,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity { else { returnValue = getCurrentChunkPollution(); } - Utils.LOG_INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); + Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); return returnValue; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java index 677f0342a1..53c66a0425 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java @@ -6,6 +6,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.PollutionUtils; import gtPlusPlus.core.util.Utils; @@ -404,7 +405,7 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity { else { returnValue = getCurrentChunkPollution(); } - Utils.LOG_INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); + Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); return returnValue; } @@ -434,6 +435,7 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity { super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); } + @Override public boolean allowGeneralRedstoneOutput() { if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){ this.markDirty(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java index dc28b6b761..f739e73c26 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java @@ -9,11 +9,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.Recipe_GT; +import gregtech.api.util.*; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; @@ -147,16 +145,16 @@ GT_MetaTileEntity_DeluxeMachine { long mFusionPoint = 20000000L; @Override public int checkRecipe() { - Utils.LOG_WARNING("Recipe Tick 1."); + Logger.WARNING("Recipe Tick 1."); if (!this.mCanProcessRecipe) { - Utils.LOG_WARNING("Recipe Tick 1.1 - Cannot Process Recipe."); + Logger.WARNING("Recipe Tick 1.1 - Cannot Process Recipe."); if (this.mChargeConsumed < mFusionPoint) { - Utils.LOG_WARNING("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); + Logger.WARNING("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); this.mCharging = true; this.mCanProcessRecipe = false; if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits( (mFusionPoint / 100), false)) { - Utils.LOG_WARNING("Recipe Tick 1.3 - Charging Internal storage. "+(mFusionPoint / 100)+"/"+mFusionPoint); + Logger.WARNING("Recipe Tick 1.3 - Charging Internal storage. "+(mFusionPoint / 100)+"/"+mFusionPoint); mChargeConsumed += (mFusionPoint / 100); } } else { @@ -166,13 +164,13 @@ GT_MetaTileEntity_DeluxeMachine { } } else { - Utils.LOG_WARNING("Recipe Tick 1.1 - Try to Process Recipe."); + Logger.WARNING("Recipe Tick 1.1 - Try to Process Recipe."); if (checkRecipeMulti()) { - Utils.LOG_WARNING("Recipe Tick 1.2 - Process Recipe was Successful."); + Logger.WARNING("Recipe Tick 1.2 - Process Recipe was Successful."); return 2; } } - Utils.LOG_WARNING("Recipe Tick 2. - Process Recipe failed."); + Logger.WARNING("Recipe Tick 2. - Process Recipe failed."); return 0; } @@ -188,11 +186,11 @@ GT_MetaTileEntity_DeluxeMachine { int tFluidList_sS = tFluidList.size(); for (int i = 0; i < tFluidList_sS - 1; i++) { for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), - (FluidStack) tFluidList.get(j))) { - if (((FluidStack) tFluidList - .get(i)).amount >= ((FluidStack) tFluidList - .get(j)).amount) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), + tFluidList.get(j))) { + if (tFluidList + .get(i).amount >= tFluidList + .get(j).amount) { tFluidList.remove(j--); tFluidList_sS = tFluidList.size(); } else { @@ -435,22 +433,22 @@ GT_MetaTileEntity_DeluxeMachine { long aTick) { //super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { - Utils.LOG_WARNING("1"); + Logger.WARNING("1"); if (mEfficiency < 0) mEfficiency = 0; if (mRunningOnLoad) { - Utils.LOG_WARNING("2"); + Logger.WARNING("2"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); checkRecipeMulti(); } if (--mUpdate == 0 || --mStartUpCheck == 0) { - Utils.LOG_WARNING("3"); + Logger.WARNING("3"); mMachine = true; } if (mStartUpCheck < 0) { - Utils.LOG_WARNING("4"); + Logger.WARNING("4"); if (mMachine) { - Utils.LOG_WARNING("5"); + Logger.WARNING("5"); if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { @@ -458,12 +456,12 @@ GT_MetaTileEntity_DeluxeMachine { 2048 * tierOverclock(), true); } if (this.mEUStore <= 0 && mMaxProgresstime > 0) { - Utils.LOG_WARNING("6"); + Logger.WARNING("6"); stopMachine(); this.mLastRecipe = null; } if (mMaxProgresstime > 0) { - Utils.LOG_WARNING("7"); + Logger.WARNING("7"); this.getBaseMetaTileEntity() .decreaseStoredEnergyUnits(mEUt, true); if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { @@ -485,21 +483,21 @@ GT_MetaTileEntity_DeluxeMachine { checkRecipeMulti(); } } else { - Utils.LOG_WARNING("8"); + Logger.WARNING("8"); if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity .hasInventoryBeenModified()) { - Utils.LOG_WARNING("9"); + Logger.WARNING("9"); // turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { - Utils.LOG_WARNING("10"); + Logger.WARNING("10"); this.mEUStore = (int) aBaseMetaTileEntity .getStoredEU(); if (checkRecipeMulti()) { - Utils.LOG_WARNING("11"); + Logger.WARNING("11"); if (this.mEUStore < this.mLastRecipe.mSpecialValue) { - Utils.LOG_WARNING("12"); + Logger.WARNING("12"); mMaxProgresstime = 0; // turnCasingActive(false); } @@ -515,12 +513,12 @@ GT_MetaTileEntity_DeluxeMachine { } } else { // turnCasingActive(false); - Utils.LOG_WARNING("Bad"); + Logger.WARNING("Bad"); this.mLastRecipe = null; stopMachine(); } } - Utils.LOG_WARNING("Good"); + Logger.WARNING("Good"); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } @@ -605,19 +603,16 @@ GT_MetaTileEntity_DeluxeMachine { @Override public int fill(FluidStack aFluid, boolean doFill) { - // TODO Auto-generated method stub return super.fill(aFluid, doFill); } @Override public FluidStack drain(int maxDrain, boolean doDrain) { - // TODO Auto-generated method stub return super.drain(maxDrain, doDrain); } @Override public int getTankPressure() { - // TODO Auto-generated method stub return 500; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java index 3dee1df0f0..777310ef0f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java @@ -13,10 +13,10 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.array.ArrayUtils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.nbt.NBTUtils; @@ -178,12 +178,12 @@ extends GT_MetaTileEntity_MultiBlockBase final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(28))) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) { - Utils.LOG_WARNING("Bad Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) .getLocalizedName()); - Utils.LOG_WARNING("Block Found at x:"+(aBaseMetaTileEntity.getXCoord()+xDir+i)+" | y:"+(aBaseMetaTileEntity.getYCoord()+h)+" | z:"+(aBaseMetaTileEntity.getZCoord()+zDir+j)); + Logger.WARNING("Bad Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) .getLocalizedName()); + Logger.WARNING("Block Found at x:"+(aBaseMetaTileEntity.getXCoord()+xDir+i)+" | y:"+(aBaseMetaTileEntity.getYCoord()+h)+" | z:"+(aBaseMetaTileEntity.getZCoord()+zDir+j)); return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { - Utils.LOG_WARNING("Bad Meta."); + Logger.WARNING("Bad Meta."); return false; } ++tAmount; @@ -197,8 +197,8 @@ extends GT_MetaTileEntity_MultiBlockBase (this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0) || (this.mMufflerHatches.size() != 1) || (this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() == 0)){ - Utils.LOG_WARNING("Wrong Hatch count."); - Utils.LOG_WARNING("|"+this.mInputHatches.size()+ + Logger.WARNING("Wrong Hatch count."); + Logger.WARNING("|"+this.mInputHatches.size()+ "|"+this.mOutputHatches.size()+ "|"+this.mInputBusses.size()+ "|"+this.mOutputBusses.size()+ @@ -394,7 +394,7 @@ extends GT_MetaTileEntity_MultiBlockBase } //Return if no input hatch set. if (craftingInput == null){ - Utils.LOG_WARNING("Cannot do Auto-Crafting without a 9-slot Input Bus [MV]."); + Logger.WARNING("Cannot do Auto-Crafting without a 9-slot Input Bus [MV]."); return false; } @@ -458,7 +458,7 @@ extends GT_MetaTileEntity_MultiBlockBase this.mEUt = 8 * (1 << this.mTier - 1) * (1 << this.mTier - 1); this.mMaxProgresstime = MathUtils.roundToClosestInt((50-(5*MathUtils.randDouble(((this.mTier-2) <= 0 ? 1 : (this.mTier-2)), this.mTier)))); - Utils.LOG_WARNING("MPT: "+mMaxProgresstime+" | "+mEUt); + Logger.WARNING("MPT: "+mMaxProgresstime+" | "+mEUt); this.getBaseMetaTileEntity().setActive(true); //Setup some vars @@ -494,7 +494,7 @@ extends GT_MetaTileEntity_MultiBlockBase mCorrectInputs++; } else { - Utils.LOG_WARNING("Input in Slot "+mCorrectInputs+" was not valid."); + Logger.WARNING("Input in Slot "+mCorrectInputs+" was not valid."); } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java index f7940e3d68..98f3d92980 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java @@ -7,10 +7,10 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.*; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.general.ItemLavaFilter; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -55,7 +55,7 @@ extends GT_MetaTileEntity_MultiBlockBase @Override public int getDamageToComponent(ItemStack aStack){ - Utils.LOG_INFO("Trying to damage component."); + Logger.INFO("Trying to damage component."); return ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack) ? 1 : 0; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java index cc8f25869c..c95a91a724 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java @@ -13,12 +13,12 @@ import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.Recipe_GT; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.ELEMENT; import gtPlusPlus.core.material.nuclear.FLUORIDES; import gtPlusPlus.core.material.nuclear.NUCLIDE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.fluid.FluidUtils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine; @@ -166,12 +166,12 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase //If not a hatch, continue, else add hatch and continue. if ((!this.addMufflerToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addDynamoToMachineList(tTileEntity, TAE.GTPP_INDEX(12)))) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3."); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { - Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing."); + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing."); return false; } } @@ -183,7 +183,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase // Reactor Inner 5x5 //if ((i != -1 && i != 1) && (j != -1 && j != 1)) { if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) { - Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air."); + Logger.INFO("Make sure the inner 3x3 of the Multiblock is Air."); return false; } @@ -211,13 +211,13 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase //Deal with all 4 sides (Reactor walls) if ((h == 1) || (h == 2)) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - Utils.LOG_INFO("Reactor Shielding Missing from somewhere in the second layer."); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Reactor Shielding Missing from somewhere in the second layer."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 13) { - Utils.LOG_INFO("Reactor Shielding Missing from somewhere in the second layer."); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Reactor Shielding Missing from somewhere in the second layer."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } } @@ -228,13 +228,13 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer."); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { - Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer. "+h); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer. "+h); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); if (h ==0){ if (tTileEntity instanceof GregtechMTE_NuclearReactor){ @@ -256,8 +256,8 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if (this.mDynamoHatches != null) { for (int i = 0; i < this.mDynamoHatches.size(); i++) { if (this.mDynamoHatches.get(i).mTier < 5){ - Utils.LOG_INFO("You require at LEAST IV tier Dynamo Hatches."); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO("You require at LEAST IV tier Dynamo Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); return false; } } @@ -266,9 +266,9 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase for (int i = 0; i < this.mOutputHatches.size(); i++) { if ((this.mOutputHatches.get(i).mTier < 5) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){ - Utils.LOG_INFO("You require at LEAST IV tier Output Hatches."); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); + Logger.INFO("You require at LEAST IV tier Output Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); return false; } } @@ -276,31 +276,31 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if (this.mInputHatches != null) { for (int i = 0; i < this.mInputHatches.size(); i++) { if (this.mInputHatches.get(i).mTier < 5){ - Utils.LOG_INFO("You require at LEAST IV tier Input Hatches."); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); + Logger.INFO("You require at LEAST IV tier Input Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); return false; } } } if (this.mMufflerHatches.size() != 4){ - Utils.LOG_INFO("You require EXACTLY 4 muffler hatches on top. FOUR. You have "+this.mMufflerHatches.size()); + Logger.INFO("You require EXACTLY 4 muffler hatches on top. FOUR. You have "+this.mMufflerHatches.size()); return false; } if (this.mInputHatches.size() < 4){ - Utils.LOG_INFO("You require 4 or more input hatches. You have "+this.mInputHatches.size()); + Logger.INFO("You require 4 or more input hatches. You have "+this.mInputHatches.size()); return false; } if (this.mOutputHatches.size() < 10){ - Utils.LOG_INFO("You require 10 or more output hatches. You have "+this.mOutputHatches.size()); + Logger.INFO("You require 10 or more output hatches. You have "+this.mOutputHatches.size()); return false; } if (this.mDynamoHatches.size() != 4){ - Utils.LOG_INFO("You require EXACTLY 4 dynamo hatches. FOUR. You have "+this.mDynamoHatches.size()); + Logger.INFO("You require EXACTLY 4 dynamo hatches. FOUR. You have "+this.mDynamoHatches.size()); return false; } if (this.mMaintenanceHatches.size() != 2){ - Utils.LOG_INFO("You require EXACTLY 2 muffler hatches. TWO. You have "+this.mMaintenanceHatches.size()); + Logger.INFO("You require EXACTLY 2 muffler hatches. TWO. You have "+this.mMaintenanceHatches.size()); return false; } this.mWrench = true; @@ -310,7 +310,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase this.mSolderingTool = true; this.mCrowbar = true; this.turnCasingActive(false); - Utils.LOG_INFO("Multiblock Formed."); + Logger.INFO("Multiblock Formed."); return true; } @@ -385,15 +385,15 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase final ArrayList tFluids = this.getStoredFluids(); final Collection tRecipeList = Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mRecipeList; if((tFluids.size() > 0) && (tRecipeList != null)) { //Does input hatch have a LFTR fuel? - Utils.LOG_WARNING("Found more than one input fluid and a list of valid recipes."); + Logger.WARNING("Found more than one input fluid and a list of valid recipes."); for (final FluidStack hatchFluid1 : tFluids) { //Loops through hatches - Utils.LOG_WARNING("Looping through Input hatches - Found "+hatchFluid1.getLocalizedName()); + Logger.WARNING("Looping through Input hatches - Found "+hatchFluid1.getLocalizedName()); for(final GT_Recipe aFuel : tRecipeList) { //Loops through LFTR fuel recipes - Utils.LOG_WARNING("Looping through Recipes. "+aFuel.mSpecialValue); + Logger.WARNING("Looping through Recipes. "+aFuel.mSpecialValue); FluidStack tLiquid; final FluidStack testStack = aFuel.mFluidInputs[1]; if ((tLiquid = testStack) != null) { //Create fluidstack from current recipe - Utils.LOG_WARNING("Creating a fluidstack from the current recipe. "+testStack.getLocalizedName()); + Logger.WARNING("Creating a fluidstack from the current recipe. "+testStack.getLocalizedName()); if (hatchFluid1.isFluidEqual(tLiquid)) { //Has a LFTR fluid this.fuelConsumption = this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048); //Calc fuel consumption @@ -409,37 +409,37 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if(tFluids.contains(NUCLIDE.LiFBeF2ThF4UF4.getFluid(2))){ FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048))); - Utils.LOG_WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount); + Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount); if(this.depleteInput(depletionStack)) { //Deplete that amount - Utils.LOG_WARNING("Depleted some FLiBe fluid"); + Logger.WARNING("Depleted some FLiBe fluid"); } this.depleteInput(NUCLIDE.LiFBeF2ThF4UF4.getFluid(this.boostEu ? 2 : 1)); - Utils.LOG_WARNING("Depleted "+(this.boostEu ? 2 : 1)+"L of LiFBeF2ThF4UF4 fluid"); + Logger.WARNING("Depleted "+(this.boostEu ? 2 : 1)+"L of LiFBeF2ThF4UF4 fluid"); } //1/2 as Efficient if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(4))){ FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048))); - Utils.LOG_WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount); + Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount); if(this.depleteInput(depletionStack)) { //Deplete that amount - Utils.LOG_WARNING("Depleted some FLiBe fluid"); + Logger.WARNING("Depleted some FLiBe fluid"); } this.depleteInput(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(this.boostEu ? 4 : 2)); - Utils.LOG_WARNING("Depleted "+(this.boostEu ? 4 : 2)+"L of LiFBeF2ZrF4UF4 fluid"); + Logger.WARNING("Depleted "+(this.boostEu ? 4 : 2)+"L of LiFBeF2ZrF4UF4 fluid"); } //10x less Efficient. if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4U235.getFluid(20))) { FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048))); - Utils.LOG_WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount); + Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount); if(this.depleteInput(depletionStack)) { //Deplete that amount - Utils.LOG_WARNING("Depleted some FLiBe fluid"); + Logger.WARNING("Depleted some FLiBe fluid"); } this.depleteInput(NUCLIDE.LiFBeF2ZrF4U235.getFluid(this.boostEu ? 20 : 10)); - Utils.LOG_WARNING("Depleted "+(this.boostEu ? 20 : 10)+"L of LiFBeF2ZrF4U235 fluid"); + Logger.WARNING("Depleted "+(this.boostEu ? 20 : 10)+"L of LiFBeF2ZrF4U235 fluid"); } } } else { @@ -452,7 +452,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if (this.depleteInput(Materials.Helium.getGas(1000L))){ //Make an empty fluid stack for possible sparging output FluidStack[] spargeOutput = new FluidStack[]{}; - Utils.LOG_WARNING("Doing a Sparge with Helium - "+this.heliumSparging); + Logger.WARNING("Doing a Sparge with Helium - "+this.heliumSparging); this.heliumSparging = false; spargeOutput = this.getByproductsOfSparge(Materials.Helium.getGas(1000L)); @@ -460,7 +460,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase try { if (spargeOutput.length >= 1){ for (final FluidStack F : spargeOutput){ - Utils.LOG_WARNING("Adding Sparge Output - "+F.getLocalizedName()); + Logger.WARNING("Adding Sparge Output - "+F.getLocalizedName()); this.addOutput(F); } } @@ -472,13 +472,13 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if (this.depleteInput(Materials.Fluorine.getGas(100L))){ //Make an empty fluid stack for possible sparging output FluidStack[] spargeOutput = new FluidStack[]{}; - Utils.LOG_WARNING("Doing a Sparge with Fluorine"); + Logger.WARNING("Doing a Sparge with Fluorine"); spargeOutput = this.getByproductsOfSparge(Materials.Fluorine.getGas(100L)); this.heliumSparging = true; //If Sparging occurred, try add the outputs to the output hatches. if (spargeOutput.length > 0){ for (final FluidStack F : spargeOutput){ - Utils.LOG_WARNING("Adding Sparge Output - "+F.getLocalizedName()); + Logger.WARNING("Adding Sparge Output - "+F.getLocalizedName()); this.addOutput(F); } } @@ -504,10 +504,10 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase else if (this.mEfficiency > 500){ this.mEfficiency = 500; } - Utils.LOG_WARNING("Efficiency == "+this.mEfficiency); + Logger.WARNING("Efficiency == "+this.mEfficiency); this.mEUt = (this.mEfficiency < 500 ? 2048 : (8196)); //Output 0 if startup is less than 20% - Utils.LOG_WARNING("Generating "+this.mEUt+"EU/t @ an efficiency level of "+this.mEfficiency); + Logger.WARNING("Generating "+this.mEUt+"EU/t @ an efficiency level of "+this.mEfficiency); this.mProgresstime = 1; this.mMaxProgresstime = 1; @@ -586,7 +586,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase MathUtils.roundToClosestInt(MathUtils.randInt(10, 100)/10) }; final int heliumContent = (1000-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]-outputChances[4]); - Utils.LOG_WARNING("Helium remaining: "+heliumContent); + Logger.WARNING("Helium remaining: "+heliumContent); outputArrayOfGases = new FluidStack[]{ ELEMENT.getInstance().XENON.getFluid(outputChances[0]), ELEMENT.getInstance().NEON.getFluid(outputChances[1]), @@ -604,7 +604,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10) }; final int fluorineContent = (100-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]); - Utils.LOG_WARNING("Fluorine remaining: "+fluorineContent); + Logger.WARNING("Fluorine remaining: "+fluorineContent); outputArrayOfGases = new FluidStack[]{ FLUORIDES.LITHIUM_FLUORIDE.getFluid(outputChances[0]), FLUORIDES.NEPTUNIUM_HEXAFLUORIDE.getFluid(outputChances[1]), diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java index d55912badc..da83b3c3d1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java @@ -13,8 +13,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachi import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.forestry.trees.TreefarmManager; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; @@ -111,7 +111,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo @Override public boolean checkRecipe(final ItemStack aStack) { - Utils.LOG_INFO("Working"); + Logger.INFO("Working"); /*if (!checkRecursiveBlocks()) { this.mEfficiency = 0; this.mEfficiencyIncrease = 0; @@ -145,28 +145,28 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { //this.mCasings.clear(); - Utils.LOG_INFO("Step 1"); + Logger.INFO("Step 1"); final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7; final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7; for (int i = -7; i <= 7; i++) { - Utils.LOG_INFO("Step 2"); + Logger.INFO("Step 2"); for (int j = -7; j <= 7; j++) { - Utils.LOG_INFO("Step 3"); + Logger.INFO("Step 3"); for (int h = 0; h <= 1; h++) { - Utils.LOG_INFO("Step 4"); + Logger.INFO("Step 4"); final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); //Farm Floor inner 14x14 if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) { - Utils.LOG_INFO("Step 5 - H:"+h); + Logger.INFO("Step 5 - H:"+h); // Farm Dirt Floor and Inner Air/Log space. if (h == 0) { //Dirt Floor if (!TreefarmManager.isDirtBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) { - Utils.LOG_INFO("Dirt like block missing from inner 14x14."); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Dirt like block missing from inner 14x14."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); aBaseMetaTileEntity.getWorld().setBlock( (aBaseMetaTileEntity.getXCoord()+(xDir+i)), (aBaseMetaTileEntity.getYCoord()+(h)), @@ -189,12 +189,12 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo } //Dealt with inner 5x5, now deal with the exterior. else { - Utils.LOG_INFO("Step 6 - H:"+h); + Logger.INFO("Step 6 - H:"+h); //Deal with all 4 sides (Fenced area) if (h == 1) { if (!TreefarmManager.isFenceBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) { - Utils.LOG_INFO("Fence/Gate missing from outside the second layer."); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Fence/Gate missing from outside the second layer."); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } } @@ -209,31 +209,31 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller if (!(aBaseMetaTileEntity.getMetaTileID() != 752)) { - Utils.LOG_INFO("Fark Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass()); - Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + Logger.INFO("Fark Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass()); + Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } - Utils.LOG_INFO("Found a farm keeper."); + Logger.INFO("Found a farm keeper."); } } } - Utils.LOG_INFO("Step a"); + Logger.INFO("Step a"); } - Utils.LOG_INFO("Step b"); + Logger.INFO("Step b"); } - Utils.LOG_INFO("Step c"); + Logger.INFO("Step c"); } - Utils.LOG_INFO("Step d"); + Logger.INFO("Step d"); } - Utils.LOG_INFO("Step 7"); + Logger.INFO("Step 7"); //Must have at least one energy hatch. if (this.mEnergyHatches != null) { for (int i = 0; i < this.mEnergyHatches.size(); i++) { if (this.mEnergyHatches.get(i).mTier < 2){ - Utils.LOG_INFO("You require at LEAST MV tier Energy Hatches."); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO("You require at LEAST MV tier Energy Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); return false; } } @@ -243,9 +243,9 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo for (int i = 0; i < this.mOutputHatches.size(); i++) { if ((this.mOutputHatches.get(i).mTier < 2) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){ - Utils.LOG_INFO("You require at LEAST MV tier Output Hatches."); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); + Logger.INFO("You require at LEAST MV tier Output Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); return false; } } @@ -254,16 +254,16 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo if (this.mInputHatches != null) { for (int i = 0; i < this.mInputHatches.size(); i++) { if (this.mInputHatches.get(i).mTier < 2){ - Utils.LOG_INFO("You require at LEAST MV tier Input Hatches."); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); - Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); + Logger.INFO("You require at LEAST MV tier Input Hatches."); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord()); + Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName()); return false; } } } this.mSolderingTool = true; //turnCasingActive(true); - Utils.LOG_INFO("Multiblock Formed."); + Logger.INFO("Multiblock Formed."); return true; } @@ -326,7 +326,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo //System.out.println("After: "+cv.mTextures.hashCode()); return cv; } catch (final NoSuchFieldException e) { - Utils.LOG_INFO("Could not find mTextures."); + Logger.INFO("Could not find mTextures."); return casing; } } catch (SecurityException | IllegalArgumentException | IllegalAccessException e) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java index a6b3944a06..12329c875f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java @@ -1,5 +1,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi; +import java.util.*; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; @@ -9,18 +11,13 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.fluid.FluidUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBlockBase { @@ -34,10 +31,12 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc super(aName); } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GregtechMetaTileEntityGeneratorArray(this.mName); } + @Override public String[] getDescription() { return new String[]{ "Controller Block for the Generator Array", @@ -51,6 +50,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc "Place up to 16 Single Block GT Generators into the Controller Inventory"}; } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[48], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; @@ -58,10 +58,12 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[48]}; } + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png"); } + @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { if (mInventory[1] == null) return null; String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt\\.blockmachines\\.basicgenerator\\.", ""); @@ -93,6 +95,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc return null; } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { if (aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.")) { return true; @@ -100,11 +103,13 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc return false; } + @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; } public String mMachine = ""; + @Override public boolean checkRecipe(ItemStack aStack) { if (!isCorrectMachinePart(mInventory[1])) { return false; @@ -138,17 +143,17 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc if(!mMachine.equals(mInventory[1].getUnlocalizedName()))mLastRecipe=null; mMachine = mInventory[1].getUnlocalizedName(); - Utils.LOG_WARNING("mMachine: "+mMachine); + Logger.WARNING("mMachine: "+mMachine); ArrayList tFluids = getStoredFluids(); Collection tRecipeList = this.getRecipeMap().mRecipeList; - Utils.LOG_WARNING("tRecipeList: "+tRecipeList); + Logger.WARNING("tRecipeList: "+tRecipeList); if(tFluids.size() > 0 && tRecipeList != null) { //Does input hatch have a diesel fuel? - Utils.LOG_WARNING("1"); + Logger.WARNING("1"); for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches - Utils.LOG_WARNING("2"); + Logger.WARNING("2"); for(GT_Recipe aFuel : tRecipeList) { //Loops through diesel fuel recipes - Utils.LOG_WARNING("3"); + Logger.WARNING("3"); /*if (aFuel != null){ for (FluidStack x : aFuel.mFluidInputs){ if (x != null){ @@ -158,12 +163,12 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc }*/ FluidStack tLiquid; tLiquid = FluidUtils.getFluidStack(aFuel.mFluidInputs[0], aFuel.mFluidInputs[0].amount); - Utils.LOG_WARNING("5"); + Logger.WARNING("5"); fuelConsumption = aFuel.mFluidInputs[0].amount; if(depleteInput(tLiquid)) { //Deplete that amount - Utils.LOG_WARNING("6"); + Logger.WARNING("6"); boostEu = true; - Utils.LOG_WARNING("7"); + Logger.WARNING("7"); fuelValue = aFuel.mEUt*aFuel.mDuration; fuelRemaining = hatchFluid1.amount; //Record available fuel @@ -171,7 +176,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc //this.mProgresstime = 1; this.mMaxProgresstime = 20; this.mEfficiencyIncrease = 9500; - Utils.LOG_WARNING("9"); + Logger.WARNING("9"); return true; } } @@ -190,6 +195,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc return list.toArray(new ItemStack[list.size()]); } + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; @@ -218,22 +224,27 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc return tAmount >= 16; } + @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; } + @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } + @Override public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } + @Override public int getAmountOfOutputs() { return 1; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java index 6d951b7221..e349ae1f53 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java @@ -18,14 +18,12 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.*; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.players.FakeFarmer; import gtPlusPlus.core.slots.SlotBuzzSaw.SAWTOOL; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.particles.BlockBreakParticles; @@ -36,9 +34,7 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.helpers.TreeFarmHelper; import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.entity.player.*; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -101,7 +97,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase @Override public void saveNBTData(final NBTTagCompound aNBT) { - Utils.LOG_INFO("Called NBT data save"); + Logger.WARNING("Called NBT data save"); aNBT.setLong("mInternalPower", this.mInternalPower); //Save [Buzz]Saw @@ -112,7 +108,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase final NBTTagCompound data = new NBTTagCompound(); stack.writeToNBT(data); data.setInteger("Slot", i); - Utils.LOG_INFO("Saving "+stack.getDisplayName()+" in slot "+i); + Logger.WARNING("Saving "+stack.getDisplayName()+" in slot "+i); list.appendTag(data); } } @@ -132,7 +128,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase final int slot = data.getInteger("Slot"); if((slot >= 0) && (slot < 2)){ this.mInventory[slot] = ItemStack.loadItemStackFromNBT(data); - Utils.LOG_INFO("Loading "+this.mInventory[slot].getDisplayName()+" in slot "+i); + Logger.WARNING("Loading "+this.mInventory[slot].getDisplayName()+" in slot "+i); } } @@ -143,7 +139,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase public boolean drainEnergyInput(final long aEU) { if (this.mInternalPower >= 32){ this.mInternalPower = (this.mInternalPower-32); - Utils.LOG_MACHINE_INFO("Draining internal power storage by 32EU. Stored:"+this.mInternalPower); + Logger.MACHINE_INFO("Draining internal power storage by 32EU. Stored:"+this.mInternalPower); return true;} return false; } @@ -163,7 +159,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase } } else { - Utils.LOG_MACHINE_INFO("Bad Power hatch to obtain energy from."); + Logger.MACHINE_INFO("Bad Power hatch to obtain energy from."); } } } @@ -238,7 +234,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase @Override public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide() || aBaseMetaTileEntity.getWorld().isRemote) { - Utils.LOG_INFO("Doing nothing Client Side."); + Logger.WARNING("Doing nothing Client Side."); return false; } aBaseMetaTileEntity.openGUI(aPlayer); @@ -257,7 +253,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase @Override public boolean checkRecipe(final ItemStack aStack) { - Utils.LOG_MACHINE_INFO("Working"); + Logger.MACHINE_INFO("Working"); this.mEfficiency = 0; this.mEfficiencyIncrease = 0; this.mMaxProgresstime = 0; @@ -266,38 +262,38 @@ public class Gregtech