Returning 'cancel' in an anvil screen callback doesn't cancel spending levels
CommandLeo opened this issue ยท 4 comments
Use the 'Anvil text prompt' example from the docs while in survival mode to reproduce.
Oh thanks, I didn't realize it's client side.
The hackfix is fine, but it would be great if this were fixed internally, since the player is able to see the level number go down and immediately after back up ๐
Even if this was fixed internally, it would be the same hackfix as in scarpet. Just sending the xp data to the client. Its not possible to prevent the client from thinking it lost a level.
This actually confused me a bit, but since the callback cancels all further processing at the very start, nothing should be happening when cancelling. And it actually isn't happening, its just client side, if you relog it comes back.
Adding modify(player,'add_xp',0)
to the callback, just to update the client with the right XP value would be a working fix.