Jump to content

[Solved] help w missing texture problem?


dbang

Recommended Posts

This is my first ever mod.  I'm creating a basic block similar to this tutorial: http://www.minecraft...ki/Basic_Blocks

 

I'm using Forge / Eclipse / Minecraft 1.5.2.  My basic block is working, except that instead of using texture file I provided, it's displaying a white texture with the words "missing texture".

 

Here's my block class:

public class GenericBlock extends Block {

protected Icon blockIcon;


public GenericBlock (int id, Material material) {
super(id, material);
this.setCreativeTab(CreativeTabs.tabBlock);
System.out.println("+++++++++GenericBlock constructor[" + id + "," + material + "]");
}

public void registerIcons(IconRegister iconRegister)
{
blockIcon = iconRegister.registerIcon("Generic:genericdirt");
System.out.println("++++++++++++++block icon registered: " + blockIcon.getIconName());
}

}

 

I know it can find the file, because when I try a bogus file (e.g. Generic:blahblah) I get an error.

 

I'm running this in Eclipse, and the texture file is located in forge\mcp\eclipse\Minecraft\bin\mods\Generic\textures\blocks\genericdirt.png

 

(I tried to follow Draco's example here http://www.minecraftforge.net/w/images/4/43/Texturecode.png but I got errors, because Eclipse wasn't copying the image file correctly.  So I followed the advice here instead http://www.minecraftforge.net/wiki/Eclipse#Fixing_textures_not_being_copied and the errors went away...but still no textures.)

 

Help?

Link to comment
Share on other sites

For the 14th time:

Capture.png

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

forge\mcp\src\minecraft\myFolderName/myPicture.png

> sorry, thats for other textures.

 

your should be in

 

forge\mcp\src\minecraft\mods\MODID\textures\blocks

or

forge\mcp\src\minecraft\mods\MODID\textures\items

 

Thanks, but as I said to Draco, that didn't work.  I initially had it in ...mods\Generic\textures\blocks but I got errors that it couldn't find the file.  That appears to be because Eclipse was not correctly copying the .png file to the bin folder.  So I followed the advice regarding Eclipse: set up a "linked folder" and marked it "use as source folder".  This resulted in the .png file getting copied to the bin folder I mentioned and got rid of the error at startup.  It's finding the file, there's no question, because if I type the filename wrong, it gives me an error.  In this example, I get no error...I just get a white block texture with "missing texture missing texture" on it.

Link to comment
Share on other sites

Hey, someone on another forum found my bug (http://www.minecraftforum.net/topic/1817947-help-w-missing-texture/).  This line accidentally overrides the blockIcon member variable in the Block superclass:

protected Icon blockIcon;

 

The "missing texture" texture must be what Minecraft does instead of giving a RTE when the blockIcon variable is unset or null at render time.  Clever!

 

(@Draco: I really wish you'd stop posting that picture repeatedly.)

 

Link to comment
Share on other sites

(@Draco: I really wish you'd stop posting that picture repeatedly.)

 

Of the 14 times I've posted it, it's actually been what was needed twelve times.

 

So no.

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

(@Draco: I really wish you'd stop posting that picture repeatedly.)

 

Of the 14 times I've posted it, it's actually been what was needed twelve times.

 

So no.

 

Interesting, since 1) it doesn't actually work (unless you do the extra setup to make Eclipse copy the images), and 2) I read most of those 14 posts (I do my research before asking a question as a newbie) and in most of them, there's no confirmation from the OP that that fixed their problem.

 

Perhaps I could persuade you, if not to stop posting the image, to actually read the post first?  If you'd read my post, you'd have noticed that I actually linked to your image and explained that I'd tried it and it had not worked.

 

If not that, maybe I could at least persuade you to not be snotty about posting it?  Don't you find it just a wee bit embarrassing to crow about doing something 14 times and have it not work?

Link to comment
Share on other sites

Interesting, since 1) it doesn't actually work (unless you do the extra setup to make Eclipse copy the images)

 

Running in Eclipse works just fine for me.  I had to do zero setup work.

 

And I did read your post, I got to this part:

 

[My textures are at] forge\mcp\eclipse\Minecraft\bin\mods\Generic\textures\blocks\genericdirt.png

 

At which point I knew that you hadn't actually followed my directions.

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

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.