mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Backport 0.17.0 to 1.21
This commit is contained in:
1 parent
2d43b9d54c
commit
89201e682c
3 files changed
+6
-15
No files matched your search
@@ -47,7 +47,7 @@ public class FilePlayerSkin {
|
||||
NativeImage nativeImage = NativeImage.read(inputStream);
|
||||
|
||||
// We determine the type using the alpha of the pixel at 54, 20
|
||||
int argb = nativeImage.getPixel(54, 20);
|
||||
int argb = nativeImage.getPixelRGBA(54, 20);
|
||||
PlayerSkin.Model model = PlayerSkin.Model.WIDE;
|
||||
if (((argb >> 24) & 0xFF) < 20) {
|
||||
model = PlayerSkin.Model.SLIM;
|
||||
@@ -63,7 +63,7 @@ public class FilePlayerSkin {
|
||||
this.playerSkin = new PlayerSkin(resourceLocation, null, null, null, model, false);
|
||||
} catch (Exception e) {
|
||||
Flashback.LOGGER.error("Unable to load skin from file", e);
|
||||
this.playerSkin = DefaultPlayerSkin.getDefaultSkin();
|
||||
this.playerSkin = DefaultPlayerSkin.get(UUID.randomUUID());
|
||||
}
|
||||
|
||||
return this.playerSkin;
|
||||
|
||||
Reference in new issue
Block a user