Jump to content

Getting variables during custom item render


Recommended Posts

Hello, I'm trying to render a custom item. I've completed the 3rd person rendering without a problem. However, I cannot get the renderer to work for third person as there are some variables I am missing. To test the item renderer I've simply copied the code from ItemRenderer, I will change this later to suit the mod. The code uses variables either private in the ItemRenderer class or passed into the method. The variables are equippedProgress, prevEquippedProgress and the partial tick. How can I access these variables from my custom ItemRenderer?


EDIT: No matter what I seem to do in my first person section, nothing seems to change..

public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
	EntityLivingBase par1EntityLivingBase = (EntityLivingBase) data[1];
	switch (type) {
	case EQUIPPED: {
                    // This works
                    // How can I get this to work? links?

Link to comment
Share on other sites



I'm not sure why you need equippedProgress and prevEquippedProgress?  - these are used by the rendering code to position the player's arm (and item) before control passes to your custom renderer, so you don't really need to worry about it?


Perhaps if you could describe in a bit more detail what you're trying to do?


There are a few links below which might (or might not..) be helpful







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.

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.


  • Create New...

Important Information

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