Posted September 29, 201411 yr 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?
September 29, 201411 yr Have you saved, and refreshed your project (I found with eclipse Luna I need to manually refresh my project for it to find resources I just added) Other than that you are setting the texture path correctly. Currently updating my Mod to 1.10.2 https://bitbucket.org/hugo_the_dwarf/riseoftristram2016/src?at=master
September 29, 201411 yr Author I have saved and refreshed. I even restarted and that didn't 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?
September 29, 201411 yr 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? Currently updating my Mod to 1.10.2 https://bitbucket.org/hugo_the_dwarf/riseoftristram2016/src?at=master
September 29, 201411 yr Author 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?
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.