aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/enums
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2021-04-27 11:22:15 +0200
committerGitHub <noreply@github.com>2021-04-27 11:22:15 +0200
commitf0702f969258bd01a5fc967c44d1d4805522b17f (patch)
treefbc545124a6b3c7b0ec690b491cb0ec3372fa085 /src/main/java/gregtech/api/enums
parent037fce95062f900e4e816ad103d3f70b1ae6da2a (diff)
downloadGT5-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.java10
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