diff options
author | Léa Gris <lea.gris@noiraude.net> | 2021-04-27 11:22:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-27 11:22:15 +0200 |
commit | f0702f969258bd01a5fc967c44d1d4805522b17f (patch) | |
tree | fbc545124a6b3c7b0ec690b491cb0ec3372fa085 /src/main/java/gregtech/api/enums | |
parent | 037fce95062f900e4e816ad103d3f70b1ae6da2a (diff) | |
download | GT5-Unofficial-f0702f969258bd01a5fc967c44d1d4805522b17f.tar.gz GT5-Unofficial-f0702f969258bd01a5fc967c44d1d4805522b17f.tar.bz2 GT5-Unofficial-f0702f969258bd01a5fc967c44d1d4805522b17f.zip |
fix(logspam): spam unification typos (#514)
Address issue: [Gregtech.log spam with 6724 lines of "Unknown Key for Unification, Typo?" #7866](https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/7866)
- Fix the logic for logging possible Typos (prioritise least cost)
- Improve reverse recipes by excluding ore names of tools early to prevent
unexpected and un needed unification lookups
- Turn off unification typo logging in reverse recipes
Reduced unification typo spam from 6724, down to 11 remaining entries:
```none
circuitGood
circuitData
circuitElite
circuitMaster
circuitUltimate
circuitSuperconductor
gearSteel
gearAluminium
gearStainlessSteel
gearTitanium
gearTungstenSteel
```
Diffstat (limited to 'src/main/java/gregtech/api/enums')
-rw-r--r-- | src/main/java/gregtech/api/enums/ToolDictNames.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/enums/ToolDictNames.java b/src/main/java/gregtech/api/enums/ToolDictNames.java index d81bbeae4e..2bb1aef1bd 100644 --- a/src/main/java/gregtech/api/enums/ToolDictNames.java +++ b/src/main/java/gregtech/api/enums/ToolDictNames.java @@ -29,4 +29,14 @@ public enum ToolDictNames { craftingToolScrewdriver, craftingToolSolderingIron, craftingToolSolderingMetal; + + public static boolean contains(String aName) { + if (!aName.startsWith("craftingTool")) return false; + for (ToolDictNames tool: ToolDictNames.values()) { + if (tool.toString().equals(aName)) { + return true; + } + } + return false; + } }
\ No newline at end of file |