mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Move material-abilities to the language files. They are DISPLAY ONLY. Don't use them for anything else.
This commit is contained in:
1 parent
794e953f01
commit
7f5ce21e29
6 files changed
+42
-40
No files matched your search
@@ -19,9 +19,8 @@ public class ToolMaterial
|
||||
public final int reinforced;
|
||||
public final float stonebound;
|
||||
public final String tipStyle;
|
||||
public final String ability;
|
||||
|
||||
public ToolMaterial(String name, int level, int durability, int speed, int damage, float handle, int reinforced, float stonebound, String style, String ability)
|
||||
public ToolMaterial(String name, int level, int durability, int speed, int damage, float handle, int reinforced, float stonebound, String style)
|
||||
{
|
||||
this.materialName = name;
|
||||
this.harvestLevel = level;
|
||||
@@ -32,7 +31,6 @@ public class ToolMaterial
|
||||
this.reinforced = reinforced;
|
||||
this.stonebound = stonebound;
|
||||
this.tipStyle = style;
|
||||
this.ability = ability;
|
||||
}
|
||||
|
||||
public String name ()
|
||||
@@ -90,10 +88,14 @@ public class ToolMaterial
|
||||
return this.tipStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ability of the tool to display.
|
||||
* ONLY USE THIS FOR DISPLAY PURPOSES. It is not data you can rely on. Use the material-ids for that.
|
||||
*/
|
||||
public String ability ()
|
||||
{
|
||||
return this.ability;
|
||||
if(StatCollector.canTranslate(String.format("material.%s.ability", materialName.toLowerCase())))
|
||||
return StatCollector.translateToLocal(String.format("material.%s.ability", materialName.toLowerCase()));
|
||||
return "";
|
||||
}
|
||||
|
||||
public String localizedAbility () { return StatCollector.translateToLocal(this.ability); }
|
||||
}
|
||||
Reference in new issue
Block a user