MinecraftForge icon indicating copy to clipboard operation
MinecraftForge copied to clipboard

[1.18.x] New Function for when an Item stops being used

Open rehwinkel opened this issue 4 years ago • 2 comments

This PR basically just passes LivingEntity#stopUsingItem onto the last Item being held. The new Item method is also called when switching slots while using an item, which the releaseUsing and finishUsingItem functions don't do.

rehwinkel avatar Jan 25 '22 14:01 rehwinkel

Would it be better to have that method in IForgeItem?

thedarkcolour avatar Jan 26 '22 23:01 thedarkcolour

I've added a check in the stopUsingItem function to avoid calling the hook on air items. When switching slots, it is now only called when the "used" item is not empty. In just a sec I'll change the condition in the patch to be in-line.

rehwinkel avatar Jan 28 '22 09:01 rehwinkel

Hello! @rehwinkel, please leave a comment whether you wish to continue this PR and update it to the latest active version of 1.19.2 (or leave an explanation why this PR's changes are not applicable to 1.19.2). If we do not hear back from you after some time, this PR will be closed for inactivity.

If anyone else wishes to continue the work of this PR, please create a PR with a link to this PR for reference. Thank you for your contributions. 👋

sciwhiz12 avatar Aug 27 '22 18:08 sciwhiz12

Im currently not planning on continuing work on this PR. You can close it if you like.

rehwinkel avatar Aug 27 '22 18:08 rehwinkel

Closing for now. Thank you for your contributions!

sciwhiz12 avatar Aug 27 '22 18:08 sciwhiz12