diff --git a/build.gradle b/build.gradle index 3653cd0..3750c42 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.12-SNAPSHOT' + id 'fabric-loom' version '1.0.1' id 'maven-publish' } diff --git a/gradle.properties b/gradle.properties index 08cd502..d77acf6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.18.2 - yarn_mappings=1.18.2+build.2 - loader_version=0.13.3 + minecraft_version=1.19.2 + yarn_mappings=1.19.2+build.20 + loader_version=0.14.9 # Mod Properties - mod_version = 1.5.1-Snapshot+1.18.2 + mod_version = 1.5.1-Snapshot+1.19.2 maven_group = io.github.blobanium archives_base_name = Loading-Timer # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.48.0+1.18.2 - cloth_version=5.0.34 - modmenu_version=2.0.4 + fabric_version=0.62.0+1.19.2 + cloth_version=8.2.88 + modmenu_version=4.0.6 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2e6e589..aa991fc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/io/github/blobanium/lt/config/ModMenuConfig.java b/src/main/java/io/github/blobanium/lt/config/ModMenuConfig.java index 7a729d2..39d398c 100644 --- a/src/main/java/io/github/blobanium/lt/config/ModMenuConfig.java +++ b/src/main/java/io/github/blobanium/lt/config/ModMenuConfig.java @@ -8,7 +8,7 @@ import me.shedaniel.clothconfig2.api.ConfigEntryBuilder; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.gui.screen.Screen; -import net.minecraft.text.TranslatableText; +import net.minecraft.text.Text; public class ModMenuConfig implements ModMenuApi { @@ -30,56 +30,56 @@ public Screen create(Screen parent) { final ConfigBuilder builder = ConfigBuilder.create() .setParentScreen(parent) - .setTitle(new TranslatableText("loading-timer.config")); + .setTitle(Text.translatable("loading-timer.config")); // Serialise the config into the config file. This will be called last after all variables are updated. builder.setSavingRunnable(ConfigReader::refreshConfig); ConfigEntryBuilder entryBuilder = builder.entryBuilder(); - ConfigCategory general = builder.getOrCreateCategory(new TranslatableText("category.examplemod.general")); + ConfigCategory general = builder.getOrCreateCategory(Text.translatable("category.examplemod.general")); - general.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("loading-timer.config.insane_precision"), ConfigReader.insanePrecision) + general.addEntry(entryBuilder.startBooleanToggle(Text.translatable("loading-timer.config.insane_precision"), ConfigReader.insanePrecision) .setDefaultValue(false) - .setTooltip(new TranslatableText("loading-timer.config.insane_precision.description")) + .setTooltip(Text.translatable("loading-timer.config.insane_precision.description")) .setSaveConsumer(newValue -> ConfigReader.insanePrecision = newValue) .build()); if(LoadingTimerPreLaunch.isConflictingKsysisLoaded){ - general.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("loading-timer.config.world_load_time"), ConfigReader.worldLoadTime) + general.addEntry(entryBuilder.startBooleanToggle(Text.translatable("loading-timer.config.world_load_time"), ConfigReader.worldLoadTime) .setDefaultValue(false) - .setTooltip(new TranslatableText("loading-timer.config.world_load_time.conflict.ksyxiswarning")) + .setTooltip(Text.translatable("loading-timer.config.world_load_time.conflict.ksyxiswarning")) .setSaveConsumer(newValue -> ConfigReader.worldLoadTime = newValue) .build()); } else { - general.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("loading-timer.config.world_load_time"), ConfigReader.worldLoadTime) + general.addEntry(entryBuilder.startBooleanToggle(Text.translatable("loading-timer.config.world_load_time"), ConfigReader.worldLoadTime) .setDefaultValue(false) - .setTooltip(new TranslatableText("loading-timer.config.world_load_time.description")) + .setTooltip(Text.translatable("loading-timer.config.world_load_time.description")) .setSaveConsumer(newValue -> ConfigReader.worldLoadTime = newValue) .build()); } - general.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("loading-timer.config.resource_load_notif"), ConfigReader.resourceLoadNotif) + general.addEntry(entryBuilder.startBooleanToggle(Text.translatable("loading-timer.config.resource_load_notif"), ConfigReader.resourceLoadNotif) .setDefaultValue(false) - .setTooltip(new TranslatableText("loading-timer.config.resource_load_notif.description")) + .setTooltip(Text.translatable("loading-timer.config.resource_load_notif.description")) .setSaveConsumer(newValue -> ConfigReader.resourceLoadNotif = newValue) .build()); - general.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("loading-timer.config.resource_load_notif_override"), ConfigReader.resourceLoadNotifStartupOverride) + general.addEntry(entryBuilder.startBooleanToggle(Text.translatable("loading-timer.config.resource_load_notif_override"), ConfigReader.resourceLoadNotifStartupOverride) .setDefaultValue(false) - .setTooltip(new TranslatableText("loading-timer.config.resource_load_notif_override.description")) + .setTooltip(Text.translatable("loading-timer.config.resource_load_notif_override.description")) .setSaveConsumer(newValue -> ConfigReader.resourceLoadNotifStartupOverride = newValue) .build()); - general.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("loading-timer.config.resource_load_percent"), ConfigReader.resourceLoadPercent) + general.addEntry(entryBuilder.startBooleanToggle(Text.translatable("loading-timer.config.resource_load_percent"), ConfigReader.resourceLoadPercent) .setDefaultValue(false) - .setTooltip(new TranslatableText("loading-timer.config.resource_load_percent.description")) + .setTooltip(Text.translatable("loading-timer.config.resource_load_percent.description")) .setSaveConsumer(newValue -> ConfigReader.resourceLoadPercent = newValue) .build()); - general.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("loading-timer.config.raw_loading_toast"), ConfigReader.rawLoadingToast) + general.addEntry(entryBuilder.startBooleanToggle(Text.translatable("loading-timer.config.raw_loading_toast"), ConfigReader.rawLoadingToast) .setDefaultValue(false) - .setTooltip(new TranslatableText("loading-timer.config.raw_loading_toast.description")) + .setTooltip(Text.translatable("loading-timer.config.raw_loading_toast.description")) .setSaveConsumer(newValue -> ConfigReader.rawLoadingToast = newValue) .build()); diff --git a/src/main/java/io/github/blobanium/lt/toast/ToastExecutor.java b/src/main/java/io/github/blobanium/lt/toast/ToastExecutor.java index 2ab7a40..b030977 100644 --- a/src/main/java/io/github/blobanium/lt/toast/ToastExecutor.java +++ b/src/main/java/io/github/blobanium/lt/toast/ToastExecutor.java @@ -5,7 +5,7 @@ import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.MinecraftClient; import net.minecraft.client.toast.SystemToast; -import net.minecraft.text.TranslatableText; +import net.minecraft.text.Text; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -21,7 +21,7 @@ public static void executeToast(String translatableDescription, double toastTime easterEggLaodingTimer(); easterEggMods(); easterEggMineclub(); - SystemToast toast = SystemToast.create(MinecraftClient.getInstance(), SystemToast.Type.TUTORIAL_HINT, new TranslatableText(easterEggTranslatable), new TranslatableText(translatableDescription, toastTimeValue)); + SystemToast toast = SystemToast.create(MinecraftClient.getInstance(), SystemToast.Type.TUTORIAL_HINT, Text.translatable(easterEggTranslatable), Text.translatable(translatableDescription, toastTimeValue)); MinecraftClient.getInstance().getToastManager().add(toast); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index d44ef34..c0d5202 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,13 +33,12 @@ ["loading-timer.mixins.json"], "depends": { "fabricloader": ">=0.12.10", - "minecraft": ["1.18.*"], + "minecraft": ["1.19.*"], "fabric": "*", "java": ">=17" }, "recommends":{ - "cloth-config2": "*", - "minecraft": ["1.18.*"] + "cloth-config2": "*" }, "conflicts": { "ksyxis": ["1.0"] diff --git a/src/main/resources/loading-timer.mixins.json b/src/main/resources/loading-timer.mixins.json index ff79454..c6ed561 100644 --- a/src/main/resources/loading-timer.mixins.json +++ b/src/main/resources/loading-timer.mixins.json @@ -2,7 +2,7 @@ "required": true, "minVersion": "0.8", "package": "io.github.blobanium.lt.mixin", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ ], "client": [