mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-18 08:16:58 -04:00
Suppress UncheckedIOException thrown by loading alex and steve skin image.
This commit is contained in:
parent
20c612c660
commit
6ac32a40c7
@ -137,8 +137,12 @@ public final class TexturesLoader {
|
||||
// ==== Skins ====
|
||||
private final static Map<TextureModel, LoadedTexture> DEFAULT_SKINS = new EnumMap<>(TextureModel.class);
|
||||
static {
|
||||
loadDefaultSkin("/assets/img/steve.png", TextureModel.STEVE);
|
||||
loadDefaultSkin("/assets/img/alex.png", TextureModel.ALEX);
|
||||
try {
|
||||
loadDefaultSkin("/assets/img/steve.png", TextureModel.STEVE);
|
||||
loadDefaultSkin("/assets/img/alex.png", TextureModel.ALEX);
|
||||
} catch (UncheckedIOException e) {
|
||||
throw new NoClassDefFoundError("Steve and alex default skin image is not found");
|
||||
}
|
||||
}
|
||||
private static void loadDefaultSkin(String path, TextureModel model) {
|
||||
try (InputStream in = TexturesLoader.class.getResourceAsStream(path)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user