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

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

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.