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. --- .../xmod/bop/blocks/base/LeavesBase.java | 3 +- .../xmod/bop/blocks/base/SaplingBase.java | 19 +- .../blocks/rainforest/SaplingRainforestTree.java | 4 +- .../features/trees/WorldGenRainForestTree_Ex.java | 30 +-- src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java | 4 +- .../forestry/bees/custom/GTPP_Bee_Definition.java | 30 +-- .../xmod/forestry/bees/custom/GTPP_Bees.java | 72 ++--- .../bees/custom/GTPP_Branch_Definition.java | 18 +- .../bees/inventory/InventoryDenseBeeHouse.java | 12 +- .../xmod/forestry/trees/TreefarmManager.java | 6 +- .../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 +- .../xmod/growthcraft/fishtrap/FishTrapHandler.java | 10 +- .../gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java | 16 +- .../gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java | 8 +- .../thaumcraft/common/ItemBlockThaumcraft.java | 1 + .../thaumcraft/common/tile/TCTileEntities.java | 4 +- .../xmod/thermalfoundation/HANDLER_TF.java | 12 +- .../xmod/thermalfoundation/fluid/TF_Fluids.java | 18 +- .../recipe/TF_Gregtech_Recipes.java | 12 +- 132 files changed, 1735 insertions(+), 1384 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java (limited to 'src/Java/gtPlusPlus/xmod') diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java index 6ac0800b85..93a8d1febb 100644 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java +++ b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java @@ -7,6 +7,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; @@ -58,7 +59,7 @@ public class LeavesBase extends BlockLeaves { } } else { - Utils.LOG_WARNING("Unable to drop anything, Leaf Type array and Loot array are different sizes."); + Logger.WARNING("Unable to drop anything, Leaf Type array and Loot array are different sizes."); } } diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java index a4346622a1..727b36638e 100644 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java +++ b/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java @@ -7,6 +7,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; @@ -59,7 +60,7 @@ public class SaplingBase extends BlockSapling try { return this.saplingTextures[meta]; }catch(Throwable T){ - Utils.LOG_WARNING("Invalid Sapling meta is "+meta); + Logger.WARNING("Invalid Sapling meta is "+meta); return this.saplingTextures[0]; } } @@ -72,11 +73,11 @@ public class SaplingBase extends BlockSapling if (!world.isRemote){ super.updateTick(world, x, y, z, rand); if (world.getBlockLightValue(x, y + 1, z) >= 9 && rand.nextInt(7) == 0){ - Utils.LOG_WARNING("Update Tick"); + Logger.WARNING("Update Tick"); this.updateMeta(world, x, y, z, rand); } else { - Utils.LOG_WARNING("Tried to Tick."); + Logger.WARNING("Tried to Tick."); } } } @@ -84,7 +85,7 @@ public class SaplingBase extends BlockSapling //Dunno - Think it is doGrow || doGrowthTick @Override public void func_149853_b(World world, Random rand, int x, int y, int z){ - Utils.LOG_WARNING("Please find what calls me - func_149853_b"); + Logger.WARNING("Please find what calls me - func_149853_b"); this.updateMeta(world, x, y, z, rand); } @@ -94,22 +95,22 @@ public class SaplingBase extends BlockSapling @Override public void func_149879_c(World world, int x, int y, int z, Random rand){ - Utils.LOG_WARNING("func_149879_c - 1"); + Logger.WARNING("func_149879_c - 1"); int l = world.getBlockMetadata(x, y, z); if ((l & 8) == 0){ - Utils.LOG_WARNING("func_149879_c - 2"); + Logger.WARNING("func_149879_c - 2"); world.setBlockMetadataWithNotify(x, y, z, l | 8, 4); } else{ - Utils.LOG_WARNING("func_149879_c - 3"); + Logger.WARNING("func_149879_c - 3"); this.func_149878_d(world, x, y, z, rand); } } @Override public void func_149878_d(World world, int x, int y, int z, Random rand){ - Utils.LOG_WARNING("func_149878_d - 1"); + Logger.WARNING("func_149878_d - 1"); if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; int l = world.getBlockMetadata(x, y, z) & 7; Object object = rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true); @@ -121,7 +122,7 @@ public class SaplingBase extends BlockSapling { case 0: default: - Utils.LOG_WARNING("Case 0 - Grow Tree"); + Logger.WARNING("Case 0 - Grow Tree"); break; } diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java index 0cd76fa734..26accd283e 100644 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java +++ b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java @@ -2,7 +2,7 @@ package gtPlusPlus.xmod.bop.blocks.rainforest; import java.util.Random; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; import gtPlusPlus.xmod.bop.blocks.base.SaplingBase; import gtPlusPlus.xmod.bop.world.features.trees.WorldGenRainForestTree_Ex; @@ -19,7 +19,7 @@ public class SaplingRainforestTree extends SaplingBase { @Override public void func_149878_d(World world, int x, int y, int z, Random rand){ - Utils.LOG_WARNING("func_149878_d - 1"); + Logger.WARNING("func_149878_d - 1"); if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; int l = world.getBlockMetadata(x, y, z) & 7; rand.nextInt(10); diff --git a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java index 15ce246515..2357fe4ea6 100644 --- a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java +++ b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java @@ -2,7 +2,7 @@ package gtPlusPlus.xmod.bop.world.features.trees; import java.util.Random; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import net.minecraft.block.Block; import net.minecraft.block.BlockSapling; import net.minecraft.init.Blocks; @@ -74,23 +74,23 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ block2.onPlantGrow(world, x, y - 1, z, x, y, z); byte b0 = 3; byte b1 = 0; - Utils.LOG_WARNING("Sapling located at X:"+x+" | Y:"+y+" | Z:"+z); + Logger.WARNING("Sapling located at X:"+x+" | Y:"+y+" | Z:"+z); for (int k1 = y - b0 + treeHeight; k1 <= y + treeHeight; k1++) { - Utils.LOG_WARNING("[1]| k1 = "+k1+" | y = "+y+" | b0 = "+b0+" | l = "+treeHeight+" | "); + Logger.WARNING("[1]| k1 = "+k1+" | y = "+y+" | b0 = "+b0+" | l = "+treeHeight+" | "); int i3 = k1 - (y + treeHeight); int l1 = b1 + 1 - i3; for (int i2 = x - l1; i2 <= x + l1; i2++){ int j2 = i2 - x; - Utils.LOG_WARNING("[2]| i2 = "+i2+" | x = "+x+" | l1 = "+l1+" | j2 = "+j2+" | "); + Logger.WARNING("[2]| i2 = "+i2+" | x = "+x+" | l1 = "+l1+" | j2 = "+j2+" | "); for (int k2 = z - l1; k2 <= z + l1; k2++){ int l2 = k2 - z; - Utils.LOG_WARNING("[3]| k2 = "+k2+" | z = "+z+" | l1 = "+l1+" | l2 = "+l2+" | "); + Logger.WARNING("[3]| k2 = "+k2+" | z = "+z+" | l1 = "+l1+" | l2 = "+l2+" | "); if ((Math.abs(j2) != l1) || (Math.abs(l2) != l1) || ((random.nextInt(2) != 0) && (i3 != 0))) { Block block1 = world.getBlock(i2, k1, k2); if ((block1.isAir(world, i2, k1, k2)) || (block1.isLeaves(world, i2, k1, k2))) { - Utils.LOG_WARNING("Setting something as leaves?"); + Logger.WARNING("Setting something as leaves?"); setBlockAndNotifyAdequately(world, i2, k1, k2, this.leaves, this.leavesMeta); } } @@ -99,7 +99,7 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ } for (int k1 = 0; k1 < treeHeight; k1++) { - Utils.LOG_WARNING("Building tree - Layer "+k1+" | Max height is "+treeHeight); + Logger.WARNING("Building tree - Layer "+k1+" | Max height is "+treeHeight); Block block = world.getBlock(x, y + k1, z); if ((block.isAir(world, x, y + k1, z)) || (block.isLeaves(world, x, y + k1, z))){ setBlockAndNotifyAdequately(world, x, y + k1, z, this.wood, this.woodMeta); @@ -118,10 +118,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ for (int xDir = -5; xDir <= 5; xDir++){ for (int zDir = -5; zDir <= 5; zDir++){ if (canRemoveLeafBlockLayer2(-5, 5, xDir, -5, 5, zDir)){ - Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+" z="+zDir); + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+" z="+zDir); } else { - Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+" z="+zDir); + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+" z="+zDir); block5 = world.getBlock(x+xDir, y+k1, z+zDir); if (block5.isAir(world, x+xDir, y+k1, x+zDir)){ setBlockAndNotifyAdequately(world, x+xDir, y + k1, z+zDir, this.leaves, this.leavesMeta); @@ -133,10 +133,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ for (int xDir = -4; xDir <= 4; xDir++){ for (int zDir = -4; zDir <= 4; zDir++){ if (canRemoveLeafBlockLayer2(-4, 4, xDir, -4, 4, zDir)){ - Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+1+" z="+zDir); + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+1+" z="+zDir); } else { - Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y + k1 + 1+" z="+zDir); + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y + k1 + 1+" z="+zDir); block5 = world.getBlock(x+xDir, y+k1 + 1, z+zDir); if (block5.isAir(world, x+xDir, y+k1 + 1, x+zDir)){ setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 1, z+zDir, this.leaves, this.leavesMeta); @@ -149,10 +149,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ for (int xDir = -3; xDir <= 3; xDir++){ for (int zDir = -3; zDir <= 3; zDir++){ if (canRemoveLeafBlockLayer2(-3, 3, xDir, -3, 3, zDir)){ - Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); } else { - Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); block5 = world.getBlock(x+xDir, y+k1+2, z+zDir); if (block5.isAir(world, x+xDir, y+k1+2, x+zDir)){ setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 2, z+zDir, this.leaves, this.leavesMeta); @@ -165,10 +165,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ for (int xDir = -2; xDir <= 2; xDir++){ for (int zDir = -2; zDir <= 2; zDir++){ if (canRemoveLeafBlockLayer2(-2, 2, xDir, -2, 2, zDir)){ - Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); } else { - Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); block5 = world.getBlock(x+xDir, y+k1+3, z+zDir); if (block5.isAir(world, x+xDir, y+k1+3, x+zDir)){ setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 3, z+zDir, this.leaves, this.leavesMeta); diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java index 9bdf9a83dd..dbc0589fd2 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java +++ b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java @@ -6,8 +6,6 @@ import java.lang.reflect.Method; import cpw.mods.fml.common.Optional; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.forestry.bees.custom.GTPP_Bees; -import gtPlusPlus.xmod.forestry.bees.custom.GTPP_Branch_Definition; import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry; import gtPlusPlus.xmod.forestry.bees.recipe.FR_Gregtech_Recipes; import net.minecraft.block.Block; @@ -23,7 +21,7 @@ public class HANDLER_FR { public static void Init(){ if (LoadedMods.Forestry){ - new GTPP_Bees(); + //new GTPP_Bees(); TODO- Will Investigate this properly later. } } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java index f33d99af29..7e3738d9fb 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java @@ -1,31 +1,27 @@ package gtPlusPlus.xmod.forestry.bees.custom; +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.Locale; + +import org.apache.commons.lang3.reflect.FieldUtils; +import org.apache.commons.lang3.text.WordUtils; + import forestry.api.apiculture.*; import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAllele; -import forestry.apiculture.genetics.Bee; -import forestry.apiculture.genetics.BeeDefinition; -import forestry.apiculture.genetics.BeeVariation; -import forestry.apiculture.genetics.IBeeDefinition; +import forestry.apiculture.genetics.*; import forestry.core.genetics.alleles.AlleleHelper; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.BiomeDictionary.Type; -import org.apache.commons.lang3.reflect.FieldUtils; -import org.apache.commons.lang3.text.WordUtils; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Locale; - public enum GTPP_Bee_Definition implements IBeeDefinition { @@ -814,10 +810,10 @@ public enum GTPP_Bee_Definition implements IBeeDefinition { protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) { IAllele[] template = getTemplate(); - Utils.LOG_INFO("[Bees-Debug] parent1: "+(parent1 != null)); - Utils.LOG_INFO("[Bees-Debug] parent2: "+(parent2 != null)); - Utils.LOG_INFO("[Bees-Debug] chance: "+(chance)); - Utils.LOG_INFO("[Bees-Debug] template: "+(template != null)); + Logger.DEBUG_BEES("parent1: "+(parent1 != null)); + Logger.DEBUG_BEES("parent2: "+(parent2 != null)); + Logger.DEBUG_BEES("chance: "+(chance)); + Logger.DEBUG_BEES("template: "+(template != null)); return BeeManager.beeMutationFactory.createMutation(parent1, parent2, template, chance); } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java index 0d15f16964..9e24eb5a53 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java @@ -1,5 +1,7 @@ package gtPlusPlus.xmod.forestry.bees.custom; +import static gtPlusPlus.GTplusplus.mGregMatLoader; + import java.lang.reflect.*; import org.apache.commons.lang3.reflect.FieldUtils; @@ -8,14 +10,15 @@ import cpw.mods.fml.common.Loader; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAllele; import gregtech.GT_Mod; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.base.ingots.BaseItemIngot_OLD; import gtPlusPlus.core.item.base.misc.BaseItemMisc; import gtPlusPlus.core.item.base.misc.BaseItemMisc.MiscTypes; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.fluid.FluidUtils; import gtPlusPlus.core.util.item.ItemUtils; -import gtPlusPlus.core.util.materials.MaterialUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -48,11 +51,11 @@ public class GTPP_Bees { if (Loader.isModLoaded("Forestry") /*&& tryGetBeesBoolean()*/) { for (IAllele o : AlleleManager.alleleRegistry.getRegisteredAlleles().values()){ - //Utils.LOG_INFO("[Bees-Debug] =================================================="); - //Utils.LOG_INFO("[Bees-Debug] Name: "+o.getName()); - //Utils.LOG_INFO("[Bees-Debug] Name: "+o.getUnlocalizedName()); - //Utils.LOG_INFO("[Bees-Debug] getUID: "+o.getUID()); - //Utils.LOG_INFO("[Bees-Debug] isDominant: "+o.isDominant()); + //Utils.LOG_DEBUG_BEES(" =================================================="); + //Utils.LOG_DEBUG_BEES(" Name: "+o.getName()); + //Utils.LOG_DEBUG_BEES(" Name: "+o.getUnlocalizedName()); + //Utils.LOG_DEBUG_BEES(" getUID: "+o.getUID()); + //Utils.LOG_DEBUG_BEES(" isDominant: "+o.isDominant()); } //Set Materials and Comb stacks from GT via Reflection @@ -65,7 +68,7 @@ public class GTPP_Bees { GTPP_Bee_Definition.initBees(); } catch (Throwable t){ - Utils.LOG_INFO("[Bees] Failed to load bees, probably due to an ancient forestry version"); + Logger.BEES("Failed to load bees, probably due to an ancient forestry version"); t.printStackTrace(); } } @@ -73,19 +76,22 @@ public class GTPP_Bees { private void setCustomItems() { dropForceGem = new BaseItemMisc("Force", new short[]{250, 250, 20}, 64, MiscTypes.GEM, null); - MaterialUtils.tryEnableMaterial(Materials.Force); - MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force); - MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force); + mGregMatLoader.enableMaterial(Materials.Force); + //MaterialUtils.tryEnableMaterial(Materials.Force); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force); dropBiomassBlob = new BaseItemMisc("Biomass", new short[]{33, 225, 24}, 64, MiscTypes.DROP, null); dropEthanolBlob = new BaseItemMisc("Ethanol", new short[]{255, 128, 0}, 64, MiscTypes.DROP, null); //Nikolite may not exist, so lets make it. dropNikoliteDust = ItemUtils.generateSpecialUseDusts("Nikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200))[2]; - MaterialUtils.tryEnableMaterial(Materials.Nikolite); - MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite); - MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite); - MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite); - MaterialUtils.tryEnableMaterial(Materials.BlueAlloy); + mGregMatLoader.enableMaterial(Materials.BlueAlloy); + mGregMatLoader.enableMaterial(Materials.Nikolite); + //MaterialUtils.tryEnableMaterial(Materials.Nikolite); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite); + //MaterialUtils.tryEnableMaterial(Materials.BlueAlloy); if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotNikolite", 1) == null){ new BaseItemIngot_OLD("itemIngotNikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200), 0); } @@ -136,22 +142,22 @@ public class GTPP_Bees { Enum gtCombTypeStone = Enum.valueOf(gtCombEnumClass, "STONE"); Object oCombObject = gtCombs.get(null); - Utils.LOG_INFO("[Bees-Debug] Field getModifiers: "+gtCombs.getModifiers()); - Utils.LOG_INFO("[Bees-Debug] Field toGenericString: "+gtCombs.toGenericString()); - Utils.LOG_INFO("[Bees-Debug] Field getClass: "+gtCombs.getClass()); - Utils.LOG_INFO("[Bees-Debug] Field isEnumConstant: "+gtCombs.isEnumConstant()); - Utils.LOG_INFO("[Bees-Debug] Field isSynthetic: "+gtCombs.isSynthetic()); - Utils.LOG_INFO("[Bees-Debug] Field get(gtBees) != null: "+(gtCombs.get(gtBees) != null)); - Utils.LOG_INFO("[Bees-Debug] Field isAccessible: "+gtCombs.isAccessible()); + Logger.DEBUG_BEES("Field getModifiers: "+gtCombs.getModifiers()); + Logger.DEBUG_BEES("Field toGenericString: "+gtCombs.toGenericString()); + Logger.DEBUG_BEES("Field getClass: "+gtCombs.getClass()); + Logger.DEBUG_BEES("Field isEnumConstant: "+gtCombs.isEnumConstant()); + Logger.DEBUG_BEES("Field isSynthetic: "+gtCombs.isSynthetic()); + Logger.DEBUG_BEES("Field get(gtBees) != null: "+(gtCombs.get(gtBees) != null)); + Logger.DEBUG_BEES("Field isAccessible: "+gtCombs.isAccessible()); - Utils.LOG_INFO("[Bees] gtBees: "+(gtBees != null)); - Utils.LOG_INFO("[Bees] gtCombItemClass: "+(gtCombItemClass != null)); - Utils.LOG_INFO("[Bees] gtCombEnumClass: "+(gtCombEnumClass != null)); - Utils.LOG_INFO("[Bees] gtCombs: "+(gtCombs != null)); - Utils.LOG_INFO("[Bees] gtCombTypeSlag: "+(gtCombTypeSlag != null)); - Utils.LOG_INFO("[Bees] gtCombTypeStone: "+(gtCombTypeStone != null)); - Utils.LOG_INFO("[Bees] oCombObject: "+(oCombObject != null)); + Logger.BEES("gtBees: "+(gtBees != null)); + Logger.BEES("gtCombItemClass: "+(gtCombItemClass != null)); + Logger.BEES("gtCombEnumClass: "+(gtCombEnumClass != null)); + Logger.BEES("gtCombs: "+(gtCombs != null)); + Logger.BEES("gtCombTypeSlag: "+(gtCombTypeSlag != null)); + Logger.BEES("gtCombTypeStone: "+(gtCombTypeStone != null)); + Logger.BEES("oCombObject: "+(oCombObject != null)); //if (gtCombItemClass.isInstance(oCombObject)){ @@ -159,7 +165,7 @@ public class GTPP_Bees { getStackForType = gtCombItemClass.getDeclaredMethod("getStackForType", gtCombEnumClass); if (getStackForType != null) { - Utils.LOG_INFO("[Bees] Found Method: getStackForType"); + Logger.BEES("Found Method: getStackForType"); } if (Comb_Slag == null){ Comb_Slag = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeSlag); @@ -169,12 +175,12 @@ public class GTPP_Bees { } /*} else { - Utils.LOG_INFO("[Bees] oCombObject was not an instance of gregtech.common.items.ItemComb"); + Utils.LOG_BEES("oCombObject was not an instance of gregtech.common.items.ItemComb"); }*/ } catch (NullPointerException | ClassNotFoundException | IllegalArgumentException | IllegalAccessException | NoSuchMethodException | SecurityException | InvocationTargetException e){ - Utils.LOG_INFO("[Bees] Bad Reflection. setMaterials()"); + Logger.BEES("Bad Reflection. setMaterials()"); } PTFE = trySetValue("Polytetrafluoroethylene"); diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java index add7198bd8..f59f0c537f 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java @@ -5,7 +5,7 @@ import java.lang.reflect.Method; import forestry.api.genetics.IAllele; import forestry.api.genetics.IClassification; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; public enum GTPP_Branch_Definition { @@ -29,14 +29,14 @@ public enum GTPP_Branch_Definition { Enum enumA = mActualValues; Method methodMyMethod = gtBranchDefClass.getMethod("getTemplate"); - Utils.LOG_INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); - Utils.LOG_INFO("[Bees] enumA: "+(enumA != null)); - Utils.LOG_INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); + Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); + Logger.INFO("[Bees] enumA: "+(enumA != null)); + Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); return (IAllele[]) methodMyMethod.invoke(enumA); } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Utils.LOG_INFO("[Bees] Bad Reflection. getTemplate()"); + Logger.INFO("[Bees] Bad Reflection. getTemplate()"); e.printStackTrace(); //gregtech.loaders.misc.GT_BranchDefinition.getTemplate() return null; @@ -51,14 +51,14 @@ public enum GTPP_Branch_Definition { Method methodMyMethod = gtBranchDefClass.getMethod("getBranch"); - Utils.LOG_INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); - Utils.LOG_INFO("[Bees] enum_MY_SAMPLE_ENUM: "+(enum_MY_SAMPLE_ENUM != null)); - Utils.LOG_INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); + Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); + Logger.INFO("[Bees] enum_MY_SAMPLE_ENUM: "+(enum_MY_SAMPLE_ENUM != null)); + Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); return (IClassification) methodMyMethod.invoke(enum_MY_SAMPLE_ENUM); } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Utils.LOG_INFO("[Bees] Bad Reflection. getBranch()"); + Logger.INFO("[Bees] Bad Reflection. getBranch()"); e.printStackTrace(); return null; } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java index 6b21461b62..5cb1d06982 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java @@ -13,18 +13,13 @@ package gtPlusPlus.xmod.forestry.bees.inventory; import java.util.ArrayList; import java.util.Collection; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import forestry.api.apiculture.BeeManager; -import forestry.api.apiculture.IBee; -import forestry.api.apiculture.IBeeHousing; -import forestry.api.apiculture.IBeekeepingMode; -import forestry.api.apiculture.IHiveFrame; +import forestry.api.apiculture.*; import forestry.apiculture.InventoryBeeHousing; import forestry.apiculture.inventory.IApiaryInventory; import forestry.core.access.IAccessHandler; import forestry.core.utils.SlotUtil; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApiaryInventory { public static final int SLOT_FRAMES_1 = 9; @@ -70,6 +65,7 @@ public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApia return hiveFrames; } + @Override public void wearOutFrames(IBeeHousing beeHousing, int amount) { IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(beeHousing.getWorld()); int wear = Math.round(amount * beekeepingMode.getWearModifier()); diff --git a/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java b/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java index 74a627b2c5..9aea37e0d4 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java +++ b/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java @@ -2,8 +2,8 @@ package gtPlusPlus.xmod.forestry.trees; import cpw.mods.fml.common.Optional; import gregtech.api.enums.OrePrefixes; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.block.Block; @@ -100,10 +100,10 @@ public class TreefarmManager { public static boolean isSapling(final Block log){ if (log != null){ if (OrePrefixes.sapling.contains(new ItemStack(log, 1))){ - Utils.LOG_INFO(""+log.getLocalizedName()); + Logger.INFO(""+log.getLocalizedName()); } if (log.getLocalizedName().toLowerCase().contains("sapling")){ - Utils.LOG_INFO(""+log.getLocalizedName()); + Logger.INFO(""+log.getLocalizedName()); return true; } } 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); + Log