Jump to content

armorInventory[] slots on the EntityPlayer [1.7.10]


LordMastodonFTW

Recommended Posts

Also, if you look in ItemArmor, you will see that those are the opposite indexes of what you would use when creating armor:

/**
* Stores the armor type: 0 is helmet, 1 is plate, 2 is legs and 3 is boots
*/
public final int armorType;

Confusing that they don't match, eh? :P But the indexes you want for your question are the ones diesieben07 pointed out.

Link to comment
Share on other sites

Thank you. I heard that the Chestplate was 3, but that didn't make sense so I decided to ask.

It is 3 if you use player.getEquipmentInSlot(i), as slot 0 is the held item and 1-4 are the armor slots, with the same indexes as diesieben07 mentioned but all incremented by 1. You don't have to shift the index if you use player.getCurrentArmor(i).

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.



×
×
  • Create New...

Important Information

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