Jump to content

[SOLVED]Block not rendering correctly in inventory


requimrar

Recommended Posts

Help...!

 

I've just made a model for my Tile Entity, and I'm rendering it using an ISBRH (ISimpleBlockRenderingHandler), along with setRenderBounds() and renderStandardBlock().

 

 

The block looks fine in-world, but (as from the title), I'm having problems with it in the inventory.

 

The model is basically a copy of the vanilla Anvil model.

However, seen here:

 

 

screenie.png

 

 

It doesn't render the whole block...

 

 

 

Here's the code:

http://pastebin.com/prvwfMjS

Link to comment
Share on other sites

EDIT: Problem solved inn the post below this.

 

I'm not familiar with rendering so I'm not going to try at this code, but It made me wonder about this odd thing:

 

On Line 63, 69 and below you have these calls to render each face. But the parameters are the same for all of them and zero, is that meant to be so?

renderer.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(0, 0));

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

Link to comment
Share on other sites

I think it's setNormal() that matters...

 

Still, don't quote me on that; I copied this from a tutorial somewhere and... even BC3 uses this set of methods, so...

 

Mazetar, you're on a replying spree!

 

 

EDIT: well well well.

Turns out I put the brace in the wrong place, the entire chunk is supposed to be inside the for loop...

 

Case closed (:

Link to comment
Share on other sites

Ah great, did that include the last line:

renderer.clearOverrideBlockTexture();

Wondering since I will get into minecraft's rendering soon after I'm done learning more of the openGL basics :)

 

Mazetar, you're on a replying spree!

Hehe, well I'm trying to work on my mod but got stuck on a logic problem so I'm procrastinating by answering posts on the forum when I see a chance to help or to learn something =)

 

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

Link to comment
Share on other sites

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.