From e00b94a1d1257e3e6079ed2f2873e90a66ca27b0 Mon Sep 17 00:00:00 2001 From: jackassmc <84429870+jackassmc@users.noreply.github.com> Date: Tue, 7 Jun 2022 18:01:24 +0200 Subject: [PATCH] Update to 1.19 --- build.gradle | 2 +- gradle.properties | 14 +++++++------- .../java/com/terraformersmc/modmenu/ModMenu.java | 2 -- .../modmenu/config/option/BooleanConfigOption.java | 3 +-- .../modmenu/config/option/EnumConfigOption.java | 3 +-- .../config/option/StringSetConfigOption.java | 1 - .../modmenu/event/ModMenuEventHandler.java | 8 ++++---- .../modmenu/gui/ModMenuOptionsScreen.java | 2 +- .../com/terraformersmc/modmenu/gui/ModsScreen.java | 2 +- .../modmenu/gui/widget/DescriptionListWidget.java | 2 -- .../modmenu/gui/widget/entries/ModListEntry.java | 1 - .../modmenu/gui/widget/entries/ParentEntry.java | 1 - .../modmenu/util/TranslationUtil.java | 1 - .../com/terraformersmc/modmenu/util/mod/Mod.java | 1 - 14 files changed, 16 insertions(+), 27 deletions(-) diff --git a/build.gradle b/build.gradle index 9ec563a59..7c43309c9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.11-SNAPSHOT' + id 'fabric-loom' version '0.12-SNAPSHOT' } apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.3+nogithub/ferry.gradle' diff --git a/gradle.properties b/gradle.properties index f0648ae4d..aa36aead3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,10 @@ org.gradle.jvmargs=-Xmx1G maven_group=com.terraformersmc archive_name=modmenu -minecraft_version=22w16b -yarn_mappings=22w16b+build.3 -loader_version=0.13.3 -fabric_version=0.51.2+1.19 +minecraft_version=1.19 +yarn_mappings=1.19+build.1 +loader_version=0.14.6 +fabric_version=0.55.1+1.19 # Project Metadata project_name=Mod Menu @@ -14,19 +14,19 @@ project_url=https://modrinth.com/mod/modmenu project_logo=https://raw.githubusercontent.com/Prospector/images/master/modmenu-logo.png project_color=0x134bff # default_release_type can be stable, beta, or alpha -default_release_type=beta +default_release_type=stable # CurseForge Metadata curseforge_slug=modmenu curseforge_id=308702 -curseforge_game_versions=1.19-Snapshot, Fabric +curseforge_game_versions=1.19, Fabric curseforge_required_dependencies= curseforge_optional_dependencies= # Modrinth Metadata modrinth_slug=modmenu modrinth_id=mOgUt4GM -modrinth_game_versions=22w16b +modrinth_game_versions=1.19 modrinth_mod_loaders=fabric # Mod Loader Metadata diff --git a/src/main/java/com/terraformersmc/modmenu/ModMenu.java b/src/main/java/com/terraformersmc/modmenu/ModMenu.java index e2d074acd..611aa622f 100644 --- a/src/main/java/com/terraformersmc/modmenu/ModMenu.java +++ b/src/main/java/com/terraformersmc/modmenu/ModMenu.java @@ -19,10 +19,8 @@ import net.fabricmc.loader.api.metadata.ModMetadata; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.resource.language.I18n; -import net.minecraft.text.LiteralText; import net.minecraft.text.MutableText; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/terraformersmc/modmenu/config/option/BooleanConfigOption.java b/src/main/java/com/terraformersmc/modmenu/config/option/BooleanConfigOption.java index 849094631..d7d70300d 100644 --- a/src/main/java/com/terraformersmc/modmenu/config/option/BooleanConfigOption.java +++ b/src/main/java/com/terraformersmc/modmenu/config/option/BooleanConfigOption.java @@ -1,10 +1,9 @@ package com.terraformersmc.modmenu.config.option; import com.terraformersmc.modmenu.util.TranslationUtil; -import net.minecraft.client.gui.screen.ScreenTexts; import net.minecraft.client.option.SimpleOption; +import net.minecraft.screen.ScreenTexts; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; public class BooleanConfigOption implements OptionConvertable { private final String key, translationKey; diff --git a/src/main/java/com/terraformersmc/modmenu/config/option/EnumConfigOption.java b/src/main/java/com/terraformersmc/modmenu/config/option/EnumConfigOption.java index 87cda93b7..0c418c429 100644 --- a/src/main/java/com/terraformersmc/modmenu/config/option/EnumConfigOption.java +++ b/src/main/java/com/terraformersmc/modmenu/config/option/EnumConfigOption.java @@ -2,10 +2,9 @@ import com.mojang.serialization.Codec; import com.terraformersmc.modmenu.util.TranslationUtil; -import net.minecraft.client.gui.screen.ScreenTexts; import net.minecraft.client.option.SimpleOption; +import net.minecraft.screen.ScreenTexts; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; import java.util.Arrays; import java.util.Locale; diff --git a/src/main/java/com/terraformersmc/modmenu/config/option/StringSetConfigOption.java b/src/main/java/com/terraformersmc/modmenu/config/option/StringSetConfigOption.java index 44ef709ac..6fd7c5658 100644 --- a/src/main/java/com/terraformersmc/modmenu/config/option/StringSetConfigOption.java +++ b/src/main/java/com/terraformersmc/modmenu/config/option/StringSetConfigOption.java @@ -1,7 +1,6 @@ package com.terraformersmc.modmenu.config.option; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; import com.terraformersmc.modmenu.util.TranslationUtil; diff --git a/src/main/java/com/terraformersmc/modmenu/event/ModMenuEventHandler.java b/src/main/java/com/terraformersmc/modmenu/event/ModMenuEventHandler.java index ed935f567..2b58bb7c2 100644 --- a/src/main/java/com/terraformersmc/modmenu/event/ModMenuEventHandler.java +++ b/src/main/java/com/terraformersmc/modmenu/event/ModMenuEventHandler.java @@ -8,14 +8,14 @@ import com.terraformersmc.modmenu.gui.widget.ModMenuTexturedButtonWidget; import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents; import net.fabricmc.fabric.api.client.screen.v1.Screens; -import net.minecraft.class_7417; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.GameMenuScreen; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.TitleScreen; import net.minecraft.client.gui.widget.ClickableWidget; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; +import net.minecraft.text.TextContent; +import net.minecraft.text.TranslatableTextContent; import net.minecraft.util.Identifier; import java.util.List; @@ -118,8 +118,8 @@ private static void afterGameMenuScreenInit(Screen screen) { private static boolean buttonHasText(ClickableWidget button, String translationKey) { Text text = button.getMessage(); - var whateverThisIs = text.method_10851(); - return whateverThisIs instanceof TranslatableText && ((TranslatableText) whateverThisIs).getKey().equals(translationKey); + TextContent textContent = text.getContent(); + return textContent instanceof TranslatableTextContent && ((TranslatableTextContent) textContent).getKey().equals(translationKey); } private static void shiftButtons(ClickableWidget button, boolean shiftUp, int spacing) { diff --git a/src/main/java/com/terraformersmc/modmenu/gui/ModMenuOptionsScreen.java b/src/main/java/com/terraformersmc/modmenu/gui/ModMenuOptionsScreen.java index 583a16da7..9209d009b 100644 --- a/src/main/java/com/terraformersmc/modmenu/gui/ModMenuOptionsScreen.java +++ b/src/main/java/com/terraformersmc/modmenu/gui/ModMenuOptionsScreen.java @@ -4,11 +4,11 @@ import com.terraformersmc.modmenu.config.ModMenuConfigManager; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.ScreenTexts; import net.minecraft.client.gui.screen.option.GameOptionsScreen; import net.minecraft.client.gui.widget.ButtonListWidget; import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.screen.ScreenTexts; import net.minecraft.text.OrderedText; import net.minecraft.text.Text; diff --git a/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java b/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java index dce5996f0..a9722d4df 100644 --- a/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java +++ b/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java @@ -18,7 +18,6 @@ import net.minecraft.client.gui.screen.ConfirmChatLinkScreen; import net.minecraft.client.gui.screen.ConfirmScreen; import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.ScreenTexts; import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.gui.widget.TextFieldWidget; import net.minecraft.client.render.BufferBuilder; @@ -29,6 +28,7 @@ import net.minecraft.client.resource.language.I18n; import net.minecraft.client.toast.SystemToast; import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.screen.ScreenTexts; import net.minecraft.text.*; import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/terraformersmc/modmenu/gui/widget/DescriptionListWidget.java b/src/main/java/com/terraformersmc/modmenu/gui/widget/DescriptionListWidget.java index 873d7e0be..759a9d0c2 100644 --- a/src/main/java/com/terraformersmc/modmenu/gui/widget/DescriptionListWidget.java +++ b/src/main/java/com/terraformersmc/modmenu/gui/widget/DescriptionListWidget.java @@ -18,10 +18,8 @@ import net.minecraft.client.render.*; import net.minecraft.client.resource.language.I18n; import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.text.LiteralText; import net.minecraft.text.OrderedText; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; import net.minecraft.util.Formatting; import net.minecraft.util.Util; import net.minecraft.util.math.MathHelper; diff --git a/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ModListEntry.java b/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ModListEntry.java index ae1c358cf..b6143b3b0 100644 --- a/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ModListEntry.java +++ b/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ModListEntry.java @@ -14,7 +14,6 @@ import net.minecraft.client.resource.language.I18n; import net.minecraft.client.texture.NativeImageBackedTexture; import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.text.LiteralText; import net.minecraft.text.StringVisitable; import net.minecraft.text.Text; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ParentEntry.java b/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ParentEntry.java index 7499a083c..11d7e7e11 100644 --- a/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ParentEntry.java +++ b/src/main/java/com/terraformersmc/modmenu/gui/widget/entries/ParentEntry.java @@ -9,7 +9,6 @@ import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gui.DrawableHelper; import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.util.Identifier; import org.lwjgl.glfw.GLFW; diff --git a/src/main/java/com/terraformersmc/modmenu/util/TranslationUtil.java b/src/main/java/com/terraformersmc/modmenu/util/TranslationUtil.java index f06fa7eac..425d10e95 100644 --- a/src/main/java/com/terraformersmc/modmenu/util/TranslationUtil.java +++ b/src/main/java/com/terraformersmc/modmenu/util/TranslationUtil.java @@ -3,7 +3,6 @@ import com.terraformersmc.modmenu.ModMenu; import net.minecraft.client.resource.language.I18n; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; import java.text.NumberFormat; import java.util.Arrays; diff --git a/src/main/java/com/terraformersmc/modmenu/util/mod/Mod.java b/src/main/java/com/terraformersmc/modmenu/util/mod/Mod.java index 870041dec..15de76459 100644 --- a/src/main/java/com/terraformersmc/modmenu/util/mod/Mod.java +++ b/src/main/java/com/terraformersmc/modmenu/util/mod/Mod.java @@ -2,7 +2,6 @@ import net.minecraft.client.texture.NativeImageBackedTexture; import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable;