WhoCraft / TardisRefined

A Minecraft mod for Forge and Fabric which brings the TARDIS from Doctor Who to Minecraft.
Other
57 stars 24 forks source link

Game Crashes from Using Sonic Glasses #346

Closed TeliKrystal closed 1 month ago

TeliKrystal commented 1 month ago

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

Jeryn99 commented 1 month ago

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

TeliKrystal commented 1 month ago

Thank you, I’m trying to remove it from my Inventory, however it doesn’t seem to be fixing it, if I’m even doing it right. I will also trying duping the mod profile and updating to the later version of TARDIS.

On Mon, 29 Jul 2024 at 16:48, Craig (Jeryn) @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/WhoCraft/TardisRefined/issues/346#issuecomment-2256286158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXIHUHJWYJ4CKGXYI5HQSLDZOZP6JAVCNFSM6AAAAABLURWXY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJWGI4DMMJVHA . You are receiving this because you authored the thread.Message ID: @.***>

Jeryn99 commented 1 month ago

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

TeliKrystal commented 1 month ago

It’s SinglePlayer, I have managed to remove it, and am in the game, however I believe it’s still an Issue. How do I archive this problem or something so that I can keep it as a known issue somewhere?

On Mon, 29 Jul 2024 at 17:01, Craig (Jeryn) @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/WhoCraft/TardisRefined/issues/346#issuecomment-2256311966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXIHUHL7O7IY2G45G7M6HXLZOZRNHAVCNFSM6AAAAABLURWXY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJWGMYTCOJWGY . You are receiving this because you authored the thread.Message ID: @.***>

Jeryn99 commented 1 month ago

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