Give ToolShards the DynamicToolPart treatment

This commit is contained in:
Bernhard Bonigl committed 2014-10-18 17:02:43 +02:00
1 parent 5a5b05d1c7
commit 9672f95efc
4 files changed
+53 -55

No files matched your search

@@ -220,6 +220,7 @@ public class TConstructRegistry
public static HashMap<Integer, ToolMaterial> toolMaterials = new HashMap<Integer, ToolMaterial>(40);
public static HashMap<String, ToolMaterial> toolMaterialStrings = new HashMap<String, ToolMaterial>(40);
public static List<Integer> defaultToolPartMaterials = new LinkedList<Integer>();
public static List<Integer> defaultShardMaterials = new LinkedList<Integer>();
public static void addDefaultToolPartMaterial(int materialID)
{
@@ -229,6 +230,14 @@ public class TConstructRegistry
defaultToolPartMaterials.add(materialID);
}
public static void addDefaultShardMaterial(int materialID)
{
if(!toolMaterials.containsKey(materialID))
logger.error("[TCon API] Can't add default shard: Material ID " + materialID + " is unknown.");
else
defaultShardMaterials.add(materialID);
}
/**
* Adds a tool material to the registry
*