diff options
| author | boubou19 <miisterunknown@gmail.com> | 2024-08-27 20:50:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-27 18:50:30 +0000 |
| commit | 4908d5967c3dfeff5616c65144e701859b9e30a2 (patch) | |
| tree | 3e58a4b8ebd8b70745e81c4c71c765980e4ec4f4 /src/main/java/gregtech/api | |
| parent | 3c574facfb224029c0b69865e281023da6170ce0 (diff) | |
| download | GT5-Unofficial-4908d5967c3dfeff5616c65144e701859b9e30a2.tar.gz GT5-Unofficial-4908d5967c3dfeff5616c65144e701859b9e30a2.tar.bz2 GT5-Unofficial-4908d5967c3dfeff5616c65144e701859b9e30a2.zip | |
Config/gregtech.cfg (#2939)
* first pass on config migration
* second pass on config migration
* removing bad configs
* rename config classes and register them
* move debug options to its own debug category
* migrate pollution
* finish migrating general config
* removing useless config
* finish GregTech.cfg port to GTNHLib
* don't accidentally force panic mode in dev env
* typo
* defaults are now handled by the confg handler
* remove dead config
* force config save after defaults are being written
* stop messing with the GregTech.cfg externally
* removing comments
* new underground fluid builder and porting default underground fluids to code
* move config handlers of gregtech.cfg in their own package
* process MachineStats.cfg
* yeeted MaterialProperties.cfg
* remove unused compat in GTNH
* process OverpoweredStuff.cfg
* process Other.cfg
* ungregify some config variables
* remove unused variables
* fix Ids.cfg not being populated
* delete duplicate printing of MTE IDs in GT5U clients
* bump hodgepodge version to get mod phase timers
* process Client.cfg
* fix bad category naming
* registering all the config handlers in gui
* bump GTNHLib version
* actually only registering client configs
* use proper double arrays now
* move GT ore mixes to patternbuilders
* dead code
* fix multifiles config not being handled properly
* import class from NHCore
* removing reflection
* use enums for registration
* yeet config for Asteroid dimensions
* remove unused since 2015 enum entry
* todo
* rework oremix enums
* imported dimension data in enums
* convert old dirty predicate into proper one
* hook gagreg onto the OreMixes enum
* finally nuke worldgen.ore.mix config category!
* hook gagreg small ores onto the SmallOres enum
* imported dim values in enum
* fix dirty work around in vm predicate
* yeet unused classes
* hook GT stones to GTStones enum
* yeet all the remaining booleans in the worldgen category
* port endasteroids category
* port general category
* deprecated
* yeet unused bw compat
* finish worldgen config migration
* hardcode config into code
* remove not generated config entry
* remove Unification.cfg
* fix build
* migrate oreveins away from config
* migrate small ores away from config
* delete config parser
* forgotten
* fix EoH recipe crash in dev
* fix GT NEI Ore Plugin config and csv paths
* shade opencsv
* rewrite csv generator
* spotless apply
Diffstat (limited to 'src/main/java/gregtech/api')
25 files changed, 2735 insertions, 510 deletions
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 92e0ef36dd..51bf250659 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -35,10 +35,8 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import com.google.common.collect.SetMultimap; -import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.SoundResource; @@ -231,8 +229,7 @@ public class GregTech_API { /** * The Configuration Objects */ - public static GT_Config sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null, - sSpecialFile = null, sClientDataFile, sOPStuff = null; + public static GT_Config NEIClientFIle; public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100; /** @@ -258,11 +255,10 @@ public class GregTech_API { * Getting assigned by the Config */ public static boolean sTimber = true, sDrinksAlwaysDrinkable = false, sMultiThreadedSounds = false, - sDoShowAllItemsInCreative = false, sColoredGUI = true, sMachineMetalGUI = false, sConstantEnergy = true, - sMachineExplosions = true, sMachineFlammable = true, sMachineNonWrenchExplosions = true, - sMachineRainExplosions = true, sMachineThunderExplosions = true, sMachineFireExplosions = true, - sMachineWireFire = true, mOutputRF = false, mInputRF = false, meIOLoaded = false, mRFExplosions = false, - mServerStarted = false; + sDoShowAllItemsInCreative = false, sColoredGUI = true, sMachineMetalGUI = false, sMachineExplosions = true, + sMachineFlammable = true, sMachineNonWrenchExplosions = true, sMachineRainExplosions = true, + sMachineThunderExplosions = true, sMachineFireExplosions = true, sMachineWireFire = true, mOutputRF = false, + mInputRF = false, mRFExplosions = false, mServerStarted = false; public static int mEUtoRF = 360, mRFtoEU = 20; @@ -775,14 +771,7 @@ public class GregTech_API { } public static Comparator<ItemStack> getConfigurationCircuitsComparator() { - return Comparator.comparingInt((ItemStack is) -> { - // By default, the Programmed Circuit should be the earliest configuration circuit to which the - // player is exposed - if (GT_Mod.gregtechproxy.mCircuitsOrder.isEmpty()) - return is.getItem() instanceof GT_IntegratedCircuit_Item ? 0 : 1; - return GT_Mod.gregtechproxy.mCircuitsOrder - .getOrDefault(String.valueOf(GameRegistry.findUniqueIdentifierFor(is.getItem())), Integer.MAX_VALUE); - }) + return Comparator.comparingInt((ItemStack is) -> is.getItem() instanceof GT_IntegratedCircuit_Item ? 0 : 1) .thenComparing(ItemStack::getUnlocalizedName) .thenComparing(ItemStack::getItemDamage); } diff --git a/src/main/java/gregtech/api/enums/ConfigCategories.java b/src/main/java/gregtech/api/enums/ConfigCategories.java index 83deec4f58..0e70e54651 100644 --- a/src/main/java/gregtech/api/enums/ConfigCategories.java +++ b/src/main/java/gregtech/api/enums/ConfigCategories.java @@ -1,5 +1,6 @@ package gregtech.api.enums; +@Deprecated public enum ConfigCategories { news, diff --git a/src/main/java/gregtech/api/enums/Dimensions.java b/src/main/java/gregtech/api/enums/Dimensions.java new file mode 100644 index 0000000000..21dee59977 --- /dev/null +++ b/src/main/java/gregtech/api/enums/Dimensions.java @@ -0,0 +1,33 @@ +package gregtech.api.enums; + +public enum Dimensions { + + Overworld("0"), + Moon("Moon"), + Mercury("Mercury"), + Venus("Venus"), + Mars("Mars"), + Io("Io"), + Europa("Europa"), + Callisto("Callisto"), + Titan("Titan"), + Miranda("Miranda"), + Oberon("oberon"), + Triton("Triton"), + Proteus("Proteus"), + Pluto("Pluto"), + Makemake("Makemake"), + AlphaCentauriBb("aCentauriBb"), + BarnardaC("BarnardaC"), + BarnardaE("BarnardaE"), + BarnardaF("BarnardaF"), + TCetiE("TCetiE"), + Ross128b("Ross128b"), + Ross128ba("Ross128ba"),; + + public final String id; + + private Dimensions(String id) { + this.id = id; + } +} diff --git a/src/main/java/gregtech/api/enums/GTStones.java b/src/main/java/gregtech/api/enums/GTStones.java new file mode 100644 index 0000000000..82d7cb90ce --- /dev/null +++ b/src/main/java/gregtech/api/enums/GTStones.java @@ -0,0 +1,398 @@ +package gregtech.api.enums; + +import gregtech.api.GregTech_API; +import gregtech.common.GT_Worldgen_Stone; +import gregtech.common.StoneBuilder; + +public enum GTStones { + + NetherBlackgraniteTiny(new StoneBuilder().name("nether.stone.blackgranite.tiny") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(-1) + .size(50) + .probability(45) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBlackgraniteSmall(new StoneBuilder().name("nether.stone.blackgranite.small") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(-1) + .size(100) + .probability(60) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBlackgraniteMedium(new StoneBuilder().name("nether.stone.blackgranite.medium") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(-1) + .size(200) + .probability(80) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBlackgraniteLarge(new StoneBuilder().name("nether.stone.blackgranite.large") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(-1) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBlackgraniteHuge(new StoneBuilder().name("nether.stone.blackgranite.huge") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(-1) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherRedgraniteTiny(new StoneBuilder().name("nether.stone.redgranite.tiny") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(-1) + .size(50) + .probability(45) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherRedgraniteSmall(new StoneBuilder().name("nether.stone.redgranite.small") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(-1) + .size(100) + .probability(60) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherRedgraniteMedium(new StoneBuilder().name("nether.stone.redgranite.medium") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(-1) + .size(200) + .probability(80) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherRedgraniteLarge(new StoneBuilder().name("nether.stone.redgranite.large") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(-1) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherRedgraniteHuge(new StoneBuilder().name("nether.stone.redgranite.huge") + .disabledByDefault() + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(-1) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherMarbleTiny(new StoneBuilder().name("nether.stone.marble.tiny") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(-1) + .size(50) + .probability(45) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherMarbleSmall(new StoneBuilder().name("nether.stone.marble.small") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(-1) + .size(100) + .probability(60) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherMarbleMedium(new StoneBuilder().name("nether.stone.marble.medium") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(-1) + .size(200) + .probability(80) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherMarbleLarge(new StoneBuilder().name("nether.stone.marble.large") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(-1) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherMarbleHuge(new StoneBuilder().name("nether.stone.marble.huge") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(-1) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBasaltTiny(new StoneBuilder().name("nether.stone.basalt.tiny") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(-1) + .size(50) + .probability(45) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBasaltSmall(new StoneBuilder().name("nether.stone.basalt.small") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(-1) + .size(100) + .probability(60) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBasaltMedium(new StoneBuilder().name("nether.stone.basalt.medium") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(-1) + .size(200) + .probability(80) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBasaltLarge(new StoneBuilder().name("nether.stone.basalt.large") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(-1) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + NetherBasaltHuge(new StoneBuilder().name("nether.stone.basalt.huge") + .disabledByDefault() + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(-1) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + OverworldBlackgraniteTiny(new StoneBuilder().name("overworld.stone.blackgranite.tiny") + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(0) + .size(75) + .probability(5) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldBlackgraniteSmall(new StoneBuilder().name("overworld.stone.blackgranite.small") + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(0) + .size(100) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldBlackgraniteMedium(new StoneBuilder().name("overworld.stone.blackgranite.medium") + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(0) + .size(200) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldBlackgraniteLarge(new StoneBuilder().name("overworld.stone.blackgranite.large") + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(0) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + OverworldBlackgraniteHuge(new StoneBuilder().name("overworld.stone.blackgranite.huge") + .block(GregTech_API.sBlockGranites) + .blockMeta(0) + .dimension(0) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + OverworldRedgraniteTiny(new StoneBuilder().name("overworld.stone.redgranite.tiny") + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(0) + .size(75) + .probability(5) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldRedgraniteSmall(new StoneBuilder().name("overworld.stone.redgranite.small") + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(0) + .size(100) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldRedgraniteMedium(new StoneBuilder().name("overworld.stone.redgranite.medium") + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(0) + .size(200) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldRedgraniteLarge(new StoneBuilder().name("overworld.stone.redgranite.large") + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(0) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + OverworldRedgraniteHuge(new StoneBuilder().name("overworld.stone.redgranite.huge") + .block(GregTech_API.sBlockGranites) + .blockMeta(8) + .dimension(0) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + OverworldMarbleTiny(new StoneBuilder().name("overworld.stone.marble.tiny") + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(0) + .size(75) + .probability(5) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldMarbleSmall(new StoneBuilder().name("overworld.stone.marble.small") + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(0) + .size(100) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldMarbleMedium(new StoneBuilder().name("overworld.stone.marble.medium") + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(0) + .size(200) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldMarbleLarge(new StoneBuilder().name("overworld.stone.marble.large") + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(0) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + OverworldMarbleHuge(new StoneBuilder().name("overworld.stone.marble.huge") + .block(GregTech_API.sBlockStones) + .blockMeta(0) + .dimension(0) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + OverworldBasaltTiny(new StoneBuilder().name("overworld.stone.basalt.tiny") + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(0) + .size(75) + .probability(5) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldBasaltSmall(new StoneBuilder().name("overworld.stone.basalt.small") + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(0) + .size(100) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldBasaltMedium(new StoneBuilder().name("overworld.stone.basalt.medium") + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(0) + .size(200) + .probability(10) + .heightRange(0, 180) + .generationInVoidEnabled(false)), + + OverworldBasaltLarge(new StoneBuilder().name("overworld.stone.basalt.large") + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(0) + .size(300) + .probability(70) + .heightRange(0, 120) + .generationInVoidEnabled(false)), + + OverworldBasaltHuge(new StoneBuilder().name("overworld.stone.basalt.huge") + .block(GregTech_API.sBlockStones) + .blockMeta(8) + .dimension(0) + .size(400) + .probability(150) + .heightRange(0, 120) + .generationInVoidEnabled(false)),; + + public final StoneBuilder stone; + + private GTStones(StoneBuilder stone) { + this.stone = stone; + } + + public GT_Worldgen_Stone addGTStone() { + return new GT_Worldgen_Stone(this.stone); + } + +} diff --git a/src/main/java/gregtech/api/enums/ManualOreDictTweaks.java b/src/main/java/gregtech/api/enums/ManualOreDictTweaks.java new file mode 100644 index 0000000000..2392fcb591 --- /dev/null +++ b/src/main/java/gregtech/api/enums/ManualOreDictTweaks.java @@ -0,0 +1,70 @@ +package gregtech.api.enums; + +import static gregtech.api.enums.Mods.Avaritia; +import static gregtech.api.enums.Mods.Botania; +import static gregtech.api.enums.Mods.DraconicEvolution; +import static gregtech.api.enums.Mods.EnderIO; +import static gregtech.api.enums.Mods.GregTech; +import static gregtech.api.enums.Mods.HardcoreEnderExpansion; +import static gregtech.api.enums.Mods.ProjectRedCore; +import static gregtech.api.enums.Mods.RandomThings; +import static gregtech.api.enums.Mods.Thaumcraft; +import static gregtech.api.enums.Mods.Translocator; + +import java.util.HashMap; +import java.util.Map; + +public class ManualOreDictTweaks { + + private static final Map<String, Map<String, Boolean>> oredictLookupTable = new HashMap<>(); + + private static final String[] gregtech = new String[] { "dustAlumina', 'dustNikolite" }; + private static final String[] enderio = new String[] { "ingotDarkSteel" }; + private static final String[] draconicevolution = new String[] { "dustDraconium" }; + private static final String[] thaumcraft = new String[] { + "ingotThaumium', 'ingotVoid', 'nuggetThaumium', 'nuggetVoid" }; + private static final String[] projred_core = new String[] { "dustElectrotine" }; + private static final String[] translocator = new String[] { "nuggetDiamond" }; + private static final String[] hardcoreenderexpansion = new String[] { "ingotHeeEndium" }; + private static final String[] avaritia = new String[] { "ingotCosmicNeutronium', 'ingotInfinity" }; + private static final String[] randomthings = new String[] { "stickObsidian" }; + private static final String[] botania = new String[] { + "ingotElvenElementium', 'ingotManasteel', 'ingotTerrasteel', 'nuggetElvenElementium', 'nuggetManasteel', 'nuggetTerrasteel" }; + + private static final String[] modNames = { GregTech.ID, EnderIO.ID, DraconicEvolution.ID, Thaumcraft.ID, + ProjectRedCore.ID, Translocator.ID, HardcoreEnderExpansion.ID, Avaritia.ID, RandomThings.ID, Botania.ID }; + private static final String[][] array = new String[][] { gregtech, enderio, draconicevolution, thaumcraft, + projred_core, translocator, hardcoreenderexpansion, avaritia, randomthings, botania }; + + static { + initTweakedValues(); + } + + private static void initTweakedValues() { + for (int i = 0; i < array.length; i++) { + HashMap<String, Boolean> modTableLookup = new HashMap<>(); + String name = modNames[i]; + for (String oredict : array[i]) { + modTableLookup.put(oredict, true); + } + oredictLookupTable.put(name, modTableLookup); + } + } + + public static boolean shouldOredictBeOverwritten(String modID, String oredict) { + Map<String, Boolean> modLookupTable = oredictLookupTable.get(modID); + if (modLookupTable == null) { + modLookupTable = new HashMap<>(); + modLookupTable.put(oredict, false); + oredictLookupTable.put(modID, modLookupTable); + return false; + } + Boolean result = modLookupTable.get(oredict); + if (result == null) { + modLookupTable.put(oredict, false); + result = false; + } + return result; + } + +} diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 16553e2d42..e5f9991236 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -13,7 +13,6 @@ import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -34,6 +33,7 @@ import gregtech.api.interfaces.ISubTagContainer; import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import gregtech.common.config.gregtech.ConfigHarvestLevel; import gregtech.common.render.items.CosmicNeutroniumRenderer; import gregtech.common.render.items.GT_GeneratedMaterial_Renderer; import gregtech.common.render.items.GaiaSpiritRenderer; @@ -2574,59 +2574,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } } - private static void addFuelValues(Materials aMaterial, String aConfigPath) { - aMaterial.mFuelPower = GregTech_API.sMaterialProperties.get(aConfigPath, "FuelPower", aMaterial.mFuelPower); - aMaterial.mFuelType = GregTech_API.sMaterialProperties.get(aConfigPath, "FuelType", aMaterial.mFuelType); - } - - private static void addTemperatureValues(Materials aMaterial, String aConfigPath) { - aMaterial.mMeltingPoint = GregTech_API.sMaterialProperties - .get(aConfigPath, "MeltingPoint", aMaterial.mMeltingPoint); - aMaterial.mBlastFurnaceRequired = GregTech_API.sMaterialProperties - .get(aConfigPath, "BlastFurnaceRequired", aMaterial.mBlastFurnaceRequired); - aMaterial.mBlastFurnaceTemp = (short) GregTech_API.sMaterialProperties - .get(aConfigPath, "BlastFurnaceTemp", aMaterial.mBlastFurnaceTemp); - aMaterial.mGasTemp = GregTech_API.sMaterialProperties.get(aConfigPath, "GasTemp", aMaterial.mGasTemp); - aMaterial.setHeatDamage( - (float) GregTech_API.sMaterialProperties.get(aConfigPath, "HeatDamage", aMaterial.mHeatDamage)); - } - - private static void addDensityValues(Materials aMaterial, String aConfigPath) { - aMaterial.mDensityMultiplier = GregTech_API.sMaterialProperties - .get(aConfigPath, "DensityMultiplier", aMaterial.mDensityMultiplier); - aMaterial.mDensityDivider = GregTech_API.sMaterialProperties - .get(aConfigPath, "DensityDivider", aMaterial.mDensityDivider); - aMaterial.mDensity = (long) GregTech_API.sMaterialProperties.get( - aConfigPath, - "Density", - ((double) M * aMaterial.mDensityMultiplier) - / (aMaterial.mDensityDivider != 0 ? aMaterial.mDensityDivider : 1)); - } - - private static void addColorValues(Materials aMaterial, String aConfigPath) { - aMaterial.mTransparent = GregTech_API.sMaterialProperties - .get(aConfigPath, "Transparent", aMaterial.mTransparent); - String aColor = GregTech_API.sMaterialProperties - .get(aConfigPath, "DyeColor", aMaterial.mColor == Dyes._NULL ? "None" : aMaterial.mColor.toString()); - aMaterial.mColor = aColor.equals("None") ? Dyes._NULL : Dyes.get(aColor); - String[] aRGBA = GregTech_API.sMaterialProperties.get( - aConfigPath, - "MatRGBA", - aMaterial.mRGBa[0] + "," + aMaterial.mRGBa[1] + "," + aMaterial.mRGBa[2] + "," + aMaterial.mRGBa[3] + ",") - .split(","); - aMaterial.mRGBa[0] = Short.parseShort(aRGBA[0]); - aMaterial.mRGBa[1] = Short.parseShort(aRGBA[1]); - aMaterial.mRGBa[2] = Short.parseShort(aRGBA[2]); - aMaterial.mRGBa[3] = Short.parseShort(aRGBA[3]); - } - - private static void addToolValues(Materials aMaterial, String aConfigPath) { - aMaterial.mDurability = GregTech_API.sMaterialProperties - .get(aConfigPath, "ToolDurability", aMaterial.mDurability); - aMaterial.mToolSpeed = (float) GregTech_API.sMaterialProperties - .get(aConfigPath, "ToolSpeed", aMaterial.mToolSpeed); - aMaterial.mToolQuality = (byte) GregTech_API.sMaterialProperties - .get(aConfigPath, "ToolQuality", aMaterial.mToolQuality); + private static void addToolValues(Materials aMaterial) { // Moved from GT_Proxy? (Not sure) aMaterial.mHandleMaterial = (aMaterial == Desh ? aMaterial.mHandleMaterial : aMaterial == Diamond || aMaterial == Thaumium ? Wood @@ -2653,79 +2601,26 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } } - private static void addEnchantmentValues(Materials aMaterial, String aConfigPath) { - aMaterial.mEnchantmentToolsLevel = (byte) GregTech_API.sMaterialProperties - .get(aConfigPath, "EnchantmentLevel", aMaterial.mEnchantmentToolsLevel); - String aEnchantmentName = GregTech_API.sMaterialProperties.get( - aConfigPath, - "Enchantment", - aMaterial.mEnchantmentTools != null ? aMaterial.mEnchantmentTools.getName() : ""); + private static void addEnchantmentValues(Materials aMaterial) { + String aEnchantmentName = aMaterial.mEnchantmentTools != null ? aMaterial.mEnchantmentTools.getName() : ""; if (aMaterial.mEnchantmentTools != null && !aEnchantmentName.equals(aMaterial.mEnchantmentTools.getName())) IntStream.range(0, Enchantment.enchantmentsList.length) .filter(i -> aEnchantmentName.equals(Enchantment.enchantmentsList[i].getName())) .forEach(i -> aMaterial.mEnchantmentTools = Enchantment.enchantmentsList[i]); } - private static void addProcessingIntoValues(Materials aMaterial, String aConfigPath) { - aMaterial.mSmeltInto = MATERIALS_MAP - .get(GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialSmeltInto", aMaterial.mSmeltIn |
