Jump to content

Give player capabilities when item is in hotbar


minnymin3

Recommended Posts

A quick look at EntityPlayer and InventoryPlayer showed a few things. You could iterate over the mainInventory of the player which is in InventoryPlayer. Further you could only iterate over the items in mainInventory that correspond to hotbar slots and then getItem() on it and perform your checks.

 

Have a read:

http://jd.minecraftforge.net/net/minecraft/entity/player/EntityPlayer.html

http://jd.minecraftforge.net/net/minecraft/entity/player/InventoryPlayer.html

http://jd.minecraftforge.net/net/minecraft/item/ItemStack.html

 

If I helped you, thank me. If I didn't, let me know.

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.