Jump to content

Recommended Posts

Posted

Hello guys. I come here to ask for help to resolve the "GL ERROR". This has occurred after enable the "RenderEquippedItems" method... The video show the problem after enable the "render" and the "solution" after disable the "render".

 

Render Code:

 

 

 

protected void renderEquippedItems(EntityLiving var1, float var2) {
    	super.renderEquippedItems(var1, var2);
    	ItemStack var3 = var1.getHeldItem();
    	ItemStack itemstack1 = var1.func_130225_q(3);
    	Item item;
    	
    	if(var3 != null && var3.getItem() != null){
    		GL11.glPushMatrix();
		this.modeldeadwarrior.rightarm.postRender(0.0625F);
		GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
		IItemRenderer var5 = MinecraftForgeClient.getItemRenderer(var3, IItemRenderer.ItemRenderType.EQUIPPED);
		boolean var6 = (var5 != null) && (var5.shouldUseRenderHelper(IItemRenderer.ItemRenderType.EQUIPPED, var3, IItemRenderer.ItemRendererHelper.BLOCK_3D));
    	
		item = itemstack1.getItem();

		if(item.isFull3D()){
			 float f9 = 0.625F;
			 if(((ECEntityDeadWarrior)var1).isSpinning)
                {
	                GL11.glTranslatef(0.0F, 0.2875F, -0.1F);
	                GL11.glScalef(f9, -f9, f9);
	                GL11.glRotatef(190F, 1.0F, 0.0F, 0.0F);
	                GL11.glRotatef(310F, 0.0F, 1.0F, 0.0F);
                }else
                {
	                GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
	                GL11.glScalef(f9, -f9, f9);
	                GL11.glRotatef(-100F, 1.0F, 0.0F, 0.0F);
	                GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F); 	
                }

			 if(((ECEntityDeadWarrior)var1).doIdleAnim && ((ECEntityDeadWarrior)var1).animTick <= 95)
                {             
                	GL11.glRotatef(((float)((ECEntityDeadWarrior)var1).animTick* 40), 1, 0.3F, -0.4F); 
                }
			 renderManager.itemRenderer.renderItem(var1, var3, 0);

	            if (var3.getItem().requiresMultipleRenderPasses())
	            {
	                renderManager.itemRenderer.renderItem(var1, var3, 1);
	            }
			}
    	GL11.glPopMatrix();
    	}
    }

@Override
protected void renderEquippedItems(EntityLivingBase p_77029_1_, float p_77029_2_)
{
   this.renderEquippedItems((EntityLiving)p_77029_1_, p_77029_2_);
}

 

 

 

Error:

 

 

 

[14:26:50] [Client thread/ERROR]: ########## GL ERROR ##########
[14:26:50] [Client thread/ERROR]: @ Post render
[14:26:50] [Client thread/ERROR]: 1283: Stack overflow
[14:26:50] [Client thread/ERROR]: Couldn't render entity
java.lang.NullPointerException
at com.themathe1.eternalCraft.client.renderer.entity.ECRenderEntityDeadWarrior.renderEquippedItems(ECRenderEntityDeadWarrior.java:98) ~[ECRenderEntityDeadWarrior.class:?]
at com.themathe1.eternalCraft.client.renderer.entity.ECRenderEntityDeadWarrior.renderEquippedItems(ECRenderEntityDeadWarrior.java:139) ~[ECRenderEntityDeadWarrior.class:?]
at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:229) [RendererLivingEntity.class:?]
at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:39) [RenderLiving.class:?]
at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:162) [RenderLiving.class:?]
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:300) [RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) [RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) [RenderManager.class:?]
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527) [RenderGlobal.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300) [EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) [EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1068) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:963) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
[14:26:50] [Client thread/ERROR]: ########## GL ERROR ##########
[14:26:50] [Client thread/ERROR]: @ Post render
[14:26:50] [Client thread/ERROR]: 1283: Stack overflow
[14:26:50] [Client thread/ERROR]: Couldn't render entity
java.lang.NullPointerException
at com.themathe1.eternalCraft.client.renderer.entity.ECRenderEntityDeadWarrior.renderEquippedItems(ECRenderEntityDeadWarrior.java:98) ~[ECRenderEntityDeadWarrior.class:?]
at com.themathe1.eternalCraft.client.renderer.entity.ECRenderEntityDeadWarrior.renderEquippedItems(ECRenderEntityDeadWarrior.java:139) ~[ECRenderEntityDeadWarrior.class:?]
at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:229) [RendererLivingEntity.class:?]
at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:39) [RenderLiving.class:?]
at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:162) [RenderLiving.class:?]
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:300) [RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) [RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) [RenderManager.class:?]
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527) [RenderGlobal.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300) [EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) [EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1068) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:963) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
[14:26:50] [Client thread/ERROR]: ########## GL ERROR ##########
[14:26:50] [Client thread/ERROR]: @ Post render
[14:26:50] [Client thread/ERROR]: 1283: Stack overflow
[14:26:50] [Client thread/ERROR]: Couldn't render entity
java.lang.NullPointerException
at com.themathe1.eternalCraft.client.renderer.entity.ECRenderEntityDeadWarrior.renderEquippedItems(ECRenderEntityDeadWarrior.java:98) ~[ECRenderEntityDeadWarrior.class:?]
at com.themathe1.eternalCraft.client.renderer.entity.ECRenderEntityDeadWarrior.renderEquippedItems(ECRenderEntityDeadWarrior.java:139) ~[ECRenderEntityDeadWarrior.class:?]
at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:229) [RendererLivingEntity.class:?]
at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:39) [RenderLiving.class:?]
at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:162) [RenderLiving.class:?]
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:300) [RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) [RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) [RenderManager.class:?]
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527) [RenderGlobal.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300) [EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) [EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1068) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:963) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

 

 

 

Video:

 

https://www.youtube.com/watch?v=fkn2sYTYjSw

Posted

Infinite loop?

 

Please - rename variables, methods and make it readable.

 

EDIT

I feel the need to point out that is not question - this IS the answer.

1.7.10 is no longer supported by forge, you are on your own.

Posted

Infinite loop?

 

Please - rename variables, methods and make it readable.

 

EDIT

I feel the need to point out that is not question - this IS the answer.

 

Sorry, but i don't understand your reply. Rename the methods and variables will solve the problem? If yes, which metodos and variables?

Posted

Please, just rename your methods - you will see it right away. (If I am right - because I don't see full code).

 

You are making (at least what it seems like, because I don't see neither whole class, nor its super class which you call with super.method()) infinite loop in your method callings.

1.7.10 is no longer supported by forge, you are on your own.

Posted

Please, just rename your methods - you will see it right away. (If I am right - because I don't see full code).

 

You are making (at least what it seems like, because I don't see neither whole class, nor its super class which you call with super.method()) infinite loop in your method callings.

 

Ohh... Sorry, the full code it's in down

I remove the super, but the error continued... ( same error)

 

Full Render Code:

 

 

 

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

    private static final ResourceLocation mobTextures = new ResourceLocation(ECReference.MOD_ID + ":" + "textures/entity/DeadWarrior.png");
    private static final ResourceLocation mobTextures2 = new ResourceLocation(ECReference.MOD_ID + ":" + "textures/entity/DeadWarrior2.png");

    private ECModelDeadWarrior modeldeadwarrior;

    public ECRenderEntityDeadWarrior() {

super(new ECModelDeadWarrior(), 0.5F);
    }
    
    protected ResourceLocation getEntityTexture(ECEntityDeadWarrior par1ECEntityDeadWarrior) {

if (par1ECEntityDeadWarrior.texture == 1) {

    return mobTextures2;
} else {

    return mobTextures;
}
    }

    @Override
    protected ResourceLocation getEntityTexture(Entity par1Entity) {

return this.getEntityTexture((ECEntityDeadWarrior) par1Entity);
    }

    @Override
    protected void preRenderCallback(EntityLivingBase par1EntityLiving, float par2) {

this.renderPlayerScale((ECEntityDeadWarrior) par1EntityLiving, par2);
    }

    protected void renderPlayerScale(ECEntityDeadWarrior par1EntityDeadWarrior, float par2) {

final float f = 1.0375F;
GL11.glScalef(f, f, f);
    }

    @Override
    protected void rotateCorpse(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {

GL11.glRotatef(180F - par3, 0.0F, 1.0F, 0.0F);

if (par1EntityLiving.deathTime > 0) {

    float f = (par1EntityLiving.deathTime + par4 - 1.0F) / 20F * 1.6F;
    f = MathHelper.sqrt_float(f);

    if (f > 1.0F) {

	f = 1.0F;
    }

    GL11.glRotatef(f * this.getDeathMaxRotation(par1EntityLiving), 1.0F, 0.0F, 0.0F);
}
    }
    
    @Override
    protected void renderEquippedItems(EntityLivingBase entitylivingbase, float var2) {
    	ItemStack itemstack = entitylivingbase.getHeldItem();
    	Item item;
    	
    	if(itemstack != null && itemstack.getItem() != null){
    		GL11.glPushMatrix();
		this.modeldeadwarrior.rightarm.postRender(0.0625F);
		GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
		IItemRenderer var5 = MinecraftForgeClient.getItemRenderer(itemstack, IItemRenderer.ItemRenderType.EQUIPPED);
		boolean var6 = (var5 != null) && (var5.shouldUseRenderHelper(IItemRenderer.ItemRenderType.EQUIPPED, itemstack, IItemRenderer.ItemRendererHelper.BLOCK_3D));
    	
		item = itemstack.getItem();

		if(item.isFull3D()){
			 float f9 = 0.625F;
			 if(((ECEntityDeadWarrior)entitylivingbase).isSpinning)
                {
	                GL11.glTranslatef(0.0F, 0.2875F, -0.1F);
	                GL11.glScalef(f9, -f9, f9);
	                GL11.glRotatef(190F, 1.0F, 0.0F, 0.0F);
	                GL11.glRotatef(310F, 0.0F, 1.0F, 0.0F);
                }else
                {
	                GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
	                GL11.glScalef(f9, -f9, f9);
	                GL11.glRotatef(-100F, 1.0F, 0.0F, 0.0F);
	                GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F); 	
                }

			 if(((ECEntityDeadWarrior)entitylivingbase).doIdleAnim && ((ECEntityDeadWarrior)entitylivingbase).animTick <= 95)
                {             
                	GL11.glRotatef(((float)((ECEntityDeadWarrior)entitylivingbase).animTick* 40), 1, 0.3F, -0.4F); 
                }
			 renderManager.itemRenderer.renderItem(entitylivingbase, itemstack, 0);

	            if (itemstack.getItem().requiresMultipleRenderPasses())
	            {
	                renderManager.itemRenderer.renderItem(entitylivingbase, itemstack, 1);
	            }
	}
	GL11.glPopMatrix();
    	}
    }

}

 

 

 

@edit

 

thanks for your help, I changed the "extended" and modified the model class... thanks...

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Reach Out To Rapid Digital: What sapp Info: +1 41 4 80 7 14 85 Email INFO: rap iddi gita lrecov ery @ exe cs. com Hello, my name is Jayson, and I’m 35 years old from the United Kingdom. My family and I recently endured an incredibly challenging experience that I wouldn’t wish on anyone. We became victims of a cryptocurrency investment fraud scheme that saw us lose a staggering $807,000 in USDT and Bitcoins. The fraudsters had created a convincing facade, and we were lured into investing, only to discover later that the platform was a complete scam. We were left devastated, not just financially, but emotionally, as we had trusted these people and believed in the legitimacy of the investment. After the initial shock wore off, we desperately searched for ways to recover the lost funds. It seemed like an impossible task, and we felt as though there was no hope. That’s when, by sheer luck, we stumbled across a post about Rapid Digital Recovery, a cryptocurrency and funds recovery organization with a proven track record in cybersecurity and fraud recovery. We decided to reach out to them, and from the first interaction, we were impressed with their professionalism and transparency. They explained the recovery process in detail and reassured us that they had the skills and expertise to track down the perpetrators and recover our funds. This gave us a renewed sense of hope, something we hadn’t felt in months. What truly stood out during our experience with Rapid Digital Recovery was their dedication to the recovery process. The team went above and beyond, using sophisticated tracking tools and cyber forensics to gather critical information. Within a matter of weeks, they had successfully located the funds and traced the scam back to the fraudsters responsible. They worked with the authorities to ensure the criminals were held accountable for their actions. To our relief, the team at Rapid Digital Recovery was able to recover every single penny we had lost. The funds were returned in full, and the sense of closure we felt was invaluable. We couldn’t have imagined such a positive outcome in the early stages of our recovery journey, and we are deeply grateful for the work they did. If you ever find yourself in a similar situation, I highly recommend contacting Rapid Digital Recovery. Their expertise, transparency, and dedication to their clients make them the go-to choice for anyone seeking to recover lost cryptocurrency or funds. They truly gave us back our financial future.  
    • This is my first time modding anything, so maybe just skill issue. I'm using Forge 54.0.12 and Temurin 21.0.5+11-LTS I wanted to create a custom keybind and to check whether it works I'd like to send a chat message. I tried using Minecraft.getInstance().player.sendSystemMessage(Component.literal("test")); but IntelliJ couldnt resolve sendSystemMessage(...). Since I saw people using it in earlier versions, I tried the same thing with 1.20.6(- 50.1.0), where it works fine, now I can't figure out if this is intentional and whether there are other options for sending chat messages. On that note, is there more documentation than https://docs.minecraftforge.net/en/1.21.x/? It seems very incomplete compared to something like the Oracle Java docs
    • Hi, i'm having this error and I wanna fix it. we try: -Reload drivers -Eliminate .minecraft -Eliminate Java -Restart launcher -Verify if minecraft is using gpu -Mods  in .minecraft is empty -Install the latest and recomended version of forge idk what i have to do, help me pls. the lastest log is: https://mclo.gs/WAMao8x  
    • Read the FAQ, Rule #2. (https://forums.minecraftforge.net/topic/125488-rules-and-frequently-asked-questions-faq/)  
  • Topics

×
×
  • Create New...

Important Information

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