[1.18.x] New Function for when an Item stops being used
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.
Would it be better to have that method in IForgeItem?
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.
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. 👋
Im currently not planning on continuing work on this PR. You can close it if you like.
Closing for now. Thank you for your contributions!