Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Get Item held by cursor in 1.17.1+


Danny and Son
 Share

Recommended Posts

Thank you! I did notice AbstractContainerMenu#getCarried and was able use that.

Sorry, I am maintaining my mods in 1.16.5, 1.17.1 and 1.18 right now, and I just noticed that PlayerInventory#getItemStack does indeed exist in 1.16.5 but not 1.17.1 which doesn't have PlayerInventory at all, just Inventory which does not have getItemStack.

My title should have said 1.17.1+. Sorry for the confusion.

Link to comment
Share on other sites

4 hours ago, diesieben07 said:

1.17 uses Mojang names, not MCP names.

Good to know, so is there a PlayerInventory#getItemStack equivalent in the Mojang mappings, or is AbstractContainerMenu#getCarried the way to go?

I don't actually need to know at this point, and I'm not sure of any scenario where you'd need it and not have a container menu available. I'm just curious and also wondering for the benefit of someone else with the same question who finds this post.

Link to comment
Share on other sites

  • Danny and Son changed the title to Get Item held by cursor in 1.17.1+

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.