Jump to content

ISimpleBlockRenderingHandler automatically binds skin texture!


Recommended Posts

Posted

Hello guys!

 

This is my ISimpleBlockRenderingHandler implementation code:

GL11.glPushMatrix();
Tessellator tessellator = Tessellator.instance;
tessellator.draw();
GL11.glTranslated(x, y, z);
RenderUtil.bindTexture(image);
tessellator.startDrawingQuads();

tessellator.addVertexWithUV(0, 1.5, 0, 0, 0);
tessellator.addVertexWithUV(0, 1.5, 1, 0, 1);
tessellator.addVertexWithUV(1, 1.5, 1, 1, 1);
tessellator.addVertexWithUV(1, 1.5, 0, 1, 0);

tessellator.draw();
RenderUtil.bindTexture(TextureMap.locationBlocksTexture);
tessellator.startDrawingQuads();
GL11.glPopMatrix();

 

But in the work my skin texture is rendered onto the plane!

I can't get it working so I ask you here: Can you help me? Is that a known bug?

 

cbOP_

Posted

I got it now. For some reason it works if I add the coords of the block to the coords of the plane instead of using glTranslate, but I don't understand why it didn't work.

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.