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

Is there any way to skip the tile part of the unlocalized name that i get from

public BlockMetadataBase(String name) {
        super(Material.IRON);
        this.name = name;

        setUnlocalizedName(name);
        setRegistryName(name);
}

 

 

I'm making my mod for 1.10.2 if that's relevant.

Edited by Lgk

  • Author
Just now, diesieben07 said:

No idea what you are talking about. You should almost never call getUnlocalizedName.

Well the problem is simply that my blockstate json will have to be called tile.blocks.json or something like that. And when I'm editing recipes in minetweaker I'll have to type extrastuff:tile.blocks:0, extrastuff:tile.blocks:1 etc.extrastuff_tile.blocks.png.3ad711f6b7406c55894980d8173c4201.png

  • Author

I'd prefer it looked like this except (if you replace items with blocks)

exstrastuff.items.png

  • Author

The problem is that I'm not sure where I passed that name. Here's my ModBlocks.java class. Maybe it's not necessary, I'm puzzled.

public class ModBlocks {

    public static BlockMetadataBase blocks;


    public static void init() {
        blocks = register(new BlockMetadataBase("blocks"));
    }

    private static <T extends Block> T register(T block, ItemBlock itemBlock) {
        GameRegistry.register(block);
        GameRegistry.register(itemBlock);

    if (block instanceof BlockMetadataBase) {
            ((BlockMetadataBase)block).registerItemModel(itemBlock);
            ((BlockMetadataBase)block).registerBakeryVariants();
        }
        return block;
    }

    private static <T extends Block> T register(T block) {
        ItemBlock itemBlock = new ItemBlockMetadataBase(block);
        itemBlock.setRegistryName(block.getUnlocalizedName());
        return register(block, itemBlock);
    }

 

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.