mirror of https://github.com/GeyserMC/Geyser.git
Add failed back to skin
This commit is contained in:
parent
f490d84958
commit
eade61c428
|
@ -26,4 +26,7 @@
|
|||
package org.geysermc.geyser.api.skin;
|
||||
|
||||
public record Cape(String textureUrl, String capeId, byte[] capeData, boolean failed) {
|
||||
public Cape(String textureUrl, String capeId, byte[] capeData) {
|
||||
this(textureUrl, capeId, capeData, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,5 +25,8 @@
|
|||
|
||||
package org.geysermc.geyser.api.skin;
|
||||
|
||||
public record Skin(String textureUrl, byte[] skinData) {
|
||||
public record Skin(String textureUrl, byte[] skinData, boolean failed) {
|
||||
public Skin(String textureUrl, byte[] skinData) {
|
||||
this(textureUrl, skinData, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ public final class ProvidedSkins {
|
|||
image.flush();
|
||||
|
||||
String identifier = "geysermc:" + assetName + "_" + (slim ? "slim" : "wide");
|
||||
this.data = new Skin(identifier, byteData);
|
||||
this.data = new Skin(identifier, byteData, true);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public class SkinProvider {
|
|||
outputStream.write((rgba >> 24) & 0xFF); // Alpha
|
||||
}
|
||||
}
|
||||
EMPTY_SKIN = new Skin("geysermc:empty", outputStream.toByteArray());
|
||||
EMPTY_SKIN = new Skin("geysermc:empty", outputStream.toByteArray(), true);
|
||||
|
||||
/* Load in the custom skull geometry */
|
||||
String skullData = new String(FileUtils.readAllBytes("bedrock/skin/geometry.humanoid.customskull.json"), StandardCharsets.UTF_8);
|
||||
|
@ -366,7 +366,7 @@ public class SkinProvider {
|
|||
}
|
||||
|
||||
static void storeBedrockCape(String capeId, byte[] capeData) {
|
||||
Cape cape = new Cape(capeId, capeId, capeData, false);
|
||||
Cape cape = new Cape(capeId, capeId, capeData);
|
||||
CACHED_BEDROCK_CAPES.put(capeId, cape);
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ public class SkinProvider {
|
|||
return new Skin(textureUrl, skin);
|
||||
} catch (Exception ignored) {} // just ignore I guess
|
||||
|
||||
return new Skin("empty", EMPTY_SKIN.skinData());
|
||||
return new Skin("empty", EMPTY_SKIN.skinData(), true);
|
||||
}
|
||||
|
||||
private static Cape supplyCape(String capeUrl, CapeProvider provider) {
|
||||
|
|
Loading…
Reference in New Issue