Posted July 15, 201411 yr Ik want some words to be translate-able, (if that's a word) but they language file does not let me. I used the container.customname and than put that in the en_US.lang file container.customname=Custom Name item.things.name=Things That is working! But now i tried something different. I wanted my entity to say something in the chat on interaction. so I typed this: par1EntityPlayer.addChatMessage(new ChatComponentText("[" + entity.modid.mobname.name + "] " + "entity.go")); When I run the game my mob will tell me: [entity.modid.mobname.name] entity.go. This is not what I wanted, I wanted it to be: [Name] Go Name is the name of the mob, the name is located in the language file. Go is the string I wanted the mob to say, this is located in my language file too. What do I need to have or do? There is nothing strange in my class. Coding, Testing, Smiling, Publishing!
July 15, 201411 yr Author I found it! Just use the same methode as normal minecraft uses, it will also use the custom language file. "[" + I18n.format("entity.modid.mobname.name", new Object[0]) + "] " + I18n.format("entity.go", new Object[0]))); Now my mob says: [Name] Let's go! It Worked Coding, Testing, Smiling, Publishing!
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.