Mekanism Tools

Mekanism Tools

77M Downloads

Minecraft crashes sometimes when using the jetpack (ClassCastException)

have-a-boy opened this issue · 5 comments

commented

Issue description:

Minecraft crashes when using the Mekanism Jetpack, seemingly at random, but always while actively using the jetpack in normal mode. This exact Exception has occurred maybe a dozen times now, I can't reproduce it reliably and sometimes I can use the jetpack for more than a few minutes without any problems:

java.lang.ClassCastException: net.minecraft.item.AirItem cannot be cast to mekanism.common.item.gear.ItemMekaSuitArmor

I am using Mekanism as part of the TNP Limitless 3 modpack, so this could very well be caused by another mod. I have not, however, modified the configs or added any other mod to the pack like Optifine or one of the other usual suspects. At least one other person seems to have had an issue with the jetpack causing crashes in the same modpack, but they have not provided a log of that particular crash unfortunately, so I can't be sure that this is the same issue.

Steps to reproduce:

  1. Equip hydrogen-powered jetpack
  2. Fly around randomly for a few minutes and hope for a crash 🤷

Version (make sure you are on the latest version before reporting):

Forge: 35.1.13
Mekanism: 1.16.4-10.0.18.445
Modpack: TNP Limitless 3 - 1.8.2

Crash log

Link to crash log
Link to crash log (without any added mods)

commented

Feel like someone reported this before, but i can't find the exact issue.

commented

Feel like someone reported this before, but i can't find the exact issue.

The only thing I found that was even remotely similar was this, but it seems like a different error to me.

commented

The crash log I linked was actually one where I was testing the Performant mod, sorry about that. Here is one with the same issue that happened before I added that mod, so basically Limitless 3 out of the box. I'll edit my original comment with this link as well.

commented

Honestly I think another mod is probably at play here as it shouldn't be able to get to that part of the code if the stack is empty (hence air), but it may be worthwhile when I get a chance to work on 10.0.19 to just add an extra safety check or two to prevent this.

commented

Honestly I think another mod is probably at play here as it shouldn't be able to get to that part of the code if the stack is empty (hence air), but it may be worthwhile when I get a chance to work on 10.0.19 to just add an extra safety check or two to prevent this.

Yeah, after looking at the code in question I can't see how this should ever happen without some kind of outside interference. I'll see if I can find out what's causing this in the meantime, thanks a lot though.