TARDIS Refined

TARDIS Refined

89.6k Downloads

Game Crashes from Using Sonic Glasses

Closed this issue · 5 comments

commented

Issue description

I have a few mods installed and am Using Fabric. I was flying the TARDIS however the Tardis wasn't moving, so I read that I can use the Glasses to see what was actually wrong (this is my first time using the mod, and I'm in Creative), and as soon as I put them on my game crashes, "The game crashed whilst ticking player
Error: java.lang.ClassCastException: class whocraft.tardis_refined.common.items.GlassesItem cannot be cast to class net.minecraft.class_1738 (whocraft.tardis_refined.common.items.GlassesItem and net.minecraft.class_1738 are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @57d5872c)", which happens everytime I open the world.

I would like this fixed soon, since I've put a lot of hours into this world, and I've already struggled just reading hot to work this mod, and don't want to lose my world from a pair of glasses. I'm trying to use NBTExplorer to remove the glasses from my Inventory, I just need to learn how to use it as I've not had an issue like this before.

My world has been a Hyperfocus of mine with heavy storyline to it, and I'm not sure when the last backup of it was, so I don't want to reload it if I can avoid it.

Steps to reproduce

No response

Minecraft version

1.20.1

Mod Loader Platform type

Fabric

Mod Loader version

Fabric Loader Version- 0.15.11

Tardis Refined version

v2.0.4

Other relevant versions

BCLib, BetterEnd, BetterNether, ClothConfigAPI, Fabric API, Immersive Portals, JourneyMap, Liroth: Revamped (Fabric), MiniScaled, Patchouli (Fabric/Quilt), Pehkui. Forge says all of these are up to date, for the Version of Minecrafte, except TARDIS, which is v2.0.4.

Attach the relevant crash report file or log file: (Don't know how to find a crash report file? See the Minecraft Wiki Tutorial

https://gist.github.com/TeliKrystal/b4bb11a2b4d091a9b92f20de9c905121

commented

This seems to be a issue with liroth at a glance, they're expecting our item to be something it isn't

I can look into this and see if we can do anything about it

commented
commented

If you leave your playerdata file, I can edit it for you if you don't manage

commented
commented

Hello @TeliKrystal

I have investigated the issue! And it is not a problem with our mod and instead is a issue with Liroth

Seen in the code snippet before, you can see that they assume that any item in the equipment slots, is a instance of ArmorItem when our item is a Item - if I had to guess, you would also crash if you were to put on a Elytra

   private boolean hasCorrectArmorOn(ArmorMaterial material, Player player) {
        ArmorItem boots = ((ArmorItem)player.getInventory().getArmor(0).getItem());
        ArmorItem leggings = ((ArmorItem)player.getInventory().getArmor(1).getItem());
        ArmorItem breastplate = ((ArmorItem)player.getInventory().getArmor(2).getItem());
        ArmorItem helmet = ((ArmorItem)player.getInventory().getArmor(3).getItem());

        return helmet.getMaterial() == material && breastplate.getMaterial() == material &&
                leggings.getMaterial() == material && boots.getMaterial() == material;
    }

Source: https://github.com/decodinatorX/Liroth-Revamped-Fabric/blob/d58ba0e55910a278641e6e914169390ea9cb5d8f/src/main/java/com/decodinator/liroth/core/items/QuantumArmorItem.java#L93-L100

You may want to file a issue on their GitHub here: https://github.com/decodinatorX/Liroth-Revamped-Fabric/issues