mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
This class exists
This commit is contained in:
parent
e03343b8ae
commit
db4d9132e5
1 changed files with 5 additions and 5 deletions
|
@ -18,7 +18,9 @@ import java.util.concurrent.CompletableFuture;
|
||||||
@Mixin(targets = "net.minecraft.client.network.NetworkPlayerInfo$1")
|
@Mixin(targets = "net.minecraft.client.network.NetworkPlayerInfo$1")
|
||||||
public abstract class MixinNetworkPlayerInfo$1 implements SkinManager.SkinAvailableCallback {
|
public abstract class MixinNetworkPlayerInfo$1 implements SkinManager.SkinAvailableCallback {
|
||||||
|
|
||||||
@Shadow(remap = false, aliases = {"this$0", "field_177224_a", "a"}) @Final private NetworkPlayerInfo player;
|
@Shadow(remap = false, aliases = {"this$0", "field_177224_a", "a"})
|
||||||
|
@Final
|
||||||
|
private NetworkPlayerInfo player;
|
||||||
|
|
||||||
@Inject(method = "skinAvailable("
|
@Inject(method = "skinAvailable("
|
||||||
+ "Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;"
|
+ "Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;"
|
||||||
|
@ -26,16 +28,14 @@ public abstract class MixinNetworkPlayerInfo$1 implements SkinManager.SkinAvaila
|
||||||
+ "Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;"
|
+ "Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;"
|
||||||
+ ")V",
|
+ ")V",
|
||||||
at = @At(value = "HEAD"))
|
at = @At(value = "HEAD"))
|
||||||
private void skinAvailable(MinecraftProfileTexture.Type typeIn, ResourceLocation location, MinecraftProfileTexture profileTexture,
|
private void skinAvailable(MinecraftProfileTexture.Type typeIn, ResourceLocation location, MinecraftProfileTexture profileTexture, CallbackInfo ci) {
|
||||||
CallbackInfo ci) {
|
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
// schedule parsing next tick, texture may not be uploaded at this point
|
// schedule parsing next tick, texture may not be uploaded at this point
|
||||||
HDSkinManager.INSTANCE.parseSkin(player.getGameProfile(), typeIn, location, profileTexture);
|
HDSkinManager.INSTANCE.parseSkin(player.getGameProfile(), typeIn, location, profileTexture);
|
||||||
|
|
||||||
// re-set the skin-type because vanilla has already set it
|
// reset the skin type because vanilla has already set it
|
||||||
String model = profileTexture.getMetadata("model");
|
String model = profileTexture.getMetadata("model");
|
||||||
((INetworkPlayerInfo) player).setSkinType(model != null ? model : "default");
|
((INetworkPlayerInfo) player).setSkinType(model != null ? model : "default");
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue