From c9d2db467f5a371b0227f29d88e72d4370305e7c Mon Sep 17 00:00:00 2001 From: Joshua Portero <77929472+joshuaportero@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:40:17 -0400 Subject: [PATCH 1/4] build: add support for Minecraft 1.21.3 - Updated `fabric-loom` to version 1.8-SNAPSHOT in `build.gradle` - Bumped mod version to 8.0.1 and updated Minecraft, loader, yarn mappings, and dependency versions in `gradle.properties` - Upgraded Gradle wrapper to 8.10 in `gradle-wrapper.properties` - Enhanced `AuthButtonWidget` by adding `RenderLayer.getGuiTexturedOverlay` for improved rendering --- build.gradle | 2 +- gradle.properties | 18 +++++++++--------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../api/gui/widget/AuthButtonWidget.java | 4 +++- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 5f688bb..a9aa670 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'maven-publish' id 'com.modrinth.minotaur' version '2.8.7' id 'com.matthewprenger.cursegradle' version '1.4.0' - id 'fabric-loom' version '1.6-SNAPSHOT' + id 'fabric-loom' version '1.8-SNAPSHOT' } allprojects { diff --git a/gradle.properties b/gradle.properties index d9c7899..8dac1e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,18 +3,18 @@ mod_id = authme mod_name = Auth Me mod_description = Authenticate yourself in Minecraft and re-validate your session ## {x-release-please-start-version} -mod_version = 8.0.0+1.21 +mod_version = 8.0.1+1.21.3 ## {x-release-please-end} # Fabric -minecraft_version = 1.21 -loader_version = 0.15.11 -yarn_mappings = 1.21+build.1 -fabric_version = 0.100.1+1.21 +minecraft_version=1.21.3 +loader_version=0.16.7 +yarn_mappings=1.21.3+build.2 +fabric_version=0.107.0+1.21.3 # Dependencies -cloth_config_version = 15.0.127 -mod_menu_version = 11.0.0-beta.1 +cloth_config_version = 16.0.141 +mod_menu_version = 12.0.0-beta.1 checkstyle_version = 10.15.0 jetbrains_annotations_version = 24.1.0 @@ -22,7 +22,7 @@ junit_jupiter_version = 5.10.2 # CurseForge cf_project_id = 356643 -cf_game_versions = Fabric, Java 21, 1.21 +cf_game_versions = Fabric, Java 21, 1.21.3 cf_relations_required = fabric-api cf_relations_optional = modmenu cf_relations_embedded = cloth-config @@ -31,7 +31,7 @@ cf_relations_incompatible = # Modrinth mr_project_id = yjgIrBjZ -mr_game_versions = 1.21 +mr_game_versions = 1.21.3 mr_relations_required = P7dR8mSH mr_relations_optional = mOgUt4GM mr_relations_incompatible = diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b82aa23..9355b41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java b/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java index 7719b08..7d2975a 100644 --- a/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java +++ b/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java @@ -1,5 +1,6 @@ package me.axieum.mcmod.authme.api.gui.widget; +import net.minecraft.client.render.RenderLayer; import org.jetbrains.annotations.Nullable; import net.minecraft.client.gui.DrawContext; @@ -253,7 +254,8 @@ public void renderWidget(DrawContext context, int mouseX, int mouseY, float delt case OFFLINE -> u = 8; default -> u = 16; } - context.drawTexture(SESSION_STATUS_TEXTURE, getX() + width - 6, getY() - 1, u, 0, 8, 8, 24, 8); + + context.drawTexture(gui -> RenderLayer.getGuiTexturedOverlay(SESSION_STATUS_TEXTURE), SESSION_STATUS_TEXTURE, getX() + width - 6, getY() - 1, u, 0, 8, 8, 24, 8); } /** From d2b91610bf25ad46db118ec72af5dfb8d9ca774f Mon Sep 17 00:00:00 2001 From: Joshua Portero <77929472+joshuaportero@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:01:50 -0400 Subject: [PATCH 2/4] fix: resolve Checkstyle violations in AuthButtonWidget --- .../authme/api/gui/widget/AuthButtonWidget.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java b/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java index 7d2975a..d25e33e 100644 --- a/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java +++ b/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java @@ -255,7 +255,18 @@ public void renderWidget(DrawContext context, int mouseX, int mouseY, float delt default -> u = 16; } - context.drawTexture(gui -> RenderLayer.getGuiTexturedOverlay(SESSION_STATUS_TEXTURE), SESSION_STATUS_TEXTURE, getX() + width - 6, getY() - 1, u, 0, 8, 8, 24, 8); + context.drawTexture( + gui -> RenderLayer.getGuiTexturedOverlay(SESSION_STATUS_TEXTURE), + SESSION_STATUS_TEXTURE, + getX() + width - 6, + getY() - 1, + u, + 0, + 8, + 8, + 24, + 8 + ); } /** From 1561776519666a1aef1bedde6d9379c84ce87706 Mon Sep 17 00:00:00 2001 From: Joshua Portero <77929472+joshuaportero@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:07:22 -0400 Subject: [PATCH 3/4] fix: resolve Checkstyle violations in AuthButtonWidget 2/2 --- .../me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java b/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java index d25e33e..6dbd5d1 100644 --- a/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java +++ b/src/main/java/me/axieum/mcmod/authme/api/gui/widget/AuthButtonWidget.java @@ -1,6 +1,5 @@ package me.axieum.mcmod.authme.api.gui.widget; -import net.minecraft.client.render.RenderLayer; import org.jetbrains.annotations.Nullable; import net.minecraft.client.gui.DrawContext; @@ -9,6 +8,7 @@ import net.minecraft.client.gui.tooltip.Tooltip; import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.gui.widget.TexturedButtonWidget; +import net.minecraft.client.render.RenderLayer; import net.minecraft.text.Text; import net.minecraft.util.Identifier; From ff548e49648dbff51a7ba86ebd9d4f369002dcde Mon Sep 17 00:00:00 2001 From: Jonathan Hiles Date: Fri, 8 Nov 2024 00:04:58 +1000 Subject: [PATCH 4/4] chore(deps): update checkstyle, jetbrains annotations, and junit --- gradle.properties | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8dac1e1..3a77d93 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,22 +3,22 @@ mod_id = authme mod_name = Auth Me mod_description = Authenticate yourself in Minecraft and re-validate your session ## {x-release-please-start-version} -mod_version = 8.0.1+1.21.3 +mod_version = 8.0.0+1.21 ## {x-release-please-end} # Fabric -minecraft_version=1.21.3 -loader_version=0.16.7 -yarn_mappings=1.21.3+build.2 -fabric_version=0.107.0+1.21.3 +minecraft_version = 1.21.3 +loader_version = 0.16.7 +yarn_mappings = 1.21.3+build.2 +fabric_version = 0.107.0+1.21.3 # Dependencies cloth_config_version = 16.0.141 mod_menu_version = 12.0.0-beta.1 -checkstyle_version = 10.15.0 -jetbrains_annotations_version = 24.1.0 -junit_jupiter_version = 5.10.2 +checkstyle_version = 10.20.0 +jetbrains_annotations_version = 26.0.1 +junit_jupiter_version = 5.11.3 # CurseForge cf_project_id = 356643