Skip to content

Commit

Permalink
add error message for nonsquare mod icons (#638)
Browse files Browse the repository at this point in the history
Co-authored-by: OverlordsIII <OverlordsIII@users.noreply.github.com>
OverlordsIII and OverlordsIII authored Sep 8, 2023
1 parent 5d53b3d commit 219e758
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -39,6 +39,12 @@ public NativeImageBackedTexture createIcon(ModContainer iconSource, String iconP
return tex;
}

} catch (IllegalStateException e) {
if (e.getMessage().equals("Must be square icon")) {
LOGGER.error("Mod icon must be a square for icon source {}: {}", iconSource.getMetadata().getId(), iconPath, e);
}

return null;
} catch (Throwable t) {
if (!iconPath.equals("assets/" + iconSource.getMetadata().getId() + "/icon.png")) {
LOGGER.error("Invalid mod icon for icon source {}: {}", iconSource.getMetadata().getId(), iconPath, t);

0 comments on commit 219e758

Please sign in to comment.