Jump to content

Recommended Posts

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

Posted

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.

Posted

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

Posted

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
    • Maybe you need to create file in assets/<modid>/items/<itemname>.json with content like this:   { "model": { "type": "minecraft:model", "model": "modname:item/itemname" } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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