Jump to content

AnvilUpdateEvent called too late


MistressNebula

Recommended Posts

AnvilUpdateEvent is called only when both inputs are estabilished. I understand the safety implications, and it does make sense to check if the left item exists before doing anything, but the Anvil can be used even with just one item and requiring the right slot to also be filled cuts the AnvilMenu method in a weird spot where a user doesn't have full control over the block's behavior.

I'm working on 1.18.2, so i don't know if 1.19.x is any different, but since anvils have worked like this for the longest time it's probably the same as well. Feel free to correct me though.

Example: i'm making an anvil customization mod. Amongst other things, i planned for a feature that allows users to change the level cost of renaming an item. As of now, this feature would only work as intended if two items are in the anvil, while renaming with only one item in the ui would run vanilla behavior no matter what.

 

Edit: i wasn't sure if this counts as a suggestion or an issue so i had to choose one. Please do tell me if this topic should go somewhere else.

Edited by MistressNebula
Explanation regarding section
Link to comment
Share on other sites

  • 2 months later...

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.