mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
Light Aggregator
This commit is contained in:
1 parent
adfd1117eb
commit
4360dfaf1e
31 files changed
+1515
-349
No files matched your search
@@ -7,14 +7,34 @@ import tconstruct.library.util.IToolPart;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class ToolPart extends CraftingItem implements IToolPart
|
||||
{
|
||||
public ToolPart(int id, String textureType)
|
||||
public String partName;
|
||||
public ToolPart(int id, String textureType, String name)
|
||||
{
|
||||
super(id, toolMaterialNames, buildTextureNames(textureType), "parts/");
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.partName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName (ItemStack par1ItemStack)
|
||||
{
|
||||
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