Posted September 23, 201411 yr For plugin-testing purposes (currently), I've written something that can dynamically create simple items based on either the contents of a configuration file, or in-game commands (that, along with creating said item, add the right details to the configuration file), and use a command or output a message when used on things. I've run into a couple of minor issues with this - they work, but they only have unlocalised names, and . First, items created from either the configuration file or in-game commands only have unlocalised names; since the unlocalised name is different for each item, and since these items aren't made in advance, the EN_lang file doesn't contain a proper name for them. Is there a way to give items proper names when created, since I don't know what names are going to be used in advance? Second, items created via in-game commands function properly, but don't have the expected item graphic, instead acting as if they have no graphic. If the server is restarted and the item created from the configuration file, they do. Is this a result of attempting to register an item too late, and, again, is there a way to fix this? Possibly relevant: constructor of basic item public ItemMagicWand(String name, String newCommand) { setUnlocalizedName(MagicWands.MODID + "_" + name); setTextureName(MagicWands.MODID + ":" + "magicWand"); GameRegistry.registerItem(this, name); setCreativeTab(CreativeTabs.tabMisc); command = newCommand; if(command.charAt(0) == "/".toCharArray()[0]) isCommand = true; else isCommand = false; }
September 23, 201411 yr I'm not entirely sure your approach, but you may be able to utilize @Override public String getItemStackDisplayName(ItemStack stack){ return "whatever""; } Or an equivalent... I'll need help, and I'll give help. Just ask, you know I will!
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.