mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Fixed legacy skin servers not running asynchronously
This commit is contained in:
parent
67e756f6dd
commit
6648655830
1 changed files with 12 additions and 12 deletions
|
@ -45,20 +45,20 @@ public class LegacySkinServer implements SkinServer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompletableFuture<MinecraftTexturesPayload> getPreviewTextures(GameProfile profile) {
|
public CompletableFuture<MinecraftTexturesPayload> getPreviewTextures(GameProfile profile) {
|
||||||
try {
|
return CallableFutures.asyncFailableFuture(() -> {
|
||||||
SkinServer.verifyServerConnection(Minecraft.getMinecraft().getSession(), SERVER_ID);
|
SkinServer.verifyServerConnection(Minecraft.getMinecraft().getSession(), SERVER_ID);
|
||||||
} catch (Exception e) {
|
|
||||||
return CallableFutures.failedFuture(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Strings.isNullOrEmpty(gateway)) {
|
if (Strings.isNullOrEmpty(gateway)) {
|
||||||
return CallableFutures.failedFuture(gatewayUnsupported());
|
throw gatewayUnsupported();
|
||||||
}
|
}
|
||||||
Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> map = new EnumMap<>(MinecraftProfileTexture.Type.class);
|
|
||||||
for (MinecraftProfileTexture.Type type : MinecraftProfileTexture.Type.values()) {
|
Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> map = new EnumMap<>(MinecraftProfileTexture.Type.class);
|
||||||
map.put(type, new MinecraftProfileTexture(getPath(gateway, type, profile), null));
|
for (MinecraftProfileTexture.Type type : MinecraftProfileTexture.Type.values()) {
|
||||||
}
|
map.put(type, new MinecraftProfileTexture(getPath(gateway, type, profile), null));
|
||||||
return CompletableFuture.completedFuture(TexturesPayloadBuilder.createTexturesPayload(profile, map));
|
}
|
||||||
|
|
||||||
|
return TexturesPayloadBuilder.createTexturesPayload(profile, map);
|
||||||
|
}, HDSkinManager.skinDownloadExecutor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue