mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-19 00:36:10 -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 ====
|
// ==== Skins ====
|
||||||
private final static Map<TextureModel, LoadedTexture> DEFAULT_SKINS = new EnumMap<>(TextureModel.class);
|
private final static Map<TextureModel, LoadedTexture> DEFAULT_SKINS = new EnumMap<>(TextureModel.class);
|
||||||
static {
|
static {
|
||||||
loadDefaultSkin("/assets/img/steve.png", TextureModel.STEVE);
|
try {
|
||||||
loadDefaultSkin("/assets/img/alex.png", TextureModel.ALEX);
|
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) {
|
private static void loadDefaultSkin(String path, TextureModel model) {
|
||||||
try (InputStream in = TexturesLoader.class.getResourceAsStream(path)) {
|
try (InputStream in = TexturesLoader.class.getResourceAsStream(path)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user