Pink/Black square texture on Blocks

If you have pink and black squares on your block instead of your texture you did something wrong in the texture code. The problem with this code is that is is really precise and can easily be messed up somewhere. Below you will find a list of things to check. One or more of those may fix your problem. If it doesn’t fill in the form at the last page and I will try to figure out why it isn’t working.

  1. Make sure that the image files are in the right location. The location you want is the location where you have forge installed and then the following folders: forge/mcp/src/minecraft then put them in an assets folder.
  2. Make sure that the folders structure in assets is: modid/textures/blocks and then in there the images.
  3. Make sure that the modid folder where you have the textures in has lower case letters. Even if your modid has capital letters just copy the modid and change it into lower case letters.
  4. Make sure that the image name you are using is the unlocalized name followed by .png to make sure it’s the right kind of texture.
  5. If all of the above points are correct there is a problem in your programming. There is really only one place where it can be wrong and that is the registerIcons method in your block. Make sure that the method looks like this.

    This piece of code is very important. If there is a single mistake in here it will not work. Things to note is that you should be using : If you are using any other sign in here it won’t work. Another important thing is that you have the modid from the right file which in this case is Tutorial.modid. And finally make sure that you use .substring(5). If this number is any different your texture will also be broken.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">