Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.