Aquaculture 2

Aquaculture 2

96M Downloads

Crash - Eating any Aquaculture food (AppleCore)

Arkimu opened this issue ยท 1 comments

commented

Minecraft - 1.12.2
Forge - 14.23.4.2707
Aquaculture - 1.6.4
Apple Core - 3.1.1
Apple Skin - 1.0.9

Having a bit of a problem when eating any type of food added by this mod. It seems to be a problem with Apple Core/Skin, or that's what i think.

Crash-Log

I don't know if it is compatibility problems or is just me, but would appreciate some help.

commented

I'm also experiencing this crash. Perhaps it is related to this issue? squeek502/AppleCore#97

Specifically, this comment:

"From what I can tell, the crash is happening because you are modifying the stack size to 0 before calling entityplayer.getFoodStats().addStats(this, stack);, which means that the ItemStack is being marked as empty and is therefore returning ItemAir from stack.getItem() when AppleCore queries it to get its hunger values. AppleCore then crashes, since it can't get food values for ItemAir.

So, the fix would be to swap the ordering of your shrink call, and only do it after calling addStats, onFoodEaten, etc. (see the default ItemFood.onItemUseFinish for a reference)."