Atlantis

Atlantis

822k Downloads

crash with sophisticated backpacks being in chest slot

Tsumiki129 opened this issue ยท 3 comments

commented

wen wearing the backpack from sophisticated backpacks and a full set of any armour vanilla or Atlantis the game crashes the other mod is designed to go in the chest slot and is fine alone but wen added to Atlantis mod and holding a pice of armore with a full set of any armor on and bag in chest slot the Atlantis mod crashes game.
here is my crash log with just the 2 mods together
crash-2024-01-18_23.49.27-server.txt

commented

tell this to the other dev, they are trying to cast into my classes which shouldn't happen

commented

Sorry, but what's happening here is that you are trying to cast any item in armor slot to ArmorItem despite the fact that any item (not only the ones that inherit from ArmorItem) can go in armor slots when they are marked as such using getEquipmentSlot method. So because BackpackItem doesn't inherit from ArmorItem the code below crashes. I am pretty sure that would crash with vanilla Elytra as well btw

ArmorItem breastplate = ((ArmorItem)player.getInventory().getArmor(2).getItem());

commented

ah thanks I didn't realize it was on my end I will fix it