I have a problem connected with custom item NBT updates and block breaking that I am trying to resolve. The custom item mentioned is a torch with it's own custom class and NBT values that are regularly updated twice every 20 ticks. The problem occurs when I try to break blocks with the torch selected. The moment the item runs an NBT update the break progress is stopped with an Action.ABORT_DESTROY_BLOCK action.
My plan to solve this is to create a static map which would contain ItemStack references and boolean flags that would return true while the block is being mined with the belonging item, try to catch the block breaking event and raise these flags, and finally either stop updating until the flags are false or update to a local container somewhere and copy to NBT later. I've tracked down the cause of the problem (check down for more info), however I would like to know if there is a more elegant solution then the one I have in mind. The mentioned solution requires a lot of work around and I would rather avoid it if possible.
Here's an open issue on GitHub with additional information:
https://github.com/yooksi/FierySouls/issues/5
Thank you in advance!