Posted February 22, 201510 yr Im trying to do this 'ingot.batmanplusplus:Tetsu.name=Tetsu Ingot' here is my class file public static class UnlocalItem extends Item { private static String unlocal; private static String pre; /** * Sets the unlocalized name of this item to the string passed as the parameter, prefixed by 'something' */ //This Could End Badly public static Item setUnlocal(String unlocalizedName) { unlocal = unlocalizedName; return setUnlocal(unlocal); } /** * Translates the unlocalized name of this item, but without the .name suffix, so the translation fails and the * unlocalized name itself is returned. */ public String getUnlocalInefficiently(ItemStack stack) { String s = this.getUnlocal(stack); return s == null ? "" : StatCollector.translateToLocal(s); } /** * Returns the unlocalized name of this item. */ public static String getUnlocal(String prefix) { pre = prefix; return pre + unlocal; } /** * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have * different names based on their damage or NBT. */ public String getUnlocal(ItemStack stack) { return pre + this.unlocal; } /** * Gets the localized name of this block. Used for the statistics page. */ @Override public String getItemStackDisplayName(ItemStack stack) { return ("" + StatCollector.translateToLocal(this.getUnlocalInefficiently(stack) + ".name")).trim(); } } but I keep getting 'ingot.batmanplusplus:Tetsunull.name' instead My Thought is that its theunlocalizedName from Item, but how is that bleedng through
February 22, 201510 yr Author I have Alot of Item with Same or Similiar Names This Just makes it easy to keep them straight
February 22, 201510 yr I have Alot of Item http://1.bp.blogspot.com/_D_Z-D2tzi14/S8TZcKXqR-I/AAAAAAAACwg/F7AqxDrPjhg/s320/ALOT13.png[/img] Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 22, 201510 yr I have Alot of Item http://1.bp.blogspot.com/_D_Z-D2tzi14/S8TZcKXqR-I/AAAAAAAACwg/F7AqxDrPjhg/s320/ALOT13.png[/img] I. AM. DEAD. This website is sick! http://d3dsacqprgcsqh.cloudfront.net/photo/a1Aydr2_460sa_v1.gif[/img] 1.7.10 is no longer supported by forge, you are on your own.
February 23, 201510 yr You're welcome. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 23, 201510 yr Not To Sound Rude But, Do I Really Need One? If you can solve it on your own, no. If you're asking for help, yes. Any time you do something unusual, you need to have good understanding of how to do it, plus it needs to be worth the effort and risk. Remember that these names are strings, so if you have a lot of them that are similar, you can probably code up some way to created the string for you. Or you can just create them all once in a txt file and have that as a resource. Basically, is the time it takes to type up all your names really longer than the time to code and debug an alternate solution? Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.