Jump to content

texture will not load please help


ClarmonkGaming

Recommended Posts

code is

 

 

package SomeCraft;

 

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

 

public class SomoniomIngot extends Item {

 

public SomoniomIngot(int id) {

super(id);

this.setCreativeTab(CreativeTabs.tabMaterials);

 

}

public void registerIcon(IconRegister par1IconRegister)

{

this.itemIcon = par1IconRegister.registerIcon(SomeCraft.modid + ":" +(this.getUnlocalizedName().substring(5)));

}

 

 

}

this is the structure i am loading from

 

 

 

C:\Users\cole c\Documents\Folders\Modding\forge-1.6.4-9.11.1.953-src\forge\mcp\src\minecraft\assets\somecraft\textures\items

 

 

 

and the name of the png file is SomoniomIngot

 

20296.jpg

 

Link to comment
Share on other sites

use all lower case letters in both your code and your file and folder names.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

is there any other way that i can assign a texture to an item not using this line of code

 

this.itemIcon = par1IconRegister.registerIcon(SomeCraft.modid + ":" +(this.getUnlocalizedName().substring(5)));

 

if there is please tell me thank you fro helping me Sincerely,

                                                                ClarmonkGaming

Link to comment
Share on other sites

I believe if you're just trying to set a texture for an item, you can insert the following line of code:

 

setTextureName("yourmodid:yourTextureName")

 

I'm not sure if you need to make it this.setTextureName() but I don't think so. All my textures are camelCased so I have my texture name camelCased but I'm not sure it matters as long as you're consistent. Also, you can place your textures in a different location- inside the mcp folder, you can create another folder entitled res, which then contains your assets folder.

 

EDIT: The new folder res is simply a workaround for the fact that Eclipse doesn't find textures in the proper location; if you're not using Eclipse, ignore that suggestion! However, if you are, check out the forge wiki page for Eclipse for more info. http://www.minecraftforge.net/wiki/Eclipse#Fixing_textures_not_being_copied

 

Instead of retrieving your modID, you can just type it out. I've had textures work with a separate name from my actual modID; it didn't matter as long as I named my folder the same thing. But that might not work in multiplayer.

 

Hopefully that works for you!

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.