We now have dynamic toolparts with default textures, just like the tools themselves!

This commit is contained in:
Bernhard Bonigl committed 2014-09-22 14:29:21 +02:00
1 parent ec525923d4
commit 74c92e5939
13 files changed
+213 -76

No files matched your search

@@ -15,8 +15,7 @@ public class ToolPart extends CraftingItem implements IToolPart
public ToolPart(String textureType, String name)
{
super(toolMaterialNames, buildTextureNames(textureType), "parts/", "tinker", TConstructRegistry.materialTab);
this.setCreativeTab(TConstructRegistry.partTab);
super(toolMaterialNames, buildTextureNames(textureType), "parts/", "tinker", TConstructRegistry.partTab);
this.setHasSubtypes(true);
this.setMaxDamage(0);
this.partName = name;
@@ -34,7 +33,7 @@ public class ToolPart extends CraftingItem implements IToolPart
}
else
{
material = StatCollector.translateToLocal("parttype." + material);
material = StatCollector.translateToLocal("material." + material);
name = StatCollector.translateToLocal("toolpart." + partName);
name = name.replaceAll("%%material", material);
}