Open Krutoy242 opened 2 years ago
Could it be that the Auto Sieve is attempting to receive potion effects, even though the Auto Sieve is a block and potion effects can only be applied to entities?
(For starters, it's worth mentioning that this crash could be prevented if Bloated Overflow could be turned off, which I made a mistake in, see #121. So what's happening here is SF is still trying to give the Bloated potion effect).
Could it be that the Auto Sieve is attempting to receive potion effects, even though the Auto Sieve is a block and potion effects can only be applied to entities?
The Auto Sieve is using a FakePlayer to simulate what happens when the item is used. Since it does that, items like golden apples would apply their potion effects too, so I don't think it's that. My deobfuscated vanilla source doesn't line up with the crash report line numbers in EntityPlayerMP
so I'm not sure what's going wrong there.
What's interesting is it crashes in onChangedPotionEffect
, implying this fake player already had the Bloated potion effect active on them at the time of the crash. So the first time around, everything worked fine.
I can add a simple !world.isRemote
check before granting the potion effect, which is what golden apples do (so it wouldn't hurt to have). I can also add a another simple instanceof FakePlayer
check as well, since the Auto Sieve fake player doesn't need the potion effect anyway. That would prevent execution from reaching this state, thus preventing the crash, but this doesn't really explain why the problem happens in the first place.
Mod Version: v1.8.2 Minecraft Version: 1.12.2
Describe the bug Right-clicking on Auto Sieve with high-saturated food cause crash:
Steps to Reproduce
/gamemode 0
Expected behavior Auto Sieve should increase speed when feeden.
Full crash log