diff --git a/gradle.properties b/gradle.properties index 604c1ce..2f45e4b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,15 +2,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.20.4 -yarn_mappings=1.20.4+build.3 -loader_version=0.15.3 +minecraft_version=1.20.1 +yarn_mappings=1.20.1+build.10 +loader_version=0.15.10 # Mod Properties mod_version=0.2 maven_group=com.campersamu archives_base_name=chatheads # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.91.3+1.20.4 -papi_version=2.3.0+1.20.3 -polymer_version=0.7.4+1.20.4 +fabric_version=0.92.1+1.20.1 +papi_version=2.1.3+1.20.1 +polymer_version=0.5.19+1.20.1 diff --git a/src/main/java/com/campersamu/chatheads/mixin/DownloadHeadOnJoin.java b/src/main/java/com/campersamu/chatheads/mixin/DownloadHeadOnJoin.java index e0ad1c6..04959a4 100644 --- a/src/main/java/com/campersamu/chatheads/mixin/DownloadHeadOnJoin.java +++ b/src/main/java/com/campersamu/chatheads/mixin/DownloadHeadOnJoin.java @@ -1,10 +1,10 @@ package com.campersamu.chatheads.mixin; import com.mojang.authlib.GameProfile; +import com.mojang.authlib.minecraft.MinecraftProfileTexture; import net.minecraft.network.ClientConnection; import net.minecraft.server.MinecraftServer; import net.minecraft.server.PlayerManager; -import net.minecraft.server.network.ConnectedClientData; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.TextColor; import org.slf4j.Logger; @@ -36,7 +36,7 @@ public abstract class DownloadHeadOnJoin { //Mixin into the player connect/join event and downlaod the skin for the player (needs a server restart to update) @Inject(method = "onPlayerConnect", at = @At("HEAD")) - private void chatheads$invokeDownloadOnJoin(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData, CallbackInfo ci) { + private void chatheads$invokeDownloadOnJoin(ClientConnection connection, ServerPlayerEntity player, CallbackInfo ci) { final var profile = player.getGameProfile(); //Use a new Thread since downloading a skin is slow and would slow down the player joining process new Thread(() -> { @@ -51,7 +51,7 @@ public abstract class DownloadHeadOnJoin { @Unique private TextColor[][] chatheads$getPlayerHead(final GameProfile profile, final ServerPlayerEntity player){ //get skin url - final String playerSkinUrl = server.getSessionService().getTextures(profile).skin().getUrl(); + final String playerSkinUrl = server.getSessionService().getTextures(profile, false).get(MinecraftProfileTexture.Type.SKIN).getUrl(); //return default head if null if (playerSkinUrl == null) return DEFAULT_HEAD_TEXTURE;