diff --git a/.github/ISSUE_TEMPLATE/bug_report_cn.yml b/.github/ISSUE_TEMPLATE/bug_report_cn.yml index 8999102c..70d995fb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_cn.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_cn.yml @@ -7,42 +7,57 @@ body: - type: markdown attributes: value: | - 请确保您使用的是最新版的RC,您反馈的bug很可能已经在更新版本中修复 + 请确保您使用的是最新版的RealCamera,您反馈的bug很可能已经在更新版本中修复 (查看尾缀是否与最新工件相同) 在反馈bug前,请先尝试搜索是否已有相似的问题,请不要重复打开相同的issue 所有有关YSM的问题,请您优先寻求他人的帮助,或者观看配置模型教程 - 而不是直接在issue中提问。 + 而不是直接在issue中提问 - type: checkboxes id: preliminary attributes: label: 我已确认 ... options: - - label: 我正在使用最新版的RC + - label: 我正在使用最新版的RealCamera + required: true + - label: issues里没有相关的问题 required: true - label: 无法在关闭主要功能时复现 required: true - type: input - id: minecraft-version-loader + id: minecraft-version attributes: - label: Minecraft版本和加载器 + label: Minecraft版本 description: | - 请填写游戏版本与所使用的加载器. + 你所使用的Minecraft的版本. - 你可以在游戏主界面作下角或者游戏启动时的日志开头等地方找到. + 你可以在游戏主界面左下角或者游戏启动时的日志开头等地方找到. validations: required: true + - type: checkboxes + id: bug-type + attributes: + label: 问题类型 + options: + - label: 开启主功能时出现bug + required: false + - label: 与其他模组的兼容问题 + required: false + - label: 在fabric端出现 + required: false + - label: 在Forge端出现 + required: false - type: textarea id: incompatible-mods attributes: label: 不兼容的mod description: >- 和bug相关的模组 -
请在反馈问题前尝试尽可能移除不相干的模组的情况下复现bug - placeholder: 'Mods list here' +
请在反馈问题前移除所有不相干的模组的情况下复现bug + placeholder: '与问题有关的模组列表' render: 'raw' validations: required: true @@ -52,7 +67,8 @@ body: attributes: label: 错误描述 description: >- - 请尽可能详细的描述遇到的问题. + 请尽可能详细的描述遇到的问题 +
同时也请务必携带复现时的视频或截图,这对于我们理解问题非常有帮助
越清晰和详尽的描述会使该bug的处理优先级更高 validations: required: true @@ -62,9 +78,9 @@ body: attributes: label: 复现步骤 placeholder: | - 1. Join the game... + 1. 进入游戏... - 2. Change some settings... + 2. 做出某些改变... 3. ... @@ -73,7 +89,10 @@ body: attributes: label: 日志和崩溃报告 description: >- - 你可以在/logs/lastest.log 和 /crash-report 中找到错误报告,或者使用启动器的导出功能 + 如果为非崩溃问题,请不要上传日志,这样会不利于我们理解问题 +
你可以在/logs/lastest.log 和 /crash-report 中找到错误报告,或者使用启动器的导出功能
你可以日志上传到类似 https://paste.ubuntu.com/ 或者 https://mclo.gs/ 的网站并在此贴出链接 -
**请不要在此此处直接粘贴大段的日志文本!!** +
**请不要在此处直接粘贴大段的日志文本!!!** +
**请不要在此处直接粘贴大段的日志文本!!!** +
**请不要在此处直接粘贴大段的日志文本!!!** placeholder: '把日志文件往这丢或者使用外部链接' diff --git a/.github/ISSUE_TEMPLATE/bug_report_en.yml b/.github/ISSUE_TEMPLATE/bug_report_en.yml index 000632d0..20b0427e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_en.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_en.yml @@ -12,7 +12,7 @@ body: Before reporting a bug, please search for similar issues first and avoid opening duplicate issues For all YSM-related questions, please seek help from others or watch configuration model tutorials first - instead of asking directly in the issue. + instead of asking directly in the issue - type: checkboxes id: preliminary @@ -21,27 +21,42 @@ body: options: - label: I am using the latest version of RealCamera required: true - - label: Unable to reproduce when main feature is disabled + - label: No related issues found in the issue tracker. + required: true + - label: Unable to reproduce when the main feature is disabled required: true - type: input - id: minecraft-version-loader + id: minecraft-version attributes: - label: Minecraft Version and Loader + label: Minecraft Version description: | - Please specify the game version and your mod loader. + The Minecraft version you are using. You can find them at the corner of main menu or in the log while startup. validations: required: true + - type: checkboxes + id: bug-type + attributes: + label: Question Type + options: + - label: Bug occurs when enabling main feature + required: false + - label: Incompatibility with other mods + required: false + - label: Appears on Fabric + required: false + - label: Appears on Forge + required: false - type: textarea id: incompatible-mods attributes: label: Incompatible Mods description: >- - The mods related to the bug. -
Try to remove unrelated plugins and mods before reporting + The mods related to the bug +
Reproduce the bug with all unrelated mods removed before reporting placeholder: 'Mods list here' render: 'raw' validations: @@ -52,7 +67,8 @@ body: attributes: label: Bug Description description: >- - Please describe the issue you encountered in as much detail as possible. + Please describe the issue you encountered in as much detail as possible +
Please also attach screenshots or reproduction videos, as they help us diagnose the problem effectively
Clearer and more detailed descriptions will receive higher processing priority validations: required: true @@ -73,7 +89,10 @@ body: attributes: label: Logs & Crash Reports description: >- - You can find error reports in /logs/latest.log and /crash-reports, or use the launcher's export function + If your issue is not a crash, please do not upload log files, as they will hinder our understanding of the problem +
You can find error reports in /logs/latest.log and /crash-reports, or use the launcher's export function
You can upload logs to sites like https://paste.ubuntu.com/ or https://mclo.gs/ and post the link here -
**DO NOT PASTE LARGE LOGS DIRECTLY HERE!!** +
**DO NOT PASTE LARGE LOGS DIRECTLY HERE!!!** +
**DO NOT PASTE LARGE LOGS DIRECTLY HERE!!!** +
**DO NOT PASTE LARGE LOGS DIRECTLY HERE!!!** placeholder: 'Drag log file here or use external link' diff --git a/.github/ISSUE_TEMPLATE/feature_request_cn.yml b/.github/ISSUE_TEMPLATE/feature_request_cn.yml new file mode 100644 index 00000000..f960b8d0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request_cn.yml @@ -0,0 +1,43 @@ +name: 新功能建议 +description: 为我们提供新的想法 +title: "[new feature]:" +labels: [ "new feature" ] +body: + - type: markdown + attributes: + value: | + 感谢您花时间提出新的功能想法! + 请确保最新版本内没有这个功能! + + - type: textarea + id: feature-description + attributes: + label: 这个功能是什么? + description: 请清晰地描述您希望添加的功能 + placeholder: 我希望... + validations: + required: true + + - type: textarea + id: problem-and-solution + attributes: + label: 这个功能可以解决什么问题? + description: 请详细说明其作用 + placeholder: 这个功能可以帮助解决... + validations: + required: true + + - type: textarea + id: ideal-solution + attributes: + label: 这个功能理想中的解决方案是什么样的? + description: 例如新的按钮应该在何处,哪里需要新的配置选项 + placeholder: 我希望... + validations: + required: true + + - type: textarea + id: additional-context + attributes: + label: 其他信息 + description: 任何关于功能的上下文或截图 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request_en.yml b/.github/ISSUE_TEMPLATE/feature_request_en.yml new file mode 100644 index 00000000..0ae65664 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request_en.yml @@ -0,0 +1,43 @@ +name: New Feature Request +description: Suggest an idea for this project +title: "[new feature]: " +labels: [ "new feature" ] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to suggest a new feature! + Check the latest build to confirm the feature is missing. + + - type: textarea + id: feature-description + attributes: + label: What is this feature about? + description: A clear and concise description of what the feature is. + placeholder: I would like to... + validations: + required: true + + - type: textarea + id: problem-and-solution + attributes: + label: What problem does this feature solve? + description: Please elaborate on its purpose + placeholder: This feature helps resolve... + validations: + required: true + + - type: textarea + id: ideal-solution + attributes: + label: What does your ideal solution look like? + description: For example, where new buttons or config options should be placed + placeholder: I would like... + validations: + required: true + + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Any relevant information or screenshots regarding the feature \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a55202b..7e227355 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: Build on: pull_request: paths-ignore: + - '**/ISSUE_TEMPLATE/**' - '**/lang/**' - '**.md' - 'LICENSE' @@ -19,12 +20,12 @@ jobs: run: env - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: true - name: Setup JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: "temurin" java-version: 17 @@ -37,9 +38,9 @@ jobs: run: ./gradlew clean build -PcommitSHA=${{ github.sha }} - name: Capture Build Artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: Artifacts path: | fabric/build/libs/* - forge/build/libs/* \ No newline at end of file + forge/build/libs/* diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f297d1ca..f01e4237 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,12 +18,12 @@ jobs: run: env - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: true - name: Setup JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: "temurin" java-version: 17 diff --git a/README.md b/README.md index 42992dad..aeb08493 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ### [中文](README_ZH.md) Make the camera more realistic in the first-person view. -Supported versions: 1.18.2-1.20.4 Forge, 1.18.2-1.21.8 Fabric, 1.21-1.21.8 NeoForge. +Supported versions: 1.18.2 - 1.20.4 Forge, 1.18.2 - 26.2 Fabric, 1.21 - 26.2 NeoForge. Download the mod from [Releases](https://github.com/xTracr/RealCamera/releases), [Modrinth](https://modrinth.com/mod/real-camera) or [CurseForge](https://curseforge.com/minecraft/mc-mods/real-camera) Snapshots are [here](https://github.com/xTracr/RealCamera/actions/workflows/build.yml) @@ -12,86 +12,96 @@ Snapshots are [here](https://github.com/xTracr/RealCamera/actions/workflows/buil * Bind the camera to a specific part of the body. * Customize the position and rotation of the camera. * Render player model in first-person perspective. -* Use F6 to toggle the feature on or off and other hotkeys to adjust the camera. +* Use 「F6」 to toggle the feature on or off and other hotkeys to adjust the camera. * Configure these features in the Config Screen (Cloth Config required) and the Model View Screen (0.6+). ### Configuration (0.6+) * Theoretically, most mod models are supported, but need to be configured manually: * First, set the key binding for `Open Model View Screen`. - * ![gui_configs](https://cdn.modrinth.com/data/fYYSAh4R/images/4625282a5683cd38eba2947be1ca82e595e18bad.png) + * ![gui_configs](https://cdn.modrinth.com/data/fYYSAh4R/images/4625282a5683cd38eba2947be1ca82e595e18bad.png) * Open the model view screen and left click with left Alt held to select the corresponding face of the model, scroll with left Alt held to switch between the different layers of the model. * By clicking the `Selecting` button on the left, switch between the three to select the `Forward Vector`, `Upward Vector`, and `Target Plane`. * From the top right button, enter the `Preview` section, where you can see the relative relationship between the camera and the model and make certain adjustments (you can also adjust through key bindings). - * ![gui_preview](https://cdn.modrinth.com/data/fYYSAh4R/images/44c87a6f1750f8d1b03422120e6042d1098896cb.png) + * ![gui_preview](https://cdn.modrinth.com/data/fYYSAh4R/images/44c87a6f1750f8d1b03422120e6042d1098896cb.png) * Enter a name and save. +* ~~If you have difficulty configuring the settings, you can also enable `Mod Settings > Binding Mode > Legacy Binding Mode` +
Note: This setting is exclusive to vanilla Minecraft.~~ #### Tips * Configs can have their priority adjusted - higher priority configs appear higher in the right-side list +* In the mod settings, you can manually switch between available configurations by modifying the configuration index. You can also set it to a non-zero value to lock the active configuration +* When the main feature is enabled, hover over the configuration entries. The one annotated with `Current Config` is the configuration currently in use * Disable depth in `Preview` section to hide models blocking the view -* About `Disable` section (current version still rough, complex operations): - * When texture ID field is empty, use Left Alt+Left Click to select texture - * Model parts contained by blue boxes won't be rendered - * Left-click drag to select in texture view, other keys cancel selection - * Left Alt+Left Click quickly selects hovered parts - * In `All` mode, entire texture's model won't render (blue box containing the texture in left panel indicates this) - * ![gui_disable](https://cdn.modrinth.com/data/fYYSAh4R/images/b49ac4da6bf8a59f13c7e93ca1ef76b73e5d23b4.png) +* About `Disable` section: + * When texture ID field is empty, use 「Left Alt + Left Click」 to select a texture + * Selection modes: + * Single & Multiple selection: Press 「Left Alt + Left Click」 to select the faces to disable + * Range selection: Press 「Left Alt + Left Click」 to confirm the selection area, and use 「Alt + Scroll Wheel」 to adjust the size of the selection area + * In the left texture view of the player rendering area: + * Press 「Left Click」 to start/end drag selection, press any other key to cancel the selection + * Faces selected via drag selection have the same effect as faces disabled via Multiple selection + * Notably, disabling faces this way is generally more performance-efficient than other methods + * Disable modes: + * In `part` mode, selected faces will not be rendered (you can preview the effect by toggling off the visibility of the disable configuration on the right pane) + * In `All` mode, entire texture's model won't render (blue box containing the texture in left panel indicates this) + * ![gui_disable](https://cdn.modrinth.com/data/fYYSAh4R/images/b49ac4da6bf8a59f13c7e93ca1ef76b73e5d23b4.png) ## Dependencies * Fabric: - * [Fabric API](https://modrinth.com/mod/fabric-api) + * [Fabric API](https://modrinth.com/mod/fabric-api) * Both: - * (Optional but recommended) [Cloth Config API](https://modrinth.com/mod/cloth-config) + * (Optional but recommended) [Cloth Config API](https://modrinth.com/mod/cloth-config) ## FAQ * A part of the model (e.g. hair) is always in the way, how to make it invisible? - * Increasing this value may help, or use `Disable` section - ![disable_depth](https://github.com/xTracr/RealCamera/assets/57320980/78c246e8-34aa-4979-89de-780ee907870b) + * Increasing this value may help, or use `Disable` section + ![disable_depth](https://github.com/xTracr/RealCamera/assets/57320980/78c246e8-34aa-4979-89de-780ee907870b) * What key to press can open Model View Screen? - * Set the key binding by yourself + * Set the key binding by yourself * Why can't i open the Config Screen? - * Please downlowd [Cloth Config API](https://modrinth.com/mod/cloth-config) + * Please downlowd [Cloth Config API](https://modrinth.com/mod/cloth-config) * Why does it show binding failed when use YSM models? - * On Minecraft 1.20.1, use a Real Camera build with the dedicated YSM projection sampler; the old side-face binding and roll workaround is no longer required -* Why does the head of YSM model disappear when in the Model View Screen? - * You downloaded Better Combat, just put it away + * On Minecraft 1.20.1, use a Real Camera build with the dedicated YSM projection sampler; the old side-face binding and roll workaround is no longer required +* Why does the disabled texture appear when i downloaded Better Combat and attack? + * Open settings of Better Combat and change Auto to False in First person player animation ### Compatibility * Incompatible: - * OptiFine - * Armourer's Workshop (Mod version 0.6+) - * Armors based on GeckoLib - * Customizable Player Models - * Epic Fight (Mod version 0.6-) - * Timeless and Classics Zero,version 1.1.4+ + * OptiFine + * Armourer's Workshop (Mod version 0.6+) + * Armors based on GeckoLib + * Customizable Player Models + * Epic Fight (Mod version 0.6-) + * Timeless and Classics Zero,version 1.1.4+ * Compatible: - * most camera mods - * most player model mods - * Armourer's Workshop (Mod version 0.6-) - * Epic Fight (Mod version 0.6+) - * First-person Model - * Not Enough Animations - * ParCool! - * Pehkui - * Player Animation Lib - * Timeless and Classics Zero,version 1.0.3- - * Yes Steve Model (Not stably compatible) - * Superb Warfare + * most camera mods + * most player model mods + * Armourer's Workshop (Mod version 0.6-) + * Epic Fight (Mod version 0.6+) + * First-person Model + * Not Enough Animations + * ParCool! + * Pehkui + * Player Animation Lib + * Timeless and Classics Zero,version 1.0.3- + * Yes Steve Model (Not stably compatible) + * Superb Warfare * Model Mod Compatibility Requirements with `Real Camera` (Based on Official Mappings): * Vertex Data Acquisition - * `Real Camera` obtains vertex data by overriding the `MultiBufferSource multiBufferSource` parameter of the public method `EntityRenderDispatcher.render` - * The call timing is before the `Camera.setup` phase in the `GameRenderer.renderLevel` method - * *Therefore*, the mod needs to meet the following technical conditions: - * Use only the **provided** `multiBufferSource` parameter when rendering `Minecraft.getCameraEntity`, and avoid alternative approaches for obtaining or creating `MultiBufferSource` instances - * The overall rendering behavior remains unaffected when rendering the player model at the adjusted timing - * Ensure all vertex data ultimately passes through `VertexConsumer` gotten by `MultiBufferSource.getBuffer` + * `Real Camera` obtains vertex data by overriding the `MultiBufferSource multiBufferSource` parameter of the public method `EntityRenderDispatcher.render` + * The call timing is before the `Camera.setup` phase in the `GameRenderer.renderLevel` method + * *Therefore*, the mod needs to meet the following technical conditions: + * Use only the **provided** `multiBufferSource` parameter when rendering `Minecraft.getCameraEntity`, and avoid alternative approaches for obtaining or creating `MultiBufferSource` instances + * The overall rendering behavior remains unaffected when rendering the player model at the adjusted timing + * Ensure all vertex data ultimately passes through `VertexConsumer` gotten by `MultiBufferSource.getBuffer` * Render Times Compatibility - * `Real Camera` renders `Minecraft.getCameraEntity` by calling the public method `EntityRenderDispatcher.render` - * This is the second call to the `EntityRenderDispatcher.render` method in a frame (the first call is to solve the camera parameters). - * *Therefore*, the mod needs to meet the condition that the overall rendering behavior remains unaffected when rendering the player model **multiple times** in the same frame + * `Real Camera` renders `Minecraft.getCameraEntity` by calling the public method `EntityRenderDispatcher.render` + * This is the second call to the `EntityRenderDispatcher.render` method in a frame (the first call is to solve the camera parameters). + * *Therefore*, the mod needs to meet the condition that the overall rendering behavior remains unaffected when rendering the player model **multiple times** in the same frame diff --git a/README_ZH.md b/README_ZH.md index 58f7d15c..60bf4c1e 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -3,7 +3,7 @@ ### [English](README.md) 使第一人称视角下的摄像头更加真实。 -支持的版本: 1.18.2 - 1.20.4 Forge,1.18.2 - 1.21.8 Fabric,1.21 - 1.21.8 NeoForge +支持的版本: 1.18.2 - 1.20.4 Forge,1.18.2 - 26.2 Fabric,1.21 - 26.2 NeoForge 从[Releases](https://github.com/xTracr/RealCamera/releases)、[Modrinth](https://modrinth.com/mod/real-camera)或[CurseForge](https://curseforge.com/minecraft/mc-mods/real-camera)下载 快照版在[这里](https://github.com/xTracr/RealCamera/actions/workflows/build.yml) @@ -12,85 +12,95 @@ * 将摄像头绑定到身体的特定部位 * 自定义摄像头的位置和旋转角度 * 在第一人称视角下渲染玩家模型 -* 按下F6来开关,另外一些键来调整摄像头 +* 按下「F6」来开关,另外一些键来调整摄像头 * 在配置界面(需要Cloth Config)和模型视图(0.6+)界面,配置以上特性 ### 配置(0.6+) * 理论上支持大多数模组模型,但需要手动进行配置: * 首先设置`打开模型视图界面`的按键绑定 - * ![gui_configs](https://cdn.modrinth.com/data/fYYSAh4R/images/4625282a5683cd38eba2947be1ca82e595e18bad.png) + * ![gui_configs](https://cdn.modrinth.com/data/fYYSAh4R/images/4625282a5683cd38eba2947be1ca82e595e18bad.png) * 打开模型视图界面,左Alt+左键选择模型的对应的面,左Alt+滚轮可以在模型的不同层间切换 * 通过点击左侧的`选择`按钮,在三者间切换,选好`向前矢量`、`向上矢量`和`目标平面` * 从右上角的按钮进入`预览`界面,在这里可以看到摄像头与模型的相对关系,并进行一定的调整(也可以通过按键绑定调整) - * ![gui_preview](https://cdn.modrinth.com/data/fYYSAh4R/images/44c87a6f1750f8d1b03422120e6042d1098896cb.png) + * ![gui_preview](https://cdn.modrinth.com/data/fYYSAh4R/images/44c87a6f1750f8d1b03422120e6042d1098896cb.png) * 输入名称并保存 +* ~~如果实在不会配置,也可以将`模组设置 > 绑定模式 > 旧绑定模式`打开 +
注意:该设置仅限原版~~ #### Tips * 可以更改配置的优先级,优先级越高的配置,在右侧排序越靠上 +* 在模组设置中,你可以通过修改配置索引来主动切换允许的配置,也可以调整到非0的数来锁定配置 +* 当开启主功能时,将鼠标放到配置上方,其中有注释`当前配置`的即为此时使用的配置 * 在`预览`界面可以更改禁用深度来禁用眼前的模型的渲染 -* 关于`禁用`界面(当前版本尚不完善,操作较为繁琐): - * 在左侧材质id输入框为空时,可以使用Alt+左键选择材质 - * 被蓝框包含的部分不会被渲染。 - * 在左侧材质视图中鼠标左键框选,其它键取消选择 - * Alt+左键可快速选中被鼠标指针指向的部分 - * `全部`模式下,整个材质所对应的模型都不会被渲染(左侧会有一个包含整个材质的蓝框来表示这一点) - * ![gui_disable](https://cdn.modrinth.com/data/fYYSAh4R/images/b49ac4da6bf8a59f13c7e93ca1ef76b73e5d23b4.png) +* 关于`禁用`界面: + * 在左侧材质id输入框为空时,使用「Alt+左键」选择材质 + * 选择模式: + * 单选、多选:按下「Alt+左键」以选择需要禁用的面 + * 范围:按下「Alt+左键」以确定被选择区域,使用「Alt+滚轮」以更改被选择区域的大小 + * 在玩家渲染左侧材质视图中: + * 按下「鼠标左键」开始/结束框选,其它键取消选择 + * 被框选中的面效果与多选禁用的面效果相同 + * 值得一提的是,使用这种方式被禁用面,通常比使用其他方法更加节省性能 + * 禁用模式: + * `部分`模式下,被选择的面不会渲染(可以通过关闭右侧禁用配置的可见性来预览) + * `全部`模式下,整个材质所对应的模型都不会渲染(会有一个包含整个材质的蓝框来表示这一点) + * ![gui_disable](https://cdn.modrinth.com/data/fYYSAh4R/images/b49ac4da6bf8a59f13c7e93ca1ef76b73e5d23b4.png) ## 依赖项目 * Fabric: - * [Fabric API](https://modrinth.com/mod/fabric-api) + * [Fabric API](https://modrinth.com/mod/fabric-api) * 所有平台: - * (可选但建议)[Cloth Config API](https://modrinth.com/mod/cloth-config) + * (可选但建议)[Cloth Config API](https://modrinth.com/mod/cloth-config) ## 常见问题 * 模型的一部分(如头发)始终挡在面前,怎样隐藏它? - * 增加这个值或许有所帮助,或者使用`禁用`功能 - ![disable_depth](https://github.com/xTracr/RealCamera/assets/57320980/78c246e8-34aa-4979-89de-780ee907870b) + * 增加这个值或许有所帮助,或者使用`禁用`功能 + ![disable_depth](https://github.com/xTracr/RealCamera/assets/57320980/78c246e8-34aa-4979-89de-780ee907870b) * 按什么键打开模组视图界面? - * 在按键绑定里自己设置 + * 在按键绑定里自己设置 * 为什么打不开配置界面(模组设置)? - * 没有安装[Cloth Config API](https://modrinth.com/mod/cloth-config) + * 没有安装[Cloth Config API](https://modrinth.com/mod/cloth-config) * 为什么ysm模型有时候会弹出绑定失败? - * 在 Minecraft 1.20.1 中,请使用带有 YSM 专用投影采样器的 Real Camera 版本;无需再使用侧面绑定与翻滚角补偿 -* 为什么配置ysm时候,模型视图界面中ysm模型头部消失? - * 安装了Better Combat模组,去掉就可以了 + * 在 Minecraft 1.20.1 中,请使用带有 YSM 专用投影采样器的 Real Camera 版本;无需再使用侧面绑定与翻滚角补偿 +* 为什么装了Better Combat模组后,禁用的材质在挥舞武器时会重新出现? + * 前往该模组的设置界面,把First person player animation 的Auto 改为False ### 兼容性 * 不兼容: - * OptiFine - * Armourer's Workshop(时装工坊)(真实相机0.6版本以上) - * 基于GeckoLib的盔甲 - * Customizable Player Models(自定义玩家模型) - * Epic Fight(史诗战斗)(真实相机0.6版本以下) - * [TaCZ]永恒枪械工坊:零 1.1.4版本及以上 + * OptiFine + * Armourer's Workshop(时装工坊)(真实相机0.6版本以上) + * 基于GeckoLib的盔甲 + * Customizable Player Models(自定义玩家模型) + * Epic Fight(史诗战斗)(真实相机0.6版本以下) + * [TaCZ]永恒枪械工坊:零 1.1.4版本及以上 * 兼容: - * 大多数修改玩家镜头的模组 - * 多数模型模组 - * Armourer's Workshop(时装工坊)(真实相机0.6版本以下) - * Epic Fight(史诗战斗)(真实相机0.6版本以上) - * First-person Model(更真实的第一人称模型) - * Not Enough Animations(更多动画) - * Player Animation Lib - * Pehkui - * ParCool! - * [TaCZ]永恒枪械工坊:零 1.0.3版本及以下 - * Yes Steve Model(是,史蒂夫模型)(不能稳定兼容) - * Superb Warfare(卓越前线) + * 大多数修改玩家镜头的模组 + * 多数模型模组 + * Armourer's Workshop(时装工坊)(真实相机0.6版本以下) + * Epic Fight(史诗战斗)(真实相机0.6版本以上) + * First-person Model(更真实的第一人称模型) + * Not Enough Animations(更多动画) + * Player Animation Lib + * Pehkui + * ParCool! + * [TaCZ]永恒枪械工坊:零 1.0.3版本及以下 + * Yes Steve Model(是,史蒂夫模型)(不能稳定兼容) + * Superb Warfare(卓越前线) * 模型模组与`Real Camera`兼容的必要条件(基于官方映射): * 顶点数据获取 - * `Real Camera`通过替换公共方法`EntityRenderDispatcher.render`的`MultiBufferSource multiBufferSource`参数实现顶点数据获取 - * 调用时机为`GameRenderer.renderLevel`流程中的`Camera.setup`阶段之前 - * *因此*,模组需要满足以下技术条件: - * 渲染`Minecraft.getCameraEntity`时严格使用**传入的**`multiBufferSource`参数,没有通过其他途径获取或创建`MultiBufferSource`实例 - * 在调整后的时机渲染玩家模型,其整体表现不受影响 - * 所有顶点数据最终通过`MultiBufferSource.getBuffer`方法获取的`VertexConsumer`发送给GPU + * `Real Camera`通过替换公共方法`EntityRenderDispatcher.render`的`MultiBufferSource multiBufferSource`参数实现顶点数据获取 + * 调用时机为`GameRenderer.renderLevel`流程中的`Camera.setup`阶段之前 + * *因此*,模组需要满足以下技术条件: + * 渲染`Minecraft.getCameraEntity`时严格使用**传入的**`multiBufferSource`参数,没有通过其他途径获取或创建`MultiBufferSource`实例 + * 在调整后的时机渲染玩家模型,其整体表现不受影响 + * 所有顶点数据最终通过`MultiBufferSource.getBuffer`方法获取的`VertexConsumer`发送给GPU * 渲染次数兼容 - * `Real Camera`通过调用`EntityRenderDispatcher.render`公共方法进行`Minecraft.getCameraEntity`的渲染 - * 这是在一帧中第二次调用`EntityRenderDispatcher.render`方法(第一次是为了解算摄像机参数) - * *因此*,模组需要满足:同一帧内**多次**渲染玩家模型,其整体表现不受影响 + * `Real Camera`通过调用`EntityRenderDispatcher.render`公共方法进行`Minecraft.getCameraEntity`的渲染 + * 这是在一帧中第二次调用`EntityRenderDispatcher.render`方法(第一次是为了解算摄像机参数) + * *因此*,模组需要满足:同一帧内**多次**渲染玩家模型,其整体表现不受影响 diff --git a/common/src/main/java/com/xtracr/realcamera/KeyMappings.java b/common/src/main/java/com/xtracr/realcamera/KeyMappings.java index 599002ec..1f2a8f0a 100644 --- a/common/src/main/java/com/xtracr/realcamera/KeyMappings.java +++ b/common/src/main/java/com/xtracr/realcamera/KeyMappings.java @@ -25,12 +25,12 @@ public final class KeyMappings { }); createKeyMapping("toggleAdjustMode", client -> ConfigFile.config().cycleAdjustMode()); createKeyMapping("toggleCameraMode", client -> ConfigFile.config().setClassic(!ConfigFile.config().isClassic())); - createKeyMapping("adjustFRONT", client -> ConfigFile.config().adjustOffsetX(1)); - createKeyMapping("adjustBACK", client -> ConfigFile.config().adjustOffsetX(-1)); createKeyMapping("adjustUP", client -> ConfigFile.config().adjustOffsetY(1)); createKeyMapping("adjustDOWN", client -> ConfigFile.config().adjustOffsetY(-1)); createKeyMapping("adjustLEFT", client -> ConfigFile.config().adjustOffsetZ(1)); createKeyMapping("adjustRIGHT", client -> ConfigFile.config().adjustOffsetZ(-1)); + createKeyMapping("adjustFRONT", client -> ConfigFile.config().adjustOffsetX(1)); + createKeyMapping("adjustBACK", client -> ConfigFile.config().adjustOffsetX(-1)); createKeyMapping("activeConfigIndexNEXT", client -> ConfigFile.config().binding.activeConfigIndex += 1); createKeyMapping("activeConfigIndexPREV", client -> ConfigFile.config().binding.activeConfigIndex -= 1); createKeyMapping("activeConfigIndexRESET", client -> ConfigFile.config().binding.activeConfigIndex = 0); diff --git a/common/src/main/java/com/xtracr/realcamera/RealCameraCore.java b/common/src/main/java/com/xtracr/realcamera/RealCameraCore.java index 591b9089..4a0901d1 100644 --- a/common/src/main/java/com/xtracr/realcamera/RealCameraCore.java +++ b/common/src/main/java/com/xtracr/realcamera/RealCameraCore.java @@ -92,17 +92,20 @@ public static void computeCamera(Minecraft client, float deltaTick) { Entity entity = client.getCameraEntity(); boolean invisible = entity.isInvisible(); entity.setInvisible(false); - newResult = RealCameraAPI.computeBindResult(client, deltaTick); - if (!newResult.available()) { - EntityRenderDispatcher dispatcher = client.getEntityRenderDispatcher(); - try { - dispatcher.render(entity, 0, 0, 0, Mth.lerp(deltaTick, entity.yRotO, entity.getYRot()), deltaTick, new PoseStack(), vertexCatcher, dispatcher.getPackedLightCoords(entity, deltaTick)); - vertexCatcher.forEachBuffer(RealCameraCore::computeBindResult); - } finally { - vertexCatcher.clear(); + try { + newResult = RealCameraAPI.computeBindResult(client, deltaTick); + if (!newResult.available()) { + EntityRenderDispatcher dispatcher = client.getEntityRenderDispatcher(); + try { + dispatcher.render(entity, 0, 0, 0, Mth.lerp(deltaTick, entity.yRotO, entity.getYRot()), deltaTick, new PoseStack(), vertexCatcher, dispatcher.getPackedLightCoords(entity, deltaTick)); + vertexCatcher.forEachBuffer(RealCameraCore::computeBindResult); + } finally { + vertexCatcher.clear(); + } } + } finally { + entity.setInvisible(invisible); } - entity.setInvisible(invisible); if (newResult.available()) { failureFrames = 0; lastResult = newResult.computeCamera(false); diff --git a/common/src/main/java/com/xtracr/realcamera/compat/CompatibilityHelper.java b/common/src/main/java/com/xtracr/realcamera/compat/CompatibilityHelper.java index fcc4df84..1cab748b 100644 --- a/common/src/main/java/com/xtracr/realcamera/compat/CompatibilityHelper.java +++ b/common/src/main/java/com/xtracr/realcamera/compat/CompatibilityHelper.java @@ -12,8 +12,10 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; +import java.util.function.Function; public class CompatibilityHelper { + public static boolean isRenderInScreen; private static PlatformHelper platformHelper; private static Method NEA_playerTransformer_setDeltaTick; private static Field NEA_NEAnimationsLoader_INSTANCE; @@ -65,6 +67,17 @@ public static void initialize(PlatformHelper platformHelper) { } catch (Exception e) { RealCamera.LOGGER.warn("Compatibility with TACZ is outdated: [{}] {}", e.getClass().getName(), e.getMessage()); } + if (isModLoaded("entity_model_features")) try { + Class emfAnimationApi = Class.forName("traben.entity_model_features.EMFAnimationApi"); + if ((int) emfAnimationApi.getMethod("getApiVersion").invoke(null) < 9) { + throw new IllegalStateException("EntityModelFeatures API is outdated; player heads in the model view may flicker"); + } + Function pauseCondition = ignored -> isRenderInScreen; + Method registerPauseCondition = emfAnimationApi.getMethod("registerPauseCondition", Function.class); + registerPauseCondition.invoke(null, pauseCondition); + } catch (Exception e) { + RealCamera.LOGGER.warn("Compatibility with EntityModelFeatures is outdated: [{}] {}", e.getClass().getName(), e.getMessage()); + } } private static boolean SBW_gunsIsZooming() { @@ -115,4 +128,4 @@ public static void forceSetCameraPos(Camera camera) { public static boolean isModLoaded(String modId) { return platformHelper.isModLoaded(modId); } -} \ No newline at end of file +} diff --git a/common/src/main/java/com/xtracr/realcamera/compat/DisableHelper.java b/common/src/main/java/com/xtracr/realcamera/compat/DisableHelper.java index 558e6d49..1a4c17a4 100644 --- a/common/src/main/java/com/xtracr/realcamera/compat/DisableHelper.java +++ b/common/src/main/java/com/xtracr/realcamera/compat/DisableHelper.java @@ -27,9 +27,9 @@ public class DisableHelper { static { MAIN_FEATURE.registerOrInBinding(player -> ConfigFile.config().bindingDisableWhenSneaking() && player.isCrouching()); MAIN_FEATURE.registerOrInClassic(player -> ConfigFile.config().classicDisableWhenSneaking() && player.isCrouching()); - MAIN_FEATURE.registerOrInBinding(player -> ConfigFile.config().bindingDisableWhenSwimming() && checkCondition(player, player.isSwimming(), ConfigFile.config().getBindingOutTick())); - MAIN_FEATURE.registerOrInClassic(player -> ConfigFile.config().classicDisableWhenSwimming() && checkCondition(player, player.isSwimming(), ConfigFile.config().getClassicOutTick())); - MAIN_FEATURE.registerOrInBinding(player -> ConfigFile.config().bindingDisableWhenCrawling() && checkCondition(player, player.isVisuallyCrawling(), ConfigFile.config().getBindingOutTick())); + MAIN_FEATURE.registerOrInBinding(player -> ConfigFile.config().bindingDisableWhenSwimming() && checkCondition(player, player.isVisuallySwimming(), ConfigFile.config().getBindingExitTick())); + MAIN_FEATURE.registerOrInClassic(player -> ConfigFile.config().classicDisableWhenSwimming() && checkCondition(player, player.isVisuallySwimming(), ConfigFile.config().getClassicExitTick())); + MAIN_FEATURE.registerOrInBinding(player -> ConfigFile.config().bindingDisableWhenFlying() && player.isFallFlying()); MAIN_FEATURE.registerOrInBinding(player -> { Item mainHand = player.getMainHandItem().getItem(); Item offHand = player.getOffhandItem().getItem(); @@ -48,14 +48,14 @@ public class DisableHelper { }); } - private static boolean checkCondition(Player player, boolean condition, int outTick) { + private static boolean checkCondition(Player player, boolean condition, int exitDelay) { if (condition) { exitTick = player.tickCount; return true; } if (exitTick > 0) { int elapsedTicks = player.tickCount - exitTick; - if (elapsedTicks <= outTick) { + if (elapsedTicks <= exitDelay) { return true; } exitTick = 0; diff --git a/common/src/main/java/com/xtracr/realcamera/config/ConfigScreen.java b/common/src/main/java/com/xtracr/realcamera/config/ConfigScreen.java index f6399e09..084c1462 100644 --- a/common/src/main/java/com/xtracr/realcamera/config/ConfigScreen.java +++ b/common/src/main/java/com/xtracr/realcamera/config/ConfigScreen.java @@ -60,12 +60,12 @@ public static Screen create(Screen parent) { .setDefaultValue(false) .setSaveConsumer(b -> config.classic.disableWhenSwimming = b) .build()); - classic.addEntry(entryBuilder.startIntField(LocUtil.CONFIG_OPTION("outTick"), config.classic.outTick) + classic.addEntry(entryBuilder.startIntField(LocUtil.CONFIG_OPTION("exitTick"), config.classic.exitTick) .setDefaultValue(13) .setMin(0) .setMax(40) - .setTooltip(LocUtil.CONFIG_TOOLTIP("outTick")) - .setSaveConsumer(i -> config.classic.outTick = i) + .setTooltip(LocUtil.CONFIG_TOOLTIP("exitTick")) + .setSaveConsumer(i -> config.classic.exitTick = i) .build()); classic.addEntry(entryBuilder.startDoubleField(LocUtil.CONFIG_OPTION("scale"), config.classic.scale) .setDefaultValue(8.0) @@ -196,20 +196,20 @@ public static Screen create(Screen parent) { .setDefaultValue(false) .setSaveConsumer(b -> config.binding.disableWhenSneaking = b) .build()); - disableConfig.add(entryBuilder.startBooleanToggle(LocUtil.CONFIG_OPTION("disableWhenCrawling"), config.binding.disableWhenCrawling) - .setDefaultValue(false) - .setSaveConsumer(b -> config.binding.disableWhenCrawling = b) - .build()); disableConfig.add(entryBuilder.startBooleanToggle(LocUtil.CONFIG_OPTION("disableWhenSwimming"), config.binding.disableWhenSwimming) .setDefaultValue(false) .setSaveConsumer(b -> config.binding.disableWhenSwimming = b) .build()); - disableConfig.add(entryBuilder.startIntField(LocUtil.CONFIG_OPTION("outTick"), config.binding.outTick) + disableConfig.add(entryBuilder.startBooleanToggle(LocUtil.CONFIG_OPTION("disableWhenFlying"), config.binding.disableWhenFlying) + .setDefaultValue(false) + .setSaveConsumer(b -> config.binding.disableWhenFlying = b) + .build()); + disableConfig.add(entryBuilder.startIntField(LocUtil.CONFIG_OPTION("exitTick"), config.binding.exitTick) .setDefaultValue(13) .setMin(0) .setMax(40) - .setTooltip(LocUtil.CONFIG_TOOLTIP("outTick")) - .setSaveConsumer(i -> config.binding.outTick = i) + .setTooltip(LocUtil.CONFIG_TOOLTIP("exitTick")) + .setSaveConsumer(i -> config.binding.exitTick = i) .build()); disableConfig.add(entryBuilder.startStrList(LocUtil.CONFIG_OPTION("disableMainFeatureItems"), config.binding.disableMainFeatureItems) .setDefaultValue(List.of()) diff --git a/common/src/main/java/com/xtracr/realcamera/config/ModConfig.java b/common/src/main/java/com/xtracr/realcamera/config/ModConfig.java index 5d95a3f4..9c266555 100644 --- a/common/src/main/java/com/xtracr/realcamera/config/ModConfig.java +++ b/common/src/main/java/com/xtracr/realcamera/config/ModConfig.java @@ -122,13 +122,18 @@ public boolean classicDisableWhenSwimming() { return classic.disableWhenSwimming; } + public int getClassicExitTick() { + return classic.exitTick; + } + + @Deprecated public int getClassicOutTick() { - return classic.outTick; + return getClassicExitTick(); } @Deprecated public int getClassicSwimOutTick() { - return getClassicOutTick(); + return getClassicExitTick(); } public double getClassicX() { @@ -184,8 +189,9 @@ public boolean hideBindingFailureMessage() { return binding.hideFailureMessage; } + @Deprecated public boolean bindingDisableWhenCrawling() { - return binding.disableWhenCrawling; + return binding.disableWhenSwimming; } public boolean bindingDisableWhenSneaking() { @@ -196,13 +202,22 @@ public boolean bindingDisableWhenSwimming() { return binding.disableWhenSwimming; } + public boolean bindingDisableWhenFlying() { + return binding.disableWhenFlying; + } + + public int getBindingExitTick() { + return binding.exitTick; + } + + @Deprecated public int getBindingOutTick() { - return binding.outTick; + return getBindingExitTick(); } @Deprecated public int getBindingSwimOutTick() { - return getBindingOutTick(); + return getBindingExitTick(); } public int getBindResultRetentionFrames() { @@ -263,7 +278,9 @@ public static class Classic { public AdjustMode adjustMode = AdjustMode.CAMERA; public boolean disableWhenSneaking = false; public boolean disableWhenSwimming = false; - public int outTick = 13; + public int exitTick = 13; + @Deprecated + public Integer outTick = null; @Deprecated public Integer swimOutTick = null; public double scale = 8.0; @@ -279,11 +296,13 @@ public static class Classic { private void clamp() { if (adjustMode == null) adjustMode = AdjustMode.CAMERA; - if (swimOutTick != null) { - if (outTick == 13) outTick = swimOutTick; - swimOutTick = null; + if (exitTick == 13) { + if (outTick != null) exitTick = outTick; + else if (swimOutTick != null) exitTick = swimOutTick; } - outTick = Mth.clamp(outTick, 0, 40); + outTick = null; + swimOutTick = null; + exitTick = Mth.clamp(exitTick, 0, 40); scale = Mth.clamp(scale, 0.0, 64.0); cameraX = Mth.clamp(cameraX, MIN_OFFSET_D, MAX_OFFSET_D); cameraY = Mth.clamp(cameraY, MIN_OFFSET_D, MAX_OFFSET_D); @@ -316,10 +335,14 @@ public static class Binding { public boolean adjustOffset = true; public boolean hideFailureMessage = false; public boolean renderStuckObjects = true; - public boolean disableWhenCrawling = false; + @Deprecated + public Boolean disableWhenCrawling = null; public boolean disableWhenSneaking = false; public boolean disableWhenSwimming = false; - public int outTick = 13; + public boolean disableWhenFlying = false; + public int exitTick = 13; + @Deprecated + public Integer outTick = null; @Deprecated public Integer swimOutTick = null; public int bindResultRetentionFrames = 2; @@ -337,15 +360,21 @@ private void clamp() { } catch (Exception e) { screenModifierKey = InputConstants.Type.KEYSYM.getOrCreate(InputConstants.KEY_LALT).getName(); } - if (swimOutTick != null) { - if (outTick == 13) outTick = swimOutTick; - swimOutTick = null; + if (exitTick == 13) { + if (outTick != null) exitTick = outTick; + else if (swimOutTick != null) exitTick = swimOutTick; + } + outTick = null; + swimOutTick = null; + if (disableWhenCrawling != null) { + disableWhenSwimming |= disableWhenCrawling; + disableWhenCrawling = null; } if (legacyBindingMode != null) { legacyMode = legacyBindingMode; legacyBindingMode = null; } - outTick = Mth.clamp(outTick, 0, 40); + exitTick = Mth.clamp(exitTick, 0, 40); bindResultRetentionFrames = Math.max(bindResultRetentionFrames, 0); activeConfigIndex = Math.max(activeConfigIndex, 0); displacementSmoothFactor = Mth.clamp(displacementSmoothFactor, 0.0, 1.0); diff --git a/common/src/main/java/com/xtracr/realcamera/gui/ModelViewScreen.java b/common/src/main/java/com/xtracr/realcamera/gui/ModelViewScreen.java index 63bd7eaf..639bec1a 100644 --- a/common/src/main/java/com/xtracr/realcamera/gui/ModelViewScreen.java +++ b/common/src/main/java/com/xtracr/realcamera/gui/ModelViewScreen.java @@ -284,6 +284,7 @@ else if (index > 0 && index <= rectWidgets.size()) { BindTarget bindTarget = genBindTarget(); ConfigFile.config().putBindTarget(bindTarget); ConfigFile.save(); + if (toggleCategoryButton.getValue() != Category.DISABLE) loadBindTarget(bindTarget); initWidgets(page); })); rows.addChild(priorityField = NumberField.ofInt(font, widgetWidth - 2, widgetHeight - 2, 0, priorityField), smallSettings).setTooltip(createTooltip("priority")); @@ -561,7 +562,9 @@ protected void renderModelViewArea(GuiGraphics graphics, LivingEntity entity) { float entityPitch = entity.getXRot(); float entityPrevHeadYaw = entity.yHeadRotO; float entityHeadYaw = entity.yHeadRot; + boolean wasRenderingInScreen = CompatibilityHelper.isRenderInScreen; try { + CompatibilityHelper.isRenderInScreen = true; entity.yBodyRot = 180.0f; entity.setYRot(180.0f + (float) entityYawSlider.getNumber()); entity.setXRot((float) entityPitchSlider.getNumber()); @@ -570,6 +573,7 @@ protected void renderModelViewArea(GuiGraphics graphics, LivingEntity entity) { Vector3f offset = new Vector3f((float) modelX, (float) modelY, 0); renderEntityWithAnalyser(graphics, x1, y1, x2, y2, modelScale, offset, quaternionf, entity); } finally { + CompatibilityHelper.isRenderInScreen = wasRenderingInScreen; entity.yBodyRot = entityBodyYaw; entity.setYRot(entityYaw); entity.setXRot(entityPitch); @@ -653,6 +657,13 @@ protected void loadBindTarget(BindTarget target) { protected BindTarget genBindTarget() { initOffsetPairs(); + DisableConfig currentDisableConfig = new DisableConfig(disabledNameField.getValue(), disabledIdField.getValue(), disableModeButton.getValue() == 0, rectWidgets.stream().map(UVRectangleWidget::toUVRectangle).toList()); + List newDisableConfigs = new ArrayList<>(disableConfigs); + for (int i = 0; i < newDisableConfigs.size(); i++) { + if (newDisableConfigs.get(i).name().equals(currentDisableConfig.name())) { + newDisableConfigs.set(i, currentDisableConfig); + } + } TargetConfig targetConfig = new TargetConfig( forwardUField.getNumber(), forwardVField.getNumber(), upwardUField.getNumber(), upwardVField.getNumber(), posUField.getNumber(), posVField.getNumber()); BindConfig bindConfig = new BindConfig( bindXButton.getValue() == 0, bindYButton.getValue() == 0, bindZButton.getValue() == 0, bindRotButton.getValue() == 0); OffsetConfig offsets = new OffsetConfig() @@ -663,7 +674,7 @@ protected BindTarget genBindTarget() { .setPitch(offsetPitchPair.getNumber()) .setYaw(offsetYawPair.getNumber()) .setRoll(offsetRollPair.getNumber()); - return new BindTarget(nameField.getValue(), textureIdField.getValue(), priorityField.getNumber(), depthField.getNumber(), targetConfig, bindConfig, offsets, new ArrayList<>(disableConfigs)); + return new BindTarget(nameField.getValue(), textureIdField.getValue(), priorityField.getNumber(), depthField.getNumber(), targetConfig, bindConfig, offsets, newDisableConfigs); } private void clearDisableDraft() { diff --git a/common/src/main/resources/assets/realcamera/lang/en_us.json b/common/src/main/resources/assets/realcamera/lang/en_us.json index 6742f95a..6d0a36a9 100644 --- a/common/src/main/resources/assets/realcamera/lang/en_us.json +++ b/common/src/main/resources/assets/realcamera/lang/en_us.json @@ -14,17 +14,17 @@ "config.option.xtracr_realcamera.classicAdjustMode": "Adjust Mode", "config.option.xtracr_realcamera.disableConfig": "Disable Config", "config.option.xtracr_realcamera.disableMainFeatureItems": "Disable main feature when holding", - "config.option.xtracr_realcamera.disableRenderItems": "Disable rendering when holding", - "config.option.xtracr_realcamera.disableWhenCrawling": "Disable main feature when crawling", + "config.option.xtracr_realcamera.disableRenderItems": "Disable body rendering when holding", "config.option.xtracr_realcamera.disableWhenSneaking": "Disable main feature when sneaking", - "config.option.xtracr_realcamera.disableWhenSwimming": "Disable main feature when swimming", + "config.option.xtracr_realcamera.disableWhenSwimming": "Disable main feature when swimming (crawling)", + "config.option.xtracr_realcamera.disableWhenFlying": "Disable main feature when flying", "config.option.xtracr_realcamera.displacementSmoothFactor": "Displacement Smooth Factor", "config.option.xtracr_realcamera.dynamicCrosshair": "Dynamic Crosshair", "config.option.xtracr_realcamera.enabled": "Mod Enabled", "config.option.xtracr_realcamera.hideBindingFailureMessage": "Hide Binding Failure Message", "config.option.xtracr_realcamera.isClassic": "Classic Mode", "config.option.xtracr_realcamera.legacyBindingMode": "Legacy Binding Mode", - "config.option.xtracr_realcamera.outTick": "Restriction exit delay (in ticks)", + "config.option.xtracr_realcamera.exitTick": "Restriction exit delay (in ticks)", "config.option.xtracr_realcamera.pitch": "Pitch", "config.option.xtracr_realcamera.renderModel": "Render Player Model", "config.option.xtracr_realcamera.renderStuckObjects": "Render Stuck Objects", @@ -50,7 +50,7 @@ "config.tooltip.xtracr_realcamera.dynamicCrosshair": "When enabled, the crosshair will follow the player's view, ensuring consistent hit result\nRecommended to enable when Jade, WTHIT or similar mods are installed", "config.tooltip.xtracr_realcamera.isClassic": "Classic mode only makes simple changes to the position and rotation of camera", "config.tooltip.xtracr_realcamera.legacyBindingMode": "Using the binding mode of legacy version (v0.5), only vanilla model and actions based on vanilla model are supported\nIts properties can be set in 'LEGACY_MODE' of the %s screen when enabled", - "config.tooltip.xtracr_realcamera.outTick": "The time before re-enabling main feature after exiting restricted states (e.g., swimming, crawling) (1 tick = 0.05s)", + "config.tooltip.xtracr_realcamera.exitTick": "The time before re-enabling main feature after exiting restricted states (e.g., swimming, crawling) (1 tick = 0.05s)", "config.tooltip.xtracr_realcamera.renderModel": "Render player model in first-person perspective", "config.tooltip.xtracr_realcamera.renderStuckObjects": "Arrows, bee stings and other objects that can be stuck in the player's body", "config.tooltip.xtracr_realcamera.rerenderModel": "Render the model again at the original rendering time to avoid some visual problems caused by rendering early", @@ -61,12 +61,12 @@ "key.xtracr_realcamera.activeConfigIndexNEXT": "Switch to next configuration", "key.xtracr_realcamera.activeConfigIndexPREV": "Switch to previous configuration", "key.xtracr_realcamera.activeConfigIndexRESET": "Reset configuration index", - "key.xtracr_realcamera.adjustBACK": "Adjust BACK", - "key.xtracr_realcamera.adjustDOWN": "Adjust DOWN", - "key.xtracr_realcamera.adjustFRONT": "Adjust FRONT", - "key.xtracr_realcamera.adjustLEFT": "Adjust LEFT", - "key.xtracr_realcamera.adjustRIGHT": "Adjust RIGHT", - "key.xtracr_realcamera.adjustUP": "Adjust UP", + "key.xtracr_realcamera.adjustUP": "Adjust UP (Rotate Up)", + "key.xtracr_realcamera.adjustDOWN": "Adjust DOWN (Rotate Down)", + "key.xtracr_realcamera.adjustLEFT": "Adjust LEFT (Rotate Left)", + "key.xtracr_realcamera.adjustRIGHT": "Adjust RIGHT (Rotate Right)", + "key.xtracr_realcamera.adjustFRONT": "Adjust FRONT (Roll Right)", + "key.xtracr_realcamera.adjustBACK": "Adjust BACK (Roll Left)", "key.xtracr_realcamera.modelViewScreen": "Open Model View Screen", "key.xtracr_realcamera.toggleAdjustMode": "Toggle Adjust Mode", "key.xtracr_realcamera.toggleCameraMode": "Toggle Camera Mode", diff --git a/common/src/main/resources/assets/realcamera/lang/zh_cn.json b/common/src/main/resources/assets/realcamera/lang/zh_cn.json index 61b86c8a..9fedb07c 100644 --- a/common/src/main/resources/assets/realcamera/lang/zh_cn.json +++ b/common/src/main/resources/assets/realcamera/lang/zh_cn.json @@ -14,17 +14,17 @@ "config.option.xtracr_realcamera.classicAdjustMode": "调整模式", "config.option.xtracr_realcamera.disableConfig": "禁用配置", "config.option.xtracr_realcamera.disableMainFeatureItems": "在手持...时禁用主要功能", - "config.option.xtracr_realcamera.disableRenderItems": "在手持...时禁用渲染", - "config.option.xtracr_realcamera.disableWhenCrawling": "爬行时禁用主要功能", + "config.option.xtracr_realcamera.disableRenderItems": "在手持...时禁用身体渲染", "config.option.xtracr_realcamera.disableWhenSneaking": "潜行时禁用主要功能", - "config.option.xtracr_realcamera.disableWhenSwimming": "游泳时禁用主要功能", + "config.option.xtracr_realcamera.disableWhenSwimming": "游泳(爬行)时禁用主要功能", + "config.option.xtracr_realcamera.disableWhenFlying": "飞行时禁用主要功能", "config.option.xtracr_realcamera.displacementSmoothFactor": "位移平滑系数", "config.option.xtracr_realcamera.dynamicCrosshair": "动态十字准心", "config.option.xtracr_realcamera.enabled": "开启功能", "config.option.xtracr_realcamera.hideBindingFailureMessage": "隐藏绑定失败消息", "config.option.xtracr_realcamera.isClassic": "经典模式", "config.option.xtracr_realcamera.legacyBindingMode": "旧绑定模式", - "config.option.xtracr_realcamera.outTick": "禁用状态退出延迟(单位:tick)", + "config.option.xtracr_realcamera.exitTick": "禁用状态退出延迟(单位:tick)", "config.option.xtracr_realcamera.pitch": "俯仰角", "config.option.xtracr_realcamera.renderModel": "渲染玩家模型", "config.option.xtracr_realcamera.renderStuckObjects": "渲染卡在身上的物体", @@ -50,7 +50,7 @@ "config.tooltip.xtracr_realcamera.dynamicCrosshair": "在开启状态下,十字准心会随着玩家的视线移动,确保命中结果不受影响\n在安装了Jade、WTHIT或类似模组时建议启用", "config.tooltip.xtracr_realcamera.isClassic": "经典模式只对摄像头的位置和旋转做简单的修改", "config.tooltip.xtracr_realcamera.legacyBindingMode": "使用旧版本(v0.5)的绑定模式,仅支持原版模型和基于原版模型的动作\n开启后可在%s界面的'LEGACY_MODE'中设置属性", - "config.tooltip.xtracr_realcamera.outTick": "玩家停止某些状态(如游泳、爬行)后重启主要功能的时间(1 tick = 0.05s)", + "config.tooltip.xtracr_realcamera.exitTick": "玩家停止某些状态(如游泳、爬行)后重启主要功能的时间(1 tick = 0.05s)", "config.tooltip.xtracr_realcamera.renderModel": "在第一人称视角下渲染玩家模型", "config.tooltip.xtracr_realcamera.renderStuckObjects": "箭,蜂刺和其它会卡在玩家身体里的物体", "config.tooltip.xtracr_realcamera.rerenderModel": "在原本的渲染时机重新渲染模型,以避免一些因提前渲染导致的视觉问题", @@ -61,12 +61,12 @@ "key.xtracr_realcamera.activeConfigIndexNEXT": "切换到下一个配置", "key.xtracr_realcamera.activeConfigIndexPREV": "切换到上一个配置", "key.xtracr_realcamera.activeConfigIndexRESET": "重置配置索引", - "key.xtracr_realcamera.adjustBACK": "向后调整", - "key.xtracr_realcamera.adjustDOWN": "向下调整", - "key.xtracr_realcamera.adjustFRONT": "向前调整", - "key.xtracr_realcamera.adjustLEFT": "向左调整", - "key.xtracr_realcamera.adjustRIGHT": "向右调整", - "key.xtracr_realcamera.adjustUP": "向上调整", + "key.xtracr_realcamera.adjustUP": "向上调整(向上旋转)", + "key.xtracr_realcamera.adjustDOWN": "向下调整(向下旋转)", + "key.xtracr_realcamera.adjustLEFT": "向左调整(向左旋转)", + "key.xtracr_realcamera.adjustRIGHT": "向右调整(向右旋转)", + "key.xtracr_realcamera.adjustFRONT": "向前调整(向右滚转)", + "key.xtracr_realcamera.adjustBACK": "向后调整(向左滚转)", "key.xtracr_realcamera.modelViewScreen": "打开模型视图界面", "key.xtracr_realcamera.toggleAdjustMode": "切换调整模式", "key.xtracr_realcamera.toggleCameraMode": "切换摄像头模式", diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index afaad967..22ef30a4 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -15,6 +15,7 @@ "license": "MIT license", "icon": "assets/realcamera/icon.png", "environment": "client", + "accessWidener": "realcamera.accesswidener", "entrypoints": { "client": [ "com.xtracr.realcamera.RealCameraFabric" diff --git a/gradle.properties b/gradle.properties index a98c0b66..58a11095 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ forge_version=1.20.1-47.3.1 fabric_loader_version=0.15.10 #yarn_mappings=1.20.1+build.10 # Mod Properties -mod_version=0.7.8-beta +mod_version=0.7.9-beta maven_group=com.xtracr.realcamera archives_base_name=realcamera # Dependencies