Jump to content

ModLoader.addName applies one name to all items.


linkseyi

Recommended Posts

I have a mod that's ported to FML from ModLoader.  Everything's working okay as of now except that when I use both ModLoader.addName and LanguageRegistry.addName, all items in the mod resort to being named the last one applied.

 

public class mod_Tools extends BaseMod
{
  public static lx texToolSword;
  public static lx texToolPickaxe;
  public static lx texToolHelmet;
  public static lx texToolPlate;
  //Ignore the addTool/ArmorMaterial stuff.
  public static final wk ToolSword = new ItemToolSword(160, LinkseyiForgeAdapter.addToolMaterial("Rod", 1, 64, 7.0F, 2, 2)).c("ToolSword");
  public static final wk ToolPickaxe = new ItemToolPickaxe(161, LinkseyiForgeAdapter.addToolMaterial("Rod", 1, 64, 7.0F, 2, 2)).c("ToolPickaxe");
  public static final wk ToolHelmet = new ItemToolHelmet(162, LinkseyiForgeAdapter.addArmorMaterial("DiamondTwo", 7, new int[] { 6, 6, 7, 6 }, , ModLoader.addArmor("DiamondTwo"), 0).c("ToolHelmet");
  public static final wk ToolPlate = new ItemToolPlate(163, LinkseyiForgeAdapter.addArmorMaterial("DiamondTwo", 7, new int[] { 6, 6, 7, 6 }, , ModLoader.addArmor("DiamondTwo"), 1).c("ToolPlate");

  public void load()
  {
    ModLoader.addName(ToolSword, "Tool Sword");
    ModLoader.addName(ToolPickaxe, "Tool Pickaxe");
    ModLoader.addName(ToolHelmet, "Tool Helmet");
    ModLoader.addName(ToolPlate, "Tool Plate");
  }
}

 

In this case all items end up being named "Tool Plate".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.