Electroblob's Wizardry

Electroblob's Wizardry

18M Downloads

Crash when opening spell HUD skin selection menu

Electroblob77 opened this issue ยท 1 comments

commented

Please read the guide for contributing before posting.

Minecraft version: 1.12.2
Wizardry version: 4.3.1
Environment: Singleplayer

Issue details: Well this is embarrassing... :/

Other mods involved: Nah just me being stupid

Link to crash report (if applicable): https://gist.github.com/Electroblob77/585d32a764f48c3f3585f55a4d88cdeb

commented

Offending lines:

Skin skin = GuiSpellDisplay.getSkin((String)this.currentValue);
float scale = Math.min((previewRight - previewLeft - 2*previewBorder)/(float)skin.getWidth(),
(previewBottom - previewTop - 2*previewBorder)/(float)skin.getHeight());
float x = (previewLeft + previewRight)/2f - (skin.getWidth()*scale)/2;
float y = (previewBottom + previewTop)/2f + (skin.getHeight()*scale)/2;

Need to guard against skin being null here, in case someone entered something wrong in the config file (in my case, because I uninstalled TF spell pack).