Jump to content

Rendering ItemStack in TESR


shadowfacts

Recommended Posts

So I've got a

TileEntity

that contains an

ItemStack

. The TESR for the TE should render the item spinning and bobbing up and down in the block. I've run into a problem because my block isn't a normal 1m^3 block, but much smaller.

 

I've tried two approaches to rendering the item, neither of which has been completely successful.

 

My first approach was getting the

IBakedModel

for the stack using

RenderItem

and then also use

RenderItem

to render that model. This worked and stayed in the proper position while rotating/bobbing. However, the item was rendered completely dark and I wasn't able to find a fix (screenshot).

 

My second approach was to use

RenderItem

to get the

IBakedModel

for the stack and use

BlockModelRenderer

to render the model. This resulted in the item rendering properly lit, but the item was moving with the player (not in a 1:1 fashion, but something else).

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

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.