Jump to content

Recommended Posts

Posted

I am using forge version: 9.10.0.789

 

The texture for a custom projectile I created is not loading correctly, I have searched extensively for similar issues but with no luck. The entity renders correctly, but has the purple missing texture instead of the specified one. My textures are in forge/mcp/eclipse/Minecraft/bin/assets/chimera27metroid/textures/entities/

To be safe I also copied the texture to /entity, /projectile, and /model, also in textures.

I have tried using the default arrow texture instead to rule out a problem with the texture itself, but there was no change. The Render file is here, with the spots where the texture is specified.

package project.main.client;

 

import net.minecraft.client.renderer.Tessellator;

import net.minecraft.client.renderer.entity.Render;

import net.minecraft.entity.Entity;

import net.minecraft.util.MathHelper;

import net.minecraft.util.ResourceLocation;

 

import org.lwjgl.opengl.GL11;

import org.lwjgl.opengl.GL12;

 

public class RenderPowerBolt extends Render {

 

protected ResourceLocation fun_110774_a(Entity entity) {

return (new ResourceLocation("chimera27metroid:entitypowerbolt.png"));

}

 

@Override

public void doRender(Entity entity, double d0, double d1, double d2,

float f, float f1) {

        this.func_110777_b(entity);

GL11.glPushMatrix();

GL11.glTranslatef((float)d0, (float)d1, (float)d2);

GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f - 90.0F, 0.0F, 1.0F, 0.0F);

GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f, 0.0F, 0.0F, 1.0F);

Tessellator tessellator = Tessellator.instance;

byte b0 = 0;

float f2 = 0.0F;

float f3 = 0.5F;

float f4 = (float)(0 + b0 * 10) / 32.0F;

float f5 = (float)(5 + b0 * 10) / 32.0F;

float f6 = 0.0F;

float f7 = 0.15625F;

float f8 = (float)(5 + b0 * 10) / 32.0F;

float f9 = (float)(10 + b0 * 10) / 32.0F;

float f10 = 0.05625F;

GL11.glEnable(GL12.GL_RESCALE_NORMAL);

float f11 = 0;

if (f11 > 0.0F)

{

  float f12 = -MathHelper.sin(f11 * 3.0F) * f11;

  GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F);

}

GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);

GL11.glScalef(f10, f10, f10);

GL11.glTranslatef(-4.0F, 0.0F, 0.0F);

GL11.glNormal3f(f10, 0.0F, 0.0F);

tessellator.startDrawingQuads();

tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)f6, (double)f8);

tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)f7, (double)f8);

tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)f7, (double)f9);

tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)f6, (double)f9);

tessellator.draw();

GL11.glNormal3f(-f10, 0.0F, 0.0F);

tessellator.startDrawingQuads();

tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)f6, (double)f8);

tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)f7, (double)f8);

tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)f7, (double)f9);

tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)f6, (double)f9);

tessellator.draw();

for (int i = 0; i < 4; ++i)

{

  GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);

  GL11.glNormal3f(0.0F, 0.0F, f10);

  tessellator.startDrawingQuads();

  tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double)f2, (double)f4);

  tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double)f3, (double)f4);

  tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double)f3, (double)f5);

  tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double)f2, (double)f5);

  tessellator.draw();

}

GL11.glDisable(GL12.GL_RESCALE_NORMAL);

GL11.glPopMatrix();

}

 

@Override

protected ResourceLocation func_110775_a(Entity entity) {

return (new ResourceLocation("/entities/entitypowerbolt.png"));

}

 

}

 

 

 

I also tried replacing chimera27metroid:entitypowerbolt.png with:

chimera27metroid:entitypowerbolt

assets/chimera27metroid/textures/entities/entitypowerbolt.png

/assets/chimera27metroid/textures/entities/entitypowerbolt.png

bin/assets/chimera27metroid/textures/entities/entitypowerbolt.png

/bin/assets/chimera27metroid/textures/entities/entitypowerbolt.png

assets/chimera27metroid/textures/entities/entitypowerbolt

/assets/chimera27metroid/textures/entities/entitypowerbolt

bin/assets/chimera27metroid/textures/entities/entitypowerbolt

/bin/assets/chimera27metroid/textures/entities/entitypowerbolt

with no luck. If anyone knows what's going on, any help would be appreciated!!!

Creator of Metroid Cubed! Power Suits, Beams, Hypermode and more!

width=174 height=100http://i.imgur.com/ghgWmA3.jpg[/img]

Posted

If you have a seperate project you may need to add the assets folder to the bin folder of that project, I had to do so for mine so i have eclipse/ProjectNameHere/bin/assets/...

If you guys dont get it.. then well ya.. try harder...

Posted

I got a similar problem here my custom added entities are invisible and im getting the following error:

 

2013-07-14 11:29:46 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Registering texture
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(TextureManager.java:99)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.texture.TextureManager.func_110577_a(TextureManager.java:41)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.Render.func_110776_a(Render.java:50)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.Render.func_110777_b(Render.java:45)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RendererLivingEntity.renderModel(RendererLivingEntity.java:293)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RendererLivingEntity.func_130000_a(RendererLivingEntity.java:154)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderLiving.doRenderLiving(RenderLiving.java:28)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at mod.cupcoffee.RenderMug.renderCow(RenderMug.java:26)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at mod.cupcoffee.RenderMug.doRender(RenderMug.java:42)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:934)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-07-14 11:29:46 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110536_a(SimpleReloadableResourceManager.java:59)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.texture.SimpleTexture.func_110551_a(SimpleTexture.java:31)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(TextureManager.java:84)
2013-07-14 11:29:46 [iNFO] [sTDERR] 	... 22 more

 

I thinking of the same problem but not entirely sure.

 

~Coffee

Posted

Try this:


private static final ResourceLocation texture = new ResourceLocation("chimera27metroid","textures/entities/entitypowerbolt.png");

@Override
protected ResourceLocation func_110775_a(Entity entity) {
return texture;
}

 

Make sure your texture is in your mod file at "assets/chimera27metroid/textures/entities/"

 

Posted

It is, that's just one of the MANY paths I tried

 

EDIT: IT'S ALIVE!!!!!

 

Apparently my textures were in the wrong minecraft, they were in eclipse/minecraft/bin, but they needed to be in src/minecraft/, for some reason it lets me put item textures in eclipse though, which threw me off, curious...

anyway, thanks SO much! I have been trying to figure this out for DAYS!!1

Creator of Metroid Cubed! Power Suits, Beams, Hypermode and more!

width=174 height=100http://i.imgur.com/ghgWmA3.jpg[/img]

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.