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`.
- * 
+ * 
* 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).
- * 
+ * 
* 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)
- * 
+* 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)
+ * 
## 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
- 
+ * Increasing this value may help, or use `Disable` section
+ 
* 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+)
* 理论上支持大多数模组模型,但需要手动进行配置:
* 首先设置`打开模型视图界面`的按键绑定
- * 
+ * 
* 打开模型视图界面,左Alt+左键选择模型的对应的面,左Alt+滚轮可以在模型的不同层间切换
* 通过点击左侧的`选择`按钮,在三者间切换,选好`向前矢量`、`向上矢量`和`目标平面`
* 从右上角的按钮进入`预览`界面,在这里可以看到摄像头与模型的相对关系,并进行一定的调整(也可以通过按键绑定调整)
- * 
+ * 
* 输入名称并保存
+* ~~如果实在不会配置,也可以将`模组设置 > 绑定模式 > 旧绑定模式`打开
+ 注意:该设置仅限原版~~
#### Tips
* 可以更改配置的优先级,优先级越高的配置,在右侧排序越靠上
+* 在模组设置中,你可以通过修改配置索引来主动切换允许的配置,也可以调整到非0的数来锁定配置
+* 当开启主功能时,将鼠标放到配置上方,其中有注释`当前配置`的即为此时使用的配置
* 在`预览`界面可以更改禁用深度来禁用眼前的模型的渲染
-* 关于`禁用`界面(当前版本尚不完善,操作较为繁琐):
- * 在左侧材质id输入框为空时,可以使用Alt+左键选择材质
- * 被蓝框包含的部分不会被渲染。
- * 在左侧材质视图中鼠标左键框选,其它键取消选择
- * Alt+左键可快速选中被鼠标指针指向的部分
- * `全部`模式下,整个材质所对应的模型都不会被渲染(左侧会有一个包含整个材质的蓝框来表示这一点)
- * 
+* 关于`禁用`界面:
+ * 在左侧材质id输入框为空时,使用「Alt+左键」选择材质
+ * 选择模式:
+ * 单选、多选:按下「Alt+左键」以选择需要禁用的面
+ * 范围:按下「Alt+左键」以确定被选择区域,使用「Alt+滚轮」以更改被选择区域的大小
+ * 在玩家渲染左侧材质视图中:
+ * 按下「鼠标左键」开始/结束框选,其它键取消选择
+ * 被框选中的面效果与多选禁用的面效果相同
+ * 值得一提的是,使用这种方式被禁用面,通常比使用其他方法更加节省性能
+ * 禁用模式:
+ * `部分`模式下,被选择的面不会渲染(可以通过关闭右侧禁用配置的可见性来预览)
+ * `全部`模式下,整个材质所对应的模型都不会渲染(会有一个包含整个材质的蓝框来表示这一点)
+ * 
## 依赖项目
* 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)
## 常见问题
* 模型的一部分(如头发)始终挡在面前,怎样隐藏它?
- * 增加这个值或许有所帮助,或者使用`禁用`功能
- 
+ * 增加这个值或许有所帮助,或者使用`禁用`功能
+ 
* 按什么键打开模组视图界面?
- * 在按键绑定里自己设置
+ * 在按键绑定里自己设置
* 为什么打不开配置界面(模组设置)?
- * 没有安装[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