Dirtyhands effect causes crash when trying to cancel feeding from Sophisticated Backpacks' Feeding Upgrade
Closed this issue ยท 1 comments
Minecraft Version
1.20.1
Butchercraft Version
2.4.1
Report
Dirtyhands effect will cause crash when it's trying to cancel the UseItemEvent launched by Feeding Upgrade from Sophisticated Backpacks.
[04:27:52] [Server thread/ERROR]: Exception caught during firing event: Attempted to call Event#setCanceled() on a non-cancelable event of type: net.minecraftforge.event.entity.living.LivingEntityUseItemEvent.Finish
full log: https://mclo.gs/GidCjmw
According to forge's document, it's recommend to check if an event is cancelable before canceling an event.
Not all events can be canceled! Attempting to cancel an event that is not cancelable will result in an unchecked UnsupportedOperationException being thrown, which is expected to result in the game crashing! Always check that an event can be canceled using Event#isCancelable() before attempting to cancel it!
There are two ways to solve this issue:
- #131
- Use Mixin to inject check before Butchercraft canceling this event, refer to: Jasons-impart/Create-Delight-Core/pull/12
Crash Log
Confirmation:
- I have tested this issue without other mods.
#131 fixed