Jump to content

Recommended Posts

Posted

I have looked at several other threads on this and none of them have fixed the problem with the texture not loading. I am not sure what i am doing wrong  but some advice would be much appreciated on this. the texture that it is currently showing is the black and purple texture.

 

Error:

 

Failed to load texture: mochickens:textures/mobs/blueChicken.png

java.io.FileNotFoundException: mochickens:textures/mobs/blueChicken.png

at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67)

at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:31)

at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84)

at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:41)

at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:53)

at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:48)

at net.minecraft.client.renderer.entity.RendererLivingEntity.renderModel(RendererLivingEntity.java:296)

at net.minecraft.client.renderer.entity.RendererLivingEntity.doRenderLiving(RendererLivingEntity.java:156)

at net.minecraft.client.renderer.entity.RenderLiving.doRenderLiving(RenderLiving.java:28)

at mods.moChickens.mobs.RenderBlueChicken.renderBlueChicken(RenderBlueChicken.java:26)

at mods.moChickens.mobs.RenderBlueChicken.doRender(RenderBlueChicken.java:57)

at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312)

at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)

at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)

at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:944)

at net.minecraft.client.Minecraft.run(Minecraft.java:836)

at net.minecraft.client.main.Main.main(Main.java:93)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)

at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

 

 

Code:

 

package mods.moChickens.mobs;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;

@SideOnly(Side.CLIENT)
public class RenderBlueChicken extends RenderLiving
{

private static final ResourceLocation chickenTextures = new ResourceLocation("moChickens:textures/mobs/blueChicken.png");

    public RenderBlueChicken(ModelBase par1ModelBase, float par2)
    {
        super(par1ModelBase, par2);
    }

    public void renderBlueChicken(EntityBlueChicken par1EntityBlueChicken, double par2, double par4, double par6, float par8, float par9)
    {
        super.doRenderLiving(par1EntityBlueChicken, par2, par4, par6, par8, par9);
    }

    protected float getWingRotation(EntityBlueChicken par1EntityBlueChicken, float par2)
    {
    	float f1 = par1EntityBlueChicken.field_70888_h + (par1EntityBlueChicken.field_70886_e - par1EntityBlueChicken.field_70888_h) * par2;
        float f2 = par1EntityBlueChicken.field_70884_g + (par1EntityBlueChicken.destPos - par1EntityBlueChicken.field_70884_g) * par2;
        return (MathHelper.sin(f1) + 1.0F) * f2;
    }

    /**
     * Defines what float the third param in setRotationAngles of ModelBase is
     */
    protected float handleRotationFloat(EntityLiving par1EntityLiving, float par2)
    {
        return this.getWingRotation((EntityBlueChicken)par1EntityLiving, par2);
    }

    public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
    {
        this.renderBlueChicken((EntityBlueChicken)par1EntityLiving, par2, par4, par6, par8, par9);
    }

    /**
     * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
     * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
     * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
     * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
     */
    public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    {
        this.renderBlueChicken((EntityBlueChicken)par1Entity, par2, par4, par6, par8, par9);
    }

@Override
protected ResourceLocation getEntityTexture(Entity entity) {

	return this.chickenTextures;

}
}

 

 

the path to the texture is: src\minecraft\mods\moChickens\textures\mobs\blueChicken.png

Posted

mochickens != moChickens

 

Minecraft performs a toLowerCase on the string you pass it, but doesn't on folder and file names (which are case sensitive).

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.

Posted

Safe your textures in a folder at mcp/src/minecraft/mods/assets/mochickens/textures/mobs/blueChicken.png

 

Hope this helps  :)

Aether II Developer

Posted

i thought i understood what you meant but when i tried it, the problem didnt go away. could you please elaborate more on that?

 

Make all of your folder and file names all lower case letters.

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.

Posted

@draco ive done that. and that didnt fix the issue.

 

@bren even setting the texture in that file path did nothing to fix the issue.

 

I have done a combination of both of your suggestions too.

 

the only line of code that was modified at all was:

private static final ResourceLocation chickenTextures = new ResourceLocation("mochickens:textures/mobs/bluechicken.png");

 

i moved the texture back to where i did have it. any other ideas?

Posted

Hi

 

Try putting a breakpoint into

SimpleReloadableResourceManager.getResource

 

The problem seems to be that the root you have specified doesn't match the ones that Forge has registered.

 

ResourceManager resourcemanager = (ResourceManager)this.resourceManagers.get(par1ResourceLocation.getroot());

 

par1ResourceLocation.getroot() is yours, the valid ones are in the resourceManagers Map.  If you look through the map you might find a clue why your root isn't matching any.

 

-TGG

 

 

 

 

Posted

@TGG im sorry but what you said doesnt make much sence to me.

 

@ToGoLink i swear i tried that set up before and it didnt work, but i just tried it again and it did work.... now to figure out why the wings wont stop rotating.

 

Thanks everyone for the help!

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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