Valkyrien skies doesn't remove crashed/errored force inducers
blockninja124 opened this issue ยท 1 comments
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.