diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2017-12-20 23:39:49 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-12-20 23:39:49 +1000 |
| commit | 5715a32d2901922503fd850f3a68503fb77467c3 (patch) | |
| tree | 7e12520fbc23844e99493d55af4410a785538e35 /src/Java/gtPlusPlus/xmod/thermalfoundation | |
| parent | 2a4795f65d98ff60a177d7d6a5552fd687d9f6e8 (diff) | |
| download | GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.tar.gz GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.tar.bz2 GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.zip | |
- 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.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/thermalfoundation')
3 files changed, 17 insertions, 25 deletions
diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java index 82b15e6968..0480641e32 100644 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java +++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java @@ -1,11 +1,10 @@ package gtPlusPlus.xmod.thermalfoundation; -import java.lang.reflect.Field; +import static gtPlusPlus.GTplusplus.mGregMatLoader; import gregtech.api.enums.Materials; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.thermalfoundation.block.TF_Blocks; import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; @@ -20,14 +19,7 @@ public class HANDLER_TF{ TF_Blocks.preInit(); if (LoadedMods.Gregtech){ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - Field f; - try { - f = Materials.class.getField("mHasParentMod"); - f.setAccessible(true); - f.set(Materials.Enderium, true); - Utils.LOG_INFO("Re-enabled Enderium."); - } - catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {} + mGregMatLoader.enableMaterial(Materials.Enderium); } } } diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java index 40c5de8de4..082786cc4a 100644 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java +++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java @@ -2,8 +2,8 @@ package gtPlusPlus.xmod.thermalfoundation.fluid; import cofh.core.util.fluid.DispenserEmptyBucketHandler; import cofh.core.util.fluid.DispenserFilledBucketHandler; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; import net.minecraft.block.BlockDispenser; import net.minecraft.init.Items; @@ -20,42 +20,42 @@ public class TF_Fluids public static void preInit() { if (!LoadedMods.ThermalFoundation){ - Utils.LOG_INFO("Adding in our own versions of Thermal Foundation Fluids - Non-GT"); + Logger.INFO("Adding in our own versions of Thermal Foundation Fluids - Non-GT"); final Fluid pyrotheum = FluidRegistry.getFluid("pyrotheum"); final Fluid cryotheum = FluidRegistry.getFluid("cryotheum"); final Fluid ender = FluidRegistry.getFluid("ender"); if (pyrotheum == null){ - Utils.LOG_INFO("Registering Blazing Pyrotheum as it does not exist."); + Logger.INFO("Registering Blazing Pyrotheum as it does not exist."); fluidPyrotheum = new Fluid("pyrotheum").setLuminosity(15).setDensity(2000).setViscosity(1200).setTemperature(4000).setRarity(EnumRarity.rare); registerFluid(fluidPyrotheum, "pyrotheum"); } else { - Utils.LOG_INFO("Registering Blazing Pyrotheum as it is an already existing Fluid."); + Logger.INFO("Registering Blazing Pyrotheum as it is an already existing Fluid."); fluidPyrotheum = pyrotheum; } if (cryotheum == null){ - Utils.LOG_INFO("Registering Gelid Cryotheum as it does not exist."); + Logger.INFO("Registering Gelid Cryotheum as it does not exist."); fluidCryotheum = new Fluid("cryotheum").setLuminosity(0).setDensity(4000).setViscosity(3000).setTemperature(50).setRarity(EnumRarity.rare); registerFluid(fluidCryotheum, "cryotheum"); } else { - Utils.LOG_INFO("Registering Gelid Cryotheum as it is an already existing Fluid."); + Logger.INFO("Registering Gelid Cryotheum as it is an already existing Fluid."); fluidCryotheum = cryotheum; } if (ender == null){ - Utils.LOG_INFO("Registering Resonant Ender as it does not exist."); + Logger.INFO("Registering Resonant Ender as it does not exist."); fluidEnder = new Fluid("ender").setLuminosity(3).setDensity(4000).setViscosity(3000).setTemperature(300).setRarity(EnumRarity.uncommon); registerFluid(fluidEnder, "ender"); } else { - Utils.LOG_INFO("Registering Resonant Ender as it is an already existing Fluid."); + Logger.INFO("Registering Resonant Ender as it is an already existing Fluid."); fluidEnder = ender; } } else { - Utils.LOG_INFO("Thermal Foundation is already loaded, no need to add our own Cryotheum/Pyrotheum."); + Logger.INFO("Thermal Foundation is already loaded, no need to add our own Cryotheum/Pyrotheum."); } } diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java index c3efae0782..7864aab278 100644 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java +++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java @@ -3,7 +3,7 @@ package gtPlusPlus.xmod.thermalfoundation.recipe; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; import net.minecraft.init.Items; @@ -27,27 +27,27 @@ public class TF_Gregtech_Recipes { final FluidStack moltenRedstone = getFluidStack("molten.redstone", 250); //Gelid Cryotheum - Utils.LOG_INFO("Adding Recipes for Gelid Cryotheum"); + Logger.INFO("Adding Recipes for Gelid Cryotheum"); GT_Values.RA.addFluidExtractionRecipe(dust_Cryotheum, GT_Values.NI, getFluidStack("cryotheum", 250), 10000, 200, 240); GT_Values.RA.addChemicalBathRecipe((GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Cinnabar, 1L)), getFluidStack("cryotheum", 200), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cinnabar, 3L), GT_Values.NI, GT_Values.NI, null, 400, 30); //Blizz Powder - Utils.LOG_INFO("Adding Recipes for Blizz Powder"); + Logger.INFO("Adding Recipes for Blizz Powder"); GT_Values.RA.addChemicalBathRecipe(new ItemStack(Items.snowball, 4), moltenRedstone, dust_Blizz, GT_Values.NI, GT_Values.NI, null, 400, 240); //Blizz Rod - Utils.LOG_INFO("Adding Recipes for Blizz Rod"); + Logger.INFO("Adding Recipes for Blizz Rod"); GT_Values.RA.addVacuumFreezerRecipe(new ItemStack(Items.blaze_rod), rod_Blizz, (int) Math.max((Materials.Blaze.getMass()*4) * 3L, 1L)); GT_ModHandler.addPulverisationRecipe(rod_Blizz, dust_Blizz3, new ItemStack(Items.snowball, 1), 50, false); //Blazing Pyrotheum - Utils.LOG_INFO("Adding Recipes for Blazing Pyrotheum"); + Logger.INFO("Adding Recipes for Blazing Pyrotheum"); GT_Values.RA.addFluidExtractionRecipe(dust_Pyrotheum, GT_Values.NI, getFluidStack("pyrotheum", 250), 10000, 200, 240); } private static FluidStack getFluidStack(final String fluidName, final int amount){ - Utils.LOG_WARNING("Trying to get a fluid stack of "+fluidName); + Logger.WARNING("Trying to get a fluid stack of "+fluidName); try { return FluidRegistry.getFluidStack(fluidName, amount); } |
