From bfac3223cdaee5eae8d863d2854ab519f1425102 Mon Sep 17 00:00:00 2001 From: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> Date: Sun, 3 Oct 2021 20:35:19 -0600 Subject: [PATCH] Fall back for missing material --- build.properties | 2 +- .../java/tconstruct/library/TConstructRegistry.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.properties b/build.properties index 217a08f7..a49d0a1b 100644 --- a/build.properties +++ b/build.properties @@ -4,6 +4,6 @@ mantle_version=0.3.2.jenkins187 CCLIB_version=1.1.3.136 NEI_version=1.0.4.106 ccc_version=1.0.6.43 -mod_version=1.9.0.2-GTNH +mod_version=1.9.0.3-GTNH waila_version=1.5.3_1.7.10 fmp_version=1.1.2.334 diff --git a/src/main/java/tconstruct/library/TConstructRegistry.java b/src/main/java/tconstruct/library/TConstructRegistry.java index 13c18f6e..0d9e43bb 100644 --- a/src/main/java/tconstruct/library/TConstructRegistry.java +++ b/src/main/java/tconstruct/library/TConstructRegistry.java @@ -7,6 +7,7 @@ import org.apache.logging.log4j.*; import tconstruct.library.crafting.*; import tconstruct.library.modifier.ActiveArmorMod; import tconstruct.library.tools.*; +import tconstruct.tools.TinkerTools; /** * A registry to store any relevant API work @@ -371,7 +372,14 @@ public class TConstructRegistry public static ToolMaterial getMaterial (int key) { - return (toolMaterials.get(key)); + if (toolMaterials.containsKey(key)) + { + return (toolMaterials.get(key)); + } + + // This is probably an old tool whose material has been removed from the game. + // Fall back to wood. + return toolMaterials.get(TinkerTools.MaterialID.Wood); } /**