SpongePowered / Sponge

The SpongeAPI implementation targeting vanilla Minecraft and 3rd party platforms.
MIT License
390 stars 211 forks source link

Clicking anvil slots error if UpdateAnvilEvent is being listened to #2426

Closed DrZoddiak closed 2 years ago

DrZoddiak commented 4 years ago

I am currently running

Issue Description If a plugin is listening to UpdateAnvilEvent, and a player uses the anvil and clicks either left, right, or result slot, then this error is sent If a valid input is set into the anvil in example if you put an enchanted book in the right slot you receive the same error, but once you put a sword (or any item) into the left slot, the error stops getting sent. From then on you can act freely with the anvil until you re-open the menu, and then the errors persist (until a valid input is made)

This doesn't happen if nothing is listening to the UpdateAnvilEvent

Code necessary to replicate (It's tiny) https://gist.github.com/DrZoddiak/426e0abbeed9e68bef42b13d4125617d

Latest.log https://gist.github.com/DrZoddiak/8dcfcf5aab297459b3bafa776f025228

The error sent (same as above, just copying here) https://gist.github.com/DrZoddiak/b4726a36c8a2038f137c6a06de4e15d3

Faithcaio commented 2 years ago

was fixed in https://github.com/SpongePowered/Sponge/commit/aa86ca4ec0d768a17c5daebdb9aebce748663be0