TimVincii / Terrastorage

Brings Terraria's amazing storage features to Minecraft!
MIT License
1 stars 0 forks source link

[Bug] Crash on launch if client config is changed from default #2

Closed BlindTwig closed 1 month ago

BlindTwig commented 1 month ago

What happened?

As the title states, the mod will crash if the client config is changed from the default state. I only changed the button location from Right to Left, and upon restarting my game, it would crash before opening the window, with a Could not execute entrypoint stage 'main' due to errors, provided by 'terrastorage' at 'me.timvinci.Terrastorage'! crash log, which is attached in full below. crash-2024-09-22_18.31.02-client.txt

Terrastorage Version

1.0.1

Fabric API Version

0.102.0

Minecraft Version

1.21

Relevant Log Output

No response

Other Mods

No response

TimVincii commented 1 month ago

Hi, thanks for the bug report, I tried replicating the error myself but couldn't, chances are that it has to do with the other mods you're running. I took a good look at the crash report and the cause seems to be quite the unique thing, it seems like there is a conflict between different versions of the Apache Commons Lang library.

Seems like Terrastorage uses a certain version of the library, while another mod uses an older version, and they're conflicting with one another.

Terrastorage actually uses that library for its IntegerRange class, but only one time, so a super easy fix would be to just use an integer min and an integer max instead of the IntegerRange class, and that's what I did, I've attached a link to the modified version here. Could you give it a test and let me know if it fixes the crash? Thanks. https://drive.google.com/file/d/1Bhg2YKCet7F0Sr1WMiMq5hKfpdnzEaUl/view?usp=sharing

BlindTwig commented 1 month ago

That actually did fix it! Launches without any issue now, and the config is working as it should. Apologies for not testing with just this mod and dependencies, when I ran into the bug I was in a rush with other things and figured I'd just submit the crash log in the hope that it was something simple, glad that it ended up being so.

TimVincii commented 1 month ago

No worries at all, I’m glad everything works now! Thanks for testing the updated version and confirming that it’s functioning as expected. If you encounter any more problems or have suggestions in the future, feel free to reach out. Have a great day!