Posted April 20, 201312 yr I have 4 blocks I'm adding and when I use "LanguageRegistry.addName" for each block, the last usage is applied to all. LanguageRegistry.addName(block1, "Block 1"); LanguageRegistry.addName(block2, "Block 2"); LanguageRegistry.addName(block3, "Block 3"); LanguageRegistry.addName(block4, "Block 4"); Is what I have, but when you mouse over the block in game, the tooltip reads "Block 4" for all of them. I've tried rearranging them, and it's always the last one that is used for all of them. What's going on here?
April 20, 201312 yr Author I have 4 blocks I'm adding and when I use "LanguageRegistry.addName" for each block, the last usage is applied to all. LanguageRegistry.addName(block1, "Block 1"); LanguageRegistry.addName(block2, "Block 2"); LanguageRegistry.addName(block3, "Block 3"); LanguageRegistry.addName(block4, "Block 4"); Is what I have, but when you mouse over the block in game, the tooltip reads "Block 4" for all of them. I've tried rearranging them, and it's always the last one that is used for all of them. What's going on here?
April 20, 201312 yr Please post more code (@mod class, Block classes and any non-vanila superclasses). I'll try to troubleshoot that. Creator of easy custom renderer library without tile entity. https://github.com/skore13/renderLib
April 20, 201312 yr Please post more code (@mod class, Block classes and any non-vanila superclasses). I'll try to troubleshoot that. Creator of easy custom renderer library without tile entity. https://github.com/skore13/renderLib
April 20, 201312 yr Author https://github.com/mrobinson7627/Generated-Ores/blob/master/generatedores/common/GeneratedOresMain.java The other files are in there too.
April 20, 201312 yr Author https://github.com/mrobinson7627/Generated-Ores/blob/master/generatedores/common/GeneratedOresMain.java The other files are in there too.
April 20, 201312 yr You're not setting proper internal names of your blocks (use setUnlocalizedName). mnn.getNativeLang() != English If I helped you please click on the "thank you" button.
April 20, 201312 yr You're not setting proper internal names of your blocks (use setUnlocalizedName). mnn.getNativeLang() != English If I helped you please click on the "thank you" button.
April 20, 201312 yr Author Ok, I did that and it almost works. However, now it says "tile.Block Name" in the tooltips. Should I be using LanguageRegistry, or just the setUnlocalizedName? I'm currently doing both.
April 20, 201312 yr Author Ok, I did that and it almost works. However, now it says "tile.Block Name" in the tooltips. Should I be using LanguageRegistry, or just the setUnlocalizedName? I'm currently doing both.
April 21, 201312 yr Both, but UnlocalizedName for in-code identification of a block (e.g. you set "myBlock" and it becomes "tile.myBlock") and LanguageRegistry for title shown to a player (e.g. "My Block"). mnn.getNativeLang() != English If I helped you please click on the "thank you" button.
April 21, 201312 yr Both, but UnlocalizedName for in-code identification of a block (e.g. you set "myBlock" and it becomes "tile.myBlock") and LanguageRegistry for title shown to a player (e.g. "My Block"). mnn.getNativeLang() != English If I helped you please click on the "thank you" button.
April 21, 201312 yr If you want to get unlocalized name without "tile." prefix use getUnlocalizedName2() instead of getUnlocalizedName(). But as mnn suggested use LangRegistry for shown name and unlocalized name as internal reference. (I use it in custom renderers so I don't have to keep reference to ID.) Creator of easy custom renderer library without tile entity. https://github.com/skore13/renderLib
April 21, 201312 yr If you want to get unlocalized name without "tile." prefix use getUnlocalizedName2() instead of getUnlocalizedName(). But as mnn suggested use LangRegistry for shown name and unlocalized name as internal reference. (I use it in custom renderers so I don't have to keep reference to ID.) Creator of easy custom renderer library without tile entity. https://github.com/skore13/renderLib
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.