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. --- .../interfaces/internal/Interface_ToolStats.java | 1 + .../xmod/gregtech/api/items/Gregtech_MetaTool.java | 5 +- .../gregtech/api/items/tools/GT_MetaGenTool.java | 5 + .../GT_MetaTileEntity_DeluxeMachine.java | 38 +-- .../GT_MetaTileEntity_DeluxeTank.java | 4 +- .../GT_MetaTileEntity_Hatch_InputBattery.java | 13 +- .../GT_MetaTileEntity_Hatch_OutputBattery.java | 14 +- .../base/GregtechMetaPipeEntityBase_Cable.java | 6 +- .../base/GregtechMeta_MultiBlockBase.java | 67 +++-- .../GregtechDoubleFuelGeneratorBase.java | 88 +++---- .../base/machines/GregtechMetaSafeBlockBase.java | 30 +-- .../api/world/GTPP_Worldgen_GT_Ore_Layer.java | 11 +- .../xmod/gregtech/common/Meta_GT_Proxy.java | 4 +- .../common/blocks/fluid/GregtechFluidHandler.java | 13 +- .../common/blocks/textures/TexturesGtBlock.java | 6 +- .../common/blocks/textures/TexturesGtTools.java | 4 +- .../gregtech/common/helpers/ChargingHelper.java | 53 ++-- .../gregtech/common/helpers/CraftingHelper.java | 4 +- .../gregtech/common/helpers/TreeFarmHelper.java | 20 +- .../helpers/autocrafter/AC_Helper_Container.java | 16 +- .../helpers/autocrafter/AC_Helper_Utils.java | 10 +- .../common/helpers/tesseract/TesseractHelper.java | 34 +-- .../common/items/MetaGeneratedGregtechItems.java | 5 +- .../GT_MetaTileEntity_TesseractGenerator.java | 18 +- .../generators/GT_MetaTileEntity_Boiler_Base.java | 4 +- .../GT_MetaTileEntity_SemiFluidGenerator.java | 25 +- .../GregtechMetaTileEntitySolarGenerator.java | 8 +- .../generators/GregtechMetaTileEntity_RTG.java | 10 +- .../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 ++-- .../storage/GregtechMetaEnergyBuffer.java | 6 +- .../common/tools/TOOL_Gregtech_Choocher.java | 1 + .../xmod/gregtech/loaders/GT_Material_Loader.java | 292 +++++++++++++++++++++ .../xmod/gregtech/loaders/Gregtech_Blocks.java | 8 +- .../loaders/ProcessingToolHeadChoocher.java | 16 +- .../gregtech/loaders/RecipeGen_BlastSmelter.java | 60 ++--- .../loaders/RecipeGen_BlastSmelterGT_Ex.java | 5 +- .../gregtech/loaders/RecipeGen_DustGeneration.java | 58 ++-- .../xmod/gregtech/loaders/RecipeGen_Extruder.java | 32 +-- .../xmod/gregtech/loaders/RecipeGen_Fluids.java | 42 +-- .../xmod/gregtech/loaders/RecipeGen_Plates.java | 24 +- .../xmod/gregtech/loaders/RecipeGen_Recycling.java | 88 ++++--- .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 44 ++-- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 153 +++++------ .../recipes/machines/RECIPEHANDLER_CokeOven.java | 52 ++-- .../recipes/machines/RECIPEHANDLER_Dehydrator.java | 52 ++-- .../machines/RECIPEHANDLER_MatterFabricator.java | 52 ++-- .../registration/gregtech/Gregtech4Content.java | 10 +- .../gregtech/GregtechAdvancedBoilers.java | 4 +- .../gregtech/GregtechAdvancedMixer.java | 6 +- .../gregtech/GregtechComponentAssembler.java | 4 +- .../registration/gregtech/GregtechConduits.java | 33 +-- .../registration/gregtech/GregtechCyclotron.java | 4 +- .../registration/gregtech/GregtechDehydrator.java | 4 +- .../gregtech/GregtechEnergyBuffer.java | 4 +- .../GregtechGeothermalThermalGenerator.java | 4 +- .../gregtech/GregtechIndustrialBlastSmelter.java | 4 +- .../gregtech/GregtechIndustrialCentrifuge.java | 4 +- .../gregtech/GregtechIndustrialCokeOven.java | 4 +- .../gregtech/GregtechIndustrialCuttingFactory.java | 4 +- .../gregtech/GregtechIndustrialElectrolyzer.java | 4 +- .../gregtech/GregtechIndustrialFuelRefinery.java | 4 +- .../gregtech/GregtechIndustrialGeneratorArray.java | 4 +- .../gregtech/GregtechIndustrialMacerator.java | 4 +- .../gregtech/GregtechIndustrialMassFabricator.java | 4 +- .../gregtech/GregtechIndustrialMultiTank.java | 4 +- .../gregtech/GregtechIndustrialPlatePress.java | 4 +- .../gregtech/GregtechIndustrialSifter.java | 4 +- .../GregtechIndustrialThermalCentrifuge.java | 4 +- .../gregtech/GregtechIndustrialTreeFarm.java | 4 +- .../gregtech/GregtechIndustrialWashPlant.java | 4 +- .../gregtech/GregtechIndustrialWiremill.java | 4 +- .../gregtech/GregtechIronBlastFurnace.java | 4 +- .../registration/gregtech/GregtechLFTR.java | 4 +- .../gregtech/GregtechMiniRaFusion.java | 4 +- .../gregtech/GregtechNitroDieselFix.java | 35 +-- .../gregtech/GregtechPollutionDevices.java | 4 +- .../gregtech/GregtechPowerSubStation.java | 4 +- .../registration/gregtech/GregtechRTG.java | 4 +- .../gregtech/GregtechRocketFuelGenerator.java | 4 +- .../registration/gregtech/GregtechSafeBlock.java | 4 +- .../gregtech/GregtechSolarGenerators.java | 4 +- .../gregtech/GregtechSteamCondenser.java | 4 +- .../gregtech/GregtechTieredFluidTanks.java | 8 +- .../gregtech/GregtechTreeFarmerTE.java | 4 +- .../gregtech/GregtechWirelessChargers.java | 3 +- .../gregtech/NewHorizonsAccelerator.java | 4 +- 114 files changed, 1600 insertions(+), 1240 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java index fa5ff66310..5a1c305ab5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java @@ -122,6 +122,7 @@ public interface Interface_ToolStats extends IToolStats{ /** * @return If this Tool can be used as an BC Wrench. */ + @Override public boolean isWrench(); /** diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java index 89deeb931d..3d3dcee94c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.api.items; -import static gregtech.api.enums.GT_Values.MOD_ID_RC; - import java.util.*; import java.util.Map.Entry; @@ -147,6 +145,7 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool implements } + @SuppressWarnings("unchecked") public void addAdditionalToolTips(final List aList, final ItemStack aStack) { final long tMaxDamage = getToolMaxDamage(aStack); final Materials tMaterial = getPrimaryMaterial(aStack); @@ -171,6 +170,8 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool implements } } + @Override + @SuppressWarnings("unchecked") public void addAdditionalToolTips(final List aList, final ItemStack aStack, final EntityPlayer aPlayer) { final long tMaxDamage = getToolMaxDamage(aStack); final Materials tMaterial = getPrimaryMaterial(aStack); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java index a980a299d5..cf167888f3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java @@ -339,6 +339,7 @@ public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool { } } + @Override public boolean canWrench(final EntityPlayer player, final int x, final int y, final int z) { System.out.println("canWrench"); if(player==null) { @@ -354,6 +355,7 @@ public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool { return (tStats != null) && tStats.isWrench(); } + @Override public void wrenchUsed(final EntityPlayer player, final int x, final int y, final int z) { if(player==null) { return; @@ -367,14 +369,17 @@ public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool { } } + @Override public boolean canUse(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){ return this.canWrench(player, x, y, z); } + @Override public void used(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){ this.wrenchUsed(player, x, y, z); } + @Override public boolean shouldHideFacades(final ItemStack stack, final EntityPlayer player) { if(player==null) { return false; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java index 7b4cf471b0..83c2235d8c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java @@ -14,7 +14,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.gregtech.api.objects.XSTR; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -452,7 +452,7 @@ public abstract class GT_MetaTileEntity_DeluxeMachine extends GT_MetaTileEntity_ } boolean tRemovedOutputFluid = false; - Utils.LOG_WARNING("R0"); + Logger.WARNING("R0"); if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) { IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); @@ -477,27 +477,27 @@ public abstract class GT_MetaTileEntity_DeluxeMachine extends GT_MetaTileEntity_ if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0; else mOutputBlocked++; - Utils.LOG_WARNING("R1"); + Logger.WARNING("R1"); if (allowToCheckRecipe()) { - Utils.LOG_WARNING("R2--------------------------------------------------"); - Utils.LOG_WARNING("R2: (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe())"); - Utils.LOG_WARNING("R2--------------------------------------------------"); - Utils.LOG_WARNING("R2-mMaxProgresstime: "+mMaxProgresstime); - Utils.LOG_WARNING("R2-isAllowedToWork(): "+aBaseMetaTileEntity.isAllowedToWork()); - Utils.LOG_WARNING("R2--------------------------------------------------"); - Utils.LOG_WARNING("R2-tRemovedOutputFluid: "+tRemovedOutputFluid); - Utils.LOG_WARNING("R2-tSucceeded: "+tSucceeded); - Utils.LOG_WARNING("R2-hasInventoryBeenModified(): "+aBaseMetaTileEntity.hasInventoryBeenModified()); - Utils.LOG_WARNING("R2-(aTick % 600 == 0): "+(aTick % 600 == 0)); - Utils.LOG_WARNING("R2-hasWorkJustBeenEnabled(): "+aBaseMetaTileEntity.hasWorkJustBeenEnabled()); - Utils.LOG_WARNING("R2--------------------------------------------------"); - Utils.LOG_WARNING("R2-hasEnoughEnergyToCheckRecipe(): "+hasEnoughEnergyToCheckRecipe()); - Utils.LOG_WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2: (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe())"); + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2-mMaxProgresstime: "+mMaxProgresstime); + Logger.WARNING("R2-isAllowedToWork(): "+aBaseMetaTileEntity.isAllowedToWork()); + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2-tRemovedOutputFluid: "+tRemovedOutputFluid); + Logger.WARNING("R2-tSucceeded: "+tSucceeded); + Logger.WARNING("R2-hasInventoryBeenModified(): "+aBaseMetaTileEntity.hasInventoryBeenModified()); + Logger.WARNING("R2-(aTick % 600 == 0): "+(aTick % 600 == 0)); + Logger.WARNING("R2-hasWorkJustBeenEnabled(): "+aBaseMetaTileEntity.hasWorkJustBeenEnabled()); + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2-hasEnoughEnergyToCheckRecipe(): "+hasEnoughEnergyToCheckRecipe()); + Logger.WARNING("R2--------------------------------------------------"); if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) { - Utils.LOG_WARNING("R3"); + Logger.WARNING("R3"); if (checkRecipe() == 2) { if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null; - Utils.LOG_WARNING("R4"); + Logger.WARNING("R4"); for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; for (int i = 0; i < mOutputItems.length; i++) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java index 175869a1ac..b5e7d7d64c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java @@ -5,7 +5,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_DeluxeTank; import gtPlusPlus.xmod.gregtech.api.gui.GUI_DeluxeTank; import net.minecraft.entity.player.InventoryPlayer; @@ -228,7 +228,7 @@ public abstract class GT_MetaTileEntity_DeluxeTank extends GT_MetaTileEntity_Bas } } else { - Utils.LOG_INFO("Something broke when trying to empty cells between two fluid tank areas."); + Logger.INFO("Something broke when trying to empty cells between two fluid tank areas."); } } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java index 9c93ca3889..8b5a1e520b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java @@ -3,21 +3,16 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_2by2; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_4by4; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_2by2; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_4by4; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -219,10 +214,12 @@ GT_MetaTileEntity_Hatch { && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); } + @Override public int rechargerSlotStartIndex() { return 0; } + @Override public int rechargerSlotCount() { switch (mTier) { case 2 : @@ -234,10 +231,12 @@ GT_MetaTileEntity_Hatch { } } + @Override public int dechargerSlotStartIndex() { return 0; } + @Override public int dechargerSlotCount() { return 0; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java index aa234a3dc9..29d32d4d9d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java @@ -2,7 +2,6 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; @@ -10,12 +9,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_2by2; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_4by4; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_2by2; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_4by4; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -178,18 +174,22 @@ GT_MetaTileEntity_Hatch { } } + @Override public int rechargerSlotStartIndex() { return 0; } + @Override public int rechargerSlotCount() { return 0; } + @Override public int dechargerSlotStartIndex() { return 0; } + @Override public int dechargerSlotCount() { return mTier == 2 ? 4 : 16; } @@ -205,7 +205,7 @@ GT_MetaTileEntity_Hatch { if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) { MetaTileEntity mMetaTileEntity = (MetaTileEntity) aBaseMetaTileEntity.getMetaTileEntity(); if (mMetaTileEntity.dechargerSlotCount() > 0 && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { - Utils.LOG_INFO("3"); + Logger.INFO("3"); for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { if (mMetaTileEntity.mInventory[i] != null && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { aBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[mTier] * 15, aBaseMetaTileEntity.getEUCapacity() - aBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java index 6de1594b69..220e6eb4dc 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java @@ -19,8 +19,8 @@ import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import ic2.api.energy.tile.IEnergySink; import net.minecraft.entity.Entity; @@ -88,8 +88,8 @@ public class GregtechMetaPipeEntityBase_Cable extends MetaPipeEntity implements } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { // Utils.LOG_INFO("FATAL ERROR - REFLECTION FAILED FOR GT CABLES // - PLEASE REPORT THIS."); - Utils.LOG_WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); - Utils.LOG_ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); + Logger.WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); + Logger.ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); temp = 4; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 484a156e0f..f6a8d55174 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -1,27 +1,24 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; +import java.lang.reflect.*; import java.util.ArrayList; import java.util.Iterator; +import org.apache.commons.lang3.reflect.FieldUtils; + import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.*; import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_MultiMachine; import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine; -import gtPlusPlus.xmod.gregtech.api.items.tools.GT_MetaGenTool; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery; import net.minecraft.entity.player.InventoryPlayer; @@ -105,7 +102,7 @@ GT_MetaTileEntity_MultiBlockBase { public int getValidOutputSlots(final IGregTechTileEntity machineCalling, final GT_Recipe sRecipes, final ItemStack[] sInputs) { - Utils.LOG_WARNING("Finding valid output slots for " + Logger.WARNING("Finding valid output slots for " + machineCalling.getInventoryName()); final ArrayList tInputList = this.getStoredInputs(); final GT_Recipe tRecipe = sRecipes; @@ -148,11 +145,11 @@ GT_MetaTileEntity_MultiBlockBase { baseRecipe = tRecipe.copy(); if ((cloneRecipe != baseRecipe) || (cloneRecipe == null)) { cloneRecipe = baseRecipe.copy(); - Utils.LOG_WARNING("Setting Recipe"); + Logger.WARNING("Setting Recipe"); } if ((cloneTime != baseRecipe.mDuration) || (cloneTime == 0)) { cloneTime = baseRecipe.mDuration; - Utils.LOG_WARNING("Setting Time"); + Logger.WARNING("Setting Time"); } if (cloneRecipe.mDuration > 0) { @@ -161,16 +158,16 @@ GT_MetaTileEntity_MultiBlockBase { (100 - percentage)); cloneRecipe.mDuration = tempTime; if (cloneRecipe.mDuration < originalTime) { - Utils.LOG_MACHINE_INFO("Generated recipe with a smaller time. | " + Logger.MACHINE_INFO("Generated recipe with a smaller time. | " + originalTime + " | " + cloneRecipe.mDuration + " |"); return cloneRecipe; } else { - Utils.LOG_MACHINE_INFO("Did not generate recipe with a smaller time. | " + Logger.MACHINE_INFO("Did not generate recipe with a smaller time. | " + originalTime + " | " + cloneRecipe.mDuration + " |"); return tRecipe; } } - Utils.LOG_MACHINE_INFO("Error generating recipe, returning null."); + Logger.MACHINE_INFO("Error generating recipe, returning null."); return null; } @@ -413,4 +410,44 @@ GT_MetaTileEntity_MultiBlockBase { return super.addDynamoToMachineList(aTileEntity, aBaseCasingIndex); } + + /** + * Pollution Management + */ + + public int getPollutionPerTick(ItemStack arg0) { + return 0; + } + + public boolean polluteEnvironment(int aPollutionLevel) { + int mPollution = 0; + Field f = FieldUtils.getDeclaredField(this.getClass(), "mPollution", true); + if (f != null){ + try { + mPollution = (int) f.get(this); + } + catch (IllegalArgumentException | IllegalAccessException e) {} + } + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && f != null){ + mPollution += aPollutionLevel; + for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + if (mPollution < 10000) { + break; + } + if (!tHatch.polluteEnvironment()) { + continue; + } + mPollution -= 10000; + } + } + return mPollution < 10000; + } + else { + return false; + } + + } + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java index 717616ff71..c499b38ce8 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java @@ -10,8 +10,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -70,10 +70,10 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ @Override public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()){ - Utils.LOG_WARNING("Entity is Client side, simply returning true"); + Logger.WARNING("Entity is Client side, simply returning true"); return true; } - Utils.LOG_WARNING("Entity is not Client side, opening entity Container and by extension, it's GUI, then returning true"); + Logger.WARNING("Entity is not Client side, opening entity Container and by extension, it's GUI, then returning true"); aBaseMetaTileEntity.openGUI(aPlayer); return true; } @@ -216,19 +216,19 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ final int tFuelValue2 = this.getFuelValue(this.mFluid2), tConsumed2 = this.consumedFluidPerOperation(this.mFluid2); if (((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount > tConsumed))/* && (tFuelValue2 > 0 && tConsumed2 > 0 && mFluid2.amount > tConsumed2)*/) { - Utils.LOG_WARNING("tFuelValue: "+tFuelValue); - Utils.LOG_WARNING("tConsumed: "+tConsumed); - Utils.LOG_WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); - Utils.LOG_WARNING("mFluid.amount: "+this.mFluid.amount); - Utils.LOG_WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); + Logger.WARNING("tFuelValue: "+tFuelValue); + Logger.WARNING("tConsumed: "+tConsumed); + Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); + Logger.WARNING("mFluid.amount: "+this.mFluid.amount); + Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); - Utils.LOG_WARNING("========================================================="); + Logger.WARNING("========================================================="); - Utils.LOG_WARNING("tFuelValue2: "+tFuelValue2); - Utils.LOG_WARNING("tConsumed2: "+tConsumed2); - Utils.LOG_WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); - Utils.LOG_WARNING("mFluid2.amount: "+this.mFluid2.amount); - Utils.LOG_WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); + Logger.WARNING("tFuelValue2: "+tFuelValue2); + Logger.WARNING("tConsumed2: "+tConsumed2); + Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); + Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount); + Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); long tFluidAmountToUse2 = Math.min(this.mFluid2.amount / tConsumed2, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2); @@ -239,9 +239,9 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){ tFluidAmountToUse = 1; - Utils.LOG_WARNING("========================================================="); - Utils.LOG_WARNING("tFluidAmountToUse - Updated: "+tFluidAmountToUse); - Utils.LOG_WARNING("========================================================="); + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse - Updated: "+tFluidAmountToUse); + Logger.WARNING("========================================================="); } } @@ -251,15 +251,15 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ }*/ if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){ tFluidAmountToUse2 = 1; - Utils.LOG_WARNING("========================================================="); - Utils.LOG_WARNING("tFluidAmountToUse2 - Updated: "+tFluidAmountToUse2); - Utils.LOG_WARNING("========================================================="); + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse2 - Updated: "+tFluidAmountToUse2); + Logger.WARNING("========================================================="); } } - Utils.LOG_WARNING("========================================================="); - Utils.LOG_WARNING("tFluidAmountToUse: "+tFluidAmountToUse); - Utils.LOG_WARNING("========================================================="); + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse: "+tFluidAmountToUse); + Logger.WARNING("========================================================="); /*Utils.LOG_WARNING("mFluid.amount / tConsumed: "+("fluidAmount:"+mFluid.amount)+(" tConsumed:"+tConsumed)+" | "+(mFluid.amount / tConsumed)); Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU())); @@ -272,9 +272,9 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue)); */ - Utils.LOG_WARNING("========================================================="); - Utils.LOG_WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); - Utils.LOG_WARNING("========================================================="); + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); + Logger.WARNING("========================================================="); /*Utils.LOG_WARNING("mFluid2.amount / tConsumed2: "+("fluidAmount2:"+mFluid2.amount)+(" tConsumed2:"+tConsumed2)+" | "+(mFluid2.amount / tConsumed2)); Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU())); @@ -288,19 +288,19 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ */ if (((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) && ((tFluidAmountToUse2 > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse2 * tFuelValue2, true))){ - Utils.LOG_WARNING("tFuelValue: "+tFuelValue); - Utils.LOG_WARNING("tConsumed: "+tConsumed); - Utils.LOG_WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); - Utils.LOG_WARNING("mFluid.amount: "+this.mFluid.amount); - Utils.LOG_WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); + Logger.WARNING("tFuelValue: "+tFuelValue); + Logger.WARNING("tConsumed: "+tConsumed); + Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); + Logger.WARNING("mFluid.amount: "+this.mFluid.amount); + Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); - Utils.LOG_WARNING("========================================================="); + Logger.WARNING("========================================================="); - Utils.LOG_WARNING("tFuelValue2: "+tFuelValue2); - Utils.LOG_WARNING("tConsumed2: "+tConsumed2); - Utils.LOG_WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); - Utils.LOG_WARNING("mFluid2.amount: "+this.mFluid2.amount); - Utils.LOG_WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); + Logger.WARNING("tFuelValue2: "+tFuelValue2); + Logger.WARNING("tConsumed2: "+tConsumed2); + Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); + Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount); + Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); if (this.useFuel){ this.mFluid.amount -= tFluidAmountToUse * tConsumed; @@ -313,10 +313,10 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ } else { - Utils.LOG_WARNING("========================================================="); - Utils.LOG_WARNING("Either tFluidAmountToUse1 <= 0, power cannot be increased of tFluidAmountToUse2 <= 0"); - Utils.LOG_WARNING("tFluidAmountToUse1: "+tFluidAmountToUse); - Utils.LOG_WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); + Logger.WARNING("========================================================="); + Logger.WARNING("Either tFluidAmountToUse1 <= 0, power cannot be increased of tFluidAmountToUse2 <= 0"); + Logger.WARNING("tFluidAmountToUse1: "+tFluidAmountToUse); + Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); } } else { @@ -335,12 +335,12 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ } } else { - Utils.LOG_WARNING("One mFluid is null"); + Logger.WARNING("One mFluid is null"); if (this.mFluid != null) { - Utils.LOG_WARNING("mFluid1 is not null"); + Logger.WARNING("mFluid1 is not null"); } if (this.mFluid2 != null) { - Utils.LOG_WARNING("mFluid2 is not null"); + Logger.WARNING("mFluid2 is not null"); } } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java index 289da38d53..058063a45f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java @@ -10,7 +10,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.player.PlayerCache; import gtPlusPlus.core.util.player.PlayerUtils; import net.minecraft.entity.player.EntityPlayer; @@ -201,35 +201,35 @@ public abstract class GregtechMetaSafeBlockBase extends GT_MetaTileEntity_Tiered }*/ //Utils.LOG_INFO("test"); if (this.ownerUUID == null){ - Utils.LOG_INFO("No owner yet for this block."); + Logger.INFO("No owner yet for this block."); } else { //Utils.LOG_INFO("test"); - Utils.LOG_INFO("Current Owner: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)+" - UUID: "+this.ownerUUID); + Logger.INFO("Current Owner: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)+" - UUID: "+this.ownerUUID); } - Utils.LOG_WARNING("Is ownerUUID Null"); + Logger.WARNING("Is ownerUUID Null"); if (this.ownerUUID == null){ - Utils.LOG_WARNING("OwnerUUID is Null, let's set it."); - Utils.LOG_WARNING("Accessing Players UUID is: "+tempUUID); + Logger.WARNING("OwnerUUID is Null, let's set it."); + Logger.WARNING("Accessing Players UUID is: "+tempUUID); this.ownerUUID = tempUUID; //Utils.messagePlayer(aPlayer, "Owner of this safe, now set. Try accessing it again."); - Utils.LOG_WARNING("Block Owner is now set to: "+this.ownerUUID); + Logger.WARNING("Block Owner is now set to: "+this.ownerUUID); } - Utils.LOG_WARNING("No, it is not."); - Utils.LOG_WARNING("Checking ownerUUID."); + Logger.WARNING("No, it is not."); + Logger.WARNING("Checking ownerUUID."); if (this.ownerUUID != null){ - Utils.LOG_WARNING("ownerUUID != Null, if accessor == owner."); - Utils.LOG_WARNING("Accessing is: "+PlayerCache.lookupPlayerByUUID(tempUUID)); + Logger.WARNING("ownerUUID != Null, if accessor == owner."); + Logger.WARNING("Accessing is: "+PlayerCache.lookupPlayerByUUID(tempUUID)); if (this.ownerUUID.equals(tempUUID)){ - Utils.LOG_WARNING("Owner's UUID: "+this.ownerUUID); + Logger.WARNING("Owner's UUID: "+this.ownerUUID); aBaseMetaTileEntity.openGUI(aPlayer); //Utils.LOG_WARNING("GUI should now be open for you sir."); } else { PlayerUtils.messagePlayer(aPlayer, "Access Denied, This does not belong to you."); PlayerUtils.messagePlayer(aPlayer, "it is owned by: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)); - Utils.LOG_WARNING("Expecting Player : "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)); - Utils.LOG_ERROR("Access Denied."); + Logger.WARNING("Expecting Player : "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)); + Logger.ERROR("Access Denied."); return true; } @@ -284,7 +284,7 @@ public abstract class GregtechMetaSafeBlockBase extends GT_MetaTileEntity_Tiered this.value_last = this.value_current; this.value_current = this.bUnbreakable; if (this.value_last != this.value_current){ - Utils.LOG_WARNING("VALUE CHANGE - Ticking for a moment."); + Logger.WARNING("VALUE CHANGE - Ticking for a moment."); if (this.bUnbreakable == true){ //Xasda.setmTileEntity((BaseMetaTileEntity) aBaseMetaTileEntity); //Utils.LOG_ERROR("Safe is Indestructible."); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java index 82048b17f7..d5ac473543 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java @@ -2,6 +2,11 @@ package gtPlusPlus.xmod.gregtech.api.world; import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Random; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -13,11 +18,6 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Random; - public class GTPP_Worldgen_GT_Ore_Layer extends GTPP_Worldgen { public static ArrayList sList = new ArrayList(); @@ -83,6 +83,7 @@ extends GTPP_Worldgen { } } + @Override public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { return false; //Not the correct biome for ore mix diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java index e5c9cace94..6de9fa1259 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java @@ -6,7 +6,7 @@ import java.util.List; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraftforge.oredict.OreDictionary; @@ -19,7 +19,7 @@ public class Meta_GT_Proxy { public static IIconRegister sBlockIcons, sItemIcons; public Meta_GT_Proxy() { - Utils.LOG_INFO("GT_PROXY - initialized."); + Logger.INFO("GT_PROXY - initialized."); for (final String tOreName : OreDictionary.getOreNames()) { } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java index e57a936697..89b7b728b6 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java @@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks.fluid; import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.base.cell.BaseItemCell; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.Utils; @@ -40,14 +41,14 @@ public class GregtechFluidHandler { if (!LoadedMods.ThermalFoundation){ - Utils.LOG_INFO("Adding in our own GT versions of Thermal Foundation Fluids"); + Logger.INFO("Adding in our own GT versions of Thermal Foundation Fluids"); FluidUtils.addFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); FluidUtils.addFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); FluidUtils.addFluid("ender", "Resonant Ender", GT_Materials.Ender, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Ender, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); } if (LoadedMods.IndustrialCraft2){ - Utils.LOG_INFO("Adding in GT Fluids for various nuclear related content."); + Logger.INFO("Adding in GT Fluids for various nuclear related content."); FluidUtils.addFluid("hydrofluoricAcid", "Industrial Strength Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); generateIC2FluidCell("HydrofluoricAcid"); @@ -65,10 +66,10 @@ public class GregtechFluidHandler { if (!LoadedMods.IHL || (ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null)){ if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){ if (LoadedMods.IHL){ - Utils.LOG_INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own."); + Logger.INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own."); } else { - Utils.LOG_INFO("No Suitable versions of Hydrogen Chloride available, adding our own."); + Logger.INFO("No Suitable versions of Hydrogen Chloride available, adding our own."); } FluidUtils.addFluid("hydrogenChloride", "Industrial Strength Hydrogen Chloride", GT_Materials.HydrogenChloride, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); generateIC2FluidCell("HydrogenChloride"); @@ -87,7 +88,7 @@ public class GregtechFluidHandler { } private static ItemStack generateIC2FluidCell(final String fluidNameWithCaps){ - Utils.LOG_INFO("Adding a Cell for "+fluidNameWithCaps); + Logger.INFO("Adding a Cell for "+fluidNameWithCaps); if (LoadedMods.IndustrialCraft2){ return Utils.createInternalNameAndFluidCell(fluidNameWithCaps); } @@ -95,7 +96,7 @@ public class GregtechFluidHandler { } private static ItemStack generateIC2FluidCellNoOreDict(final String fluidNameWithCaps){ - Utils.LOG_INFO("Adding a Cell for "+fluidNameWithCaps); + Logger.INFO("Adding a Cell for "+fluidNameWithCaps); if (LoadedMods.IndustrialCraft2){ return Utils.createInternalNameAndFluidCellNoOreDict(fluidNameWithCaps); } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index be1ceb2fd7..3795f9815f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; @@ -23,7 +23,7 @@ public class TexturesGtBlock { public CustomIcon(final String aIconName) { this.mIconName = aIconName; - Utils.LOG_WARNING("Constructing a Custom Texture. " + this.mIconName); + Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); GregTech_API.sGTBlockIconload.add(this); } @@ -40,7 +40,7 @@ public class TexturesGtBlock { @Override public void run() { this.mIcon = GregTech_API.sBlockIcons.registerIcon(CORE.MODID + ":" + this.mIconName); - Utils.LOG_WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath()); + Logger.WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath()); } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java index 31a95560da..db3812ad92 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java @@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; @@ -29,7 +29,7 @@ public final class TexturesGtTools { public CustomIcon(final String aIconName) { this.mIconName = aIconName; - Utils.LOG_INFO("Constructing a Custom Texture. " + this.mIconName); + Logger.INFO("Constructing a Custom Texture. " + this.mIconName); GregTech_API.sGTItemIconload.add(this); } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java index 35cf3d02e1..210603ec0d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java @@ -1,16 +1,13 @@ package gtPlusPlus.xmod.gregtech.common.helpers; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; +import java.util.*; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_ModHandler; -import gregtech.common.items.GT_MetaGenerated_Item_01; -import gregtech.common.items.GT_MetaGenerated_Item_02; -import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gregtech.common.items.*; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.array.BlockPos; import gtPlusPlus.core.util.array.Pair; @@ -184,20 +181,20 @@ public class ChargingHelper { if (mEntity == null){ return false; } - Utils.LOG_WARNING("trying to map new player"); + Logger.WARNING("trying to map new player"); if (mValidPlayers.containsKey(mPlayer)){ - Utils.LOG_WARNING("Key contains player already?"); + Logger.WARNING("Key contains player already?"); return false; } else { - Utils.LOG_WARNING("key not found, adding"); + Logger.WARNING("key not found, adding"); Pair mEntry = new Pair(mEntity, (byte) mEntity.getMode()); if (mValidPlayers.put(mPlayer, mEntry) == null){ - Utils.LOG_WARNING("Added a Player to the Tick Map."); + Logger.WARNING("Added a Player to the Tick Map."); return true; } else { - Utils.LOG_WARNING("Tried to add player but it was already there?"); + Logger.WARNING("Tried to add player but it was already there?"); return false; } } @@ -207,21 +204,21 @@ public class ChargingHelper { if (mEntity == null){ return false; } - Utils.LOG_WARNING("trying to remove player from map"); + Logger.WARNING("trying to remove player from map"); if (mValidPlayers.containsKey(mPlayer)){ - Utils.LOG_WARNING("key found, removing"); + Logger.WARNING("key found, removing"); Pair mEntry = new Pair(mEntity, (byte) mEntity.getMode()); if (mValidPlayers.remove(mPlayer, mEntry)){ - Utils.LOG_WARNING("Removed a Player to the Tick Map."); + Logger.WARNING("Removed a Player to the Tick Map."); return true; } else { - Utils.LOG_WARNING("Tried to remove player but it was not there?"); + Logger.WARNING("Tried to remove player but it was not there?"); return false; } } else { - Utils.LOG_WARNING("Key does not contain player?"); + Logger.WARNING("Key does not contain player?"); return false; } } @@ -268,17 +265,17 @@ public class ChargingHelper { for (ItemStack mTemp : mItems){ mItemSlot++; if (mTemp != null){ - Utils.LOG_WARNING("Slot "+mItemSlot+" contains "+mTemp.getDisplayName()); + Logger.WARNING("Slot "+mItemSlot+" contains "+mTemp.getDisplayName()); } //Is item Electrical if (isItemValid(mTemp)){ - Utils.LOG_WARNING("1"); + Logger.WARNING("1"); //Transfer Limit double mItemEuTLimit = ((IElectricItem) mTemp.getItem()).getTransferLimit(mTemp); //Check if Tile has more or equal EU to what can be transferred into the item. if (mEuStored >= mItemEuTLimit){ - Utils.LOG_WARNING("2"); + Logger.WARNING("2"); double mItemMaxCharge = ((IElectricItem) mTemp.getItem()).getMaxCharge(mTemp); double mitemCurrentCharge = ElectricItem.manager.getCharge(mTemp); @@ -289,7 +286,7 @@ public class ChargingHelper { //Try get charge direct from NBT for GT and IC2 stacks try { - Utils.LOG_WARNING("3"); + Logger.WARNING("3"); if (mTemp.getItem() instanceof GT_MetaGenerated_Tool_01 || mTemp.getItem() instanceof GT_MetaGenerated_Item_01 || mTemp.getItem() instanceof GT_MetaGenerated_Item_02 @@ -327,7 +324,7 @@ public class ChargingHelper { mVoltageIncrease = mItemEuTLimit; } - Utils.LOG_WARNING("4"); + Logger.WARNING("4"); int mMulti; if ((mitemCurrentCharge + (mVoltageIncrease*20)) <= (mItemMaxCharge - (mVoltageIncrease*20))){ @@ -342,15 +339,15 @@ public class ChargingHelper { else { mMulti = 1; } - Utils.LOG_WARNING("5"); + Logger.WARNING("5"); int mMultiVoltage = (int) (mMulti*mVoltageIncrease); if ((mitemCurrentCharge + mMultiVoltage) <= mItemMaxCharge){ - Utils.LOG_WARNING("6"); + Logger.WARNING("6"); if (GT_ModHandler.chargeElectricItem(mTemp, mMultiVoltage, mTier, true, false) == 0){ - Utils.LOG_WARNING("6.5"); + Logger.WARNING("6.5"); for (int i=0; i mitemCurrentCharge){ - Utils.LOG_WARNING("7"); - mEntity.setEUVar((long) (mEuStored-(mVoltage*mMulti))); + Logger.WARNING("7"); + mEntity.setEUVar(mEuStored-(mVoltage*mMulti)); mEuStored = mEntity.getEUVar(); - Utils.LOG_WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp)); + Logger.WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp)); mChargedItems++; } } @@ -371,7 +368,7 @@ public class ChargingHelper { } else { if (mTemp != null){ - Utils.LOG_WARNING("Found Non-Valid item. "+mTemp.getDisplayName()); + Logger.WARNING("Found Non-Valid item. "+mTemp.getDisplayName()); } } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java index e3bfc81291..6a69c9f61a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java @@ -1,7 +1,7 @@ package gtPlusPlus.xmod.gregtech.common.helpers; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Container; import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GT4Entity_AutoCrafter; @@ -23,7 +23,7 @@ public class CraftingHelper{ public final AC_Helper_Container inventory; public CraftingHelper(GT4Entity_AutoCrafter AC){ - Utils.LOG_INFO("[A-C] Created a crafting helper."); + Logger.INFO("[A-C] Created a crafting helper."); crafter = AC; AC_Helper_Utils.addCrafter(AC); //Get some variables. diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java index 3a0031c5d3..d023307820 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java @@ -9,9 +9,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.GT_MetaGenerated_Item_02; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.slots.SlotBuzzSaw.SAWTOOL; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.fluid.FluidUtils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.particles.BlockBreakParticles; @@ -121,7 +121,7 @@ public class TreeFarmHelper { } final BonemealEvent event = new BonemealEvent(player, world, block, intX, intY, intZ); if (MinecraftForge.EVENT_BUS.post(event)){ - Utils.LOG_MACHINE_INFO("Not sure why this returned false"); + Logger.MACHINE_INFO("Not sure why this returned false"); return false; } if (event.getResult() == Result.ALLOW){ @@ -145,7 +145,7 @@ public class TreeFarmHelper { } public static boolean cleanUp(final IGregTechTileEntity aBaseMetaTileEntity){ - Utils.LOG_MACHINE_INFO("called cleanUp()"); + Logger.MACHINE_INFO("called cleanUp()"); int cleanedUp = 0; final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 11; final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 11; @@ -173,7 +173,7 @@ public class TreeFarmHelper { )){ if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) { - Utils.LOG_INFO("5:"+testBlock.getUnlocalizedName()); + Logger.WARNING("5:"+testBlock.getUnlocalizedName()); } else { aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.bookshelf); } @@ -193,14 +193,14 @@ public class TreeFarmHelper { ){ if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) { - Utils.LOG_INFO("0:"+testBlock.getUnlocalizedName()); + Logger.WARNING("0:"+testBlock.getUnlocalizedName()); } else { aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.melon_block); } if (TreefarmManager.isLeaves(testBlock) || TreefarmManager.isWoodLog(testBlock)){ - Utils.LOG_INFO("1:"+testBlock.getUnlocalizedName()); + Logger.WARNING("1:"+testBlock.getUnlocalizedName()); int posiX, posiY, posiZ; posiX = aBaseMetaTileEntity.getXCoord()+xDir+i; posiY = aBaseMetaTileEntity.getYCoord()+h; @@ -211,11 +211,11 @@ public class TreeFarmHelper { new BlockBreakParticles(aBaseMetaTileEntity.getWorld(), posiX, posiY, posiZ, Blocks.dirt); } else { - //Utils.LOG_INFO("2:"+testBlock.getUnlocalizedName()); + //Utils.LOG_WARNING("2:"+testBlock.getUnlocalizedName()); } } else { - //Utils.LOG_INFO("1"); + //Util