mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Feature #954: Custom names for specific toolpart and material combinations and tool default names
This commit is contained in:
1 parent
593af6be17
commit
7ae5a92a8f
3 files changed
+31
-19
No files matched your search
@@ -25,26 +25,21 @@ public class ToolPart extends CraftingItem implements IToolPart
|
||||
@Override
|
||||
public String getItemStackDisplayName (ItemStack par1ItemStack)
|
||||
{
|
||||
String material = StatCollector.translateToLocal("parttype." + toolTextureNames[par1ItemStack.getItemDamage()]);
|
||||
String name = StatCollector.translateToLocal("toolpart." + partName);
|
||||
name = name.replaceAll("%%material", material);
|
||||
String material = toolTextureNames[par1ItemStack.getItemDamage()];
|
||||
String name = "";
|
||||
|
||||
if (StatCollector.canTranslate("toolpart." + partName + "." + material))
|
||||
{
|
||||
name = StatCollector.translateToLocal("toolpart." + partName + "." + material);
|
||||
}
|
||||
else
|
||||
{
|
||||
material = StatCollector.translateToLocal("parttype." + material);
|
||||
name = StatCollector.translateToLocal("toolpart." + partName);
|
||||
name = name.replaceAll("%%material", material);
|
||||
}
|
||||
|
||||
return name;
|
||||
|
||||
/*
|
||||
* StringBuilder builder = new StringBuilder();
|
||||
* builder.append(StatCollector.translateToLocal("parttype." +
|
||||
* toolTextureNames
|
||||
* [par1ItemStack.getItemDamage()])).append(" ").append(StatCollector
|
||||
* .translateToLocal("toolpart." + partName)); return
|
||||
* builder.toString(); -- String s = ("" +
|
||||
* StatCollector.translateToLocal("toolpart."+partName)).trim(); String
|
||||
* s1 = toolMaterialNames[par1ItemStack.getItemDamage()];
|
||||
*
|
||||
* if (s1 != null) { s = s + " " + StatCollector.translateToLocal(s1); }
|
||||
*
|
||||
* return s;
|
||||
*/
|
||||
}
|
||||
|
||||
private static String[] buildTextureNames (String textureType)
|
||||
|
||||
Reference in new issue
Block a user