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

Hey, it's me again :P

 

 

I've got 2 questions:

 

1st -> im holding a stack of 5 items (new item), it's a soup. When I eat one, all others just disappear and left is only 1 bowl :/

i jsut don't get it, i set it's stack size to 5 >.<

here's the Item:

public class Soup extends ItemSoup
{

        public Soup(int id)
        {
                super(id, 6);
                setMaxStackSize(5);
                setCreativeTab(CreativeTabs.tabFood);
                setUnlocalizedName("Soup");
                
        }
        
        public void func_94581_a(IconRegister iconRegister)
        {
            iconIndex = iconRegister.func_94245_a("east_crips:x-4ns");
        }
}

 

 

and 2nd -> I want translations for my item's names. So i went out, looking wor a solution and found a forum post.

I did it like this, but it's not working. it's not changing when i set the lang. to german. Is it correct like this? ...

LanguageRegistry.addName(Soup, "Soup");
LanguageRegistry.instance().addStringLocalization("Soup.name", "de_DE", "Suppe");

 

I just can't find a solution for all this, trying to do as much as i can alone to get more into it.. but hey, everyone needs some help at the beginning of something.. i guess.. ^^

 

 

Cheers,

-East

you have extended itemsoup with your food class and that can only have a stack of one and is programmed when eaten to replace the soup stack(1) with a bowl stack(1) so you just have to make your food item a single stack or just extend itemfood instead but then you might have to change some of your classes code.

Use examples, i have aspergers.

Examples make sense to me.

i think now you want to setUnlocalizedName("itemName");

then LanguageRegistry.addStringLocalization(key, lang, value);

where key is "item.itemName"

 

not sure as i've never used it but it sounds like its how it should work

  • Author

//EDIT: just figured it out myself :) ".name" was missing in key.

For all the people who might have the same problem and search for an answer,

it should look like this:

(Unlocalized name is "Soup")
LanguageRegistry.addName(Soup, "Soup");
LanguageRegistry.instance().addStringLocalization("item.Soup.name", "de_DE", "Suppe");

 

 

 

right now, it's like this:

 

(Unlocalized name is "Soup")
LanguageRegistry.addName(Soup, "Soup");
LanguageRegistry.instance().addStringLocalization("item.Soup", "de_DE", "Suppe");

but when i run minecraft, there's no name when im hovering over it. why? i dont know :D

this is weird.. someone help me please :)

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.