From 1b4bc67b190327af1b1ca2860975d68ec805c0a2 Mon Sep 17 00:00:00 2001 From: Wesley1808 <74668381+Wesley1808@users.noreply.github.com> Date: Tue, 10 Oct 2023 01:11:01 +0200 Subject: [PATCH] Update to 1.20.2 (#11) Co-authored-by: Potatoboy9999 <51728317+PotatoPresident@users.noreply.github.com> --- build.gradle | 6 +++--- gradle.properties | 10 +++++----- src/main/java/us/potatoboy/headindex/gui/HeadGui.java | 9 ++++++++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 0256a0d..f660a6b 100644 --- a/build.gradle +++ b/build.gradle @@ -25,9 +25,9 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modImplementation include("me.lucko:fabric-permissions-api:0.1-SNAPSHOT") - modImplementation include("eu.pb4:sgui:1.2.2+1.20") - modImplementation include("xyz.nucleoid:server-translations-api:2.0.0-beta.2+1.19.4-pre2") + modImplementation include("me.lucko:fabric-permissions-api:0.2-SNAPSHOT") + modImplementation include("eu.pb4:sgui:1.3.0+1.20.2") + modImplementation include("xyz.nucleoid:server-translations-api:2.1.0+1.20.2-rc2") modImplementation include("eu.pb4:common-economy-api:1.1.1") } diff --git a/gradle.properties b/gradle.properties index 11ff5a0..7e5417d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop/ -minecraft_version=1.20 -yarn_mappings=1.20+build.1 -loader_version=0.14.21 +minecraft_version=1.20.2 +yarn_mappings=1.20.2+build.1 +loader_version=0.14.22 # Mod Properties -mod_version=1.1.3 +mod_version=1.1.4 maven_group=us.potatoboy archives_base_name=headindex # Dependencies # check this on https://fabricmc.net/develop/ -fabric_version=0.83.0+1.20 \ No newline at end of file +fabric_version=0.89.1+1.20.2 diff --git a/src/main/java/us/potatoboy/headindex/gui/HeadGui.java b/src/main/java/us/potatoboy/headindex/gui/HeadGui.java index 23c0cdc..7ae23fe 100644 --- a/src/main/java/us/potatoboy/headindex/gui/HeadGui.java +++ b/src/main/java/us/potatoboy/headindex/gui/HeadGui.java @@ -3,6 +3,7 @@ import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.mojang.authlib.minecraft.MinecraftSessionService; +import com.mojang.authlib.yggdrasil.ProfileResult; import eu.pb4.sgui.api.elements.GuiElementBuilder; import eu.pb4.sgui.api.gui.AnvilInputGui; import eu.pb4.sgui.api.gui.SimpleGui; @@ -153,7 +154,13 @@ public void onTick() { return; } - GameProfile profile = sessionService.fillProfileProperties(possibleProfile.get(), false); + ProfileResult profileResult = sessionService.fetchProfile(possibleProfile.get().getId(), false); + if (profileResult == null) { + outputStack.removeSubNbt("SkullOwner"); + return; + } + + GameProfile profile = profileResult.profile(); Map textures = sessionService.getTextures(profile, false); if (textures.isEmpty()) {