PieKing1215 / InvMove-Forge

Minecraft Forge mod that adds the ability to walk around while in inventories
GNU Lesser General Public License v3.0
2 stars 1 forks source link

[Crash] ClassCastException with invalid config values #2

Closed PieKing1215 closed 4 years ago

PieKing1215 commented 4 years ago

Brought to my attention by SuntannedDuck2 From: https://www.curseforge.com/minecraft/mc-mods/invmove?comment=8

Describe the bug If a boolean value in the config (eg. enableMod = true) is set to a non-boolean value (eg. enableMod = "true") while in-game, the game crashes.

To Reproduce Don't think you can reproduce with only InvMove, but a bug in the mod Commands4Configs lets this happen: Generate a new singleplayer world. Run "/config invmove CLIENT set General.enableMod true" Open inventory -> instant crash

Crash Log (Normally you would put the crash log here but it's different for different config values and I already know the problem)

Version and Mod List List the version of InvMove and the version of Forge the issue happens on: InvMove: 0.4.1 Forge: 31.2.31

List any other mods being used (other than Cloth Config): Commands4Configs - 1.0.0

PieKing1215 commented 4 years ago

While the root problem lies with the bug in Commands4Configs, I can fix it for my configs specifically by type-checking the config values.