Jump to content

Recommended Posts

Posted

Im back again.

 

Im creating some custom slabs and have them doing all the jazzy connecting to make double slabs, dropping the single slabs when the double slab is broken and stuff

 

I seem to be hitting the same issue that a lot of people have hit in regards to registering half slabs into the language registry (based on my looking around) but no one seems to have the answer.

 

The normal way of:

 

LanguageRegistry.addName(new ItemStack(CustomSingleSlabBlock, 1, 0), "Oak Slab(custom)");

LanguageRegistry.addName(new ItemStack(CustomSingleSlabBlock, 1, 1), "Spruce Slab(custom)");

 

doesnt work.

 

I did find some references to using:

 

LanguageRegistry.instance().addStringLocalization();

 

but i cant make metadata blocks work in this.

 

I always get tile.blah blah.name ingame, its getting this from getFullSlabName in the blocks class, so my question is what is the correct way of registering a metadata halfslab into the language registry.

 

LOL never mind just figured it out:

 

LanguageRegistry.instance().addStringLocalization((myMod.CustomSingleSlabBlock).getFullSlabName(0)+".name", "My Custom Slab");

LanguageRegistry.instance().addStringLocalization((myMod.CustomSingleSlabBlock).getFullSlabName(1)+".name", "My Other Custom Slab");

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



×
×
  • Create New...

Important Information

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