Valkyrien Skies (Forge/Fabric)

Valkyrien Skies (Forge/Fabric)

5M Downloads

Valkyrien skies doesn't remove crashed/errored force inducers

blockninja124 opened this issue ยท 1 comments

commented

This issue occurs when only Valkyrien Skies and addons are installed and no other mods

  • I have tested this issue and it occurs when no other mods are installed

Minecraft Version

1.20.x

Mod Loader

Forge

Issue description

If a ship has a force inducer that crashes, VS will crash (to desktop) instead of removing the force inducer. This is most common when removing a mod that adds a force inducer to all/a bunch of ships. Once the mod is removed, the force inducers 'apply forces' function no longer exists, so VS crashes.

This is stupid. There isn't really a way for an addon to code itself so that it can "detect" when it doesn't exist and remove its force inducers. The only decent solution to this is for VS to put a try {} catch {} around calling a force inducer, and if it fails simply log the error once and remove the inducer from the ship.

Issue reproduction

(Probably do-able with all/most VS addons, but I did it with starlance)
Make a world with starlance, VS and all their dependencies.
Make a new ship, and put a starlance thruster on it (to attach the force inducer)
Leave the world, remove starlance, and rejoin.
On loading the world it will crash with an error about the force inducer not existing.

Logs

crash-2024-12-11_18.50.34-server.txt

commented

It will be fixed in the new api