diff --git a/docs/document-en_us.md b/docs/document-en_us.md index 5d0afe6e..cc0ea0c8 100644 --- a/docs/document-en_us.md +++ b/docs/document-en_us.md @@ -54,11 +54,11 @@ Modify the maximum number of history messages stored in the chat hud - Maximum value: `10000` - Mod restrictions: - Conflicted mods: - - `compactchat` - - `morechathistory` - - `parachute` - - `raise-chat-limit` - - `wmch` + - CompactChat (`compactchat`) + - MoreChatHistory (`morechathistory`) + - Parachute (`parachute`) + - Raise Chat Limit (`raise-chat-limit`) + - Where's My Chat History (`wmch`) ### connectionSimulatedDelay @@ -120,7 +120,7 @@ Remove block breaking particles when pistons break blocks - Default value: *no hotkey*, `false` - Mod restrictions: - Required mods: - - `minecraft >=1.17` + - Minecraft (`minecraft`) ` >=1.17` ### disableRedstoneWireParticle @@ -141,7 +141,7 @@ The items that will NOT trigger tweakHandRestock - Default value: `[minecraft:lava_bucket]` - Mod restrictions: - Required mods: - - `tweakeroo` + - Tweakeroo (`tweakeroo`) ### handRestockListType @@ -154,7 +154,7 @@ The item restriction type for tweakHandRestock - Available options: `None`, `Black List` - Mod restrictions: - Required mods: - - `tweakeroo` + - Tweakeroo (`tweakeroo`) ### handRestockWhiteList @@ -166,7 +166,7 @@ The items that will trigger tweakHandRestock - Default value: `[minecraft:bucket]` - Mod restrictions: - Required mods: - - `tweakeroo` + - Tweakeroo (`tweakeroo`) ### legacyF3NLogic @@ -180,7 +180,7 @@ Modify the logic of hotkey F3 + N back to 1.15 and before - Default value: `false` - Mod restrictions: - Required mods: - - `minecraft >=1.16` + - Minecraft (`minecraft`) ` >=1.16` ### maxChatHudHeight @@ -281,7 +281,7 @@ and then close the container - Default value: *no hotkey*, `false` - Mod restrictions: - Required mods: - - `itemscroller` + - Item Scroller (`itemscroller`) ### tweakmAutoFillContainer @@ -297,7 +297,7 @@ and then close the container - Default value: *no hotkey*, `false` - Mod restrictions: - Required mods: - - `itemscroller` + - Item Scroller (`itemscroller`) ### tweakmAutoPickSchematicBlock @@ -313,8 +313,8 @@ Does not work with easy place mode - Default value: *no hotkey*, `false` - Mod restrictions: - Required mods: - - `tweakeroo` - - `litematica` + - Tweakeroo (`tweakeroo`) + - Litematica (`litematica`) ### tweakmFlawlessFrames @@ -330,7 +330,7 @@ WARNING: Expect client lag spike with enabled - Default value: *no hotkey*, `false` - Mod restrictions: - Required mods: - - `replaymod` + - Replay mod (`replaymod`) ### tweakmSafeAfk @@ -390,8 +390,8 @@ e.g. broken mass craft - Default value: `false` - Mod restrictions: - Required mods: - - `easiercrafting` - - `itemscroller` + - EasierCrafting (`easiercrafting`) + - Item Scroller (`itemscroller`) ![eCraftItemScrollerCompact](assets/eCraftItemScrollerCompact.png) @@ -407,7 +407,7 @@ Back to vanilla behavior where sign text is always rendered together with the si - Default value: `false` - Mod restrictions: - Required mods: - - `optifabric` + - Optifine (`optifabric`) ### ofUnlockF3FpsLimit @@ -419,8 +419,8 @@ Removed 10 FPS render limit for F3 debug hud - Default value: `false` - Mod restrictions: - Required mods: - - `optifabric` - - `minecraft >=1.15` + - Optifine (`optifabric`) + - Minecraft (`minecraft`) ` >=1.15` ### replayAccurateTimelineTimestamp @@ -432,7 +432,7 @@ Display timestamps accurate to milliseconds on the timeline in replay mod - Default value: `false` - Mod restrictions: - Required mods: - - `replaymod` + - Replay mod (`replaymod`) ![replayAccurateTimelineTimestamp](assets/replayAccurateTimelineTimestamp.png) @@ -450,7 +450,7 @@ So the maximum fly speed can be increased - Maximum value: `30` - Mod restrictions: - Required mods: - - `replaymod` + - Replay mod (`replaymod`) ### shaderGameTimeAsWorldTime @@ -464,12 +464,12 @@ So with gamerule doDaylightCycle false this timer variable still increases - Default value: `false` - Mod restrictions: - Required mods: - - `optifabric` + - Optifine (`optifabric`) *or* - Required mods: - - `iris` + - Iris (`iris`) ### xmapNoSessionFinalizationWait @@ -485,7 +485,7 @@ Might have some side effects though - Default value: `false` - Mod restrictions: - Required mods: - - `xaeroworldmap` + - Xaero's World Map (`xaeroworldmap`) ## Setting diff --git a/docs/document-zh_cn.md b/docs/document-zh_cn.md index b9a2c13f..98d55fbc 100644 --- a/docs/document-zh_cn.md +++ b/docs/document-zh_cn.md @@ -54,11 +54,11 @@ - 最大值: `10000` - 模组约束: - 冲突模组: - - `compactchat` - - `morechathistory` - - `parachute` - - `raise-chat-limit` - - `wmch` + - CompactChat (`compactchat`) + - MoreChatHistory (`morechathistory`) + - Parachute (`parachute`) + - Raise Chat Limit (`raise-chat-limit`) + - Where's My Chat History (`wmch`) ### 网络连接延迟模拟 (connectionSimulatedDelay) @@ -120,7 +120,7 @@ - 默认值: *无快捷键*, `false` - 模组约束: - 依赖模组: - - `minecraft >=1.17` + - Minecraft (`minecraft`) ` >=1.17` ### 禁用红石粉粒子效果 (disableRedstoneWireParticle) @@ -141,7 +141,7 @@ - 默认值: `[minecraft:lava_bucket]` - 模组约束: - 依赖模组: - - `tweakeroo` + - Tweakeroo (`tweakeroo`) ### 自动补货名单约束类型 (handRestockListType) @@ -154,7 +154,7 @@ tweakHandRestock功能的物品名单约束类型 - 可用选项: `None`, `Black List` - 模组约束: - 依赖模组: - - `tweakeroo` + - Tweakeroo (`tweakeroo`) ### 自动补货白名单 (handRestockWhiteList) @@ -166,7 +166,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `[minecraft:bucket]` - 模组约束: - 依赖模组: - - `tweakeroo` + - Tweakeroo (`tweakeroo`) ### 旧版F3+N逻辑 (legacyF3NLogic) @@ -180,7 +180,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `false` - 模组约束: - 依赖模组: - - `minecraft >=1.16` + - Minecraft (`minecraft`) ` >=1.16` ### 最大聊天界面高度 (maxChatHudHeight) @@ -281,7 +281,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: *无快捷键*, `false` - 模组约束: - 依赖模组: - - `itemscroller` + - Item Scroller (`itemscroller`) ### 自动装填容器 (tweakmAutoFillContainer) @@ -297,7 +297,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: *无快捷键*, `false` - 模组约束: - 依赖模组: - - `itemscroller` + - Item Scroller (`itemscroller`) ### 自动选择原理图方块 (tweakmAutoPickSchematicBlock) @@ -313,8 +313,8 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: *无快捷键*, `false` - 模组约束: - 依赖模组: - - `tweakeroo` - - `litematica` + - Tweakeroo (`tweakeroo`) + - Litematica (`litematica`) ### 无瑕世界渲染 (tweakmFlawlessFrames) @@ -330,7 +330,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: *无快捷键*, `false` - 模组约束: - 依赖模组: - - `replaymod` + - Replay mod (`replaymod`) ### 安全挂机 (tweakmSafeAfk) @@ -390,8 +390,8 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `false` - 模组约束: - 依赖模组: - - `easiercrafting` - - `itemscroller` + - EasierCrafting (`easiercrafting`) + - Item Scroller (`itemscroller`) ![eCraftItemScrollerCompact](assets/eCraftItemScrollerCompact.png) @@ -407,7 +407,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `false` - 模组约束: - 依赖模组: - - `optifabric` + - Optifine (`optifabric`) ### Optifine解锁F3帧数限制 (ofUnlockF3FpsLimit) @@ -419,8 +419,8 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `false` - 模组约束: - 依赖模组: - - `optifabric` - - `minecraft >=1.15` + - Optifine (`optifabric`) + - Minecraft (`minecraft`) ` >=1.15` ### Replay精准时间戳显示 (replayAccurateTimelineTimestamp) @@ -432,7 +432,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `false` - 模组约束: - 依赖模组: - - `replaymod` + - Replay mod (`replaymod`) ![replayAccurateTimelineTimestamp](assets/replayAccurateTimelineTimestamp.png) @@ -450,7 +450,7 @@ tweakHandRestock功能的物品名单约束类型 - 最大值: `30` - 模组约束: - 依赖模组: - - `replaymod` + - Replay mod (`replaymod`) ### 光影使用游戏时间作为世界时间 (shaderGameTimeAsWorldTime) @@ -464,12 +464,12 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `false` - 模组约束: - 依赖模组: - - `optifabric` + - Optifine (`optifabric`) *或* - 依赖模组: - - `iris` + - Iris (`iris`) ### xaero世界地图跳过会话结束等待 (xmapNoSessionFinalizationWait) @@ -485,7 +485,7 @@ tweakHandRestock功能的物品名单约束类型 - 默认值: `false` - 模组约束: - 依赖模组: - - `xaeroworldmap` + - Xaero's World Map (`xaeroworldmap`) ## 配置 diff --git a/src/main/java/me/fallenbreath/tweakermore/util/doc/DocumentPrinter.java b/src/main/java/me/fallenbreath/tweakermore/util/doc/DocumentPrinter.java index fb75bd2c..ee804be8 100644 --- a/src/main/java/me/fallenbreath/tweakermore/util/doc/DocumentPrinter.java +++ b/src/main/java/me/fallenbreath/tweakermore/util/doc/DocumentPrinter.java @@ -5,6 +5,7 @@ import fi.dy.masa.malilib.config.*; import fi.dy.masa.malilib.hotkeys.IHotkey; import fi.dy.masa.malilib.util.StringUtils; +import me.fallenbreath.conditionalmixin.util.ModPredicate; import me.fallenbreath.conditionalmixin.util.ModRestriction; import me.fallenbreath.tweakermore.TweakerMoreMod; import me.fallenbreath.tweakermore.config.Config; @@ -40,6 +41,17 @@ private static String italic(String text) return "*" + text + "*"; } + private static String prettyPredicate(ModPredicate modPredicate) + { + String ret = String.format("%s (`%s`)", StringUtils.translate("tweakermore.util.mod." + modPredicate.modId), modPredicate.modId); + String predicate = modPredicate.getVersionPredicatesString(); + if (!predicate.isEmpty()) + { + ret += " " + codeBlock(predicate); + } + return ret; + } + private static String getConfigType(IConfigBase config) { String id = config instanceof IHotkeyTogglable ? "hotkey_togglable" : config.getType().name().toLowerCase(); @@ -201,12 +213,12 @@ private static void printOption(Consumer writeln, TweakerMoreOption twea if (!modRestriction.getRequirements().isEmpty()) { writeln.accept(String.format(" - %s:", tr("requirements"))); - modRestriction.getRequirements().forEach(req -> writeln.accept(String.format(" - `%s`", req.toString()))); + modRestriction.getRequirements().forEach(req -> writeln.accept(String.format(" - %s", prettyPredicate(req)))); } if (!modRestriction.getConflictions().isEmpty()) { writeln.accept(String.format(" - %s:", tr("conflictions"))); - modRestriction.getConflictions().forEach(cfl -> writeln.accept(String.format(" - `%s`", cfl.toString()))); + modRestriction.getConflictions().forEach(cfl -> writeln.accept(String.format(" - %s", prettyPredicate(cfl)))); } } }