Jump to content

Textures won't load. [SOLVED]


Robo51

Recommended Posts

Having recently decided to try my hand at modding I've been having fun learning new things.

But now I've hit a wall, I can't get a texture to load and I can't figure out why.

 

RedCoal.java

package Newt;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class RedCoal extends Item
{

public RedCoal()
{
        setUnlocalizedName(Reference.MODID + "_" + "redcoal");
        setTextureName(Reference.MODID+":"+"redcoal");
        setCreativeTab(CreativeTabs.tabMaterials);  
}

}

 

Reference.java

package Newt;

import net.minecraft.item.Item;

public class Reference
{
    public static final String MODID = "Newt";
    public static final String VERSION = "0.1";
}

 

Newt.java

package Newt;

import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = Reference.MODID, version = Reference.VERSION)
public class Newt
{
    public static final String MODID = "Newt";
    public static final String VERSION = "0.1";
    public static Item RedCoal;
    
    @EventHandler
    public void init(FMLPreInitializationEvent event)
    {
    	RedCoal =  new RedCoal();
    	
    	GameRegistry.registerItem(RedCoal, "RedCoal");
    	
    	GameRegistry.addRecipe(new ItemStack(Blocks.mossy_cobblestone), new Object[]
    	{
        	"AAA",
        	"ABA",
        	"AAA",
        	'A', Blocks.sapling, 'B', Blocks.cobblestone
        });
    	
    	GameRegistry.addRecipe(new ItemStack(Blocks.stonebrick, 1, 1), new Object[]
    	{
        	"AAA",
        	"ABA",
        	"AAA",
        	'A', Blocks.sapling, 'B', Blocks.stonebrick
    	});	    	
    	
    }
}


 

And this is the directory tree:

 

Forge Mods\src\main\resources\assets\Newt\textures\items\redcoal.png

 

 

When I load up the test environment in Eclipse the log spits out this:

 

[10:07:21] [Client thread/ERROR]: Using missing texture, unable to load newt:textures/items/redcoal.png

java.io.FileNotFoundException: newt:textures/items/redcoal.png

 

 

 

I don't understand why the localizations are working fine, but the textures wont load.

I'm not trying to be rude it just comes out that way sometimes.

I'm here to try and learn as much as I can, won't you join me?

Link to comment
Share on other sites

do you have your project on git? Or somewhere I can view all of your code?

 

my only suggestion would be maybe making your ID lowercase and your mod's package to be lowercase as well

 

Newt => newt

 

don't think that is the issue but at this moment I'm spitballin' at little things that might be an issue even if they don't seem like it.

 

EDIT:

you have redcoal saved as a png that is 16x16 correct?

Link to comment
Share on other sites

Oh my gosh I figured it out. I feel silly.

 

I changed:

 

Forge Mods\src\main\resources\assets\Newt\textures\items\redcoal.png

 

To:

 

Forge Mods\src\main\resources\assets\newt\textures\items\redcoal.png

 

and it worked.

 

Thanks for your help. :)

I'm not trying to be rude it just comes out that way sometimes.

I'm here to try and learn as much as I can, won't you join me?

Link to comment
Share on other sites

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.