From e504f6759481f5f737fe8693ce4db71265ec41fb Mon Sep 17 00:00:00 2001 From: Tunfisch96 <65600302+Tunfisch96@users.noreply.github.com> Date: Thu, 9 Jul 2026 08:37:13 +0200 Subject: [PATCH] bump to minecraft 26.2 --- .../fastback/common/mixins/GuiAccessors.java | 33 +++++++++++++++++++ .../fastback/common/mod/ClientHelper.java | 5 ++- .../src/main/resources/fastback.mixins.json | 3 +- fabric/src/main/resources/fabric.mod.json | 2 +- gradle.properties | 16 ++++----- 5 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 common/src/main/java/net/pcal/fastback/common/mixins/GuiAccessors.java diff --git a/common/src/main/java/net/pcal/fastback/common/mixins/GuiAccessors.java b/common/src/main/java/net/pcal/fastback/common/mixins/GuiAccessors.java new file mode 100644 index 00000000..2169e765 --- /dev/null +++ b/common/src/main/java/net/pcal/fastback/common/mixins/GuiAccessors.java @@ -0,0 +1,33 @@ +/* + * FastBack - Fast, incremental Minecraft backups powered by Git. + * Copyright (C) 2022 pcal.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; If not, see . + */ + +package net.pcal.fastback.common.mixins; + +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.screens.Screen; +import org.jspecify.annotations.Nullable; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(Gui.class) +public interface GuiAccessors { + @Accessor("screen") + @Nullable Screen getScreen(); + +} diff --git a/common/src/main/java/net/pcal/fastback/common/mod/ClientHelper.java b/common/src/main/java/net/pcal/fastback/common/mod/ClientHelper.java index 3780a355..e1e879ce 100644 --- a/common/src/main/java/net/pcal/fastback/common/mod/ClientHelper.java +++ b/common/src/main/java/net/pcal/fastback/common/mod/ClientHelper.java @@ -19,12 +19,14 @@ package net.pcal.fastback.common.mod; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiGraphicsExtractor; import net.minecraft.client.gui.screens.GenericMessageScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; import net.pcal.fastback.common.logging.UserMessage; import net.pcal.fastback.common.mixins.ScreenAccessors; +import net.pcal.fastback.common.mixins.GuiAccessors; import static net.pcal.fastback.common.logging.SystemLogger.syslog; import static net.pcal.fastback.common.mod.UserMessageUtil.messageToText; @@ -75,7 +77,8 @@ public void clearHudText() { public void setMessageScreenText(UserMessage userMessage) { if (this.client == null) return; - final Screen screen = client.screen; + final Gui gui = client.gui; + final Screen screen = ((GuiAccessors) gui).getScreen(); if (screen instanceof GenericMessageScreen) { ((ScreenAccessors) screen).setTitle(messageToText(userMessage)); ((ScreenAccessors) screen).invokeRebuildWidgets(); // force it to rebuild the message component with the new title diff --git a/common/src/main/resources/fastback.mixins.json b/common/src/main/resources/fastback.mixins.json index 4df19db4..bdb8276f 100644 --- a/common/src/main/resources/fastback.mixins.json +++ b/common/src/main/resources/fastback.mixins.json @@ -11,7 +11,8 @@ ], "client": [ "MessageScreenMixin", - "ScreenAccessors" + "ScreenAccessors", + "GuiAccessors" ], "injectors": { "defaultRequire": 1 diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 366d41b9..3689e0b2 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -28,7 +28,7 @@ "fabricloader": ">=${fabric_loader_version}", "fabric-api": "*", "fabric-permissions-api-v0": "*", - "minecraft": "26.1.x", + "minecraft": "26.2.x", "java": ">=25" }, "conflicts": {} diff --git a/gradle.properties b/gradle.properties index fb5a4885..1e5df199 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # # Mod # -mod_version = 0.33.1+26.1.2-prerelease +mod_version = 0.34.0+26.2.0-prerelease archives_base_name = fastback github_projectUrl = https://github.com/pcal43/fastback modrinth_projectId = ZHKrK8Rp @@ -10,21 +10,21 @@ curseforge_projectId = 667417 # # Minecraft # -minecraft_version=26.1.2 +minecraft_version=26.2 java_version = 25 # # Fabric - https://fabricmc.net/develop # -fabric_loader_version=0.19.1 -fabric_loom_version=1.16-SNAPSHOT -fabric_api_version=0.145.4+26.1.2 +fabric_loader_version=0.19.3 +fabric_loom_version=1.17-SNAPSHOT +fabric_api_version=0.154.2+26.2 # # NeoForge - https://neoforged.net/ # -neoforge_version = 26.1.2.8-beta -neoforge_moddev_version = 2.0.140 +neoforge_version = 26.2.0.8-beta +neoforge_moddev_version = 2.0.141 # # Dependencies @@ -60,7 +60,7 @@ fabric_permissions_version = 0.7.0 # https://github.com/NucleoidMC/Server-Translations/releases # https://maven.nucleoid.xyz/xyz/nucleoid/server-translations-api/ -server_translations_version = 3.0.3+26.1 +server_translations_version = 3.1.0+26.2 # # Build settings