Materials that shall have toolparts created for them have to be registered specifically now. Registering a material via IMC does so automatically. Should also fix the double-toolparts with extratic and other mod relying on the 1.6 API.

This commit is contained in:
Bernhard Bonigl committed 2014-10-15 23:17:41 +02:00
1 parent c824f68b79
commit c0e46f151b
4 files changed
+36 -2

No files matched your search

@@ -219,6 +219,15 @@ public class TConstructRegistry
// Materials
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 void addDefaultToolPartMaterial(int materialID)
{
if(!toolMaterials.containsKey(materialID))
logger.error("[TCon API] Can't add default toolpart: Material ID " + materialID + " is unknown.");
else
defaultToolPartMaterials.add(materialID);
}
/**
* Adds a tool material to the registry