Posted November 3, 201311 yr I want to name item with more then 120 metadatas the same. Because writing it like this: LanguageRegistry.addName(new ItemStack(ironCell, 1, 0), "Iron Cell"); LanguageRegistry.addName(new ItemStack(ironCell, 1, 1), "Iron Cell"); LanguageRegistry.addName(new ItemStack(ironCell, 1, 2), "Iron Cell"); LanguageRegistry.addName(new ItemStack(ironCell, 1, 3), "Iron Cell"); LanguageRegistry.addName(new ItemStack(ironCell, 1, 4), "Iron Cell"); LanguageRegistry.addName(new ItemStack(ironCell, 1, 5), "Iron Cell"); . . . would be unnecessary and really long, I'm asking if there is any other way to do this.
November 3, 201311 yr Another option would be: for( int i = 0; i < 120; i++ ) { LanguageRegistry.addName(new ItemStack(ironCell, 1, i), "Iron Cell"); } I am fairly new to Java and modding, so my answers are not always 100% correct. Sorry for that!
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.