mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-14 01:14:18 +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
@@ -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