mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-25 20:32:32 +00:00
Fall back for missing material
This commit is contained in:
1 parent
858c0c663f
commit
bfac3223cd
2 files changed
+10
-2
No files matched your search
+1
-1
@@ -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
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user