diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3d3040e..80c860b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,5 @@ -name: Bug Report - Bug反馈 -description: Create a report to help us improve. - 反馈问题,帮助我们改进 +name: Bug Report - Bug 反馈 +description: Create a report to help us improve. - 反馈问题,帮助我们改进。 title: "[Bug] " labels: - 🐛 bug @@ -8,8 +8,8 @@ body: - type: markdown attributes: value: | - Before filling in this `issue`, please make sure that there are no similar or duplicate `issues` that have been opened. - 填写此 `issue` 前,请先确认已经开启的 `issue` 没有类似或重复的 `issue`。 + Before submitting this `issue`, please make sure there are no similar or duplicate `issues` already open. + 填写此 `issue` 前,请先确认已开启的 `issue` 中没有类似或重复的 `issue`。 - type: dropdown id: system @@ -27,8 +27,8 @@ body: attributes: label: Minecraft Version Details - Minecraft 版本信息 description: | - What version of Minecraft do you use? - 你使用的 Minecraft 版本是什么 + Which version of Minecraft are you using? + 你使用的 Minecraft 版本是什么? placeholder: Minecraft version validations: required: true @@ -50,8 +50,8 @@ body: attributes: label: Version Details - 版本信息 description: | - What version of Mod do you use? - 你使用的 Mod 版本是什么 + Which version of the mod are you using? + 你使用的模组版本是什么? placeholder: Mod version validations: required: true @@ -59,10 +59,10 @@ body: - type: textarea id: exist attributes: - label: Existing behavior - 现有行为 + label: Existing behavior - 当前行为 description: | - Please describe the problem you have encountered carefully. - 请仔细描述你所遇到的问题。 + Please describe the problem you encountered in detail. + 请详细描述你遇到的问题。 validations: required: true @@ -71,25 +71,25 @@ body: attributes: label: Expected behavior - 预期行为 description: | - Please describe in detail the results you wish to achieve. - 请仔细描述你要得到的结果。 + Please describe the expected behavior in detail. + 请详细描述你预期的结果。 validations: required: true - type: textarea id: reproduce attributes: - label: To Reproduce - 复现问题 + label: To Reproduce - 复现步骤 description: | - How do you trigger this bug? Please walk us through it step by step. - 这个bug是怎么触发的?请详细告诉我们是怎样出现这个情况的。 + How do you trigger this bug? Please provide step-by-step instructions. + 这个 bug 是怎么触发的?请详细说明复现步骤。 validations: required: false - type: checkboxes id: know attributes: - label: This issue is unique - 这个issue是唯一的 + label: This issue is unique - 此 Issue 是唯一的 options: - - label: I have searched the issue tracker and did not find an issue describing my bug. - 我已经搜索问题追踪器并且没有发现相同的 issue。 + - label: I have searched the issue tracker and did not find an issue describing my bug. - 我已搜索问题追踪器,且未找到描述相同问题的 Issue。 required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 44e8d20..1f02fd4 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,5 +1,5 @@ name: Feature request - 功能请求 -description: Suggest an idea for this project - 为这个项目推荐一个新想法 +description: Suggest an idea for this project - 为该项目提出新想法 title: "[Feature] " labels: - 🪁 enhancement @@ -8,22 +8,22 @@ body: - type: markdown attributes: value: | - Before filling in this `issue`, please make sure that there are no similar or duplicate `issues` that have been opened. - 填写此 `issue` 前,请先确认已经开启的 `issue` 没有类似或重复的 `issue`。 + Before submitting this `issue`, please make sure there are no similar or duplicate `issues` already open. + 填写此 `issue` 前,请先确认已开启的 `issue` 中没有类似或重复的 `issue`。 - type: textarea attributes: label: What new features do you want? - 你想要什么新功能? description: | - What new feature or change you want? How it improves? Please tell us the requirements is with a clear and detailed description, put your screenshots if possible. - 你想要什么新功能或者什么改变?这会带来什么提升?请清晰而详细地描述你的需求,如果可以的话最好附带截图。 + What new feature or improvement would you like to see, and how would it help? Please describe your request clearly and in detail, and include screenshots if possible. + 你想要什么新功能或改进?这会带来什么提升?请清晰、详细地描述你的需求,并尽可能附上截图。 validations: required: true - type: checkboxes id: know attributes: - label: This issue is unique - 这个issue是唯一的 + label: This issue is unique - 此 Issue 是唯一的 options: - - label: I have searched the issue tracker and did not find an issue describing my bug. - 我已经搜索问题追踪器并且没有发现相同的 issue。 + - label: I have searched the issue tracker and did not find an issue describing my request. - 我已搜索问题追踪器,且未找到描述相同请求的 Issue。 required: true diff --git a/.github/ISSUE_TEMPLATE/todo.yml b/.github/ISSUE_TEMPLATE/todo.yml index 4fc31e0..dba00df 100644 --- a/.github/ISSUE_TEMPLATE/todo.yml +++ b/.github/ISSUE_TEMPLATE/todo.yml @@ -8,17 +8,17 @@ body: - type: markdown attributes: value: | - 这是一个项目内部使用的 `issue` 模板,请不要使用这个模板! - This is an internal `issue` template for a project, please do not use this template! + 这是一个仅供项目内部使用的 `issue` 模板,请勿使用! + This is an internal `issue` template for the project. Please do not use it! - type: input attributes: - label: Matters to be added to TODO - 将要加入TODO的事项 + label: Items to be added to TODO - 要加入 TODO 的事项 validations: required: true - type: textarea attributes: - label: Describe what this TODO will do - 描述这个TODO要做的事情 + label: Describe what this TODO entails - 描述该 TODO 的具体内容 validations: required: false diff --git a/build.gradle b/build.gradle index b2aca61..78e88c9 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,12 @@ group = mod_group_id repositories { mavenLocal() + maven { + url = 'https://server.cjsah.net:1002/maven/' + content { + includeModule('dev.dubhe.map', 'aleeve_atlas-neoforge-1.21.11') + } + } mavenCentral() } @@ -106,8 +112,8 @@ neoForge { sourceSets.main.resources { srcDir 'src/generated/resources' } dependencies { - compileOnly("dev.dubhe.map:aleeve_atlas-neoforge-1.21.11:0.0.2") { transitive = false } - testImplementation("dev.dubhe.map:aleeve_atlas-neoforge-1.21.11:0.0.2") { transitive = false } + compileOnly("dev.dubhe.map:aleeve_atlas-neoforge-1.21.11:0.0.1+build.+") { transitive = false } + testImplementation("dev.dubhe.map:aleeve_atlas-neoforge-1.21.11:0.0.1+build.+") { transitive = false } testImplementation platform("org.junit:junit-bom:5.11.4") testImplementation "org.junit.jupiter:junit-jupiter" testRuntimeOnly "org.junit.platform:junit-platform-launcher" diff --git a/docs/CONFIG.md b/docs/CONFIG.md index e15edde..31a53c7 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -2,16 +2,16 @@ 标点每帧绘制一次,并使用世界渲染的最终投影,随行走晃动、受伤摇晃和动态视野角同步定位。隐藏游戏界面时隐藏标点,退出世界时清理投影状态。 -客户端配置由 AnvilLib 保存,可通过模组配置界面修改。`maxPingDistance` 控制世界内拾取距离,范围为 16 至 1024 格;`allowPingEmpty` 控制是否允许标记未命中的位置;`maxPingCount` 控制同时保留的标点数,范围为 1 至 64,默认 6。四类标点的图标和距离文字分别使用 `genericColor`、`warningColor`、`gotoColor`、`enemyColor` 及对应的 `TextColor` 配置,颜色格式为 `#RRGGBBAA`。 +客户端配置由 AnvilLib 保存,可通过模组配置界面修改。`maxPingDistance` 控制世界内拾取距离,范围为 16 至 1024 格;`allowPingEmpty` 控制是否允许标记未命中的位置;`maxPingCount` 控制同时保留的最大标点数,范围为 1 至 64,默认为 6。四类标点的图标和距离文字分别使用 `genericColor`、`warningColor`、`gotoColor`、`enemyColor` 及对应的 `TextColor` 配置,颜色格式为 `#RRGGBBAA`。 -同时安装 Aleeve Atlas 0.0.2 或更新版本时,MiddleKeyPing 自动负责世界内和 Atlas 世界地图的中键操作、轮盘内容、世界内渲染与网络发送。地图短按发送一般标点;长按打开与世界内相同的轮盘,选项依次为一般、警告、前往、敌人,目标使用地图鼠标所指的世界坐标与地图缓存高度。松开中键发送选中项并返回地图,按 Esc 或点击鼠标取消轮盘。 +同时安装 Aleeve Atlas 0.0.1 系列构建版或更高版本时,MiddleKeyPing 会自动接管世界内和 Atlas 世界地图的中键操作、轮盘内容、世界内渲染与网络发送。在地图上短按中键发送“一般”标点;长按打开与世界内相同的轮盘,选项依次为“一般”、“警告”、“前往”、“敌人”,目标位置采用地图光标所指的世界坐标与地图缓存高度。松开中键即可发送选中项并返回地图,按 Esc 或点击鼠标可取消轮盘。 MiddleKeyPing 使用内嵌的 AnvilLib Integration 模块加载 Atlas 客户端联动。 -世界内的标点按键使用 MiddleKeyPing 的绑定。Atlas 世界地图使用鼠标中键,制图选区中的中键继续用于拖动地图。Atlas 原有的世界内按键与临时标点覆层会自动关闭。 +世界内的标点按键使用 MiddleKeyPing 的按键绑定。Atlas 世界地图使用鼠标中键,制图选区中的中键继续用于拖动地图。Atlas 原有的世界内标点按键与临时标点覆层会自动关闭。 -多人标点发送和接收需要服务端及参与客户端安装 MiddleKeyPing。坐标标点广播给同维度玩家,实体标点广播给跟踪该实体的玩家;接收后同步显示在 Atlas 小地图与世界地图。Atlas 的 `ping.channelMode` 不参与这些标点的发送。地图内由 API 注入或收到的 Atlas 标点也使用 MiddleKeyPing 的世界内渲染。 +多人游戏的标点收发需要服务端及参与的客户端均安装 MiddleKeyPing。坐标标点会广播给同维度的玩家,实体标点则会广播给正在追踪该实体的玩家;客户端接收后将同步显示在 Atlas 小地图与世界地图上。Atlas 的 `ping.channelMode` 配置不影响此类标点的发送。通过 API 注入或接收到的 Atlas 地图标点,同样使用 MiddleKeyPing 进行世界内渲染。 -标点默认保留 300 个游戏刻,约 15 秒。实体标点跟随已加载目标;目标尚未加载时等待其出现,卸载后保留最后坐标直到过期。超过 `maxPingCount` 时移除最早标点,并同步移除地图标点;退出世界或切换维度时清理标点。 +标点默认保留 300 个游戏刻(约 15 秒)。实体标点会跟随已加载的目标;若目标尚未加载则等待其出现,目标卸载后将保留其最后坐标直至过期。标点数量超过 `maxPingCount` 时会移除最早的标点,并同步移除对应的地图标点;退出世界或切换维度时会清空所有标点。 -编译前需先在相邻 `aleeve-atlas` 仓库执行 `./gradlew.bat publishToMavenLocal --console=plain`,再在本仓库执行 `./gradlew.bat build --console=plain`。Atlas 作为可选编译依赖,不会内嵌到 MiddleKeyPing 的构建产物中。 +执行 `./gradlew.bat build --console=plain` 时,从 `https://server.cjsah.net:1002/maven/` 解析 `dev.dubhe.map:aleeve_atlas-neoforge-1.21.11:0.0.1+build.+`。Atlas 仅作为可选编译依赖,不会内嵌到 MiddleKeyPing 的构建产物中。 diff --git a/src/generated/resources/assets/middle_key_ping/lang/en_us.json b/src/generated/resources/assets/middle_key_ping/lang/en_us.json index 94d9872..25ad0df 100644 --- a/src/generated/resources/assets/middle_key_ping/lang/en_us.json +++ b/src/generated/resources/assets/middle_key_ping/lang/en_us.json @@ -1,26 +1,26 @@ { - "chat.middle_key_ping.enemy": "%s There are enemy here.", - "chat.middle_key_ping.generic": "%s Marks a location.", + "chat.middle_key_ping.enemy": "%s Enemy here.", + "chat.middle_key_ping.generic": "%s Marked a location.", "chat.middle_key_ping.goto": "%s Go here.", "chat.middle_key_ping.player": "[%s]", "chat.middle_key_ping.warning": "%s Be careful here.", "key.categories.middle_key_ping": "Middle Key Ping", "key.middle_key_ping.enemy": "Enemy", "key.middle_key_ping.generic": "Generic", - "key.middle_key_ping.goto": "Goto", + "key.middle_key_ping.goto": "Go To", "key.middle_key_ping.uniform": "Uniform", "key.middle_key_ping.warning": "Warning", - "middle_key_ping.configuration.allow_ping_empty": "Allow Ping Empty", - "middle_key_ping.configuration.allow_ping_empty.tooltip": "If set to false, points that are beyond the specified distance or are not selected will not be marked", + "middle_key_ping.configuration.allow_ping_empty": "Allow Pinging Empty Space", + "middle_key_ping.configuration.allow_ping_empty.tooltip": "If disabled, locations beyond the maximum distance or without a target will not be marked.", "middle_key_ping.configuration.enemy_color": "Enemy Color", "middle_key_ping.configuration.enemy_text_color": "Enemy Text Color", "middle_key_ping.configuration.generic_color": "Generic Color", "middle_key_ping.configuration.generic_text_color": "Generic Text Color", - "middle_key_ping.configuration.goto_color": "Goto Color", - "middle_key_ping.configuration.goto_text_color": "Goto Text Color", + "middle_key_ping.configuration.goto_color": "Go To Color", + "middle_key_ping.configuration.goto_text_color": "Go To Text Color", "middle_key_ping.configuration.max_ping_count": "Max Ping Count", "middle_key_ping.configuration.max_ping_distance": "Max Ping Distance", - "middle_key_ping.configuration.max_ping_distance.tooltip": "The maximum distance allowed for the creation of punctuation marks", + "middle_key_ping.configuration.max_ping_distance.tooltip": "The maximum distance allowed for placing pings.", "middle_key_ping.configuration.section.middle_key_ping.client.toml": "Middle Key Ping Client Configuration", "middle_key_ping.configuration.section.middle_key_ping.client.toml.title": "Middle Key Ping Client Configuration", "middle_key_ping.configuration.title": "Middle Key Ping Configuration", diff --git a/src/main/java/dev/anvilcraft/ping/client/MiddleKeyPingConfig.java b/src/main/java/dev/anvilcraft/ping/client/MiddleKeyPingConfig.java index dd55d9c..2810931 100644 --- a/src/main/java/dev/anvilcraft/ping/client/MiddleKeyPingConfig.java +++ b/src/main/java/dev/anvilcraft/ping/client/MiddleKeyPingConfig.java @@ -1,5 +1,6 @@ package dev.anvilcraft.ping.client; +import com.google.gson.annotations.SerializedName; import dev.anvilcraft.lib.v2.config.BoundedDiscrete; import dev.anvilcraft.lib.v2.config.Comment; import dev.anvilcraft.lib.v2.config.Config; @@ -14,15 +15,18 @@ public class MiddleKeyPingConfig { public String genericTextColor = "#DDDDDDFF"; public String warningColor = "#FFFF00FF"; public String warningTextColor = "#0000FFFF"; + @SerializedName("Go To Color") public String gotoColor = "#00FF00FF"; + @SerializedName("Go To Text Color") public String gotoTextColor = "#FF00FFFF"; public String enemyColor = "#FF0000FF"; public String enemyTextColor = "#00FFFFFF"; - @Comment("If set to false, points that are beyond the specified distance or are not selected will not be marked") + @Comment("If disabled, locations beyond the maximum distance or without a target will not be marked.") + @SerializedName("Allow Pinging Empty Space") public boolean allowPingEmpty = true; - @Comment("The maximum distance allowed for the creation of punctuation marks") + @Comment("The maximum distance allowed for placing pings.") @BoundedDiscrete(min = 16, max = 1024) public int maxPingDistance = 200; diff --git a/src/main/java/dev/anvilcraft/ping/client/integration/internal/AtlasPingsImpl.java b/src/main/java/dev/anvilcraft/ping/client/integration/internal/AtlasPingsImpl.java index 6499e73..23f257b 100644 --- a/src/main/java/dev/anvilcraft/ping/client/integration/internal/AtlasPingsImpl.java +++ b/src/main/java/dev/anvilcraft/ping/client/integration/internal/AtlasPingsImpl.java @@ -27,7 +27,7 @@ import java.util.UUID; import java.util.function.Function; -@Integration(value = "aleeve_atlas", version = "[0.0.2,)", type = { IntegrationType.CLIENT }) +@Integration(value = "aleeve_atlas", version = "[0.0.1,)", type = { IntegrationType.CLIENT }) public final class AtlasPingsImpl implements PingIntegration { private static final Map LINKS = new IdentityHashMap<>(); diff --git a/src/main/java/dev/anvilcraft/ping/data/MiddleKeyPingLanguageProvider.java b/src/main/java/dev/anvilcraft/ping/data/MiddleKeyPingLanguageProvider.java index 5e62b7c..3842d6d 100644 --- a/src/main/java/dev/anvilcraft/ping/data/MiddleKeyPingLanguageProvider.java +++ b/src/main/java/dev/anvilcraft/ping/data/MiddleKeyPingLanguageProvider.java @@ -18,13 +18,13 @@ protected void addTranslations() { this.add("key.middle_key_ping.uniform", "Uniform"); this.add("key.middle_key_ping.generic", "Generic"); this.add("key.middle_key_ping.warning", "Warning"); - this.add("key.middle_key_ping.goto", "Goto"); + this.add("key.middle_key_ping.goto", "Go To"); this.add("key.middle_key_ping.enemy", "Enemy"); this.add("key.categories.middle_key_ping", "Middle Key Ping"); this.add("chat.middle_key_ping.player", "[%s]"); - this.add("chat.middle_key_ping.generic", "%s Marks a location."); + this.add("chat.middle_key_ping.generic", "%s Marked a location."); this.add("chat.middle_key_ping.warning", "%s Be careful here."); this.add("chat.middle_key_ping.goto", "%s Go here."); - this.add("chat.middle_key_ping.enemy", "%s There are enemy here."); + this.add("chat.middle_key_ping.enemy", "%s Enemy here."); } } diff --git a/src/main/resources/assets/middle_key_ping/lang/zh_cn.json b/src/main/resources/assets/middle_key_ping/lang/zh_cn.json index bfab545..55429f3 100644 --- a/src/main/resources/assets/middle_key_ping/lang/zh_cn.json +++ b/src/main/resources/assets/middle_key_ping/lang/zh_cn.json @@ -21,9 +21,9 @@ "middle_key_ping.configuration.max_ping_count": "最大标点数量", "middle_key_ping.configuration.max_ping_distance": "最大标点距离", "middle_key_ping.configuration.max_ping_distance.tooltip": "允许创建标点的最大距离", - "middle_key_ping.configuration.section.middle_key_ping.client.toml": "中键标点 客户端配置", - "middle_key_ping.configuration.section.middle_key_ping.client.toml.title": "中键标点 客户端配置", - "middle_key_ping.configuration.title": "中键标点 配置", + "middle_key_ping.configuration.section.middle_key_ping.client.toml": "中键标点客户端配置", + "middle_key_ping.configuration.section.middle_key_ping.client.toml.title": "中键标点客户端配置", + "middle_key_ping.configuration.title": "中键标点配置", "middle_key_ping.configuration.warning_color": "警告标点颜色", "middle_key_ping.configuration.warning_text_color": "警告标点文字颜色" } \ No newline at end of file diff --git a/src/main/templates/META-INF/neoforge.mods.toml b/src/main/templates/META-INF/neoforge.mods.toml index b311acc..c48d270 100644 --- a/src/main/templates/META-INF/neoforge.mods.toml +++ b/src/main/templates/META-INF/neoforge.mods.toml @@ -67,7 +67,7 @@ side = "BOTH" [[dependencies."${mod_id}"]] modId = "aleeve_atlas" type = "optional" -versionRange = "[0.0.2,)" +versionRange = "[0.0.1,)" ordering = "AFTER" side = "CLIENT"