Skip to content

Commit

Permalink
build: add support for Minecraft 1.20.3+ (#107)
Browse files Browse the repository at this point in the history
Release-As: 8.0.0+1.20.4
  • Loading branch information
axieum committed Dec 10, 2023
1 parent 8bf419d commit 11a6d70
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 22 deletions.
22 changes: 11 additions & 11 deletions gradle.properties
Expand Up @@ -7,22 +7,22 @@ mod_version = 8.0.0+1.20.2
## {x-release-please-end}

# Fabric
minecraft_version = 1.20.2
loader_version = 0.14.23
yarn_mappings = 1.20.2+build.4
fabric_version = 0.90.0+1.20.2
minecraft_version = 1.20.4
loader_version = 0.15.1
yarn_mappings = 1.20.4+build.1
fabric_version = 0.91.2+1.20.4

# Dependencies
cloth_config_version = 12.0.109
mod_menu_version = 8.0.0
cloth_config_version = 13.0.114
mod_menu_version = 9.0.0-pre.1

checkstyle_version = 10.12.4
jetbrains_annotations_version = 24.0.1
junit_jupiter_version = 5.10.0
checkstyle_version = 10.12.5
jetbrains_annotations_version = 24.1.0
junit_jupiter_version = 5.10.1

# CurseForge
cf_project_id = 356643
cf_game_versions = Fabric, Java 17, 1.20.2
cf_game_versions = Fabric, Java 17, 1.20.3, 1.20.4
cf_relations_required = fabric-api
cf_relations_optional = modmenu
cf_relations_embedded = cloth-config
Expand All @@ -31,7 +31,7 @@ cf_relations_incompatible =

# Modrinth
mr_project_id = yjgIrBjZ
mr_game_versions = 1.20.2
mr_game_versions = 1.20.3, 1.20.4
mr_relations_required = P7dR8mSH
mr_relations_optional = mOgUt4GM
mr_relations_incompatible =
Expand Down
Expand Up @@ -241,10 +241,10 @@ protected void onDrag(double mouseX, double mouseY, double deltaX, double deltaY
}

@Override
public void renderButton(DrawContext context, int mouseX, int mouseY, float delta)
public void renderWidget(DrawContext context, int mouseX, int mouseY, float delta)
{
// Cascade the rendering
super.renderButton(context, mouseX, mouseY, delta);
super.renderWidget(context, mouseX, mouseY, delta);

// Render the current session status
final int u;
Expand Down
Expand Up @@ -65,11 +65,7 @@ public static void setSession(Session session)
// Re-create the user API service (ignore offline session)
UserApiService userApiService = UserApiService.OFFLINE;
if (!OFFLINE_TOKEN.equals(session.getAccessToken())) {
try {
userApiService = getAuthService().createUserApiService(session.getAccessToken());
} catch (AuthenticationException e) {
LOGGER.error("Failed to verify authentication for new user API service!", e);
}
userApiService = getAuthService().createUserApiService(session.getAccessToken());
}
((MinecraftClientAccessor) client).setUserApiService(userApiService);

Expand Down
Expand Up @@ -108,7 +108,7 @@ protected void init()
TexturedButtonWidget mojangButton = new TexturedButtonWidget(
width / 2 - 10, height / 2 - 5, 20, 20,
MOJANG_BUTTON_TEXTURES,
button -> ConfirmLinkScreen.open(AuthMe.MOJANG_ACCOUNT_MIGRATION_FAQ_URL, this, true),
ConfirmLinkScreen.opening(this, AuthMe.MOJANG_ACCOUNT_MIGRATION_FAQ_URL),
Text.translatable("gui.authme.method.button.mojang")
);
mojangButton.setTooltip(Tooltip.of(
Expand Down
Expand Up @@ -119,7 +119,7 @@ protected void init()
SessionUtils.setSession(session);
// Add a toast that greets the player
SystemToast.add(
client.getToastManager(), SystemToast.Type.TUTORIAL_HINT,
client.getToastManager(), SystemToast.Type.PERIODIC_NOTIFICATION,
Text.translatable("gui.authme.toast.greeting", Text.literal(session.getUsername())), null
);
// Mark the task as successful, in turn closing the screen
Expand Down
Expand Up @@ -100,7 +100,7 @@ public void login()

// Add a toast that greets the player
SystemToast.add(
client.getToastManager(), SystemToast.Type.TUTORIAL_HINT,
client.getToastManager(), SystemToast.Type.PERIODIC_NOTIFICATION,
Text.translatable("gui.authme.toast.greeting", Text.literal(usernameField.getText())), null
);

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Expand Up @@ -35,7 +35,7 @@
],
"depends": {
"java": ">=17",
"minecraft": "~1.20.2",
"minecraft": "~1.20.3",
"fabricloader": ">=0.14.18",
"fabric-lifecycle-events-v1": "*",
"fabric-resource-loader-v0": "*",
Expand Down

0 comments on commit 11a6d70

Please sign in to comment.