Jump to content

MC 1.4.7 Arrow texture missing in compiled mod


Terristen

Recommended Posts

I've looked, cannot find any reference to this exact issue anywhere. It's not the usual RTFM, as far as I can tell.

 

Background:

  • MC 1.4.7 on a custom modpack server outside my control (thus not upgraded to newest forge)
  • I have a custom arrow that works great. All the usual issues have been dealt with. It's fired from a custom bow.
  • In Eclipse the mod works as expected.
  • The arrow texture resides in a /gfx/ folder in my mod along with the other textures my mod uses (blocks/machines, items, etc...).
  • After recompiling and reobfuscating the mod, I copied the gfx folder to the reob'ed directory and put everything in a zip.
  • I deployed the mod to a tekkit-lite instance for testing.

 

Now the problem:

All my textures are working EXCEPT the arrow texture for the EntityArrow. It is located in the same folder as the items spritesheet, and other textures. I get the "Texture Missing" texture on the arrow in-flight instead of the custom texture. Again, the textures work fine in Eclipse, but not in the deployed mod.

 

  • I've checked that the folder is in the same location inside the zip as it sits in the eclipse src folder
  • I've checked that the image is not corrupted

 

Ideas? I'm lost at this point.

 

 

 

 

"The Gentle Way... My @$$!"

-average new judo student upon learning the meaning of the word Judo in Japanese

Link to comment
Share on other sites

Check the error log (there's always a forge_log0) for any "texture not found" lines.

Post that and your code, along with a screenshot of the folder structure inside your zip.

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

Do you have a direct link to the texture? e.g. /mods/modName/textures/etc. Because that can change when you move from eclipse to the actual mine craft running environment. My advice is to put this...

new File("GoofyGoober").mkdir();

Somewhere in your render code. When minecraft runs it will make the folder "GoofyGoober", compare that folder location to when you run it in eclipse and when you run it in the tekkit-lite instance. If they are in different locations you need to change the file path.

 

Also just check that the texture is in the right folder. Sometimes it could just be as derpy as that.

Link to comment
Share on other sites

Do you have a direct link to the texture? e.g. /mods/modName/textures/etc. Because that can change when you move from eclipse to the actual mine craft running environment. My advice is to put this...

new File("GoofyGoober").mkdir();

Somewhere in your render code. When minecraft runs it will make the folder "GoofyGoober", compare that folder location to when you run it in eclipse and when you run it in the tekkit-lite instance. If they are in different locations you need to change the file path.

 

Also just check that the texture is in the right folder. Sometimes it could just be as derpy as that.

 

As for the mkdir() suggestion and the folder check... All my other textures for the mod are in the same folder. They all work in the compiled package. I'm using a variable in the CommonProxy that points to the gfx folder to do the loadTexture() in the renderer.

 

I'll put the pertinent code bits up in a little while.

"The Gentle Way... My @$$!"

-average new judo student upon learning the meaning of the word Judo in Japanese

Link to comment
Share on other sites

Pertinent section of Renderer

 

package terristen.minecraft.platecraft.entity;

import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;

import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

import terristen.minecraft.platecraft.Platecraft;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class PlatecraftArrowRenderer extends Render
{



    public void renderArrow(PlatecraftArrow par1EntityArrow, double par2, double par4, double par6, float par8, float par9)
    {    	
        //this.loadTexture(Platecraft.proxy.TEXTURE_PATH + "/" + par1EntityArrow.getArrowTexture() + ".png");
        this.loadTexture(Platecraft.proxy.TEXTURE_PATH + "/arrows.png");
        GL11.glPushMatrix();
        GL11.glTranslatef((float)par2, (float)par4, (float)par6);
        GL11.glRotatef(par1EntityArrow.prevRotationYaw + (par1EntityArrow.rotationYaw - par1EntityArrow.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(par1EntityArrow.prevRotationPitch + (par1EntityArrow.rotationPitch - par1EntityArrow.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
        Tessellator var10 = Tessellator.instance;

{...etc...}

 

 

Folder Structure inside Zip (not screen-shotted)

 

 

[pre]

mcmod.info

/terristen

    /minecraft

        /platecraft

            Platecraft.class

            /gfx

                arrows.png

                blocks.png

                items.png

            /item

                arrowItem.class

            /entity

                PlatecraftArrow.class

                PlatecraftArrowRenderer.class

 

[/pre]

 

 

Note: The other textures in the same folder work both in Eclipse and in the compiled mod, where they sit.

 

 

As for the logs. There are no references to a missing texture in the ForgeModLoader-client-#.log files, and I see no error logs in the MC directory. There are no other log files available in the MC directory or sub-directories.

 

One last detail, though I don't think it's playing any part. After reobfuscating (a minute+ after closing command window) Microsoft Security Essentials prompts me to "send information about an unknown file" to Microsoft (NSA?). It's complaining about reobfuscate.jar. It's annoying, but doesn't seem to be a likely culprit.

"The Gentle Way... My @$$!"

-average new judo student upon learning the meaning of the word Judo in Japanese

Link to comment
Share on other sites

Sorry been occupied last couple days.

 

in CommonProxy

public static String TEXTURE_PATH = "/terristen/minecraft/platecraft/gfx/";

"The Gentle Way... My @$$!"

-average new judo student upon learning the meaning of the word Judo in Japanese

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.