Animania Cats & Dogs

Animania Cats & Dogs

454k Downloads

[Crash] Crash when drinking milk bottle, truffle soup when AppleCore is installed

Luke616 opened this issue · 6 comments

commented

Expected Behavior

Milk bottle, truffle soup able to be eaten normally

Actual Behavior

When installed alongside applecore (required library for hunger in peace, hunger overhaul) the game crashes
https://pastebin.com/Eh9VVmmz

This link may be able to help
https://github.com/squeek502/AppleCore/wiki/Integrating-food-items-with-AppleCore

Steps to Reproduce

1- Install the latest animania, applecore
2- Try to drink a milk bottle or consume truffle soup (may be other foods)

Version of Minecraft, version of Animania, Single Player or Server

Minecraft 1.12.2
Forge 1.12.2-14.23.2.2624
Animania 1.12.2-1.4.6
CraftStudio 1.0.0.93-mc1.12-alpha
AppleCore mc1.12.2-3.1.1

Screenshots encouraged

commented

AppleCore doesn’t like it if you access FoodStats directly. They really should provide error trapping if they’re going to implement this way. Thanks for the link!

commented

Huh, iirc we’ve had this issue before, the issue was that the item stack size was decreased before the heal was applied (i think)

commented

I can't even join the world with AppleCore installed...


java.lang.NoSuchMethodError: net.minecraft.util.FoodStats.func_75116_a()I
	at squeek.applecore.asm.Hooks.onAppleCoreFoodStatsUpdate(Hooks.java:42)
	at net.minecraft.util.FoodStats.onUpdate(FoodStats.java:42)
	at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:289)
	at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:423)
	at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:185)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:212)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
	at java.lang.Thread.run(Thread.java:745)```

Happens every time I join a world...
commented

Is your Java out of date maybe? I just tried it and I can load applecore and animania just fine. I do get the truffle soup crash though.

commented

Yeah it also works for me, just not in the dev environment...

commented

Ok found the error. Looks like AppleCore is less forgiving about stack size than vanilla mc. Need to shrink the stack AFTER applying effects. Zero stack size results in NPE.

Fixed in next release.