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

I'm having a problem with my mod because none of my textures are being loaded. For that matter neither are my localizations. My block class looks like this:

 

package net.richbaird.testtutorial.blocks;

import cpw.mods.fml.common.registry.GameRegistry;
//import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.richbaird.testtutorial.lib.constants;

public class OrangeBlock extends Block {
    private String blockName = "orangeBlock";
    public OrangeBlock() {
        super(Material.rock);
        this.setBlockName(constants.MODID + "_" + blockName);
        this.setCreativeTab(CreativeTabs.tabBlock);
        GameRegistry.registerBlock(this,blockName);
        this.setBlockTextureName(constants.MODID + ":" + blockName);
        //LanguageRegistry.addName(this,"tutorial block");

    }

}

 

 

here is my constants class

 

package net.richbaird.testtutorial.lib;
public class constants {
    public static final String MODID = "testtutorial";
    public static final String MODNAME = "Test Tutorial";
    public static final String VERSION = "1.0";
}

 

I have my texture saved at

 

~/IdeaProjects/testmod/src/main/resources/assets/testtutorial/textures/blocks/orangeBlock.png

 

According to the log it is unable to find my texture. Here's the message I'm getting

 

[08:08:14] [Client thread/ERROR]: Using missing texture, unable to load testtutorial:textures/blocks/orangeBlock.png
java.io.FileNotFoundException: testtutorial:textures/blocks/orangeBlock.png

 

The client loads and my item shows up but with a default black and purple texture. What have I done wrong? I'm thinking it might have to do with my naming conventions, since the .lang file never gets read either, and the only way I can give my block a friendly name is with the now depreciated LanguageRegistry.addName() method

  • Author
Are you using IntelliJ 14?

 

I am using itellij 14.  I've applied the fix, is there a way to rebuild my configuration once I'm in the middle of my mod?

  • Author

I got it working thanks, had to run setupDecompWorkspace --refresh-dependencies and that fixed it up.

 

Thanks again that had me scratching my head for a while.

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.