diff options
author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-08-29 16:04:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 16:04:28 +0200 |
commit | 7d1f51a8937e0a86486267437d444696e81e8aa0 (patch) | |
tree | a5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java | |
parent | 5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff) | |
download | GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2 GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip |
Buildscript + Spotless (#318)
* Convert AES.java to readable class
* Buildscript
* Spotless
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java | 159 |
1 files changed, 77 insertions, 82 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java b/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java index 4a3f9cd504..25fa989551 100644 --- a/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java +++ b/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.tinkers; -import java.lang.reflect.Field; - import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.lib.LoadedMods; @@ -9,97 +7,94 @@ import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.tinkers.material.BaseTinkersMaterial; import gtPlusPlus.xmod.tinkers.util.TinkersDryingRecipe; import gtPlusPlus.xmod.tinkers.util.TinkersUtils; +import java.lang.reflect.Field; import net.minecraft.block.Block; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; public class HANDLER_Tinkers { - public static AutoMap<BaseTinkersMaterial> mTinkerMaterials = new AutoMap<BaseTinkersMaterial>(); - - public static final void preInit() { - if (LoadedMods.TiCon) { - - } - } + public static AutoMap<BaseTinkersMaterial> mTinkerMaterials = new AutoMap<BaseTinkersMaterial>(); - public static final void init() { - if (LoadedMods.TiCon) { + public static final void preInit() { + if (LoadedMods.TiCon) {} + } - } - } + public static final void init() { + if (LoadedMods.TiCon) {} + } - public static final void postInit() { - if (LoadedMods.TiCon) { + public static final void postInit() { + if (LoadedMods.TiCon) { - Fluid pyrotheumFluid = FluidRegistry.getFluid("pyrotheum"); - if (pyrotheumFluid != null) { - //Enable Pyrotheum as Fuel for the Smeltery - TinkersUtils.addSmelteryFuel(pyrotheumFluid, 5000, 70); // pyrotheum lasts 3.5 seconds per 15 mb - } + Fluid pyrotheumFluid = FluidRegistry.getFluid("pyrotheum"); + if (pyrotheumFluid != null) { + // Enable Pyrotheum as Fuel for the Smeltery + TinkersUtils.addSmelteryFuel(pyrotheumFluid, 5000, 70); // pyrotheum lasts 3.5 seconds per 15 mb + } - //Generate Drying Rack recipes - TinkersDryingRecipe.generateAllDryingRecipes(); - - for (BaseTinkersMaterial y : mTinkerMaterials) { - //y.generate(); - } + // Generate Drying Rack recipes + TinkersDryingRecipe.generateAllDryingRecipes(); - Class aTinkersSmeltery = ReflectionUtils.getClass("tconstruct.smeltery.TinkerSmeltery"); - AutoMap<Fluid> aTweakedFluids = new AutoMap<Fluid>(); - if (aTinkersSmeltery != null) { - try { - Logger.INFO("Manipulating the light levels of fluids in TiCon. Molten 'metals' in world are now very luminescent!"); - Field aFluidArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluids"); - Field aBlockArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluidBlocks"); - Fluid[] aTiconFluids = (Fluid[]) aFluidArrayField.get(null); - Block[] aTiconFluidBlocks = (Block[]) aBlockArrayField.get(null); - if (aTiconFluids != null && aTiconFluidBlocks != null) { - for (Fluid a : aTiconFluids) { - if (a == null) { - continue; - } else { - if (a.getLuminosity() <= 15) { - //if (a.getTemperature() >= 500) { - a.setLuminosity(16); - aTweakedFluids.put(a); - //} - } else { - aTweakedFluids.put(a); - continue; - } - } - } - for (Block a : aTiconFluidBlocks) { - if (a == null) { - continue; - } else { - Fluid f = FluidRegistry.lookupFluidForBlock(a); - boolean isHot = false; - if (f != null && f.getTemperature() >= 500) { - if (f.getLuminosity() <= 16 && !aTweakedFluids.containsValue(f)) { - f.setLuminosity(16); - } - isHot = true; - } - if (a.getLightValue() <= 16f) { - if (isHot) { - a.setLightLevel(16f); - } else { - if (a.getLightValue() <= 16f) { - a.setLightLevel(16f); - } - } - } else { - continue; - } - } - } - } - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - } - } + for (BaseTinkersMaterial y : mTinkerMaterials) { + // y.generate(); + } + Class aTinkersSmeltery = ReflectionUtils.getClass("tconstruct.smeltery.TinkerSmeltery"); + AutoMap<Fluid> aTweakedFluids = new AutoMap<Fluid>(); + if (aTinkersSmeltery != null) { + try { + Logger.INFO( + "Manipulating the light levels of fluids in TiCon. Molten 'metals' in world are now very luminescent!"); + Field aFluidArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluids"); + Field aBlockArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluidBlocks"); + Fluid[] aTiconFluids = (Fluid[]) aFluidArrayField.get(null); + Block[] aTiconFluidBlocks = (Block[]) aBlockArrayField.get(null); + if (aTiconFluids != null && aTiconFluidBlocks != null) { + for (Fluid a : aTiconFluids) { + if (a == null) { + continue; + } else { + if (a.getLuminosity() <= 15) { + // if (a.getTemperature() >= 500) { + a.setLuminosity(16); + aTweakedFluids.put(a); + // } + } else { + aTweakedFluids.put(a); + continue; + } + } + } + for (Block a : aTiconFluidBlocks) { + if (a == null) { + continue; + } else { + Fluid f = FluidRegistry.lookupFluidForBlock(a); + boolean isHot = false; + if (f != null && f.getTemperature() >= 500) { + if (f.getLuminosity() <= 16 && !aTweakedFluids.containsValue(f)) { + f.setLuminosity(16); + } + isHot = true; + } + if (a.getLightValue() <= 16f) { + if (isHot) { + a.setLightLevel(16f); + } else { + if (a.getLightValue() <= 16f) { + a.setLightLevel(16f); + } + } + } else { + continue; + } + } + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + } + } } |