Jump to content

Recommended Posts

Posted

So, I'm updating the mod I've been working on to 1.8, but the RenderBlocks class that I used to render... blocks... into a custom GUI no longer exists. I switched to using RenderItem renderItemModel(ItemStack). It renders items fine, but it only renders blocks registered within my mod.

 

 

0ceb2e5ce8.jpg

 

They all run off the same renderItemModel, leading me to believe there is another function I can use for blocks. But, I have yet to find it... Any ideas? :L

 

GL11.glPushMatrix();
        {
            GL11.glTranslatef(x, y, 0F);
            GL11.glScalef(20F * scale, 20F * scale, 1F);
            GL11.glTranslatef(.55F, .7F, 1F);
            GL11.glRotatef(180F, 1F, 0F, 0F);
            
            if(spin)
                if(itemStack.getItem() instanceof ItemBlock) {
                    GL11.glRotatef(20F, 1F, 0F, 0F);
                    GL11.glRotatef(Minecraft.getMinecraft().theWorld.getTotalWorldTime() % 360, 0F, 1F, 0F);
                }else
                    GL11.glTranslatef(0F, (float)Math.sin(Minecraft.getMinecraft().theWorld.getTotalWorldTime() / 20F) * .1F, 0F);
                
                renderItem.renderItemModel(itemStack);
        }
        GL11.glPopMatrix();

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.