Use default name for tool subItems

This commit is contained in:
Qowyn committed 2014-09-13 22:34:12 +02:00
1 parent 7ae5a92a8f
commit fd4c0cfe1c
1 file changed
+2 -3
@@ -536,7 +536,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
{
Map.Entry pairs = (Map.Entry) iter.next();
tconstruct.library.tools.ToolMaterial material = (tconstruct.library.tools.ToolMaterial) pairs.getValue();
buildTool((Integer) pairs.getKey(), material.prefixName(), list);
buildTool((Integer) pairs.getKey(), ToolBuilder.defaultToolName(material, this), list);
}
}
@@ -546,8 +546,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
ItemStack accessoryStack = accessory != null ? new ItemStack(getAccessoryItem(), 1, id) : null;
Item extra = getExtraItem();
ItemStack extraStack = extra != null ? new ItemStack(extra, 1, id) : null;
String completeName = String.format("%s %s", name, getLocalizedToolName());
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, id), new ItemStack(getHandleItem(), 1, id), accessoryStack, extraStack, completeName);
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, id), new ItemStack(getHandleItem(), 1, id), accessoryStack, extraStack, name);
if (tool != null)
{
tool.getTagCompound().getCompoundTag("InfiTool").setBoolean("Built", true);