Closed mrcrashmer closed 6 months ago
Switchy inventories creates PlayerInventory instances with a null player.
The line that causes the crash is CustomCallbacksMixins.java#L241
just change PlayerEquipCallback.ARMOR.invoker().handler(inventory.player, stack, equipmentSlot);
to
if (inventory.player != null) PlayerEquipCallback.ARMOR.invoker().handler(inventory.player, stack, equipmentSlot);
Hi @sisby-folk, I have a question... just to be sure about what is happening here. The PlayerInventories, with null player, that Switchy Inventories creates are not the real inventory of the player but a sort of template?
Correct, they're not a real inventory of the player - more like a "backup" of the inventory that the player can swap back to later.
when trying to enable the inventions module, the server spams with an error and disconnects the server. The enchantment of Pocketed is to blame![image](https://github.com/IlMusu/IlMusuEnchantmentsMod/assets/90141892/b9fd71af-7b50-47c3-86fa-5adf6095fd73)