From 074348f7ccdaab1addcd67dbf98512c20bfcf94b Mon Sep 17 00:00:00 2001 From: KrLite <68179735+KrLite@users.noreply.github.com> Date: Sun, 25 Feb 2024 13:07:15 +0800 Subject: [PATCH] localizations & config --- .../dm/earth/cabricality/Cabricality.java | 14 ++- .../cabricality/client/CabricalityClient.java | 20 ++--- .../cabricality/command/DebugCommand.java | 7 +- .../earth/cabricality/config/CabfConfig.java | 62 ++----------- .../cabricality/config/key/CabfKeyBinds.java | 1 - .../config/modmenu/CabfConfigScreen.java | 68 -------------- .../modmenu/CabfModMenuIntegration.java | 4 +- .../lib/util/log/CabfDebugger.java | 2 +- .../cabricality/lib/util/log/CabfLogger.java | 17 ++-- .../mixin/client/MinecraftClientModifier.java | 2 +- .../mixin/client/ScreenAnimator.java | 90 ------------------- .../assets/cabricality/lang/en_us.json | 19 ++-- .../assets/cabricality/lang/zh_cn.json | 21 ++--- .../assets/cabricality/lang/zh_tw.json | 21 ++--- src/main/resources/cabricality.mixins.json | 3 - src/main/resources/fabric.mod.json | 2 +- 16 files changed, 69 insertions(+), 284 deletions(-) delete mode 100644 src/main/java/dm/earth/cabricality/config/modmenu/CabfConfigScreen.java delete mode 100644 src/main/java/dm/earth/cabricality/mixin/client/ScreenAnimator.java diff --git a/src/main/java/dm/earth/cabricality/Cabricality.java b/src/main/java/dm/earth/cabricality/Cabricality.java index 2ff8ad14..52527281 100644 --- a/src/main/java/dm/earth/cabricality/Cabricality.java +++ b/src/main/java/dm/earth/cabricality/Cabricality.java @@ -11,13 +11,15 @@ import dm.earth.cabricality.content.entries.CabfSounds; import dm.earth.cabricality.content.trading.data.recipe.Trading; import dm.earth.cabricality.lib.util.ConfettiUtil; -import dm.earth.cabricality.lib.util.log.CabfLogger; import dm.earth.cabricality.listener.DeployerCuttingRecipeHandler; import dm.earth.cabricality.listener.UseEntityListener; import dm.earth.cabricality.network.CabfReceiver; import dm.earth.cabricality.tweak.BlockTagTweaks; import dm.earth.cabricality.tweak.ItemTagTweaks; import io.github.fabricators_of_create.porting_lib.util.EnvExecutor; +import me.shedaniel.autoconfig.AutoConfig; +import me.shedaniel.autoconfig.ConfigHolder; +import me.shedaniel.autoconfig.serializer.Toml4jConfigSerializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; @@ -143,9 +145,17 @@ private static void initClientAssets() { RRPCallback.AFTER_VANILLA.register(list -> list.add(RRPs.CLIENT_RESOURCES)); } + public static final ConfigHolder CONFIG_HOLDER; + public static final CabfConfig CONFIG; + + static { + AutoConfig.register(CabfConfig.class, Toml4jConfigSerializer::new); + CONFIG_HOLDER = AutoConfig.getConfigHolder(CabfConfig.class); + CONFIG = CONFIG_HOLDER.get(); + } + @Override public void onInitialize() { - CabfConfig.override(); ConfettiUtil.startLoading(); CabfReceiver.registerServer(); diff --git a/src/main/java/dm/earth/cabricality/client/CabricalityClient.java b/src/main/java/dm/earth/cabricality/client/CabricalityClient.java index f7ee1399..fb201222 100644 --- a/src/main/java/dm/earth/cabricality/client/CabricalityClient.java +++ b/src/main/java/dm/earth/cabricality/client/CabricalityClient.java @@ -1,15 +1,6 @@ package dm.earth.cabricality.client; -import java.util.Arrays; - import dm.earth.cabricality.Cabricality; -import net.fabricmc.api.ClientModInitializer; -import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; -import net.fabricmc.fabric.api.resource.ResourceManagerHelper; -import net.fabricmc.fabric.api.resource.ResourcePackActivationType; -import net.minecraft.client.gui.RotatingCubeMapRenderer; -import org.jetbrains.annotations.Nullable; -import org.lwjgl.glfw.GLFW; import dm.earth.cabricality.client.listener.ColorRegistryListener; import dm.earth.cabricality.config.key.CabfKeyBinds; import dm.earth.cabricality.content.alchemist.core.Substrate; @@ -18,14 +9,19 @@ import dm.earth.cabricality.content.trading.util.ProfessionDebugHelper; import dm.earth.cabricality.lib.util.PushUtil; import dm.earth.cabricality.lib.util.ScreenUtil; -import dm.earth.cabricality.lib.util.SoundUtil; import dm.earth.cabricality.network.CabfReceiver; import dm.earth.cabricality.tweak.cutting.WoodCuttingEntry; import dm.earth.cabricality.tweak.ore_processing.OreProcessingEntry; - +import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; +import net.fabricmc.fabric.api.resource.ResourceManagerHelper; +import net.fabricmc.fabric.api.resource.ResourcePackActivationType; import net.minecraft.block.Block; -import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.RotatingCubeMapRenderer; import net.minecraft.client.render.RenderLayer; +import org.jetbrains.annotations.Nullable; + +import java.util.Arrays; public class CabricalityClient implements ClientModInitializer { public static String ID = Cabricality.ID + "Client"; diff --git a/src/main/java/dm/earth/cabricality/command/DebugCommand.java b/src/main/java/dm/earth/cabricality/command/DebugCommand.java index 56d59848..cf2429df 100644 --- a/src/main/java/dm/earth/cabricality/command/DebugCommand.java +++ b/src/main/java/dm/earth/cabricality/command/DebugCommand.java @@ -13,10 +13,11 @@ public class DebugCommand implements Command { @Override public int run(CommandContext context) { - CabfConfig.debugInfo(!CabfConfig.debugInfo()); + Cabricality.CONFIG.debugInfoEnabled = !Cabricality.CONFIG.debugInfoEnabled; + Cabricality.CONFIG_HOLDER.save(); context.getSource().sendFeedback( - () -> Cabricality.genTranslatableText("command", "debug", CabfConfig.debugInfo() ? "enabled" : "disabled") + () -> Cabricality.genTranslatableText("command", "debug", Cabricality.CONFIG.debugInfoEnabled ? "enabled" : "disabled") .formatted(Formatting.GRAY, Formatting.ITALIC), false ); @@ -27,7 +28,7 @@ public int run(CommandContext context) { player, Cabricality.genTranslatableText( "command", "debug_info", - CabfConfig.debugInfo() ? "enabled" : "disabled" + Cabricality.CONFIG.debugInfoEnabled ? "enabled" : "disabled" ) )); } diff --git a/src/main/java/dm/earth/cabricality/config/CabfConfig.java b/src/main/java/dm/earth/cabricality/config/CabfConfig.java index d893048a..3f57aa68 100644 --- a/src/main/java/dm/earth/cabricality/config/CabfConfig.java +++ b/src/main/java/dm/earth/cabricality/config/CabfConfig.java @@ -1,56 +1,12 @@ package dm.earth.cabricality.config; -import net.fabricmc.loader.api.FabricLoader; -import net.krlite.pierced.annotation.Silent; -import net.krlite.pierced.annotation.Table; -import net.krlite.pierced.config.Pierced; - -import java.io.File; - -public class CabfConfig extends Pierced { - private static @Silent final File FILE = FabricLoader.getInstance().getConfigDir().resolve("cabricality.toml").toFile(); - private static @Silent final CabfConfig INSTANCE = new CabfConfig(); - - private CabfConfig() { - super(CabfConfig.class, FILE); - load(); - } - - public static void override() { - INSTANCE.save(); - } - - private boolean includeVersionInWindowTitle = false; - - public static boolean includeVersionInWindowTitle() { - return INSTANCE.includeVersionInWindowTitle; - } - - public static void includeVersionInWindowTitle(boolean includeVersionInGameTitle) { - INSTANCE.includeVersionInWindowTitle = includeVersionInGameTitle; - INSTANCE.save(); - } - - private boolean fadeScreenBackground = true; - - public static boolean fadeScreenBackground() { - return INSTANCE.fadeScreenBackground; - } - - public static void fadeScreenBackground(boolean fadeScreenBackground) { - INSTANCE.fadeScreenBackground = fadeScreenBackground; - INSTANCE.save(); - } - - @Table("debug") - private boolean debugInfo = false; - - public static boolean debugInfo() { - return INSTANCE.debugInfo; - } - - public static void debugInfo(boolean debugInfo) { - INSTANCE.debugInfo = debugInfo; - INSTANCE.save(); - } +import me.shedaniel.autoconfig.ConfigData; +import me.shedaniel.autoconfig.annotation.Config; +import me.shedaniel.autoconfig.annotation.ConfigEntry; + +@Config(name = "cabricality") +public class CabfConfig implements ConfigData { + @ConfigEntry.Gui.Tooltip + public boolean includesVersionInWindowTitle = false; + public boolean debugInfoEnabled = false; } diff --git a/src/main/java/dm/earth/cabricality/config/key/CabfKeyBinds.java b/src/main/java/dm/earth/cabricality/config/key/CabfKeyBinds.java index 800b018b..208ff47e 100644 --- a/src/main/java/dm/earth/cabricality/config/key/CabfKeyBinds.java +++ b/src/main/java/dm/earth/cabricality/config/key/CabfKeyBinds.java @@ -1,7 +1,6 @@ package dm.earth.cabricality.config.key; import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.config.modmenu.CabfConfigScreen; import com.mojang.blaze3d.platform.InputUtil; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; diff --git a/src/main/java/dm/earth/cabricality/config/modmenu/CabfConfigScreen.java b/src/main/java/dm/earth/cabricality/config/modmenu/CabfConfigScreen.java deleted file mode 100644 index 3b6ab511..00000000 --- a/src/main/java/dm/earth/cabricality/config/modmenu/CabfConfigScreen.java +++ /dev/null @@ -1,68 +0,0 @@ -package dm.earth.cabricality.config.modmenu; - -import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.config.CabfConfig; -import me.shedaniel.clothconfig2.api.ConfigBuilder; -import me.shedaniel.clothconfig2.api.ConfigCategory; -import me.shedaniel.clothconfig2.api.ConfigEntryBuilder; -import net.minecraft.client.gui.screen.Screen; - -public class CabfConfigScreen { - private final ConfigBuilder builder = ConfigBuilder.create() - .setTitle(Cabricality.genTranslatableText("screen", "config", "title")) - .transparentBackground() - .setSavingRunnable(CabfConfig::override); - private final ConfigEntryBuilder entryBuilder = builder.entryBuilder(); - - public CabfConfigScreen(Screen parent) { - builder.setParentScreen(parent); - initEntries(); - } - - public Screen build() { - return builder.build(); - } - - private final ConfigCategory general = builder.getOrCreateCategory( - Cabricality.genTranslatableText("config", "category", "general") - ); - private final ConfigCategory debug = builder.getOrCreateCategory( - Cabricality.genTranslatableText("config", "category", "debug") - ); - - private void initEntries() { - // General - general.addEntry( - entryBuilder.startBooleanToggle( - Cabricality.genTranslatableText("config", "general", "include_version_in_window_title"), - CabfConfig.includeVersionInWindowTitle() - ) - .setDefaultValue(true) - .setTooltip(Cabricality.genTranslatableText("config", "general", "include_version_in_window_title", "tooltip")) - .setSaveConsumer(CabfConfig::includeVersionInWindowTitle) - .build() - ); - - general.addEntry( - entryBuilder.startBooleanToggle( - Cabricality.genTranslatableText("config", "general", "fade_screen_background"), - CabfConfig.fadeScreenBackground() - ) - .setDefaultValue(true) - .setTooltip(Cabricality.genTranslatableText("config", "general", "fade_screen_background", "tooltip")) - .setSaveConsumer(CabfConfig::fadeScreenBackground) - .build() - ); - - // Debug - debug.addEntry( - entryBuilder.startBooleanToggle( - Cabricality.genTranslatableText("config", "debug", "debug_info"), - CabfConfig.debugInfo() - ) - .setDefaultValue(false) - .setSaveConsumer(CabfConfig::debugInfo) - .build() - ); - } -} diff --git a/src/main/java/dm/earth/cabricality/config/modmenu/CabfModMenuIntegration.java b/src/main/java/dm/earth/cabricality/config/modmenu/CabfModMenuIntegration.java index 6195fa2b..5057b77d 100644 --- a/src/main/java/dm/earth/cabricality/config/modmenu/CabfModMenuIntegration.java +++ b/src/main/java/dm/earth/cabricality/config/modmenu/CabfModMenuIntegration.java @@ -2,10 +2,12 @@ import com.terraformersmc.modmenu.api.ConfigScreenFactory; import com.terraformersmc.modmenu.api.ModMenuApi; +import dm.earth.cabricality.config.CabfConfig; +import me.shedaniel.autoconfig.AutoConfig; public class CabfModMenuIntegration implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { - return parent -> new CabfConfigScreen(parent).build(); + return parent -> AutoConfig.getConfigScreen(CabfConfig.class, parent).get(); } } diff --git a/src/main/java/dm/earth/cabricality/lib/util/log/CabfDebugger.java b/src/main/java/dm/earth/cabricality/lib/util/log/CabfDebugger.java index 0cdd02ac..c291e20d 100644 --- a/src/main/java/dm/earth/cabricality/lib/util/log/CabfDebugger.java +++ b/src/main/java/dm/earth/cabricality/lib/util/log/CabfDebugger.java @@ -12,7 +12,7 @@ public class CabfDebugger { private static final String PREFIX = "[" + Cabricality.NAME + "/DEBUG] "; public static void debug(@NotNull String message) { - if (CabfConfig.debugInfo() || FabricLoader.getInstance().isDevelopmentEnvironment()) + if (Cabricality.CONFIG.debugInfoEnabled || FabricLoader.getInstance().isDevelopmentEnvironment()) LOGGER.info("[" + Cabricality.NAME + "/DEBUG] " + message); } } diff --git a/src/main/java/dm/earth/cabricality/lib/util/log/CabfLogger.java b/src/main/java/dm/earth/cabricality/lib/util/log/CabfLogger.java index f0432b91..ea440102 100644 --- a/src/main/java/dm/earth/cabricality/lib/util/log/CabfLogger.java +++ b/src/main/java/dm/earth/cabricality/lib/util/log/CabfLogger.java @@ -1,7 +1,6 @@ package dm.earth.cabricality.lib.util.log; import dm.earth.cabricality.Cabricality; -import dm.earth.cabricality.config.CabfConfig; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -15,42 +14,42 @@ public static void message(@NotNull String message) { } public static void info(@NotNull String message) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.info(PREFIX + message); } public static void warn(@NotNull String message) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.warn(PREFIX + message); } public static void error(@NotNull String message) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.error(PREFIX + message); } public static void error(@NotNull String message, @NotNull Throwable throwable) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.error(PREFIX + message, throwable); } public static void debug(@NotNull String message) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.debug(PREFIX + message); } public static void debug(@NotNull String message, @NotNull Throwable throwable) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.debug(PREFIX + message, throwable); } public static void trace(@NotNull String message) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.trace(PREFIX + message); } public static void trace(@NotNull String message, @NotNull Throwable throwable) { - if (CabfConfig.debugInfo()) + if (Cabricality.CONFIG.debugInfoEnabled) LOGGER.trace(PREFIX + message, throwable); } diff --git a/src/main/java/dm/earth/cabricality/mixin/client/MinecraftClientModifier.java b/src/main/java/dm/earth/cabricality/mixin/client/MinecraftClientModifier.java index f39a6704..34e62221 100644 --- a/src/main/java/dm/earth/cabricality/mixin/client/MinecraftClientModifier.java +++ b/src/main/java/dm/earth/cabricality/mixin/client/MinecraftClientModifier.java @@ -44,7 +44,7 @@ private void modifyWindowTitle(CallbackInfoReturnable cir) { ModContainer container = FabricLoader.getInstance().getModContainer(Cabricality.ID).orElseThrow(); cir.setReturnValue( container.getMetadata().getName() + ( - CabfConfig.includeVersionInWindowTitle() + Cabricality.CONFIG.includesVersionInWindowTitle ? (" " + container.getMetadata().getVersion().getFriendlyString()) : "" ) diff --git a/src/main/java/dm/earth/cabricality/mixin/client/ScreenAnimator.java b/src/main/java/dm/earth/cabricality/mixin/client/ScreenAnimator.java deleted file mode 100644 index 955013d7..00000000 --- a/src/main/java/dm/earth/cabricality/mixin/client/ScreenAnimator.java +++ /dev/null @@ -1,90 +0,0 @@ -package dm.earth.cabricality.mixin.client; - -import dm.earth.cabricality.config.CabfConfig; -import dm.earth.cabricality.lib.util.PushUtil; -import dm.earth.cabricality.lib.util.ScreenUtil; -import net.krlite.equator.math.algebra.Curves; -import net.krlite.equator.render.frame.FrameInfo; -import net.krlite.equator.visual.animation.animated.AnimatedDouble; -import net.krlite.equator.visual.color.AccurateColor; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.render.GameRenderer; -import org.jetbrains.annotations.Nullable; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArgs; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.invoke.arg.Args; - -@Mixin(Screen.class) -public class ScreenAnimator { - @Unique - private static final AnimatedDouble opacity = new AnimatedDouble(0, 1, 450, Curves.Exponential.Quadratic.OUT); - - @ModifyArgs( - method = "renderBackground", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/client/gui/GuiGraphics;fillGradient(IIIIII)V" - ) - ) - private void fadeIn(Args args) { - if (CabfConfig.fadeScreenBackground()) { - PushUtil.SCREEN.pull(opacity::replay); - - int upper = args.get(5), lower = args.get(6); - - args.set(5, AccurateColor.fromARGB(upper).opacity(opacity.value() * 0xC0 / 0xFF).toInt()); - args.set(6, AccurateColor.fromARGB(lower).opacity(opacity.value() * 0xC0 / 0xFF).toInt()); - } - } -} - -@Mixin(GameRenderer.class) -class PostScreenAnimator { - @Unique - private static final AnimatedDouble opacity = new AnimatedDouble(1, 0, 450, Curves.Exponential.Quadratic.OUT); - - @Inject( - method = "render", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/client/gui/hud/InGameHud;render(Lnet/minecraft/client/gui/GuiGraphics;F)V", - shift = At.Shift.AFTER - ) - ) - private void fadeOut(float tickDelta, long startTime, boolean tick, CallbackInfo ci) { - if (CabfConfig.fadeScreenBackground()) { - PushUtil.POST_SCREEN.pull(opacity::replay); - - if (opacity.isPlaying()) { - FrameInfo.scaled().render(new GuiGraphics(MinecraftClient.getInstance(), MinecraftClient.getInstance().getBufferBuilders().getEntityVertexConsumers()), - flat -> flat.new Rectangle() - .colorTop(AccurateColor.fromARGB(0xC0101010L)) - .colorBottom(AccurateColor.fromARGB(0xD0101010L)) - .opacityMultiplier(opacity.value()) - ); - } - } - } -} - -@Mixin(MinecraftClient.class) -class PostScreenTriggerer { - @Shadow - @Nullable - public Screen currentScreen; - - @Inject(method = "setScreen", at = @At("HEAD")) - private void setScreen(@Nullable Screen screen, CallbackInfo ci) { - if (CabfConfig.fadeScreenBackground()) { - if (currentScreen == null && screen != null && !ScreenUtil.isUnextendedScreen(screen.getClass())) PushUtil.SCREEN.push(); - if (currentScreen != null && screen == null && !ScreenUtil.isUnextendedScreen(currentScreen.getClass())) PushUtil.POST_SCREEN.push(); - } - } -} diff --git a/src/main/resources/assets/cabricality/lang/en_us.json b/src/main/resources/assets/cabricality/lang/en_us.json index ff0288b4..000b3ba3 100644 --- a/src/main/resources/assets/cabricality/lang/en_us.json +++ b/src/main/resources/assets/cabricality/lang/en_us.json @@ -305,17 +305,12 @@ "comment_config": "Configs", - "config.cabricality.category.general": "General", + "text.autoconfig.cabricality.title": "Cabricality", - "config.cabricality.general.include_version_in_window_title" : "Include Version in Window Title", - "config.cabricality.general.include_version_in_window_title.tooltip": "§7Whether to include version components in the window title\n§cYou may need to close this config screen to see changes", + "text.autoconfig.cabricality.option.includesVersionInWindowTitle" : "Includes Version in Window Title", + "text.autoconfig.cabricality.option.includesVersionInWindowTitle.@Tooltip": "Whether to include version components in the window title\n§cYou may need to close this config screen to see changes", - "config.cabricality.general.fade_screen_background" : "Fade Screen Background", - "config.cabricality.general.fade_screen_background.tooltip": "§7Whether to fade screen backgrounds when you open or close\na GUI screen", - - "config.cabricality.category.debug": "Debug", - - "config.cabricality.debug.debug_info" : "Debug Info", + "text.autoconfig.cabricality.option.debugInfoEnabled" : "Prints Debug Info", @@ -329,8 +324,8 @@ "comment_event": "Events", - "event.cabricality.coin_flip": "You Flipped a %s It Was %s", - "event.cabricality.dice_roll": "You Rolled a %s It Was %s", + "event.cabricality.coin_flip": "You flipped your %1$s, the result is %2$s", + "event.cabricality.dice_roll": "You rolled your %1$s, the result is %2$s", @@ -367,8 +362,6 @@ "mod.questsadditions.name": "Quests Additions", "mod.itemfilters.name" : "Item Filters", - "screen.cabricality.config.title": "Cabricality", - "screen.cabricality.missing_mod.title" : "§lYou Need to Download §c§l1§r§l Mod Manually", "screen.cabricality.missing_mod.title_plural" : "§lYou Need to Download §c§l%d§r§l Mods Manually", "screen.cabricality.missing_mod.subtitle" : "Due to some licensing reasons, Cabricality cannot download it for you", diff --git a/src/main/resources/assets/cabricality/lang/zh_cn.json b/src/main/resources/assets/cabricality/lang/zh_cn.json index b8d7be73..afc08cda 100644 --- a/src/main/resources/assets/cabricality/lang/zh_cn.json +++ b/src/main/resources/assets/cabricality/lang/zh_cn.json @@ -1,4 +1,6 @@ { + "modmenu.descriptionTranslation.cabricality": "一个以机械动力为中心的冒险整合包,基于《机械动力:永无止境》而设计。", + "comment_item": "物品", "item.cabricality.kinetic_mechanism" : "动力构件", @@ -305,17 +307,12 @@ "comment_config": "设置", - "config.cabricality.category.general": "通用", - - "config.cabricality.general.include_version_in_window_title" : "窗口标题显示整合包版本", - "config.cabricality.general.include_version_in_window_title.tooltip": "§7是否在窗口标题中显示整合包版本\n§c你需要关闭此设置界面以使改动生效", + "text.autoconfig.cabricality.title": "永无止境:重缝", - "config.cabricality.general.fade_screen_background" : "渐隐GUI背景", - "config.cabricality.general.fade_screen_background.tooltip": "§7是否在打开或关闭GUI时渐隐背景", + "text.autoconfig.cabricality.option.includesVersionInWindowTitle" : "窗口标题显示整合包版本", + "text.autoconfig.cabricality.option.includesVersionInWindowTitle.@Tooltip": "是否在窗口标题中显示整合包版本\n§c你需要关闭此设置界面以使改动生效", - "config.cabricality.category.debug": "调试", - - "config.cabricality.debug.debug_info" : "调试信息", + "text.autoconfig.cabricality.option.debugInfoEnabled" : "调试信息", @@ -329,8 +326,8 @@ "comment_event": "事件", - "event.cabricality.coin_flip": "你翻转了一枚%s 结果是%s", - "event.cabricality.dice_roll": "你掷出了一枚%s 结果是%s", + "event.cabricality.coin_flip": "你翻转了你的%1$s,结果是%2$s", + "event.cabricality.dice_roll": "你掷出了你的%1$s,结果是%2$s", @@ -367,8 +364,6 @@ "mod.questsadditions.name": "Quests Additions 模组", "mod.itemfilters.name" : "Item Filters 模组", - "screen.cabricality.config.title": "永无止境:重缝", - "screen.cabricality.missing_mod.title" : "§l你需要手动下载以下模组", "screen.cabricality.missing_mod.title_plural" : "§l你需要手动下载以下§c§l%d个§r§l模组", "screen.cabricality.missing_mod.subtitle" : "因为许可证不允许,永无止境:重缝无法为你下载这个模组", diff --git a/src/main/resources/assets/cabricality/lang/zh_tw.json b/src/main/resources/assets/cabricality/lang/zh_tw.json index 779750dd..81817af9 100644 --- a/src/main/resources/assets/cabricality/lang/zh_tw.json +++ b/src/main/resources/assets/cabricality/lang/zh_tw.json @@ -1,4 +1,6 @@ { + "modmenu.descriptionTranslation.cabricality": "一个以机械动力为中心的冒险整合包,基于《机械动力:永无止境》而设计。", + "comment_item": "物品", "item.cabricality.kinetic_mechanism" : "動力構件", @@ -305,17 +307,12 @@ "comment_config": "設置", - "config.cabricality.category.general": "通用", - - "config.cabricality.general.include_version_in_window_title" : "窗口標題顯示整合包版本", - "config.cabricality.general.include_version_in_window_title.tooltip": "§7是否在窗口標題中顯示整合包版本\n§c你需要關閉此設置界面以使改動生效", + "text.autoconfig.cabricality.title": "永無止境:重縫", - "config.cabricality.general.fade_screen_background" : "漸隱GUI背景", - "config.cabricality.general.fade_screen_background.tooltip": "§7是否在打開或關閉GUI時漸隱背景", + "text.autoconfig.cabricality.option.includesVersionInWindowTitle" : "窗口標題顯示整合包版本", + "text.autoconfig.cabricality.option.includesVersionInWindowTitle.@Tooltip": "§7是否在窗口標題中顯示整合包版本\n§c你需要關閉此設置界面以使改動生效", - "config.cabricality.category.debug": "調試", - - "config.cabricality.debug.debug_info" : "調試信息", + "text.autoconfig.cabricality.option.debugInfoEnabled" : "調試信息", @@ -329,8 +326,8 @@ "comment_event": "事件", - "event.cabricality.coin_flip": "你翻轉了一枚%s 結果是%s", - "event.cabricality.dice_roll": "你擲出了一枚%s 結果是%s", + "event.cabricality.coin_flip": "你翻轉了你的%1$s,結果是%2$s", + "event.cabricality.dice_roll": "你擲出了你的%1$s,結果是%2$s", @@ -367,8 +364,6 @@ "mod.questsadditions.name": "Quests Additions 模組", "mod.itemfilters.name" : "Item Filters 模組", - "screen.cabricality.config.title": "永無止境:重縫", - "screen.cabricality.missing_mod.title" : "§l你需要手動下載以下模組", "screen.cabricality.missing_mod.title_plural" : "§l你需要手動下載以下§c§l%d個§r§l模組", "screen.cabricality.missing_mod.subtitle" : "因為許可證不允許,永無止境:重縫無法為你下載這個模組", diff --git a/src/main/resources/cabricality.mixins.json b/src/main/resources/cabricality.mixins.json index 9cd10091..ab7034b4 100644 --- a/src/main/resources/cabricality.mixins.json +++ b/src/main/resources/cabricality.mixins.json @@ -28,9 +28,6 @@ "client.FinishLoadingTrigger$OptimizeWorldScreenMixin", "client.FinishLoadingTrigger$SplashOverlayMixin", "client.MinecraftClientModifier", - "client.PostScreenAnimator", - "client.PostScreenTriggerer", - "client.ScreenAnimator", "client.SplashModifier", "client.TitleScreenWidgets", "client.create.TagDependentIngredientItemMixin", diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 90036e12..424b6e4b 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -7,7 +7,7 @@ ], "name": "Cabricality", - "description": "", + "description": "A Create centered challengable modpack inspired by 'Create: Above and Beyond'.", "authors": [ "§bDM Earth (Team)", "Yjn024", "KrLite"