diff --git a/mcguide/10-新内容/1-开发工作台/933-1.1.44.md b/mcguide/10-新内容/1-开发工作台/933-1.1.44.md
new file mode 100644
index 0000000..7a24788
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/933-1.1.44.md
@@ -0,0 +1,34 @@
+---
+front: https://nie.res.netease.com/r/pic/20250709/095c3bb4-eb58-4444-811f-76be2b94eedf.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.7.08 版本1.1.44
+
+## 地图编辑器
+
+替换和填充界面增加方块收藏功能
+
+- 点击所有方块列表中的方块后,会出现收藏按钮,点击按钮即可将方块放入收藏列表
+
+
+
+- 点击在收藏方块列表中的方块后,会出现取消收藏按钮,点击按钮即可将方块移出收藏列表
+
+
+
+## 配置编辑器
+
+- 对新建文件中"生成规则"描述文字优化为"实体生成规则",避免和特征规则造成混淆
+
+## 问题修复
+
+- 修复多结构生成规则字段"is multi sub editor"检测会删除文件问题
+
+- 修复原版模型转fbx工具0帧处理问题
+
+- 修复文本输入框控件调整输入文本颜色属性后,再改属性在编辑器内消失问题
+
+- 修复地图编辑器替换、填充弹出界面位置UI会遮挡的问题
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/934-1.1.43.md b/mcguide/10-新内容/1-开发工作台/934-1.1.43.md
new file mode 100644
index 0000000..105221d
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/934-1.1.43.md
@@ -0,0 +1,34 @@
+---
+front: https://nie.res.netease.com/r/pic/20250625/93d00c93-a3de-43e2-86d2-8128f8c467aa.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.6.25 版本1.1.43
+
+## 编辑器
+
+### 编辑器升级3.4
+
+新增支持1.21.0的新物品、方块、实体等
+
+### 贴图压缩工具
+
+工具箱新增资源包贴图压缩工具,可根据JSON配置自动压缩资源包贴图并生成报告,帮助开发者减少包体体积
+
+详细使用链接请前往官方Github仓库[https://github.com/MCNeteaseDevs/Image-AutoCompress](https://github.com/MCNeteaseDevs/Image-AutoCompress)
+
+
+
+### Java版组件-本地导入-适用版本,新增支持Java1.21
+
+
+
+## 配置编辑器
+
+- 新建页签优化
+
+现在新建配置会根据当前所在页面打开对应的配置选择界面。如在**界面编辑器界面**,新建文件向导会默认**选择界面选项**(见下图)
+
+
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/935-1.1.42.md b/mcguide/10-新内容/1-开发工作台/935-1.1.42.md
new file mode 100644
index 0000000..562112c
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/935-1.1.42.md
@@ -0,0 +1,26 @@
+---
+front: https://nie.res.netease.com/r/pic/20250609/61c838c0-4e9e-49a0-8555-403f760039ad.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.6.10 版本1.1.42
+
+## 编辑器
+
+- 组件名称发布适配特殊字符
+
+现在支持特殊字符的作品名,并一键发布到开发者内容管理平台
+
+
+
+## 地图编辑器
+
+- **按住Ctrl键**点击可以多选所需要替换/填充的方块行,再次点击右侧方块即可全部**预选**该方块进行替换/填充
+
+
+
+## 问题修复
+
+- 修复界面编辑器使用原版贴图会复制问题
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/936-1.1.41.md b/mcguide/10-新内容/1-开发工作台/936-1.1.41.md
new file mode 100644
index 0000000..10dd761
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/936-1.1.41.md
@@ -0,0 +1,22 @@
+---
+front: https://nie.res.netease.com/r/pic/20250528/cb9ff22d-2b87-4c3a-9114-4f2e947d9f1e.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.5.27 版本1.1.41
+
+## 编辑器
+
+- 版本升级优化
+
+点击版本升级后,也会升级modules字段的version
+
+
+
+
+
+## 问题修复
+
+- 修复方块易测获取测试端游戏进程失败问题
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/937-1.1.40.md b/mcguide/10-新内容/1-开发工作台/937-1.1.40.md
new file mode 100644
index 0000000..d5c8de3
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/937-1.1.40.md
@@ -0,0 +1,38 @@
+---
+front: https://nie.res.netease.com/r/pic/20250513/d83d9999-e1e2-4f29-870d-a50582e47cfc.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.5.13 版本1.1.40
+
+## 配置编辑器
+
+- 新增自定义锻造转换配方选项
+
+## 界面编辑器
+
+- 界面编辑器生成控件键值对源码排序,方便开发者进行阅读
+
+排序规则如下
+```bash
+控件类:type、renderer
+变量(按字母顺序):$变量1: xxx
+变量初始化:variables
+尺寸和位置相关:offset、size等
+可见性和状态视觉相关:layer、alpha等
+动画相关: anims、animation_reset_name等
+数据绑定相关:modifications、property_bag、bindings
+最后为controls
+```
+
+## UI调试工具
+
+- UI调试工具仅顶部分割线才可拖动 变为 右侧分割线均可拖动
+
+## 问题修复
+
+- 方块易测连接失败问题修复
+
+- 修复贴图资源复制问题
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/938-1.1.39.md b/mcguide/10-新内容/1-开发工作台/938-1.1.39.md
new file mode 100644
index 0000000..df14b6d
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/938-1.1.39.md
@@ -0,0 +1,26 @@
+---
+front: https://nie.res.netease.com/r/pic/20250422/45cbbcc5-1c8e-43de-b011-cf822f273031.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.4.22 版本1.1.39
+
+## 启动器
+
+- 性能诊断工具优化,优化采集服务的CPU消耗、优化获取进程列表的效率等
+- 组件编辑界面优化,编辑界面排布与配置界面一致
+- 日志与调试工具,保存窗口位置和大小以及字号大小为配置,下次打开工具使用保存配置
+
+## 编辑器
+
+- 自定义指令支持参数变体配置
+
+
+
+- 支持批量导入原版方块模型,点击导入-原版方块模型后打开模型所在文件夹,可以选择多个文件导入
+
+## 问题修复
+
+- 编辑功能对橡木方块进行旋转操作后变为白桦木方块
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/939-1.1.33.md b/mcguide/10-新内容/1-开发工作台/939-1.1.33.md
new file mode 100644
index 0000000..8c6498a
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/939-1.1.33.md
@@ -0,0 +1,22 @@
+---
+front: https://nie.res.netease.com/r/pic/20250310/dd8f038a-fd2a-497f-861a-5b36dd238bf0.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.3.11 版本1.1.33
+
+## 启动器
+
+新增性能诊断模块,具体教程见[性能监测与调试工具](../../30-测试/5-性能监测与调试工具.md)。
+
+## 编辑器
+
+自定义配方支持锻造转换配方。
+
+## 问题修复
+
+- 修复地图附带mod在第二次开发测试后无法热重载
+- 修复山羊实体配置模板为空问题
+- Java版作品测试支持1.19.2
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/940-1.1.31.md b/mcguide/10-新内容/1-开发工作台/940-1.1.31.md
new file mode 100644
index 0000000..e4aabe4
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/940-1.1.31.md
@@ -0,0 +1,37 @@
+---
+front: https://nie.res.netease.com/r/pic/20250220/984b86ef-d9a4-4cb4-bf3b-c89d86a96b7c.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.2.20 版本1.1.31
+
+## 启动器
+
+组件导入功能优化,支持选择文件类型。
+
+
+
+## 界面编辑器
+
+界面编辑器支持预览新触控界面。
+
+
+
+界面编辑器补充字段。
+
+- 文本控件:补充锁定颜色、锁定透明度、隐藏连字符、启用本地化
+- 图片控件:补充平铺类型、平铺缩放比例、双线性缩放
+- 按钮控件:补充按钮声音、声音音量、声音音调
+
+## 配置编辑器
+
+- 自定义配方:支持配方解锁配置
+- 自定义盔甲:补充盔甲韧性、击退抗性配置
+- 掉落表:支持战利品表配置和空配置
+
+## 问题修复
+
+- 修复打开含雕纹书架的结构体后编辑器崩溃
+- 修复netease:weapon、netease:render_layer部分字段与实际配置不符
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/941-1.1.30.md b/mcguide/10-新内容/1-开发工作台/941-1.1.30.md
new file mode 100644
index 0000000..997683b
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/941-1.1.30.md
@@ -0,0 +1,33 @@
+---
+front: https://nie.res.netease.com/r/pic/20250122/8dfbddfe-aa1f-4d82-a802-68fcdac73c78.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.1.23 版本1.1.30
+
+## 启动器
+
+新建作品时支持配置命名空间。
+
+
+
+## 编辑器
+
+自定义物品新增自定义盾牌模板和相关属性。
+
+
+
+编辑器属性面板排版优化,部分控件支持自适应宽度,分割线改为白色,并支持更大范围拖动。
+
+
+
+## 其他
+
+- 修复地形功能放置结构池属性点击无反应
+- 修复编辑器内的村庄结构无法正常生成
+- 修复fbx/obj导入地图编辑器后方块颜色错误
+- 修复放置带有箱子的结构体时内嵌游戏崩溃
+- 修复配方配置的结果选择自定义物品后属性栏不显示
+- 修复物品选择器部分物品贴图错误问题
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/942-1.1.29.md b/mcguide/10-新内容/1-开发工作台/942-1.1.29.md
new file mode 100644
index 0000000..3e2b048
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/942-1.1.29.md
@@ -0,0 +1,35 @@
+---
+front: https://nie.res.netease.com/r/pic/20250108/9c1b2703-8a0d-4126-9ffd-3c55e17e0a9a.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2025.1.9 版本1.1.29
+
+## 编辑器
+
+新增自定义指令配置,开发者可以更方便地为作品添加自定义指令。
+
+
+
+支持新版物品和方块注册逻辑,不仅支持配置两种新的获取方式,并且能够指定自定义分页。
+
+
+
+编辑器目录生成优化,减少了大量不必要的文件夹和文件。
+
+
+
+## 启动器
+
+配置界面重新排布,现在右侧搜索框更大更容易操作。
+
+
+
+## 其他
+
+- 修复界面编辑器快速切换自定义控件导致Json数据丢失问题
+- 修复导出功能会删除二级目录同名非空文件夹的问题
+- 云端列表增加对无主包的demo模组标记
+- 编辑器升级基岩版1.20.50和Java版1.20.6
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/943-1.1.28.md b/mcguide/10-新内容/1-开发工作台/943-1.1.28.md
new file mode 100644
index 0000000..3fab260
--- /dev/null
+++ b/mcguide/10-新内容/1-开发工作台/943-1.1.28.md
@@ -0,0 +1,58 @@
+---
+front: https://nie.res.netease.com/r/pic/20241219/5a620c8c-c7c7-4d80-8f36-137e1edc2db2.jpg
+hard: 入门
+time: 2分钟
+selection: 23
+---
+
+# 2024.12.19 版本1.1.28
+
+## 导出功能
+
+作品导出的zip中会移除无用的空文件夹和文件。
+
+导出前:
+
+
+
+导出后:
+
+
+
+## 界面编辑器
+
+- 缩进调整为4个空格
+- 保留键值对顺序,新键插入末尾
+- 移除无用文件和键值对
+
+```json
+在生成image控件时,不生成:
+"clip_direction": "left",
+"clip_ratio": 0.0,
+"controls": [],
+```
+- 不再生成netease_editor_template_namespace.json
+- 浮点数生成优化
+
+```json
+原本:"color": [0.2352941176470588, 0.3176470588235294, 0.9764705882352941],
+修改后:"color": [0.2353, 0.3176, 0.9765],
+
+原本:"offset": [20.0, 0.0],
+修改后:"offset": [20, 0],
+
+原本:"font_scale_factor": 2.000000000000001,
+修改后:"font_scale_factor": 2,
+```
+
+## 测试配置
+
+开发测试的配置界面支持搜索作品,方便测试同时加载多个作品的情况。
+
+
+
+## 新建作品
+
+新建空白地图和空白附加包支持仅创建。
+
+
\ No newline at end of file
diff --git a/mcguide/10-新内容/1-开发工作台/images/241219/1.png b/mcguide/10-新内容/1-开发工作台/images/241219/1.png
new file mode 100644
index 0000000..8070dcb
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/241219/1.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/241219/2.png b/mcguide/10-新内容/1-开发工作台/images/241219/2.png
new file mode 100644
index 0000000..72e6a22
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/241219/2.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/241219/3.png b/mcguide/10-新内容/1-开发工作台/images/241219/3.png
new file mode 100644
index 0000000..3aec4e8
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/241219/3.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/241219/4.png b/mcguide/10-新内容/1-开发工作台/images/241219/4.png
new file mode 100644
index 0000000..ba17c20
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/241219/4.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250109/1.png b/mcguide/10-新内容/1-开发工作台/images/250109/1.png
new file mode 100644
index 0000000..a1e2009
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250109/1.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250109/2.png b/mcguide/10-新内容/1-开发工作台/images/250109/2.png
new file mode 100644
index 0000000..c162a36
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250109/2.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250109/3.png b/mcguide/10-新内容/1-开发工作台/images/250109/3.png
new file mode 100644
index 0000000..a8c624e
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250109/3.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250109/4.png b/mcguide/10-新内容/1-开发工作台/images/250109/4.png
new file mode 100644
index 0000000..ec346f3
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250109/4.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250123/1.png b/mcguide/10-新内容/1-开发工作台/images/250123/1.png
new file mode 100644
index 0000000..62a00db
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250123/1.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250123/2.png b/mcguide/10-新内容/1-开发工作台/images/250123/2.png
new file mode 100644
index 0000000..e297660
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250123/2.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250123/3.png b/mcguide/10-新内容/1-开发工作台/images/250123/3.png
new file mode 100644
index 0000000..ddd6331
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250123/3.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250220/1.png b/mcguide/10-新内容/1-开发工作台/images/250220/1.png
new file mode 100644
index 0000000..a48351f
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250220/1.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250220/2.png b/mcguide/10-新内容/1-开发工作台/images/250220/2.png
new file mode 100644
index 0000000..c119c32
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250220/2.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250422/0_0.png b/mcguide/10-新内容/1-开发工作台/images/250422/0_0.png
new file mode 100644
index 0000000..9bc8eb4
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250422/0_0.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250527/0_0.png b/mcguide/10-新内容/1-开发工作台/images/250527/0_0.png
new file mode 100644
index 0000000..ced42a6
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250527/0_0.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250527/0_1.png b/mcguide/10-新内容/1-开发工作台/images/250527/0_1.png
new file mode 100644
index 0000000..e02ab8d
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250527/0_1.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250610/0_0.png b/mcguide/10-新内容/1-开发工作台/images/250610/0_0.png
new file mode 100644
index 0000000..d1f543d
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250610/0_0.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250610/0_1.png b/mcguide/10-新内容/1-开发工作台/images/250610/0_1.png
new file mode 100644
index 0000000..e86be52
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250610/0_1.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250625/0_0.png b/mcguide/10-新内容/1-开发工作台/images/250625/0_0.png
new file mode 100644
index 0000000..85b503f
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250625/0_0.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250625/0_1.png b/mcguide/10-新内容/1-开发工作台/images/250625/0_1.png
new file mode 100644
index 0000000..0e9ae73
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250625/0_1.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250625/0_2.png b/mcguide/10-新内容/1-开发工作台/images/250625/0_2.png
new file mode 100644
index 0000000..d981eee
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250625/0_2.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250708/0_0.png b/mcguide/10-新内容/1-开发工作台/images/250708/0_0.png
new file mode 100644
index 0000000..8bfd8f7
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250708/0_0.png differ
diff --git a/mcguide/10-新内容/1-开发工作台/images/250708/0_1.png b/mcguide/10-新内容/1-开发工作台/images/250708/0_1.png
new file mode 100644
index 0000000..3b7399f
Binary files /dev/null and b/mcguide/10-新内容/1-开发工作台/images/250708/0_1.png differ
diff --git a/mcguide/16-美术/6-模型和动作/12-动作优化规范.md b/mcguide/16-美术/6-模型和动作/12-动作优化规范.md
new file mode 100644
index 0000000..3636f2e
--- /dev/null
+++ b/mcguide/16-美术/6-模型和动作/12-动作优化规范.md
@@ -0,0 +1,143 @@
+---
+front: 进阶
+time: 15分钟
+---[2-地图编辑器使用说明.md](../../14-%E5%9C%B0%E5%9B%BE%E5%88%B6%E4%BD%9C/2-%E5%9C%B0%E5%9B%BE%E7%BC%96%E8%BE%91%E5%99%A8%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md)
+
+# 模型规范指南
+## 前言
+在当前模组开发实践中,部分开发者所采用的 Blockbench.
+
+模型与官方标准模型存在差异,因此换了BlockBench模型的Mod,会导致官方皮肤时出现贴图错位、模型消失等兼容性问题,影响了玩家的视觉体验.
+因此,我们现已开放官方模型规范,开发者们请参考并遵循。新作品通过规范指南进行UV、动画等的制作,已有作品则可以通过API判断是否需要修改Blockbench
+模型,确保模组能够与官方皮肤良好配合,为玩家带来更加一致、流畅的游戏体验。
+
+## 兼容分类
+
+根据模组与官方皮肤的兼容程度,分为:
+1. **完全兼容**:未更换bb模型。表现为:皮肤模型贴图,以及穿戴外观,模组动画等表现都正常。
+2. **部分兼容**:更换了bb模型,但按照官方规范制作。表现为:皮肤挂件以及穿戴外观正常,但是模型样式改变及贴图错乱。
+3. **不兼容**:更换了bb模型,且未按照官方规范制作。表现为:模型样式改变,皮肤挂件错乱,穿戴外观错乱,以及动作异常。
+
+## 规范概要
+
+1. 玩法模组:非必要不改bb模型
+2. 动作优化类模组:`人形角色,非必要不修改bb结构,即无需使用AddPlayerGeometry的Api`
+* 未增加关节:仅增加和优化动画的 ,不替换bb模型(属于“完全兼容”)
+* 增加关节:
+ - 中高级别多关节官方皮肤:不替换模型与贴图,动画按照官方骨骼层级制作进而保证皮肤表现正常(属于“完全兼容”)
+ - 其他官方皮肤:可根据各模组对动画的修改程度选择是否替换bb模型。如果选择替换bb模型,则需按官方规范制作(属于“部分兼容”)
+3. 人形角色,涉及“动作优化”等必须修改bb模型的,遵守以下规范即可(可参考 官方人物模型.json 模板)
+4. 不建议直接修改 player.entity.json 和 player.render_controllers.json,如果改了请务必在官方的规范下进行拓展
+
+## 美术制作规范
+
+### 必要骨骼
+
+1. 常规骨骼:常作为挂件的挂点
+> root, waist, body, leftArm, leftArmDown, rightArm, rightArmDown, head, bodyDown, leftLeg, leftLegDown, rightLeg, rightLegDown, rightLeg, cape
+2. 会员盔甲挂点:
+> hat, jacket, jacketDown, leftSleeve, leftSleeveDown, rightSleeve, rightSleeveDown, leftPants, leftPantsDown, rightPants, rightPantsDown
+
+**【注意】**
+
+共计26个骨骼,开发者请不要随意删除
+必要骨骼中,红色字体的骨骼为相比原版Steve新增的关节
+
+
+### 骨骼层级一览
+
+| 节点名称 | 枢纽点 | 备注 |
+|---------------------------|----------------| --- |
+| root | (0,0,0) | |
+| —waist | (0, 12, 0) | |
+| ——body | (0, 24, 0) | |
+| ———head | (0, 24, 0) | |
+| —————hat | (0, 24, 0) | |
+| ———cape | (0, 24, 3) | |
+| ———leftArm | (-5, 22, 0) | |
+| **—————leftArmDown** | (-5, 18, 0) | 新增必要骨骼 |
+| **———————leftSleeveDown** | (-5, 18.25, 0) | 新增盔甲骨骼 |
+| ———————leftItem | (-6, 15, 0) | |
+| —————leftSleeve | (-5, 22, 0) | |
+| ———rightArm | (5, 22, 0) | |
+| **—————rightArmDown** | (5, 18, 0) | 新增必要骨骼 |
+| **———————rightSleeveDown** | (5, 18.25, 0) | 新增盔甲骨骼 |
+| ———————rightItem | (6, 15, 0) | |
+| —————rightSleeve | (5, 22, 0) | |
+| ———jacket | (0, 24, 0) | |
+| **——bodyDown** | (0, 16, 0) | 新增必要骨骼 |
+| **———jacketDown** | (0, 16.25, 0) | 新增盔甲骨骼 |
+| —leftLeg | (-1.9, 12, 0) | |
+| ——leftPants | (-1.9, 12, 0) | |
+| **——leftLegDown** | (-1.9, 6, 0) | 新增必要骨骼 |
+| **————leftPantsDown** | (-1.9, 6.25, 0) | 新增盔甲骨骼 |
+| —rightLeg | (1.9, 12, 0) | |
+| ——rightPants | (1.9, 12, 0) | |
+| **——rightLegDown** | (1.9, 6, 0) | 新增必要骨骼 |
+| **————rightPantsDown** | (1.9, 6.25, 0) | 新增盔甲骨骼 |
+
+**【注意】**
+* 骨骼层级:影响官方动画兼容
+* 骨骼命名:影响官方挂件兼容
+
+### 骨骼层级说明
+* body 和 bodyDown 层级并列
+* 新增的切分关节
+ - 5个骨骼节点:`leftArmDown, rightArmDown, bodyDown, leftLegDown, rightLegDown `
+ - 5个骨骼节点:`jacketDown, leftSleeveDown, rightSleeveDown, leftPantsDown, [12-动作优化规范.md](12-%E5%8A%A8%E4%BD%9C%E4%BC%98%E5%8C%96%E8%A7%84%E8%8C%83.md)rightPantsDown`
+
+### UV贴图制作
+如下图所示,需要按照Steve规范进行制作
+
+
+### 其余注意事项
+
+1. 除盔甲骨骼以外,其他骨骼下必须有同名cube。例如:
+
+
+
+## 新增支持
+
+### MOD SDK
+
+为了方便开发者们在脚本中判断当前玩家皮肤状态,新增了三个接口和一个事件。
+开发者可在事件当中判定**当前皮肤是否是官方,从而决定是否修改模型。**
+
+也请开发者注意[**规范概要**](#规范概要),**非必要情况不修改模型。如需修改,也遵循照官方模型规范**
+
+**【接口和事件】**
+1. IsOfficialSkin 是否为官方皮肤
+2. IsHighLevelOfficialSkin 是否为官方史诗级以上皮肤
+3. IsHighLevelMultiJointOfficialSkin 是否为官方史诗级以上的多关节皮肤
+4. UpdatePlayerSkinClient 更新模型皮肤事件
+
+**【注意】**
+
+上述三个接口在收到 Minecraft:EngineScripts:UpdatePlayerSkinClient 事件后进行调用。更多详细说明,见官网文档
+
+使用示例
+```python
+# 这里以IsHighLevelMultiJointOfficialSkin为例
+
+self.ListenForEvent('Minecraft', "EngineScripts", "UpdatePlayerSkinClient', self, self onUpdatePlayerSkinClient)
+def onUpdatePlayerSkinClient(self,args):
+ import mod.client.extraClientApi as clientApi
+ comp = clientApi.GetEngineCompFactory().CreateGame(levelId)
+ comp.IsHighLevelMultiJointOfficialSkin(args['playerId']) # 返回bool:为官方史诗级以上的多关节皮肤
+```
+
+### 模型模板下载
+当前官方提供的“多关节”结构已经能满足大部分的模组开发者,请开发者下载官方规范模型文件
+
+[standard_steve.geo.json](./resources/standard_steve.geo.json)
+
+[standard_steve.png](./resources/standard_steve.png)
+
+
+
+### 测试服测试
+为方便开发者测试4D皮肤与模组本身的兼容性,官方在开发者测试服提供了测试用4D皮肤,可通过邮件领取
+
+
+
+
diff --git a/mcguide/16-美术/6-模型和动作/resources/0_1.png b/mcguide/16-美术/6-模型和动作/resources/0_1.png
new file mode 100644
index 0000000..5fc04fe
Binary files /dev/null and b/mcguide/16-美术/6-模型和动作/resources/0_1.png differ
diff --git a/mcguide/16-美术/6-模型和动作/resources/0_2.jpg b/mcguide/16-美术/6-模型和动作/resources/0_2.jpg
new file mode 100644
index 0000000..8cd0564
Binary files /dev/null and b/mcguide/16-美术/6-模型和动作/resources/0_2.jpg differ
diff --git a/mcguide/16-美术/6-模型和动作/resources/standard_steve.geo.json b/mcguide/16-美术/6-模型和动作/resources/standard_steve.geo.json
new file mode 100644
index 0000000..044139d
--- /dev/null
+++ b/mcguide/16-美术/6-模型和动作/resources/standard_steve.geo.json
@@ -0,0 +1,473 @@
+{
+ "format_version": "1.12.0",
+ "minecraft:geometry": [
+ {
+ "description": {
+ "identifier": "geometry.standard_steve",
+ "texture_width": 64,
+ "texture_height": 64,
+ "visible_bounds_width": 3,
+ "visible_bounds_height": 4,
+ "visible_bounds_offset": [0, 1, 0]
+ },
+ "bones": [
+ {
+ "name": "root",
+ "pivot": [0, 0, 0]
+ },
+ {
+ "name": "waist",
+ "parent": "root",
+ "pivot": [0, 12, 0]
+ },
+ {
+ "name": "body",
+ "parent": "waist",
+ "pivot": [0, 24, 0],
+ "cubes": [
+ {
+ "origin": [-4, 16, -2],
+ "size": [8, 8, 4],
+ "uv": {
+ "north": {"uv": [20, 20], "uv_size": [8, 8]},
+ "east": {"uv": [16, 20], "uv_size": [4, 8]},
+ "south": {"uv": [32, 20], "uv_size": [8, 8]},
+ "west": {"uv": [28, 20], "uv_size": [4, 8]},
+ "up": {"uv": [20, 16], "uv_size": [8, 4]},
+ "down": {"uv": [28, 20], "uv_size": [8, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "head",
+ "parent": "body",
+ "pivot": [0, 24, 0],
+ "cubes": [
+ {
+ "origin": [-4, 24, -4],
+ "size": [8, 8, 8],
+ "uv": {
+ "north": {"uv": [8, 8], "uv_size": [8, 8]},
+ "east": {"uv": [0, 8], "uv_size": [8, 8]},
+ "south": {"uv": [24, 8], "uv_size": [8, 8]},
+ "west": {"uv": [16, 8], "uv_size": [8, 8]},
+ "up": {"uv": [8, 0], "uv_size": [8, 8]},
+ "down": {"uv": [16, 8], "uv_size": [8, -8]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "hat",
+ "parent": "head",
+ "pivot": [0, 24, 0],
+ "cubes": [
+ {
+ "origin": [-4, 24, -4],
+ "size": [8, 8, 8],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [40, 8], "uv_size": [8, 8]},
+ "east": {"uv": [32, 8], "uv_size": [8, 8]},
+ "south": {"uv": [56, 8], "uv_size": [8, 8]},
+ "west": {"uv": [48, 8], "uv_size": [8, 8]},
+ "up": {"uv": [40, 0], "uv_size": [8, 8]},
+ "down": {"uv": [48, 8], "uv_size": [8, -8]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "cape",
+ "parent": "body",
+ "pivot": [0, 24, 3]
+ },
+ {
+ "name": "leftArm",
+ "parent": "body",
+ "pivot": [5, 22, 0],
+ "cubes": [
+ {
+ "origin": [4, 18, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [36, 52], "uv_size": [4, 6]},
+ "east": {"uv": [32, 52], "uv_size": [4, 6]},
+ "south": {"uv": [44, 52], "uv_size": [4, 6]},
+ "west": {"uv": [40, 52], "uv_size": [4, 6]},
+ "up": {"uv": [36, 48], "uv_size": [4, 4]},
+ "down": {"uv": [40, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "leftArmDown",
+ "parent": "leftArm",
+ "pivot": [5, 18, 0],
+ "cubes": [
+ {
+ "origin": [4, 12, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [36, 58], "uv_size": [4, 6]},
+ "east": {"uv": [32, 58], "uv_size": [4, 6]},
+ "south": {"uv": [44, 58], "uv_size": [4, 6]},
+ "west": {"uv": [40, 58], "uv_size": [4, 6]},
+ "up": {"uv": [40, 48], "uv_size": [4, 4]},
+ "down": {"uv": [40, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "leftSleeveDown",
+ "parent": "leftArmDown",
+ "pivot": [5, 18.25, 0],
+ "cubes": [
+ {
+ "origin": [4, 12, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [52, 58], "uv_size": [4, 6]},
+ "east": {"uv": [48, 58], "uv_size": [4, 6]},
+ "south": {"uv": [60, 58], "uv_size": [4, 6]},
+ "west": {"uv": [56, 58], "uv_size": [4, 6]},
+ "up": {"uv": [56, 48], "uv_size": [4, 4]},
+ "down": {"uv": [56, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "leftItem",
+ "parent": "leftArmDown",
+ "pivot": [6, 15, 1]
+ },
+ {
+ "name": "leftSleeve",
+ "parent": "leftArm",
+ "pivot": [5, 22, 0],
+ "cubes": [
+ {
+ "origin": [4, 18, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [52, 52], "uv_size": [4, 6]},
+ "east": {"uv": [48, 52], "uv_size": [4, 6]},
+ "south": {"uv": [60, 52], "uv_size": [4, 6]},
+ "west": {"uv": [56, 52], "uv_size": [4, 6]},
+ "up": {"uv": [52, 48], "uv_size": [4, 4]},
+ "down": {"uv": [56, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightArm",
+ "parent": "body",
+ "pivot": [-5, 22, 0],
+ "cubes": [
+ {
+ "origin": [-8, 18, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [40, 52], "uv_size": [-4, 6]},
+ "east": {"uv": [44, 52], "uv_size": [-4, 6]},
+ "south": {"uv": [48, 52], "uv_size": [-4, 6]},
+ "west": {"uv": [36, 52], "uv_size": [-4, 6]},
+ "up": {"uv": [40, 48], "uv_size": [-4, 4]},
+ "down": {"uv": [44, 52], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightArmDown",
+ "parent": "rightArm",
+ "pivot": [-5, 18, 0],
+ "cubes": [
+ {
+ "origin": [-8, 12, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [40, 58], "uv_size": [-4, 6]},
+ "east": {"uv": [44, 58], "uv_size": [-4, 6]},
+ "south": {"uv": [48, 58], "uv_size": [-4, 6]},
+ "west": {"uv": [36, 58], "uv_size": [-4, 6]},
+ "up": {"uv": [44, 48], "uv_size": [-4, 4]},
+ "down": {"uv": [44, 52], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightISleeveDown",
+ "parent": "rightArmDown",
+ "pivot": [-5, 18.25, 0],
+ "cubes": [
+ {
+ "origin": [-8, 12, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [48, 42], "uv_size": [-4, 6]},
+ "east": {"uv": [52, 42], "uv_size": [-4, 6]},
+ "south": {"uv": [56, 42], "uv_size": [-4, 6]},
+ "west": {"uv": [44, 42], "uv_size": [-4, 6]},
+ "up": {"uv": [52, 32], "uv_size": [-4, 4]},
+ "down": {"uv": [52, 36], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightItem",
+ "parent": "rightArmDown",
+ "pivot": [-6, 15, 1],
+ "locators": {
+ "lead_hold": [-6, 15, 1]
+ }
+ },
+ {
+ "name": "rightSleeve",
+ "parent": "rightArm",
+ "pivot": [-5, 22, 0],
+ "cubes": [
+ {
+ "origin": [-8, 18, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [48, 36], "uv_size": [-4, 6]},
+ "east": {"uv": [52, 36], "uv_size": [-4, 6]},
+ "south": {"uv": [56, 36], "uv_size": [-4, 6]},
+ "west": {"uv": [44, 36], "uv_size": [-4, 6]},
+ "up": {"uv": [48, 32], "uv_size": [-4, 4]},
+ "down": {"uv": [52, 36], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "jacket",
+ "parent": "body",
+ "pivot": [0, 24, 0],
+ "cubes": [
+ {
+ "origin": [-4, 16, -2],
+ "size": [8, 8, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [20, 36], "uv_size": [8, 8]},
+ "east": {"uv": [16, 36], "uv_size": [4, 8]},
+ "south": {"uv": [32, 36], "uv_size": [8, 8]},
+ "west": {"uv": [28, 36], "uv_size": [4, 8]},
+ "up": {"uv": [20, 32], "uv_size": [8, 4]},
+ "down": {"uv": [28, 36], "uv_size": [8, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "bodyDown",
+ "parent": "waist",
+ "pivot": [0, 16, 0],
+ "cubes": [
+ {
+ "origin": [-4, 12, -2],
+ "size": [8, 4, 4],
+ "uv": {
+ "north": {"uv": [20, 28], "uv_size": [8, 4]},
+ "east": {"uv": [16, 28], "uv_size": [4, 4]},
+ "south": {"uv": [32, 28], "uv_size": [8, 4]},
+ "west": {"uv": [28, 28], "uv_size": [4, 4]},
+ "up": {"uv": [28, 16], "uv_size": [8, 4]},
+ "down": {"uv": [28, 20], "uv_size": [8, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "jacketDown",
+ "parent": "bodyDown",
+ "pivot": [0, 16.25, 0],
+ "cubes": [
+ {
+ "origin": [-4, 12, -2],
+ "size": [8, 4, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [20, 44], "uv_size": [8, 4]},
+ "east": {"uv": [16, 44], "uv_size": [4, 4]},
+ "south": {"uv": [32, 44], "uv_size": [8, 4]},
+ "west": {"uv": [28, 44], "uv_size": [4, 4]},
+ "up": {"uv": [0, 4], "uv_size": [8, 4]},
+ "down": {"uv": [0, 4], "uv_size": [8, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "leftLeg",
+ "parent": "root",
+ "pivot": [1.9, 12, 0],
+ "cubes": [
+ {
+ "origin": [-0.1, 6, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [20, 52], "uv_size": [4, 6]},
+ "east": {"uv": [16, 52], "uv_size": [4, 6]},
+ "south": {"uv": [28, 52], "uv_size": [4, 6]},
+ "west": {"uv": [24, 52], "uv_size": [4, 6]},
+ "up": {"uv": [20, 48], "uv_size": [4, 4]},
+ "down": {"uv": [24, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "leftPants",
+ "parent": "leftLeg",
+ "pivot": [1.9, 12, 0],
+ "cubes": [
+ {
+ "origin": [-0.1, 6, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [4, 52], "uv_size": [4, 6]},
+ "east": {"uv": [0, 52], "uv_size": [4, 6]},
+ "south": {"uv": [12, 52], "uv_size": [4, 6]},
+ "west": {"uv": [8, 52], "uv_size": [4, 6]},
+ "up": {"uv": [4, 48], "uv_size": [4, 4]},
+ "down": {"uv": [8, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "leftLegDown",
+ "parent": "leftLeg",
+ "pivot": [1.9, 6, 0],
+ "cubes": [
+ {
+ "origin": [-0.1, 0, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [20, 58], "uv_size": [4, 6]},
+ "east": {"uv": [16, 58], "uv_size": [4, 6]},
+ "south": {"uv": [28, 58], "uv_size": [4, 6]},
+ "west": {"uv": [24, 58], "uv_size": [4, 6]},
+ "up": {"uv": [24, 48], "uv_size": [4, 4]},
+ "down": {"uv": [24, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "leftPantsDown",
+ "parent": "leftLegDown",
+ "pivot": [1.9, 6.25, 0],
+ "cubes": [
+ {
+ "origin": [-0.1, 0, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [4, 58], "uv_size": [4, 6]},
+ "east": {"uv": [0, 58], "uv_size": [4, 6]},
+ "south": {"uv": [12, 58], "uv_size": [4, 6]},
+ "west": {"uv": [8, 58], "uv_size": [4, 6]},
+ "up": {"uv": [8, 48], "uv_size": [4, 4]},
+ "down": {"uv": [8, 52], "uv_size": [4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightLeg",
+ "parent": "root",
+ "pivot": [-1.9, 12, 0],
+ "cubes": [
+ {
+ "origin": [-3.9, 6, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [24, 52], "uv_size": [-4, 6]},
+ "east": {"uv": [28, 52], "uv_size": [-4, 6]},
+ "south": {"uv": [32, 52], "uv_size": [-4, 6]},
+ "west": {"uv": [20, 52], "uv_size": [-4, 6]},
+ "up": {"uv": [24, 48], "uv_size": [-4, 4]},
+ "down": {"uv": [28, 52], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightPants",
+ "parent": "rightLeg",
+ "pivot": [-1.9, 12, 0],
+ "cubes": [
+ {
+ "origin": [-3.9, 6, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [8, 36], "uv_size": [-4, 6]},
+ "east": {"uv": [12, 36], "uv_size": [-4, 6]},
+ "south": {"uv": [16, 36], "uv_size": [-4, 6]},
+ "west": {"uv": [4, 36], "uv_size": [-4, 6]},
+ "up": {"uv": [8, 32], "uv_size": [-4, 4]},
+ "down": {"uv": [12, 36], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightLegDown",
+ "parent": "rightLeg",
+ "pivot": [-1.9, 6, 0],
+ "cubes": [
+ {
+ "origin": [-3.9, 0, -2],
+ "size": [4, 6, 4],
+ "uv": {
+ "north": {"uv": [24, 58], "uv_size": [-4, 6]},
+ "east": {"uv": [28, 58], "uv_size": [-4, 6]},
+ "south": {"uv": [32, 58], "uv_size": [-4, 6]},
+ "west": {"uv": [20, 58], "uv_size": [-4, 6]},
+ "up": {"uv": [28, 48], "uv_size": [-4, 4]},
+ "down": {"uv": [28, 52], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ },
+ {
+ "name": "rightPantsDown",
+ "parent": "rightLegDown",
+ "pivot": [-1.9, 6.25, 0],
+ "cubes": [
+ {
+ "origin": [-3.9, 0, -2],
+ "size": [4, 6, 4],
+ "inflate": 0.25,
+ "uv": {
+ "north": {"uv": [8, 42], "uv_size": [-4, 6]},
+ "east": {"uv": [12, 42], "uv_size": [-4, 6]},
+ "south": {"uv": [16, 42], "uv_size": [-4, 6]},
+ "west": {"uv": [4, 42], "uv_size": [-4, 6]},
+ "up": {"uv": [12, 32], "uv_size": [-4, 4]},
+ "down": {"uv": [12, 36], "uv_size": [-4, -4]}
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/mcguide/16-美术/6-模型和动作/resources/standard_steve.png b/mcguide/16-美术/6-模型和动作/resources/standard_steve.png
new file mode 100644
index 0000000..fefd1bd
Binary files /dev/null and b/mcguide/16-美术/6-模型和动作/resources/standard_steve.png differ
diff --git a/mcguide/16-美术/7-材质与着色器/images/netease_outline.png b/mcguide/16-美术/7-材质与着色器/images/netease_outline.png
new file mode 100644
index 0000000..76ad24e
Binary files /dev/null and b/mcguide/16-美术/7-材质与着色器/images/netease_outline.png differ
diff --git a/mcguide/16-美术/7-材质与着色器/images/netease_outline2.png b/mcguide/16-美术/7-材质与着色器/images/netease_outline2.png
new file mode 100644
index 0000000..482526b
Binary files /dev/null and b/mcguide/16-美术/7-材质与着色器/images/netease_outline2.png differ
diff --git a/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_clip.png b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_clip.png
new file mode 100644
index 0000000..ff7d2ac
Binary files /dev/null and b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_clip.png differ
diff --git a/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_keep_ratio.png b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_keep_ratio.png
new file mode 100644
index 0000000..c4d95ca
Binary files /dev/null and b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_keep_ratio.png differ
diff --git a/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled1.png b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled1.png
new file mode 100644
index 0000000..816f3ce
Binary files /dev/null and b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled1.png differ
diff --git a/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled2.png b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled2.png
new file mode 100644
index 0000000..4583a7d
Binary files /dev/null and b/mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled2.png differ
diff --git a/mcguide/18-界面与交互/picture/IntroduceUI/ui_modifications.png b/mcguide/18-界面与交互/picture/IntroduceUI/ui_modifications.png
new file mode 100644
index 0000000..3ec6fbb
Binary files /dev/null and b/mcguide/18-界面与交互/picture/IntroduceUI/ui_modifications.png differ
diff --git a/mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/101-3.2版本物品id变更.md b/mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/101-3.2版本物品id变更.md
new file mode 100644
index 0000000..75f8495
--- /dev/null
+++ b/mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/101-3.2版本物品id变更.md
@@ -0,0 +1,203 @@
+# 3.2版本物品id变更
+
+## 简介
+
+微软在1.20.50继续修改了部分方块ID,取消了附加值,相关链接请参阅[基岩版扁平化](https://zh.minecraft.wiki/w/%E5%AE%98%E6%96%B9%E9%A1%B5%E9%9D%A2/%E5%9F%BA%E5%B2%A9%E7%89%88%E6%89%81%E5%B9%B3%E5%8C%96),请开发者注意适配。
+
+## 处理方法
+
+在ModSDK的接口与事件中,我们针对上述情况做了以下处理:
+
+1. 对于返回物品信息字典的接口与事件:
+
+ newItemName及newAuxValue返回新版名称与附加值。
+
+ 原字段itemName及auxValue返回旧版名称与附加值。
+
+2. 对于接受物品信息字典的接口与事件:
+
+ 当字典存在newItemName及newAuxValue时,使用这两个字段。
+
+ 不存在时,使用旧字段itemName及auxValue。
+
+## 注意事项
+
+* 通过附加值获取获取方块状态接口没有做兼容,例如GetBlockAuxValueFromStates、GetBlockStatesFromAuxValue、GetBlockStates、SetBlockStates,如果您的组件对此有依赖,则需要对这次的改动自行做兼容处理。
+
+* **开发完成或正在开发的组件,建议统一采用newItemName及newAuxValue字段,也不要新旧字段混用。**
+
+* 某些写法可能会失效,例如
+
+ ```python
+ # 获取itemDict,然后在他基础上修改itemName或auxValue后再用来生成
+ itemdict = GetPlayerItem()
+ itemdict['itemName'] = 'xxx'
+ itemdict['auxValue'] = itemdict['auxValue']+1
+ SpawnItemToPlayerInv(itemdict)
+ ```
+
+ 因为GetPlayerItem返回的itemDict含有新字段,再传入SpawnItemToPlayerInv时,会读取新字段生成物品,因此对原字段的修改无效。
+
+## 物品名称变更表
+
+以下为3.2版本变更了名称的物品列表,表格内的名称省略了minecraft命名空间。
+
+| 中文名称 | 旧命名 | 旧附加值 | 新命名 |
+| :------- | ------ | -------- | ------ |
+| 花岗岩 | stone | 1 | granite |
+| 磨制花岗岩 | stone | 2 | polished_granite |
+| 闪长岩 | stone | 3 | diorite |
+| 磨制闪长岩 | stone | 4 | polished_diorite |
+| 安山岩 | stone | 5 | andesite |
+| 磨制安山岩 | stone | 6 | polished_andesite |
+| 云杉树木板 | planks | 1 | spruce_planks |
+| 白桦木板 | planks | 2 | birch_planks |
+| 丛林树木板 | planks | 3 | jungle_planks |
+| 金合欢木板 | planks | 4 | acacia_planks |
+| 深色橡木板 | planks | 5 | dark_oak_planks |
+| 橙色玻璃 | stained_glass | 1 | orange_stained_glass |
+| 品红色玻璃 | stained_glass | 2 | magenta_stained_glass |
+| 淡蓝色玻璃 | stained_glass | 3 | light_blue_stained_glass |
+| 黄色玻璃 | stained_glass | 4 | yellow_stained_glass |
+| 黄绿色玻璃 | stained_glass | 5 | lime_stained_glass |
+| 粉红色玻璃 | stained_glass | 6 | pink_stained_glass |
+| 灰色玻璃 | stained_glass | 7 | gray_stained_glass |
+| 淡灰色玻璃 | stained_glass | 8 | light_gray_stained_glass |
+| 青色玻璃 | stained_glass | 9 | cyan_stained_glass |
+| 紫色玻璃 | stained_glass | 10 | purple_stained_glass |
+| 蓝色玻璃 | stained_glass | 11 | blue_stained_glass |
+| 棕色玻璃 | stained_glass | 12 | brown_stained_glass |
+| 绿色玻璃 | stained_glass | 13 | green_stained_glass |
+| 红色玻璃 | stained_glass | 14 | red_stained_glass |
+| 黑色玻璃 | stained_glass | 15 | black_stained_glass |
+| 橙色玻璃板 | stained_glass_pane | 1 | orange_stained_glass_pane |
+| 品红色玻璃板 | stained_glass_pane | 2 | magenta_stained_glass_pane |
+| 淡蓝色玻璃板 | stained_glass_pane | 3 | light_blue_stained_glass_pane |
+| 黄色玻璃板 | stained_glass_pane | 4 | yellow_stained_glass_pane |
+| 黄绿色玻璃板 | stained_glass_pane | 5 | lime_stained_glass_pane |
+| 粉红色玻璃板 | stained_glass_pane | 6 | pink_stained_glass_pane |
+| 灰色玻璃板 | stained_glass_pane | 7 | gray_stained_glass_pane |
+| 淡灰色玻璃板 | stained_glass_pane | 8 | light_gray_stained_glass_pane |
+| 青色玻璃板 | stained_glass_pane | 9 | cyan_stained_glass_pane |
+| 紫色玻璃板 | stained_glass_pane | 10 | purple_stained_glass_pane |
+| 蓝色玻璃板 | stained_glass_pane | 11 | blue_stained_glass_pane |
+| 棕色玻璃板 | stained_glass_pane | 12 | brown_stained_glass_pane |
+| 绿色玻璃板 | stained_glass_pane | 13 | green_stained_glass_pane |
+| 红色玻璃板 | stained_glass_pane | 14 | red_stained_glass_pane |
+| 黑色玻璃板 | stained_glass_pane | 15 | black_stained_glass_pane |
+| 橙色陶瓦 | stained_hardened_clay | 1 | orange_terracotta |
+| 品红色陶瓦 | stained_hardened_clay | 2 | magenta_terracotta |
+| 淡蓝色陶瓦 | stained_hardened_clay | 3 | light_blue_terracotta |
+| 黄色陶瓦 | stained_hardened_clay | 4 | yellow_terracotta |
+| 黄绿色陶瓦 | stained_hardened_clay | 5 | lime_terracotta |
+| 粉红色陶瓦 | stained_hardened_clay | 6 | pink_terracotta |
+| 灰色陶瓦 | stained_hardened_clay | 7 | gray_terracotta |
+| 淡灰色陶瓦 | stained_hardened_clay | 8 | light_gray_terracotta |
+| 青色陶瓦 | stained_hardened_clay | 9 | cyan_terracotta |
+| 紫色陶瓦 | stained_hardened_clay | 10 | purple_terracotta |
+| 蓝色陶瓦 | stained_hardened_clay | 11 | blue_terracotta |
+| 棕色陶瓦 | stained_hardened_clay | 12 | brown_terracotta |
+| 绿色陶瓦 | stained_hardened_clay | 13 | green_terracotta |
+| 红色陶瓦 | stained_hardened_clay | 14 | red_terracotta |
+| 黑色陶瓦 | stained_hardened_clay | 15 | black_terracotta |
+| 橙色混凝土粉末 | concretepowder | 1 | orange_concrete_powder |
+| 品红色混凝土粉末 | concretepowder | 2 | magenta_concrete_powder |
+| 淡蓝色混凝土粉末 | concretepowder | 3 | light_blue_concrete_powder |
+| 黄色混凝土粉末 | concretepowder | 4 | yellow_concrete_powder |
+| 黄绿色混凝土粉末 | concretepowder | 5 | lime_concrete_powder |
+| 粉红色混凝土粉末 | concretepowder | 6 | pink_concrete_powder |
+| 灰色混凝土粉末 | concretepowder | 7 | gray_concrete_powder |
+| 淡灰色混凝土粉末 | concretepowder | 8 | light_gray_concrete_powder |
+| 青色混凝土粉末 | concretepowder | 9 | cyan_concrete_powder |
+| 紫色混凝土粉末 | concretepowder | 10 | purple_concrete_powder |
+| 蓝色混凝土粉末 | concretepowder | 11 | blue_concrete_powder |
+| 棕色混凝土粉末 | concretepowder | 12 | brown_concrete_powder |
+| 绿色混凝土粉末 | concretepowder | 13 | green_concrete_powder |
+| 红色混凝土粉末 | concretepowder | 14 | red_concrete_powder |
+| 黑色混凝土粉末 | concretepowder | 15 | black_concrete_powder |
+
+为方便开发者转换数据,下面提供了一个Python函数,该函数根据旧命名和旧附加值返回新命名。将以下代码保存在一个py文件中,导入后调用其中的get_new_name函数即可:
+
+```python
+# -*- coding: utf-8 -*-
+# 定义旧命名和新命名的映射关系
+mapping = {
+ ('stone', 1): 'granite',
+ ('stone', 2): 'polished_granite',
+ ('stone', 3): 'diorite',
+ ('stone', 4): 'polished_diorite',
+ ('stone', 5): 'andesite',
+ ('stone', 6): 'polished_andesite',
+ ('planks', 1): 'spruce_planks',
+ ('planks', 2): 'birch_planks',
+ ('planks', 3): 'jungle_planks',
+ ('planks', 4): 'acacia_planks',
+ ('planks', 5): 'dark_oak_planks',
+ ('stained_glass', 1): 'orange_stained_glass',
+ ('stained_glass', 2): 'magenta_stained_glass',
+ ('stained_glass', 3): 'light_blue_stained_glass',
+ ('stained_glass', 4): 'yellow_stained_glass',
+ ('stained_glass', 5): 'lime_stained_glass',
+ ('stained_glass', 6): 'pink_stained_glass',
+ ('stained_glass', 7): 'gray_stained_glass',
+ ('stained_glass', 8): 'light_gray_stained_glass',
+ ('stained_glass', 9): 'cyan_stained_glass',
+ ('stained_glass', 10): 'purple_stained_glass',
+ ('stained_glass', 11): 'blue_stained_glass',
+ ('stained_glass', 12): 'brown_stained_glass',
+ ('stained_glass', 13): 'green_stained_glass',
+ ('stained_glass', 14): 'red_stained_glass',
+ ('stained_glass', 15): 'black_stained_glass',
+ ('stained_glass_pane', 1): 'orange_stained_glass_pane',
+ ('stained_glass_pane', 2): 'magenta_stained_glass_pane',
+ ('stained_glass_pane', 3): 'light_blue_stained_glass_pane',
+ ('stained_glass_pane', 4): 'yellow_stained_glass_pane',
+ ('stained_glass_pane', 5): 'lime_stained_glass_pane',
+ ('stained_glass_pane', 6): 'pink_stained_glass_pane',
+ ('stained_glass_pane', 7): 'gray_stained_glass_pane',
+ ('stained_glass_pane', 8): 'light_gray_stained_glass_pane',
+ ('stained_glass_pane', 9): 'cyan_stained_glass_pane',
+ ('stained_glass_pane', 10): 'purple_stained_glass_pane',
+ ('stained_glass_pane', 11): 'blue_stained_glass_pane',
+ ('stained_glass_pane', 12): 'brown_stained_glass_pane',
+ ('stained_glass_pane', 13): 'green_stained_glass_pane',
+ ('stained_glass_pane', 14): 'red_stained_glass_pane',
+ ('stained_glass_pane', 15): 'black_stained_glass_pane',
+ ('stained_hardened_clay', 1): 'orange_terracotta',
+ ('stained_hardened_clay', 2): 'magenta_terracotta',
+ ('stained_hardened_clay', 3): 'light_blue_terracotta',
+ ('stained_hardened_clay', 4): 'yellow_terracotta',
+ ('stained_hardened_clay', 5): 'lime_terracotta',
+ ('stained_hardened_clay', 6): 'pink_terracotta',
+ ('stained_hardened_clay', 7): 'gray_terracotta',
+ ('stained_hardened_clay', 8): 'light_gray_terracotta',
+ ('stained_hardened_clay', 9): 'cyan_terracotta',
+ ('stained_hardened_clay', 10): 'purple_terracotta',
+ ('stained_hardened_clay', 11): 'blue_terracotta',
+ ('stained_hardened_clay', 12): 'brown_terracotta',
+ ('stained_hardened_clay', 13): 'green_terracotta',
+ ('stained_hardened_clay', 14): 'red_terracotta',
+ ('stained_hardened_clay', 15): 'black_terracotta',
+ ('concretepowder', 1): 'orange_concrete_powder',
+ ('concretepowder', 2): 'magenta_concrete_powder',
+ ('concretepowder', 3): 'light_blue_concrete_powder',
+ ('concretepowder', 4): 'yellow_concrete_powder',
+ ('concretepowder', 5): 'lime_concrete_powder',
+ ('concretepowder', 6): 'pink_concrete_powder',
+ ('concretepowder', 7): 'gray_concrete_powder',
+ ('concretepowder', 8): 'light_gray_concrete_powder',
+ ('concretepowder', 9): 'cyan_concrete_powder',
+ ('concretepowder', 10): 'purple_concrete_powder',
+ ('concretepowder', 11): 'blue_concrete_powder',
+ ('concretepowder', 12): 'brown_concrete_powder',
+ ('concretepowder', 13): 'green_concrete_powder',
+ ('concretepowder', 14): 'red_concrete_powder',
+ ('concretepowder', 15): 'black_concrete_powder'
+}
+
+def get_new_name(old_name, old_aux):
+ # 根据旧命名和旧附加值返回新命名
+ return mapping.get((old_name, old_aux), old_name)
+```
+
+这个函数 `get_new_name` 接受两个参数:`old_name` 和 `old_aux`,并返回对应的新命名。如果输入的旧命名和旧附加值在映射表中找不到,会返回 `old_name`。
\ No newline at end of file
diff --git a/mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/102-3.4版本物品id变更.md b/mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/102-3.4版本物品id变更.md
new file mode 100644
index 0000000..52da0bd
--- /dev/null
+++ b/mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/102-3.4版本物品id变更.md
@@ -0,0 +1,130 @@
+# 3.4版本物品id变更
+
+## 简介
+
+微软在1.21.00继续修改了部分方块ID,取消了附加值,相关链接请参阅[基岩版扁平化](https://zh.minecraft.wiki/w/%E5%AE%98%E6%96%B9%E9%A1%B5%E9%9D%A2/%E5%9F%BA%E5%B2%A9%E7%89%88%E6%89%81%E5%B9%B3%E5%8C%96),请开发者注意适配。
+
+## 处理方法
+
+在ModSDK的接口与事件中,我们针对上述情况做了以下处理:
+
+1. 对于返回物品信息字典的接口与事件:
+
+ newItemName及newAuxValue返回新版名称与附加值。
+
+ 原字段itemName及auxValue返回旧版名称与附加值。
+
+2. 对于接受物品信息字典的接口与事件:
+
+ 当字典存在newItemName及newAuxValue时,使用这两个字段。
+
+ 不存在时,使用旧字段itemName及auxValue。
+
+## 注意事项
+
+* 通过附加值获取获取方块状态接口没有做兼容,例如GetBlockAuxValueFromStates、GetBlockStatesFromAuxValue、GetBlockStates、SetBlockStates,如果您的组件对此有依赖,则需要对这次的改动自行做兼容处理。
+
+* **开发完成或正在开发的组件,建议统一采用newItemName及newAuxValue字段,也不要新旧字段混用。**
+
+* 某些写法可能会失效,例如
+
+ ```python
+ # 获取itemDict,然后在他基础上修改itemName或auxValue后再用来生成
+ itemdict = GetPlayerItem()
+ itemdict['itemName'] = 'xxx'
+ itemdict['auxValue'] = itemdict['auxValue']+1
+ SpawnItemToPlayerInv(itemdict)
+ ```
+
+ 因为GetPlayerItem返回的itemDict含有新字段,再传入SpawnItemToPlayerInv时,会读取新字段生成物品,因此对原字段的修改无效。
+
+## 物品名称变更表
+
+以下为3.4版本变更了名称的物品列表,表格内的名称省略了minecraft命名空间。
+
+| 中文名称 | 旧命名 | 旧附加值 | 新命名 |
+| :------- | ------ | -------- | ------ |
+| 草方块 | grass | 0 | grass_block |
+| 橡树树苗 | sapling | 0 | oak_sapling |
+| 云杉树苗 | sapling | 1 | spruce_sapling |
+| 白桦树苗 | sapling | 2 | birch_sapling |
+| 丛林树苗 | sapling | 3 | jungle_sapling |
+| 金合欢树苗 | sapling | 4 | acacia_sapling |
+| 深色橡树苗 | sapling | 5 | dark_oak_sapling |
+| 橡树树叶 | leaves | 0 | oak_leaves |
+| 云杉树叶 | leaves | 1 | spruce_leaves |
+| 白桦树叶 | leaves | 2 | birch_leaves |
+| 丛林树叶 | leaves | 3 | jungle_leaves |
+| 金合欢树叶 | leaves2 | 0 | acacia_leaves |
+| 深色橡树叶 | leaves2 | 1 | dark_oak_leaves |
+| 矮草丛 | 0 | tallgrass | short_grass |
+| 蕨 | 2 | tallgrass | fern |
+| 虞美人 | 0 | red_flower | poppy |
+| 兰花 | 1 | red_flower | blue_orchid |
+| 绒球葱 | 2 | red_flower | allium |
+| 蓝花美耳草 | 3 | red_flower | azure_bluet |
+| 红色郁金香 | 4 | red_flower | red_tulip |
+| 橙色郁金香 | 5 | red_flower | orange_tulip |
+| 白色郁金香 | 6 | red_flower | white_tulip |
+| 粉红色郁金香 | 7 | red_flower | pink_tulip |
+| 滨菊 | 8 | red_flower | oxeye_daisy |
+| 矢车菊 | 9 | red_flower | cornflower |
+| 铃兰 | 10 | red_flower | lily_of_the_valley |
+| 平滑石台阶 | 0 | stone_block_slab | smooth_stone_slab |
+| 砂岩台阶 | 1 | stone_block_slab | sandstone_slab |
+| 石化橡木台阶 | 2 | stone_block_slab | petrified_oak_slab |
+| 圆石台阶 | 3 | stone_block_slab | cobblestone_slab |
+| 红砖台阶 | 4 | stone_block_slab | brick_slab |
+| 石砖台阶 | 5 | stone_block_slab | stone_brick_slab |
+| 石英台阶 | 6 | stone_block_slab | quartz_slab |
+| 下界砖台阶 | 7 | stone_block_slab | nether_brick_slab |
+| 双橡木台阶 | 0 | double_wooden_slab | oak_double_slab |
+| 双云杉木台阶 | 1 | double_wooden_slab | spruce_double_slab |
+| 双白桦木台阶 | 2 | double_wooden_slab | birch_double_slab |
+| 双丛林木台阶 | 3 | double_wooden_slab | jungle_double_slab |
+| 双金合欢木台阶 | 4 | double_wooden_slab | acacia_double_slab |
+| 双深色橡木台阶 | 5 | double_wooden_slab | dark_oak_double_slab |
+| 橡木台阶 | 0 | wooden_slab | oak_slab |
+| 云杉木台阶 | 1 | wooden_slab | spruce_slab |
+| 白桦木台阶 | 2 | wooden_slab | birch_slab |
+| 丛林木台阶 | 3 | wooden_slab | jungle_slab |
+| 金合欢木台阶 | 4 | wooden_slab | acacia_slab |
+| 深色橡木台阶 | 5 | wooden_slab | dark_oak_slab |
+| 向日葵 | 0 | double_plant | sunflower |
+| 丁香 | 1 | double_plant | lilac |
+| 高草丛 | 2 | double_plant | tall_grass |
+| 大型蕨 | 3 | double_plant | large_fern |
+| 玫瑰丛 | 4 | double_plant | rose_bush |
+| 牡丹 | 5 | double_plant | peony |
+| 管珊瑚块 | 0 | coral_block | tube_coral_block |
+| 脑纹珊瑚块 | 1 | coral_block | brain_coral_block |
+| 气泡珊瑚块 | 2 | coral_block | bubble_coral_block |
+| 火珊瑚块 | 3 | coral_block | fire_coral_block |
+| 鹿角珊瑚块 | 4 | coral_block | horn_coral_block |
+| 失活的管珊瑚块 | 5 | coral_block | dead_tube_coral_block |
+| 失活的脑纹珊瑚块 | 6 | coral_block | dead_brain_coral_block |
+| 失活的气泡珊瑚块 | 7 | coral_block | dead_bubble_coral_block |
+| 失活的火珊瑚块 | 8 | coral_block | dead_fire_coral_block |
+| 失活的鹿角珊瑚块 | 9 | coral_block | dead_horn_coral_block |
+| 管珊瑚扇 | 0 | coral_fan | tube_coral_fan |
+| 脑纹珊瑚扇 | 1 | coral_fan | brain_coral_fan |
+| 气泡珊瑚扇 | 2 | coral_fan | bubble_coral_fan |
+| 火珊瑚扇 | 3 | coral_fan | fire_coral_fan |
+| 鹿角珊瑚扇 | 4 | coral_fan | horn_coral_fan |
+| 失活的管珊瑚扇 | 0 | coral_fan_dead | dead_tube_coral_fan |
+| 失活的脑纹珊瑚扇 | 1 | coral_fan_dead | dead_brain_coral_fan |
+| 失活的气泡珊瑚扇 | 2 | coral_fan_dead | dead_bubble_coral_fan |
+| 失活的火珊瑚扇 | 3 | coral_fan_dead | dead_fire_coral_fan |
+| 失活的鹿角珊瑚扇 | 4 | coral_fan_dead | dead_horn_coral_fan |
+| 橡木 | 0 | wood | oak_wood |
+| 云杉木 | 1 | wood | spruce_wood |
+| 白桦木 | 2 | wood | birch_wood |
+| 丛林木 | 3 | wood | jungle_wood |
+| 金合欢木 | 4 | wood | acacia_wood |
+| 深色橡木 | 5 | wood | dark_oak_wood |
+| 去皮橡木 | 8 | wood | stripped_oak_wood |
+| 去皮云杉木 | 9 | wood | stripped_spruce_wood |
+| 去皮桦木 | 10 | wood | stripped_birch_wood |
+| 去皮丛林木 | 11 | wood | stripped_jungle_wood |
+| 去皮金合欢木 | 12 | wood | stripped_acacia_wood |
+| 去皮深色橡木 | 13 | wood | stripped_dark_oak_wood |
\ No newline at end of file
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/config.json b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/config.json
new file mode 100644
index 0000000..cb6276c
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/config.json
@@ -0,0 +1,73 @@
+{
+ "children": [
+ {
+ "children": [
+ "/mcdocs/3-PresetAPI/预设管理/PresetApi"
+ ],
+ "title": "预设管理"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ "/mcdocs/3-PresetAPI/预设对象/通用/游戏对象GameObject",
+ "/mcdocs/3-PresetAPI/预设对象/通用/坐标变换Transform",
+ "/mcdocs/3-PresetAPI/预设对象/通用/变换对象TransformObject",
+ "/mcdocs/3-PresetAPI/预设对象/通用/素材数据BoxData",
+ "/mcdocs/3-PresetAPI/预设对象/通用/SDK接口封装SdkInterface"
+ ],
+ "title": "通用"
+ },
+ {
+ "children": [
+ "/mcdocs/3-PresetAPI/预设对象/预设/预设基类PresetBase",
+ "/mcdocs/3-PresetAPI/预设对象/预设/实体对象EntityObject",
+ "/mcdocs/3-PresetAPI/预设对象/预设/实体预设EntityPreset",
+ "/mcdocs/3-PresetAPI/预设对象/预设/特效对象EffectObject",
+ "/mcdocs/3-PresetAPI/预设对象/预设/特效预设EffectPreset",
+ "/mcdocs/3-PresetAPI/预设对象/预设/玩家对象PlayerObject",
+ "/mcdocs/3-PresetAPI/预设对象/预设/玩家预设PlayerPreset",
+ "/mcdocs/3-PresetAPI/预设对象/预设/方块预设BlockPreset",
+ "/mcdocs/3-PresetAPI/预设对象/预设/界面预设UIPreset",
+ "/mcdocs/3-PresetAPI/预设对象/预设/文字面板对象TextboardObject",
+ "/mcdocs/3-PresetAPI/预设对象/预设/文字面板预设TextboardPreset"
+ ],
+ "title": "预设"
+ },
+ {
+ "children": [
+ "/mcdocs/3-PresetAPI/预设对象/零件/零件PartBase",
+ "/mcdocs/3-PresetAPI/预设对象/零件/零件事件PartEvent",
+ "/mcdocs/3-PresetAPI/预设对象/零件/触发器零件TriggerPart",
+ "/mcdocs/3-PresetAPI/预设对象/零件/世界属性零件WorldPart",
+ "/mcdocs/3-PresetAPI/预设对象/零件/玩家基础属性零件PlayerBasicPart",
+ "/mcdocs/3-PresetAPI/预设对象/零件/实体零件EntityBasePart",
+ "/mcdocs/3-PresetAPI/预设对象/零件/相机轨迹CameraTrackPart",
+ "/mcdocs/3-PresetAPI/预设对象/零件/导航路径零件NavPointsPart"
+ ],
+ "title": "零件"
+ }
+ ],
+ "title": "预设对象"
+ },
+ {
+ "children": [
+ "/mcdocs/3-PresetAPI/更新信息/1.23.0",
+ "/mcdocs/3-PresetAPI/更新信息/1.23.1",
+ "/mcdocs/3-PresetAPI/更新信息/1.23.2",
+ "/mcdocs/3-PresetAPI/更新信息/1.23.3",
+ "/mcdocs/3-PresetAPI/更新信息/1.23.4",
+ "/mcdocs/3-PresetAPI/更新信息/1.24.0",
+ "/mcdocs/3-PresetAPI/更新信息/1.24.1",
+ "/mcdocs/3-PresetAPI/更新信息/1.25.0",
+ "/mcdocs/3-PresetAPI/更新信息/2.0.1",
+ "/mcdocs/3-PresetAPI/更新信息/2.0.2",
+ "/mcdocs/3-PresetAPI/更新信息/2.0.3",
+ "/mcdocs/3-PresetAPI/更新信息/2.2.0",
+ "/mcdocs/3-PresetAPI/更新信息/2.4.0"
+ ],
+ "title": "更新信息"
+ }
+ ],
+ "title": "PresetAPI"
+}
\ No newline at end of file
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.0.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.0.md
new file mode 100644
index 0000000..7b9c3c6
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.0.md
@@ -0,0 +1,256 @@
+# 1.23.0
+
+- 新增
+
+1. 新增[Preset.Model.GameObject.GameObject](../预设对象/通用/游戏对象GameObject.md#__init__),游戏对象
+
+1. 新增[Preset.Model.GameObject.GameObject.LoadFile](../预设对象/通用/游戏对象GameObject.md#loadfile),加载指定路径的非python脚本文件内容
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset](../预设对象/预设/实体预设EntityPreset.md#__init__),实体预设
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetHealth](../预设对象/预设/实体预设EntityPreset.md#gethealth),获取实体预设的生命值
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetHealth](../预设对象/预设/实体预设EntityPreset.md#sethealth),设置实体预设的生命值
+
+1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset](../预设对象/预设/特效预设EffectPreset.md#__init__),特效预设
+
+1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.Play](../预设对象/预设/特效预设EffectPreset.md#play),播放特效
+
+1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.Stop](../预设对象/预设/特效预设EffectPreset.md#stop),停止播放特效
+
+1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.GetResource](../预设对象/预设/特效预设EffectPreset.md#getresource),获取绑定的json资源
+
+1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.SetResource](../预设对象/预设/特效预设EffectPreset.md#setresource),设置绑定的json资源
+
+1. 新增[Preset.Model.Transform.Transform](../预设对象/通用/坐标变换Transform.md#__init__),坐标变换Transform
+
+1. 新增[Preset.Model.Transform.Transform.AddOffset](../预设对象/通用/坐标变换Transform.md#addoffset),给坐标变换位置增加偏移量
+
+1. 新增[Preset.Model.Transform.Transform.AddRotation](../预设对象/通用/坐标变换Transform.md#addrotation),给坐标变换旋转增加偏移量
+
+1. 新增[Preset.Model.Transform.Transform.AddScale](../预设对象/通用/坐标变换Transform.md#addscale),给坐标变换缩放增加偏移量
+
+1. 新增[Preset.Model.Transform.Transform.AddTransform](../预设对象/通用/坐标变换Transform.md#addtransform),给坐标变换增加偏移量
+
+1. 新增[Preset.Model.Transform.Transform.GetMatrix](../预设对象/通用/坐标变换Transform.md#getmatrix),获取坐标变换矩阵
+
+1. 新增[Preset.Model.PartBase.PartBase](../预设对象/零件/零件PartBase.md#__init__),零件基类
+
+1. 新增[Preset.Model.PartBase.PartBase.InitClient](../预设对象/零件/零件PartBase.md#initclient),客户端的零件对象初始化入口
+
+1. 新增[Preset.Model.PartBase.PartBase.InitServer](../预设对象/零件/零件PartBase.md#initserver),服务端的零件对象初始化入口
+
+1. 新增[Preset.Model.PartBase.PartBase.TickClient](../预设对象/零件/零件PartBase.md#tickclient),客户端的零件对象逻辑驱动入口
+
+1. 新增[Preset.Model.PartBase.PartBase.TickServer](../预设对象/零件/零件PartBase.md#tickserver),服务端的零件对象逻辑驱动入口
+
+1. 新增[Preset.Model.PartBase.PartBase.UnloadClient](../预设对象/零件/零件PartBase.md#unloadclient),客户端的零件对象卸载逻辑入口
+
+1. 新增[Preset.Model.PartBase.PartBase.UnloadServer](../预设对象/零件/零件PartBase.md#unloadserver),服务端的零件对象卸载逻辑入口
+
+1. 新增[Preset.Model.PartBase.PartBase.DestroyClient](../预设对象/零件/零件PartBase.md#destroyclient),客户端的零件对象销毁逻辑入口
+
+1. 新增[Preset.Model.PartBase.PartBase.DestroyServer](../预设对象/零件/零件PartBase.md#destroyserver),服务端的零件对象销毁逻辑入口
+
+1. 新增[Preset.Model.PartBase.PartBase.CanAdd](../预设对象/零件/零件PartBase.md#canadd),判断零件是否可以挂接到指定的父节点上
+
+1. 新增[Preset.Model.PartBase.PartBase.GetTickCount](../预设对象/零件/零件PartBase.md#gettickcount),获取当前帧数
+
+1. 新增[Preset.Model.PartBase.PartBase.ListenForEvent](../预设对象/零件/零件PartBase.md#listenforevent),监听指定的事件
+
+1. 新增[Preset.Model.PartBase.PartBase.UnListenForEvent](../预设对象/零件/零件PartBase.md#unlistenforevent),反监听指定的事件
+
+1. 新增[Preset.Model.PartBase.PartBase.DefineEvent](../预设对象/零件/零件PartBase.md#defineevent),定义事件
+
+1. 新增[Preset.Model.PartBase.PartBase.UnDefineEvent](../预设对象/零件/零件PartBase.md#undefineevent),反定义事件
+
+1. 新增[Preset.Model.PartBase.PartBase.BroadcastEvent](../预设对象/零件/零件PartBase.md#broadcastevent),广播事件
+
+1. 新增[Preset.Model.PartBase.PartBase.BroadcastClientEvent](../预设对象/零件/零件PartBase.md#broadcastclientevent),广播给所有客户端
+
+1. 新增[Preset.Model.PartBase.PartBase.BroadcastServerEvent](../预设对象/零件/零件PartBase.md#broadcastserverevent),广播给所有服务端
+
+1. 新增[Preset.Model.PartBase.PartBase.NotifyToServer](../预设对象/零件/零件PartBase.md#notifytoserver),通知服务端触发事件
+
+1. 新增[Preset.Model.PartBase.PartBase.NotifyToClient](../预设对象/零件/零件PartBase.md#notifytoclient),通知指定客户端触发事件
+
+1. 新增[Preset.Model.PartBase.PartBase.BroadcastToAllClient](../预设对象/零件/零件PartBase.md#broadcasttoallclient),通知指所有客户端触发事件
+
+1. 新增[Preset.Model.PartBase.PartBase.ListenSelfEvent](../预设对象/零件/零件PartBase.md#listenselfevent),监听来自自己的事件
+
+1. 新增[Preset.Model.PartBase.PartBase.UnListenSelfEvent](../预设对象/零件/零件PartBase.md#unlistenselfevent),反监听来自自己的事件
+
+1. 新增[Preset.Model.PartBase.PartBase.ListenPartEvent](../预设对象/零件/零件PartBase.md#listenpartevent),监听来自指定零件的事件
+
+1. 新增[Preset.Model.PartBase.PartBase.UnListenPartEvent](../预设对象/零件/零件PartBase.md#unlistenpartevent),反监听来自指定零件的事件
+
+1. 新增[Preset.Model.PartBase.PartBase.CreateComponent](../预设对象/零件/零件PartBase.md#createcomponent),给实体创建组件
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset](../预设对象/预设/玩家预设PlayerPreset.md#__init__),玩家预设
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetPlayerId](../预设对象/预设/玩家预设PlayerPreset.md#getplayerid),获取玩家预设的玩家ID
+
+1. 新增[Preset.Model.Block.BlockPreset.BlockPreset](../预设对象/预设/方块预设BlockPreset.md#__init__),方块预设
+
+1. 新增[Preset.Model.Block.BlockPreset.BlockPreset.GetEngineTypeStr](../预设对象/预设/方块预设BlockPreset.md#getenginetypestr),获取方块预设的方块类型ID
+
+1. 新增[Preset.Model.BoxData.BoxData](../预设对象/通用/素材数据BoxData.md#__init__),素材数据
+
+1. 新增[Preset.Model.PresetBase.PresetBase](../预设对象/预设/预设基类PresetBase.md#__init__),预设基类
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetIsAlive](../预设对象/预设/预设基类PresetBase.md#getisalive),获取预设的存活状态
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetGameObjectById](../预设对象/预设/预设基类PresetBase.md#getgameobjectbyid),获取当前预设节点底下指定ID的游戏对象
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetGameObjectByEntityId](../预设对象/预设/预设基类PresetBase.md#getgameobjectbyentityid),获取当前预设节点底下指定实体ID的游戏对象
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresets](../预设对象/预设/预设基类PresetBase.md#getchildpresets),获取当前预设的所有子预设
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresetsByName](../预设对象/预设/预设基类PresetBase.md#getchildpresetsbyname),获取指定名称的所有子预设
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresetsByType](../预设对象/预设/预设基类PresetBase.md#getchildpresetsbytype),获取指定类型的所有子预设
+
+1. 新增[Preset.Model.PresetBase.PresetBase.Replicate](../预设对象/预设/预设基类PresetBase.md#replicate),在指定位置坐标下复制当前预设
+
+1. 新增[Preset.Model.PresetBase.PresetBase.RemoveChild](../预设对象/预设/预设基类PresetBase.md#removechild),移除指定的子节点对象
+
+1. 新增[Preset.Model.PresetBase.PresetBase.AddBoxData](../预设对象/预设/预设基类PresetBase.md#addboxdata),添加指定的素材数据
+
+1. 新增[Preset.Model.PresetBase.PresetBase.RemoveBoxData](../预设对象/预设/预设基类PresetBase.md#removeboxdata),移除指定的素材数据
+
+1. 新增[Preset.Model.PresetBase.PresetBase.AddPreset](../预设对象/预设/预设基类PresetBase.md#addpreset),添加指定预设作为子预设
+
+1. 新增[Preset.Model.PresetBase.PresetBase.RemovePreset](../预设对象/预设/预设基类PresetBase.md#removepreset),移除指定的子预设
+
+1. 新增[Preset.Model.PresetBase.PresetBase.AddPart](../预设对象/预设/预设基类PresetBase.md#addpart),添加指定零件作为子零件
+
+1. 新增[Preset.Model.PresetBase.PresetBase.RemovePart](../预设对象/预设/预设基类PresetBase.md#removepart),移除指定的子零件
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetPartsByName](../预设对象/预设/预设基类PresetBase.md#getpartsbyname),获取指定名称的所有零件
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetPartByName](../预设对象/预设/预设基类PresetBase.md#getpartbyname),获取指定名称的第一个零件
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetPartsByType](../预设对象/预设/预设基类PresetBase.md#getpartsbytype),获取指定类型的所有零件
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetPartByType](../预设对象/预设/预设基类PresetBase.md#getpartbytype),获取指定类型的第一个零件
+
+1. 新增[Preset.Model.PresetBase.PresetBase.RemovePartsByType](../预设对象/预设/预设基类PresetBase.md#removepartsbytype),移除指定类型的所有零件
+
+1. 新增[Preset.Model.TransformObject.TransformObject](../预设对象/通用/变换对象TransformObject.md#__init__),变换对象
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetDependencyChunks](../预设对象/通用/变换对象TransformObject.md#getdependencychunks),获取所有依赖的chunkPos
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetChildTransformObjects](../预设对象/通用/变换对象TransformObject.md#getchildtransformobjects),获取子TransformObject列表
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetTransformObjects](../预设对象/通用/变换对象TransformObject.md#gettransformobjects),获取TransformObject列表
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetChildGameObjects](../预设对象/通用/变换对象TransformObject.md#getchildgameobjects),获取GameObject列表
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetGameObjects](../预设对象/通用/变换对象TransformObject.md#getgameobjects),获取GameObject列表
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetGameObjectById](../预设对象/通用/变换对象TransformObject.md#getgameobjectbyid),根据ID获取GameObject
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetGameObjectByEntityId](../预设对象/通用/变换对象TransformObject.md#getgameobjectbyentityid),根据实体ID获取GameObject
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetLevelId](../预设对象/通用/变换对象TransformObject.md#getlevelid),获取当前对象所在的level_id
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetDisplayName](../预设对象/通用/变换对象TransformObject.md#getdisplayname),获取当前预设的显示名称
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetDisplayPath](../预设对象/通用/变换对象TransformObject.md#getdisplaypath),获取当前预设到根节点的显示路径
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalTransform](../预设对象/通用/变换对象TransformObject.md#getlocaltransform),获取当前预设的局部坐标变换
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalTransform](../预设对象/通用/变换对象TransformObject.md#setlocaltransform),设置当前预设的局部坐标变换
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalPosition](../预设对象/通用/变换对象TransformObject.md#getlocalposition),获取当前预设的局部坐标位置
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalPosition](../预设对象/通用/变换对象TransformObject.md#setlocalposition),设置当前预设的局部坐标位置
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalRotation](../预设对象/通用/变换对象TransformObject.md#getlocalrotation),获取当前预设的局部坐标旋转
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalRotation](../预设对象/通用/变换对象TransformObject.md#setlocalrotation),设置当前预设的局部坐标旋转
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalScale](../预设对象/通用/变换对象TransformObject.md#getlocalscale),获取当前预设的局部坐标缩放
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalScale](../预设对象/通用/变换对象TransformObject.md#setlocalscale),设置当前预设的局部坐标缩放
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldTransform](../预设对象/通用/变换对象TransformObject.md#getworldtransform),获取当前预设的世界坐标变换
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldMatrix](../预设对象/通用/变换对象TransformObject.md#getworldmatrix),获取世界坐标变换矩阵
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalMatrix](../预设对象/通用/变换对象TransformObject.md#getlocalmatrix),获取局部坐标变换矩阵
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldTransform](../预设对象/通用/变换对象TransformObject.md#setworldtransform),设置当前预设的世界坐标变换
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldPosition](../预设对象/通用/变换对象TransformObject.md#getworldposition),获取当前预设的世界坐标位置
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldPosition](../预设对象/通用/变换对象TransformObject.md#setworldposition),设置当前预设的世界坐标位置
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldRotation](../预设对象/通用/变换对象TransformObject.md#getworldrotation),获取当前预设的世界坐标旋转
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldRotation](../预设对象/通用/变换对象TransformObject.md#setworldrotation),设置当前预设的世界坐标旋转
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldScale](../预设对象/通用/变换对象TransformObject.md#getworldscale),获取当前预设的世界坐标缩放
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldScale](../预设对象/通用/变换对象TransformObject.md#setworldscale),设置当前预设的世界坐标缩放
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalOffset](../预设对象/通用/变换对象TransformObject.md#addlocaloffset),给局部坐标变换位置增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldOffset](../预设对象/通用/变换对象TransformObject.md#addworldoffset),给世界坐标变换位置增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalRotation](../预设对象/通用/变换对象TransformObject.md#addlocalrotation),给局部坐标变换旋转增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldRotation](../预设对象/通用/变换对象TransformObject.md#addworldrotation),给世界坐标变换旋转增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalScale](../预设对象/通用/变换对象TransformObject.md#addlocalscale),给局部坐标变换缩放增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldScale](../预设对象/通用/变换对象TransformObject.md#addworldscale),给世界坐标变换缩放增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalTransform](../预设对象/通用/变换对象TransformObject.md#addlocaltransform),给局部坐标变换增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldTransform](../预设对象/通用/变换对象TransformObject.md#addworldtransform),给世界坐标变换增加偏移量
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetRootParent](../预设对象/通用/变换对象TransformObject.md#getrootparent),获取当前预设所在的根预设
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetParent](../预设对象/通用/变换对象TransformObject.md#getparent),获取当前预设的父预设
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetParent](../预设对象/通用/变换对象TransformObject.md#setparent),设置当前预设的父预设
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetManager](../预设对象/通用/变换对象TransformObject.md#getmanager),获取当前预设所在的预设管理器
+
+1. 新增[Preset.Model.TransformObject.TransformObject.Unload](../预设对象/通用/变换对象TransformObject.md#unload),卸载当前预设
+
+1. 新增[Preset.Model.TransformObject.TransformObject.Destroy](../预设对象/通用/变换对象TransformObject.md#destroy),销毁当前预设
+
+1. 新增[Preset.Controller.PresetApi.GetAllPresets](../预设管理/PresetApi.md#getallpresets),获取所有预设
+
+1. 新增[Preset.Controller.PresetApi.GetBlockPresetByPosition](../预设管理/PresetApi.md#getblockpresetbyposition),获取指定位置的第一个方块预设
+
+1. 新增[Preset.Controller.PresetApi.GetGameObjectByEntityId](../预设管理/PresetApi.md#getgameobjectbyentityid),获取指定实体ID的游戏对象
+
+1. 新增[Preset.Controller.PresetApi.GetGameObjectById](../预设管理/PresetApi.md#getgameobjectbyid),获取指定ID的游戏对象
+
+1. 新增[Preset.Controller.PresetApi.GetManager](../预设管理/PresetApi.md#getmanager),获取预设管理器
+
+1. 新增[Preset.Controller.PresetApi.GetPresetByName](../预设管理/PresetApi.md#getpresetbyname),获取指定名称的第一个预设
+
+1. 新增[Preset.Controller.PresetApi.GetPresetByType](../预设管理/PresetApi.md#getpresetbytype),获取指定类型的第一个预设
+
+1. 新增[Preset.Controller.PresetApi.GetPresetsByName](../预设管理/PresetApi.md#getpresetsbyname),获取指定名称的所有预设
+
+1. 新增[Preset.Controller.PresetApi.GetPresetsByType](../预设管理/PresetApi.md#getpresetsbytype),获取指定类型的所有预设
+
+1. 新增[Preset.Controller.PresetApi.GetTickCount](../预设管理/PresetApi.md#gettickcount),获取当前帧数
+
+1. 新增[Preset.Controller.PresetApi.LoadPartByModulePath](../预设管理/PresetApi.md#loadpartbymodulepath),通过模块相对路径加载零件并实例化
+
+1. 新增[Preset.Controller.PresetApi.LoadPartByType](../预设管理/PresetApi.md#loadpartbytype),通过类名加载零件并实例化
+
+1. 新增[Preset.Controller.PresetApi.SpawnPreset](../预设管理/PresetApi.md#spawnpreset),在指定坐标变换处生成指定预设
+
+1. 新增[Preset.Parts.PartEvent.OnTriggerEntityEnter](../预设对象/零件/零件事件PartEvent.md#ontriggerentityenter),触发器范围有实体进入时触发
+
+1. 新增[Preset.Parts.PartEvent.OnTriggerEntityExit](../预设对象/零件/零件事件PartEvent.md#ontriggerentityexit),触发器范围有实体离开时触发
+
+1. 新增[Preset.Parts.PartEvent.OnTriggerEntityStay](../预设对象/零件/零件事件PartEvent.md#ontriggerentitystay),触发器范围有实体停留时触发
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.1.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.1.md
new file mode 100644
index 0000000..d3d5953
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.1.md
@@ -0,0 +1,770 @@
+# 1.23.1
+
+* 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.24大版本更新。
+
+- 新增
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxHealth](../预设对象/预设/实体预设EntityPreset.md#getmaxhealth),获取实体预设的最大生命值
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxHealth](../预设对象/预设/实体预设EntityPreset.md#setmaxhealth),设置实体预设的最大生命值
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetSpeed](../预设对象/预设/实体预设EntityPreset.md#getspeed),获取实体预设的速度
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetSpeed](../预设对象/预设/实体预设EntityPreset.md#setspeed),设置实体预设的速度
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxSpeed](../预设对象/预设/实体预设EntityPreset.md#getmaxspeed),获取实体预设的最大速度
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxSpeed](../预设对象/预设/实体预设EntityPreset.md#setmaxspeed),设置实体预设的最大速度
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetDamage](../预设对象/预设/实体预设EntityPreset.md#getdamage),获取实体预设的伤害
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetDamage](../预设对象/预设/实体预设EntityPreset.md#setdamage),设置实体预设的伤害
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxDamage](../预设对象/预设/实体预设EntityPreset.md#getmaxdamage),获取实体预设的最大伤害
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxDamage](../预设对象/预设/实体预设EntityPreset.md#setmaxdamage),设置实体预设的最大伤害
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.ShowHealth](../预设对象/预设/实体预设EntityPreset.md#showhealth),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAttackTarget](../预设对象/预设/实体预设EntityPreset.md#setattacktarget),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.ResetAttackTarget](../预设对象/预设/实体预设EntityPreset.md#resetattacktarget),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAttackTarget](../预设对象/预设/实体预设EntityPreset.md#getattacktarget),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetKnockback](../预设对象/预设/实体预设EntityPreset.md#setknockback),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetOwner](../预设对象/预设/实体预设EntityPreset.md#setowner),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetOwner](../预设对象/预设/实体预设EntityPreset.md#getowner),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsOnFire](../预设对象/预设/实体预设EntityPreset.md#isonfire),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetOnFire](../预设对象/预设/实体预设EntityPreset.md#setonfire),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAttrValue](../预设对象/预设/实体预设EntityPreset.md#getattrvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAttrMaxValue](../预设对象/预设/实体预设EntityPreset.md#getattrmaxvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAttrValue](../预设对象/预设/实体预设EntityPreset.md#setattrvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAttrMaxValue](../预设对象/预设/实体预设EntityPreset.md#setattrmaxvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsInLava](../预设对象/预设/实体预设EntityPreset.md#isinlava),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsOnGround](../预设对象/预设/实体预设EntityPreset.md#isonground),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAuxValue](../预设对象/预设/实体预设EntityPreset.md#getauxvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetCurrentAirSupply](../预设对象/预设/实体预设EntityPreset.md#getcurrentairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxAirSupply](../预设对象/预设/实体预设EntityPreset.md#getmaxairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetCurrentAirSupply](../预设对象/预设/实体预设EntityPreset.md#setcurrentairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxAirSupply](../预设对象/预设/实体预设EntityPreset.md#setmaxairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsConsumingAirSupply](../预设对象/预设/实体预设EntityPreset.md#isconsumingairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetRecoverTotalAirSupplyTime](../预设对象/预设/实体预设EntityPreset.md#setrecovertotalairsupplytime),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetSourceId](../预设对象/预设/实体预设EntityPreset.md#getsourceid),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetCollisionBoxSize](../预设对象/预设/实体预设EntityPreset.md#setcollisionboxsize),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetCollisionBoxSize](../预设对象/预设/实体预设EntityPreset.md#getcollisionboxsize),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetBlockControlAi](../预设对象/预设/实体预设EntityPreset.md#setblockcontrolai),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetDimensionId](../预设对象/预设/实体预设EntityPreset.md#getdimensionid),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.ChangeDimension](../预设对象/预设/实体预设EntityPreset.md#changedimension),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.RemoveEffect](../预设对象/预设/实体预设EntityPreset.md#removeeffect),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.AddEffect](../预设对象/预设/实体预设EntityPreset.md#addeffect),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetEffects](../预设对象/预设/实体预设EntityPreset.md#geteffects),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.TriggerCustomEvent](../预设对象/预设/实体预设EntityPreset.md#triggercustomevent),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsAlive](../预设对象/预设/实体预设EntityPreset.md#isalive),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetGravity](../预设对象/预设/实体预设EntityPreset.md#getgravity),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetGravity](../预设对象/预设/实体预设EntityPreset.md#setgravity),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetHurt](../预设对象/预设/实体预设EntityPreset.md#sethurt),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetImmuneDamage](../预设对象/预设/实体预设EntityPreset.md#setimmunedamage),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetModAttr](../预设对象/预设/实体预设EntityPreset.md#setmodattr),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetModAttr](../预设对象/预设/实体预设EntityPreset.md#getmodattr),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.RegisterModAttrUpdateFunc](../预设对象/预设/实体预设EntityPreset.md#registermodattrupdatefunc),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.UnRegisterModAttrUpdateFunc](../预设对象/预设/实体预设EntityPreset.md#unregistermodattrupdatefunc),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetName](../预设对象/预设/实体预设EntityPreset.md#getname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetName](../预设对象/预设/实体预设EntityPreset.md#setname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetShowName](../预设对象/预设/实体预设EntityPreset.md#setshowname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAlwaysShowName](../预设对象/预设/实体预设EntityPreset.md#setalwaysshowname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetPersistence](../预设对象/预设/实体预设EntityPreset.md#setpersistence),组件工厂化
+
+1. 新增[Preset.Model.PartBase.PartBase.GetGameObjectById](../预设对象/零件/零件PartBase.md#getgameobjectbyid),获取指定ID的游戏对象
+
+1. 新增[Preset.Model.PartBase.PartBase.GetGameObjectByEntityId](../预设对象/零件/零件PartBase.md#getgameobjectbyentityid),获取指定实体ID的游戏对象
+
+1. 新增[Preset.Model.PartBase.PartBase.CreateGameObjectByEntityId](../预设对象/零件/零件PartBase.md#creategameobjectbyentityid),根据指定实体ID创建游戏对象,已存在则直接返回
+
+1. 新增[Preset.Model.PartBase.PartBase.CreateEventData](../预设对象/零件/零件PartBase.md#createeventdata),反定义事件
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.IsSneaking](../预设对象/预设/玩家预设PlayerPreset.md#issneaking),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetHunger](../预设对象/预设/玩家预设PlayerPreset.md#gethunger),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetHunger](../预设对象/预设/玩家预设PlayerPreset.md#sethunger),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetMotion](../预设对象/预设/玩家预设PlayerPreset.md#setmotion),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetMotion](../预设对象/预设/玩家预设PlayerPreset.md#getmotion),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetStepHeight](../预设对象/预设/玩家预设PlayerPreset.md#setstepheight),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetStepHeight](../预设对象/预设/玩家预设PlayerPreset.md#getstepheight),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.ResetStepHeight](../预设对象/预设/玩家预设PlayerPreset.md#resetstepheight),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetExp](../预设对象/预设/玩家预设PlayerPreset.md#getexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.AddExp](../预设对象/预设/玩家预设PlayerPreset.md#addexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetTotalExp](../预设对象/预设/玩家预设PlayerPreset.md#gettotalexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetTotalExp](../预设对象/预设/玩家预设PlayerPreset.md#settotalexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.IsFlying](../预设对象/预设/玩家预设PlayerPreset.md#isflying),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.ChangeFlyState](../预设对象/预设/玩家预设PlayerPreset.md#changeflystate),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetLevel](../预设对象/预设/玩家预设PlayerPreset.md#getlevel),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.AddLevel](../预设对象/预设/玩家预设PlayerPreset.md#addlevel),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetPrefixAndSuffixName](../预设对象/预设/玩家预设PlayerPreset.md#setprefixandsuffixname),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcomponent),给实体创建组件
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactioncomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAttackTarget](../预设对象/通用/SDK接口封装SdkInterface.md#setentityattacktarget),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ResetEntityAttackTarget](../预设对象/通用/SDK接口封装SdkInterface.md#resetentityattacktarget),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAttackTarget](../预设对象/通用/SDK接口封装SdkInterface.md#getentityattacktarget),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetMobKnockback](../预设对象/通用/SDK接口封装SdkInterface.md#setmobknockback),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorLootComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorlootcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnLootTable](../预设对象/通用/SDK接口封装SdkInterface.md#spawnloottable),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnLootTableWithActor](../预设对象/通用/SDK接口封装SdkInterface.md#spawnloottablewithactor),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorMotionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactormotioncomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetDirFromRot](../预设对象/通用/SDK接口封装SdkInterface.md#getdirfromrot),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityMotion](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymotion),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityMotion](../预设对象/通用/SDK接口封装SdkInterface.md#getentitymotion),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetInputVector](../预设对象/通用/SDK接口封装SdkInterface.md#getinputvector),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.LockInputVector](../预设对象/通用/SDK接口封装SdkInterface.md#lockinputvector),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.UnlockInputVector](../预设对象/通用/SDK接口封装SdkInterface.md#unlockinputvector),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorOwnerComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorownercomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityOwner](../预设对象/通用/SDK接口封装SdkInterface.md#setentityowner),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityOwner](../预设对象/通用/SDK接口封装SdkInterface.md#getentityowner),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorPushableComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorpushablecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetActorPushable](../预设对象/通用/SDK接口封装SdkInterface.md#setactorpushable),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateAttrComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createattrcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityOnFire](../预设对象/通用/SDK接口封装SdkInterface.md#isentityonfire),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityOnFire](../预设对象/通用/SDK接口封装SdkInterface.md#setentityonfire),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAttrValue](../预设对象/通用/SDK接口封装SdkInterface.md#getentityattrvalue),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAttrMaxValue](../预设对象/通用/SDK接口封装SdkInterface.md#getentityattrmaxvalue),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAttrValue](../预设对象/通用/SDK接口封装SdkInterface.md#setentityattrvalue),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAttrMaxValue](../预设对象/通用/SDK接口封装SdkInterface.md#setentityattrmaxvalue),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerStepHeight](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerstepheight),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerStepHeight](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerstepheight),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ResetPlayerStepHeight](../预设对象/通用/SDK接口封装SdkInterface.md#resetplayerstepheight),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityInLava](../预设对象/通用/SDK接口封装SdkInterface.md#isentityinlava),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityOnGround](../预设对象/通用/SDK接口封装SdkInterface.md#isentityonground),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateAuxValueComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createauxvaluecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAuxValue](../预设对象/通用/SDK接口封装SdkInterface.md#getentityauxvalue),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBiomeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbiomecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBiomeName](../预设对象/通用/SDK接口封装SdkInterface.md#getbiomename),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createblockcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RegisterBlockPatterns](../预设对象/通用/SDK接口封装SdkInterface.md#registerblockpatterns),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMicroBlockResStr](../预设对象/通用/SDK接口封装SdkInterface.md#createmicroblockresstr),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockEntityData](../预设对象/通用/SDK接口封装SdkInterface.md#createblockentitydata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCustomBlockEntityData](../预设对象/通用/SDK接口封装SdkInterface.md#getcustomblockentitydata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockInfoComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createblockinfocomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlock](../预设对象/通用/SDK接口封装SdkInterface.md#getblock),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetBlock](../预设对象/通用/SDK接口封装SdkInterface.md#setblock),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetTopBlockHeight](../预设对象/通用/SDK接口封装SdkInterface.md#gettopblockheight),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockDestroyTime](../预设对象/通用/SDK接口封装SdkInterface.md#getblockdestroytime),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockEntityData](../预设对象/通用/SDK接口封装SdkInterface.md#getblockentitydata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockStateComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createblockstatecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockStates](../预设对象/通用/SDK接口封装SdkInterface.md#getblockstates),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetBlockStates](../预设对象/通用/SDK接口封装SdkInterface.md#setblockstates),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockAuxValueFromStates](../预设对象/通用/SDK接口封装SdkInterface.md#getblockauxvaluefromstates),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockStatesFromAuxValue](../预设对象/通用/SDK接口封装SdkInterface.md#getblockstatesfromauxvalue),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockUseEventWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#createblockuseeventwhitelist),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddBlockItemListenForUseEvent](../预设对象/通用/SDK接口封装SdkInterface.md#addblockitemlistenforuseevent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveBlockItemListenForUseEvent](../预设对象/通用/SDK接口封装SdkInterface.md#removeblockitemlistenforuseevent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearAllListenForBlockUseEventItems](../预设对象/通用/SDK接口封装SdkInterface.md#clearalllistenforblockuseeventitems),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBreathComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbreathcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetUnitBubbleAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#getunitbubbleairsupply),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityCurrentAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#getentitycurrentairsupply),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityMaxAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#getentitymaxairsupply),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityCurrentAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#setentitycurrentairsupply),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityMaxAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymaxairsupply),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityConsumingAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#isentityconsumingairsupply),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityRecoverTotalAirSupplyTime](../预设对象/通用/SDK接口封装SdkInterface.md#setentityrecovertotalairsupplytime),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBulletAttributesComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbulletattributescomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntitySourceId](../预设对象/通用/SDK接口封装SdkInterface.md#getentitysourceid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateChestBlockComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createchestblockcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChestBoxSize](../预设对象/通用/SDK接口封装SdkInterface.md#getchestboxsize),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetChestBoxItemNum](../预设对象/通用/SDK接口封装SdkInterface.md#setchestboxitemnum),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetChestBoxItemExchange](../预设对象/通用/SDK接口封装SdkInterface.md#setchestboxitemexchange),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateChunkSourceComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createchunksourcecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetAddArea](../预设对象/通用/SDK接口封装SdkInterface.md#setaddarea),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.DeleteArea](../预设对象/通用/SDK接口封装SdkInterface.md#deletearea),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.DeleteAllArea](../预设对象/通用/SDK接口封装SdkInterface.md#deleteallarea),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetAllAreaKeys](../预设对象/通用/SDK接口封装SdkInterface.md#getallareakeys),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CheckChunkState](../预设对象/通用/SDK接口封装SdkInterface.md#checkchunkstate),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetLoadedChunks](../预设对象/通用/SDK接口封装SdkInterface.md#getloadedchunks),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChunkEntities](../预设对象/通用/SDK接口封装SdkInterface.md#getchunkentities),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChunkMobNum](../预设对象/通用/SDK接口封装SdkInterface.md#getchunkmobnum),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsChunkGenerated](../预设对象/通用/SDK接口封装SdkInterface.md#ischunkgenerated),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCollisionBoxComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcollisionboxcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityCollisionBoxSize](../预设对象/通用/SDK接口封装SdkInterface.md#setentitycollisionboxsize),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityCollisionBoxSize](../预设对象/通用/SDK接口封装SdkInterface.md#getentitycollisionboxsize),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCommandComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcommandcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetCommand](../预设对象/通用/SDK接口封装SdkInterface.md#setcommand),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCommandPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#getcommandpermissionlevel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetCommandPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#setcommandpermissionlevel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetDefaultPlayerPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#getdefaultplayerpermissionlevel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetDefaultPlayerPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#setdefaultplayerpermissionlevel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateControlAiComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcontrolaicomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityBlockControlAi](../预设对象/通用/SDK接口封装SdkInterface.md#setentityblockcontrolai),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateDimensionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createdimensioncomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityDimensionId](../预设对象/通用/SDK接口封装SdkInterface.md#getentitydimensionid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangeEntityDimension](../预设对象/通用/SDK接口封装SdkInterface.md#changeentitydimension),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangePlayerDimension](../预设对象/通用/SDK接口封装SdkInterface.md#changeplayerdimension),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.MirrorDimension](../预设对象/通用/SDK接口封装SdkInterface.md#mirrordimension),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateDimension](../预设对象/通用/SDK接口封装SdkInterface.md#createdimension),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RegisterEntityAOIEvent](../预设对象/通用/SDK接口封装SdkInterface.md#registerentityaoievent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.UnRegisterEntityAOIEvent](../预设对象/通用/SDK接口封装SdkInterface.md#unregisterentityaoievent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetUseLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#setuselocaltime),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetUseLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#getuselocaltime),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#setlocaltime),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetLocalTimeOfDay](../预设对象/通用/SDK接口封装SdkInterface.md#setlocaltimeofday),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#getlocaltime),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetLocalDoDayNightCycle](../预设对象/通用/SDK接口封装SdkInterface.md#setlocaldodaynightcycle),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetLocalDoDayNightCycle](../预设对象/通用/SDK接口封装SdkInterface.md#getlocaldodaynightcycle),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEffectComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createeffectcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveEffectFromEntity](../预设对象/通用/SDK接口封装SdkInterface.md#removeeffectfromentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddEffectToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#addeffecttoentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityEffects](../预设对象/通用/SDK接口封装SdkInterface.md#getentityeffects),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEngineTypeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createenginetypecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityEngineTypeStr](../预设对象/通用/SDK接口封装SdkInterface.md#getentityenginetypestr),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityEngineType](../预设对象/通用/SDK接口封装SdkInterface.md#getentityenginetype),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEntityEventComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createentityeventcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.TriggerEntityCustomEvent](../预设对象/通用/SDK接口封装SdkInterface.md#triggerentitycustomevent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExtraDataComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createextradatacomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#getextradata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SaveExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#saveextradata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#setextradata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CleanExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#cleanextradata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetWholeExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#getwholeextradata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExpComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createexpcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerExp](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerexp),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddPlayerExp](../预设对象/通用/SDK接口封装SdkInterface.md#addplayerexp),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerTotalExp](../预设对象/通用/SDK接口封装SdkInterface.md#getplayertotalexp),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerTotalExp](../预设对象/通用/SDK接口封装SdkInterface.md#setplayertotalexp),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetOrbExperience](../预设对象/通用/SDK接口封装SdkInterface.md#getorbexperience),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetOrbExperience](../预设对象/通用/SDK接口封装SdkInterface.md#setorbexperience),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExperienceOrb](../预设对象/通用/SDK接口封装SdkInterface.md#createexperienceorb),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExplosionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createexplosioncomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExplosion](../预设对象/通用/SDK接口封装SdkInterface.md#createexplosion),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFeatureComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createfeaturecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddNeteaseFeatureWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#addneteasefeaturewhitelist),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveNeteaseFeatureWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#removeneteasefeaturewhitelist),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearAllNeteaseFeatureWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#clearallneteasefeaturewhitelist),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.LocateStructureFeature](../预设对象/通用/SDK接口封装SdkInterface.md#locatestructurefeature),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.LocateNeteaseFeatureRule](../预设对象/通用/SDK接口封装SdkInterface.md#locateneteasefeaturerule),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFlyComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createflycomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsPlayerFlying](../预设对象/通用/SDK接口封装SdkInterface.md#isplayerflying),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangePlayerFlyState](../预设对象/通用/SDK接口封装SdkInterface.md#changeplayerflystate),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateGameComponent](../预设对象/通用/SDK接口封装SdkInterface.md#creategamecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.KillEntity](../预设对象/通用/SDK接口封装SdkInterface.md#killentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEngineEntityByTypeStr](../预设对象/通用/SDK接口封装SdkInterface.md#createengineentitybytypestr),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.PlaceStructure](../预设对象/通用/SDK接口封装SdkInterface.md#placestructure),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddTimer](../预设对象/通用/SDK接口封装SdkInterface.md#addtimer),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddRepeatedTimer](../预设对象/通用/SDK接口封装SdkInterface.md#addrepeatedtimer),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CancelTimer](../预设对象/通用/SDK接口封装SdkInterface.md#canceltimer),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntitiesInArea](../预设对象/通用/SDK接口封装SdkInterface.md#getentitiesinarea),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntitiesAround](../预设对象/通用/SDK接口封装SdkInterface.md#getentitiesaround),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ShowHealthBar](../预设对象/通用/SDK接口封装SdkInterface.md#showhealthbar),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetNameDeeptest](../预设对象/通用/SDK接口封装SdkInterface.md#setnamedeeptest),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetScreenSize](../预设对象/通用/SDK接口封装SdkInterface.md#getscreensize),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetRenderLocalPlayer](../预设对象/通用/SDK接口封装SdkInterface.md#setrenderlocalplayer),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddPickBlacklist](../预设对象/通用/SDK接口封装SdkInterface.md#addpickblacklist),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearPickBlacklist](../预设对象/通用/SDK接口封装SdkInterface.md#clearpickblacklist),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CheckWordsValid](../预设对象/通用/SDK接口封装SdkInterface.md#checkwordsvalid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CheckNameValid](../预设对象/通用/SDK接口封装SdkInterface.md#checknamevalid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetScreenViewInfo](../预设对象/通用/SDK接口封装SdkInterface.md#getscreenviewinfo),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SimulateTouchWithMouse](../预设对象/通用/SDK接口封装SdkInterface.md#simulatetouchwithmouse),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCurrentDimension](../预设对象/通用/SDK接口封装SdkInterface.md#getcurrentdimension),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChinese](../预设对象/通用/SDK接口封装SdkInterface.md#getchinese),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetDisableHunger](../预设对象/通用/SDK接口封装SdkInterface.md#setdisablehunger),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetOneTipMessage](../预设对象/通用/SDK接口封装SdkInterface.md#setonetipmessage),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPopupNotice](../预设对象/通用/SDK接口封装SdkInterface.md#setpopupnotice),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetTipMessage](../预设对象/通用/SDK接口封装SdkInterface.md#settipmessage),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetNotifyMsg](../预设对象/通用/SDK接口封装SdkInterface.md#setnotifymsg),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerGameType](../预设对象/通用/SDK接口封装SdkInterface.md#getplayergametype),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.HasEntity](../预设对象/通用/SDK接口封装SdkInterface.md#hasentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityAlive](../预设对象/通用/SDK接口封装SdkInterface.md#isentityalive),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateGravityComponent](../预设对象/通用/SDK接口封装SdkInterface.md#creategravitycomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityGravity](../预设对象/通用/SDK接口封装SdkInterface.md#getentitygravity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityGravity](../预设对象/通用/SDK接口封装SdkInterface.md#setentitygravity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateHurtComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createhurtcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetHurtByEntity](../预设对象/通用/SDK接口封装SdkInterface.md#sethurtbyentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetHurtByEntityNew](../预设对象/通用/SDK接口封装SdkInterface.md#sethurtbyentitynew),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityImmuneDamage](../预设对象/通用/SDK接口封装SdkInterface.md#setentityimmunedamage),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateItemBannedComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createitembannedcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddBannedItem](../预设对象/通用/SDK接口封装SdkInterface.md#addbanneditem),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBannedItemList](../预设对象/通用/SDK接口封装SdkInterface.md#getbanneditemlist),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveBannedItem](../预设对象/通用/SDK接口封装SdkInterface.md#removebanneditem),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearBannedItems](../预设对象/通用/SDK接口封装SdkInterface.md#clearbanneditems),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateItemComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createitemcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemBasicInfo](../预设对象/通用/SDK接口封装SdkInterface.md#getitembasicinfo),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearPlayerOffHand](../预设对象/通用/SDK接口封装SdkInterface.md#clearplayeroffhand),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerItem](../预设对象/通用/SDK接口封装SdkInterface.md#getplayeritem),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangePlayerItemTipsAndExtraId](../预设对象/通用/SDK接口封装SdkInterface.md#changeplayeritemtipsandextraid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddEnchantToInvItem](../预设对象/通用/SDK接口封装SdkInterface.md#addenchanttoinvitem),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetInvItemEnchantData](../预设对象/通用/SDK接口封装SdkInterface.md#getinvitemenchantdata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetOffhandItem](../预设对象/通用/SDK接口封装SdkInterface.md#getoffhanditem),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetInvItemNum](../预设对象/通用/SDK接口封装SdkInterface.md#setinvitemnum),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnItemToLevel](../预设对象/通用/SDK接口封装SdkInterface.md#spawnitemtolevel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnItemToPlayerInv](../预设对象/通用/SDK接口封装SdkInterface.md#spawnitemtoplayerinv),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnItemToPlayerCarried](../预设对象/通用/SDK接口封装SdkInterface.md#spawnitemtoplayercarried),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCarriedItem](../预设对象/通用/SDK接口封装SdkInterface.md#getcarrieditem),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetSlotId](../预设对象/通用/SDK接口封装SdkInterface.md#getslotid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemFormattedHoverText](../预设对象/通用/SDK接口封装SdkInterface.md#getitemformattedhovertext),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemHoverName](../预设对象/通用/SDK接口封装SdkInterface.md#getitemhovername),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemEffectName](../预设对象/通用/SDK接口封装SdkInterface.md#getitemeffectname),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetUserDataInEvent](../预设对象/通用/SDK接口封装SdkInterface.md#getuserdatainevent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangeItemTexture](../预设对象/通用/SDK接口封装SdkInterface.md#changeitemtexture),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateLvComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createlvcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerLevel](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerlevel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddPlayerLevel](../预设对象/通用/SDK接口封装SdkInterface.md#addplayerlevel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMobSpawnComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmobspawncomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnCustomModule](../预设对象/通用/SDK接口封装SdkInterface.md#spawncustommodule),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateModAttrComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmodattrcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityModAttr](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymodattr),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityModAttr](../预设对象/通用/SDK接口封装SdkInterface.md#getentitymodattr),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RegisterEntityModAttrUpdateFunc](../预设对象/通用/SDK接口封装SdkInterface.md#registerentitymodattrupdatefunc),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.UnRegisterEntityModAttrUpdateFunc](../预设对象/通用/SDK接口封装SdkInterface.md#unregisterentitymodattrupdatefunc),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateModelComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmodelcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityOpacity](../预设对象/通用/SDK接口封装SdkInterface.md#setentityopacity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.PlayEntityAnim](../预设对象/通用/SDK接口封装SdkInterface.md#playentityanim),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetModelId](../预设对象/通用/SDK接口封装SdkInterface.md#getmodelid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityModel](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymodel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ResetEntityModel](../预设对象/通用/SDK接口封装SdkInterface.md#resetentitymodel),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.BindModelToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#bindmodeltoentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.UnBindModelToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#unbindmodeltoentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMoveToComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmovetocomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityMoveSetting](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymovesetting),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMsgComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmsgcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SendMsg](../预设对象/通用/SDK接口封装SdkInterface.md#sendmsg),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SendMsgToPlayer](../预设对象/通用/SDK接口封装SdkInterface.md#sendmsgtoplayer),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.NotifyOneMessage](../预设对象/通用/SDK接口封装SdkInterface.md#notifyonemessage),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateNameComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createnamecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityName](../预设对象/通用/SDK接口封装SdkInterface.md#getentityname),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityName](../预设对象/通用/SDK接口封装SdkInterface.md#setentityname),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerPrefixAndSuffixName](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerprefixandsuffixname),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityShowName](../预设对象/通用/SDK接口封装SdkInterface.md#setentityshowname),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAlwaysShowName](../预设对象/通用/SDK接口封装SdkInterface.md#setentityalwaysshowname),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePersistenceComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createpersistencecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityPersistence](../预设对象/通用/SDK接口封装SdkInterface.md#setentitypersistence),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePetComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createpetcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.DisablePet](../预设对象/通用/SDK接口封装SdkInterface.md#disablepet),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.EnablePet](../预设对象/通用/SDK接口封装SdkInterface.md#enablepet),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePlayerComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createplayercomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.IsPlayerSneaking](../预设对象/零件/零件PartBase.md#isplayersneaking),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerHunger](../预设对象/零件/零件PartBase.md#getplayerhunger),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerHunger](../预设对象/零件/零件PartBase.md#setplayerhunger),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePortalComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createportalcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePosComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createposcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityPos](../预设对象/通用/SDK接口封装SdkInterface.md#getentitypos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityFootPos](../预设对象/通用/SDK接口封装SdkInterface.md#getentityfootpos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityPos](../预设对象/通用/SDK接口封装SdkInterface.md#setentitypos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityFootPos](../预设对象/通用/SDK接口封装SdkInterface.md#setentityfootpos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateProjectileComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createprojectilecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateProjectileEntity](../预设对象/通用/SDK接口封装SdkInterface.md#createprojectileentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRecipeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createrecipecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetRecipeResult](../预设对象/通用/SDK接口封装SdkInterface.md#getreciperesult),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetRecipesByResult](../预设对象/通用/SDK接口封装SdkInterface.md#getrecipesbyresult),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetRecipesByInput](../预设对象/通用/SDK接口封装SdkInterface.md#getrecipesbyinput),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRedStoneComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createredstonecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRideComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createridecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRotComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createrotcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityRot](../预设对象/通用/SDK接口封装SdkInterface.md#getentityrot),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityRot](../预设对象/通用/SDK接口封装SdkInterface.md#setentityrot),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityLookAtPos](../预设对象/通用/SDK接口封装SdkInterface.md#setentitylookatpos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBodyRot](../预设对象/通用/SDK接口封装SdkInterface.md#getbodyrot),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.LockLocalPlayerRot](../预设对象/通用/SDK接口封装SdkInterface.md#locklocalplayerrot),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerLookAtPos](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerlookatpos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateScaleComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createscalecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTameComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtamecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTimeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtimecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetTime](../预设对象/通用/SDK接口封装SdkInterface.md#gettime),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateWeatherComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createweathercomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorCollidableComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorcollidablecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorRenderComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorrendercomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCustomAudioComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcustomaudiocomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBrightnessComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbrightnesscomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCameraComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcameracomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.PickFacing](../预设对象/通用/SDK接口封装SdkInterface.md#pickfacing),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFogComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createfogcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniControlComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeanicontrolcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniLoop](../预设对象/通用/SDK接口封装SdkInterface.md#setframeaniloop),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniFaceCamera](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanifacecamera),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniDeepTest](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanideeptest),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniEntityBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeanientitybindcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniSkeletonBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeaniskeletonbindcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniTransComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeanitranscomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniPos](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanipos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniRot](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanirot),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniScale](../预设对象/通用/SDK接口封装SdkInterface.md#setframeaniscale),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateHealthComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createhealthcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ShowEntityHealth](../预设对象/通用/SDK接口封装SdkInterface.md#showentityhealth),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateOperationComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createoperationcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetCanAll](../预设对象/通用/SDK接口封装SdkInterface.md#setcanall),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateDeviceComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createdevicecomponent),创建device组件
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleControlComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticlecontrolcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleEntityBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticleentitybindcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleSkeletonBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticleskeletonbindcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleTransComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticletranscomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetParticlePos](../预设对象/通用/SDK接口封装SdkInterface.md#setparticlepos),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetParticleRot](../预设对象/通用/SDK接口封装SdkInterface.md#setparticlerot),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePlayerViewComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createplayerviewcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerPerspective](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerperspective),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerPerspective](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerperspective),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.LockPlayerPerspective](../预设对象/通用/SDK接口封装SdkInterface.md#lockplayerperspective),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateQueryVariableComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createqueryvariablecomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateSkyRenderComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createskyrendercomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTextBoardComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtextboardcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTextNotifyClientComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtextnotifyclientcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateConfigClientComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createconfigclientcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateVirtualWorldComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createvirtualworldcomponent),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePlayerAnimComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createplayeranimcomponent),组件工厂化
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.2.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.2.md
new file mode 100644
index 0000000..f84bf58
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.2.md
@@ -0,0 +1,24 @@
+# 1.23.2
+
+* 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.24大版本更新。
+
+- 新增
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetServerSystem](../预设对象/通用/SDK接口封装SdkInterface.md#getserversystem),返回当前对象可使用的服务端system
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetClientSystem](../预设对象/通用/SDK接口封装SdkInterface.md#getclientsystem),返回当前对象可使用的客户端system
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetSystem](../预设对象/通用/SDK接口封装SdkInterface.md#getsystem),返回当前对象可使用的system
+
+1. 新增[Preset.Model.UI.UIPreset.UIPreset](../预设对象/预设/界面预设UIPreset.md#__init__),界面预设
+
+1. 新增[Preset.Model.UI.UIPreset.UIPreset.SetUiActive](../预设对象/预设/界面预设UIPreset.md#setuiactive),界面预设
+
+1. 新增[Preset.Model.UI.UIPreset.UIPreset.GetUiActive](../预设对象/预设/界面预设UIPreset.md#getuiactive),界面预设
+
+1. 新增[Preset.Model.UI.UIPreset.UIPreset.SetUiVisible](../预设对象/预设/界面预设UIPreset.md#setuivisible),界面预设
+
+1. 新增[Preset.Model.UI.UIPreset.UIPreset.GetUiVisible](../预设对象/预设/界面预设UIPreset.md#getuivisible),界面预设
+
+1. 新增[Preset.Model.UI.UIPreset.UIPreset.GetScreenNode](../预设对象/预设/界面预设UIPreset.md#getscreennode),界面预设
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.3.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.3.md
new file mode 100644
index 0000000..38b17a2
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.3.md
@@ -0,0 +1,21 @@
+# 1.23.3
+
+- 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.24大版本更新。
+- 新增
+
+1. 新增[Preset.Model.PartBase.PartBase.LogDebug](../预设对象/零件/零件PartBase.md#logdebug),打印调试日志,仅PC开发包有效
+
+1. 新增[Preset.Model.PartBase.PartBase.LogInfo](../预设对象/零件/零件PartBase.md#loginfo),打印消息日志
+
+1. 新增[Preset.Model.PartBase.PartBase.LogError](../预设对象/零件/零件PartBase.md#logerror),打印错误日志
+
+1. 新增[Preset.Model.PartBase.PartBase.ListenForEngineEvent](../预设对象/零件/零件PartBase.md#listenforengineevent),监听指定的引擎事件
+
+1. 新增[Preset.Model.PartBase.PartBase.UnListenForEngineEvent](../预设对象/零件/零件PartBase.md#unlistenforengineevent),反监听指定的引擎事件
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetApi](../预设对象/零件/零件PartBase.md#getapi),返回当前对象可使用的SDK API模块
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#getextradata),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.SaveExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#saveextradata),组件工厂化
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.4.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.4.md
new file mode 100644
index 0000000..1c9d667
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.4.md
@@ -0,0 +1,225 @@
+# 1.23.4
+
+- 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.25大版本更新。
+- 新增
+
+1. 新增[Preset.Model.Effect.EffectObject.EffectObject](../预设对象/预设/特效对象EffectObject.md#__init__),特效对象
+
+1. 新增[Preset.Model.Effect.EffectObject.EffectObject.Play](../预设对象/预设/特效对象EffectObject.md#play),播放特效
+
+1. 新增[Preset.Model.Effect.EffectObject.EffectObject.Stop](../预设对象/预设/特效对象EffectObject.md#stop),停止播放特效
+
+1. 新增[Preset.Model.Effect.EffectObject.EffectObject.BindToEntity](../预设对象/预设/特效对象EffectObject.md#bindtoentity),组件工厂化
+
+1. 新增[Preset.Model.Effect.EffectObject.EffectObject.BindToSkeleton](../预设对象/预设/特效对象EffectObject.md#bindtoskeleton),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject](../预设对象/预设/玩家对象PlayerObject.md#__init__),玩家对象
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetPlayerId](../预设对象/预设/玩家对象PlayerObject.md#getplayerid),获取玩家预设的玩家ID
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.IsLocalPlayer](../预设对象/预设/玩家对象PlayerObject.md#islocalplayer),判断当前玩家对象是否本地玩家,服务端为False
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.IsSneaking](../预设对象/预设/玩家对象PlayerObject.md#issneaking),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetHunger](../预设对象/预设/玩家对象PlayerObject.md#gethunger),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetHunger](../预设对象/预设/玩家对象PlayerObject.md#sethunger),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetMotion](../预设对象/预设/玩家对象PlayerObject.md#setmotion),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetMotion](../预设对象/预设/玩家对象PlayerObject.md#getmotion),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetStepHeight](../预设对象/预设/玩家对象PlayerObject.md#setstepheight),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetStepHeight](../预设对象/预设/玩家对象PlayerObject.md#getstepheight),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.ResetStepHeight](../预设对象/预设/玩家对象PlayerObject.md#resetstepheight),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetExp](../预设对象/预设/玩家对象PlayerObject.md#getexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddExp](../预设对象/预设/玩家对象PlayerObject.md#addexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetTotalExp](../预设对象/预设/玩家对象PlayerObject.md#gettotalexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetTotalExp](../预设对象/预设/玩家对象PlayerObject.md#settotalexp),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.IsFlying](../预设对象/预设/玩家对象PlayerObject.md#isflying),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.ChangeFlyState](../预设对象/预设/玩家对象PlayerObject.md#changeflystate),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetLevel](../预设对象/预设/玩家对象PlayerObject.md#getlevel),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddLevel](../预设对象/预设/玩家对象PlayerObject.md#addlevel),组件工厂化
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetPrefixAndSuffixName](../预设对象/预设/玩家对象PlayerObject.md#setprefixandsuffixname),组件工厂化
+
+1. 新增[Preset.Model.PartBase.PartBase.GetPlayerObject](../预设对象/零件/零件PartBase.md#getplayerobject),获取玩家对象
+
+1. 新增[Preset.Model.PartBase.PartBase.GetEntityObject](../预设对象/零件/零件PartBase.md#getentityobject),获取实体对象
+
+1. 新增[Preset.Model.PartBase.PartBase.GetEffectObject](../预设对象/零件/零件PartBase.md#geteffectobject),获取特效对象
+
+1. 新增[Preset.Model.PartBase.PartBase.CreateEffectPreset](../预设对象/零件/零件PartBase.md#createeffectpreset),创建特效对象
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresetsByName](../预设对象/预设/预设基类PresetBase.md#getchildpresetsbyname),增加递归查找参数
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetChildObjectByTypeName](../预设对象/预设/预设基类PresetBase.md#getchildobjectbytypename),获取指定类型和名称的第一个游戏对象
+
+1. 新增[Preset.Model.PresetBase.PresetBase.GetChildObjectsByTypeName](../预设对象/预设/预设基类PresetBase.md#getchildobjectsbytypename),获取指定类型和名称的第一个游戏对象
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityId](../预设对象/通用/SDK接口封装SdkInterface.md#getentityid),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ToPlayerPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toplayerpreset),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ToEntityPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toentitypreset),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ToEffectPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toeffectpreset),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ToBlockPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toblockpreset),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.ToUIPreset](../预设对象/通用/SDK接口封装SdkInterface.md#touipreset),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.DestroyEntity](../预设对象/通用/SDK接口封装SdkInterface.md#destroyentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.BindFrameAniToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#bindframeanitoentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.BindFrameAniToSkeleton](../预设对象/通用/SDK接口封装SdkInterface.md#bindframeanitoskeleton),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.BindParticleToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#bindparticletoentity),组件工厂化
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.BindParticleToSkeleton](../预设对象/通用/SDK接口封装SdkInterface.md#bindparticletoskeleton),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject](../预设对象/预设/实体对象EntityObject.md#__init__),实体对象
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetEngineTypeStr](../预设对象/预设/实体对象EntityObject.md#getenginetypestr),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetEngineType](../预设对象/预设/实体对象EntityObject.md#getenginetype),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetModelId](../预设对象/预设/实体对象EntityObject.md#getmodelid),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.PlayAnim](../预设对象/预设/实体对象EntityObject.md#playanim),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetOpacity](../预设对象/预设/实体对象EntityObject.md#setopacity),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetHealth](../预设对象/预设/实体对象EntityObject.md#gethealth),获取实体预设的生命值
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetHealth](../预设对象/预设/实体对象EntityObject.md#sethealth),设置实体预设的生命值
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxHealth](../预设对象/预设/实体对象EntityObject.md#getmaxhealth),获取实体预设的最大生命值
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxHealth](../预设对象/预设/实体对象EntityObject.md#setmaxhealth),设置实体预设的最大生命值
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetSpeed](../预设对象/预设/实体对象EntityObject.md#getspeed),获取实体预设的速度
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetSpeed](../预设对象/预设/实体对象EntityObject.md#setspeed),设置实体预设的速度
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxSpeed](../预设对象/预设/实体对象EntityObject.md#getmaxspeed),获取实体预设的最大速度
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxSpeed](../预设对象/预设/实体对象EntityObject.md#setmaxspeed),设置实体预设的最大速度
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetDamage](../预设对象/预设/实体对象EntityObject.md#getdamage),获取实体预设的伤害
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetDamage](../预设对象/预设/实体对象EntityObject.md#setdamage),设置实体预设的伤害
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxDamage](../预设对象/预设/实体对象EntityObject.md#getmaxdamage),获取实体预设的最大伤害
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxDamage](../预设对象/预设/实体对象EntityObject.md#setmaxdamage),设置实体预设的最大伤害
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.ShowHealth](../预设对象/预设/实体对象EntityObject.md#showhealth),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAttackTarget](../预设对象/预设/实体对象EntityObject.md#setattacktarget),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.ResetAttackTarget](../预设对象/预设/实体对象EntityObject.md#resetattacktarget),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAttackTarget](../预设对象/预设/实体对象EntityObject.md#getattacktarget),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetKnockback](../预设对象/预设/实体对象EntityObject.md#setknockback),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetOwner](../预设对象/预设/实体对象EntityObject.md#setowner),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetOwner](../预设对象/预设/实体对象EntityObject.md#getowner),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsOnFire](../预设对象/预设/实体对象EntityObject.md#isonfire),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetOnFire](../预设对象/预设/实体对象EntityObject.md#setonfire),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAttrValue](../预设对象/预设/实体对象EntityObject.md#getattrvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAttrMaxValue](../预设对象/预设/实体对象EntityObject.md#getattrmaxvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAttrValue](../预设对象/预设/实体对象EntityObject.md#setattrvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAttrMaxValue](../预设对象/预设/实体对象EntityObject.md#setattrmaxvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsInLava](../预设对象/预设/实体对象EntityObject.md#isinlava),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsOnGround](../预设对象/预设/实体对象EntityObject.md#isonground),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAuxValue](../预设对象/预设/实体对象EntityObject.md#getauxvalue),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetCurrentAirSupply](../预设对象/预设/实体对象EntityObject.md#getcurrentairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxAirSupply](../预设对象/预设/实体对象EntityObject.md#getmaxairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCurrentAirSupply](../预设对象/预设/实体对象EntityObject.md#setcurrentairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxAirSupply](../预设对象/预设/实体对象EntityObject.md#setmaxairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsConsumingAirSupply](../预设对象/预设/实体对象EntityObject.md#isconsumingairsupply),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetRecoverTotalAirSupplyTime](../预设对象/预设/实体对象EntityObject.md#setrecovertotalairsupplytime),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetSourceId](../预设对象/预设/实体对象EntityObject.md#getsourceid),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCollisionBoxSize](../预设对象/预设/实体对象EntityObject.md#setcollisionboxsize),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetCollisionBoxSize](../预设对象/预设/实体对象EntityObject.md#getcollisionboxsize),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetBlockControlAi](../预设对象/预设/实体对象EntityObject.md#setblockcontrolai),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetDimensionId](../预设对象/预设/实体对象EntityObject.md#getdimensionid),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.ChangeDimension](../预设对象/预设/实体对象EntityObject.md#changedimension),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.RemoveEffect](../预设对象/预设/实体对象EntityObject.md#removeeffect),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddEffect](../预设对象/预设/实体对象EntityObject.md#addeffect),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetEffects](../预设对象/预设/实体对象EntityObject.md#geteffects),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.TriggerCustomEvent](../预设对象/预设/实体对象EntityObject.md#triggercustomevent),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsAlive](../预设对象/预设/实体对象EntityObject.md#isalive),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetGravity](../预设对象/预设/实体对象EntityObject.md#getgravity),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetGravity](../预设对象/预设/实体对象EntityObject.md#setgravity),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetHurt](../预设对象/预设/实体对象EntityObject.md#sethurt),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetImmuneDamage](../预设对象/预设/实体对象EntityObject.md#setimmunedamage),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetModAttr](../预设对象/预设/实体对象EntityObject.md#setmodattr),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetModAttr](../预设对象/预设/实体对象EntityObject.md#getmodattr),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.RegisterModAttrUpdateFunc](../预设对象/预设/实体对象EntityObject.md#registermodattrupdatefunc),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.UnRegisterModAttrUpdateFunc](../预设对象/预设/实体对象EntityObject.md#unregistermodattrupdatefunc),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetName](../预设对象/预设/实体对象EntityObject.md#getname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetName](../预设对象/预设/实体对象EntityObject.md#setname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetShowName](../预设对象/预设/实体对象EntityObject.md#setshowname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAlwaysShowName](../预设对象/预设/实体对象EntityObject.md#setalwaysshowname),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetPersistence](../预设对象/预设/实体对象EntityObject.md#setpersistence),组件工厂化
+
+1. 新增[Preset.Controller.PresetApi.GetGameObjectByTypeName](../预设管理/PresetApi.md#getgameobjectbytypename),获取指定类型和名称的第一个游戏对象
+
+1. 新增[Preset.Controller.PresetApi.GetGameObjectsByTypeName](../预设管理/PresetApi.md#getgameobjectsbytypename),获取指定类型和名称的所有游戏对象
+
+1. 新增[Preset.Controller.PresetApi.GetPartApi](../预设管理/PresetApi.md#getpartapi),获取零件API
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.0.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.0.md
new file mode 100644
index 0000000..8e0a4cb
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.0.md
@@ -0,0 +1,29 @@
+# 1.24.0
+
+- 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.25大版本更新。
+- 新增
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.EnableKeepInventory](../预设对象/预设/玩家对象PlayerObject.md#enablekeepinventory),组件工厂化
+
+1. 新增[Preset.Model.PartBase.PartBase.GetLoadedPlayers](../预设对象/零件/零件PartBase.md#getloadedplayers),获取服务器所有玩家的ID列表
+
+1. 新增[Preset.Model.PartBase.PartBase.BroadcastPresetSystemEvent](../预设对象/零件/零件PartBase.md#broadcastpresetsystemevent),广播给预设系统
+
+1. 新增[Preset.Model.PartBase.PartBase.ListenPresetSystemEvent](../预设对象/零件/零件PartBase.md#listenpresetsystemevent),监听来自预设系统的事件
+
+1. 新增[Preset.Model.PartBase.PartBase.UnListenPresetSystemEvent](../预设对象/零件/零件PartBase.md#unlistenpresetsystemevent),反监听来自预设系统的事件
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.EnablePlayerKeepInventory](../预设对象/通用/SDK接口封装SdkInterface.md#enableplayerkeepinventory),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetPos](../预设对象/预设/实体对象EntityObject.md#getpos),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetFootPos](../预设对象/预设/实体对象EntityObject.md#getfootpos),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetPos](../预设对象/预设/实体对象EntityObject.md#setpos),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetFootPos](../预设对象/预设/实体对象EntityObject.md#setfootpos),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetRot](../预设对象/预设/实体对象EntityObject.md#getrot),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetRot](../预设对象/预设/实体对象EntityObject.md#setrot),组件工厂化
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.1.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.1.md
new file mode 100644
index 0000000..3702c34
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.1.md
@@ -0,0 +1,32 @@
+# 1.24.1
+
+- 新增
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetId](../预设对象/通用/变换对象TransformObject.md#getid),获取当前预设的ID
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.AddBlockProtectField](../预设对象/通用/SDK接口封装SdkInterface.md#addblockprotectfield),设置一个方块无法被玩家/实体破坏的区域
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveBlockProtectField](../预设对象/通用/SDK接口封装SdkInterface.md#removeblockprotectfield),取消一个方块无法被玩家/实体破坏的区域
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CleanBlockProtectField](../预设对象/通用/SDK接口封装SdkInterface.md#cleanblockprotectfield),取消全部已设置的方块无法被玩家/实体破坏的区域
+
+1. 新增[Preset.Parts.TriggerPart.TriggerPart](../预设对象/零件/触发器零件TriggerPart.md#__init__),触发器零件
+
+1. 新增[Preset.Parts.TriggerPart.TriggerPart.GetEntitiesInTrigger](../预设对象/零件/触发器零件TriggerPart.md#getentitiesintrigger),获取当前在触发器区域的实体列表
+
+1. 新增[Preset.Parts.NavPointsPart.NavPointsPart](../预设对象/零件/导航路径零件NavPointsPart.md#__init__),导航路径零件
+
+1. 新增[Preset.Parts.EntityBasePart.EntityBasePart](../预设对象/零件/实体零件EntityBasePart.md#__init__),实体零件
+
+1. 新增[Preset.Parts.EntityBasePart.EntityBasePart.CreateVirtualEntity](../预设对象/零件/实体零件EntityBasePart.md#createvirtualentity),手动创建关联实体
+
+1. 新增[Preset.Parts.EntityBasePart.EntityBasePart.DestroyVirtualEntity](../预设对象/零件/实体零件EntityBasePart.md#destroyvirtualentity),移除已创建的关联实体
+
+1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart](../预设对象/零件/相机轨迹CameraTrackPart.md#__init__),相机轨迹零件
+
+1. 新增[Preset.Parts.PortalPart.PortalPart](../预设对象/零件/传送门零件PortalPart.md#__init__),传送门零件
+
+1. 新增[Preset.Parts.PlayerBasicPart.PlayerBasicPart](../预设对象/零件/玩家基础属性零件PlayerBasicPart.md#__init__),玩家基础属性零件
+
+1. 新增[Preset.Parts.WorldPart.WorldPart](../预设对象/零件/世界属性零件WorldPart.md#__init__),世界属性零件
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.25.0.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.25.0.md
new file mode 100644
index 0000000..d4872b9
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.25.0.md
@@ -0,0 +1,22 @@
+# 1.25.0
+
+- 新增
+
+1. 新增[Preset.Model.PresetBase.PresetBase.SetBlockProtect](../预设对象/预设/预设基类PresetBase.md#setblockprotect),设置预设内的所有素材区域的方块保护状态
+
+1. 新增[Preset.Model.GameObject.type.fromDict](../预设对象/通用/游戏对象GameObject.md#fromdict),将字典根据classType字段转换为对应类型的对象,该类型必须使用@registerGenericClass装饰
+
+1. 新增[Preset.Parts.NavPointsPart.NavPointsPart](../预设对象/零件/导航路径零件NavPointsPart.md#__init__),导航路径零件
+
+1. 新增[Preset.Parts.NavPointsPart.NavPointsPart.GetNavigationPoints](../预设对象/零件/导航路径零件NavPointsPart.md#getnavigationpoints),获得路径点的世界坐标列表
+
+1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart](../预设对象/零件/相机轨迹CameraTrackPart.md#__init__),相机轨迹零件
+
+1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.PlayFromStart](../预设对象/零件/相机轨迹CameraTrackPart.md#playfromstart),从头开始播放相机运动轨迹
+
+1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.Pause](../预设对象/零件/相机轨迹CameraTrackPart.md#pause),暂停播放相机轨迹
+
+1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.Continue](../预设对象/零件/相机轨迹CameraTrackPart.md#continue),继续播放相机轨迹
+
+1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.Stop](../预设对象/零件/相机轨迹CameraTrackPart.md#stop),停止播放相机轨迹
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.1.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.1.md
new file mode 100644
index 0000000..731b8a7
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.1.md
@@ -0,0 +1,10 @@
+# 2.0.1
+
+- 新增
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMotion](../预设对象/预设/实体对象EntityObject.md#setmotion),组件工厂化
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMotion](../预设对象/预设/实体对象EntityObject.md#getmotion),组件工厂化
+
+1. 新增[Preset.Parts.NavPointsPart.NavPointsPart.GetNavigationRadius](../预设对象/零件/导航路径零件NavPointsPart.md#getnavigationradius),获得路径点的随机半径列表
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.2.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.2.md
new file mode 100644
index 0000000..a7172fd
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.2.md
@@ -0,0 +1,76 @@
+# 2.0.2
+
+- 新增
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddAnimation](../预设对象/预设/玩家对象PlayerObject.md#addanimation),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetHealthLevel](../预设对象/预设/玩家对象PlayerObject.md#sethealthlevel),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetStarveLevel](../预设对象/预设/玩家对象PlayerObject.md#setstarvelevel),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetNaturalStarve](../预设对象/预设/玩家对象PlayerObject.md#setnaturalstarve),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetStarveTick](../预设对象/预设/玩家对象PlayerObject.md#setstarvetick),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetNaturalRegen](../预设对象/预设/玩家对象PlayerObject.md#setnaturalregen),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetHealthTick](../预设对象/预设/玩家对象PlayerObject.md#sethealthtick),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetMaxExhaustionValue](../预设对象/预设/玩家对象PlayerObject.md#setmaxexhaustionvalue),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetPickUpArea](../预设对象/预设/玩家对象PlayerObject.md#setpickuparea),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetJumpable](../预设对象/预设/玩家对象PlayerObject.md#setjumpable),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetMovable](../预设对象/预设/玩家对象PlayerObject.md#setmovable),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddAnimationController](../预设对象/预设/玩家对象PlayerObject.md#addanimationcontroller),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddAnimationIntoState](../预设对象/预设/玩家对象PlayerObject.md#addanimationintostate),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddGeometry](../预设对象/预设/玩家对象PlayerObject.md#addgeometry),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddParticleEffect](../预设对象/预设/玩家对象PlayerObject.md#addparticleeffect),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddRenderController](../预设对象/预设/玩家对象PlayerObject.md#addrendercontroller),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddRenderMaterial](../预设对象/预设/玩家对象PlayerObject.md#addrendermaterial),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddSoundEffect](../预设对象/预设/玩家对象PlayerObject.md#addsoundeffect),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddTexture](../预设对象/预设/玩家对象PlayerObject.md#addtexture),铺量属性接口
+
+1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetSkin](../预设对象/预设/玩家对象PlayerObject.md#setskin),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetItem](../预设对象/预设/实体对象EntityObject.md#setitem),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCanOtherPlayerRide](../预设对象/预设/实体对象EntityObject.md#setcanotherplayerride),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetControl](../预设对象/预设/实体对象EntityObject.md#setcontrol),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetRidePos](../预设对象/预设/实体对象EntityObject.md#setridepos),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetNotRender](../预设对象/预设/实体对象EntityObject.md#setnotrender),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCollidable](../预设对象/预设/实体对象EntityObject.md#setcollidable),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetHealthColor](../预设对象/预设/实体对象EntityObject.md#sethealthcolor),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddAnimation](../预设对象/预设/实体对象EntityObject.md#addanimation),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddAnimationController](../预设对象/预设/实体对象EntityObject.md#addanimationcontroller),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddScriptAnimate](../预设对象/预设/实体对象EntityObject.md#addscriptanimate),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddParticleEffect](../预设对象/预设/实体对象EntityObject.md#addparticleeffect),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddRenderController](../预设对象/预设/实体对象EntityObject.md#addrendercontroller),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddRenderMaterial](../预设对象/预设/实体对象EntityObject.md#addrendermaterial),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddSoundEffect](../预设对象/预设/实体对象EntityObject.md#addsoundeffect),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetPushable](../预设对象/预设/实体对象EntityObject.md#setpushable),铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetModel](../预设对象/预设/实体对象EntityObject.md#setmodel),铺量属性接口
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.3.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.3.md
new file mode 100644
index 0000000..abe4afc
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.3.md
@@ -0,0 +1,38 @@
+# 2.0.3
+
+- 新增
+
+1. 新增[Preset.Model.PartBase.PartBase.CreateTextboardPreset](../预设对象/零件/零件PartBase.md#createtextboardpreset)(客户端/服务端), 创建文字面板对象
+
+1. 新增[Preset.Model.Textboard.TextboardPreset.TextboardPreset](../预设对象/预设/文字面板预设TextboardPreset.md#__init__)(客户端/服务端), 文字面板预设
+
+1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePostProcessComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createpostprocesscomponent)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetLavaSpeed](../预设对象/预设/实体对象EntityObject.md#getlavaspeed)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetLavaSpeed](../预设对象/预设/实体对象EntityObject.md#setlavaspeed)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxLavaSpeed](../预设对象/预设/实体对象EntityObject.md#getmaxlavaspeed)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxLavaSpeed](../预设对象/预设/实体对象EntityObject.md#setmaxlavaspeed)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject](../预设对象/预设/文字面板对象TextboardObject.md#__init__)(客户端/服务端), 文字面板对象
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetBindEntity](../预设对象/预设/文字面板对象TextboardObject.md#setbindentity)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetPos](../预设对象/预设/文字面板对象TextboardObject.md#setpos)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetRot](../预设对象/预设/文字面板对象TextboardObject.md#setrot)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetScale](../预设对象/预设/文字面板对象TextboardObject.md#setscale)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetText](../预设对象/预设/文字面板对象TextboardObject.md#settext)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetColor](../预设对象/预设/文字面板对象TextboardObject.md#setcolor)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetBackgroundColor](../预设对象/预设/文字面板对象TextboardObject.md#setbackgroundcolor)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetFaceCamera](../预设对象/预设/文字面板对象TextboardObject.md#setfacecamera)(客户端/服务端), 铺量属性接口
+
+1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetBoardDepthTest](../预设对象/预设/文字面板对象TextboardObject.md#setboarddepthtest)(客户端/服务端), 铺量属性接口
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.2.0.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.2.0.md
new file mode 100644
index 0000000..80f764f
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.2.0.md
@@ -0,0 +1,6 @@
+# 2.2.0
+
+- 新增
+
+1. 新增[Preset.Controller.PresetApi.CreateTransform](../预设管理/PresetApi.md#createtransform)(客户端/服务端), 构造变换对象
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.4.0.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.4.0.md
new file mode 100644
index 0000000..fe5b2b8
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.4.0.md
@@ -0,0 +1,30 @@
+# 2.4.0
+
+- 新增
+
+1. 新增[Preset.Model.TransformObject.TransformObject.GetDimension](../预设对象/通用/变换对象TransformObject.md#getdimension)(客户端/服务端), 获取所在的维度
+
+1. 新增[Preset.Model.TransformObject.TransformObject.SetDimension](../预设对象/通用/变换对象TransformObject.md#setdimension)(客户端/服务端), 设置所在的维度
+
+1. 新增[Preset.Controller.PresetApi.GetPresetSize](../预设管理/PresetApi.md#getpresetsize)(客户端/服务端), 根据预设ID获取预设的包围盒大小
+
+- 调整
+
+1. 调整[Preset.Controller.PresetApi.GetAllPresets](../预设管理/PresetApi.md#getallpresets)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.GetBlockPresetByPosition](../预设管理/PresetApi.md#getblockpresetbyposition)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.GetGameObjectByTypeName](../预设管理/PresetApi.md#getgameobjectbytypename)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.GetGameObjectsByTypeName](../预设管理/PresetApi.md#getgameobjectsbytypename)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.GetPresetByName](../预设管理/PresetApi.md#getpresetbyname)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.GetPresetByType](../预设管理/PresetApi.md#getpresetbytype)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.GetPresetsByName](../预设管理/PresetApi.md#getpresetsbyname)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.GetPresetsByType](../预设管理/PresetApi.md#getpresetsbytype)(客户端/服务端), 新增dimension参数
+
+1. 调整[Preset.Controller.PresetApi.SpawnPreset](../预设管理/PresetApi.md#spawnpreset)(客户端/服务端), 新增dimension与virtual参数
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/SDK接口封装SdkInterface.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/SDK接口封装SdkInterface.md
new file mode 100644
index 0000000..734244f
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/SDK接口封装SdkInterface.md
@@ -0,0 +1,10317 @@
+---
+sidebarDepth: 1
+---
+# SDK接口封装SdkInterface
+
+
+
+## 概述
+
+- 描述
+
+ SdkInterface是对SDK接口封装的基类。
+
+- 成员变量
+
+ | 变量名 |
数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 关联实体ID |
+ | isClient | bool | 是否客户端 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetEntityId](#getentityid) | 客户端/服务端 | 获取对象实体ID |
+| [ToPlayerPreset](#toplayerpreset) | 客户端/服务端 | 强制类型转换为玩家预设 |
+| [ToEntityPreset](#toentitypreset) | 客户端/服务端 | 强制类型转换为实体预设 |
+| [ToEffectPreset](#toeffectpreset) | 客户端/服务端 | 强制类型转换为特效预设 |
+| [ToBlockPreset](#toblockpreset) | 客户端/服务端 | 强制类型转换为方块预设 |
+| [ToUIPreset](#touipreset) | 客户端/服务端 | 强制类型转换为UI预设 |
+| [GetServerSystem](#getserversystem) | 客户端/服务端 | 返回当前对象可使用的服务端system |
+| [GetClientSystem](#getclientsystem) | 客户端/服务端 | 返回当前对象可使用的客户端system |
+| [GetSystem](#getsystem) | 客户端/服务端 | 返回当前对象可使用的system |
+| [GetLevelId](#getlevelid) | 客户端/服务端 | 获取当前对象所在的level_id |
+| [CreateComponent](#createcomponent) | 客户端/服务端 | 给实体创建组件 |
+| [GetMinecraftEnum](#getminecraftenum) | 客户端/服务端 | 用于获取枚举值文档中的枚举值 |
+| [DestroyEntity](#destroyentity) | 客户端/服务端 | 销毁实体 |
+| [CreateActionComponent](#createactioncomponent) | 服务端 | 创建action组件 |
+| [SetEntityAttackTarget](#setentityattacktarget) | 服务端 | 设置仇恨目标 |
+| [ResetEntityAttackTarget](#resetentityattacktarget) | 服务端 | 清除仇恨目标 |
+| [GetEntityAttackTarget](#getentityattacktarget) | 服务端 | 获取仇恨目标 |
+| [SetMobKnockback](#setmobknockback) | 服务端 | 设置击退的初始速度,需要考虑阻力的影响 |
+| [CreateActorLootComponent](#createactorlootcomponent) | 服务端 | 创建actorLoot组件 |
+| [SpawnLootTable](#spawnloottable) | 服务端 | 使用生物类型模拟一次随机掉落,生成的物品与json定义的概率有关 |
+| [SpawnLootTableWithActor](#spawnloottablewithactor) | 服务端 | 使用生物实例模拟一次随机掉落,生成的物品与json定义的概率有关 |
+| [CreateActorMotionComponent](#createactormotioncomponent) | 客户端/服务端 | 创建actorMotion组件 |
+| [GetDirFromRot](#getdirfromrot) | 客户端/服务端 | 通过旋转角度获取朝向 |
+| [SetEntityMotion](#setentitymotion) | 客户端/服务端 | 设置生物的瞬时移动方向向量,服务端只能对非玩家使用,客户端只能对本地玩家使用 |
+| [GetEntityMotion](#getentitymotion) | 客户端/服务端 | 获取生物(含玩家)的瞬时移动方向向量 |
+| [GetInputVector](#getinputvector) | 客户端 | 获取本地玩家方向键(移动轮盘)的输入 |
+| [LockInputVector](#lockinputvector) | 客户端 | 锁定本地玩家方向键(移动轮盘)的输入,可使本地玩家持续向指定方向前行,且不会再受玩家输入影响 |
+| [UnlockInputVector](#unlockinputvector) | 客户端 | 解锁本地玩家方向键(移动轮盘)的输入 |
+| [CreateActorOwnerComponent](#createactorownercomponent) | 服务端 | 创建actorOwner组件 |
+| [SetEntityOwner](#setentityowner) | 服务端 | 设置实体的属主 |
+| [GetEntityOwner](#getentityowner) | 服务端 | 获取实体的属主 |
+| [CreateActorPushableComponent](#createactorpushablecomponent) | 服务端 | 创建actorPushable组件 |
+| [SetActorPushable](#setactorpushable) | 服务端 | 设置实体是否可推动 |
+| [CreateAttrComponent](#createattrcomponent) | 客户端/服务端 | 创建attr组件 |
+| [IsEntityOnFire](#isentityonfire) | 服务端 | 获取实体是否着火 |
+| [SetEntityOnFire](#setentityonfire) | 服务端 | 设置实体着火 |
+| [GetEntityAttrValue](#getentityattrvalue) | 服务端 | 获取属性值,包括生命值,饥饿度,移速 |
+| [GetEntityAttrMaxValue](#getentityattrmaxvalue) | 服务端 | 获取属性最大值,包括生命值,饥饿度,移速 |
+| [SetEntityAttrValue](#setentityattrvalue) | 服务端 | 设置属性值,包括生命值,饥饿度,移速 |
+| [SetEntityAttrMaxValue](#setentityattrmaxvalue) | 服务端 | 设置属性最大值,包括生命值,饥饿度,移速 |
+| [SetPlayerStepHeight](#setplayerstepheight) | 服务端 | 设置玩家前进非跳跃状态下能上的最大台阶高度, 默认值为0.5625,1的话表示能上一个台阶 |
+| [GetPlayerStepHeight](#getplayerstepheight) | 服务端 | 返回玩家前进非跳跃状态下能上的最大台阶高度 |
+| [ResetPlayerStepHeight](#resetplayerstepheight) | 服务端 | 恢复引擎默认玩家前进非跳跃状态下能上的最大台阶高度 |
+| [IsEntityInLava](#isentityinlava) | 客户端 | 实体是否在岩浆中 |
+| [IsEntityOnGround](#isentityonground) | 客户端 | 实体是否触地 |
+| [CreateAuxValueComponent](#createauxvaluecomponent) | 客户端/服务端 | 创建auxValue组件 |
+| [GetEntityAuxValue](#getentityauxvalue) | 客户端/服务端 | 获取射出的弓箭或投掷出的药水的附加值 |
+| [CreateBiomeComponent](#createbiomecomponent) | 服务端 | 创建biome组件 |
+| [GetBiomeName](#getbiomename) | 服务端 | 获取某一位置所属的生物群系信息 |
+| [CreateBlockComponent](#createblockcomponent) | 服务端 | 创建block组件 |
+| [RegisterBlockPatterns](#registerblockpatterns) | 服务端 | 注册特殊方块组合 |
+| [CreateMicroBlockResStr](#createmicroblockresstr) | 服务端 | 生成微缩方块资源Json字符串 |
+| [CreateBlockEntityData](#createblockentitydata) | 服务端 | 创建blockEntityData组件 |
+| [GetCustomBlockEntityData](#getcustomblockentitydata) | 服务端 | 用于获取可操作某个自定义方块实体数据的对象,操作方式与dict类似 |
+| [CreateBlockInfoComponent](#createblockinfocomponent) | 客户端/服务端 | 创建blockInfo组件 |
+| [GetBlock](#getblock) | 客户端/服务端 | 获取某一位置的block |
+| [SetBlock](#setblock) | 服务端 | 设置某一位置的方块 |
+| [GetTopBlockHeight](#gettopblockheight) | 客户端/服务端 | 获取当前维度某一位置最高的非空气方块的高度 |
+| [GetBlockDestroyTime](#getblockdestroytime) | 客户端/服务端 | 获取使用物品破坏方块需要的时间 |
+| [GetBlockEntityData](#getblockentitydata) | 服务端 | 用于获取方块(包括自定义方块)的数据,数据只读不可写 |
+| [CreateBlockStateComponent](#createblockstatecomponent) | 服务端 | 创建blockState组件 |
+| [GetBlockStates](#getblockstates) | 服务端 | 获取 方块状态 |
+| [SetBlockStates](#setblockstates) | 服务端 | 设置 方块状态 |
+| [GetBlockAuxValueFromStates](#getblockauxvaluefromstates) | 服务端 | 根据方块名称和 方块状态 获取方块附加值AuxValue |
+| [GetBlockStatesFromAuxValue](#getblockstatesfromauxvalue) | 服务端 | 根据方块名称和方块附加值AuxValue获取 方块状态 |
+| [CreateBlockUseEventWhiteList](#createblockuseeventwhitelist) | 客户端/服务端 | 创建blockUseEventWhiteList组件 |
+| [AddBlockItemListenForUseEvent](#addblockitemlistenforuseevent) | 客户端/服务端 | 增加blockName方块对ServerBlockUseEvent事件的脚本层监听 |
+| [RemoveBlockItemListenForUseEvent](#removeblockitemlistenforuseevent) | 客户端/服务端 | 移除blockName方块对ServerBlockUseEvent事件的脚本层监听 |
+| [ClearAllListenForBlockUseEventItems](#clearalllistenforblockuseeventitems) | 客户端/服务端 | 清空所有已添加方块对ServerBlockUseEvent事件的脚本层监听 |
+| [CreateBreathComponent](#createbreathcomponent) | 服务端 | 创建breath组件 |
+| [GetUnitBubbleAirSupply](#getunitbubbleairsupply) | 服务端 | 单位气泡数对应的氧气储备值 |
+| [GetEntityCurrentAirSupply](#getentitycurrentairsupply) | 服务端 | 生物当前氧气储备值 |
+| [GetEntityMaxAirSupply](#getentitymaxairsupply) | 服务端 | 获取生物最大氧气储备值 |
+| [SetEntityCurrentAirSupply](#setentitycurrentairsupply) | 服务端 | 设置生物氧气储备值 |
+| [SetEntityMaxAirSupply](#setentitymaxairsupply) | 服务端 | 设置生物最大氧气储备值 |
+| [IsEntityConsumingAirSupply](#isentityconsumingairsupply) | 服务端 | 获取生物当前是否在消耗氧气 |
+| [SetEntityRecoverTotalAirSupplyTime](#setentityrecovertotalairsupplytime) | 服务端 | 设置恢复最大氧气量的时间,单位秒 |
+| [CreateBulletAttributesComponent](#createbulletattributescomponent) | 服务端 | 创建bulletAttributes组件 |
+| [GetEntitySourceId](#getentitysourceid) | 服务端 | 获取抛射物发射者实体id |
+| [CreateChestBlockComponent](#createchestblockcomponent) | 服务端 | 创建chestBlock组件 |
+| [GetChestBoxSize](#getchestboxsize) | 服务端 | 获取箱子容量大小 |
+| [SetChestBoxItemNum](#setchestboxitemnum) | 服务端 | 设置箱子槽位物品数目 |
+| [SetChestBoxItemExchange](#setchestboxitemexchange) | 服务端 | 交换箱子里物品的槽位 |
+| [CreateChunkSourceComponent](#createchunksourcecomponent) | 客户端/服务端 | 创建chunkSource组件 |
+| [SetAddArea](#setaddarea) | 服务端 | 设置区块的常加载 |
+| [DeleteArea](#deletearea) | 服务端 | 删除一个常加载区域 |
+| [DeleteAllArea](#deleteallarea) | 服务端 | 删除所有常加载区域 |
+| [GetAllAreaKeys](#getallareakeys) | 服务端 | 获取所有常加载区域名称列表 |
+| [CheckChunkState](#checkchunkstate) | 服务端 | 判断指定位置的chunk是否加载完成 |
+| [GetLoadedChunks](#getloadedchunks) | 服务端 | 获取指定维度当前已经加载完毕的全部区块的坐标列表 |
+| [GetChunkEntities](#getchunkentities) | 服务端 | 获取指定位置的区块中,全部的实体和玩家的ID列表 |
+| [GetChunkMobNum](#getchunkmobnum) | 服务端 | 获取某区块中的生物数量(不包括玩家,但包括盔甲架) |
+| [IsChunkGenerated](#ischunkgenerated) | 服务端 | 获取某个区块是否生成过。 |
+| [CreateCollisionBoxComponent](#createcollisionboxcomponent) | 服务端 | 创建collisionBox组件 |
+| [SetEntityCollisionBoxSize](#setentitycollisionboxsize) | 服务端 | 设置实体的包围盒 |
+| [GetEntityCollisionBoxSize](#getentitycollisionboxsize) | 服务端 | 获取实体的包围盒 |
+| [CreateCommandComponent](#createcommandcomponent) | 服务端 | 创建command组件 |
+| [SetCommand](#setcommand) | 服务端 | 使用游戏内指令 |
+| [GetCommandPermissionLevel](#getcommandpermissionlevel) | 服务端 | 返回设定使用/op命令时OP的权限等级(对应server.properties中的op-permission-level配置) |
+| [SetCommandPermissionLevel](#setcommandpermissionlevel) | 服务端 | 设置当玩家使用/op命令时OP的权限等级(对应server.properties中的op-permission-level配置) |
+| [GetDefaultPlayerPermissionLevel](#getdefaultplayerpermissionlevel) | 服务端 | 返回新玩家加入时的权限身份(对应server.properties中的default-player-permission-level配置) |
+| [SetDefaultPlayerPermissionLevel](#setdefaultplayerpermissionlevel) | 服务端 | 设置新玩家加入时的权限身份(对应server.properties中的default-player-permission-level配置) |
+| [CreateControlAiComponent](#createcontrolaicomponent) | 服务端 | 创建controlAi组件 |
+| [SetEntityBlockControlAi](#setentityblockcontrolai) | 服务端 | 设置屏蔽生物原生AI |
+| [CreateDimensionComponent](#createdimensioncomponent) | 服务端 | 创建dimension组件 |
+| [GetEntityDimensionId](#getentitydimensionid) | 服务端 | 获取实体所在维度 |
+| [ChangeEntityDimension](#changeentitydimension) | 服务端 | 传送玩家以外的实体 |
+| [ChangePlayerDimension](#changeplayerdimension) | 服务端 | 传送玩家 |
+| [MirrorDimension](#mirrordimension) | 服务端 | 复制不同dimension的地形 |
+| [CreateDimension](#createdimension) | 服务端 | 创建新的dimension |
+| [RegisterEntityAOIEvent](#registerentityaoievent) | 服务端 | 注册感应区域,有实体进入时和离开时会有消息通知 |
+| [UnRegisterEntityAOIEvent](#unregisterentityaoievent) | 服务端 | 反注册感应区域 |
+| [SetUseLocalTime](#setuselocaltime) | 服务端 | 让某个维度拥有自己的局部时间规则,开启后该维度可以拥有与其他维度不同的时间与是否昼夜更替的规则 |
+| [GetUseLocalTime](#getuselocaltime) | 服务端 | 获取某个维度是否设置了使用局部时间规则 |
+| [SetLocalTime](#setlocaltime) | 服务端 | 设置使用局部时间规则维度的时间 |
+| [SetLocalTimeOfDay](#setlocaltimeofday) | 服务端 | 设置使用局部时间规则维度在一天内所在的时间 |
+| [GetLocalTime](#getlocaltime) | 服务端 | 获取维度的时间 |
+| [SetLocalDoDayNightCycle](#setlocaldodaynightcycle) | 服务端 | 设置使用局部时间规则的维度是否打开昼夜更替 |
+| [GetLocalDoDayNightCycle](#getlocaldodaynightcycle) | 服务端 | 获取维度是否打开昼夜更替 |
+| [CreateEffectComponent](#createeffectcomponent) | 服务端 | 创建effect组件 |
+| [RemoveEffectFromEntity](#removeeffectfromentity) | 服务端 | 为实体删除指定状态效果 |
+| [AddEffectToEntity](#addeffecttoentity) | 服务端 | 为实体添加指定状态效果,如果添加的状态已存在则有以下集中情况:1、等级大于已存在则更新状态等级及持续时间;2、状态等级相等且剩余时间duration大于已存在则刷新剩余时间;3、等级小于已存在则不做修改;4、粒子效果以新的为准 |
+| [GetEntityEffects](#getentityeffects) | 服务端 | 获取实体当前所有状态效果 |
+| [CreateEngineTypeComponent](#createenginetypecomponent) | 客户端/服务端 | 创建engineType组件 |
+| [GetEntityEngineTypeStr](#getentityenginetypestr) | 客户端/服务端 | 获取实体的类型名称 |
+| [GetEntityEngineType](#getentityenginetype) | 客户端/服务端 | 获取实体类型 |
+| [CreateEntityEventComponent](#createentityeventcomponent) | 服务端 | 创建entityEvent组件 |
+| [TriggerEntityCustomEvent](#triggerentitycustomevent) | 服务端 | 触发生物自定义事件 |
+| [CreateExtraDataComponent](#createextradatacomponent) | 服务端 | 创建extraData组件 |
+| [GetExtraData](#getextradata) | 服务端 | 获取实体的自定义数据或者世界的自定义数据,某个键所对应的值。获取实体数据传入对应实体id |
+| [SaveExtraData](#saveextradata) | 服务端 | 用于保存实体的自定义数据或者世界的自定义数据 |
+| [SetExtraData](#setextradata) | 服务端 | 用于设置实体的自定义数据或者世界的自定义数据,数据以键值对的形式保存。设置实体数据时使用对应实体id创建组件,设置世界数据时使用levelId创建组件 |
+| [CleanExtraData](#cleanextradata) | 服务端 | 清除实体的自定义数据或者世界的自定义数据,清除实体数据时使用对应实体id创建组件,清除世界数据时使用levelId创建组件 |
+| [GetWholeExtraData](#getwholeextradata) | 服务端 | 获取完整的实体的自定义数据或者世界的自定义数据,获取实体数据时使用对应实体id创建组件,获取世界数据时使用levelId创建组件 |
+| [CreateExpComponent](#createexpcomponent) | 服务端 | 创建exp组件 |
+| [GetPlayerExp](#getplayerexp) | 服务端 | 获取玩家当前等级下的经验值 |
+| [AddPlayerExp](#addplayerexp) | 服务端 | 增加玩家经验值 |
+| [GetPlayerTotalExp](#getplayertotalexp) | 服务端 | 获取玩家的总经验值 |
+| [SetPlayerTotalExp](#setplayertotalexp) | 服务端 | 设置玩家的总经验值 |
+| [GetOrbExperience](#getorbexperience) | 服务端 | 获取经验球的经验 |
+| [SetOrbExperience](#setorbexperience) | 服务端 | 设置经验球经验 |
+| [CreateExperienceOrb](#createexperienceorb) | 服务端 | 创建专属经验球 |
+| [CreateExplosionComponent](#createexplosioncomponent) | 服务端 | 创建explosion组件 |
+| [CreateExplosion](#createexplosion) | 服务端 | 用于生成爆炸 |
+| [CreateFeatureComponent](#createfeaturecomponent) | 服务端 | 创建feature组件 |
+| [AddNeteaseFeatureWhiteList](#addneteasefeaturewhitelist) | 服务端 | 添加结构对PlaceNeteaseStructureFeatureEvent事件的脚本层监听 |
+| [RemoveNeteaseFeatureWhiteList](#removeneteasefeaturewhitelist) | 服务端 | 移除structureName对PlaceNeteaseStructureFeatureEvent事件的脚本层监听 |
+| [ClearAllNeteaseFeatureWhiteList](#clearallneteasefeaturewhitelist) | 服务端 | 清空所有已添加Netease Structure Feature对PlaceNeteaseStructureFeatureEvent事件的脚本层监听 |
+| [LocateStructureFeature](#locatestructurefeature) | 服务端 | 与[/locate指令](https://zh.minecraft.wiki/w/%E5%91%BD%E4%BB%A4/locate)相似,用于定位原版的部分结构,如海底神殿、末地城等。 |
+| [LocateNeteaseFeatureRule](#locateneteasefeaturerule) | 服务端 | 与[/locate指令](https://zh.minecraft.wiki/w/%E5%91%BD%E4%BB%A4/locate)相似,用于定位 网易自定义特征规则 |
+| [CreateFlyComponent](#createflycomponent) | 服务端 | 创建fly组件 |
+| [IsPlayerFlying](#isplayerflying) | 服务端 | 获取玩家是否在飞行 |
+| [ChangePlayerFlyState](#changeplayerflystate) | 服务端 | 给予/取消飞行能力,并且进入飞行/非飞行状态 |
+| [CreateGameComponent](#creategamecomponent) | 客户端/服务端 | 创建game组件 |
+| [AddBlockProtectField](#addblockprotectfield) | 服务端 | 设置一个方块无法被玩家/实体破坏的区域 |
+| [RemoveBlockProtectField](#removeblockprotectfield) | 服务端 | 取消一个方块无法被玩家/实体破坏的区域 |
+| [CleanBlockProtectField](#cleanblockprotectfield) | 服务端 | 取消全部已设置的方块无法被玩家/实体破坏的区域 |
+| [KillEntity](#killentity) | 服务端 | 杀死某个Entity |
+| [CreateEngineEntityByTypeStr](#createengineentitybytypestr) | 服务端 | 创建指定identifier的实体 |
+| [PlaceStructure](#placestructure) | 服务端 | 放置结构 |
+| [AddTimer](#addtimer) | 客户端/服务端 | 添加定时器,非重复 |
+| [AddRepeatedTimer](#addrepeatedtimer) | 客户端/服务端 | 添加服务端触发的定时器,重复执行 |
+| [CancelTimer](#canceltimer) | 客户端/服务端 | 取消定时器 |
+| [GetEntitiesInArea](#getentitiesinarea) | 客户端/服务端 | 获取区域内的entity列表 |
+| [GetEntitiesAround](#getentitiesaround) | 服务端 | 获取区域内的entity列表 |
+| [ShowHealthBar](#showhealthbar) | 客户端 | 设置是否显示血条 |
+| [SetNameDeeptest](#setnamedeeptest) | 客户端 | 设置名字是否透视 |
+| [GetScreenSize](#getscreensize) | 客户端 | 获取游戏分辨率 |
+| [SetRenderLocalPlayer](#setrenderlocalplayer) | 客户端 | 设置本地玩家是否渲染 |
+| [AddPickBlacklist](#addpickblacklist) | 客户端 | 添加使用camera组件选取实体时的黑名单,即该实体不会被选取到 |
+| [ClearPickBlacklist](#clearpickblacklist) | 客户端 | 清除使用camera组件选取实体的黑名单 |
+| [CheckWordsValid](#checkwordsvalid) | 客户端/服务端 | 检查语句是否合法,即不包含敏感词 |
+| [CheckNameValid](#checknamevalid) | 客户端/服务端 | 检查昵称是否合法,即不包含敏感词 |
+| [GetScreenViewInfo](#getscreenviewinfo) | 客户端 | 获取游戏视角信息。分辨率为1313,618时,画布是376,250的2倍,所以viewport得到的是1313 + (2-(1313%2)),y值类似,可参考 《我的世界》界面适配方法 |
+| [SimulateTouchWithMouse](#simulatetouchwithmouse) | 客户端 | 模拟使用鼠标控制UI(PC F11快捷键) |
+| [GetCurrentDimension](#getcurrentdimension) | 客户端 | 获取客户端当前维度 |
+| [GetChinese](#getchinese) | 客户端/服务端 | 获取langStr对应的中文,可参考PC开发包中\handheld\bed-loc\handheld\data\resource_packs\vanilla\texts\zh_CN.lang |
+| [SetDisableHunger](#setdisablehunger) | 服务端 | 设置是否屏蔽饥饿度 |
+| [SetOneTipMessage](#setonetipmessage) | 服务端 | 在具体某个玩家的物品栏上方弹出tip类型通知,位置位于popup类型通知上方,此功能更建议在客户端使用game组件的对应接口SetTipMessage |
+| [SetPopupNotice](#setpopupnotice) | 客户端/服务端 | 在物品栏上方弹出popup类型通知,位置位于tip类型消息下方,服务端调用是针对全体玩家,客户端调用只影响本地玩家 |
+| [SetTipMessage](#settipmessage) | 客户端/服务端 | 在物品栏上方弹出tip类型通知,位置位于popup类型通知上方,服务端调用是针对全体玩家,客户端调用只影响本地玩家 |
+| [SetNotifyMsg](#setnotifymsg) | 服务端 | 设置消息通知 |
+| [GetPlayerGameType](#getplayergametype) | 服务端 | 获取指定玩家的游戏模式 |
+| [HasEntity](#hasentity) | 客户端/服务端 | 判断 entity 是否存在 |
+| [IsEntityAlive](#isentityalive) | 客户端/服务端 | 判断生物实体是否存活或非生物实体是否存在 |
+| [CreateGravityComponent](#creategravitycomponent) | 服务端 | 创建gravity组件 |
+| [GetEntityGravity](#getentitygravity) | 服务端 | 获取实体的重力因子,当生物重力因子为0时则应用世界的重力因子 |
+| [SetEntityGravity](#setentitygravity) | 服务端 | 设置实体的重力因子,当生物重力因子为0时则应用世界的重力因子 |
+| [CreateHurtComponent](#createhurtcomponent) | 服务端 | 创建hurt组件 |
+| [SetHurtByEntity](#sethurtbyentity) | 服务端 | 对实体造成伤害 |
+| [SetHurtByEntityNew](#sethurtbyentitynew) | 服务端 | 对实体造成伤害 |
+| [SetEntityImmuneDamage](#setentityimmunedamage) | 服务端 | 设置实体是否免疫伤害(该属性存档) |
+| [CreateItemBannedComponent](#createitembannedcomponent) | 服务端 | 创建itembanned组件 |
+| [AddBannedItem](#addbanneditem) | 服务端 | 增加禁用物品 |
+| [GetBannedItemList](#getbanneditemlist) | 服务端 | 获取禁用物品列表 |
+| [RemoveBannedItem](#removebanneditem) | 服务端 | 移除禁用物品 |
+| [ClearBannedItems](#clearbanneditems) | 服务端 | 清空禁用物品 |
+| [CreateItemComponent](#createitemcomponent) | 客户端/服务端 | 创建item组件 |
+| [GetItemBasicInfo](#getitembasicinfo) | 客户端/服务端 | 获取物品的基础信息 |
+| [GetLocalPlayerId](#getlocalplayerid) | 客户端 | 获取本地玩家的id |
+| [ClearPlayerOffHand](#clearplayeroffhand) | 服务端 | 清除玩家左手物品 |
+| [GetPlayerItem](#getplayeritem) | 服务端 | 获取玩家物品,支持获取背包,盔甲栏,副手以及主手物品 |
+| [ChangePlayerItemTipsAndExtraId](#changeplayeritemtipsandextraid) | 服务端 | 修改玩家物品的自定义tips和自定义标识符 |
+| [AddEnchantToInvItem](#addenchanttoinvitem) | 服务端 | 给物品栏的物品添加附魔信息 |
+| [GetInvItemEnchantData](#getinvitemenchantdata) | 服务端 | 获取物品栏的物品附魔信息 |
+| [GetOffhandItem](#getoffhanditem) | 客户端 | 获取左手物品的信息 |
+| [SetInvItemNum](#setinvitemnum) | 服务端 | 设置玩家背包物品数目 |
+| [SpawnItemToLevel](#spawnitemtolevel) | 服务端 | 生成物品掉落物,如果需要获取物品的entityId,可以调用服务端系统接口CreateEngineItemEntity |
+| [SpawnItemToPlayerInv](#spawnitemtoplayerinv) | 服务端 | 生成物品到玩家背包 |
+| [SpawnItemToPlayerCarried](#spawnitemtoplayercarried) | 服务端 | 生成物品到玩家右手 |
+| [GetCarriedItem](#getcarrieditem) | 客户端 | 获取右手物品的信息 |
+| [GetSlotId](#getslotid) | 客户端 | 获取当前手持的快捷栏的槽id |
+| [GetItemFormattedHoverText](#getitemformattedhovertext) | 客户端 | 获取物品的格式化hover文本,如:§f灾厄旗帜§r |
+| [GetItemHoverName](#getitemhovername) | 客户端 | 获取物品的hover名称,如:灾厄旗帜§r |
+| [GetItemEffectName](#getitemeffectname) | 客户端 | 获取物品的状态描述,如:§7保护 0§r |
+| [GetUserDataInEvent](#getuserdatainevent) | 客户端/服务端 | 使物品相关客户端事件的 物品信息字典 参数带有userData。在mod初始化时调用即可 |
+| [ChangeItemTexture](#changeitemtexture) | 客户端 | 替换物品的贴图,修改后所有用到该贴图的物品都会被改变,后续创建的此类物品也会被改变。会同时修改物品在UI界面上的显示,手持时候的显示与场景掉落的显示。 |
+| [CreateLvComponent](#createlvcomponent) | 服务端 | 创建lv组件 |
+| [GetPlayerLevel](#getplayerlevel) | 服务端 | 获取玩家等级 |
+| [AddPlayerLevel](#addplayerlevel) | 服务端 | 修改玩家等级 |
+| [CreateMobSpawnComponent](#createmobspawncomponent) | 服务端 | 创建mobSpawn组件 |
+| [SpawnCustomModule](#spawncustommodule) | 服务端 | 设置自定义刷怪 |
+| [CreateModAttrComponent](#createmodattrcomponent) | 客户端/服务端 | 创建modAttr组件 |
+| [SetEntityModAttr](#setentitymodattr) | 客户端/服务端 | 设置属性值 |
+| [GetEntityModAttr](#getentitymodattr) | 客户端/服务端 | 获取属性值 |
+| [RegisterEntityModAttrUpdateFunc](#registerentitymodattrupdatefunc) | 客户端 | 注册属性值变换时的回调函数,当属性变化时会调用该函数 |
+| [UnRegisterEntityModAttrUpdateFunc](#unregisterentitymodattrupdatefunc) | 客户端 | 反注册属性值变换时的回调函数 |
+| [CreateModelComponent](#createmodelcomponent) | 客户端/服务端 | 创建model组件 |
+| [SetEntityOpacity](#setentityopacity) | 客户端 | 设置生物模型的透明度 |
+| [PlayEntityAnim](#playentityanim) | 客户端 | 播放骨骼动画 |
+| [GetEntityModelId](#getentitymodelid) | 客户端 | 获取骨骼模型的Id,主要用于特效绑定骨骼模型 |
+| [SetEntityModel](#setentitymodel) | 客户端/服务端 | 设置骨骼模型 |
+| [ResetEntityModel](#resetentitymodel) | 客户端 | 恢复实体为原版模型 |
+| [BindModelToEntity](#bindmodeltoentity) | 客户端 | 实体替换骨骼模型后,再往上其他挂接骨骼模型。 |
+| [UnBindModelToEntity](#unbindmodeltoentity) | 客户端 | 取消实体上挂接的某个骨骼模型。取消挂接后,这个modelId的模型便会销毁,无法再使用,如果是临时隐藏可以使用HideModel |
+| [CreateMoveToComponent](#createmovetocomponent) | 服务端 | 创建moveTo组件 |
+| [SetEntityMoveSetting](#setentitymovesetting) | 服务端 | 寻路组件 |
+| [CreateMsgComponent](#createmsgcomponent) | 服务端 | 创建msg组件 |
+| [SendMsg](#sendmsg) | 服务端 | 模拟玩家给所有人发送聊天栏消息 |
+| [SendMsgToPlayer](#sendmsgtoplayer) | 服务端 | 模拟玩家给另一个玩家发送聊天栏消息 |
+| [NotifyOneMessage](#notifyonemessage) | 服务端 | 给指定玩家发送聊天框消息 |
+| [CreateNameComponent](#createnamecomponent) | 客户端/服务端 | 创建name组件 |
+| [GetEntityName](#getentityname) | 服务端 | 获取生物的自定义名称,即使用命名牌或者SetName接口设置的名称 |
+| [SetEntityName](#setentityname) | 服务端 | 用于设置生物的自定义名称,跟原版命名牌作用相同,玩家和新版流浪商人暂不支持 |
+| [SetPlayerPrefixAndSuffixName](#setplayerprefixandsuffixname) | 服务端 | 设置玩家前缀和后缀名字 |
+| [SetEntityShowName](#setentityshowname) | 客户端 | 设置生物名字是否按照默认游戏逻辑显示 |
+| [SetEntityAlwaysShowName](#setentityalwaysshowname) | 客户端 | 设置生物名字是否一直显示,瞄准点不指向生物时也能显示 |
+| [CreatePersistenceComponent](#createpersistencecomponent) | 服务端 | 创建persistence组件 |
+| [SetEntityPersistence](#setentitypersistence) | 服务端 | 设置实体是否存盘 |
+| [CreatePetComponent](#createpetcomponent) | 服务端 | 创建pet组件 |
+| [DisablePet](#disablepet) | 服务端 | 关闭官方伙伴功能,单人游戏以及本地联机不支持该接口 |
+| [EnablePet](#enablepet) | 服务端 | 启用官方伙伴功能,单人游戏以及本地联机不支持该接口 |
+| [CreatePlayerComponent](#createplayercomponent) | 服务端 | 创建player组件 |
+| [EnablePlayerKeepInventory](#enableplayerkeepinventory) | 客户端/服务端 | 设置玩家死亡不掉落物品 |
+| [CreatePortalComponent](#createportalcomponent) | 服务端 | 创建portal组件 |
+| [CreatePosComponent](#createposcomponent) | 客户端/服务端 | 创建pos组件 |
+| [GetEntityPos](#getentitypos) | 客户端/服务端 | 获取实体位置 |
+| [GetEntityFootPos](#getentityfootpos) | 客户端/服务端 | 获取实体脚所在的位置 |
+| [SetEntityPos](#setentitypos) | 服务端 | 设置实体位置 |
+| [SetEntityFootPos](#setentityfootpos) | 服务端 | 设置实体脚底所在的位置 |
+| [CreateProjectileComponent](#createprojectilecomponent) | 服务端 | 创建projectile组件 |
+| [CreateProjectileEntity](#createprojectileentity) | 服务端 | 创建抛射物(直接发射) |
+| [CreateRecipeComponent](#createrecipecomponent) | 客户端/服务端 | 创建recipe组件 |
+| [GetRecipeResult](#getreciperesult) | 服务端 | 根据配方id获取配方结果。仅支持合成配方 |
+| [GetRecipesByResult](#getrecipesbyresult) | 客户端/服务端 | 通过输出物品查询配方所需要的输入材料 |
+| [GetRecipesByInput](#getrecipesbyinput) | 客户端/服务端 | 通过输入物品查询配方 |
+| [CreateRedStoneComponent](#createredstonecomponent) | 服务端 | 创建redStone组件 |
+| [CreateRideComponent](#createridecomponent) | 服务端 | 创建ride组件 |
+| [CreateRotComponent](#createrotcomponent) | 客户端/服务端 | 创建rot组件 |
+| [GetEntityRot](#getentityrot) | 客户端/服务端 | 获取实体角度 |
+| [SetEntityRot](#setentityrot) | 客户端/服务端 | 设置实体的头的角度 |
+| [SetEntityLookAtPos](#setentitylookatpos) | 服务端 | 设置非玩家的实体看向某个位置 |
+| [GetBodyRot](#getbodyrot) | 客户端 | 获取实体的身体的角度 |
+| [LockLocalPlayerRot](#locklocalplayerrot) | 客户端 | 在分离摄像机时,锁定本地玩家的头部角度 |
+| [SetPlayerLookAtPos](#setplayerlookatpos) | 客户端 | 设置本地玩家看向某个位置 |
+| [CreateScaleComponent](#createscalecomponent) | 服务端 | 创建scale组件 |
+| [CreateTameComponent](#createtamecomponent) | 服务端 | 创建tame组件 |
+| [CreateTimeComponent](#createtimecomponent) | 服务端 | 创建time组件 |
+| [GetTime](#gettime) | 服务端 | 获取当前世界时间 |
+| [CreateWeatherComponent](#createweathercomponent) | 服务端 | 创建weather组件 |
+| [CreateActorCollidableComponent](#createactorcollidablecomponent) | 客户端 | 创建actorCollidable组件 |
+| [CreateActorRenderComponent](#createactorrendercomponent) | 客户端 | 创建actorRender组件 |
+| [CreateCustomAudioComponent](#createcustomaudiocomponent) | 客户端 | 创建customAudio组件 |
+| [CreateBrightnessComponent](#createbrightnesscomponent) | 客户端 | 创建brightness组件 |
+| [SetEntityBrightness](#setentitybrightness) | 客户端/服务端 | 设置实体的亮度 |
+| [CreateCameraComponent](#createcameracomponent) | 客户端 | 创建camera组件 |
+| [PickFacing](#pickfacing) | 客户端 | 获取准星选中的实体或者方块 |
+| [CreateFogComponent](#createfogcomponent) | 客户端 | 创建fog组件 |
+| [CreateFrameAniControlComponent](#createframeanicontrolcomponent) | 客户端 | 创建frameAniControl组件 |
+| [SetFrameAniLoop](#setframeaniloop) | 客户端 | 设置序列帧是否循环播放,默认为否 |
+| [SetFrameAniFaceCamera](#setframeanifacecamera) | 客户端 | 设置序列帧是否始终朝向摄像机,默认为是 |
+| [SetFrameAniDeepTest](#setframeanideeptest) | 客户端 | 设置序列帧是否透视,默认为否 |
+| [CreateFrameAniEntityBindComponent](#createframeanientitybindcomponent) | 客户端 | 创建frameAniEntityBind组件 |
+| [BindFrameAniToEntity](#bindframeanitoentity) | 客户端/服务端 | 绑定entity |
+| [CreateFrameAniSkeletonBindComponent](#createframeaniskeletonbindcomponent) | 客户端 | 创建frameAniSkeletonBind组件 |
+| [BindFrameAniToSkeleton](#bindframeanitoskeleton) | 客户端/服务端 | 绑定骨骼模型 |
+| [CreateFrameAniTransComponent](#createframeanitranscomponent) | 客户端 | 创建frameAniTrans组件 |
+| [GetFrameAniPos](#getframeanipos) | 客户端 | 获取序列帧位置 |
+| [GetFrameAniRot](#getframeanirot) | 客户端 | 获取序列帧的角度 |
+| [GetFrameAniScale](#getframeaniscale) | 客户端 | 获取序列帧的缩放 |
+| [SetFrameAniPos](#setframeanipos) | 客户端 | 设置序列帧位置 |
+| [SetFrameAniRot](#setframeanirot) | 客户端 | 设置特效的角度 |
+| [SetFrameAniScale](#setframeaniscale) | 客户端 | 设置序列帧的缩放 |
+| [CreateHealthComponent](#createhealthcomponent) | 客户端 | 创建health组件 |
+| [ShowEntityHealth](#showentityhealth) | 客户端 | 设置某个entity是否显示血条,默认为显示 |
+| [CreateOperationComponent](#createoperationcomponent) | 客户端 | 创建operation组件 |
+| [SetCanAll](#setcanall) | 客户端 | 同时设置SetCanMove,SetCanJump,SetCanAttack,SetCanWalkMode,SetCanPerspective,SetCanPause,SetCanChat,SetCanScreenShot,SetCanOpenInv,SetCanDrag,SetCanInair |
+| [CreateDeviceComponent](#createdevicecomponent) | 客户端 | 创建device组件 |
+| [CreateParticleControlComponent](#createparticlecontrolcomponent) | 客户端 | 创建particleControl组件 |
+| [CreateParticleEntityBindComponent](#createparticleentitybindcomponent) | 客户端 | 创建particleEntityBind组件 |
+| [BindParticleToEntity](#bindparticletoentity) | 客户端/服务端 | 粒子特效绑定entity |
+| [CreateParticleSkeletonBindComponent](#createparticleskeletonbindcomponent) | 客户端 | 创建particleSkeletonBind组件 |
+| [BindParticleToSkeleton](#bindparticletoskeleton) | 客户端/服务端 | 绑定粒子特效到骨骼模型 |
+| [CreateParticleTransComponent](#createparticletranscomponent) | 客户端 | 创建particleTrans组件 |
+| [GetParticlePos](#getparticlepos) | 客户端 | 获取特效位置 |
+| [GetParticleRot](#getparticlerot) | 客户端 | 获取特效角度 |
+| [SetParticlePos](#setparticlepos) | 客户端 | 设置特效位置 |
+| [SetParticleRot](#setparticlerot) | 客户端/服务端 | 设置特效的角度 |
+| [CreatePlayerViewComponent](#createplayerviewcomponent) | 客户端 | 创建playerView组件 |
+| [GetPlayerPerspective](#getplayerperspective) | 客户端 | 获取当前的视角模式 |
+| [SetPlayerPerspective](#setplayerperspective) | 客户端 | 设置视角模式 |
+| [LockPlayerPerspective](#lockplayerperspective) | 客户端 | 锁定玩家的视角模式 |
+| [CreateQueryVariableComponent](#createqueryvariablecomponent) | 客户端 | 创建queryVariable组件 |
+| [CreateSkyRenderComponent](#createskyrendercomponent) | 客户端 | 创建skyRender组件 |
+| [CreateTextBoardComponent](#createtextboardcomponent) | 客户端 | 创建textBoard组件 |
+| [CreateTextNotifyClientComponent](#createtextnotifyclientcomponent) | 客户端 | 创建textNotifyClient组件 |
+| [CreateConfigClientComponent](#createconfigclientcomponent) | 客户端 | 创建config组件 |
+| [CreateVirtualWorldComponent](#createvirtualworldcomponent) | 客户端 | 创建virtualWorld组件实例组件 |
+| [CreatePlayerAnimComponent](#createplayeranimcomponent) | 客户端 | 创建玩家动画组件 |
+| [CreatePostProcessComponent](#createpostprocesscomponent) | 客户端 | 创建PostProcess组件 |
+
+
+
+
+## GetEntityId
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取对象实体ID
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str或int | 实体ID或None |
+
+
+
+## ToPlayerPreset
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 强制类型转换为玩家预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PlayerPreset | 玩家预设或None |
+
+
+
+## ToEntityPreset
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 强制类型转换为实体预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EntityPreset | 实体预设或None |
+
+
+
+## ToEffectPreset
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 强制类型转换为特效预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EffectPreset | 特效预设或None |
+
+
+
+## ToBlockPreset
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 强制类型转换为方块预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockPreset | 方块预设或None |
+
+
+
+## ToUIPreset
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 强制类型转换为UI预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | UIPreset | UI预设或None |
+
+
+
+## GetServerSystem
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 返回当前对象可使用的服务端system
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ServerSystem | 服务端system,客户端返回空 |
+
+
+
+## GetClientSystem
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 返回当前对象可使用的客户端system
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ClientSystem | 客户端system,服务端返回空 |
+
+
+
+## GetSystem
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 返回当前对象可使用的system
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ClientSystem或ServerSystem | 返回当前对象可使用的system |
+
+
+
+## GetLevelId
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取当前对象所在的level_id
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | level_id |
+
+
+
+## CreateComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 给实体创建组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 该组件属主的实体id |
+ | nameSpace | str | 组件的命名空间,registerComponent的namespace |
+ | name | str | 组件的名字 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BaseComponent | 组件实例 |
+
+
+
+## GetMinecraftEnum
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 用于获取枚举值文档中的枚举值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | minecraftEnum | 枚举集合类 |
+
+- 示例
+
+```python
+self.GetMinecraftEnum().GameType.Survival
+```
+
+
+
+## DestroyEntity
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 销毁实体
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 销毁的实体ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否销毁成功 |
+
+
+
+## CreateActionComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建action组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ActionCompServer | action组件实例 |
+
+
+
+## SetEntityAttackTarget
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置仇恨目标
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | targetId | str | 目标实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetEntityAttackTarget(entityId, targetId)
+```
+
+
+
+## ResetEntityAttackTarget
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 清除仇恨目标
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.ResetEntityAttackTarget(entityId)
+```
+
+
+
+## GetEntityAttackTarget
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取仇恨目标
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 仇恨目标的实体id |
+
+- 示例
+
+```python
+self.GetEntityAttackTarget(entityId)
+```
+
+
+
+## SetMobKnockback
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置击退的初始速度,需要考虑阻力的影响
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | xd | float | x轴方向,用來控制角度 |
+ | zd | float | z轴方向,用來控制角度 |
+ | power | float | 用来控制水平方向的初速度 |
+ | height | float | 竖直方向的初速度 |
+ | heightCap | float | 向上速度阈值,当实体本身已经有向上的速度时需要考虑这个值,用来确保最终向上的速度不会超过heightCap |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | None | 无返回值 |
+
+- 示例
+
+```python
+self.SetMobKnockback(entityId, 0.1, 0.1, 1.0, 1.0, 1.0)
+```
+
+
+
+## CreateActorLootComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建actorLoot组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ActorLootComponentServer | actorLoot组件实例 |
+
+
+
+## SpawnLootTable
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 使用生物类型模拟一次随机掉落,生成的物品与json定义的概率有关
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | 掉落位置 |
+ | identifier | str | 实体identifier,如minecraft:guardian |
+ | playerKillerId | str | 玩家杀手(只能是玩家),不设置则会随机在一个玩家维度掉落 |
+ | damageCauseEntityId | str | 伤害来源实体Id(掉落与该实体手持物品的抢夺附魔等级有关),默认None |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功生成掉落 |
+
+- 备注
+ - 需要在对应的player实体附近生成,否则会生成失败。对于某些特殊的生物,如minecraft:sheep,需要使用SpawnLootTableWithActor接口来模拟随机掉落。
+
+- 示例
+
+```python
+result = self.SpawnEntityLootTable((1, 4, 5), 'minecraft:guardian')
+```
+
+
+
+## SpawnLootTableWithActor
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 使用生物实例模拟一次随机掉落,生成的物品与json定义的概率有关
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | 掉落位置 |
+ | entityId | str | 模拟生物的生物Id |
+ | playerKillerId | str | 玩家杀手(只能是玩家),不设置则会随机在一个玩家维度掉落 |
+ | damageCauseEntityId | str | 伤害来源实体Id(掉落与该实体手持物品的抢夺附魔等级有关),默认None |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功生成掉落 |
+
+- 备注
+ - 需要在对应的player实体附近生成,否则会生成失败
+
+- 示例
+
+```python
+result = self.SpawnLootTableWithActor((1, 4, 5), '-335007449086')
+```
+
+
+
+## CreateActorMotionComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建actorMotion组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ActorMotionComponentServer或ActorMotionComponentClient | actorMotion组件实例 |
+
+
+
+## GetDirFromRot
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 通过旋转角度获取朝向
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rot | tuple(float,float) | 俯仰角度及绕竖直方向的角度,单位是角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 玩家朝向的单位向量 |
+
+- 示例
+
+```python
+direction = self.GetDirFromRot((0, 0))
+```
+
+
+
+## SetEntityMotion
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置生物的瞬时移动方向向量,服务端只能对非玩家使用,客户端只能对本地玩家使用
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | motion | tuple(float,float,float) | 世界坐标系下的向量,该方向为世界坐标系下的向量,以x,z,y三个轴的正方向为正值,可以通过当前生物的rot组件判断目前玩家面向的方向,可在开发模式下打开F3观察数值变化。 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 使生物向准星的方向突进一段距离
+rot = self.GetEntityRot(entityId)
+x, y, z = self.GetDirFromRot(rot)
+self.SetMotion(entityId, (x * 5, y * 5, z * 5))
+# rot 和 世界坐标系关系
+# ^ x -90°
+# |
+# 180°/-180 ----------> z 0°
+# | 90°
+```
+
+
+
+## GetEntityMotion
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取生物(含玩家)的瞬时移动方向向量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(int,int,int) | 瞬时移动方向向量,异常时返回None |
+
+- 示例
+
+```python
+self.GetEntityMotion(entityId)
+```
+
+
+
+## GetInputVector
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取本地玩家方向键(移动轮盘)的输入
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | 返回一个单位向量,向量第一项为向左的大小,第二项为向前的大小 |
+
+- 示例
+
+```python
+left, up = self.GetInputVector()
+```
+
+
+
+## LockInputVector
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 锁定本地玩家方向键(移动轮盘)的输入,可使本地玩家持续向指定方向前行,且不会再受玩家输入影响
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | inputVector | tuple(float,float) | 输入向量,第一项控制向左的大小,第二项控制向前的大小。传入(0, 0)时玩家将会被强制固定在原地,不允许移动。 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否锁定成功,True:成功 False:失败 |
+
+- 备注
+ - 传入的向量会被转化为单位向量,因此传入(10, 0)与传入(0.1, 0)效果相同
+
+- 示例
+
+```python
+# 使玩家向左前方持续移动
+self.LockInputVector((1, 1))
+```
+
+
+
+## UnlockInputVector
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 解锁本地玩家方向键(移动轮盘)的输入
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否解锁成功,True:成功 False:失败 |
+
+
+
+## CreateActorOwnerComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建actorOwner组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ActorOwnerComponentServer | actorOwner组件实例 |
+
+
+
+## SetEntityOwner
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体的属主
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | ownerId | str | 属主实体id,为None时设置实体的属主为空 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功,True表示设置成功 |
+
+- 示例
+
+```python
+result = self.SetEntityOwner(entityId, ownerId)
+```
+
+
+
+## GetEntityOwner
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体的属主
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 实体属主id |
+
+- 示例
+
+```python
+ownerId = self.GetEntityOwner(entityId)
+```
+
+
+
+## CreateActorPushableComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建actorPushable组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ActorPushableCompServer | actorPushable组件实例 |
+
+
+
+## SetActorPushable
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体是否可推动
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | isPushable | int | 0:不可推动 1:可推动 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True表示设置成功 |
+
+- 示例
+
+```python
+success = self.SetActorPushable(entityId, 1)
+```
+
+
+
+## CreateAttrComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建attr组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | AttrCompServer或AttrCompClient | attr组件实例 |
+
+
+
+## IsEntityOnFire
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体是否着火
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否着火 |
+
+- 示例
+
+```python
+isOnFire = self.IsEntityOnFire(entityId)
+```
+
+
+
+## SetEntityOnFire
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体着火
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | seconds | int | 着火时间(单位:秒) |
+ | burn_damage | int | 着火状态下每秒扣的血量,不传的话默认是1 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 在水中或者雨中不会生效,着火时间受生物装备、生物的状态影响。burn_damage取值范围是0~1000,小于0将取0,大于1000将取1000
+
+- 示例
+
+```python
+self.SetEntityOnFire(entityId, 1, 2)
+```
+
+
+
+## GetEntityAttrValue
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取属性值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | attrType | int | AttrType枚举 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 属性结果 |
+
+- 示例
+
+```python
+self.GetEntityAttrValue(entityId, self.GetMinecraftEnum().AttrType.HEALTH)
+```
+
+
+
+## GetEntityAttrMaxValue
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取属性最大值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | attrType | int | AttrType枚举 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 属性值结果 |
+
+- 示例
+
+```python
+self.GetEntityAttrMaxValue(entityId, self.GetMinecraftEnum().AttrType.HEALTH)
+```
+
+
+
+## SetEntityAttrValue
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置属性值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | attrType | int | AttrType枚举 |
+ | value | float | 属性值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 设置接口暂不支持 ABSORPTION
+
+- 示例
+
+```python
+self.SetEntityAttrValue(entityId, self.GetMinecraftEnum().AttrType.HEALTH, 20)
+```
+
+
+
+## SetEntityAttrMaxValue
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置属性最大值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | attrType | int | AttrType枚举 |
+ | value | float | 属性值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 设置的最大饱和度不能超过当前的饥饿值; 食用食物后,最大饱和度会被原版游戏机制修改
+ - 设置接口暂不支持 ABSORPTION
+
+- 示例
+
+```python
+self.SetEntityAttrMaxValue(entityId, serverApi.GetMinecraftEnum().AttrType.SPEED, 0.2)
+```
+
+
+
+## SetPlayerStepHeight
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置玩家前进非跳跃状态下能上的最大台阶高度, 默认值为0.5625,1的话表示能上一个台阶
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | stepHeight | float | 最大高度,需要大于0 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 为了避免因浮点数误差导致错误,设置的时候通常会增加1/16个方块大小,即0.0625。所以此处我们设置2.0625。游戏中默认值是0.5625,即半格高度。
+ - 只对玩家生效,无法修改其它实体该属性
+ - 修改后不影响跳跃逻辑及跳跃高度,并不会因此而跳到更高,因此在某些特定情况下,你可以走上方块但跳不上去。
+
+- 示例
+
+```python
+#如果前面放置有两格高的方块,玩家按前进能直接上去,无须跳跃
+self.SetPlayerStepHeight(playerId, 2.0625)
+```
+
+
+
+## GetPlayerStepHeight
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 返回玩家前进非跳跃状态下能上的最大台阶高度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 台阶高度 |
+
+
+
+## ResetPlayerStepHeight
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 恢复引擎默认玩家前进非跳跃状态下能上的最大台阶高度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+
+
+## IsEntityInLava
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 实体是否在岩浆中
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否在岩浆中,True为在岩浆中,False为不在岩浆中 |
+
+- 备注
+ - 只能获取到本地客户端已加载的实体是否在岩浆中,若实体在其他维度或未加载(距离本地玩家太远),将获取失败
+
+- 示例
+
+```python
+isInLava = self.isEntityInLava(entityId)
+```
+
+
+
+## IsEntityOnGround
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 实体是否触地
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否触地,True为触地,False为不触地 |
+
+- 备注
+ - 客户端实体刚创建时引擎计算还没完成,此时获取该实体是否着地将返回默认值True,需要延迟一帧进行获取才能获取到正确的数据
+ - 生物处于骑乘状态时,如玩家骑在猪身上,也视作触地
+ - 只能获取到本地客户端已加载的实体是否触地,若实体在其他维度或未加载(距离本地玩家太远),将获取失败
+
+- 示例
+
+```python
+isOnGound = self.isEntityOnGround(entityId)
+```
+
+
+
+## CreateAuxValueComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建auxValue组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | AuxValueComponentServer或AuxValueComponentClient | auxValue组件实例 |
+
+
+
+## GetEntityAuxValue
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取射出的弓箭或投掷出的药水的附加值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | auxValue |
+
+- 示例
+
+```python
+self.GetAuxValue(entityId)
+```
+
+
+
+## CreateBiomeComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建biome组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BiomeCompServer | biome组件实例 |
+
+
+
+## GetBiomeName
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取某一位置所属的生物群系信息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | 指定位置 |
+ | dimId | int | 维度id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 该位置所属生物群系name |
+
+- 备注
+ - 如果在自定义群系中没有重写原版带hills_transformation,mutate_transformation组件的群系,那么这些没有被重写的相关群系获取名称可能不正确。
+
+- 示例
+
+```python
+biomeName = self.GetBiomeName((0, 80, 0), 0)
+```
+
+
+
+## CreateBlockComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建block组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockCompServer | block组件实例 |
+
+
+
+## RegisterBlockPatterns
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 注册特殊方块组合
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pattern | list(str) | 方块组合位置 |
+ | defines | dict | 方块组合类型 |
+ | result_actor_name | str | 合成结果 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+pattern = [
+ ' # ',
+ 'XXX',
+ ' X '
+ ]
+defines ={
+ '#': 'minecraft:gold_block',
+ 'X': 'minecraft:iron_block'
+}
+self.RegisterBlockPatterns(pattern, defines, 'minecraft:chicken')
+#该例子左中右下放铁块,上面放金块,会生成一只鸡
+```
+
+
+
+## CreateMicroBlockResStr
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 生成微缩方块资源Json字符串
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | identifier | str | 微缩方块唯一标识 |
+ | start | tuple(int,int,int) | 微缩起始坐标 |
+ | end | tuple(int,int,int) | 微缩结束坐标 |
+ | colorMap | dict | 默认为None,微缩方块颜色对应表 |
+ | isMerge | bool | 默认为False,是否合并同类型方块 |
+ | icon | str | 默认为空字符串,微缩方块图标,需要定义在 terrain_texture.json 中 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 生成的微缩方块的资源字符串 |
+
+- 示例
+
+```python
+result = self.CreateMicroBlockResStr("x", (12, 60, 12), (26, 76, 26), colorMap={'minecraft:grass': [12, 22, 123, 255]}, isMerge=True, icon="micro_block_datiangou")
+with open("micro_block_x.json", "w+") as f:
+ f.write(result)
+#该例子中,方块将以 (12 60 12) 为起点,以 (26 76 26) 为终点进行微缩,最终微缩方块里所有草方块的颜色为 rgba(12,22,123,255),实际显示颜色会依据环境光照微调,物品栏里的图标为 terrain_texture.json 里 micro_block_datiangou 对应的图片。
+```
+
+
+
+## CreateBlockEntityData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建blockEntityData组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockEntityExDataCompServer | blockEntityData组件实例 |
+
+
+
+## GetCustomBlockEntityData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 用于获取可操作某个自定义方块实体数据的对象,操作方式与dict类似
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度 |
+ | pos | tuple(int,int,int) | 方块所在位置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockEntityData或None | 可操作该方块实体内数据的对象 |
+
+- 备注
+ - GetBlockEntityData返回None通常是由于该方块所在区块未加载、正在退出游戏、该方块不是自定义方块或该自定义方块的json中并未配置netease:block_entity组件。
在对GetBlockEntityData返回对象进行操作前,请先判断它是否为空,否则会导致```'NoneType' object has no attribute '__getitem__'```错误。
+ - 支持python基本数据类型(int/float/string/bool/dict/list),不支持tuple且**dict的key必须为字符串**
+ - **存储list时,list内各项的数据类型应相同,否则将存储失败**。如[True, False]可成功存储,[True, 1, 0.5]会存储失败
+ - **虽然返回的对象操作与dict相似,但并不支持嵌套存储,只允许形如blockEntityData['key'] = value的直接赋值。如blockEntityData["value5"] ["v1"] = 9或blockEntityData["value6"].append(True)的操作将无法成功存储数据。**
+ - 存储整数时,若数值范围超过int所能表示的最大范围,将无法成功存储。建议将此类数值转为字符串进行存储。
+
+- 示例
+
+```python
+dimension = 0
+pos = (4, 3, 2)
+# GetBlockEntityData在某些情况下会返回None,对返回结果进行操作前务必先判断它是否为空
+blockEntityData = self.GetCustomBlockEntityData(dimension, pos)
+# 存储数据
+# 支持存储python基本数据类型(int/float/string/bool/dict/list),不支持tuple,并且key必须为字符串
+# 存储list时,list内各项的数据类型应相同,否则将存储失败
+if blockEntityData:
+ blockEntityData['value1'] = 10
+ blockEntityData['value2'] = 3.5
+ blockEntityData['value3'] = True
+ blockEntityData['value4'] = "hello"
+ blockEntityData['value5'] = {"v1": 10, "v2": 3.5, "v3": [0,1,2]}
+ blockEntityData['value6'] = [True, False]
+# 读取数据
+if blockEntityData:
+ value1 = blockEntityData['value1']
+ value5 = blockEntityData['value5']
+ # 不存在于方块实体中的数据将返回None
+ valueNone = blockEntityData['valueNone']
+```
+
+
+
+## CreateBlockInfoComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建blockInfo组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockInfoComponentServer或BlockInfoComponentClient | blockInfo组件实例 |
+
+
+
+## GetBlock
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取某一位置的block
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | 方块位置 |
+ | dimensionId | int | 方块所在维度,服务端可在对应维度的常加载区块获取方块,对客户端无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 方块信息字典 |
+
+- 备注
+ - 已经加载的地形才能获取方块信息,支持获取对应维度的常加载区块内方块信息
+ - 对于有多种状态的方块,aux计算比较复杂,推荐使用GetBlockStates获取方块状态字典
+
+- 示例
+
+```python
+blockDict = self.GetBlock((0, 5, 0), 0)
+```
+
+
+
+## SetBlock
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置某一位置的方块
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | 方块位置 |
+ | blockDict | dict | 方块信息字典 |
+ | oldBlockHandling | int | 0:替换,1:销毁,2:保留,默认为0 |
+ | dimensionId | int | 方块所在维度,必需参数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 已经加载的地形才能设置方块,支持在对应维度的常加载区块内设置方块
+ - **若使用SetBlockNew接口替换含方块实体的方块,除自定义方块实体外,当替换前后方块实体类型相同时,其方块实体内数据不会发生改变。**
+ 例如在箱子中放置了物品,使用SetBlockNew接口将箱子方块替换为箱子方块后,新的箱子中依然保留旧箱子内的物品。
+ 要避免这种情况,中间添加一次不同方块实体类型(或不含方块实体)的方块替换即可。比如先将箱子替换为空气,再将空气替换为箱子。
+ - 对于有多种状态的方块,aux计算方式比较复杂,推荐先设置完方块后再使用SetBlockStates设置方块状态字典
+
+- 示例
+
+```python
+blockDict = {
+ 'name': 'minecraft:wool',
+ 'aux': 5
+}
+self.SetBlock((0, 5, 0), blockDict, 0, 0)
+```
+
+
+
+## GetTopBlockHeight
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取当前维度某一位置最高的非空气方块的高度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int) | x轴与z轴位置 |
+ | dimension | int | 维度id,默认为0,对客户端无效,服务端可在获取常加载区块内最高非空气方块高度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int或None | 高度。若位置上无无非空气方块返回-1。若区块未加载返回None |
+
+- 示例
+
+```python
+height = self.GetTopBlockHeight((5, 5))
+```
+
+
+
+## GetBlockDestroyTime
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取使用物品破坏方块需要的时间
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | blockName | str | 方块标识符,格式[namespace:name:auxvalue],auxvalue默认为0 |
+ | itemName | str | 物品标识符,格式[namespace:name:auxvalue],auxvalue默认为0,默认为None(不使用物品) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 需要消耗的时间 |
+
+- 示例
+
+```python
+self.GetBlockDestroyTime("minecraft:diamond_block", "minecraft:stone_pickaxe")
+```
+
+
+
+## GetBlockEntityData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 用于获取方块(包括自定义方块)的数据,数据只读不可写
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度 |
+ | pos | tuple(int,int,int) | 方块所在位置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict或None | 方块实体内数据的对象 |
+
+- 备注
+ - **随着版本更迭,方块中包含的数据结构可能被微软团队调整,并且不会公告,使用该接口的开发者需注意版本更新时做好测试和兼容。数据编码为UTF-8
+ 适用于:[方块实体](https://zh.minecraft.wiki/w/%E6%96%B9%E5%9D%97%E5%AE%9E%E4%BD%93)
+ 特殊情况:末影箱的物品信息不能通过该接口获取
+
+- 示例
+
+```python
+blockEntityData = self.GetBlockEntityData(0, (4, 3, 2))
+```
+
+
+
+## CreateBlockStateComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建blockState组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockStateComponentServer | blockState组件实例 |
+
+
+
+## GetBlockStates
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取 方块状态
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 方块位置 |
+ | dimensionId | int | 方块所在维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 方块状态,异常时为None |
+
+- 备注
+ - 仅可获取到已加载区块内的方块状态,支持获取对应维度的常加载区块内方块状态
+
+- 示例
+
+```python
+self.GetBlockStates((4,4,3), 0)
+```
+
+
+
+## SetBlockStates
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置 方块状态
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 方块位置 |
+ | data | dict | 方块状态 |
+ | dimensionId | int | 方块所在维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 仅可设置已加载区块内的方块状态,支持设置对应维度的常加载区块内方块状态
+
+- 示例
+
+```python
+# 将白色羊毛设置为橙色羊毛
+pos = (4,4,3)
+state = self.GetBlockStates(pos, 0) # state = { 'color': 'white' }
+state['color'] = 'orange'
+self.SetBlockStates(pos, state, 0)
+```
+
+
+
+## GetBlockAuxValueFromStates
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 根据方块名称和 方块状态 获取方块附加值AuxValue
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | blockName | str | 方块名称 |
+ | states | dict | 方块状态 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 方块附加值AuxValue,异常时为-1 |
+
+- 示例
+
+```python
+states = self.GetBlockAuxValueFromStates("minecraft:hopper", {"facing_direction": 0, "toggle_bit": 0})
+```
+
+
+
+## GetBlockStatesFromAuxValue
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 根据方块名称和方块附加值AuxValue获取 方块状态
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | blockName | str | 方块名称 |
+ | auxValue | int | 方块附加值AuxValue |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 方块状态,异常时为None |
+
+- 示例
+
+```python
+states = self.GetBlockStatesFromAuxValue('minecraft:sapling', 9)
+```
+
+
+
+## CreateBlockUseEventWhiteList
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建blockUseEventWhiteList组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockUseEventWhiteListComponentServer或BlockUseEventWhiteListComponentClient | blockUseEventWhiteList组件实例 |
+
+
+
+## AddBlockItemListenForUseEvent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 增加blockName方块对ServerBlockUseEvent事件的脚本层监听
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | blockName | str | 方块名称,格式:namespace:name:auxvalue,其中namespace:name:*匹配所有的auxvalue |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否增加成功 |
+
+- 示例
+
+```python
+self.AddBlockItemListenForUseEvent("minecraft:nether_brick_stairs:2")
+# 注意blockName格式为namespace:name:auxvalue,如果不填auxvalue,则默认为0
+# auxValue详细值详见官方wiki,如https://zh.minecraft.wiki/w/楼梯 中的‘方块数据值’
+```
+
+
+
+## RemoveBlockItemListenForUseEvent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 移除blockName方块对ServerBlockUseEvent事件的脚本层监听
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | blockName | str | 方块名称,格式:namespace:name:auxvalue,其中namespace:name:*匹配所有的auxvalue |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否移除成功 |
+
+- 示例
+
+```python
+self.RemoveBlockItemListenForUseEvent("minecraft:nether_brick_stairs:2")
+# 注意blockName格式为namespace:name:auxvalue,如果不填auxvalue,则默认为0
+# auxValue详细值详见官方wiki,如https://zh.minecraft.wiki/w/楼梯 中的‘方块数据值’
+```
+
+
+
+## ClearAllListenForBlockUseEventItems
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 清空所有已添加方块对ServerBlockUseEvent事件的脚本层监听
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否清空成功 |
+
+
+
+## CreateBreathComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建breath组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BreathCompServer | breath组件实例 |
+
+
+
+## GetUnitBubbleAirSupply
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 单位气泡数对应的氧气储备值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 单位气泡数对应的氧气储备值 |
+
+
+
+## GetEntityCurrentAirSupply
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 生物当前氧气储备值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 生物当前氧气储备值 |
+
+- 备注
+ - 注意:该值返回的是当前氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+- 示例
+
+```python
+self.GetCurrentAirSupply(entityId)
+```
+
+
+
+## GetEntityMaxAirSupply
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取生物最大氧气储备值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 最大氧气储备值 |
+
+- 备注
+ - 注意:该值返回的是最大氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+- 示例
+
+```python
+self.GetEntityMaxAirSupply(entityId)
+```
+
+
+
+## SetEntityCurrentAirSupply
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置生物氧气储备值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | data | int | 设置生物当前氧气值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 注意:该值设置的是当前氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+- 示例
+
+```python
+self.SetEntityCurrentAirSupply(entityId, 300)
+```
+
+
+
+## SetEntityMaxAirSupply
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置生物最大氧气储备值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | data | int | 设置生物最大氧气值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 注意:该值设置的是最大氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+- 示例
+
+```python
+self.SetEntityMaxAirSupply(entityId, 400)
+```
+
+
+
+## IsEntityConsumingAirSupply
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取生物当前是否在消耗氧气
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否消耗氧气 |
+
+- 示例
+
+```python
+self.IsEntityConsumingAirSupply(entityId)
+```
+
+
+
+## SetEntityRecoverTotalAirSupplyTime
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置恢复最大氧气量的时间,单位秒
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | timeSec | float | 恢复生物最大氧气值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 注意:当设置的最大氧气值小于(timeSec*10)时,生物每帧恢复氧气量的值为0
+
+- 示例
+
+```python
+self.SetEntityRecoverTotalAirSupplyTime(entityId, 10)
+```
+
+
+
+## CreateBulletAttributesComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建bulletAttributes组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BulletAttributesComponentServer | bulletAttributes组件实例 |
+
+
+
+## GetEntitySourceId
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取抛射物发射者实体id
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 抛射物发射者实体id |
+
+- 示例
+
+```python
+self.GetEntitySourceId(entityId)
+```
+
+
+
+## CreateChestBlockComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建chestBlock组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ChestContainerCompServer | chestBlock组件实例 |
+
+
+
+## GetChestBoxSize
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取箱子容量大小
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | 箱子位置 |
+ | dimensionId | int | 箱子所在维度,可获取对应维度的常加载区块内箱子容量 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 箱子大小,错误值-1 |
+
+- 示例
+
+```python
+self.GetChestBoxSize((x, y, z), 0)
+```
+
+
+
+## SetChestBoxItemNum
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置箱子槽位物品数目
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | 箱子位置 |
+ | slotPos | int | 箱子槽位 |
+ | num | int | 物品数目 |
+ | dimensionId | int | 方块所在维度,可在对应维度的常加载区块设置方块 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetChestBoxItemNum((x,y,z), 0, 10, 0)
+```
+
+
+
+## SetChestBoxItemExchange
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 交换箱子里物品的槽位
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家id |
+ | pos | tuple(int,int,int) | 箱子位置 |
+ | slotPos1 | int | 箱子槽位1 |
+ | slotPos2 | int | 箱子槽位2 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置成功返回True,失败返回False |
+
+- 示例
+
+```python
+self.SetChestBoxItemExchange(playerId, (x,y,z), 0, 1)
+```
+
+
+
+## CreateChunkSourceComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建chunkSource组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ChunkSourceCompServer或ChunkSourceCompClient | chunkSource组件实例 |
+
+
+
+## SetAddArea
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置区块的常加载
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | key | str | 常加载区域的名称 |
+ | dimensionId | int | 区块所在的维度 |
+ | minPos | tuple(int,int,int) | 加载区域的最小坐标 |
+ | maxPos | tuple(int,int,int) | 加载区域的最大坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - key必须唯一,若添加区域时key已存在将添加失败。
+ - 该方式创建的常加载区域不会tick,即实体,方块实体,随机刻都不会进行更新。若需要区域被tick,请使用原版[tickingarea指令](https://zh.minecraft.wiki/w/%E5%91%BD%E4%BB%A4/tickingarea)。
+ - 将当前未加载的区块设置为常加载区块时,不会从存档加载生物。但如果是当前已加载的区块,则玩家远离区块后,区块内的实体会一直保持加载。
+ - 常加载区块内可以使用api创建实体、放置方块、放置结构、修改方块实体数据。但由于区块加载的特性,需要将操作位置的四周外延80格的区域都设置为常加载,例如需要在(0,5,0)的位置生成生物/放置方块,需要将(-80,0,-80)到(80,0,80)的区域设置为常加载。
+
+- 示例
+
+```python
+self.SetAddArea('Area0', 0, (0,0,0), (60,0,60))
+```
+
+
+
+## DeleteArea
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 删除一个常加载区域
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | key | str | 常加载区域的名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 删除是否成功 |
+
+- 示例
+
+```python
+self.DeleteArea('Area0')
+```
+
+
+
+## DeleteAllArea
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 删除所有常加载区域
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 删除的区域数目,错误时为None |
+
+
+
+## GetAllAreaKeys
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取所有常加载区域名称列表
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(str) | 名称列表list |
+
+
+
+## CheckChunkState
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 判断指定位置的chunk是否加载完成
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | chunk所在维度 |
+ | pos | tuple(int,int,int) | 指定位置的坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 加载是否完成 |
+
+- 示例
+
+```python
+self.CheckChunkState(0, (0, 0, 0))
+```
+
+
+
+## GetLoadedChunks
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取指定维度当前已经加载完毕的全部区块的坐标列表
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | None或list(tuple(int,int)) | 区块坐标的列表(区块坐标为(x,z)),当指定维度不存在或尚未创建时,返回None |
+
+- 示例
+
+```python
+result = self.GetLoadedChunks(0)
+print "dimension {} has chunk {}".format(0, result)
+```
+
+
+
+## GetChunkEntities
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取指定位置的区块中,全部的实体和玩家的ID列表
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度 |
+ | pos | tuple(int,int,int) | 指定位置的坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | None或list(str) | 实体和玩家的ID的列表,当指定位置的区块不存在或尚未加载时,返回None |
+
+- 示例
+
+```python
+entityList = self.GetChunkEntites(0, (0, 0, 0))
+print "GetChunkEntities entityList={}".format(entityList)
+```
+
+
+
+## GetChunkMobNum
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取某区块中的生物数量(不包括玩家,但包括盔甲架)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 区块所在维度 |
+ | chunkPos | tuple(int,int) | 指定区块的坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 该区块中的生物数量 |
+
+- 备注
+ - 返回值为-1通常是由于该维度未加载、该区块未加载
+
+- 示例
+
+```python
+mobNum = self.GetChunkMobNum(0, (1, 3))
+```
+
+
+
+## IsChunkGenerated
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取某个区块是否生成过。
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 区块所在维度 |
+ | chunkPos | tuple(int,int) | 指定区块的坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 该区块是否生成过 |
+
+- 备注
+ - 玩家探索过(以玩家为中心,模拟距离(在游戏的设置页面内)为半径内的区块),或者使用SetAddArea设置常加载区块附近的区块,都是生成过的区块。这些区块会保存到存档里,再次探索时会从存档读取,不会重新生成。
+
+- 示例
+
+```python
+# 获取主世界(10000,0,10000)坐标所在的区块是否生成过
+result = self.IsChunkGenerated(0, comp.GetChunkPosFromBlockPos((10000, 0, 10000)))
+```
+
+
+
+## CreateCollisionBoxComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建collisionBox组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | CollisionBoxComponentServer | collisionBox组件实例 |
+
+
+
+## SetEntityCollisionBoxSize
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体的包围盒
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | size | tuple(float,float) | 第一位表示宽度和长度,第二位表示高度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 对新生产的实体需要经过5帧之后再设置包围盒的大小才会生效
+
+- 示例
+
+```python
+self.SetEntityCollisionBoxSize(entityId, (2,3))
+```
+
+
+
+## GetEntityCollisionBoxSize
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体的包围盒
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | 包围盒大小 |
+
+- 示例
+
+```python
+self.GetEntityCollisionBoxSize(entityId)
+```
+
+
+
+## CreateCommandComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建command组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | CommandCompServer | command组件实例 |
+
+
+
+## SetCommand
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 使用游戏内指令
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | cmdStr | str | 指令 |
+ | playerId | str | 玩家id(可选),如果playerId不设置,则随机选择玩家 |
+ | showOutput | bool | 是否输出到聊天窗口:可选,默认False,如果为True的话会和聊天窗口输入原生指令一样输出返回信息。只有当该参数为True的时候会触发OnCommandOutputServerEvent与OnCommandOutputClientEvent |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 命令是否执行成功 |
+
+- 示例
+
+```python
+# 传送指令
+self.SetCommand("/tp @p 100 5 100")
+```
+
+
+
+## GetCommandPermissionLevel
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 返回设定使用/op命令时OP的权限等级(对应server.properties中的op-permission-level配置)
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 权限等级:1-OP可以绕过重生点保护;2-OP可以使用所有单人游戏作弊命令;3-OP可以使用大多数多人游戏中独有的命令;4-OP可以使用所有命令 |
+
+- 示例
+
+```python
+opLevel = self.GetCommandPermissionLevel()
+print "GetCommandPermissionLevel oplevel={}".format(opLevel)
+```
+
+
+
+## SetCommandPermissionLevel
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置当玩家使用/op命令时OP的权限等级(对应server.properties中的op-permission-level配置)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | opLevel | int | 权限等级:1-OP可以绕过重生点保护;2-OP可以使用所有单人游戏作弊命令;3-OP可以使用大多数多人游戏中独有的命令;4-OP可以使用所有命令 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 命令是否执行成功 |
+
+- 备注
+ - 此API不会修改已经获取了op的玩家的权限等级,仅影响调用API之后才获取op的玩家,建议在游戏初始化时调用此API
+
+- 示例
+
+```python
+opLevel = 4
+suc = self.SetCommandPermissionLevel(opLevel)
+print "SetCommandPermissionLevel to {} suc={}".format(opLevel, suc)
+```
+
+
+
+## GetDefaultPlayerPermissionLevel
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 返回新玩家加入时的权限身份(对应server.properties中的default-player-permission-level配置)
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 权限身份:0-Visitor;1-Member;2-Operator;3-自定义 |
+
+- 示例
+
+```python
+opLevel = self.GetDefaultPlayerPermissionLevel()
+print "GetDefaultPlayerPermissionLevel oplevel={}".format(opLevel)
+```
+
+
+
+## SetDefaultPlayerPermissionLevel
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置新玩家加入时的权限身份(对应server.properties中的default-player-permission-level配置)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | opLevel | int | 权限身份:0-Visitor;1-Member;2-Operator;3-自定义 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 命令是否执行成功 |
+
+- 备注
+ - 此API不会修改已经加入过游戏的玩家的权限身份,仅影响调用API之后才新加入的玩家,建议在游戏初始化时调用此API
+
+- 示例
+
+```python
+opLevel = 1
+suc = self.SetDefaultPlayerPermissionLevel(opLevel)
+print "SetDefaultPlayerPermissionLevel to {} suc={}".format(opLevel, suc)
+```
+
+
+
+## CreateControlAiComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建controlAi组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ControlAiCompServer | controlAi组件实例 |
+
+
+
+## SetEntityBlockControlAi
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置屏蔽生物原生AI
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | isBlock | bool | 是否保留AI,False为屏蔽 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 屏蔽AI后的生物无法行动,不受重力且不会被推动。但是可以受到伤害,也可以被玩家交互(例如马被骑或村民被交易)
+
+- 示例
+
+```python
+self.SetBlockControlAi(entityId, False)
+```
+
+
+
+## CreateDimensionComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建dimension组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | DimensionCompServer | dimension组件实例 |
+
+
+
+## GetEntityDimensionId
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体所在维度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 维度id,0-主世界; 1-下界; 2-末地; 或其他自定义维度 |
+
+
+
+## ChangeEntityDimension
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 传送玩家以外的实体
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | dimensionId | int | 维度id,0-主世界; 1-下界; 2-末地; 或其他自定义维度 |
+ | pos | tuple(int,int,int) | 传送的坐标,假如输入None,那么就优先选择目标维度的传送门作为目的地,其次使用维度坐标映射逻辑确定目的地 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 该接口无法对玩家使用,玩家请使用ChangePlayerDimension
+
+- 示例
+
+```python
+self.ChangeEntityDimension(entityId, 0, (0,4,0))
+```
+
+
+
+## ChangePlayerDimension
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 传送玩家
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | dimensionId | int | 维度,0-overWorld; 1-nether; 2-theEnd |
+ | pos | tuple(int,int,int) | 传送的坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 该接口在成功切换维度时pos位置为玩家头的位置,即比设定位置低1.62
+
+- 示例
+
+```python
+self.ChangePlayerDimension(playerId, 0, (0,4,0))
+```
+
+
+
+## MirrorDimension
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 复制不同dimension的地形
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | fromId | int | 原dimensionId |
+ | toId | int | 目标dimensionId |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 仅复制源维度已经生成的区块信息到新的维度,对于未生成的源维度区块无法完全复制生成逻辑,可能采用部分新维度自己的信息。
+
+- 示例
+
+```python
+self.MirrorDimension(0, 1)
+```
+
+
+
+## CreateDimension
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建新的dimension
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimensionId | int | 维度,0/1/2维度是不需要创建的。创建大于20的维度,需要在dimension_config.json中注册,注意,维度21是不可用的 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否创建成功 |
+
+- 备注
+ - 建议在mod初始化时统一调用
+
+- 示例
+
+```python
+self.CreateDimension(3)
+```
+
+
+
+## RegisterEntityAOIEvent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 注册感应区域,有实体进入时和离开时会有消息通知
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+ | name | str | 注册的感应区域名 |
+ | aabb | tuple(float,float,float,float,float,float) | 感应区域的坐标范围,依次为minX, minY, minZ, maxX, maxY, maxZ |
+ | ignoredEntities | list(str) | 忽略的实体id列表 |
+ | entityType | int | 期望响应的实体类型,不传则响应所有的实体类型EntityType枚举 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否注册成功 |
+
+- 备注
+ - 注册完感应区域后,需通过监听OnEntityAreaEvent或NewOnEntityAreaEvent事件来获取感应事件
+
+- 示例
+
+```python
+self.RegisterEntityAOIEvent(0, "test", (0, 0, 0, 1, 1, 1), None)
+```
+
+
+
+## UnRegisterEntityAOIEvent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 反注册感应区域
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+ | name | str | 需要反注册的感应区域名 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否注册成功 |
+
+- 示例
+
+```python
+self.UnRegisterEntityAOIEvent(0, "test")
+```
+
+
+
+## SetUseLocalTime
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 让某个维度拥有自己的局部时间规则,开启后该维度可以拥有与其他维度不同的时间与是否昼夜更替的规则
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+ | value | bool | 是否开启局部时间规则 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 我们对主世界以及自定义维度新增了“局部时间规则”的概念。在此之前,所有的维度会共享一个“全局时间”,即设置时间或dodaynightcycle规则时,会对所有维度生效。
+ 现在,我们可以将某个维度使用局部时间规则,并且单独设置他的时间(见[SetLocalTime](#setlocaltime))与dodaynightcycle规则(见[SetLocalDoDayNightCycle](#setlocaldodaynightcycle))。
+ 在下文中,我们会将使用局部时间规则的维度称为“局部维度”,而使用全局时间的维度称为“全局维度”。默认情况下,维度都是全局维度。
+ 原版的time指令,gamerule dodaylightcycle指令与开启昼夜更替的设置,daylock指令与终为白日的设置,均不会对局部维度生效。
+ 当世界上同时存在局部维度与全局维度时,只有以下两种情况可以睡觉来跳过黑夜:
+ 1. 所有玩家都在全局维度睡觉。这时会将全局时间跳到第二天早上。
+ 2. 所有玩家都在同一个局部维度睡觉。这时会将该局部维度的时间跳到第二天早上。
+ - 启用局部时间规则时,默认继承全局的时间与昼夜更替规则
+ - 时间规则对原版的下界与末地无效,这两个维度永远为黑夜且没有昼夜更替
+ - 建议统一在游戏启动时调用
+ - 在pc开发包下,可以在聊天栏键入`dmtime on`或`dmtime off`来测试开启与关闭当前维度的局部时间
+
+- 示例
+
+```python
+self.SetUseLocalTime(3, True)
+```
+
+
+
+## GetUseLocalTime
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取某个维度是否设置了使用局部时间规则
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否使用局部时间规则 |
+
+- 备注
+ - 关于“局部时间规则”,见[SetUseLocalTime](#setuselocaltime)
+
+- 示例
+
+```python
+self.GetUseLocalTime(3)
+```
+
+
+
+## SetLocalTime
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置使用局部时间规则维度的时间
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+ | time | int | 时间,单位为帧数。表示该存档从新建起经过的时间,而非当前游戏天内的时间。mc中一个游戏天相当于现实的20分钟,即24000帧 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 游戏有天数的概念,使用时需要进行考虑。您也可以直接使用[SetLocalTimeOfDay](#setlocaltimeofday)设置一天内所在的时间而不用计算天数。
+ - 只有使用局部时间规则维度才能设置
+ - 关于“局部时间规则”,见[SetUseLocalTime](#setuselocaltime)
+
+- 示例
+
+```python
+# 获取当前的时间
+passedTime = self.GetLocalTime(3)
+# 获取当前的天数
+day = passedTime / 24000
+# 设置为当天的正午
+self.SetLocalTime(3, day * 24000 + 6000)
+# 设置为次日的日出
+self.SetLocalTime(3, (day + 1) * 24000 + 0)
+```
+
+
+
+## SetLocalTimeOfDay
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置使用局部时间规则维度在一天内所在的时间
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+ | timeOfDay | int | 时间,单位为帧数,表示游戏天内的时间,范围为0到24000。mc中一个游戏天相当于现实的20分钟,即24000帧 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 具体的逻辑与time指令相同,若timeOfDay比当前时间晚,则设置到当天的timeOfDay;若timeOfDay比当前时间早,则设置到次日的timeOfDay
+ - 在pc开发包下,可以在聊天栏键入`dmtime time `来测试设置当前维度的局部时间
+
+- 示例
+
+```python
+# 设置为正午
+self.SetLocalTimeOfDay(3, 6000)
+```
+
+
+
+## GetLocalTime
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取维度的时间
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 时间,单位为帧数,表示该存档从新建起经过的时间,而非当前游戏天内的时间。mc中一个游戏天相当于现实的20分钟,即24000帧 |
+
+- 备注
+ - 维度使用局部时间规则时,返回局部时间;没有使用时返回全局时间
+ - 关于“局部时间规则”,见[SetUseLocalTime](#setuselocaltime)
+
+- 示例
+
+```python
+# 从游戏开始经过的总帧数
+passedTime = self.GetLocalTime(3)
+# 当前游戏天内的帧数
+timeOfDay = passedTime % 24000
+# 从游戏开始经过的游戏天数
+day = passedTime / 24000
+```
+
+
+
+## SetLocalDoDayNightCycle
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置使用局部时间规则的维度是否打开昼夜更替
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+ | value | bool | 是否打开昼夜更替 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 只有使用局部时间规则维度才能设置
+ - 关于“局部时间规则”,见[SetUseLocalTime](#setuselocaltime)
+ - 在pc开发包下,可以在聊天栏键入`dmtime cycle on`或`dmtime cycle off`来测试开启与关闭当前维度的昼夜更替
+
+- 示例
+
+```python
+self.SetLocalDoDayNightCycle(3, False)
+```
+
+
+
+## GetLocalDoDayNightCycle
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取维度是否打开昼夜更替
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 维度id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否打开昼夜更替 |
+
+- 备注
+ - 维度使用局部时间规则时,返回维度自身的昼夜更替规则;没有使用时返回全局的昼夜更替规则
+ - 关于“局部时间规则”,见[SetUseLocalTime](#setuselocaltime)
+
+- 示例
+
+```python
+self.GetLocalDoDayNightCycle(3)
+```
+
+
+
+## CreateEffectComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建effect组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EffectComponentServer | effect组件实例 |
+
+
+
+## RemoveEffectFromEntity
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 为实体删除指定状态效果
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | effectName | str | 状态效果名称字符串,包括自定义状态效果和原版状态效果,原版状态效果可在wiki查询 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True表示删除成功 |
+
+- 示例
+
+```python
+res = self.RemoveEffectFromEntity(entityId, "speed")
+```
+
+
+
+## AddEffectToEntity
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 为实体添加指定状态效果,如果添加的状态已存在则有以下集中情况:1、等级大于已存在则更新状态等级及持续时间;2、状态等级相等且剩余时间duration大于已存在则刷新剩余时间;3、等级小于已存在则不做修改;4、粒子效果以新的为准
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | effectName | str | 状态效果名称字符串,包括自定义状态效果和原版状态效果,原版状态效果可在wiki查询 |
+ | duration | int | 状态效果持续时间,单位秒 |
+ | amplifier | int | 状态效果的额外等级。必须在0至255之间(含)。若未指定,默认为0。注意,状态效果的第一级(如生命恢复 I)对应为0,因此第二级状态效果,如生命回复 II,应指定强度为1。部分效果及自定义状态效果没有强度之分,如夜视 |
+ | showParticles | bool | 是否显示粒子效果,True显示,False不显示 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True表示设置成功 |
+
+- 示例
+
+```python
+res = self.AddEffectToEntity(entityId, "speed", 30, 2, True)
+```
+
+
+
+## GetEntityEffects
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体当前所有状态效果
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(dict) | 状态效果信息字典的list |
+
+- 备注
+ - 状态效果信息字典 effectDict
+ | 关键字 | 数据类型 | 说明 |
+ | ----------| --------------------- | ---------|
+ | effectName | str | 状态效果名称 |
+ | duration | int | 状态效果剩余持续时间,单位秒 |
+ | amplifier | int | 状态效果额外等级 |
+
+- 示例
+
+```python
+effectDictList = self.GetEntityEffects(entityId)
+```
+
+
+
+## CreateEngineTypeComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建engineType组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EngineTypeComponentServer或EngineTypeComponentClient | engineType组件实例 |
+
+
+
+## GetEntityEngineTypeStr
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体的类型名称
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 实体类型名称,如minecraft:husk |
+
+- 示例
+
+```python
+engineType = self.GetEntityEngineTypeStr(entityId)
+```
+
+
+
+## GetEntityEngineType
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体类型
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 详见EntityType枚举 |
+
+- 示例
+
+```python
+entityType = self.GetEntityEngineType(entityId)
+# 以判断是否是 Mob 为例,如果要判断是否为弹射物,找到对应的类型Projectile修改即可
+if entityType & self.GetMinecraftEnum().EntityType.Mob == self.GetMinecraftEnum().EntityType.Mob:
+ logger.info("{} is Mod".format(self.GetEngineTypeStr(entityId)))
+```
+
+
+
+## CreateEntityEventComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建entityEvent组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EntityEventComponentServer | entityEvent组件实例 |
+
+
+
+## TriggerEntityCustomEvent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 触发生物自定义事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 生物Id |
+ | eventName | str | 事件名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 触发苦力怕爆炸
+ 在苦力怕的entity json文件中`events`字段下增加如下事件,然后在mod中运行示例代码:
+ ```json
+ "netease:custom_exploading":{
+ "sequence": [
+ {
+ "filters": {
+ "test": "has_component",
+ "operator": "!=",
+ "value": "minecraft:is_charged"
+ },
+ "add": {
+ "component_groups": [
+ "minecraft:forced_exploding"
+ ]
+ }
+ },
+ {
+ "filters": {
+ "test": "has_component",
+ "value": "minecraft:is_charged"
+ },
+ "add": {
+ "component_groups": [
+ "minecraft:forced_charged_exploding"
+ ]
+ }
+ }
+ ]
+ }
+ ```
+
+- 示例
+
+```python
+#触发entity自定义event
+eventName = "netease:custom_exploading"
+self.TriggerCustomEvent(entityId, eventName)
+```
+
+
+
+## CreateExtraDataComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建extraData组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id,不传则使用LevelId |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ExDataCompServer | extraData组件实例 |
+
+
+
+## GetExtraData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体的自定义数据或者世界的自定义数据,某个键所对应的值。获取实体数据传入对应实体id
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | key | str | 自定义key |
+ | entityId | str或int | 实体id,不传则使用LevelId |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | any | key对应的值 |
+
+- 示例
+
+```python
+self.GetExtraData("globalMsg")
+```
+
+
+
+## SaveExtraData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 用于保存实体的自定义数据或者世界的自定义数据
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id,不传则使用LevelId |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 保存结果 |
+
+- 示例
+
+```python
+# 保存自定义数据
+self.SaveExtraData()
+```
+
+
+
+## SetExtraData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 用于设置实体的自定义数据或者世界的自定义数据,数据以键值对的形式保存。设置实体数据时使用对应实体id创建组件,设置世界数据时使用levelId创建组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | key | str | 自定义key |
+ | value | any | key对应的值,支持python基本数据类型 |
+ | entityId | str或int | 实体id,不传则使用LevelId |
+ | autoSave | bool | 默认自动保存,默认为True,如果批量设置数据,请将该参数设置为False,同时在设置数据完毕时调用SaveExtraData接口 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetExtraData("globalMsg", "helloWorld")
+```
+
+
+
+## CleanExtraData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 清除实体的自定义数据或者世界的自定义数据,清除实体数据时使用对应实体id创建组件,清除世界数据时使用levelId创建组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | key | str | 自定义key |
+ | entityId | str或int | 实体id,不传则使用LevelId |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+suc = self.CleanExtraData("globalMsg")
+print "CleanExtraData for level suc=%s" % suc
+```
+
+
+
+## GetWholeExtraData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取完整的实体的自定义数据或者世界的自定义数据,获取实体数据时使用对应实体id创建组件,获取世界数据时使用levelId创建组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id,不传则使用LevelId |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict或None | 获取指定实体或者全局的额外存储数据字典,假如没有任何额外存储数据,那么返回None或者空字典 |
+
+- 示例
+
+```python
+dataDict = self.GetWholeExtraData()
+if dataDict:
+ for key, value in dataDict.iteritems():
+ print "key=%s value=%s" % (key, str(value))
+```
+
+
+
+## CreateExpComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建exp组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ExpComponentServer | exp组件实例 |
+
+
+
+## GetPlayerExp
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取玩家当前等级下的经验值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | isPercent | bool | 是否为百分比 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 玩家经验值 |
+
+- 备注
+ - 如果设置返回百分比为False,则返回玩家当前等级下经验的绝对值(非当前玩家总经验值)。
+
+- 示例
+
+```python
+print(self.GetPlayerExp(playerId, False))
+```
+
+
+
+## AddPlayerExp
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 增加玩家经验值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | exp | int | 玩家经验值,可设置负数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 如果设置的exp值为负数,且超过当前等级已有的经验值,调用接口后,该玩家等级不会下降但是经验值会置为最小值
+
+- 示例
+
+```python
+self.AddPlayerExp(entityId, 25)
+```
+
+
+
+## GetPlayerTotalExp
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取玩家的总经验值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 总经验值,正整数。获取失败的情况下返回-1。 |
+
+- 示例
+
+```python
+print(self.GetPlayerTotalExp(playerId))
+```
+
+
+
+## SetPlayerTotalExp
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置玩家的总经验值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | exp | int | 总经验值,正整数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 根据总经验值会重新计算等级,该接口可引起等级的变化
+ - 内部运算采用浮点数,数值较大时会出现误差
+
+- 示例
+
+```python
+self.SetPlayerTotalExp(playerId, 25)
+```
+
+
+
+## GetOrbExperience
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取经验球的经验
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 经验球实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 经验值,正整数。获取失败的情况下返回-1。 |
+
+- 示例
+
+```python
+print(self.GetOrbExperience(entityId))
+```
+
+
+
+## SetOrbExperience
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置经验球经验
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 经验球实体id |
+ | exp | int | 经验球经验 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 设置经验球经验,entityId是经验球的entityId,如果经验小于等于0,拾取后不再加经验
+
+- 示例
+
+```python
+self.SetOrbExperience(entityId, 25)
+```
+
+
+
+## CreateExperienceOrb
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建专属经验球
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | int | 专属玩家ID,只有该玩家可以拾取生成的经验球 |
+ | exp | int | 经验球经验 |
+ | position | tuple(float,float,float) | 创建的位置 |
+ | isSpecial | bool | 是否专属经验球 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.CreateExperienceOrb(playerId, 25, (10,10,10), False)
+```
+
+
+
+## CreateExplosionComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建explosion组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ExplosionComponentServer | explosion组件实例 |
+
+
+
+## CreateExplosion
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 用于生成爆炸
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 爆炸位置 |
+ | radius | int | 爆炸威力,具体含义可参考[wiki](https://zh.minecraft.wiki/w/%E7%88%86%E7%82%B8)对爆炸的解释 |
+ | fire | bool | 是否带火 |
+ | breaks | bool | 是否破坏方块 |
+ | sourceId | str | 爆炸伤害源的实体id |
+ | playerId | str | 爆炸创造的实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.CreateExplosion((50,50,50),10,True,True,sourceId,playerId)
+```
+
+
+
+## CreateFeatureComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建feature组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | FeatureCompServer | feature组件实例 |
+
+
+
+## AddNeteaseFeatureWhiteList
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 添加结构对PlaceNeteaseStructureFeatureEvent事件的脚本层监听
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | structureName | str | 结构的identifier |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否增加成功 |
+
+- 示例
+
+```python
+# 注意structureName格式为floderName:structureName
+self.AddNeteaseFeatureWhiteList("test:pumpkins")
+```
+
+
+
+## RemoveNeteaseFeatureWhiteList
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 移除structureName对PlaceNeteaseStructureFeatureEvent事件的脚本层监听
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | structureName | str | 结构名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否移除成功 |
+
+- 示例
+
+```python
+# 注意structureName格式为floderName:structureName
+self.RemoveNeteaseFeatureWhiteList("test:pumpkins")
+```
+
+
+
+## ClearAllNeteaseFeatureWhiteList
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 清空所有已添加Netease Structure Feature对PlaceNeteaseStructureFeatureEvent事件的脚本层监听
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否清空成功 |
+
+- 示例
+
+```python
+self.ClearAllNeteaseFeatureWhiteList()
+```
+
+
+
+## LocateStructureFeature
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 与[/locate指令](https://zh.minecraft.wiki/w/%E5%91%BD%E4%BB%A4/locate)相似,用于定位原版的部分结构,如海底神殿、末地城等。
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | featureType | int | 原版的结构类型,StructureFeatureType枚举 |
+ | dimensionId | int | 结构所在维度,**要求该维度已加载** |
+ | pos | tuple(int,int,int) | 以该位置为中心来查找最近的结构 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float)或None | 最近的结构所在区块位置(x坐标,z坐标),y坐标不定,若定位失败则返回None |
+
+- 备注
+ - 定位失败通常是由于该维度不存在、该维度未加载、该维度中不存在该结构、该结构距离传入位置过远等
+ - 该接口返回值为对应结构所在区块的坐标,与结构实际生成位置可能相距一定距离
+
+- 示例
+
+```python
+pos = self.LocateStructureFeature(self.GetMinecraftEnum().StructureFeatureType.Village, 0, (0, 64, 0))
+```
+
+
+
+## LocateNeteaseFeatureRule
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 与[/locate指令](https://zh.minecraft.wiki/w/%E5%91%BD%E4%BB%A4/locate)相似,用于定位 网易自定义特征规则
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | ruleName | str | 特征规则名称,形式为namespace:featureRuleIdentifier,如custombiomes:overworld_pumpkins_feature_rule |
+ | dimensionId | int | 查找维度,**要求该维度已加载** |
+ | pos | tuple(int,int,int) | 以该位置为中心来查找满足网易自定义特征规则分布条件的坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float)或None | 最近的满足网易自定义特征规则分布条件的坐标,定位失败则返回None |
+
+- 备注
+ - 定位失败通常是由于传入维度不存在、维度未加载、没有满足该自定义特征规则分布条件的坐标、目标坐标距离传入位置过远(以该位置为中心,半径100个区块内无法找到)等
+ - 若在feature rules中"conditions"内的"minecraft:biome_filter"中**填写了判断维度以外的过滤规则,将有概率无法定位到满足该自定义特征规则分布条件的坐标**。建议开发者在"distribution"的"iterations"中使用query.is_biome代替
+ - 定位原理是根据网易自定义特征规则分布条件寻找可能的位置,因此**有可能会定位到在PlaceNeteaseStructureFeatureEvent事件中被取消生成的结构位置**。开发者应注意甄别,尽量避免对可能在PlaceNeteaseStructureFeatureEvent事件中被取消放置的结构对应特征规则文件调用定位函数
+
+- 示例
+
+```python
+pos = self.LocateNeteaseFeatureRule("custombiomes:overworld_pumpkins_feature_rule", 0, (0, 64, 0))
+```
+
+
+
+## CreateFlyComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建fly组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | FlyComponentServer | fly组件实例 |
+
+
+
+## IsPlayerFlying
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取玩家是否在飞行
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:是 False:否 |
+
+- 示例
+
+```python
+self.IsPlayerFlying(playerId)
+```
+
+
+
+## ChangePlayerFlyState
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 给予/取消飞行能力,并且进入飞行/非飞行状态
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | isFly | bool | 飞行状态,True:飞行模式,False:正常行走模式 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:是 False:否 |
+
+- 示例
+
+```python
+self.ChangePlayerFlyState(playerId, True)
+```
+
+
+
+## CreateGameComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建game组件
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | GameComponentServer或GameComponentClient | game组件实例 |
+
+
+
+## AddBlockProtectField
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置一个方块无法被玩家/实体破坏的区域
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimensionId | int | 不可破坏区域所在维度 |
+ | startPos | tuple(int,int,int) | 初始位置,不可破坏区域AABB包围盒的最小点 |
+ | endPos | tuple(int,int,int) | 结束位置,不可破坏区域AABB包围盒的最大点 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 成功时返回区域的唯一ID,可用于取消不可破坏区域,失败时返回-1 |
+
+- 示例
+
+```python
+field = self.AddBlockProtectField(0, (-20, 0, -20), (20, 255, 20))
+if field > 0:
+ print "AddBlockProtectField success field={}".format(field)
+else:
+ print "AddBlockProtectField fail"
+```
+
+
+
+## RemoveBlockProtectField
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 取消一个方块无法被玩家/实体破坏的区域
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | field | int | 不可破坏区域的唯一ID,AddBlockProtectField的返回值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | success True为取消成功,False为取消失败 |
+
+
+
+## CleanBlockProtectField
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 取消全部已设置的方块无法被玩家/实体破坏的区域
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | success True为取消成功,False为取消失败 |
+
+
+
+## KillEntity
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 杀死某个Entity
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 要杀死的目标的entityId |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否杀死成功 |
+
+- 示例
+
+```python
+self.KillEntity(entityId)
+```
+
+
+
+## CreateEngineEntityByTypeStr
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建指定identifier的实体
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | engineTypeStr | str | 实体identifier,例如'minecraft:husk' |
+ | pos | tuple(float,float,float) | 生成坐标 |
+ | rot | tuple(float,float) | (上下角度,左右角度)实体水平方向的俯仰角度和竖直方向的旋转角度,单位是角度而不是弧度。MC坐标系说明 |
+ | dimensionId | int | 生成的维度,默认值为0(0为主世界,1为地狱,2为末地) |
+ | isNpc | bool | 是否为npc,默认值为False。npc不会移动、转向、存盘。 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str或None | 实体Id或者None |
+
+- 备注
+ - 在未加载的chunk无法创建
+ 生成村民请使用"minecraft:villager_v2"
+
+- 示例
+
+```python
+self.CreateEngineEntityByTypeStr('minecraft:husk', (0, 5, 0), (0, 0), 0)
+```
+
+
+
+## PlaceStructure
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 放置结构
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 放置结构的位置 |
+ | structureName | str | 结构名称 |
+ | dimensionId | int | 希望放置结构的维度,可在对应维度的常加载区块放置结构,默认为-1 |
+ | rotation | int | 放置结构的旋转角度,默认为0(只可旋转90,180,270度) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否放置成功,True为放置成功,False为放置失败 |
+
+- 备注
+ - 放置时需要确保所放置的区块都已加载,否则会放置失败或者部分缺失
+ - 该接口是同步执行的,请勿在一帧内放置大量结构,会造成游戏卡顿
+
+- 示例
+
+```python
+self.PlaceStructure((100, 70, 100), "test:structureName", 0)
+```
+
+
+
+## AddTimer
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 添加定时器,非重复
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | delay | float | 延迟时间,单位秒 |
+ | func | function | 定时器触发函数 |
+ | *args | any | 变长参数,可以不设置 |
+ | **kwargs | any | 字典变长参数,可以不设置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | CallLater | 返回单次触发的定时器实例 |
+
+
+
+## AddRepeatedTimer
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 添加服务端触发的定时器,重复执行
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | delay | float | 延迟时间,单位秒 |
+ | func | function | 定时器触发函数 |
+ | *args | any | 变长参数,可以不设置 |
+ | **kwargs | any | 字典变长参数,可以不设置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | CallLater | 返回触发的定时器实例 |
+
+
+
+## CancelTimer
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 取消定时器
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | timer | CallLater | AddTimer和AddRepeatedTimer时返回的定时器实例 |
+
+- 返回值
+
+ 无
+
+
+
+## GetEntitiesInArea
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取区域内的entity列表
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | startPos | tuple(int,int,int) | 初始位置 |
+ | endPos | tuple(int,int,int) | 结束位置 |
+ | dimensionId | int | 区域所在维度,仅服务端有效,可获取对应维度的常加载区块内的实体列表 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(str) | 返回entityId的list |
+
+- 示例
+
+```python
+self.GetEntitiesInSquareArea((0,0,0), (100,100,100), 0)
+```
+
+
+
+## GetEntitiesAround
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取区域内的entity列表
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 某个entityId |
+ | radius | int | 正方体区域半径 |
+ | filters | dict | 过滤设置字典 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(str) | 返回entityId的list |
+
+- 示例
+
+```python
+#利用过滤器获取玩家身边的entity
+#样例中的过滤器表示满足“是玩家”或者“没有头戴南瓜帽”的entity
+filters = {
+ "any_of": [
+ {
+ "subject" : "other",
+ "test" : "is_family",
+ "value" : "player"
+ },
+ {
+ "test" : "has_equipment",
+ "domain": "head",
+ "subject" : "other",
+ "operator" : "not",
+ "value" : "carved_pumpkin"
+ }
+ ]
+}
+self.GetEntitiesAround(entityId, 100, filters)
+```
+
+
+
+## ShowHealthBar
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置是否显示血条
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | show | bool | True为显示。开启后可用health组件单独设置某个实体的血条颜色及是否显示 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.ShowHealthBar(True)
+```
+
+
+
+## SetNameDeeptest
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置名字是否透视
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | deeptest | bool | True为不透视。默认情况下为透视 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 设置为不透视
+self.SetNameDeeptest(True)
+```
+
+
+
+## GetScreenSize
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取游戏分辨率
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | 宽高(像素) |
+
+- 示例
+
+```python
+width, height = self.GetScreenSize()
+```
+
+
+
+## SetRenderLocalPlayer
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置本地玩家是否渲染
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | render | bool | True为渲染 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 不渲染本地玩家
+self.SetRenderLocalPlayer(False)
+```
+
+
+
+## AddPickBlacklist
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 添加使用camera组件选取实体时的黑名单,即该实体不会被选取到
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 添加黑名单
+self.AddPickBlacklist(entityId)
+```
+
+
+
+## ClearPickBlacklist
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 清除使用camera组件选取实体的黑名单
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 清除黑名单中所有实体
+self.ClearPickBlacklist()
+```
+
+
+
+## CheckWordsValid
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 检查语句是否合法,即不包含敏感词
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | words | str | 语句 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:语句合法
False:语句非法 |
+
+- 示例
+
+```python
+isValid = self.CheckWordsValid("creeper? Aww man")
+```
+
+
+
+## CheckNameValid
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 检查昵称是否合法,即不包含敏感词
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 昵称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:昵称合法 False:昵称非法 |
+
+- 示例
+
+```python
+isValid = self.CheckNameValid("史蒂夫")
+```
+
+
+
+## GetScreenViewInfo
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取游戏视角信息。分辨率为1313,618时,画布是376,250的2倍,所以viewport得到的是1313 + (2-(1313%2)),y值类似,可参考 《我的世界》界面适配方法
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float,float) | 依次为宽、高、x偏移、y偏移 |
+
+- 示例
+
+```python
+width, height, offsetX, offsetY= self.GetScreenViewInfo()
+```
+
+
+
+## SimulateTouchWithMouse
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 模拟使用鼠标控制UI(PC F11快捷键)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | touch | bool | True:进入鼠标模式,False:退出鼠标模式 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 模拟结果 |
+
+- 示例
+
+```python
+self.SimulateTouchWithMouse(True)
+```
+
+
+
+## GetCurrentDimension
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取客户端当前维度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 维度id。客户端未登录完成或正在切维度时返回-1 |
+
+- 示例
+
+```python
+dimId = self.GetCurrentDimension()
+```
+
+
+
+## GetChinese
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取langStr对应的中文,可参考PC开发包中\handheld\bed-loc\handheld\data\resource_packs\vanilla\texts\zh_CN.lang
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | langStr | str | 传入的langStr |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | langStr对应的中文,若找不到对应的中文,则会返回langStr本身 |
+
+- 示例
+
+```python
+# 获取"entity.wolf.name"对应的中文("狼")
+Chinese = self.GetChinese("entity.wolf.name")
+```
+
+
+
+## SetDisableHunger
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置是否屏蔽饥饿度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isDisable | bool | 是否屏蔽饥饿度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 如需隐藏饥饿度请使用extraClientApi的HideHungerGui
+
+- 示例
+
+```python
+self.SetDisableHunger(True)
+```
+
+
+
+## SetOneTipMessage
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 在具体某个玩家的物品栏上方弹出tip类型通知,位置位于popup类型通知上方,此功能更建议在客户端使用game组件的对应接口SetTipMessage
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 具体玩家Id |
+ | message | str | 消息内容,可以在消息前增加extraServerApi.GenerateColor("RED")字符来设置颜色,具体参考样例 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# playerId 变量改为具体的玩家Id
+self.SetOneTipMessage(playerId, serverApi.GenerateColor("RED") + "tip提示")
+```
+
+
+
+## SetPopupNotice
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 在物品栏上方弹出popup类型通知,位置位于tip类型消息下方,服务端调用是针对全体玩家,客户端调用只影响本地玩家
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | message | str | 消息内容,可以在消息前增加extraClientApi.GenerateColor("RED")字符来设置颜色,具体参考样例 |
+ | subtitle | str | 消息子标题内容,效果同message,也可设置颜色,位置位于message上方 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.SetPopupNotice(clientApi.GenerateColor("RED") + "消息通知", "消息子标题")
+```
+
+
+
+## SetTipMessage
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 在物品栏上方弹出tip类型通知,位置位于popup类型通知上方,服务端调用是针对全体玩家,客户端调用只影响本地玩家
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | message | str | 消息内容,可以在消息前增加extraServerApi.GenerateColor("RED")字符来设置颜色,具体参考样例 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.SetTipMessage(serverApi.GenerateColor("RED") + "tip提示")
+```
+
+
+
+## SetNotifyMsg
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置消息通知
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | msg | str | 消息内容 |
+ | color | str | ColorCode,默认为白色 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.SetNotifyMsg("消息通知", self.GetMinecraftEnum().ColorCode.BLUE))
+```
+
+
+
+## GetPlayerGameType
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取指定玩家的游戏模式
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | GameType枚举 |
+
+- 示例
+
+```python
+gameType = self.GetPlayerGameType(playerId)
+```
+
+
+
+## HasEntity
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 判断 entity 是否存在
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 0表示不存在,1表示存在 |
+
+- 示例
+
+```python
+exist = self.HasEntity(entityId)
+```
+
+
+
+## IsEntityAlive
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 判断生物实体是否存活或非生物实体是否存在
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | false表示生物实体已死亡或非生物实体已销毁,true表示生物实体存活或非生物实体存在 |
+
+- 备注
+ - 注意,如果检测的实体所在的区块被卸载,则该接口返回False。因此,需要注意实体所在的区块是否被加载。
+ - 区块卸载:游戏只会加载玩家周围的区块,玩家移动到别的区域时,原来所在区域的区块会被卸载,参考[区块介绍](https://zh.minecraft.wiki/w/%E5%8C%BA%E5%9D%97)
+
+- 示例
+
+```python
+alive = self.IsEntityAlive(entityId)
+```
+
+
+
+## CreateGravityComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建gravity组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | GravityComponentServer | gravity组件实例 |
+
+
+
+## GetEntityGravity
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体的重力因子,当生物重力因子为0时则应用世界的重力因子
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 重力因子 |
+
+- 示例
+
+```python
+self.GetEntityGravity(entityId)
+```
+
+
+
+## SetEntityGravity
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体的重力因子,当生物重力因子为0时则应用世界的重力因子
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | gravity | float | 负数,表示每帧向下的速度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetEntityGravity(entityId, -0.08)
+```
+
+
+
+## CreateHurtComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建hurt组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | HurtCompServer | hurt组件实例 |
+
+
+
+## SetHurtByEntity
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 对实体造成伤害
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | attackerId | str | 伤害来源的实体id |
+ | damage | int | 伤害值 |
+ | byPassArmor | bool | 是否忽略护甲 |
+ | knocked | bool | 实体是否被击退,可缺损,缺损时默认值为True |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+
+
+## SetHurtByEntityNew
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 对实体造成伤害
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | damage | int | 伤害值 |
+ | cause | str | 伤害来源,详见Minecraft枚举值文档的ActorDamageCause枚举 |
+ | attackerId | str | 伤害来源的实体id,默认为None |
+ | childAttackerId | str | 伤害来源的子实体id,默认为None,比如玩家使用抛射物对实体造成伤害,该值应为抛射物Id |
+ | knocked | bool | 实体是否被击退,默认值为True |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+
+
+## SetEntityImmuneDamage
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体是否免疫伤害(该属性存档)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | immune | bool | 是否免疫伤害 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetEntityImmuneDamage(entityId, True)
+```
+
+
+
+## CreateItemBannedComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建itembanned组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ItemBannedCompServer | itembanned组件实例 |
+
+
+
+## AddBannedItem
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 增加禁用物品
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemName | str | 物品标识符,格式[namespace:name:auxvalue],auxvalue默认为0,auxvalue为*时候匹配任意auxvalue值。例如:minecraft:egg(也可以通过填写配置文件config/banned_items.json进行启动禁用) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否增加成功 |
+
+- 示例
+
+```python
+self.AddBannedItem("minecraft:egg")
+```
+
+
+
+## GetBannedItemList
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取禁用物品列表
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(str)或None | 禁用物品列表或者None(异常情况),list元素为物品标识符,格式[namespace:name:auxvalue],auxvalue默认为0,auxvalue为*时候匹配任意auxvalue值。 |
+
+
+
+## RemoveBannedItem
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 移除禁用物品
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemName | str | 物品标识符,格式[namespace:name:auxvalue],auxvalue默认为0,auxvalue为*时候匹配任意auxvalue值。 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否移除成功 |
+
+- 示例
+
+```python
+self.RemoveBannedItem("minecraft:stained_glass:2")
+```
+
+
+
+## ClearBannedItems
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 清空禁用物品
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否清空成功 |
+
+
+
+## CreateItemComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建item组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ItemCompServer或ItemCompClient | item组件实例 |
+
+
+
+## GetItemBasicInfo
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取物品的基础信息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemName | str | item的identifier |
+ | auxValue | int | 物品的附加值auxvalue,默认为0 |
+ | isEnchanted | bool | 是否附魔,默认为False。用于返回的idAux |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 基础信息字典,见备注 |
+
+- 备注
+ - auxValue默认值是0,可以不设置。如果物品不存在,返回值为None
+ | 关键字 | 数据类型 | 说明 |
+ | ----------| --------------------- | ---------|
+ | itemName | str | 本地化的物品名字 |
+ | maxStackSize |int| 物品最大堆叠数目 |
+ | maxDurability |int| 物品最大耐久值 |
+ | idAux |int| 主要用于客户端的ui绑定,详见客户端接口 |
+ | tierDict |dict| 自定义方块定义的挖掘相关的属性 netease:tier,没有设置时返回None |
+ | itemCategory |str| 创造栏分类 |
+ | itemType |str| 物品类型 |
+ | itemTierLevel |int| 工具等级 |
+ - 自定义物品的itemCategory值为json文件中的category字段值,客户端读取resource包的json文件,服务端读取behavior包中的json文件,两个json文件中的category字段需要保持一致,否则会报错
+ - 创造栏分类说明
+ | 创造栏分类 | 意义 |
+ | --------- | -----|
+ | construction | 建筑 |
+ | nature | 自然 |
+ | equipment | 装备 |
+ | items | 物品 |
+ | custom | 自定义 |
+ | 空字符串 | 不在创造栏 |
+ - 物品类型,值为空字符串或者下列类型名之一:
+ | 类型名 | 意义 |
+ | ----- | ----- |
+ | book | 书 |
+ | sword | 剑 |
+ | shears | 剪刀 |
+ | axe | 斧头 |
+ | clock | 时钟 |
+ | bucket | 桶 |
+ | fishing_rod | 钓鱼竿 |
+ | hoe | 锄头 |
+ | shovel | 锹 |
+ | pickaxe | 镐 |
+ | dye | 骨粉 |
+ - 工具等级代表不同的材质,没有工具等级时为值-1,工具等级与材质对应关系如下
+ | 工具等级 | 材质 |
+ | ------- | ---- |
+ | 0 | 木制/金制工具 |
+ | 1 | 石制工具 |
+ | 2 | 铁制工具 |
+ | 3 | 钻石工具 |
+
+- 示例
+
+```python
+self.GetItemBasicInfo("minecraft:bow")
+```
+
+
+
+## GetLocalPlayerId
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取本地玩家的id
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 客户端玩家Id |
+
+
+
+## ClearPlayerOffHand
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 清除玩家左手物品
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.ClearPlayerOffHand(playerId)
+```
+
+
+
+## GetPlayerItem
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取玩家物品,支持获取背包,盔甲栏,副手以及主手物品
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+ | posType | int | ItemPosType枚举 |
+ | slotPos | int | 槽位,获取INVENTORY及ARMOR时需要设置,其他情况写0即可 |
+ | getUserData | bool | 是否获取userData,默认为False |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 物品信息字典 ,没有物品则返回None |
+
+- 示例
+
+```python
+self.GetPlayerItem(playerId, self.GetMinecraftEnum().ItemPosType.INVENTORY, 0)
+```
+
+
+
+## ChangePlayerItemTipsAndExtraId
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 修改玩家物品的自定义tips和自定义标识符
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+ | posType | int | ItemPosType枚举 |
+ | slotPos | int | 箱子槽位 |
+ | customTips | str | 物品的自定义tips |
+ | extraId | str | 物品的自定义标识符 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.ChangePlayerItemTipsAndExtraId(playerId, self.GetMinecraftEnum().ItemPosType.INVENTORY, 0, "自定义tips", "自定义标识符")
+```
+
+
+
+## AddEnchantToInvItem
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 给物品栏的物品添加附魔信息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+ | slotPos | int | 物品栏槽位 |
+ | enchantType | int | 附魔类型,可以查看枚举值文档 |
+ | level | int | 附魔等级 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.AddEnchantToInvItem(playerId, 0, serverApi.GetMinecraftEnum().EnchantType.BowDamage, 2)
+```
+
+
+
+## GetInvItemEnchantData
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取物品栏的物品附魔信息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+ | slotPos | int | 物品栏槽位 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(tuple(int,int)) | list中每个tuple由附魔类型(EnchantType枚举)和附魔等级组成。没有附魔则为空list |
+
+- 示例
+
+```python
+self.GetInvItemEnchantData(playerId, 0)
+```
+
+
+
+## GetOffhandItem
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取左手物品的信息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+ | getUserData | bool | 是否获取物品的userData,默认为False |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 物品信息字典 ,没有物品则返回None |
+
+- 示例
+
+```python
+offhandData = self.GetOffhandItem(entityId)
+```
+
+
+
+## SetInvItemNum
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置玩家背包物品数目
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+ | slotPos | int | 物品栏槽位 |
+ | num | int | 物品数目,可以通过设置数量为0来达到清除背包物品的效果 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetInvItemNum(playerId, 0, 10)
+```
+
+
+
+## SpawnItemToLevel
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 生成物品掉落物,如果需要获取物品的entityId,可以调用服务端系统接口CreateEngineItemEntity
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemDict | dict | 物品信息字典 |
+ | dimensionId | int | 设置dimension |
+ | pos | tuple(float,float,float) | 生成位置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+itemDict = {
+ 'itemName': 'minecraft:bow',
+ 'count': 1,
+ 'enchantData': [(serverApi.GetMinecraftEnum().EnchantType.BowDamage, 1),],
+ 'auxValue': 0,
+ 'customTips':'§c new item §r',
+ 'extraId': 'abc',
+ 'userData': {},
+}
+self.SpawnItemToLevel(itemDict, 0, (0,80,20))
+# 当最大生成数量为 1 时,可以继续调用生成 2 个物品
+self.SpawnItemToLevel(itemDict, 0, (0,80,20))
+```
+
+
+
+## SpawnItemToPlayerInv
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 生成物品到玩家背包
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemDict | dict | 物品信息字典 |
+ | playerId | str | 玩家id |
+ | slotPos | int | 背包槽位(可选) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 当slotPos不设置时,当设置的数量超过单个槽位堆叠的上限时,会将多余的物品设置到另外的空闲槽位.如果生成的物品与背包中有的槽位的物品种类一致,该接口也会将物品增加到这些槽位中。注意:如果背包中剩余的物品数目和增加的物品数目之和大于64,则会生成物品数目到64,但是接口返回失败。
+
+- 示例
+
+```python
+itemDict = {
+ 'itemName': 'minecraft:bow',
+ 'count': 1,
+ 'enchantData': [(self.GetMinecraftEnum().EnchantType.BowDamage, 1),],
+ 'auxValue': 0,
+ 'customTips':'§c new item §r',
+ 'extraId': 'abc',
+ 'userData': { },
+}
+self.SpawnItemToPlayerInv(itemDict, playerId, 0)
+```
+
+
+
+## SpawnItemToPlayerCarried
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 生成物品到玩家右手
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemDict | dict | 物品信息字典 |
+ | playerId | str | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+itemDict = {
+ 'itemName': 'minecraft:bow',
+ 'count': 1,
+ 'enchantData': [(self.GetMinecraftEnum().EnchantType.BowDamage, 1),],
+ 'auxValue': 0,
+ 'customTips':'§c new item §r',
+ 'extraId': 'abc',
+ 'userData': { },
+}
+self.SpawnItemToPlayerCarried(itemDict, playerId)
+```
+
+
+
+## GetCarriedItem
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取右手物品的信息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | getUserData | bool | 是否获取物品的userData,默认为False |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 物品信息字典 ,没有物品则返回None |
+
+
+
+## GetSlotId
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取当前手持的快捷栏的槽id
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 0到8 |
+
+- 示例
+
+```python
+slotId = self.GetSlotId()
+```
+
+
+
+## GetItemFormattedHoverText
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取物品的格式化hover文本,如:§f灾厄旗帜§r
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemName | str | item的identifier |
+ | auxValue | int | 物品的附加值auxValue,默认为不指定auxValue(0) |
+ | showCategory | bool | 是否包括item的类别信息,默认False |
+ | userData | dict | 物品userData,默认为None |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 物品的格式化hover文本 |
+
+- 示例
+
+```python
+# 灾厄旗帜
+self.GetItemFormattedHoverText("minecraft:banner", 15, True, {'Type': 1})
+```
+
+
+
+## GetItemHoverName
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取物品的hover名称,如:灾厄旗帜§r
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemName | str | item的identifier |
+ | auxValue | int | 物品的附加值auxValue,默认为不指定auxValue(0) |
+ | userData | dict | 物品userData,默认为None |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 物品hover名称 |
+
+- 示例
+
+```python
+# 灾厄旗帜
+self.GetItemHoverName("minecraft:banner", 15, {'Type': 1})
+```
+
+
+
+## GetItemEffectName
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取物品的状态描述,如:§7保护 0§r
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | itemName | str | item的identifier |
+ | auxValue | int | 物品的附加值auxValue,默认为不指定auxValue(0) |
+ | userData | dict | 物品userData,默认为None |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 物品的状态描述 |
+
+- 示例
+
+```python
+# 灾厄旗帜
+self.GetItemEffectName("minecraft:banner", 15, {'Type': 1})
+```
+
+
+
+## GetUserDataInEvent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 使物品相关客户端事件的 物品信息字典 参数带有userData。在mod初始化时调用即可
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 引擎事件名 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+# 这样调用之后,ActorAcquiredItemClientEvent事件的itemDict参数会带有userData字段
+self.GetUserDataInEvent("ActorAcquiredItemClientEvent")
+```
+
+
+
+## ChangeItemTexture
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 替换物品的贴图,修改后所有用到该贴图的物品都会被改变,后续创建的此类物品也会被改变。会同时修改物品在UI界面上的显示,手持时候的显示与场景掉落的显示。
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | identifier | str | 物品标识符,格式[namespace:name:auxvalue],auxvalue默认为0 |
+ | texturePath | str | 贴图路径 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否修改成功(因为采用延迟加载,此处返回成功不代表贴图路径正确,路径错误会导致渲染时贴图丢失显示异常) |
+
+- 备注
+ - 因为会同时修改用到此贴图的所有物品,所以使用的时候尽量谨慎,不建议改原版的物品,建议只用于修改用到自已定义的新贴图的物品。
+ - 序列帧贴图物品暂不支持动态修改贴图
+ - 部分物品有特殊逻辑无法修改:箱子,旗帜,生物头颅,盾牌,三叉戟,鱼杆
+
+- 示例
+
+```python
+print(self.ChangeItemTexture("mytool:hatchet_1:0", "textures/items/hatchet_1"))
+```
+
+
+
+## CreateLvComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建lv组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | LevelComponentServer | lv组件实例 |
+
+
+
+## GetPlayerLevel
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取玩家等级
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 玩家等级 |
+
+- 示例
+
+```python
+self.GetPlayerLevel(playerId)
+```
+
+
+
+## AddPlayerLevel
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 修改玩家等级
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | level | int | 玩家等级,可设置负数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.AddPlayerLevel(playerId, 2)
+```
+
+
+
+## CreateMobSpawnComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建mobSpawn组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | MobSpawnComponentServer | mobSpawn组件实例 |
+
+
+
+## SpawnCustomModule
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置自定义刷怪
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | biomeType | int | BiomeType枚举 |
+ | change | int | Change枚举 |
+ | entityType | int | EntityType枚举 |
+ | probability | int | 生成的权重[1, 10] |
+ | minCount | int | 最小生成数量[0, 10] |
+ | maxCount | int | 最大生成数量[0, 10] |
+ | environment | int | 1:生成在表面;2:生成在水里 |
+ | minBrightness | int | 生成该生物时的最小光照[1, 15],不设置时使用默认值 |
+ | maxBrightness | int | 生成该生物时的最大光照[1, 15],不设置时使用默认值 |
+ | minHeight | int | 生成该生物时最小的海拔高度[0, 256],不设置时使用默认值 |
+ | maxHeight | int | 生成该生物时最大的海拔高度[0, 256],不设置时使用默认值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SpawnCustomModule(BiomeType.river,Change.Add,EntityType.Dolphin,10,1,10,2)
+```
+
+
+
+## CreateModAttrComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建modAttr组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ModAttrComponentServer或ModAttrComponentClient | modAttr组件实例 |
+
+
+
+## SetEntityModAttr
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置属性值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | paramName | str | 属性名称,str的名称建议以mod命名为前缀,避免多个mod之间冲突 |
+ | paramValue | any | 属性值,支持python基础数据 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 注意:tuple、set在同步时会转成list。建议优先使用数字和字符串等非集合类型。
+
+- 示例
+
+```python
+self.SetEntityModAttr(entityId, 'health', 1)
+self.SetEntityModAttr(entityId, 'testDict', {'key':'value'})
+```
+
+
+
+## GetEntityModAttr
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取属性值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | paramName | str | 属性名称,str的名称建议以mod命名为前缀,避免多个mod之间冲突 |
+ | defaultValue | any | 属性默认值,属性不存在时返回该默认值,此时属性值依然未设置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | any | 返回属性值 |
+
+- 备注
+ - defaultValue不传的时候默认为None
+
+- 示例
+
+```python
+# 如果直接修改GetAttr出来的集合类型,需要重新调用一遍SetAttr确保有进行更新
+testDict = self.GetEntityModAttr(entityId, 'testDict')
+testDict['key'] = 'newValue'
+self.SetEntityModAttr(entityId, 'testDict', testDict)
+```
+
+
+
+## RegisterEntityModAttrUpdateFunc
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 注册属性值变换时的回调函数,当属性变化时会调用该函数
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | paramName | str | 监听的属性名称 |
+ | func | function | 监听的回调函数 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 回调函数需要接受一个参数,参数是dict,具体数据示例:{'oldValue': 0, 'newValue': 1, 'entityId': ’-433231231231‘}
+
+- 示例
+
+```python
+# 这个entityId传的是所需要监听的对象的Id
+self.RegisterEntityModAttrUpdateFunc(entityId, 'health', self.jumpingText)
+# 当脚本层的health属性变化时则会调用self.jumpingText
+def jumpingText(self, data):
+ entityId = data['entityId']
+ oldValue = data['oldValue']
+ newValue = data['newValue']
+```
+
+
+
+## UnRegisterEntityModAttrUpdateFunc
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 反注册属性值变换时的回调函数
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | paramName | str | 监听的属性名称 |
+ | func | function | 监听的回调函数 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 需要传注册时的同一个函数作为参数
+
+- 示例
+
+```python
+self.UnRegisterEntityModAttrUpdateFunc(entityId, 'health', self.jumpingText)
+```
+
+
+
+## CreateModelComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建model组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ModelComponentServer或ModelComponentClient | model组件实例 |
+
+
+
+## SetEntityOpacity
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置生物模型的透明度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | opacity | float | 透明度值,取值范围为[0, 1],值越小越透明 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+self.SetEntityOpacity(entityId, 0.2)
+```
+
+
+
+## PlayEntityAnim
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 播放骨骼动画
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | aniName | str | 动画名称 |
+ | isLoop | bool | 是否循环播放 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.PlayEntityAnim(entityId, "run", True)
+```
+
+
+
+## GetEntityModelId
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取骨骼模型的Id,主要用于特效绑定骨骼模型
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 当前骨骼模型实例的id |
+
+- 示例
+
+```python
+modelId = self.GetEntityModelId(entityId)
+```
+
+
+
+## SetEntityModel
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置骨骼模型
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | modelName | str | 模型名称,值为""时重置模型 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetModel(entityId, "xuenv")
+```
+
+
+
+## ResetEntityModel
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 恢复实体为原版模型
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.ResetModel(entityId)
+```
+
+
+
+## BindModelToEntity
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 实体替换骨骼模型后,再往上其他挂接骨骼模型。
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | boneName | str | 挂接的骨骼名称 |
+ | modelName | str | 要挂接的骨骼模型名称 |
+ | offset | tuple(float,float,float) | 偏移量 |
+ | rot | tuple(float,float,float) | 旋转 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 挂到骨骼上的骨骼模型的Id,失败返回-1 |
+
+- 示例
+
+```python
+# 把名称为gun的骨骼模型挂接到rightHand骨骼上
+gunModelId = self.BindModelToEntity(entityId, "rightHand", "gun")
+```
+
+
+
+## UnBindModelToEntity
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 取消实体上挂接的某个骨骼模型。取消挂接后,这个modelId的模型便会销毁,无法再使用,如果是临时隐藏可以使用HideModel
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | modelId | int | 要取消挂接的骨骼模型的id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 取消挂接是否成功 |
+
+
+
+## CreateMoveToComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建moveTo组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | MoveToComponentServer | moveTo组件实例 |
+
+
+
+## SetEntityMoveSetting
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 寻路组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | pos | tuple(float,float,float) | 寻路目标位置 |
+ | speed | float | 移动速度 |
+ | maxIteration | int | 寻路算法最大迭代次数 默认200 |
+ | callback | function | 寻路结束回调函数 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 使用该接口时,需要在生物中配置有寻路的json组件。配置寻路json组件后,该接口会自动选择相应类型的寻路
+ 目前支持的寻路json组件包括:
+ - minecraft:navigation.walk
+ 陆地寻路,与原版僵尸的寻路相同
+ - minecraft:navigation.generic
+ 水陆寻路,支持陆地与水中,与原版溺尸的寻路相同
+ - minecraft:navigation.climb
+ 陆地寻路,但是支持爬墙,与原版蜘蛛的寻路相同。这种寻路可能会被头顶方块阻挡,一直无法抵达目的地
+ - minecraft:navigation.fly
+ 空中寻路,与原版鹦鹉的寻路相同
+ 以上的寻路都需要搭配一些其他json组件(例如movement)使用,具体可以参考NavigationMod的示例
+ 上面没有提到的navigation类型暂不支持,例如minecraft:navigation.float(如原版恶魂),minecraft:navigation.hover(如原版蜜蜂)
+ - 不同的生物拥有不同的默认最大跟随距离,若要寻路的目标点距离大于此值引擎会拒绝寻路,要修改该距离可以通过在entity的json中配置.
+ ```json
+ {
+ "format_version": "1.8.0",
+ "minecraft:entity": {
+ "components": {
+ "minecraft:follow_range": {
+ "value": 48,
+ "max": 48
+ }
+ }
+ }
+ }
+ ```
+ - 关于maxIteration参数
+ 该参数会影响实际寻到路径的长度。若寻路算法迭代一定次数后,未寻到目标点,会返回局部最优解,即生物只会走到半路。
+
+ 在无大型障碍物的情况下,参数对应的参考寻路距离如下:该参数默认值200,最大值2000,请开发者根据实际情况选择。
+ | maxIteration | 与目标点直线距离 |
+ | ------------ | ---------------- |
+ | 200 | 13 |
+ | 500 | 20 |
+ | 1000 | 30 |
+ | 2000 | 43 |
+ - 关于callback函数
+ 该函数需要接受两个参数,第一个参数为寻路的entityId,类型str,第二个参数为寻路结果,类型int
+
+ (玩家获取到的位置比地面会高1.62格,若以玩家位置为目标点需要先把y轴减去1.62,否则callback会一直返回1)
+ | 结果 | 说明 |
+ | ---- | ------------------------------------------------------------ |
+ | -3 | 寻路失败,大于跟随距离,或者对正在寻路的飞行系生物使用 |
+ | -2 | 寻路失败,生物没有寻路组件(指minecraft:navigation) |
+ | -1 | 寻路失败,参数错误,或生物不存在 |
+ | 0 | 寻路完成。到达设定的目标点 |
+ | 1 | 寻路完成,但未到达目标点(可能由于maxIteration参数偏小) |
+ | 2 | 寻路中断。中途遇到障碍物被阻碍 |
+ | 3 | 寻路中断。被生物原版寻路行为覆盖,或寻路未结束时重复调用moveTo组件 |
+ - demo简介:
+ 聊天栏输入walk/generic/climb/fly会原地生成一个使用对应navigation json组件的生物,然后跑到其他位置,再输入go,会将刚才生成的生物导航到玩家当前位置。
+ 这4种示例生物的行为json可以在NavigationMod_behavior/entities目录查看。
+ 4种示例生物的最大寻路距离都设置为了48格。
+
+- 示例
+
+```python
+def myCallback(entityId, result):
+ if result in (-1,-2,-3):
+ self.LogError('[SetMoveSetting] failed')
+ elif result==0:
+ self.LogInfo('[SetMoveSetting] success')
+ elif result in (1,2,3):
+ self.LogError('[SetMoveSetting] terminated')
+
+self.SetMoveSetting(entityId, (x,y,z),2.0,200,myCallback)
+```
+
+
+
+## CreateMsgComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建msg组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | MsgComponentServer | msg组件实例 |
+
+
+
+## SendMsg
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 模拟玩家给所有人发送聊天栏消息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 发送者玩家的名字 |
+ | msg | str | 消息内容 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - name参数需要设置玩家的名字(可通过name组件获取),如果设置的玩家名字不存在,则随机找一个玩家发出该消息
+
+- 示例
+
+```python
+self.SendMsg("playerName","test")
+```
+
+
+
+## SendMsgToPlayer
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 模拟玩家给另一个玩家发送聊天栏消息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | fromEntityId | str | 发送者玩家ID |
+ | toEntityId | str | 接受者玩家ID |
+ | msg | str | 消息内容 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+self.SendMsgToPlayer(fromEntityId, toEntityId, "test")
+```
+
+
+
+## NotifyOneMessage
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 给指定玩家发送聊天框消息
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 指定玩家id |
+ | msg | str | 消息内容 |
+ | color | str | 颜色样式代码字符串,可参考wiki[样式代码](https://zh.minecraft.wiki/w/%E6%A0%B7%E5%BC%8F%E4%BB%A3%E7%A0%81),默认为白色 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+self.NotifyOneMessage(playerId, "test", "§c")
+```
+
+
+
+## CreateNameComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建name组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | NameComponentServer或NameComponentClient | name组件实例 |
+
+
+
+## GetEntityName
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取生物的自定义名称,即使用命名牌或者SetName接口设置的名称
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 生物的自定义名称 |
+
+- 示例
+
+```python
+name = self.GetEntityName(entityId)
+```
+
+
+
+## SetEntityName
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 用于设置生物的自定义名称,跟原版命名牌作用相同,玩家和新版流浪商人暂不支持
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | name | str | 名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetEntityName(entityId, "new Name")
+```
+
+
+
+## SetPlayerPrefixAndSuffixName
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置玩家前缀和后缀名字
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | prefix | str | 前缀内容 |
+ | prefixColor | str | 前缀内容颜色描述,可以使用GenerateColor接口传入参数 |
+ | suffix | str | 后缀内容 |
+ | suffixColor | str | 后缀内容颜色描述,可以使用GenerateColor接口传入参数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+color = self.GetMinecraftEnum().ColorCode.RED
+self.SetPlayerPrefixAndSuffixName(playerId, "红队", color, '肉盾', color)
+```
+
+
+
+## SetEntityShowName
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置生物名字是否按照默认游戏逻辑显示
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | show | bool | True为显示 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 备注
+ - 当设置为True时,生物的名字显示遵循游戏默认的渲染逻辑,即普通生物需要中心点指向生物才显示名字,玩家则是会一直显示名字
+
+- 示例
+
+```python
+# 不显示头上的名字
+self.SetEntityShowName(entityId, False)
+```
+
+
+
+## SetEntityAlwaysShowName
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置生物名字是否一直显示,瞄准点不指向生物时也能显示
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | show | bool | True为显示 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 备注
+ - 该接口只对普通生物生效,对玩家设置不起作用
+
+- 示例
+
+```python
+# 不显示头上的名字
+self.SetEntityAlwaysShowName(entityId, False)
+```
+
+
+
+## CreatePersistenceComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建persistence组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PersistenceCompServer | persistence组件实例 |
+
+
+
+## SetEntityPersistence
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体是否存盘
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | isPersistent | bool | True为存盘,False为不存盘 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 实体默认都会存盘。设置为不存盘的实体,在区块卸载与退出游戏时不会存档。
+
+- 示例
+
+```python
+self.SetEntityPersistence(entityId, True)
+```
+
+
+
+## CreatePetComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建pet组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PetComponentServer | pet组件实例 |
+
+
+
+## DisablePet
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 关闭官方伙伴功能,单人游戏以及本地联机不支持该接口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 关闭结果 |
+
+
+
+## EnablePet
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 启用官方伙伴功能,单人游戏以及本地联机不支持该接口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 启用结果 |
+
+
+
+## CreatePlayerComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建player组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PlayerCompServer | player组件实例 |
+
+
+
+## EnablePlayerKeepInventory
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置玩家死亡不掉落物品
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 实体id |
+ | enable | bool | 是否开启“保留物品栏” |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.EnablePlayerKeepInventory(playerId, True)
+```
+
+
+
+## CreatePortalComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建portal组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PortalComponentServer | portal组件实例 |
+
+
+
+## CreatePosComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建pos组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PosComponentServer或PosComponentClient | pos组件实例 |
+
+
+
+## GetEntityPos
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 位置信息 |
+
+- 备注
+ - 对于非玩家,获取到的是脚底部位的位置
+ - 对于玩家,如果处于行走,站立,游泳,潜行,滑翔状态,获得的位置比脚底位置高1.62;如果处于睡觉状态,获得的位置比最低位置高0.2
+
+
+
+## GetEntityFootPos
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体脚所在的位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 位置信息 |
+
+
+
+## SetEntityPos
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | pos | tuple(int,int,int) | xyz值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 行为与使用tp命令一致,实体会瞬移到目标点
+ - 对于所有类型的实体都是设置脚底位置,与[SetFootPos](#setfootpos)等价
+ - 在床上时调用该接口会返回False
+
+- 示例
+
+```python
+self.SetEntityPos(entityId, (1,2,3))
+```
+
+
+
+## SetEntityFootPos
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体脚底所在的位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | pos | tuple(float,float,float) | 实体脚所在的位置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 行为与使用tp命令一致,实体会瞬移到目标点
+ - 在床上时调用该接口会返回False
+
+- 示例
+
+```python
+self.SetEntityFootPos(entityId, (0, 4, 0))
+```
+
+
+
+## CreateProjectileComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建projectile组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ProjectileComponentServer | projectile组件实例 |
+
+
+
+## CreateProjectileEntity
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建抛射物(直接发射)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | spawnerId | str | 创建者Id |
+ | entityIdentifier | str | 创建抛射物的类别,如minecraft:snowball |
+ | param | dict | 默认为None,详细说明请见备注 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 创建抛射物的Id,失败时为“-1” |
+
+- 备注
+ - param参数解释如下:
+ | 参数 | 类型 | 解释 |
+ | ----------------- | ----- | ------------------------------------------------------------ |
+ | position | tuple(float,float,float) | 初始位置 |
+ | direction | tuple(float,float,float) | 初始朝向 |
+ | power | float | 投掷的力量值 |
+ | gravity | float | 抛射物重力因子,默认为json配置中的值 |
+ | damage | float | 抛射物伤害值,默认为json配置中的值 |
+ | targetId | str | 抛射物目标(指定了target之后,会和潜影贝生物发射的跟踪导弹的那个投掷物是一个效果),默认不指定 |
+ | isDamageOwner | bool | 对创建者是否造成伤害,默认不造成伤害 |
+
+- 示例
+
+```python
+param = {
+ 'position': (1,1,1),
+ 'direction': (1,1,1)
+}
+self.CreateProjectileEntity(playerId, "minecraft:snowball", param)
+```
+
+
+
+## CreateRecipeComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建recipe组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | RecipeCompServer或RecipeCompClient | recipe组件实例 |
+
+
+
+## GetRecipeResult
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 根据配方id获取配方结果。仅支持合成配方
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | recipeId | str | 配方id,对应配方json文件中的identifier字段 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(dict) | list的元素resultDict字典见备注 |
+
+- 备注
+ - resultDict字典内容如下
+ | 关键字 | 数据类型 | 说明 |
+ | ----------| --------------------- | ---------|
+ | itemName | str | 物品名称id |
+ |auxValue| int | 物品附加值 |
+ |num| int | 物品数目 |
+
+- 示例
+
+```python
+self.GetRecipeResult(recipe1)
+```
+
+
+
+## GetRecipesByResult
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 通过输出物品查询配方所需要的输入材料
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | resultIdentifier | str | 输出物品的标识符 |
+ | tag | str | 对应配方json中的tags字段里面的值 |
+ | aux | int | 输出物品的附加值, 不传参的话默认为0 |
+ | maxResultNum | int | 最大输出条目数,若大于等于0时,结果超过maxResultNum,则只返回maxResultNum条。默认-1,表示返回全部 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(dict) | 返回符合条件的配方列表 |
+
+- 备注
+ - 在获取酿造台配方时,不匹配tag标签与aux值,药水的identifier需要输入全称,例如:minecraft:potion_type:long_turtle_master,否则无法获取正确的配方。
+
+- 示例
+
+```python
+print(self.GetRecipesByResult("minecraft:boat", "crafting_table", 4, -1))
+```
+
+
+
+## GetRecipesByInput
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 通过输入物品查询配方
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | inputIdentifier | str | 输入物品的标识符 |
+ | tag | str | 对应配方json中的tags字段里面的值 |
+ | aux | int | 输出物品的附加值, 不传参的话默认为0 |
+ | maxResultNum | int | 最大输出条目数,若大于等于0时,结果超过maxResultNum,则只返回maxResultNum条。默认-1,表示返回全部 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(dict) | 返回符合条件的配方列表 |
+
+- 备注
+ - 在获取酿造台配方时,不匹配tag标签与aux值,药水的identifier需要输入全称,例如:minecraft:potion_type:long_turtle_master,否则无法获取正确的配方。
+ - 需要遍历较多数据,不建议频繁调用
+
+- 示例
+
+```python
+print(self.GetRecipesByInput("minecraft:log", "crafting_table", 0, -1))
+```
+
+
+
+## CreateRedStoneComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建redStone组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | RedStoneComponentServer | redStone组件实例 |
+
+
+
+## CreateRideComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建ride组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | RideCompServer | ride组件实例 |
+
+
+
+## CreateRotComponent
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建rot组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | RotComponentServer或RotComponentClient | rot组件实例 |
+
+
+
+## GetEntityRot
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | (上下角度,左右角度)单位是角度而不是弧度 |
+
+
+
+## SetEntityRot
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体的头的角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | rot | tuple(float,float) | 俯仰角度及绕竖直方向的角度,单位是角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 建议只用来设置本地玩家。如果设置其他生物,会被生物自身行为覆盖。
+
+- 示例
+
+```python
+# 设为向上仰视45度,并朝向世界z轴正方向
+self.SetEntityRot(entityId, (-45, 0))
+```
+
+
+
+## SetEntityLookAtPos
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置非玩家的实体看向某个位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | targetPos | tuple(float,float,float) | 要看向的目标位置 |
+ | minTime | float | 凝视行为最短维持时间,单位为秒 |
+ | maxTime | float | 凝视行为最长维持时间,单位为秒,最大值为60
实际行为维持时间将在minTime和maxTime之间取随机值 |
+ | reject | bool | 在进行凝视行为时,是否禁止触发其他行为
True为禁止其他行为
False为允许其他行为(此时凝视行为可能表现不明显) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功,True为成功,False为失败 |
+
+- 备注
+ - 调用本接口会打断该生物正在进行的行为,且该生物不会立刻看向目标位置,而是逐渐看向目标位置
+ - 对部分不会转向的实体调用此接口,可能会返回失败或返回成功但实际无表现
+
+- 示例
+
+```python
+# 设置该实体看向(0,78,0)这个位置,该凝视行为最少持续2秒,最多持续3秒,凝视过程中禁止触发其他行为
+self.SetEntityLookAtPos(entityId, (0,78,0), 2, 3, True)
+```
+
+
+
+## GetBodyRot
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取实体的身体的角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 身体绕竖直方向的角度,单位是角度,如果没有身体,返回为0 |
+
+- 示例
+
+```python
+y = self.GetBodyRot(entityId)
+```
+
+
+
+## LockLocalPlayerRot
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 在分离摄像机时,锁定本地玩家的头部角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | lock | bool | 传入True为锁定本地玩家头部角度
传入False为解锁本地玩家头部角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:设置成功
False:设置失败 |
+
+- 备注
+ - 只能设置localplayer,即本地玩家自己
+ - 玩家重生、切换维度时会重置头部角度
+ - 锁定本地玩家头部角度时第一人称视角下可以旋转镜头,但玩家头部角度不会发生改变,下次切换到第一人称视角时镜头角度仍为锁定时的角度
+ - 锁定本地玩家头部角度后,玩家划船时头部角度会尽量靠近锁定时的角度,若无法转到该角度,则会向左或向右看(视哪边距离目标角度更近而定)
+
+- 示例
+
+```python
+# 分离摄像机
+self.DepartCamera()
+# 锁定本地玩家的头部角度
+self.LockLocalPlayerRot(True)
+```
+
+
+
+## SetPlayerLookAtPos
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置本地玩家看向某个位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | targetPos | tuple(float,float,float) | 要看向的目标位置 |
+ | pitchStep | float | 俯仰角方向旋转的角速度(每帧),最小为0.2 |
+ | yawStep | float | 偏航角方向旋转的角速度(每帧),最小为0.2 |
+ | blockInput | bool | 转向目标角度时是否屏蔽玩家操作,默认为True
True:屏蔽玩家操作,此时玩家无法转向、移动
False:不屏蔽玩家操作,此时如果玩家有移动、镜头转向操作将会打断通过本接口设置的转向 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功,True为成功,False为失败 |
+
+- 备注
+ - 当本地玩家未与摄像机分离时,调用本接口会导致摄像机一同看向指定位置
当本地玩家与摄像机分离时,调用本接口将只改变本地玩家模型的朝向
+
+- 示例
+
+```python
+# 设置本地玩家以0.2度每帧的俯仰角速度、1度每帧的偏航角速度看向(0,78,0)这个位置,转向过程中屏蔽玩家操作
+self.SetPlayerLookAtPos((0,78,0), 0.2, 1, True)
+```
+
+
+
+## CreateScaleComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建scale组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ScaleComponentServer | scale组件实例 |
+
+
+
+## CreateTameComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建tame组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TameComponentServer | tame组件实例 |
+
+
+
+## CreateTimeComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建time组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TimeComponentServer | time组件实例 |
+
+
+
+## GetTime
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取当前世界时间
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 当前时间,单位为帧数,表示该存档从新建起经过的时间,而非当前游戏天内的时间。mc中一个游戏天相当于现实的20分钟,即24000帧 |
+
+- 示例
+
+```python
+# 从游戏开始经过的总帧数
+passedTime = self.GetTime()
+# 当前游戏天内的帧数
+timeOfDay = passedTime % 24000
+# 从游戏开始经过的游戏天数
+day = passedTime / 24000
+```
+
+
+
+## CreateWeatherComponent
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建weather组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | WeatherComponentServer | weather组件实例 |
+
+
+
+## CreateActorCollidableComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建actorCollidable组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ActorCollidableCompClient | actorCollidable组件实例 |
+
+
+
+## CreateActorRenderComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建actorRender组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ActorRenderCompClient | actorRender组件实例 |
+
+
+
+## CreateCustomAudioComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建customAudio组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | AudioCustomComponentClient | customAudio组件实例 |
+
+
+
+## CreateBrightnessComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建brightness组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BrightnessCompClient | brightness组件实例 |
+
+
+
+## SetEntityBrightness
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置实体的亮度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | brightness | float | 0:纯黑
1:正常亮度
1-14:较亮甚至纯白
超过14:通常为纯白,即使数值改变也没有明显变化 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:设置成功 False:设置失败 |
+
+- 备注
+ - 目前只支持修改替换了骨骼模型的实体亮度,使用游戏原生模型的实体暂不予支持。
+
+- 示例
+
+```python
+success = self.SetEntityBrightness(entityId, 0.5)
+```
+
+
+
+## CreateCameraComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建camera组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | CameraComponentClient | camera组件实例 |
+
+
+
+## PickFacing
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取准星选中的实体或者方块
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 选中目标的数据,详见备注 |
+
+- 备注
+ - 选中目标为实体时,返回值为:
+ ```python
+ {
+ "type": "Entity",
+ "entityId": entityId
+ }
+ ```
+ - 选中目标为方块时,返回值为:
+ ```python
+ {
+ "type": "Block",
+ "x": x,
+ "y": y,
+ "z": z,
+ "face": face
+ }
+ ```
+ - 没有选中目标时,返回值为:
+ ```python
+ {
+ "type": "None"
+ }
+ ```
+
+- 示例
+
+```python
+pickData = self.PickFacing()
+```
+
+
+
+## CreateFogComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建fog组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | FogCompClient | fog组件实例 |
+
+
+
+## CreateFrameAniControlComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建frameAniControl组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | frameEntityId | str或int | 序列帧实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | FrameAniControlComp | frameAniControl组件实例 |
+
+
+
+## SetFrameAniLoop
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置序列帧是否循环播放,默认为否
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | frameEntityId | str或int | 序列帧实体id |
+ | loop | bool | True表示循环播放 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 设置为循环播放
+self.SetFrameAniLoop(frameEntityId, True)
+```
+
+
+
+## SetFrameAniFaceCamera
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置序列帧是否始终朝向摄像机,默认为是
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | frameEntityId | str或int | 序列帧实体id |
+ | face | bool | True表示朝摄像机 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 设置为不始终朝摄像机
+self.SetFaceCamera(frameEntityId, False)
+```
+
+
+
+## SetFrameAniDeepTest
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置序列帧是否透视,默认为否
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | frameEntityId | str或int | 序列帧实体id |
+ | deepTest | bool | False表示透视,则被物体/方块阻挡时仍然能看到序列帧 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 设置为透视
+self.SetDeepTest(frameEntityId, False)
+```
+
+
+
+## CreateFrameAniEntityBindComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建frameAniEntityBind组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | FrameAniEntityBindComp | frameAniEntityBind组件实例 |
+
+
+
+## BindFrameAniToEntity
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 绑定entity
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | frameEntityId | int | 序列帧entity的ID |
+ | bindEntityId | str | 绑定的entity的ID |
+ | offset | tuple(float,float,float) | 绑定的偏移量 |
+ | rot | tuple(float,float,float) | 绑定的旋转角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.BindFrameAniToEntity(frameEntityId, entityId, (0, 1, 0), (0, 0, 0))
+```
+
+
+
+## CreateFrameAniSkeletonBindComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建frameAniSkeletonBind组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | FrameAniSkeletonBindComp | frameAniSkeletonBind组件实例 |
+
+
+
+## BindFrameAniToSkeleton
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 绑定骨骼模型
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | frameEntityId | int | 序列帧entity的ID |
+ | modelId | int | 绑定的骨骼模型的ID(见model组件的GetModelId) |
+ | boneName | str | 绑定具体骨骼的名称 |
+ | offset | tuple(float,float,float) | 绑定的偏移量 |
+ | rot | tuple(float,float,float) | 绑定的旋转角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.BindFrameAniToSkeleton(frameEntityId, modelId, "root", (0, 1, 0), (0, 0, 0))
+```
+
+
+
+## CreateFrameAniTransComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建frameAniTrans组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | FrameAniTransComp | frameAniTrans组件实例 |
+
+
+
+## GetFrameAniPos
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取序列帧位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 位置信息 |
+
+
+
+## GetFrameAniRot
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取序列帧的角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | (上下角度,左右角度)单位是角度而不是弧度 |
+
+
+
+## GetFrameAniScale
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取序列帧的缩放
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 对于平面序列帧,第一个参数为贴图横向上的缩放,第二个参数为纵向上的缩放,第三个参数无用。对于环状序列帧,为三个坐标轴上的缩放 |
+
+
+
+## SetFrameAniPos
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置序列帧位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | pos | tuple(int,int,int) | xyz值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+
+
+## SetFrameAniRot
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置特效的角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | rot | tuple(float,float) | 俯仰角度及绕竖直方向的角度,单位是角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+
+
+## SetFrameAniScale
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置序列帧的缩放
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | scale | tuple(float,float,float) | 对于平面序列帧,第一个参数为贴图横向上的缩放,第二个参数为纵向上的缩放,第三个参数无用。对于环状序列帧,为三个坐标轴上的缩放 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 横向拉伸为2倍,纵向不变
+self.SetFrameAniScale(frameEntityId, (2, 1, 1))
+```
+
+
+
+## CreateHealthComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建health组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | HealthComponentClient | health组件实例 |
+
+
+
+## ShowEntityHealth
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置某个entity是否显示血条,默认为显示
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | show | bool | 设置是否显示 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 必须先设置ShowHealthBar
+
+- 示例
+
+```python
+# 设置该entity不显示血条
+self.ShowHealth(entityId, False)
+```
+
+
+
+## CreateOperationComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建operation组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | OperationCompClient | operation组件实例 |
+
+
+
+## SetCanAll
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 同时设置SetCanMove,SetCanJump,SetCanAttack,SetCanWalkMode,SetCanPerspective,SetCanPause,SetCanChat,SetCanScreenShot,SetCanOpenInv,SetCanDrag,SetCanInair
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | flag | bool | True为全部响应 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 要在其他属性设置之前设置,不然在all之前设置的会被覆盖掉
+
+- 示例
+
+```python
+# 全部设置为不响应
+self.SetCanAll(False)
+```
+
+
+
+## CreateDeviceComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建device组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | DeviceCompClient | device组件实例 |
+
+
+
+## CreateParticleControlComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建particleControl组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ParticleControlComp | particleControl组件实例 |
+
+
+
+## CreateParticleEntityBindComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建particleEntityBind组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ParticleEntityBindComp | particleEntityBind组件实例 |
+
+
+
+## BindParticleToEntity
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 粒子特效绑定entity
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | particleId | int | 特效ID |
+ | bindEntityId | str | 绑定的entity的ID |
+ | offset | tuple(float,float,float) | 绑定的偏移量,相对绑定entity脚下中心 |
+ | rot | tuple(float,float,float) | 绑定的旋转角度 |
+ | correction | bool | 默认不开启,开启后可以使特效的旋转角度准确设置为参照玩家的相对角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.BindParticleToEntity(particleId, entityId, (0, 1, 0), (0, 0, 0))
+```
+
+
+
+## CreateParticleSkeletonBindComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建particleSkeletonBind组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ParticleSkeletonBindComp | particleSkeletonBind组件实例 |
+
+
+
+## BindParticleToSkeleton
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 绑定粒子特效到骨骼模型
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | particleId | int | 特效ID |
+ | modelId | int | 绑定的骨骼模型的ID(见model组件的GetModelId) |
+ | boneName | str | 绑定具体骨骼的名称 |
+ | offset | tuple(float,float,float) | 绑定的偏移量 |
+ | rot | tuple(float,float,float) | 绑定的旋转角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.BindParticleToEntity(particleId, modelId, "root", (0, 1, 0), (0, 0, 0))
+```
+
+
+
+## CreateParticleTransComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建particleTrans组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ParticleTransComp | particleTrans组件实例 |
+
+
+
+## GetParticlePos
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取特效位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 位置信息 |
+
+
+
+## GetParticleRot
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取特效角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | (上下角度,左右角度)单位是角度而不是弧度 |
+
+
+
+## SetParticlePos
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置特效位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | pos | tuple(int,int,int) | xyz值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+
+
+## SetParticleRot
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置特效的角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+ | rot | tuple(float,float) | 俯仰角度及绕竖直方向的角度,单位是角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+
+
+## CreatePlayerViewComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建playerView组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PlayerViewCompClient | playerView组件实例 |
+
+
+
+## GetPlayerPerspective
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取当前的视角模式
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 0:第一人称视角;1:第三人称视角;2:前视第三人称视角 |
+
+- 示例
+
+```python
+persp = self.GetPlayerPerspective(playerId)
+```
+
+
+
+## SetPlayerPerspective
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置视角模式
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 实体id |
+ | persp | int | 0:第一人称视角;1:第三人称视角;2:前视第三人称视角 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.SetPlayerPerspective(playerId, 1)
+```
+
+
+
+## LockPlayerPerspective
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 锁定玩家的视角模式
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 实体id |
+ | persp | int | 0:第一人称视角;1:第三人称视角;2:前视第三人称视角 其他值:解除锁定 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否锁定成功 |
+
+- 示例
+
+```python
+self.LockPlayerPerspective(playerId, 1)
+```
+
+
+
+## CreateQueryVariableComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建queryVariable组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | QueryVariableComponentClient | queryVariable组件实例 |
+
+
+
+## CreateSkyRenderComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建skyRender组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | SkyRenderCompClient | skyRender组件实例 |
+
+
+
+## CreateTextBoardComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建textBoard组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TextBoardComponentClient | textBoard组件实例 |
+
+
+
+## CreateTextNotifyClientComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建textNotifyClient组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TextNotifyComponet | textNotifyClient组件实例 |
+
+
+
+## CreateConfigClientComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建config组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | levelId | str | 存档Id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ConfigCompClient | config组件实例 |
+
+
+
+## CreateVirtualWorldComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建virtualWorld组件实例组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | levelId | str | 存档Id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | VirtualWorldCompClient | virtualWorld组件实例 |
+
+
+
+## CreatePlayerAnimComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建玩家动画组件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家Id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PlayerAnimCompClient | 玩家动画组件实例 |
+
+
+
+## CreatePostProcessComponent
+
+客户端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 创建PostProcess组件
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PostProcessComponent | 后处理效果组件实例 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/变换对象TransformObject.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/变换对象TransformObject.md
new file mode 100644
index 0000000..e1791ef
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/变换对象TransformObject.md
@@ -0,0 +1,1063 @@
+---
+sidebarDepth: 1
+---
+# 变换对象TransformObject
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+TransformObject: 变换对象
+GameObject: 游戏对象
+GameObject: (点击跳转)
+```
+
+- 描述
+
+ TransformObject(变换对象)是拥有变换属性的GameObject(游戏对象)的基类,他们在游戏世界中有着确切的位置等信息。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 对象名称 |
+ | transform | Transform | 局部坐标变换 |
+ | dimension | Transform | 所在维度ID |
+ | isBroken | bool | 是否可用,当素材文件丢失,零件代码语法错误时处于不可用状态 |
+ | isRemoved | bool | 是否已销毁 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetDimension](#getdimension) | 客户端/服务端 | 获取所在的维度 |
+| [SetDimension](#setdimension) | 服务端 | 设置所在的维度 |
+| [GetChildTransformObjects](#getchildtransformobjects) | 客户端/服务端 | 获取子TransformObject列表 |
+| [GetTransformObjects](#gettransformobjects) | 客户端/服务端 | 获取TransformObject列表,包含自身 |
+| [GetChildGameObjects](#getchildgameobjects) | 客户端/服务端 | 获取子GameObject列表 |
+| [GetGameObjects](#getgameobjects) | 客户端/服务端 | 获取GameObject列表,包含自身 |
+| [GetGameObjectById](#getgameobjectbyid) | 客户端/服务端 | 根据ID获取GameObject |
+| [GetGameObjectByEntityId](#getgameobjectbyentityid) | 客户端/服务端 | 根据实体ID获取GameObject |
+| [GetId](#getid) | 客户端/服务端 | 获取当前预设的ID |
+| [GetEntityId](#getentityid) | 客户端/服务端 | 获取当前预设的实体ID |
+| [GetDisplayName](#getdisplayname) | 客户端/服务端 | 获取当前预设的显示名称 |
+| [GetDisplayPath](#getdisplaypath) | 客户端/服务端 | 获取当前预设到根节点的显示路径 |
+| [GetLocalTransform](#getlocaltransform) | 客户端/服务端 | 获取当前预设的局部坐标变换 |
+| [SetLocalTransform](#setlocaltransform) | 客户端/服务端 | 设置当前预设的局部坐标变换 |
+| [GetLocalPosition](#getlocalposition) | 客户端/服务端 | 获取当前预设的局部坐标位置 |
+| [SetLocalPosition](#setlocalposition) | 客户端/服务端 | 设置当前预设的局部坐标位置 |
+| [GetLocalRotation](#getlocalrotation) | 客户端/服务端 | 获取当前预设的局部坐标旋转 |
+| [SetLocalRotation](#setlocalrotation) | 客户端/服务端 | 设置当前预设的局部坐标旋转 |
+| [GetLocalScale](#getlocalscale) | 客户端/服务端 | 获取当前预设的局部坐标缩放 |
+| [SetLocalScale](#setlocalscale) | 客户端/服务端 | 设置当前预设的局部坐标缩放 |
+| [GetWorldTransform](#getworldtransform) | 客户端/服务端 | 获取当前预设的世界坐标变换 |
+| [GetWorldMatrix](#getworldmatrix) | 客户端/服务端 | 获取世界坐标变换矩阵 |
+| [GetLocalMatrix](#getlocalmatrix) | 客户端/服务端 | 获取局部坐标变换矩阵 |
+| [SetWorldTransform](#setworldtransform) | 客户端/服务端 | 设置当前预设的世界坐标变换 |
+| [GetWorldPosition](#getworldposition) | 客户端/服务端 | 获取当前预设的世界坐标位置 |
+| [SetWorldPosition](#setworldposition) | 客户端/服务端 | 设置当前预设的世界坐标位置 |
+| [GetWorldRotation](#getworldrotation) | 客户端/服务端 | 获取当前预设的世界坐标旋转 |
+| [SetWorldRotation](#setworldrotation) | 客户端/服务端 | 设置当前预设的世界坐标旋转 |
+| [GetWorldScale](#getworldscale) | 客户端/服务端 | 获取当前预设的世界坐标缩放 |
+| [SetWorldScale](#setworldscale) | 客户端/服务端 | 设置当前预设的世界坐标缩放 |
+| [AddLocalOffset](#addlocaloffset) | 客户端/服务端 | 给局部坐标变换位置增加偏移量 |
+| [AddWorldOffset](#addworldoffset) | 客户端/服务端 | 给世界坐标变换位置增加偏移量 |
+| [AddLocalRotation](#addlocalrotation) | 客户端/服务端 | 给局部坐标变换旋转增加偏移量 |
+| [AddWorldRotation](#addworldrotation) | 客户端/服务端 | 给世界坐标变换旋转增加偏移量 |
+| [AddLocalScale](#addlocalscale) | 客户端/服务端 | 给局部坐标变换缩放增加偏移量 |
+| [AddWorldScale](#addworldscale) | 客户端/服务端 | 给世界坐标变换缩放增加偏移量 |
+| [AddLocalTransform](#addlocaltransform) | 客户端/服务端 | 给局部坐标变换增加偏移量 |
+| [AddWorldTransform](#addworldtransform) | 客户端/服务端 | 给世界坐标变换增加偏移量 |
+| [GetRootParent](#getrootparent) | 客户端/服务端 | 获取当前预设所在的根预设 |
+| [GetParent](#getparent) | 客户端/服务端 | 获取当前预设的父预设 |
+| [SetParent](#setparent) | 客户端/服务端 | 设置当前预设的父预设 |
+| [GetManager](#getmanager) | 客户端/服务端 | 获取当前预设所在的预设管理器 |
+| [Unload](#unload) | 客户端/服务端 | 卸载当前预设 |
+| [Destroy](#destroy) | 客户端/服务端 | 销毁当前预设 |
+
+
+
+
+## GetDimension
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取所在的维度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 维度ID |
+
+
+
+## SetDimension
+
+服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置所在的维度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 目标维度ID |
+ | pos | tuple(int,int,int) | 传送的坐标,默认为空,非空时会更新该对象的世界坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否真正变更了维度,如果目标维度与对象维度一致,会返回False |
+
+
+
+## GetChildTransformObjects
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取子TransformObject列表
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | recursive | bool | 是否递归查找所有子节点 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(TransformObject) | TransformObject列表 |
+
+
+
+## GetTransformObjects
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取TransformObject列表,包含自身
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | recursive | bool | 是否递归查找所有子节点 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(TransformObject) | TransformObject列表 |
+
+
+
+## GetChildGameObjects
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取子GameObject列表
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | recursive | bool | 是否递归查找所有子节点 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(GameObject) | 游戏对象列表 |
+
+
+
+## GetGameObjects
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取GameObject列表,包含自身
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | recursive | bool | 是否递归查找所有子节点 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(GameObject) | 游戏对象列表 |
+
+
+
+## GetGameObjectById
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 根据ID获取GameObject
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | GameObject | 游戏对象 |
+
+
+
+## GetGameObjectByEntityId
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 根据实体ID获取GameObject
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | GameObject | 游戏对象 |
+
+
+
+## GetId
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的ID
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | ID |
+
+
+
+## GetEntityId
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的实体ID
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 实体ID |
+
+
+
+## GetDisplayName
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的显示名称
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 名称 |
+
+
+
+## GetDisplayPath
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设到根节点的显示路径
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 节点路径 |
+
+
+
+## GetLocalTransform
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的局部坐标变换
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | Transform | 坐标变换 |
+
+
+
+## SetLocalTransform
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的局部坐标变换
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | transform | Transform | 坐标变换 |
+
+- 返回值
+
+ 无
+
+
+
+## GetLocalPosition
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的局部坐标位置
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | (X轴位置,Y轴位置,Z轴位置) |
+
+
+
+## SetLocalPosition
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的局部坐标位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | (X轴位置,Y轴位置,Z轴位置) |
+
+- 返回值
+
+ 无
+
+
+
+## GetLocalRotation
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的局部坐标旋转
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | (X轴角度,Y轴角度,Z轴角度) |
+
+
+
+## SetLocalRotation
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的局部坐标旋转
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rotation | tuple(float,float,float) | (X轴角度,Y轴角度,Z轴角度) |
+
+- 返回值
+
+ 无
+
+
+
+## GetLocalScale
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的局部坐标缩放
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | (X轴缩放,Y轴缩放,Z轴缩放) |
+
+
+
+## SetLocalScale
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的局部坐标缩放
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | scale | tuple(float,float,float) | (X轴缩放,Y轴缩放,Z轴缩放) |
+
+- 返回值
+
+ 无
+
+
+
+## GetWorldTransform
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的世界坐标变换
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | Transform | 坐标变换 |
+
+
+
+## GetWorldMatrix
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取世界坐标变换矩阵
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | Matrix | 世界坐标变换矩阵 |
+
+
+
+## GetLocalMatrix
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取局部坐标变换矩阵
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | Matrix | 局部坐标变换矩阵 |
+
+
+
+## SetWorldTransform
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的世界坐标变换
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | transform | Transform | 坐标变换 |
+
+- 返回值
+
+ 无
+
+
+
+## GetWorldPosition
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的世界坐标位置
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | (X轴位置,Y轴位置,Z轴位置) |
+
+
+
+## SetWorldPosition
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的世界坐标位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | (X轴位置,Y轴位置,Z轴位置) |
+
+- 返回值
+
+ 无
+
+
+
+## GetWorldRotation
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的世界坐标旋转
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | (X轴角度,Y轴角度,Z轴角度) |
+
+
+
+## SetWorldRotation
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的世界坐标旋转
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rotation | tuple(float,float,float) | (X轴角度,Y轴角度,Z轴角度) |
+
+- 返回值
+
+ 无
+
+
+
+## GetWorldScale
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的世界坐标缩放
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | (X轴缩放,Y轴缩放,Z轴缩放) |
+
+
+
+## SetWorldScale
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的世界坐标缩放
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | scale | tuple(float,float,float) | (X轴缩放,Y轴缩放,Z轴缩放) |
+
+- 返回值
+
+ 无
+
+
+
+## AddLocalOffset
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给局部坐标变换位置增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | offset | tuple(float,float,float) | 变换位置 |
+
+- 返回值
+
+ 无
+
+
+
+## AddWorldOffset
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给世界坐标变换位置增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | offset | tuple(float,float,float) | 变换位置 |
+
+- 返回值
+
+ 无
+
+
+
+## AddLocalRotation
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给局部坐标变换旋转增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rotation | tuple(float,float,float) | 变换旋转 |
+
+- 返回值
+
+ 无
+
+
+
+## AddWorldRotation
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给世界坐标变换旋转增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rotation | tuple(float,float,float) | 变换旋转 |
+
+- 返回值
+
+ 无
+
+
+
+## AddLocalScale
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给局部坐标变换缩放增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | scale | tuple(float,float,float) | 变换缩放 |
+
+- 返回值
+
+ 无
+
+
+
+## AddWorldScale
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给世界坐标变换缩放增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | scale | tuple(float,float,float) | 变换缩放 |
+
+- 返回值
+
+ 无
+
+
+
+## AddLocalTransform
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给局部坐标变换增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | transform | Transform | 坐标变换 |
+
+- 返回值
+
+ 无
+
+
+
+## AddWorldTransform
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 给世界坐标变换增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | transform | Transform | 坐标变换 |
+
+- 返回值
+
+ 无
+
+
+
+## GetRootParent
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设所在的根预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PresetBase | 预设 |
+
+
+
+## GetParent
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设的父预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PresetBase | 预设 |
+
+
+
+## SetParent
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 设置当前预设的父预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | parent | PresetBase | 预设 |
+
+- 返回值
+
+ 无
+
+
+
+## GetManager
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 获取当前预设所在的预设管理器
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PresetManager | 预设管理 |
+
+
+
+## Unload
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 卸载当前预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## Destroy
+
+客户端/服务端
+
+method in Preset.Model.TransformObject.TransformObject
+
+- 描述
+
+ 销毁当前预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/坐标变换Transform.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/坐标变换Transform.md
new file mode 100644
index 0000000..2e21678
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/坐标变换Transform.md
@@ -0,0 +1,157 @@
+---
+sidebarDepth: 1
+---
+# 坐标变换Transform
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+GameObject <|-- Transform
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+Transform: 坐标变换
+GameObject: 游戏对象
+GameObject: (点击跳转)
+```
+
+- 描述
+
+ 坐标变换,包含位置、旋转和缩放
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 位置变换 |
+ | rotation | tuple(float,float,float) | 旋转变换 |
+ | scale | tuple(float,float,float) | 缩放变换 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [AddOffset](#addoffset) | 客户端/服务端 | 给坐标变换位置增加偏移量 |
+| [AddRotation](#addrotation) | 客户端/服务端 | 给坐标变换旋转增加偏移量 |
+| [AddScale](#addscale) | 客户端/服务端 | 给坐标变换缩放增加偏移量 |
+| [AddTransform](#addtransform) | 客户端/服务端 | 给坐标变换增加偏移量 |
+| [GetMatrix](#getmatrix) | 客户端/服务端 | 获取坐标变换矩阵 |
+
+
+
+
+## AddOffset
+
+客户端/服务端
+
+method in Preset.Model.Transform.Transform
+
+- 描述
+
+ 给坐标变换位置增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | offset | tuple(float,float,float) | 变换位置 |
+
+- 返回值
+
+ 无
+
+
+
+## AddRotation
+
+客户端/服务端
+
+method in Preset.Model.Transform.Transform
+
+- 描述
+
+ 给坐标变换旋转增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rotation | tuple(float,float,float) | 变换旋转 |
+
+- 返回值
+
+ 无
+
+
+
+## AddScale
+
+客户端/服务端
+
+method in Preset.Model.Transform.Transform
+
+- 描述
+
+ 给坐标变换缩放增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | scale | tuple(float,float,float) | 变换缩放 |
+
+- 返回值
+
+ 无
+
+
+
+## AddTransform
+
+客户端/服务端
+
+method in Preset.Model.Transform.Transform
+
+- 描述
+
+ 给坐标变换增加偏移量
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | transform | Transform | 坐标变换 |
+
+- 返回值
+
+ 无
+
+
+
+## GetMatrix
+
+客户端/服务端
+
+method in Preset.Model.Transform.Transform
+
+- 描述
+
+ 获取坐标变换矩阵
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | Matrix | 坐标变换矩阵 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/游戏对象GameObject.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/游戏对象GameObject.md
new file mode 100644
index 0000000..bfda33a
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/游戏对象GameObject.md
@@ -0,0 +1,81 @@
+---
+sidebarDepth: 1
+---
+# 游戏对象GameObject
+
+
+
+## 概述
+
+- 描述
+
+ GameObject(游戏对象)是所有预设对象的基类,即API文档中Preset API - 预设对象下的所有类都继承自GameObject。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | id | int | 对象ID |
+ | classType | str | 对象类名 |
+ | isClient | bool | 对象运行于客户端还是服务端 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [LoadFile](#loadfile) | 客户端/服务端 | 加载指定路径的非python脚本文件内容,如配置文件 |
+| [fromDict](#fromdict) | 客户端/服务端 | 将字典根据classType字段转换为对应类型的对象,该类型必须使用@registerGenericClass装饰 |
+
+
+
+
+## LoadFile
+
+客户端/服务端
+
+method in Preset.Model.GameObject.GameObject
+
+- 描述
+
+ 加载指定路径的非python脚本文件内容,如配置文件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | path | str | 指定相对路径 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 文件内容 |
+
+
+
+## fromDict
+
+客户端/服务端
+
+method in Preset.Model.GameObject.type
+
+- 描述
+
+ 将字典根据classType字段转换为对应类型的对象,该类型必须使用@registerGenericClass装饰
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | data | dict | 要转换的字典 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | GameObject或dict | 转换成功返回对象,否则返回字典本身 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/素材数据BoxData.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/素材数据BoxData.md
new file mode 100644
index 0000000..e26d645
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/素材数据BoxData.md
@@ -0,0 +1,36 @@
+---
+sidebarDepth: 1
+---
+# 素材数据BoxData
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+TransformObject <|-- BoxData
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+BoxData: 素材数据
+GameObject: 游戏对象
+GameObject: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+```
+
+- 描述
+
+ BoxData(素材数据)与素材类似,可以挂接在预设下使用。BoxData在编辑器中不会实际生成,可以重叠放置。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | filePath | str | 素材相对于BoxData目录的相对路径 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/世界属性零件WorldPart.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/世界属性零件WorldPart.md
new file mode 100644
index 0000000..34a2100
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/世界属性零件WorldPart.md
@@ -0,0 +1,23 @@
+---
+sidebarDepth: 1
+---
+# 世界属性零件WorldPart
+
+
+
+## 概述
+
+- 描述
+
+ 世界属性零件
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | gameMode | int | 游戏模式 |
+ | difficulty | int | 游戏难度 |
+ | cheat | bool | 作弊模式 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/传送门零件PortalPart.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/传送门零件PortalPart.md
new file mode 100644
index 0000000..41b43a3
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/传送门零件PortalPart.md
@@ -0,0 +1,24 @@
+---
+sidebarDepth: 1
+---
+# 传送门零件PortalPart
+
+
+
+## 概述
+
+- 描述
+
+ 传送门零件
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | portalGateType | int | 传送门类型,0表示单向,1表示双向 |
+ | portalGateShape | int | 传送门形状,当前只能是立式方框0 |
+ | portalGateWidth | int | 传送门宽度 |
+ | portalGateHeight | int | 传送门高度 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/实体零件EntityBasePart.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/实体零件EntityBasePart.md
new file mode 100644
index 0000000..4ddfedd
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/实体零件EntityBasePart.md
@@ -0,0 +1,75 @@
+---
+sidebarDepth: 1
+---
+# 实体零件EntityBasePart
+
+
+
+## 概述
+
+- 描述
+
+ 实体零件
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | engineType | str | 实体类型 |
+ | autoCreate | bool | 是否在零件初始化时,自动创建关联实体,默认为True |
+ | persistence | bool | 创建的实体是否持久化,默认为False,设为True时,创建完实体会将autoCreate重置为False |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [CreateVirtualEntity](#createvirtualentity) | 服务端 | 手动创建关联实体,如果已创建会直接返回 |
+| [DestroyVirtualEntity](#destroyvirtualentity) | 服务端 | 移除已创建的关联实体,引擎退出时会默认调用 |
+
+
+
+
+## CreateVirtualEntity
+
+服务端
+
+method in Preset.Parts.EntityBasePart.EntityBasePart
+
+- 描述
+
+ 手动创建关联实体,如果已创建会直接返回
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 返回创建的实体ID |
+
+
+
+## DestroyVirtualEntity
+
+服务端
+
+method in Preset.Parts.EntityBasePart.EntityBasePart
+
+- 描述
+
+ 移除已创建的关联实体,引擎退出时会默认调用
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/导航路径零件NavPointsPart.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/导航路径零件NavPointsPart.md
new file mode 100644
index 0000000..c34d448
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/导航路径零件NavPointsPart.md
@@ -0,0 +1,75 @@
+---
+sidebarDepth: 1
+---
+# 导航路径零件NavPointsPart
+
+
+
+## 概述
+
+- 描述
+
+ 导航路径零件, 在编辑器内可以选定一系列相对于该零件的坐标点,当零件运行时可以获得这些坐标点的世界坐标列表
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | patrolsPath | list(tuple(float,float,float)) | 路径点列表 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetNavigationPoints](#getnavigationpoints) | 客户端/服务端 | 获得路径点的世界坐标列表 |
+| [GetNavigationRadius](#getnavigationradius) | 客户端/服务端 | 获得路径点的随机半径列表 |
+
+
+
+
+## GetNavigationPoints
+
+客户端/服务端
+
+method in Preset.Parts.NavPointsPart.NavPointsPart
+
+- 描述
+
+ 获得路径点的世界坐标列表
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(tuple(float,float,float)) | 路径点的世界坐标列表 |
+
+
+
+## GetNavigationRadius
+
+客户端/服务端
+
+method in Preset.Parts.NavPointsPart.NavPointsPart
+
+- 描述
+
+ 获得路径点的随机半径列表
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(float) | 路径点的随机半径列表 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/玩家基础属性零件PlayerBasicPart.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/玩家基础属性零件PlayerBasicPart.md
new file mode 100644
index 0000000..e85b71e
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/玩家基础属性零件PlayerBasicPart.md
@@ -0,0 +1,26 @@
+---
+sidebarDepth: 1
+---
+# 玩家基础属性零件PlayerBasicPart
+
+
+
+## 概述
+
+- 描述
+
+ 玩家基础属性零件
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | attackDamage | float | 攻击力 |
+ | healthMax | float | 生命上限 |
+ | disableHunger | bool | 是否锁定饥饿值 |
+ | spawnPos | tuple(float,float,float) | 玩家复活点 |
+ | nameDeeptest | bool | 名字是否透视 |
+ | showName | bool | 是否在头顶显示名字 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/相机轨迹CameraTrackPart.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/相机轨迹CameraTrackPart.md
new file mode 100644
index 0000000..752a7b4
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/相机轨迹CameraTrackPart.md
@@ -0,0 +1,113 @@
+---
+sidebarDepth: 1
+---
+# 相机轨迹CameraTrackPart
+
+
+
+## 概述
+
+- 描述
+
+ 相机轨迹零件
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | track | list(dict) | 路径点列表 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [PlayFromStart](#playfromstart) | 客户端 | 从头开始播放相机运动轨迹 |
+| [Pause](#pause) | 客户端 | 暂停播放相机轨迹 |
+| [Continue](#continue) | 客户端 | 继续播放相机轨迹 |
+| [Stop](#stop) | 客户端 | 停止播放相机轨迹 |
+
+
+
+
+## PlayFromStart
+
+客户端
+
+method in Preset.Parts.CameraTrackPart.CameraTrackPart
+
+- 描述
+
+ 从头开始播放相机运动轨迹
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## Pause
+
+客户端
+
+method in Preset.Parts.CameraTrackPart.CameraTrackPart
+
+- 描述
+
+ 暂停播放相机轨迹
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## Continue
+
+客户端
+
+method in Preset.Parts.CameraTrackPart.CameraTrackPart
+
+- 描述
+
+ 继续播放相机轨迹
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## Stop
+
+客户端
+
+method in Preset.Parts.CameraTrackPart.CameraTrackPart
+
+- 描述
+
+ 停止播放相机轨迹
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/触发器零件TriggerPart.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/触发器零件TriggerPart.md
new file mode 100644
index 0000000..9a1cfe9
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/触发器零件TriggerPart.md
@@ -0,0 +1,53 @@
+---
+sidebarDepth: 1
+---
+# 触发器零件TriggerPart
+
+
+
+## 概述
+
+- 描述
+
+ 触发器零件,当实体进入时触发OnTriggerEntityEnter,当实体退出时触发OnTriggerEntityExit,当实体停留时触发OnTriggerEntityStay
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isTriggerEnter | bool | 是否监听实体进入,默认为True |
+ | isTriggerExit | bool | 是否监听实体退出,默认为True |
+ | isTriggerStay | bool | 是否监听实体进入,默认为False |
+ | support | int | 支持客户端(1)/服务端(2)/双端(3),默认为双端(3) |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetEntitiesInTrigger](#getentitiesintrigger) | 客户端/服务端 | 获取当前在触发器区域的实体列表 |
+
+
+
+
+## GetEntitiesInTrigger
+
+客户端/服务端
+
+method in Preset.Parts.TriggerPart.TriggerPart
+
+- 描述
+
+ 获取当前在触发器区域的实体列表
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件PartBase.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件PartBase.md
new file mode 100644
index 0000000..a78809b
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件PartBase.md
@@ -0,0 +1,1169 @@
+---
+sidebarDepth: 1
+---
+# 零件PartBase
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+SdkInterface <|-- PartBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+TransformObject <|-- PartBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+PartBase: 零件
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+```
+
+- 描述
+
+ PartBase(零件基类)是可以与零件进行绑定,而零件可以挂接在预设下,以实现带逻辑的预设的组装。所有的自定义零件都需要继承PartBase,预设系统下的大部分代码都需要写在自定义零件中。注意,自定义零件只有挂接到预设,并且在游戏中实例化才能生效。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | tickEnable | str | 是否启用零件tick |
+ | replicated | list | 启用网络复制的字段列表 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [InitClient](#initclient) | 客户端 | 客户端的零件对象初始化入口 |
+| [InitServer](#initserver) | 服务端 | 服务端的零件对象初始化入口 |
+| [TickClient](#tickclient) | 客户端 | 客户端的零件对象逻辑驱动入口 |
+| [TickServer](#tickserver) | 服务端 | 服务端的零件对象逻辑驱动入口 |
+| [UnloadClient](#unloadclient) | 客户端 | 客户端的零件对象卸载逻辑入口 |
+| [UnloadServer](#unloadserver) | 服务端 | 服务端的零件对象卸载逻辑入口 |
+| [DestroyClient](#destroyclient) | 客户端 | 客户端的零件对象销毁逻辑入口 |
+| [DestroyServer](#destroyserver) | 服务端 | 服务端的零件对象销毁逻辑入口 |
+| [CanAdd](#canadd) | 客户端/服务端 | 判断零件是否可以挂接到指定的父节点上 |
+| [GetTickCount](#gettickcount) | 客户端/服务端 | 获取当前帧数 |
+| [LogDebug](#logdebug) | 客户端/服务端 | 打印msg % args调试日志,仅PC开发包有效 |
+| [LogInfo](#loginfo) | 客户端/服务端 | 打印msg % args消息日志 |
+| [LogError](#logerror) | 客户端/服务端 | 打印msg % args错误日志 |
+| [GetGameObjectById](#getgameobjectbyid) | 客户端/服务端 | 获取指定对象ID的游戏对象 |
+| [GetGameObjectByEntityId](#getgameobjectbyentityid) | 客户端/服务端 | 获取指定实体ID的游戏对象 |
+| [GetLoadedPlayers](#getloadedplayers) | 客户端/服务端 | 获取服务器所有玩家的ID列表 |
+| [GetPlayerObject](#getplayerobject) | 客户端/服务端 | 获取玩家对象 |
+| [GetEntityObject](#getentityobject) | 客户端/服务端 | 获取实体对象 |
+| [GetEffectObject](#geteffectobject) | 客户端 | 获取特效对象 |
+| [CreateEffectPreset](#createeffectpreset) | 客户端 | 创建特效对象 |
+| [CreateTextboardPreset](#createtextboardpreset) | 客户端 | 创建文字面板预设对象 |
+| [ListenForEvent](#listenforevent) | 客户端/服务端 | 监听指定的事件 |
+| [UnListenForEvent](#unlistenforevent) | 客户端/服务端 | 反监听指定的事件 |
+| [ListenForEngineEvent](#listenforengineevent) | 客户端/服务端 | 监听指定的引擎事件 |
+| [UnListenForEngineEvent](#unlistenforengineevent) | 客户端/服务端 | 反监听指定的引擎事件 |
+| [CreateEventData](#createeventdata) | 客户端/服务端 | 创建自定义事件的数据,eventData用于发送事件。创建的eventData可以理解为一个dict,可以嵌套赋值dict,list和基本数据类型,但不支持tuple |
+| [BroadcastEvent](#broadcastevent) | 客户端/服务端 | 广播事件,双端通用 |
+| [BroadcastPresetSystemEvent](#broadcastpresetsystemevent) | 客户端/服务端 | 广播给预设系统 |
+| [NotifyToServer](#notifytoserver) | 客户端 | 通知服务端触发事件 |
+| [NotifyToClient](#notifytoclient) | 服务端 | 通知指定客户端触发事件 |
+| [BroadcastToAllClient](#broadcasttoallclient) | 服务端 | 通知指所有客户端触发事件 |
+| [ListenSelfEvent](#listenselfevent) | 客户端/服务端 | 监听来自自己的事件 |
+| [UnListenSelfEvent](#unlistenselfevent) | 客户端/服务端 | 反监听来自自己的事件 |
+| [ListenPartEvent](#listenpartevent) | 客户端/服务端 | 监听来自指定零件的事件 |
+| [UnListenPartEvent](#unlistenpartevent) | 客户端/服务端 | 反监听来自指定零件的事件 |
+| [ListenPresetSystemEvent](#listenpresetsystemevent) | 客户端/服务端 | 监听来自预设系统的事件 |
+| [UnListenPresetSystemEvent](#unlistenpresetsystemevent) | 客户端/服务端 | 反监听来自预设系统的事件 |
+| [DestroyStoryLines](#destroystorylines) | 客户端/服务端 | 手动销毁零件蓝图 |
+| [GetSelf](#getself) | 客户端/服务端 | 获取零件自身 |
+| [GetApi](#getapi) | 客户端/服务端 | 返回当前对象可使用的SDK API模块 |
+| [IsPlayerSneaking](#isplayersneaking) | 服务端 | 是否潜行 |
+| [GetPlayerHunger](#getplayerhunger) | 服务端 | 获取玩家饥饿度,展示在UI饥饿度进度条上,初始值为20,即每一个鸡腿代表2个饥饿度。 **饱和度(saturation)** :玩家当前饱和度,初始值为5,最大值始终为玩家当前饥饿度(hunger),该值直接影响玩家**饥饿度(hunger)**。
1)增加方法:吃食物。
2)减少方法:每触发一次**消耗事件**,该值减少1,如果该值不大于0,直接把玩家 **饥饿度(hunger)** 减少1。 |
+| [SetPlayerHunger](#setplayerhunger) | 服务端 | 设置玩家饥饿度。 |
+
+
+
+
+## InitClient
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 客户端的零件对象初始化入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## InitServer
+
+服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 服务端的零件对象初始化入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## TickClient
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 客户端的零件对象逻辑驱动入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## TickServer
+
+服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 服务端的零件对象逻辑驱动入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## UnloadClient
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 客户端的零件对象卸载逻辑入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## UnloadServer
+
+服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 服务端的零件对象卸载逻辑入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## DestroyClient
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 客户端的零件对象销毁逻辑入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## DestroyServer
+
+服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 服务端的零件对象销毁逻辑入口
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## CanAdd
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 判断零件是否可以挂接到指定的父节点上
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | parent | PresetBase | 即将挂接的父预设 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 不允许挂接时,返回对应的错误提示 |
+
+
+
+## GetTickCount
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取当前帧数
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 当前帧数 |
+
+
+
+## LogDebug
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 打印msg % args调试日志,仅PC开发包有效
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | msg | str | 要打印的格式化字符串 |
+ | *args | list(object) | 格式化参数列表 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+self.LogDebug(“self.isClient: %s”, self.isClient)
+```
+
+
+
+## LogInfo
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 打印msg % args消息日志
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | msg | str | 要打印的格式化字符串 |
+ | *args | list(object) | 格式化参数列表 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+self.LogInfo(“self.isClient: %s”, self.isClient)
+```
+
+
+
+## LogError
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 打印msg % args错误日志
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | msg | str | 要打印的格式化字符串 |
+ | *args | list(object) | 格式化参数列表 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+self.LogError(“self.isClient: %s”, self.isClient)
+```
+
+
+
+## GetGameObjectById
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取指定对象ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | id | int | 指定的对象ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TransformObject | 成功返回游戏对象,失败返回None |
+
+- 示例
+
+```python
+obj = self.GetGameObjectById(0)
+```
+
+
+
+## GetGameObjectByEntityId
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取指定实体ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 指定的实体ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TransformObject | 成功返回游戏对象,失败返回None |
+
+- 示例
+
+```python
+obj = self.GetGameObjectByEntityId(0)
+```
+
+
+
+## GetLoadedPlayers
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取服务器所有玩家的ID列表
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(str) | 所有玩家的ID列表 |
+
+
+
+## GetPlayerObject
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取玩家对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PlayerObject | 成功返回玩家对象,失败返回None |
+
+- 示例
+
+```python
+player = self.GetPlayerObject(playerId)
+```
+
+
+
+## GetEntityObject
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取实体对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 指定的实体ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EntityObject | 成功返回实体对象,失败返回None |
+
+- 示例
+
+```python
+entity = self.GetEntityObject(entityId)
+```
+
+
+
+## GetEffectObject
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取特效对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | effectId | int | 特效ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EffectObject | 成功返回特效对象,失败返回None |
+
+- 示例
+
+```python
+effect = self.GetEffectObject(effectId)
+```
+
+
+
+## CreateEffectPreset
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 创建特效对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | resource | str | 特效资源json |
+ | pos | tuple(float,float,float) | 特效位置 |
+ | rotation | tuple(float,float,float) | 特效旋转 |
+ | scale | tuple(float,float,float) | 特效缩放 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | EffectPreset | 成功返回特效对象,失败返回None |
+
+- 示例
+
+```python
+# 在某个实体位置播放指定特效
+effect = self.CreateEffectPreset("effects/xxx", self.GetEntityPos(entityId))
+```
+
+
+
+## CreateTextboardPreset
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 创建文字面板预设对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | text | str | 文字显示内容 |
+ | textColor | tuple(float,float,float,float) | 文字颜色的RGBA值,范围0-1 |
+ | boardColor | tuple(float,float,float,float) | 可选参数,默认None,设置为黑色,面板颜色的RGBA值,范围0-1 |
+ | pos | tuple(float,float,float) | 可选参数,默认(0, 0, 0) 生成文字面板位置 |
+ | faceCamera | bool | 是否始终朝向相机, 默认为True |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TextboardPreset | 成功返回文字面板对象,失败返回None |
+
+- 示例
+
+```python
+# 在某个位置生成文字面板预设
+textboard = self.CreateTextboardPreset('Hello', (0.5, 0.4, 0.3, 0.8))
+```
+
+
+
+## ListenForEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 监听指定的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | namespace | str | 命名空间 |
+ | systemName | str | 事件系统名称 |
+ | eventName | str | 事件名称 |
+ | instance | object | 实例 |
+ | func | object | 函数 |
+ | priority | str | 优先级 |
+
+- 返回值
+
+ 无
+
+
+
+## UnListenForEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 反监听指定的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | namespace | str | 命名空间 |
+ | systemName | str | 事件系统名称 |
+ | eventName | str | 事件名称 |
+ | instance | object | 实例 |
+ | func | object | 函数 |
+ | priority | str | 优先级 |
+
+- 返回值
+
+ 无
+
+
+
+## ListenForEngineEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 监听指定的引擎事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | instance | object | 实例 |
+ | func | object | 函数 |
+ | priority | str | 优先级 |
+
+- 返回值
+
+ 无
+
+
+
+## UnListenForEngineEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 反监听指定的引擎事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | instance | object | 实例 |
+ | func | object | 函数 |
+ | priority | str | 优先级 |
+
+- 返回值
+
+ 无
+
+
+
+## CreateEventData
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 创建自定义事件的数据,eventData用于发送事件。创建的eventData可以理解为一个dict,可以嵌套赋值dict,list和基本数据类型,但不支持tuple
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | dict | 事件数据 |
+
+
+
+## BroadcastEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 广播事件,双端通用
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | eventData | object | 事件数据 |
+
+- 返回值
+
+ 无
+
+
+
+## BroadcastPresetSystemEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 广播给预设系统
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | eventData | object | 事件数据 |
+
+- 返回值
+
+ 无
+
+
+
+## NotifyToServer
+
+客户端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 通知服务端触发事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | eventData | object | 事件数据 |
+
+- 返回值
+
+ 无
+
+
+
+## NotifyToClient
+
+服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 通知指定客户端触发事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str | 玩家ID |
+ | eventName | str | 事件名称 |
+ | eventData | object | 事件数据 |
+
+- 返回值
+
+ 无
+
+
+
+## BroadcastToAllClient
+
+服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 通知指所有客户端触发事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | eventData | object | 事件数据 |
+
+- 返回值
+
+ 无
+
+
+
+## ListenSelfEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 监听来自自己的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | target | object | 目标 |
+ | func | object | 回调函数 |
+
+- 返回值
+
+ 无
+
+
+
+## UnListenSelfEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 反监听来自自己的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | target | object | 目标 |
+ | func | object | 回调函数 |
+
+- 返回值
+
+ 无
+
+
+
+## ListenPartEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 监听来自指定零件的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | partId | int | 指定零件的ID |
+ | eventName | str | 事件名称 |
+ | target | object | 目标 |
+ | func | object | 回调函数 |
+
+- 返回值
+
+ 无
+
+
+
+## UnListenPartEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 反监听来自指定零件的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | partId | int | 指定零件的ID |
+ | eventName | str | 事件名称 |
+ | target | object | 目标 |
+ | func | object | 回调函数 |
+
+- 返回值
+
+ 无
+
+
+
+## ListenPresetSystemEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 监听来自预设系统的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | target | object | 目标 |
+ | func | object | 回调函数 |
+
+- 返回值
+
+ 无
+
+
+
+## UnListenPresetSystemEvent
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 反监听来自预设系统的事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | eventName | str | 事件名称 |
+ | target | object | 目标 |
+ | func | object | 回调函数 |
+
+- 返回值
+
+ 无
+
+
+
+## DestroyStoryLines
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 手动销毁零件蓝图
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## GetSelf
+
+客户端/服务端
+
+method in Preset.Model.PartBase.PartBase
+
+- 描述
+
+ 获取零件自身
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PartBase | 零件自身 |
+
+
+
+## GetApi
+
+客户端/服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 返回当前对象可使用的SDK API模块
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | extraClientApi或extraServerApi | 返回当前对象可使用的SDK API模块 |
+
+
+
+## IsPlayerSneaking
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 是否潜行
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否潜行 |
+
+- 示例
+
+```python
+self.IsPlayerSneaking(playerId)
+```
+
+
+
+## GetPlayerHunger
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 获取玩家饥饿度,展示在UI饥饿度进度条上,初始值为20,即每一个鸡腿代表2个饥饿度。 **饱和度(saturation)** :玩家当前饱和度,初始值为5,最大值始终为玩家当前饥饿度(hunger),该值直接影响玩家**饥饿度(hunger)**。
1)增加方法:吃食物。
2)减少方法:每触发一次**消耗事件**,该值减少1,如果该值不大于0,直接把玩家 **饥饿度(hunger)** 减少1。
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 玩家饥饿度 |
+
+- 示例
+
+```python
+self.GetPlayerHunger(playerId)
+```
+
+
+
+## SetPlayerHunger
+
+服务端
+
+method in Preset.Model.SdkInterface.SdkInterface
+
+- 描述
+
+ 设置玩家饥饿度。
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | playerId | str或int | 玩家id |
+ | value | float | 饥饿度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetPlayerHunger(playerId, 10)
+```
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件事件PartEvent.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件事件PartEvent.md
new file mode 100644
index 0000000..3ecf00e
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件事件PartEvent.md
@@ -0,0 +1,112 @@
+---
+sidebarDepth: 1
+---
+# 零件事件PartEvent
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [OnTriggerEntityEnter](#ontriggerentityenter) | 客户端/服务端 | 触发器范围有实体进入时触发,只适用于TriggerPart |
+| [OnTriggerEntityExit](#ontriggerentityexit) | 客户端/服务端 | 触发器范围有实体离开时触发,只适用于TriggerPart |
+| [OnTriggerEntityStay](#ontriggerentitystay) | 客户端/服务端 | 触发器范围有实体停留时触发,只适用于TriggerPart |
+
+
+
+
+## OnTriggerEntityEnter
+
+客户端/服务端
+
+method in Preset.Parts.PartEvent
+
+- 描述
+
+ 触发器范围有实体进入时触发,只适用于TriggerPart
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | TriggerPart | PartBase | 发射事件的触发器零件 |
+ | EnterEntityIds | list(str) | 进入触发器范围的实体ID列表 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+part = self.GetParent().GetPartByType("TriggerPart")
+if not part:
+ return
+self.ListenPartClientEvent(part.id, "OnTriggerEntityEnter", self, self.OnTriggerEntityEnter)
+```
+
+
+
+## OnTriggerEntityExit
+
+客户端/服务端
+
+method in Preset.Parts.PartEvent
+
+- 描述
+
+ 触发器范围有实体离开时触发,只适用于TriggerPart
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | TriggerPart | PartBase | 发射事件的触发器零件 |
+ | ExitEntityIds | list(str) | 离开触发器范围的实体ID列表 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+part = self.GetParent().GetPartByType("TriggerPart")
+if not part:
+ return
+self.ListenPartClientEvent(part.id, "OnTriggerEntityExit", self, self.OnTriggerEntityExit)
+```
+
+
+
+## OnTriggerEntityStay
+
+客户端/服务端
+
+method in Preset.Parts.PartEvent
+
+- 描述
+
+ 触发器范围有实体停留时触发,只适用于TriggerPart
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | TriggerPart | PartBase | 发射事件的触发器零件 |
+ | StayEntityIds | list(str) | 停留在触发器范围的实体ID列表 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+part = self.GetParent().GetPartByType("TriggerPart")
+if not part:
+ return
+self.ListenPartClientEvent(part.id, "OnTriggerEntityStay", self, self.OnTriggerEntityStay)
+```
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/实体对象EntityObject.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/实体对象EntityObject.md
new file mode 100644
index 0000000..a454846
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/实体对象EntityObject.md
@@ -0,0 +1,2843 @@
+---
+sidebarDepth: 1
+---
+# 实体对象EntityObject
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+SdkInterface <|-- EntityObject
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+EntityObject: 实体对象
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+```
+
+- 描述
+
+ EntityObject(实体对象)是对实体对象封装的基类,它为实体提供了面向对象的使用方式。
+
+- 成员变量
+
+ 无
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetPos](#getpos) | 客户端/服务端 | 获取实体位置 |
+| [GetFootPos](#getfootpos) | 客户端/服务端 | 获取实体脚所在的位置 |
+| [SetPos](#setpos) | 服务端 | 设置实体位置 |
+| [SetFootPos](#setfootpos) | 服务端 | 设置实体脚底所在的位置 |
+| [GetRot](#getrot) | 客户端/服务端 | 获取实体角度 |
+| [SetRot](#setrot) | 客户端/服务端 | 设置实体的头的角度 |
+| [GetEngineTypeStr](#getenginetypestr) | 客户端/服务端 | 获取实体的类型名称 |
+| [GetEngineType](#getenginetype) | 客户端/服务端 | 获取实体类型 |
+| [GetModelId](#getmodelid) | 客户端 | 获取骨骼模型的Id,主要用于特效绑定骨骼模型 |
+| [PlayAnim](#playanim) | 客户端 | 播放骨骼动画 |
+| [SetAnimSpeed](#setanimspeed) | 客户端 | 设置某个骨骼动画的播放速度 |
+| [GetAnimLength](#getanimlength) | 客户端 | 获取某个骨骼动画的长度,单位为秒 |
+| [SetBrightness](#setbrightness) | 客户端 | 设置实体的亮度 |
+| [SetOpacity](#setopacity) | 客户端 | 设置生物模型的透明度 |
+| [GetHealth](#gethealth) | 服务端 | 获取实体预设的生命值 |
+| [SetHealth](#sethealth) | 服务端 | 设置实体预设的生命值 |
+| [GetMaxHealth](#getmaxhealth) | 服务端 | 获取实体预设的最大生命值 |
+| [SetMaxHealth](#setmaxhealth) | 服务端 | 设置实体预设的最大生命值 |
+| [GetSpeed](#getspeed) | 服务端 | 获取实体预设的速度 |
+| [SetSpeed](#setspeed) | 服务端 | 设置实体预设的速度 |
+| [GetMaxSpeed](#getmaxspeed) | 服务端 | 获取实体预设的最大速度 |
+| [SetMaxSpeed](#setmaxspeed) | 服务端 | 设置实体预设的最大速度 |
+| [GetDamage](#getdamage) | 服务端 | 获取实体预设的伤害 |
+| [SetDamage](#setdamage) | 服务端 | 设置实体预设的伤害 |
+| [GetMaxDamage](#getmaxdamage) | 服务端 | 获取实体预设的最大伤害 |
+| [SetMaxDamage](#setmaxdamage) | 服务端 | 设置实体预设的最大伤害 |
+| [ShowHealth](#showhealth) | 客户端 | 设置是否显示血条,默认为显示 |
+| [SetAttackTarget](#setattacktarget) | 服务端 | 设置仇恨目标 |
+| [ResetAttackTarget](#resetattacktarget) | 服务端 | 清除仇恨目标 |
+| [GetAttackTarget](#getattacktarget) | 服务端 | 获取仇恨目标 |
+| [SetKnockback](#setknockback) | 服务端 | 设置击退的初始速度,需要考虑阻力的影响 |
+| [SetOwner](#setowner) | 服务端 | 设置实体的属主 |
+| [GetOwner](#getowner) | 服务端 | 获取实体的属主 |
+| [IsOnFire](#isonfire) | 服务端 | 获取实体是否着火 |
+| [SetOnFire](#setonfire) | 服务端 | 设置实体着火 |
+| [GetAttrValue](#getattrvalue) | 服务端 | 获取属性值,包括生命值,饥饿度,移速 |
+| [GetAttrMaxValue](#getattrmaxvalue) | 客户端/服务端 | 获取属性最大值,包括生命值,饥饿度,移速 |
+| [SetAttrValue](#setattrvalue) | 服务端 | 设置属性值,包括生命值,饥饿度,移速 |
+| [SetAttrMaxValue](#setattrmaxvalue) | 服务端 | 设置属性最大值,包括生命值,饥饿度,移速 |
+| [IsInLava](#isinlava) | 客户端 | 实体是否在岩浆中 |
+| [IsOnGround](#isonground) | 客户端 | 实体是否触地 |
+| [GetAuxValue](#getauxvalue) | 客户端/服务端 | 获取射出的弓箭或投掷出的药水的附加值 |
+| [GetCurrentAirSupply](#getcurrentairsupply) | 服务端 | 生物当前氧气储备值 |
+| [GetMaxAirSupply](#getmaxairsupply) | 服务端 | 获取生物最大氧气储备值 |
+| [SetCurrentAirSupply](#setcurrentairsupply) | 服务端 | 设置生物氧气储备值 |
+| [SetMaxAirSupply](#setmaxairsupply) | 服务端 | 设置生物最大氧气储备值 |
+| [IsConsumingAirSupply](#isconsumingairsupply) | 服务端 | 获取生物当前是否在消耗氧气 |
+| [SetRecoverTotalAirSupplyTime](#setrecovertotalairsupplytime) | 服务端 | 设置恢复最大氧气量的时间,单位秒 |
+| [GetSourceId](#getsourceid) | 服务端 | 获取抛射物发射者实体id |
+| [SetCollisionBoxSize](#setcollisionboxsize) | 服务端 | 设置实体的包围盒 |
+| [GetCollisionBoxSize](#getcollisionboxsize) | 服务端 | 获取实体的包围盒 |
+| [SetBlockControlAi](#setblockcontrolai) | 服务端 | 设置屏蔽生物原生AI |
+| [GetDimensionId](#getdimensionid) | 服务端 | 获取实体所在维度 |
+| [ChangeDimension](#changedimension) | 服务端 | 传送实体 |
+| [RemoveEffect](#removeeffect) | 服务端 | 为实体删除指定状态效果 |
+| [AddEffect](#addeffect) | 服务端 | 为实体添加指定状态效果,如果添加的状态已存在则有以下集中情况:1、等级大于已存在则更新状态等级及持续时间;2、状态等级相等且剩余时间duration大于已存在则刷新剩余时间;3、等级小于已存在则不做修改;4、粒子效果以新的为准 |
+| [GetEffects](#geteffects) | 服务端 | 获取实体当前所有状态效果 |
+| [TriggerCustomEvent](#triggercustomevent) | 服务端 | 触发生物自定义事件 |
+| [IsAlive](#isalive) | 客户端/服务端 | 判断生物实体是否存活或非生物实体是否存在 |
+| [GetGravity](#getgravity) | 服务端 | 获取实体的重力因子,当生物重力因子为0时则应用世界的重力因子 |
+| [SetGravity](#setgravity) | 服务端 | 设置实体的重力因子,当生物重力因子为0时则应用世界的重力因子 |
+| [SetHurt](#sethurt) | 服务端 | 对实体造成伤害 |
+| [SetImmuneDamage](#setimmunedamage) | 服务端 | 设置实体是否免疫伤害(该属性存档) |
+| [SetModAttr](#setmodattr) | 客户端/服务端 | 设置属性值 |
+| [GetModAttr](#getmodattr) | 客户端/服务端 | 获取属性值 |
+| [RegisterModAttrUpdateFunc](#registermodattrupdatefunc) | 客户端 | 注册属性值变换时的回调函数,当属性变化时会调用该函数 |
+| [UnRegisterModAttrUpdateFunc](#unregistermodattrupdatefunc) | 客户端 | 反注册属性值变换时的回调函数 |
+| [GetName](#getname) | 服务端 | 获取生物的自定义名称,即使用命名牌或者SetName接口设置的名称 |
+| [SetName](#setname) | 服务端 | 用于设置生物的自定义名称,跟原版命名牌作用相同,玩家和新版流浪商人暂不支持 |
+| [SetShowName](#setshowname) | 客户端 | 设置生物名字是否按照默认游戏逻辑显示 |
+| [SetAlwaysShowName](#setalwaysshowname) | 客户端 | 设置生物名字是否一直显示,瞄准点不指向生物时也能显示 |
+| [SetPersistence](#setpersistence) | 服务端 | 设置实体是否存盘 |
+| [SetMotion](#setmotion) | 客户端/服务端 | 设置生物的瞬时移动方向向量,服务端只能对非玩家使用,客户端只能对本地玩家使用 |
+| [GetMotion](#getmotion) | 客户端/服务端 | 获取生物(含玩家)的瞬时移动方向向量 |
+| [SetItem](#setitem) | 服务端 | 设置生物物品 |
+| [SetCanOtherPlayerRide](#setcanotherplayerride) | 服务端 | 设置其他玩家是否有权限骑乘 |
+| [SetControl](#setcontrol) | 服务端 | 设置该生物无需装备鞍就可以控制行走跳跃 |
+| [SetRidePos](#setridepos) | 服务端 | 设置生物骑乘位置 |
+| [SetNotRender](#setnotrender) | 客户端 | 设置是否关闭实体渲染 |
+| [SetCollidable](#setcollidable) | 客户端 | 设置实体是否可碰撞 |
+| [SetHealthColor](#sethealthcolor) | 客户端 | 设置血条的颜色及背景色, 必须用game组件设置ShowHealthBar时才能显示血条!! |
+| [AddAnimation](#addanimation) | 客户端 | 增加生物渲染动画 |
+| [AddAnimationController](#addanimationcontroller) | 客户端 | 增加生物渲染动画控制器 |
+| [AddScriptAnimate](#addscriptanimate) | 客户端 | 在生物的客户端实体定义(minecraft:client_entity)json中的scripts/animate节点添加动画/动画控制器 |
+| [AddParticleEffect](#addparticleeffect) | 客户端 | 增加生物特效资源 |
+| [AddRenderController](#addrendercontroller) | 客户端 | 增加生物渲染控制器 |
+| [AddRenderMaterial](#addrendermaterial) | 客户端 | 增加生物渲染需要的材质,调用该接口后需要调用RebuildActorRender才会生效 |
+| [AddSoundEffect](#addsoundeffect) | 客户端 | 增加生物音效资源 |
+| [SetPushable](#setpushable) | 服务端 | 设置实体是否可推动 |
+| [SetModel](#setmodel) | 客户端/服务端 | 设置骨骼模型 |
+| [GetLavaSpeed](#getlavaspeed) | 服务端 | 获取实体预设岩浆里的移速 |
+| [SetLavaSpeed](#setlavaspeed) | 服务端 | 设置实体预设岩浆里的移速 |
+| [GetMaxLavaSpeed](#getmaxlavaspeed) | 服务端 | 获取实体预设岩浆里的最大移速 |
+| [SetMaxLavaSpeed](#setmaxlavaspeed) | 服务端 | 设置实体预设岩浆里的最大移速 |
+
+
+
+
+## GetPos
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体位置
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 位置信息 |
+
+- 备注
+ - 对于非玩家,获取到的是脚底部位的位置
+ - 对于玩家,如果处于行走,站立,游泳,潜行,滑翔状态,获得的位置比脚底位置高1.62;如果处于睡觉状态,获得的位置比最低位置高0.2
+
+
+
+## GetFootPos
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体脚所在的位置
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float,float) | 位置信息 |
+
+
+
+## SetPos
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(int,int,int) | xyz值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 行为与使用tp命令一致,实体会瞬移到目标点
+ - 对于所有类型的实体都是设置脚底位置,与[SetFootPos](#setfootpos)等价
+ - 在床上时调用该接口会返回False
+
+- 示例
+
+```python
+self.SetPos((1,2,3))
+```
+
+
+
+## SetFootPos
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体脚底所在的位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 实体脚所在的位置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 行为与使用tp命令一致,实体会瞬移到目标点
+ - 在床上时调用该接口会返回False
+
+- 示例
+
+```python
+self.SetFootPos((0, 4, 0))
+```
+
+
+
+## GetRot
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体角度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | (上下角度,左右角度)单位是角度而不是弧度 |
+
+
+
+## SetRot
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体的头的角度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rot | tuple(float,float) | 俯仰角度及绕竖直方向的角度,单位是角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 建议只用来设置本地玩家。如果设置其他生物,会被生物自身行为覆盖。
+
+- 示例
+
+```python
+# 设为向上仰视45度,并朝向世界z轴正方向
+self.SetRot((-45, 0))
+```
+
+
+
+## GetEngineTypeStr
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体的类型名称
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 实体类型名称,如minecraft:husk |
+
+- 示例
+
+```python
+entity = self.GetEntityObject(entityId)
+engineType = entity.GetEngineTypeStr()
+```
+
+
+
+## GetEngineType
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体类型
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 详见EntityType枚举 |
+
+- 示例
+
+```python
+entity = self.GetEntityObject(entityId)
+# 以判断是否是 Mob 为例,如果要判断是否为弹射物,找到对应的类型Projectile修改即可
+if entity.GetEngineType() & self.GetMinecraftEnum().EntityType.Mob == self.GetMinecraftEnum().EntityType.Mob:
+ logger.info("{} is Mod".format(self.GetEngineTypeStr(entityId)))
+```
+
+
+
+## GetModelId
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取骨骼模型的Id,主要用于特效绑定骨骼模型
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 当前骨骼模型实例的id |
+
+
+
+## PlayAnim
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 播放骨骼动画
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | aniName | str | 动画名称 |
+ | isLoop | bool | 是否循环播放 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.PlayAnim("run", True)
+```
+
+
+
+## SetAnimSpeed
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置某个骨骼动画的播放速度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | aniName | str | 骨骼动画名称 |
+ | speed | float | 速度倍率 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# run动作三倍速
+self.SetAnimSpeed("run", 3.0)
+```
+
+
+
+## GetAnimLength
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取某个骨骼动画的长度,单位为秒
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | aniName | str | 骨骼动画名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 骨骼动画长度 |
+
+- 示例
+
+```python
+# 获取run动画的长度
+animLength = self.GetAnimLength('run')
+```
+
+
+
+## SetBrightness
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体的亮度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | brightness | float | 0:纯黑
1:正常亮度
1-14:较亮甚至纯白
超过14:通常为纯白,即使数值改变也没有明显变化 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:设置成功 False:设置失败 |
+
+- 备注
+ - 目前只支持修改替换了骨骼模型的实体亮度,使用游戏原生模型的实体暂不予支持。
+
+- 示例
+
+```python
+success = self.SetBrightness(0.5)
+```
+
+
+
+## SetOpacity
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物模型的透明度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | opacity | float | 透明度值,取值范围为[0, 1],值越小越透明 |
+
+- 返回值
+
+ 无
+
+- 示例
+
+```python
+self.SetOpacity(0.2)
+```
+
+
+
+## GetHealth
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设的生命值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 生命值 |
+
+
+
+## SetHealth
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设的生命值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | hp | float | 生命值 |
+
+- 返回值
+
+ 无
+
+
+
+## GetMaxHealth
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设的最大生命值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 生命值 |
+
+
+
+## SetMaxHealth
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设的最大生命值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | hp | float | 生命值 |
+
+- 返回值
+
+ 无
+
+
+
+## GetSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设的速度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 速度 |
+
+
+
+## SetSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设的速度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | speed | float | 速度 |
+
+- 返回值
+
+ 无
+
+
+
+## GetMaxSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设的最大速度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 速度 |
+
+
+
+## SetMaxSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设的最大速度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | speed | float | 速度 |
+
+- 返回值
+
+ 无
+
+
+
+## GetDamage
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设的伤害
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 伤害 |
+
+
+
+## SetDamage
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设的伤害
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | hp | float | 伤害 |
+
+- 返回值
+
+ 无
+
+
+
+## GetMaxDamage
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设的最大伤害
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 伤害 |
+
+
+
+## SetMaxDamage
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设的最大伤害
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | damage | float | 伤害 |
+
+- 返回值
+
+ 无
+
+
+
+## ShowHealth
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置是否显示血条,默认为显示
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | show | bool | 设置是否显示 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 必须先设置ShowHealthBar
+
+- 示例
+
+```python
+# 设置该entity不显示血条
+self.ShowHealth(False)
+```
+
+
+
+## SetAttackTarget
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置仇恨目标
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | targetId | str | 目标实体id |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetAttackTarget(targetId)
+```
+
+
+
+## ResetAttackTarget
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 清除仇恨目标
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.ResetAttackTarget()
+```
+
+
+
+## GetAttackTarget
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取仇恨目标
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 仇恨目标的实体id |
+
+- 示例
+
+```python
+self.GetAttackTarget()
+```
+
+
+
+## SetKnockback
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置击退的初始速度,需要考虑阻力的影响
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | xd | float | x轴方向,用來控制角度 |
+ | zd | float | z轴方向,用來控制角度 |
+ | power | float | 用来控制水平方向的初速度 |
+ | height | float | 竖直方向的初速度 |
+ | heightCap | float | 向上速度阈值,当实体本身已经有向上的速度时需要考虑这个值,用来确保最终向上的速度不会超过heightCap |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | None | 无返回值 |
+
+- 示例
+
+```python
+self.SetKnockback(0.1, 0.1, 1.0, 1.0, 1.0)
+```
+
+
+
+## SetOwner
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体的属主
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | ownerId | str | 属主实体id,为None时设置实体的属主为空 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功,True表示设置成功 |
+
+- 示例
+
+```python
+result = self.SetOwner(ownerId)
+```
+
+
+
+## GetOwner
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体的属主
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 实体属主id |
+
+- 示例
+
+```python
+ownerId = self.GetOwner()
+```
+
+
+
+## IsOnFire
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体是否着火
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否着火 |
+
+- 示例
+
+```python
+isOnFire = self.IsEntityOnFire(entityId)
+```
+
+
+
+## SetOnFire
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体着火
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | seconds | int | 着火时间(单位:秒) |
+ | burn_damage | int | 着火状态下每秒扣的血量,不传的话默认是1 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 在水中或者雨中不会生效,着火时间受生物装备、生物的状态影响。burn_damage取值范围是0~1000,小于0将取0,大于1000将取1000
+
+- 示例
+
+```python
+self.SetEntityOnFire(entityId, 1, 2)
+```
+
+
+
+## GetAttrValue
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取属性值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | attrType | int | AttrType枚举 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 属性结果 |
+
+- 示例
+
+```python
+self.GetAttrValue(self.GetMinecraftEnum().AttrType.HEALTH)
+```
+
+
+
+## GetAttrMaxValue
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取属性最大值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | attrType | int | AttrType枚举 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 属性值结果 |
+
+- 示例
+
+```python
+self.GetAttrMaxValue(self.GetMinecraftEnum().AttrType.HEALTH)
+```
+
+
+
+## SetAttrValue
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置属性值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | attrType | int | AttrType枚举 |
+ | value | float | 属性值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 设置接口暂不支持 ABSORPTION
+
+- 示例
+
+```python
+self.SetAttrValue(self.GetMinecraftEnum().AttrType.HEALTH, 20)
+```
+
+
+
+## SetAttrMaxValue
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置属性最大值,包括生命值,饥饿度,移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | attrType | int | AttrType枚举 |
+ | value | float | 属性值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 设置的最大饱和度不能超过当前的饥饿值; 食用食物后,最大饱和度会被原版游戏机制修改
+ - 设置接口暂不支持 ABSORPTION
+
+- 示例
+
+```python
+self.SetAttrMaxValue(serverApi.GetMinecraftEnum().AttrType.SPEED, 0.2)
+```
+
+
+
+## IsInLava
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 实体是否在岩浆中
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否在岩浆中,True为在岩浆中,False为不在岩浆中 |
+
+- 备注
+ - 只能获取到本地客户端已加载的实体是否在岩浆中,若实体在其他维度或未加载(距离本地玩家太远),将获取失败
+
+
+
+## IsOnGround
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 实体是否触地
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否触地,True为触地,False为不触地 |
+
+- 备注
+ - 客户端实体刚创建时引擎计算还没完成,此时获取该实体是否着地将返回默认值True,需要延迟一帧进行获取才能获取到正确的数据
+ - 生物处于骑乘状态时,如玩家骑在猪身上,也视作触地
+ - 只能获取到本地客户端已加载的实体是否触地,若实体在其他维度或未加载(距离本地玩家太远),将获取失败
+
+
+
+## GetAuxValue
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取射出的弓箭或投掷出的药水的附加值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | auxValue |
+
+- 示例
+
+```python
+self.GetAuxValue()
+```
+
+
+
+## GetCurrentAirSupply
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 生物当前氧气储备值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 生物当前氧气储备值 |
+
+- 备注
+ - 注意:该值返回的是当前氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+
+
+## GetMaxAirSupply
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取生物最大氧气储备值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 最大氧气储备值 |
+
+- 备注
+ - 注意:该值返回的是最大氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+
+
+## SetCurrentAirSupply
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物氧气储备值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | data | int | 设置生物当前氧气值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 注意:该值设置的是当前氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+- 示例
+
+```python
+self.SetCurrentAirSupply(300)
+```
+
+
+
+## SetMaxAirSupply
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物最大氧气储备值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | data | int | 设置生物最大氧气值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 注意:该值设置的是最大氧气储备的支持的逻辑帧数 = 氧气储备值 * 逻辑帧数(每秒20帧数)
+
+- 示例
+
+```python
+self.SetMaxAirSupply(400)
+```
+
+
+
+## IsConsumingAirSupply
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取生物当前是否在消耗氧气
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否消耗氧气 |
+
+
+
+## SetRecoverTotalAirSupplyTime
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置恢复最大氧气量的时间,单位秒
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | timeSec | float | 恢复生物最大氧气值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 注意:当设置的最大氧气值小于(timeSec*10)时,生物每帧恢复氧气量的值为0
+
+- 示例
+
+```python
+self.SetRecoverTotalAirSupplyTime(10)
+```
+
+
+
+## GetSourceId
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取抛射物发射者实体id
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 抛射物发射者实体id |
+
+
+
+## SetCollisionBoxSize
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体的包围盒
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | size | tuple(float,float) | 第一位表示宽度和长度,第二位表示高度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 对新生产的实体需要经过5帧之后再设置包围盒的大小才会生效
+
+- 示例
+
+```python
+self.SetCollisionBoxSize((2,3))
+```
+
+
+
+## GetCollisionBoxSize
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体的包围盒
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float,float) | 包围盒大小 |
+
+
+
+## SetBlockControlAi
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置屏蔽生物原生AI
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isBlock | bool | 是否保留AI,False为屏蔽 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 屏蔽AI后的生物无法行动,不受重力且不会被推动。但是可以受到伤害,也可以被玩家交互(例如马被骑或村民被交易)
+
+- 示例
+
+```python
+self.SetBlockControlAi(False)
+```
+
+
+
+## GetDimensionId
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体所在维度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 维度id,0-主世界; 1-下界; 2-末地; 或其他自定义维度 |
+
+- 示例
+
+```python
+self.GetDimensionId()
+```
+
+
+
+## ChangeDimension
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 传送实体
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimensionId | int | 维度id,0-主世界; 1-下界; 2-末地; 或其他自定义维度 |
+ | pos | tuple(int,int,int) | 传送的坐标,假如输入None,那么就优先选择目标维度的传送门作为目的地,其次使用维度坐标映射逻辑确定目的地 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.ChangeDimension(0, (0,4,0))
+```
+
+
+
+## RemoveEffect
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 为实体删除指定状态效果
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | effectName | str | 状态效果名称字符串,包括自定义状态效果和原版状态效果,原版状态效果可在wiki查询 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True表示删除成功 |
+
+- 示例
+
+```python
+res = self.RemoveEffect(entityId, "speed")
+```
+
+
+
+## AddEffect
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 为实体添加指定状态效果,如果添加的状态已存在则有以下集中情况:1、等级大于已存在则更新状态等级及持续时间;2、状态等级相等且剩余时间duration大于已存在则刷新剩余时间;3、等级小于已存在则不做修改;4、粒子效果以新的为准
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | effectName | str | 状态效果名称字符串,包括自定义状态效果和原版状态效果,原版状态效果可在wiki查询 |
+ | duration | int | 状态效果持续时间,单位秒 |
+ | amplifier | int | 状态效果的额外等级。必须在0至255之间(含)。若未指定,默认为0。注意,状态效果的第一级(如生命恢复 I)对应为0,因此第二级状态效果,如生命回复 II,应指定强度为1。部分效果及自定义状态效果没有强度之分,如夜视 |
+ | showParticles | bool | 是否显示粒子效果,True显示,False不显示 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True表示设置成功 |
+
+- 示例
+
+```python
+res = self.AddEffect("speed", 30, 2, True)
+```
+
+
+
+## GetEffects
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体当前所有状态效果
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(dict) | 状态效果信息字典的list |
+
+- 备注
+ - 状态效果信息字典 effectDict
+ | 关键字 | 数据类型 | 说明 |
+ | ----------| --------------------- | ---------|
+ | effectName | str | 状态效果名称 |
+ | duration | int | 状态效果剩余持续时间,单位秒 |
+ | amplifier | int | 状态效果额外等级 |
+
+- 示例
+
+```python
+effectDictList = self.GetEffects()
+```
+
+
+
+## TriggerCustomEvent
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 触发生物自定义事件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 生物Id |
+ | eventName | str | 事件名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+eventName = "netease:custom_exploading"
+self.TriggerCustomEvent(eventName)
+```
+
+
+
+## IsAlive
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 判断生物实体是否存活或非生物实体是否存在
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | false表示生物实体已死亡或非生物实体已销毁,true表示生物实体存活或非生物实体存在 |
+
+- 备注
+ - 注意,如果检测的实体所在的区块被卸载,则该接口返回False。因此,需要注意实体所在的区块是否被加载。
+ - 区块卸载:游戏只会加载玩家周围的区块,玩家移动到别的区域时,原来所在区域的区块会被卸载,参考[区块介绍](https://zh.minecraft.wiki/w/%E5%8C%BA%E5%9D%97)
+
+- 示例
+
+```python
+alive = self.IsEntityAlive()
+```
+
+
+
+## GetGravity
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体的重力因子,当生物重力因子为0时则应用世界的重力因子
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 重力因子 |
+
+
+
+## SetGravity
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体的重力因子,当生物重力因子为0时则应用世界的重力因子
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | gravity | float | 负数,表示每帧向下的速度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetGravity(-0.08)
+```
+
+
+
+## SetHurt
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 对实体造成伤害
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | damage | int | 伤害值 |
+ | cause | str | 伤害来源,详见Minecraft枚举值文档的ActorDamageCause枚举 |
+ | attackerId | str | 伤害来源的实体id,默认为None |
+ | childAttackerId | str | 伤害来源的子实体id,默认为None,比如玩家使用抛射物对实体造成伤害,该值应为抛射物Id |
+ | knocked | bool | 实体是否被击退,默认值为True |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+
+
+## SetImmuneDamage
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体是否免疫伤害(该属性存档)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | immune | bool | 是否免疫伤害 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetImmuneDamage(True)
+```
+
+
+
+## SetModAttr
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置属性值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | paramName | str | 属性名称,str的名称建议以mod命名为前缀,避免多个mod之间冲突 |
+ | paramValue | any | 属性值,支持python基础数据 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 注意:tuple、set在同步时会转成list。建议优先使用数字和字符串等非集合类型。
+
+- 示例
+
+```python
+self.SetModAttr('health', 1)
+self.SetModAttr('testDict', {'key':'value'})
+```
+
+
+
+## GetModAttr
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取属性值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | paramName | str | 属性名称,str的名称建议以mod命名为前缀,避免多个mod之间冲突 |
+ | defaultValue | any | 属性默认值,属性不存在时返回该默认值,此时属性值依然未设置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | any | 返回属性值 |
+
+- 备注
+ - defaultValue不传的时候默认为None
+
+- 示例
+
+```python
+# 如果直接修改GetAttr出来的集合类型,需要重新调用一遍SetAttr确保有进行更新
+testDict = self.GetModAttr('testDict')
+testDict['key'] = 'newValue'
+self.SetModAttr('testDict', testDict)
+```
+
+
+
+## RegisterModAttrUpdateFunc
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 注册属性值变换时的回调函数,当属性变化时会调用该函数
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | paramName | str | 监听的属性名称 |
+ | func | function | 监听的回调函数 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 回调函数需要接受一个参数,参数是dict,具体数据示例:{'oldValue': 0, 'newValue': 1, 'entityId': ’-433231231231‘}
+
+- 示例
+
+```python
+# 这个entityId传的是所需要监听的对象的Id
+self.RegisterModAttrUpdateFunc('health', self.jumpingText)
+# 当脚本层的health属性变化时则会调用self.jumpingText
+def jumpingText(self, data):
+ entityId = data['entityId']
+ oldValue = data['oldValue']
+ newValue = data['newValue']
+```
+
+
+
+## UnRegisterModAttrUpdateFunc
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 反注册属性值变换时的回调函数
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | paramName | str | 监听的属性名称 |
+ | func | function | 监听的回调函数 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 需要传注册时的同一个函数作为参数
+
+- 示例
+
+```python
+self.UnRegisterModAttrUpdateFunc('health', self.jumpingText)
+```
+
+
+
+## GetName
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取生物的自定义名称,即使用命名牌或者SetName接口设置的名称
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 生物的自定义名称 |
+
+
+
+## SetName
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 用于设置生物的自定义名称,跟原版命名牌作用相同,玩家和新版流浪商人暂不支持
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetName("new Name")
+```
+
+
+
+## SetShowName
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物名字是否按照默认游戏逻辑显示
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | show | bool | True为显示 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 备注
+ - 当设置为True时,生物的名字显示遵循游戏默认的渲染逻辑,即普通生物需要中心点指向生物才显示名字,玩家则是会一直显示名字
+
+- 示例
+
+```python
+# 不显示头上的名字
+self.SetShowName(False)
+```
+
+
+
+## SetAlwaysShowName
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物名字是否一直显示,瞄准点不指向生物时也能显示
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | show | bool | True为显示 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 备注
+ - 该接口只对普通生物生效,对玩家设置不起作用
+
+- 示例
+
+```python
+# 不显示头上的名字
+self.SetAlwaysShowName(False)
+```
+
+
+
+## SetPersistence
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体是否存盘
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isPersistent | bool | True为存盘,False为不存盘 |
+
+- 返回值
+
+ 无
+
+- 备注
+ - 实体默认都会存盘。设置为不存盘的实体,在区块卸载与退出游戏时不会存档。
+
+- 示例
+
+```python
+self.SetPersistence(True)
+```
+
+
+
+## SetMotion
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物的瞬时移动方向向量,服务端只能对非玩家使用,客户端只能对本地玩家使用
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | motion | tuple(float,float,float) | 世界坐标系下的向量,该方向为世界坐标系下的向量,以x,z,y三个轴的正方向为正值,可以通过当前生物的rot组件判断目前玩家面向的方向,可在开发模式下打开F3观察数值变化。 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 使生物向准星的方向突进一段距离
+rot = self.GetEntityRot(entityId)
+x, y, z = self.GetDirFromRot(rot)
+self.SetMotion((x * 5, y * 5, z * 5))
+# rot 和 世界坐标系关系
+# ^ x -90°
+# |
+# 180°/-180 ----------> z 0°
+# | 90°
+```
+
+
+
+## GetMotion
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取生物(含玩家)的瞬时移动方向向量
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(int,int,int) | 瞬时移动方向向量,异常时返回None |
+
+
+
+## SetItem
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物物品
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | posType | int | ItemPosType枚举 |
+ | itemDict | dict | 生物身上不同位置的物品信息字典列表,如果传入None将清除当前位置的物品/装备 |
+ | slotPos | int | 容器槽位 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置成功返回True |
+
+- 示例
+
+```python
+itemDict = {
+ 'itemName': 'minecraft:bow',
+ 'count': 1,
+ 'enchantData': [(serverApi.GetMinecraftEnum().EnchantType.BowDamage, 1),],
+ 'auxValue': 0,
+ 'customTips':'§c new item §r',
+ 'extraId': 'abc',
+ 'userData': {},
+}
+self.SetItem(serverApi.GetMinecraftEnum().ItemPosType.OFFHAND, None, 0)
+```
+
+
+
+## SetCanOtherPlayerRide
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置其他玩家是否有权限骑乘
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | canRide | bool | 是否控制 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetCanOtherPlayerRide(entityId,False)
+```
+
+
+
+## SetControl
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置该生物无需装备鞍就可以控制行走跳跃
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isControl | bool | 是否控制 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetControl(entityId,False)
+```
+
+
+
+## SetRidePos
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置生物骑乘位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 骑乘时挂接点 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 示例
+
+```python
+self.SetRidePos(entityId,(1, 1, 1))
+```
+
+
+
+## SetNotRender
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置是否关闭实体渲染
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | notRender | bool | True表示不渲染该实体 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.SetNotRender(True) # 停止渲染该实体
+```
+
+
+
+## SetCollidable
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体是否可碰撞
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isCollidable | bool | False:不可碰撞 True:可碰撞 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True表示设置成功 |
+
+- 示例
+
+```python
+self.SetCollidable(True) # 设为可碰撞
+```
+
+
+
+## SetHealthColor
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置血条的颜色及背景色, 必须用game组件设置ShowHealthBar时才能显示血条!!
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | front | tuple(float,float,float,float) | 血条颜色的RGBA值,范围0-1 |
+ | back | tuple(float,float,float,float) | 背景颜色的RGBA值,范围0-1 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | None | 无返回值 |
+
+- 示例
+
+```python
+self.SetHealthColor((0, 0, 0, 1), (1, 1, 1, 1))
+```
+
+
+
+## AddAnimation
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 增加生物渲染动画
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | animationKey | str | 动画键 |
+ | animationName | str | 动画名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddAnimation("custom_move", "animation.pig.custom_move")
+```
+
+
+
+## AddAnimationController
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 增加生物渲染动画控制器
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | animationControllerKey | str | 动画控制器键 |
+ | animationControllerName | str | 动画控制器名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddAnimationController("controller__use_item_progress", "controller.animation.humanoid.use_item_progress")
+```
+
+
+
+## AddScriptAnimate
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 在生物的客户端实体定义(minecraft:client_entity)json中的scripts/animate节点添加动画/动画控制器
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | animateName | str | 动画/动画控制器名称,如look_at_targe |
+ | condition | str | 动画/动画控制器控制表达式,默认为空,如query.mod.index > 0 |
+ | autoReplace | bool | 是否覆盖已存在的动画/动画控制器,默认值为False |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddScriptAnimate("animation_controller_short_name", "query.mod.index > 0")
+```
+
+
+
+## AddParticleEffect
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 增加生物特效资源
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | effectKey | str | 特效资源Key |
+ | effectName | str | 特效资源名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddParticleEffect("nectar_dripping", "minecraft:nectar_drip_particle")
+```
+
+
+
+## AddRenderController
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 增加生物渲染控制器
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | renderControllerName | str | 渲染控制器名称 |
+ | condition | str | 渲染控制器条件 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 添加是否成功 |
+
+- 示例
+
+```python
+self.AddRenderController('custom_render_controller_name', 'query.mod.condition')
+```
+
+
+
+## AddRenderMaterial
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 增加生物渲染需要的材质,调用该接口后需要调用RebuildActorRender才会生效
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | materialKey | str | 材质key |
+ | materialName | str | 材质名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 添加是否成功 |
+
+- 示例
+
+```python
+self.AddRenderMaterial('custom_material_key', 'custom_material_name')
+```
+
+
+
+## AddSoundEffect
+
+客户端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 增加生物音效资源
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | soundKey | str | 音效资源Key |
+ | soundName | str | 音效资源名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 添加是否成功 |
+
+- 示例
+
+```python
+self.AddSoundEffect("sound_thunder", "ambient.weather.thunder")
+```
+
+
+
+## SetPushable
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体是否可推动
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isPushable | bool | False:不可推动 True:可推动 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True表示设置成功 |
+
+- 示例
+
+```python
+self.SetPushable(True)
+```
+
+
+
+## SetModel
+
+客户端/服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置骨骼模型
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | modelName | str | 模型名称,值为""时重置模型 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置结果 |
+
+- 备注
+ - 要恢复原版模型请使用ResetModel接口
+ - 使用客户端组件更换模型不会同步及存盘,仅是纯客户端表现,如需要同步及存盘,请使用服务器的model组件
+
+- 示例
+
+```python
+self.SetModel("xuenv")
+```
+
+
+
+## GetLavaSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设岩浆里的移速
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 岩浆里的移速 |
+
+
+
+## SetLavaSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设岩浆里的移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | value | float | 岩浆里的移速 |
+
+- 返回值
+
+ 无
+
+
+
+## GetMaxLavaSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 获取实体预设岩浆里的最大移速
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 岩浆里的最大移速 |
+
+
+
+## SetMaxLavaSpeed
+
+服务端
+
+method in Preset.Model.Entity.EntityObject.EntityObject
+
+- 描述
+
+ 设置实体预设岩浆里的最大移速
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | value | float | 岩浆里的最大移速 |
+
+- 返回值
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/实体预设EntityPreset.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/实体预设EntityPreset.md
new file mode 100644
index 0000000..34f3b21
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/实体预设EntityPreset.md
@@ -0,0 +1,50 @@
+---
+sidebarDepth: 1
+---
+# 实体预设EntityPreset
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+PresetBase <|-- EntityPreset
+link PresetBase "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E9%A2%84%E8%AE%BE%E5%9F%BA%E7%B1%BBPresetBase.html"
+EntityObject <|-- EntityPreset
+link EntityObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E5%AE%9E%E4%BD%93%E5%AF%B9%E8%B1%A1EntityObject.html"
+SdkInterface <|-- PresetBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+TransformObject <|-- PresetBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+EntityPreset: 实体预设
+EntityObject: 实体对象
+EntityObject: (点击跳转)
+PresetBase: 预设基类
+PresetBase: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+```
+
+- 描述
+
+ EntityPreset(实体预设)是一类特殊的预设,实体预设通常会绑定MC的某类实体,实体预设实例与MC的某一个实体绑定,因此可以使用实体预设来进行一些实体相关的逻辑的编程。如果玩家同时启用了多个AddOn,且这些AddOn中均包含与同一种MC原版实体绑定的实体预设,那么只会加载第一个这种实体预设。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | engineTypeStr | str | 实体的类型ID |
+ | entityId | str | 实体ID |
+ | updateTransformInterval | int | 实体预设子节点的变换更新间隔,0表示永不更新 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/文字面板对象TextboardObject.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/文字面板对象TextboardObject.md
new file mode 100644
index 0000000..894a796
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/文字面板对象TextboardObject.md
@@ -0,0 +1,321 @@
+---
+sidebarDepth: 1
+---
+# 文字面板对象TextboardObject
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+SdkInterface <|-- TextboardObject
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+TextboardObject: 文字面板对象
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+```
+
+- 描述
+
+ TextboardObject(文字面板对象)是对文字面板对象封装的基类,为文字面板提供了面向对象方法
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | textboardId | int | 关联文字面板ID |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [SetBindEntity](#setbindentity) | 客户端 | 文字面板绑定实体对象 |
+| [SetPos](#setpos) | 客户端 | 修改文字面板预设位置 |
+| [SetRot](#setrot) | 客户端 | 修改旋转角度, 若设置了文本朝向相机,则旋转角度的修改不会生效 |
+| [SetScale](#setscale) | 客户端 | 内容整体缩放 |
+| [SetText](#settext) | 客户端 | 修改文字面板内容 |
+| [SetColor](#setcolor) | 客户端 | 修改字体颜色 |
+| [SetBackgroundColor](#setbackgroundcolor) | 客户端 | 修改背景颜色 |
+| [SetFaceCamera](#setfacecamera) | 客户端 | 设置是否始终朝向相机 |
+| [SetBoardDepthTest](#setboarddepthtest) | 客户端 | 设置是否开启深度测试, 默认状态下是开启 |
+
+
+
+
+## SetBindEntity
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 文字面板绑定实体对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | bindEntityId | str | 绑定entity的Id; 如果为None,则为取消实体绑定, 此时下面参数为世界坐标和旋转 |
+ | offset | tuple(float,float,float) | 相对于实体的偏移量 |
+ | rot | tuple(float,float,float) | 相对于实体的偏移角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetBindEntity(self.GetLocalPlayerId(), (0.0, 1.5, 0.0), (0.0, 0.0, 0.0))
+```
+
+
+
+## SetPos
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 修改文字面板预设位置
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetPos((0.0, 3.0, 0.0))
+```
+
+
+
+## SetRot
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 修改旋转角度, 若设置了文本朝向相机,则旋转角度的修改不会生效
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | rot | tuple(float,float,float) | 角度(不是弧度) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetRot((45.0, 90.0, 0.0))
+```
+
+
+
+## SetScale
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 内容整体缩放
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | scale | tuple(float,float) | x,y方向上的缩放值,要求值大于0,正常状态下是(1.0,1.0) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetScale((2.0, 2.0))
+```
+
+
+
+## SetText
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 修改文字面板内容
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | text | str | 文字内容 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否修改成功 |
+
+- 示例
+
+```python
+self.SetText("修改后的文字")
+```
+
+
+
+## SetColor
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 修改字体颜色
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | textColor | tuple(float,float,float,float) | 颜色的RGBA值,范围0-1 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetColor((1.0, 1.0, 0.0, 0.8))
+```
+
+
+
+## SetBackgroundColor
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 修改背景颜色
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | backgroundColor | tuple(float,float,float,float) | 颜色的RGBA值,范围0-1 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetBackgroundColor((1.0, 1.0, 1.0, 1.0))
+```
+
+
+
+## SetFaceCamera
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 设置是否始终朝向相机
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | faceCamera | bool | 是否始终朝向相机, 默认为True |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetFaceCamera(True)
+```
+
+
+
+## SetBoardDepthTest
+
+客户端
+
+method in Preset.Model.Textboard.TextboardObject.TextboardObject
+
+- 描述
+
+ 设置是否开启深度测试, 默认状态下是开启
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | depthTest | bool | True为开启深度测试,False为不开启 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 返回是否设置成功 |
+
+- 示例
+
+```python
+self.SetBoardDepthTest(False)
+```
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/文字面板预设TextboardPreset.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/文字面板预设TextboardPreset.md
new file mode 100644
index 0000000..d9ed2e3
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/文字面板预设TextboardPreset.md
@@ -0,0 +1,46 @@
+---
+sidebarDepth: 1
+---
+# 文字面板预设TextboardPreset
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+PresetBase <|-- TextboardPreset
+link PresetBase "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E9%A2%84%E8%AE%BE%E5%9F%BA%E7%B1%BBPresetBase.html"
+TextboardObject <|-- TextboardPreset
+link TextboardObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E6%96%87%E5%AD%97%E9%9D%A2%E6%9D%BF%E5%AF%B9%E8%B1%A1TextboardObject.html"
+SdkInterface <|-- PresetBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+TransformObject <|-- PresetBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+TextboardPreset: 文字面板预设
+TextboardObject: 文字面板对象
+TextboardObject: (点击跳转)
+PresetBase: 预设基类
+PresetBase: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+```
+
+- 描述
+
+ TextboardPreset(文字面板预设)与文字面板实体绑定,以面向对象的形式提供文字面板相关属性修改接口。
+
+- 成员变量
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/方块预设BlockPreset.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/方块预设BlockPreset.md
new file mode 100644
index 0000000..8db49e0
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/方块预设BlockPreset.md
@@ -0,0 +1,77 @@
+---
+sidebarDepth: 1
+---
+# 方块预设BlockPreset
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+PresetBase <|-- BlockPreset
+link PresetBase "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E9%A2%84%E8%AE%BE%E5%9F%BA%E7%B1%BBPresetBase.html"
+SdkInterface <|-- PresetBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+TransformObject <|-- PresetBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+BlockPreset: 方块预设
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+PresetBase: 预设基类
+PresetBase: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+```
+
+- 描述
+
+ BlockPreset(方块预设)是一类绑定方块的预设。由于MC的方块数量巨大,将方块预设与MC的原生方块绑定,尤其是地图中常见的原生方块可能对性能造成重大影响。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | engineTypeStr | str | 方块类型ID |
+ | blockId | str | 方块类型数字ID |
+ | auxValue | int | 附加值 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetEngineTypeStr](#getenginetypestr) | 客户端/服务端 | 获取方块预设的方块类型ID |
+
+
+
+
+## GetEngineTypeStr
+
+客户端/服务端
+
+method in Preset.Model.Block.BlockPreset.BlockPreset
+
+- 描述
+
+ 获取方块预设的方块类型ID
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 方块类型ID |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/特效对象EffectObject.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/特效对象EffectObject.md
new file mode 100644
index 0000000..18916c9
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/特效对象EffectObject.md
@@ -0,0 +1,246 @@
+---
+sidebarDepth: 1
+---
+# 特效对象EffectObject
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+SdkInterface <|-- EffectObject
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+EffectObject: 特效对象
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+```
+
+- 描述
+
+ EffectObject(特效对象)是对特效对象封装的基类,它为特效提供了面向对象的使用方式。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | effectId | int | 关联特效ID |
+ | effectType | str | 关联特效类型,frame/particle |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [Play](#play) | 客户端 | 播放特效,仅客户端有效 |
+| [Stop](#stop) | 客户端 | 停止播放特效,仅客户端有效 |
+| [BindToEntity](#bindtoentity) | 客户端 | 绑定到实体 |
+| [BindToSkeleton](#bindtoskeleton) | 客户端 | 绑定骨骼模型 |
+| [SetLoop](#setloop) | 客户端 | 设置特效是否循环播放,默认为否,仅对序列帧有效 |
+| [SetDeepTest](#setdeeptest) | 客户端 | 设置序列帧是否透视,默认为否 |
+| [SetFaceCamera](#setfacecamera) | 客户端 | 设置序列帧是否始终朝向摄像机,默认为是 |
+
+
+
+
+## Play
+
+客户端
+
+method in Preset.Model.Effect.EffectObject.EffectObject
+
+- 描述
+
+ 播放特效,仅客户端有效
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## Stop
+
+客户端
+
+method in Preset.Model.Effect.EffectObject.EffectObject
+
+- 描述
+
+ 停止播放特效,仅客户端有效
+
+- 参数
+
+ 无
+
+- 返回值
+
+ 无
+
+
+
+## BindToEntity
+
+客户端
+
+method in Preset.Model.Effect.EffectObject.EffectObject
+
+- 描述
+
+ 绑定到实体
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | bindEntityId | str | 绑定的实体ID |
+ | offset | tuple(float,float,float) | 绑定的偏移量 |
+ | rot | tuple(float,float,float) | 绑定的旋转角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.BindToEntity(entityId, (0, 1, 0), (0, 0, 0))
+```
+
+
+
+## BindToSkeleton
+
+客户端
+
+method in Preset.Model.Effect.EffectObject.EffectObject
+
+- 描述
+
+ 绑定骨骼模型
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | modelId | int | 绑定的骨骼模型的ID(见model组件的GetModelId) |
+ | boneName | str | 绑定具体骨骼的名称 |
+ | offset | tuple(float,float,float) | 绑定的偏移量 |
+ | rot | tuple(float,float,float) | 绑定的旋转角度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.BindToSkeleton(modelId, "root", (0, 1, 0), (0, 0, 0))
+```
+
+
+
+## SetLoop
+
+客户端
+
+method in Preset.Model.Effect.EffectObject.EffectObject
+
+- 描述
+
+ 设置特效是否循环播放,默认为否,仅对序列帧有效
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | loop | bool | True表示循环播放 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 设置为循环播放
+self.SetLoop(True)
+```
+
+
+
+## SetDeepTest
+
+客户端
+
+method in Preset.Model.Effect.EffectObject.EffectObject
+
+- 描述
+
+ 设置序列帧是否透视,默认为否
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | deepTest | bool | False表示透视,则被物体/方块阻挡时仍然能看到序列帧 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 设置为透视
+self.SetDeepTest(False)
+```
+
+
+
+## SetFaceCamera
+
+客户端
+
+method in Preset.Model.Effect.EffectObject.EffectObject
+
+- 描述
+
+ 设置序列帧是否始终朝向摄像机,默认为是
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | face | bool | True表示朝摄像机 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+# 设置为不始终朝摄像机
+self.SetFaceCamera(False)
+```
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/特效预设EffectPreset.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/特效预设EffectPreset.md
new file mode 100644
index 0000000..5599214
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/特效预设EffectPreset.md
@@ -0,0 +1,105 @@
+---
+sidebarDepth: 1
+---
+# 特效预设EffectPreset
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+PresetBase <|-- EffectPreset
+link PresetBase "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E9%A2%84%E8%AE%BE%E5%9F%BA%E7%B1%BBPresetBase.html"
+EffectObject <|-- EffectPreset
+link EffectObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E7%89%B9%E6%95%88%E5%AF%B9%E8%B1%A1EffectObject.html"
+SdkInterface <|-- PresetBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+TransformObject <|-- PresetBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+EffectPreset: 特效预设
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+PresetBase: 预设基类
+PresetBase: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+EffectObject: 特效对象
+EffectObject: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+```
+
+- 描述
+
+ EffectPreset(特效预设)是一类绑定特效资源的预设。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | resource | str | 特效json的相对路径,不含后缀.json |
+ | effectType | str | 特效类型,frame/particle |
+ | effectId | int | 特效ID |
+ | auto | bool | 是否自动播放 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetResource](#getresource) | 客户端 | 获取绑定的json资源 |
+| [SetResource](#setresource) | 客户端 | 设置绑定的json资源 |
+
+
+
+
+## GetResource
+
+客户端
+
+method in Preset.Model.Effect.EffectPreset.EffectPreset
+
+- 描述
+
+ 获取绑定的json资源
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | json资源相对路径,不含.json后缀 |
+
+
+
+## SetResource
+
+客户端
+
+method in Preset.Model.Effect.EffectPreset.EffectPreset
+
+- 描述
+
+ 设置绑定的json资源
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | resource | str | json资源相对路径,不含.json后缀 |
+
+- 返回值
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/玩家对象PlayerObject.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/玩家对象PlayerObject.md
new file mode 100644
index 0000000..9efa527
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/玩家对象PlayerObject.md
@@ -0,0 +1,1199 @@
+---
+sidebarDepth: 1
+---
+# 玩家对象PlayerObject
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+EntityObject <|-- PlayerObject
+link EntityObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E5%AE%9E%E4%BD%93%E5%AF%B9%E8%B1%A1EntityObject.html"
+SdkInterface <|-- EntityObject
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+PlayerObject: 玩家对象
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+EntityObject: 实体对象
+EntityObject: (点击跳转)
+```
+
+- 描述
+
+ PlayerObject(玩家对象)是对玩家对象封装的基类,它为实体提供了面向对象的使用方式。
+
+- 成员变量
+
+ 无
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetPlayerId](#getplayerid) | 客户端/服务端 | 获取玩家预设的玩家ID |
+| [IsLocalPlayer](#islocalplayer) | 客户端/服务端 | 判断当前玩家对象是否本地玩家 |
+| [IsSneaking](#issneaking) | 服务端 | 是否潜行 |
+| [GetHunger](#gethunger) | 服务端 | 获取玩家饥饿度,展示在UI饥饿度进度条上,初始值为20,即每一个鸡腿代表2个饥饿度。 **饱和度(saturation)** :玩家当前饱和度,初始值为5,最大值始终为玩家当前饥饿度(hunger),该值直接影响玩家**饥饿度(hunger)**。
1)增加方法:吃食物。
2)减少方法:每触发一次**消耗事件**,该值减少1,如果该值不大于0,直接把玩家 **饥饿度(hunger)** 减少1。 |
+| [SetHunger](#sethunger) | 服务端 | 设置玩家饥饿度。 |
+| [SetStepHeight](#setstepheight) | 服务端 | 设置玩家前进非跳跃状态下能上的最大台阶高度, 默认值为0.5625,1的话表示能上一个台阶 |
+| [GetStepHeight](#getstepheight) | 服务端 | 返回玩家前进非跳跃状态下能上的最大台阶高度 |
+| [ResetStepHeight](#resetstepheight) | 服务端 | 恢复引擎默认玩家前进非跳跃状态下能上的最大台阶高度 |
+| [GetExp](#getexp) | 服务端 | 获取玩家当前等级下的经验值 |
+| [AddExp](#addexp) | 服务端 | 增加玩家经验值 |
+| [GetTotalExp](#gettotalexp) | 服务端 | 获取玩家的总经验值 |
+| [SetTotalExp](#settotalexp) | 服务端 | 设置玩家的总经验值 |
+| [IsFlying](#isflying) | 服务端 | 获取玩家是否在飞行 |
+| [ChangeFlyState](#changeflystate) | 服务端 | 给予/取消飞行能力,并且进入飞行/非飞行状态 |
+| [GetLevel](#getlevel) | 服务端 | 获取玩家等级 |
+| [AddLevel](#addlevel) | 服务端 | 修改玩家等级 |
+| [SetPrefixAndSuffixName](#setprefixandsuffixname) | 服务端 | 设置玩家前缀和后缀名字 |
+| [EnableKeepInventory](#enablekeepinventory) | 服务端 | 设置玩家死亡不掉落物品 |
+| [AddAnimation](#addanimation) | 客户端 | 增加玩家渲染动画 |
+| [SetHealthLevel](#sethealthlevel) | 服务端 | 设置玩家健康临界值,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效.原版默认值为18 |
+| [SetStarveLevel](#setstarvelevel) | 服务端 | 设置玩家饥饿临界值,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效。原版默认值为1 |
+| [SetNaturalStarve](#setnaturalstarve) | 服务端 | 设置是否开启玩家饥饿掉血,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效.原版默认开启 |
+| [SetStarveTick](#setstarvetick) | 服务端 | 设置玩家饥饿掉血速度,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效 |
+| [SetNaturalRegen](#setnaturalregen) | 服务端 | 设置是否开启玩家自然恢复 |
+| [SetHealthTick](#sethealthtick) | 服务端 | 设置玩家自然恢复速度 |
+| [SetMaxExhaustionValue](#setmaxexhaustionvalue) | 服务端 | 设置玩家最大消耗度(maxExhaustion) |
+| [SetPickUpArea](#setpickuparea) | 服务端 | 设置玩家的拾取物品范围 |
+| [SetJumpable](#setjumpable) | 服务端 | 设置玩家是否可跳跃 |
+| [SetMovable](#setmovable) | 服务端 | 设置玩家是否可移动 |
+| [AddAnimationController](#addanimationcontroller) | 客户端 | 增加玩家渲染动画控制器 |
+| [AddAnimationIntoState](#addanimationintostate) | 客户端 | 在玩家的动画控制器中的状态添加动画 |
+| [AddGeometry](#addgeometry) | 客户端 | 增加玩家渲染几何体 |
+| [AddParticleEffect](#addparticleeffect) | 客户端 | 增加玩家特效资源 |
+| [AddRenderController](#addrendercontroller) | 客户端 | 增加玩家渲染控制器 |
+| [AddRenderMaterial](#addrendermaterial) | 客户端 | 增加玩家渲染需要的材质 |
+| [AddSoundEffect](#addsoundeffect) | 客户端 | 增加玩家音效资源 |
+| [AddTexture](#addtexture) | 客户端 | 增加玩家渲染贴图 |
+| [SetSkin](#setskin) | 客户端 | 更换原版自定义皮肤 |
+
+
+
+
+## GetPlayerId
+
+客户端/服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 获取玩家预设的玩家ID
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | str | 玩家ID |
+
+
+
+## IsLocalPlayer
+
+客户端/服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 判断当前玩家对象是否本地玩家
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是本地玩家则返回True,否则返回False,服务端也返回False |
+
+
+
+## IsSneaking
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 是否潜行
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否潜行 |
+
+- 示例
+
+```python
+self.IsSneaking()
+```
+
+
+
+## GetHunger
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 获取玩家饥饿度,展示在UI饥饿度进度条上,初始值为20,即每一个鸡腿代表2个饥饿度。 **饱和度(saturation)** :玩家当前饱和度,初始值为5,最大值始终为玩家当前饥饿度(hunger),该值直接影响玩家**饥饿度(hunger)**。
1)增加方法:吃食物。
2)减少方法:每触发一次**消耗事件**,该值减少1,如果该值不大于0,直接把玩家 **饥饿度(hunger)** 减少1。
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 玩家饥饿度 |
+
+- 示例
+
+```python
+self.GetPlayerHunger(playerId)
+```
+
+
+
+## SetHunger
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家饥饿度。
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | value | float | 饥饿度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetPlayerHunger(playerId, 10)
+```
+
+
+
+## SetStepHeight
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家前进非跳跃状态下能上的最大台阶高度, 默认值为0.5625,1的话表示能上一个台阶
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | stepHeight | float | 最大高度,需要大于0 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 备注
+ - 为了避免因浮点数误差导致错误,设置的时候通常会增加1/16个方块大小,即0.0625。所以此处我们设置2.0625。游戏中默认值是0.5625,即半格高度。
+ - 只对玩家生效,无法修改其它实体该属性
+ - 修改后不影响跳跃逻辑及跳跃高度,并不会因此而跳到更高,因此在某些特定情况下,你可以走上方块但跳不上去。
+
+- 示例
+
+```python
+#如果前面放置有两格高的方块,玩家按前进能直接上去,无须跳跃
+self.SetPlayerStepHeight(playerId, 2.0625)
+```
+
+
+
+## GetStepHeight
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 返回玩家前进非跳跃状态下能上的最大台阶高度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 台阶高度 |
+
+
+
+## ResetStepHeight
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 恢复引擎默认玩家前进非跳跃状态下能上的最大台阶高度
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+
+
+## GetExp
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 获取玩家当前等级下的经验值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isPercent | bool | 是否为百分比 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | float | 玩家经验值 |
+
+- 备注
+ - 如果设置返回百分比为False,则返回玩家当前等级下经验的绝对值(非当前玩家总经验值)。
+
+- 示例
+
+```python
+print(self.GetExp(False))
+```
+
+
+
+## AddExp
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家经验值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | exp | int | 玩家经验值,可设置负数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 如果设置的exp值为负数,且超过当前等级已有的经验值,调用接口后,该玩家等级不会下降但是经验值会置为最小值
+
+- 示例
+
+```python
+self.AddExp(25)
+```
+
+
+
+## GetTotalExp
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 获取玩家的总经验值
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 总经验值,正整数。获取失败的情况下返回-1。 |
+
+- 示例
+
+```python
+print(self.GetTotalExp())
+```
+
+
+
+## SetTotalExp
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家的总经验值
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | exp | int | 总经验值,正整数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 备注
+ - 根据总经验值会重新计算等级,该接口可引起等级的变化
+ - 内部运算采用浮点数,数值较大时会出现误差
+
+- 示例
+
+```python
+self.SetTotalExp(25)
+```
+
+
+
+## IsFlying
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 获取玩家是否在飞行
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:是 False:否 |
+
+
+
+## ChangeFlyState
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 给予/取消飞行能力,并且进入飞行/非飞行状态
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isFly | bool | 飞行状态,True:飞行模式,False:正常行走模式 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | True:是 False:否 |
+
+- 示例
+
+```python
+self.ChangeFlyState(True)
+```
+
+
+
+## GetLevel
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 获取玩家等级
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 玩家等级 |
+
+
+
+## AddLevel
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 修改玩家等级
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | level | int | 玩家等级,可设置负数 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.AddLevel(2)
+```
+
+
+
+## SetPrefixAndSuffixName
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家前缀和后缀名字
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | prefix | str | 前缀内容 |
+ | prefixColor | str | 前缀内容颜色描述,如 'RED' |
+ | suffix | str | 后缀内容 |
+ | suffixColor | str | 后缀内容颜色描述,如 'RED' |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 设置是否成功 |
+
+- 示例
+
+```python
+self.SetPrefixAndSuffixName(playerId, "红队", 'RED', '肉盾', 'RED')
+```
+
+
+
+## EnableKeepInventory
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家死亡不掉落物品
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | enable | bool | 是否开启“保留物品栏” |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.EnableKeepInventory(True)
+```
+
+
+
+## AddAnimation
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家渲染动画
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | animationKey | str | 动画键 |
+ | animationName | str | 动画名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.AddAnimation("move.arms", "animation.player.move.arms_custom")
+```
+
+
+
+## SetHealthLevel
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家健康临界值,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效.原版默认值为18
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | healthLevel | int | 健康临界值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetHealthLevel(16)
+```
+
+
+
+## SetStarveLevel
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家饥饿临界值,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效。原版默认值为1
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | starveLevel | int | 饥饿临界值 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetStarveLevel(2)# 饥饿值小于等于2就会进入饥饿掉血状态,默认每隔4秒掉1点血量
+```
+
+
+
+## SetNaturalStarve
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置是否开启玩家饥饿掉血,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效.原版默认开启
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | value | bool | True开启,False关闭 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetNaturalStarve(False)# # 关闭饥饿掉血,即使饥饿值小于饥饿临界值时也不会扣除血量
+```
+
+
+
+## SetStarveTick
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家饥饿掉血速度,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | starveTick | int | 饥饿掉血速度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetStarveTick(40) # 饥饿掉血状态下每隔2(40/20)秒扣除1点血量
+```
+
+
+
+## SetNaturalRegen
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置是否开启玩家自然恢复
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | value | bool | True开启,False关闭 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetNaturalRegen(False) # 关闭自然恢复,即使饥饿值大于健康临界值时也不会恢复血量
+```
+
+
+
+## SetHealthTick
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家自然恢复速度
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | healthTick | int | 自然恢复速度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetHealthTick(40) # 自然恢复状态下每隔2(40/20)秒恢复1点血量
+```
+
+
+
+## SetMaxExhaustionValue
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家最大消耗度(maxExhaustion)
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | value | float | 最大消耗度(maxExhaustion) |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetMaxExhaustionValue(10.0)
+```
+
+
+
+## SetPickUpArea
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家的拾取物品范围
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | area | tuple(float,float,float) | 拾取物品范围,传入(0, 0, 0)时视作取消设置 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetPickUpArea((5, 0, 3))
+```
+
+
+
+## SetJumpable
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家是否可跳跃
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isJumpable | bool | 是否可跳跃,True允许跳跃,False禁止跳跃 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetJumpable(False)
+```
+
+
+
+## SetMovable
+
+服务端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 设置玩家是否可移动
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | isMovable | bool | 是否可移动,True允许移动,False禁止移动 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetMovable(False)
+```
+
+
+
+## AddAnimationController
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家渲染动画控制器
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | animationControllerKey | str | 动画控制器键 |
+ | animationControllerName | str | 动画控制器名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.AddAnimationController("root", "controller.animation.player.root_custom")
+```
+
+
+
+## AddAnimationIntoState
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 在玩家的动画控制器中的状态添加动画
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | animationControllerName | str | 动画控制器名称 |
+ | stateName | str | 动画控制器名称 |
+ | animationName | str | 添加的动画名称或动画控制器名称 |
+ | condition | str | 动画控制表达式 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddAnimationIntoState("root", "first_person", "first_person_attack_controller_new", "query.mod.index > 0")
+```
+
+
+
+## AddGeometry
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家渲染几何体
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | geometryKey | str | 渲染几何体键 |
+ | geometryName | str | 渲染几何体名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddGeometry("default", "geometry.player.custom")
+```
+
+
+
+## AddParticleEffect
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家特效资源
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | effectKey | str | 特效资源Key |
+ | effectName | str | 特效资源名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddParticleEffect("nectar_dripping", "minecraft:nectar_drip_particle")
+```
+
+
+
+## AddRenderController
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家渲染控制器
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | renderControllerName | str | 渲染控制器名称 |
+ | condition | str | 渲染控制器条件 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddRenderController('custom_render_controller_name', 'query.mod.condition')
+```
+
+
+
+## AddRenderMaterial
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家渲染需要的材质
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | materialKey | str | 材质key |
+ | materialName | str | 材质名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddRenderMaterial('custom_material_key', 'custom_material_name')
+```
+
+
+
+## AddSoundEffect
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家音效资源
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | soundKey | str | 音效资源Key |
+ | soundName | str | 音效资源名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 示例
+
+```python
+self.AddSoundEffect("sound_thunder", "ambient.weather.thunder")
+```
+
+
+
+## AddTexture
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 增加玩家渲染贴图
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | geometryKey | str | 贴图键 |
+ | geometryName | str | 贴图路径 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否成功 |
+
+- 备注
+ - 调用该接口后需要调用RebuildPlayerRender才会生效
+
+- 示例
+
+```python
+self.AddTexture("default", "textures/misc/missing_texture")
+```
+
+
+
+## SetSkin
+
+客户端
+
+method in Preset.Model.Player.PlayerObject.PlayerObject
+
+- 描述
+
+ 更换原版自定义皮肤
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | skin | str | 贴图路径,以textures\models为当前路径的相对路径 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否设置成功 |
+
+- 示例
+
+```python
+self.SetSkin("kagura")
+```
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/玩家预设PlayerPreset.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/玩家预设PlayerPreset.md
new file mode 100644
index 0000000..26c36a6
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/玩家预设PlayerPreset.md
@@ -0,0 +1,56 @@
+---
+sidebarDepth: 1
+---
+# 玩家预设PlayerPreset
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+EntityPreset <|-- PlayerPreset
+link EntityPreset "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E5%AE%9E%E4%BD%93%E9%A2%84%E8%AE%BEEntityPreset.html"
+PlayerObject <|-- PlayerPreset
+link PlayerObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E7%8E%A9%E5%AE%B6%E5%AF%B9%E8%B1%A1PlayerObject.html"
+PresetBase <|-- EntityPreset
+link PresetBase "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E9%A2%84%E8%AE%BE%E5%9F%BA%E7%B1%BBPresetBase.html"
+EntityObject <|-- EntityPreset
+link EntityObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E5%AE%9E%E4%BD%93%E5%AF%B9%E8%B1%A1EntityObject.html"
+TransformObject <|-- PresetBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+SdkInterface <|-- PresetBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+PlayerPreset: 玩家预设
+PlayerObject: 玩家对象
+PlayerObject: (点击跳转)
+EntityPreset: 实体预设
+EntityPreset: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+EntityObject: 实体对象
+EntityObject: (点击跳转)
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+PresetBase: 预设基类
+PresetBase: (点击跳转)
+```
+
+- 描述
+
+ PlayerPreset(玩家预设)是一类特殊的实体预设,玩家预设与玩家实体进行绑定。每个AddOn(编辑器作品)只允许创建一个玩家预设。如果玩家同时启用了多个使用了玩家预设的AddOn,只会加载第一个玩家预设。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 玩家ID |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/界面预设UIPreset.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/界面预设UIPreset.md
new file mode 100644
index 0000000..3dd8d05
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/界面预设UIPreset.md
@@ -0,0 +1,177 @@
+---
+sidebarDepth: 1
+---
+# 界面预设UIPreset
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+PresetBase <|-- UIPreset
+link PresetBase "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%A2%84%E8%AE%BE/%E9%A2%84%E8%AE%BE%E5%9F%BA%E7%B1%BBPresetBase.html"
+TransformObject <|-- PresetBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+SdkInterface <|-- PresetBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+UIPreset: 界面预设
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+PresetBase: 预设基类
+PresetBase: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+```
+
+- 描述
+
+ UIPreset(界面预设)是一类绑定界面资源的预设。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | uiNodeScreen | str | UI画布路径,为"UI文件名.UI画布名"的字符串形式 |
+ | uiNodeModulePath | str | 继承自ScreenNode的UI逻辑文件模块路径 |
+ | uiNodeModule | str | 继承自ScreenNode的UI逻辑文件类名 |
+ | uiName | str | UI名称,需保证在单个addon中唯一 |
+ | autoCreate | bool | 在界面预设创建完成后是否自动创建UI |
+ | isHud | bool | 该界面是否屏蔽游戏操作 |
+ | createUIMethod | str | 创建界面接口 |
+ | isBindParent | bool | 是否绑定父预设,仅当父预设为实体预设时生效 |
+ | bindParentOffset | tuple | 当绑定父预设时生效,修改与绑定实体之间的偏移量 |
+ | bindParentAutoScale | bool | 当绑定父预设时生效,设置已绑定实体的UI是否根据绑定实体与本地玩家间的距离动态缩放 |
+ | showInEditor | bool | 是否在预设编辑器中创建UI |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [SetUiActive](#setuiactive) | 客户端 | 设置UI激活 |
+| [GetUiActive](#getuiactive) | 客户端 | 获取当前UI是否激活 |
+| [SetUiVisible](#setuivisible) | 客户端 | 设置UI显隐 |
+| [GetUiVisible](#getuivisible) | 客户端 | 获取当前UI是否显示 |
+| [GetScreenNode](#getscreennode) | 客户端 | 获取当前ScreenNode实例 |
+
+
+
+
+## SetUiActive
+
+客户端
+
+method in Preset.Model.UI.UIPreset.UIPreset
+
+- 描述
+
+ 设置UI激活
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | active | bool | 是否激活 |
+
+- 返回值
+
+ 无
+
+
+
+## GetUiActive
+
+客户端
+
+method in Preset.Model.UI.UIPreset.UIPreset
+
+- 描述
+
+ 获取当前UI是否激活
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | UI是否激活 |
+
+
+
+## SetUiVisible
+
+客户端
+
+method in Preset.Model.UI.UIPreset.UIPreset
+
+- 描述
+
+ 设置UI显隐
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | visible | bool | 是否显示 |
+
+- 返回值
+
+ 无
+
+
+
+## GetUiVisible
+
+客户端
+
+method in Preset.Model.UI.UIPreset.UIPreset
+
+- 描述
+
+ 获取当前UI是否显示
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | UI是否显示 |
+
+
+
+## GetScreenNode
+
+客户端
+
+method in Preset.Model.UI.UIPreset.UIPreset
+
+- 描述
+
+ 获取当前ScreenNode实例
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | ScreenNode | 当前ScreenNode实例 |
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/预设基类PresetBase.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/预设基类PresetBase.md
new file mode 100644
index 0000000..4b1f16a
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/预设基类PresetBase.md
@@ -0,0 +1,598 @@
+---
+sidebarDepth: 1
+---
+# 预设基类PresetBase
+
+
+
+## 概述
+
+- 继承关系
+
+```mermaid
+classDiagram
+SdkInterface <|-- PresetBase
+link SdkInterface "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/SDK%E6%8E%A5%E5%8F%A3%E5%B0%81%E8%A3%85SdkInterface.html"
+TransformObject <|-- PresetBase
+link TransformObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E5%8F%98%E6%8D%A2%E5%AF%B9%E8%B1%A1TransformObject.html"
+GameObject <|-- TransformObject
+link GameObject "../../../../mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/%E9%A2%84%E8%AE%BE%E5%AF%B9%E8%B1%A1/%E9%80%9A%E7%94%A8/%E6%B8%B8%E6%88%8F%E5%AF%B9%E8%B1%A1GameObject.html"
+PresetBase: 预设基类
+SdkInterface: SDK接口封装
+SdkInterface: (点击跳转)
+TransformObject: 变换对象
+TransformObject: (点击跳转)
+GameObject: 游戏对象
+GameObject: (点击跳转)
+```
+
+- 描述
+
+ PresetBase(预设基类)是所有预设的基类。预设是一类可以被直接放置在场景中的TransformObject(变换对象),并且预设下可以挂接其他TransformObject,可以通过这种方式对游戏逻辑进行简单的封装。在编辑器中放置预设时,会生成预设的虚拟实例,在游戏中生成预设,会生成实例。
+
+- 成员变量
+
+ | 变量名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | presetId | str | 预设文件ID |
+ | preLoad | bool | 是否预加载 |
+ | forceLoad | bool | 是否常加载 |
+ | childPresetInstances | list(PresetBase) | 子预设列表 |
+ | childPartInstances | list(PartBase) | 子零件列表 |
+ | dimension | int | 预设所在维度 |
+ | isAlive | bool | 预设是否存活 |
+
+
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [GetIsAlive](#getisalive) | 客户端/服务端 | 获取预设的存活状态 |
+| [GetGameObjectById](#getgameobjectbyid) | 客户端/服务端 | 获取当前预设节点底下指定ID的游戏对象 |
+| [GetGameObjectByEntityId](#getgameobjectbyentityid) | 客户端/服务端 | 获取当前预设节点底下指定实体ID的游戏对象 |
+| [GetChildPresets](#getchildpresets) | 客户端/服务端 | 获取当前预设的所有子预设 |
+| [GetChildPresetsByName](#getchildpresetsbyname) | 客户端/服务端 | 获取指定名称的所有子预设 |
+| [GetChildPresetsByType](#getchildpresetsbytype) | 客户端/服务端 | 获取指定类型的所有子预设 |
+| [GetChildObjectByTypeName](#getchildobjectbytypename) | 客户端/服务端 | 获取指定实体ID的游戏对象 |
+| [GetChildObjectsByTypeName](#getchildobjectsbytypename) | 客户端/服务端 | 获取指定实体ID的游戏对象 |
+| [SetBlockProtect](#setblockprotect) | 服务端 | 设置预设内的所有素材区域的方块保护状态 |
+| [Replicate](#replicate) | 客户端/服务端 | 在指定位置坐标下复制当前预设 |
+| [RemoveChild](#removechild) | 客户端/服务端 | 移除指定的子节点对象 |
+| [AddBoxData](#addboxdata) | 客户端/服务端 | 添加指定的素材数据 |
+| [RemoveBoxData](#removeboxdata) | 客户端/服务端 | 移除指定的素材数据 |
+| [AddPreset](#addpreset) | 客户端/服务端 | 添加指定预设作为子预设 |
+| [RemovePreset](#removepreset) | 客户端/服务端 | 移除指定的子预设 |
+| [AddPart](#addpart) | 客户端/服务端 | 添加指定零件作为子零件 |
+| [RemovePart](#removepart) | 客户端/服务端 | 移除指定的子零件 |
+| [GetPartsByName](#getpartsbyname) | 客户端/服务端 | 获取指定名称的所有子零件 |
+| [GetPartByName](#getpartbyname) | 客户端/服务端 | 获取指定名称的第一个子零件 |
+| [GetPartsByType](#getpartsbytype) | 客户端/服务端 | 获取指定类型的所有子零件 |
+| [GetPartByType](#getpartbytype) | 客户端/服务端 | 获取指定类型的第一个子零件 |
+| [RemovePartsByType](#removepartsbytype) | 客户端/服务端 | 移除指定类型的所有子零件 |
+
+
+
+
+## GetIsAlive
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取预设的存活状态
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | bool | 是否存活 |
+
+
+
+## GetGameObjectById
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取当前预设节点底下指定ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | id | int | 对象ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | GameObject | 成功返回游戏对象,失败返回None |
+
+
+
+## GetGameObjectByEntityId
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取当前预设节点底下指定实体ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 实体ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | GameObject | 成功返回游戏对象,失败返回None |
+
+
+
+## GetChildPresets
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取当前预设的所有子预设
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PresetBase) | 子预设列表 |
+
+
+
+## GetChildPresetsByName
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定名称的所有子预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 名称 |
+ | recursive | bool | 是否递归查找,默认为是 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PresetBase) | 子预设列表 |
+
+
+
+## GetChildPresetsByType
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定类型的所有子预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | classType | str | 类型 |
+ | recursive | bool | 是否递归查找,默认为是 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PresetBase) | 子预设列表 |
+
+
+
+## GetChildObjectByTypeName
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定实体ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | classType | str | 指定类型 |
+ | name | str | 指定名称,可缺省 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TransformObject | 成功返回游戏对象,失败返回None |
+
+- 示例
+
+```python
+self.GetChildObjectByTypeName("PresetDebugPart")
+```
+
+
+
+## GetChildObjectsByTypeName
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定实体ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | classType | str | 指定类型 |
+ | name | str | 指定名称,可缺省 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TransformObject | 成功返回游戏对象,失败返回None |
+
+- 示例
+
+```python
+self.GetChildObjectsByTypeName("PresetDebugPart")
+```
+
+
+
+## SetBlockProtect
+
+服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 设置预设内的所有素材区域的方块保护状态
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | protect | bool | 保护/取消保护 |
+
+- 返回值
+
+ 无
+
+
+
+## Replicate
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 在指定位置坐标下复制当前预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 位置坐标 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PresetBase | 返回复制的预设,失败返回None |
+
+
+
+## RemoveChild
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 移除指定的子节点对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | child | TransformObject | 待移除的子对象 |
+
+- 返回值
+
+ 无
+
+
+
+## AddBoxData
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 添加指定的素材数据
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | boxData | BoxData | 待添加的素材数据 |
+
+- 返回值
+
+ 无
+
+
+
+## RemoveBoxData
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 移除指定的素材数据
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | boxData | BoxData | 待移除的素材数据 |
+
+- 返回值
+
+ 无
+
+
+
+## AddPreset
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 添加指定预设作为子预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | preset | PresetBase | 待添加的预设 |
+
+- 返回值
+
+ 无
+
+
+
+## RemovePreset
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 移除指定的子预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | preset | PresetBase | 待移除的子预设 |
+
+- 返回值
+
+ 无
+
+
+
+## AddPart
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 添加指定零件作为子零件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | part | PartBase | 待添加的零件 |
+
+- 返回值
+
+ 无
+
+
+
+## RemovePart
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 移除指定的子零件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | part | PartBase | 待移除的零件 |
+
+- 返回值
+
+ 无
+
+
+
+## GetPartsByName
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定名称的所有子零件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 零件名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PartBase) | 零件列表 |
+
+
+
+## GetPartByName
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定名称的第一个子零件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 零件名称 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PartBase | 零件/None |
+
+
+
+## GetPartsByType
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定类型的所有子零件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | type | str | 零件类名 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PartBase) | 零件列表 |
+
+
+
+## GetPartByType
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 获取指定类型的第一个子零件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | type | str | 零件类名 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PartBase | 零件/None |
+
+
+
+## RemovePartsByType
+
+客户端/服务端
+
+method in Preset.Model.PresetBase.PresetBase
+
+- 描述
+
+ 移除指定类型的所有子零件
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | type | str | 零件类名 |
+
+- 返回值
+
+ 无
+
+
+
diff --git a/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设管理/PresetApi.md b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设管理/PresetApi.md
new file mode 100644
index 0000000..400e199
--- /dev/null
+++ b/mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设管理/PresetApi.md
@@ -0,0 +1,581 @@
+---
+sidebarDepth: 1
+---
+# PresetApi
+
+## 索引
+
+| 接口 | | 描述 |
+| --- | --- | --- |
+| [CreateTransform](#createtransform) | 客户端/服务端 | 构造变换对象 |
+| [GetAllPresets](#getallpresets) | 客户端/服务端 | 获取所有预设 |
+| [GetBlockPresetByPosition](#getblockpresetbyposition) | 客户端/服务端 | 获取指定位置的第一个方块预设 |
+| [GetGameObjectByEntityId](#getgameobjectbyentityid) | 客户端/服务端 | 获取指定实体ID的游戏对象 |
+| [GetGameObjectById](#getgameobjectbyid) | 客户端/服务端 | 获取指定对象ID的游戏对象 |
+| [GetGameObjectByTypeName](#getgameobjectbytypename) | 客户端/服务端 | 获取指定类型和名称的第一个游戏对象 |
+| [GetGameObjectsByTypeName](#getgameobjectsbytypename) | 客户端/服务端 | 获取指定类型和名称的所有游戏对象 |
+| [GetPartApi](#getpartapi) | 客户端/服务端 | 获取零件API |
+| [GetPresetByName](#getpresetbyname) | 客户端/服务端 | 获取指定名称的第一个预设 |
+| [GetPresetByType](#getpresetbytype) | 客户端/服务端 | 获取指定维度的指定类型的第一个预设 |
+| [GetPresetSize](#getpresetsize) | 客户端/服务端 | 根据预设ID获取预设的包围盒大小 |
+| [GetPresetsByName](#getpresetsbyname) | 客户端/服务端 | 获取指定名称的所有预设 |
+| [GetPresetsByType](#getpresetsbytype) | 客户端/服务端 | 获取指定维度的指定类型的所有预设 |
+| [GetTickCount](#gettickcount) | 客户端/服务端 | 获取当前帧数 |
+| [LoadPartByModulePath](#loadpartbymodulepath) | 客户端/服务端 | 通过模块相对路径加载零件并实例化 |
+| [LoadPartByType](#loadpartbytype) | 客户端/服务端 | 通过类名加载零件并实例化 |
+| [SpawnPreset](#spawnpreset) | 服务端 | 在指定维度的指定坐标变换处生成指定预设 |
+
+
+
+
+## CreateTransform
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 构造变换对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | pos | tuple(float,float,float) | 位置变换 |
+ | rotation | tuple(float,float,float) | 旋转变换 |
+ | scale | tuple(float,float,float) | 缩放变换 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | Transform | 生成的变换对象 |
+
+- 示例
+
+```python
+# 创建Transform对象
+import Preset.Controller.PresetApi as presetApi
+transform = presetApi.CreateTransform((0, 0, 0), (0, 0, 0), (1, 1, 1))
+```
+
+
+
+## GetAllPresets
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取所有预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PresetBase) | 预设列表 |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+presets = presetApi.GetAllPresets()
+```
+
+
+
+## GetBlockPresetByPosition
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定位置的第一个方块预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | x | int | X轴坐标 |
+ | y | int | Y轴坐标 |
+ | z | int | Z轴坐标 |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | BlockPreset | 指定位置的第一个方块预设,没有返回None |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetBlockPresetByPosition(0, 0, 0)
+```
+
+
+
+## GetGameObjectByEntityId
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定实体ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | entityId | str | 指定的实体ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TransformObject | 成功返回游戏对象,失败返回None |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetGameObjectByEntityId(0)
+```
+
+
+
+## GetGameObjectById
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定对象ID的游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | id | int | 指定的对象ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TransformObject | 成功返回游戏对象,失败返回None |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetGameObjectById(0)
+```
+
+
+
+## GetGameObjectByTypeName
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定类型和名称的第一个游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | classType | str | 指定类型 (包括预设,零件,素材数据的类型) |
+ | name | str | 指定名称,可缺省 |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | TransformObject | 成功返回游戏对象,失败返回None |
+
+- 示例
+
+```python
+# 找到第一个实体预设
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetGameObjectByTypeName("EntityPreset")
+```
+
+
+
+## GetGameObjectsByTypeName
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定类型和名称的所有游戏对象
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | classType | str | 指定类型 (包括预设,零件,素材数据的类型) |
+ | name | str | 指定名称,可缺省 |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(TransformObject) | 变换对象列表 |
+
+- 示例
+
+```python
+# 找到第一个实体预设
+import Preset.Controller.PresetApi as presetApi
+objects = presetApi.GetGameObjectsByTypeName("EntityPreset")
+```
+
+
+
+## GetPartApi
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取零件API
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PartBase | 空零件,用于调用零件API |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+partApi = presetApi.GetPartApi()
+partApi.LogDebug("debug")
+```
+
+
+
+## GetPresetByName
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定名称的第一个预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 指定名称 |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PresetBase | 预设/None |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetPresetByName("name")
+```
+
+
+
+## GetPresetByType
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定维度的指定类型的第一个预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | classType | str | 指定类型 |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PresetBase | 预设/None |
+
+- 示例
+
+```python
+# 获取第一个实体预设
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetPresetByType("EntityPreset")
+```
+
+
+
+## GetPresetSize
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 根据预设ID获取预设的包围盒大小
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | presetId | str | 预设ID |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | tuple(float, | float, float) 预设的包围盒大小 |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+size = presetApi.GetPresetSize(presetId)
+```
+
+
+
+## GetPresetsByName
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定名称的所有预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | name | str | 指定名称 |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PresetBase) | 预设列表 |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetPresetsByName("name")
+```
+
+
+
+## GetPresetsByType
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取指定维度的指定类型的所有预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | classType | str | 指定类型 |
+ | dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | list(PresetBase) | 预设列表 |
+
+- 示例
+
+```python
+# 获取所有的空预设
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.GetPresetsByType("EmptyPreset")
+```
+
+
+
+## GetTickCount
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 获取当前帧数
+
+- 参数
+
+ 无
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | int | 当前帧数 |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+cnt = presetApi.GetTickCount()
+```
+
+
+
+## LoadPartByModulePath
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 通过模块相对路径加载零件并实例化
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | modulePath | str | 零件模块相对路径 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PartBase | 实例化后的零件,失败返回None |
+
+- 示例
+
+```python
+# 加载内置的世界属性零件
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.LoadPartByModulePath("Preset.Parts.WorldPart")
+# 加载自定义零件,需要把Script_xxxxxx,YourPartDir,YourPart替换为你的自定义零件
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.LoadPartByModulePath("Script_xxxxxx.Parts.YourPartDir.YourPart")
+```
+
+
+
+## LoadPartByType
+
+客户端/服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 通过类名加载零件并实例化
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | partType | str | 零件类名 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PartBase | 实例化后的零件,失败返回None |
+
+- 示例
+
+```python
+import Preset.Controller.PresetApi as presetApi
+obj = presetApi.LoadPartByType("WorldPart")
+```
+
+
+
+## SpawnPreset
+
+服务端
+
+method in Preset.Controller.PresetApi
+
+- 描述
+
+ 在指定维度的指定坐标变换处生成指定预设
+
+- 参数
+
+ | 参数名 | 数据类型
| 说明 |
+ | :--- | :--- | :--- |
+ | presetId | str | 指定预设的文件ID,对应预设对象的属性presetId |
+ | transform | Transform | 指定的坐标变换(预设对象->通用->坐标变换Transform) |
+ | dimension | int | 指定的维度ID |
+ | virtual | bool | 素材是否已实例化到地图,True表示未实例化,会在首次加载该预设时实例化素材到地图存档,False则会忽略所有素材 |
+
+- 返回值
+
+ | 数据类型
| 说明 |
+ | :--- | :--- |
+ | PresetBase | 返回生成的预设,失败返回None |
+
+- 示例
+
+```python
+# 内置空预设,特效预设的文件ID分别为EmptyPreset,EffectPreset
+import Preset.Controller.PresetApi as presetApi
+from Preset.Model.Transform import Transform
+preset = presetApi.SpawnPreset("EmptyPreset", Transform(), 0)
+```
+
+
+
diff --git a/mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/11-自定义容器.md b/mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/11-自定义容器.md
new file mode 100644
index 0000000..972c143
--- /dev/null
+++ b/mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/11-自定义容器.md
@@ -0,0 +1,309 @@
+---
+hard: 入门
+time: 分钟
+---
+
+# 自定义容器
+
+## 概述
+
+该功能类似自定义箱子,使用原生c++驱动背包界面,实现自定义容器界面的方块。
+包含长按分堆、双击合堆、右键拖放等功能,方块破坏后内部物品会掉落,方便开发者制作自定义熔炉等界面,而无需考虑复杂的UI逻辑,数据同步逻辑等。
+
+## base_block新增netease_container
+
+base_block指定现在可以指定为netease_container
+
+## netease:block_container
+
+| 键 | 类型 | 默认值 | 解释 |
+| ----- | ---- | -------- | -------------- |
+| custom_description | str | 容器名 | 容器ui打开时的title(复用原版ui时生效)|
+| screen_name | str | ui名 | 交互方块时打开的ui,形如namespace.screenName |
+| container_size | int | 容器容量 | 方块容器能够存放的物品槽位数量,取值范围1-108,需与ui槽位匹配。若ui槽位大于配置容量,超过配置的部分无法放入物品;若ui槽位小于配置容量,按shift可放入,但无法在ui中显示 |
+
+### 注意事项
+
+- netease_container的size限定为1-108,不在该范围会导致注册失败,需在组件中配置
+
+- netease_ui_container的size为108,ui中如果指定了大于108的slot将无法放入物品,无需配置
+
+## 自定义容器事件
+
+1. PlayerTryPutCustomContainerItemServerEvent事件,玩家尝试改变自定义容器物品时触发该事件,开发者可以监听该事件实现其他逻辑
+
+## 示例
+
+自定义容器方块配置:
+
+```json
+{
+ "format_version": "1.16.100",
+ "minecraft:block": {
+ "components": {
+ "netease:block_container": {
+ "custom_description": "自定义方块容器",
+ "screen_name": "netease_container.netease_custom_container_screen", // 交互该方块时打开的ui
+ "container_size": 27 // 关闭后保存在方块中的容器size,对应ui中的netease_container扩展写法
+ }
+ },
+ "description": {
+ "base_block": "netease_container",
+ "category": "construction",
+ "identifier": "test:my_custom_container"
+ }
+ }
+}
+```
+
+ui配置:
+> 此处以原版箱子的json为基础进行修改
+
+注意:
+- collection_name指定为netease_container
+
+- ui的grid空格数量如果大于组件中设置的size,那超出的那一部分无法放置物品
+
+```json
+{
+ "namespace": "netease_container",
+ "test_collection": {
+ "type": "stack_panel",
+ "size": [ "100%", "100%c" ],
+ "controls": [
+ {
+ "row_1": {
+ "type": "stack_panel",
+ "orientation": "horizontal",
+ "size": [ "100%", "100%cm" ],
+ "collection_name": "netease_container",
+ "controls": [
+ {
+ "a@netease_container.custom_grid_item": {
+ "collection_index": 27
+ }
+ },
+ {
+ "padding": {
+ "type": "panel",
+ "size": [ 4, 0 ]
+ }
+ },
+ {
+ "b@netease_container.custom_grid_item": {
+ "collection_index": 28
+ }
+ }
+ ]
+ }
+ },
+ {
+ "padding_1": {
+ "type": "panel",
+ "size": [ "100%", 4 ]
+ }
+ },
+ {
+ "row_2": {
+ "type": "stack_panel",
+ "orientation": "horizontal",
+ "size": [ "100%", "100%cm" ],
+ "collection_name": "netease_container",
+ "controls": [
+ {
+ "c@netease_container.custom_grid_item": {
+ "collection_index": 29
+ }
+ },
+ {
+ "padding": {
+ "type": "panel",
+ "size": [ 4, 0 ]
+ }
+ },
+ {
+ "d@netease_container.custom_grid_item": {
+ "collection_index": 30
+ }
+ }
+ ]
+ }
+ },
+ {
+ "padding_2": {
+ "type": "panel",
+ "size": [ "100%", 4 ]
+ }
+ }
+ ]
+ },
+ "custom_grid_item@common.container_item": {
+ "$item_collection_name": "netease_container"
+ },
+ "custom_drop_grid_item@common.container_item": {
+ "$item_collection_name": "netease_ui_container"
+ },
+ "netease_custom_container_grid": {
+ "type": "grid",
+ "size": [ 162, "100.0%c" ],
+ "anchor_from": "top_left",
+ "anchor_to": "top_left",
+ "grid_dimensions": [ 9, 3 ],
+ "grid_item_template": "netease_container.custom_grid_item",
+ "collection_name": "netease_container",
+ "maximum_grid_items": 27
+ },
+ "netease_drop_container_grid": {
+ "type": "grid",
+ "size": [ 162, "100.0%c" ],
+ "anchor_from": "top_left",
+ "anchor_to": "top_left",
+ "grid_dimensions": [ 9, 2 ],
+ "grid_item_template": "netease_container.custom_drop_grid_item",
+ "collection_name": "netease_ui_container",
+ "maximum_grid_items": 18
+ },
+ "container_label": {
+ "type": "label",
+ "offset": [ 7, -1 ],
+ "anchor_from": "top_left",
+ "anchor_to": "top_left",
+ "text": "$container_title",
+ "size": [ "90%", "default" ],
+ "color": "$title_text_color",
+ "layer": 2
+ },
+ "selected_item_details@common.selected_item_details": {
+ "offset": [ 0, 0 ]
+ },
+ "netease_custom_container_panel_top_half": {
+ "type": "panel",
+ "size": [ "100%", "100.0%c" ],
+ "offset": [ 0, 11 ],
+ "anchor_to": "top_left",
+ "anchor_from": "top_left",
+ "controls": [
+ {
+ "container_label@netease_container.container_label": {}
+ },
+ {
+ "netease_custom_container_grid1@netease_container.netease_custom_container_grid": {
+ "offset": [ 7, 10 ]
+ }
+ },
+ {
+ "netease_custom_container_grid2@netease_container.netease_drop_container_grid": {
+ "offset": [ 7, 70 ]
+ }
+ }
+ ]
+ },
+ "netease_custom_container_panel": {
+ "type": "panel",
+ "controls": [
+ {
+ "container_gamepad_helpers@common.container_gamepad_helpers": {}
+ },
+ {
+ "flying_item_renderer@common.flying_item_renderer": {
+ "layer": 11
+ }
+ },
+ {
+ "selected_item_details_factory@common.selected_item_details_factory": {
+ "control_name": "@netease_container.selected_item_details"
+ }
+ },
+ {
+ "item_lock_notification_factory@common.item_lock_notification_factory": {
+ "control_name": "@common.item_lock_notification"
+ }
+ },
+ {
+ "root_panel@common.root_panel": {
+ "size": [ 176, 220 ],
+ "layer": 1,
+ "controls": [
+ {
+ "common_panel@common.common_panel": {
+ "size": [ "100%", "100.0%c" ],
+ "$dialog_background|default": "common.dialog_background_opaque",
+ "controls": [
+ {
+ "bg_image@$dialog_background": {
+ "size": [ "100%", "100.0%c+-37.0px" ],
+ "layer": 1,
+ "controls": [
+ {
+ "chest_panel": {
+ "type": "panel",
+ "layer": 5,
+ "size": [ "100%", "100.0%c+-7.0px" ],
+ "controls": [
+ {
+ "netease_custom_container_panel_top_half@netease_container.netease_custom_container_panel_top_half": {}
+ },
+ {
+ "inventory_panel_bottom_half_with_label@common.inventory_panel_bottom_half_with_label": {}
+ },
+ {
+ "hotbar_grid@common.hotbar_grid_template": {}
+ }
+ ]
+ }
+ },
+ {
+ "inventory_selected_icon_button@common.inventory_selected_icon_button": {}
+ },
+ {
+ "gamepad_cursor@common.gamepad_cursor_button": {}
+ },
+ {
+ "close@common.close_button": {
+ "layer": "$close_button_layer",
+ "offset": "$close_button_offset",
+ "ignored": "$use_compact_close_button"
+ }
+ },
+ {
+ "compact_close@common.compact_close_button": {
+ "layer": "$close_button_layer",
+ "offset": "$close_button_offset",
+ "ignored": "(not $use_compact_close_button)"
+ }
+ }
+ ],
+ "bindings": [
+ {
+ "binding_name": "$close_button_visible_binding_name",
+ "binding_name_override": "#visible"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "netease_custom_container_screen@common.inventory_screen_common": {
+ "$close_on_player_hurt|default": true,
+ "close_on_player_hurt": "$close_on_player_hurt",
+ "variables": [
+ {
+ "requires": "$desktop_screen",
+ "$screen_content": "netease_container.netease_custom_container_panel",
+ "$screen_bg_content": "common.screen_background",
+ "$screen_background_alpha": 0.4
+ },
+ {
+ "requires": "$pocket_screen",
+ "$screen_content": "netease_container_pocket.netease_custom_container_panel"
+ }
+ ]
+ }
+}
+```
\ No newline at end of file
diff --git a/mcguide/20-玩法开发/15-自定义游戏内容/picture/custom_command6.png b/mcguide/20-玩法开发/15-自定义游戏内容/picture/custom_command6.png
new file mode 100644
index 0000000..3b2445b
Binary files /dev/null and b/mcguide/20-玩法开发/15-自定义游戏内容/picture/custom_command6.png differ
diff --git a/mcguide/20-玩法开发/18-性能优化/images/after_optimization.png b/mcguide/20-玩法开发/18-性能优化/images/after_optimization.png
new file mode 100644
index 0000000..9b9620e
Binary files /dev/null and b/mcguide/20-玩法开发/18-性能优化/images/after_optimization.png differ
diff --git a/mcguide/20-玩法开发/18-性能优化/images/before_optimization.png b/mcguide/20-玩法开发/18-性能优化/images/before_optimization.png
new file mode 100644
index 0000000..185ec80
Binary files /dev/null and b/mcguide/20-玩法开发/18-性能优化/images/before_optimization.png differ
diff --git a/mcguide/20-玩法开发/18-性能优化/代码优化.md b/mcguide/20-玩法开发/18-性能优化/代码优化.md
new file mode 100644
index 0000000..18429b2
--- /dev/null
+++ b/mcguide/20-玩法开发/18-性能优化/代码优化.md
@@ -0,0 +1,659 @@
+---
+front: https://nie.res.netease.com/r/pic/20210728/2dc2a94f-71f6-4cc5-8700-3c3696f79a0c.jpg
+hard: 进阶
+time: 30分钟
+---
+
+# 代码优化
+
+## 前言
+
+本文介绍了基于Python 2的一些常用技巧,能够优化代码,提升程序运行效率。
+
+## 使用缓存(内存换CPU)
+
+对象的重复创建与销毁会有一定性能消耗,对于需要频繁使用的数据,建议保存起来,下次从内存取出来直接使用,是一种常用的空间换时间(内存换CPU)的优化手段,对于减少游戏卡顿有较好效果。
+
+### 避免在tick函数内使用import
+
+import模块的消耗并没有小到可以忽略的地步,建议挪到文件的顶部进行import。如果这样会导致循环引用,则可以将模块缓存为类的成员变量
+
+- 错误写法:
+
+```python
+class DemoClientSystem(ClientSystem):
+ def Update(self):
+ # 在每帧执行的逻辑内import模块
+ import mod.client.extraClientApi as clientApi
+ clientApi.xxx
+```
+
+- 正确写法:
+
+```python
+# 在文件顶部import模块
+import mod.client.extraClientApi as clientApi
+class DemoClientSystem(ClientSystem):
+ def Update(self):
+ clientApi.xxx
+```
+
+如果两个模块需要相互引用,那么同时在文件顶部import对方,会导致循环引用报错,则可以用下面的方法处理:
+
+```python
+class DemoClientSystem(ClientSystem):
+ def __init__(self, namespace, systemName):
+ ClientSystem.__init__(self, namespace, systemName)
+ # 假设当前模块与另一个otherModule模块需要相互引用
+ import demoScripts.client.otherModule as otherModule
+ self.otherModule = otherModule
+
+ def Update(self):
+ self.otherModule.xxx
+```
+
+### 避免多次初始化常量
+
+- 错误写法:
+
+在频繁调用的函数中进行声明,例如每次Update的时候
+
+```python
+class DemoClientSystem(ClientSystem):
+ def Update(self):
+ # 常量,每帧创建,实际中可能这里会是比较多的数据
+ bigDict = {
+ (-1, -1): 1,
+ (-1, 0): 2,
+ (-1, 1): 3,
+ (0, -1): 4,
+ (0, 0): 5,
+ (0, 1): 6,
+ (1, -1): 7,
+ (1, 0): 8,
+ (1, 1): 9,
+ }
+ # 读取常量做一些逻辑
+ do_something(bigDict)
+```
+
+- 正确写法:
+
+包含数据比较多的一些常量,特别是List或者Dict类型的,可以放到类的__init__函数当中
+
+```python
+class DemoClientSystem(ClientSystem):
+ # 构造函数
+ def __init__(self, namespace, systemName):
+ ClientSystem.__init__(self, namespace, systemName)
+ # 在初始化时创建
+ self.bigDict = {
+ (-1, -1): 1,
+ (-1, 0): 2,
+ (-1, 1): 3,
+ (0, -1): 4,
+ (0, 0): 5,
+ (0, 1): 6,
+ (1, -1): 7,
+ (1, 0): 8,
+ (1, 1): 9,
+ }
+
+ def Update(self):
+ do_something(self.bigDict)
+```
+
+### 缓存多次用到的中间数据
+
+一些方法多次调用的返回值是一样,可以使用临时变量缓存,不需要重复调用
+
+- 错误写法:
+```python
+class DemoServerSystem(ServerSystem):
+ # 监听的ServerItemUseOnEvent事件回调
+ def ServerItemUseOnEvent(self, args):
+ # 设置多个方块
+ self.SetBlock(args['dimensionId'], (args['x']-1, args['y'], args['z']), 'minecraft:air')
+ self.SetBlock(args['dimensionId'], (args['x']-1, args['y'], args['z']), 'minecraft:air')
+ self.SetBlock(args['dimensionId'], (args['x'], args['y'], args['z']), 'minecraft:air')
+ self.SetBlock(args['dimensionId'], (args['x'], args['y'], args['z']-1), 'minecraft:air')
+ self.SetBlock(args['dimensionId'], (args['x'], args['y'], args['z']+1), 'minecraft:air')
+
+ def SetBlock(self, dimensionId, pos, blockName):
+ serverApi.GetEngineCompFactory().CreateBlockInfo(levelId).SetBlockNew(pos, {'name': blockName}, 0, dimensionId)
+```
+
+- 正确写法:
+
+```python
+# compFactory使用缓存
+serverCompFactory = serverApi.GetEngineCompFactory()
+class DemoServerSystem(ServerSystem):
+ # 监听的ServerItemUseOnEvent事件回调
+ def ServerItemUseOnEvent(self, args):
+ # 对字典内的值做缓存
+ dimensionId = args['dimensionId']
+ x = args['x']
+ y = args['y']
+ z = args['z']
+ self.SetBlock(dimensionId, (x-1, y, z), 'minecraft:air')
+ self.SetBlock(dimensionId, (x-1, y, z), 'minecraft:air')
+ self.SetBlock(dimensionId, (x, y, z), 'minecraft:air')
+ self.SetBlock(dimensionId, (x, y, z-1), 'minecraft:air')
+ self.SetBlock(dimensionId, (x, y, z+1), 'minecraft:air')
+
+ def SetBlock(self, dimensionId, pos, blockName):
+ serverCompFactory.CreateBlockInfo(levelId).SetBlockNew(pos, {'name': blockName}, 0, dimensionId)
+```
+
+### 使用dict代替多个else if
+
+当条件判断的分支很多时,dict跳转的性能会比一连串的else高很多。如果一定要用if,推荐把命中概率较高的判断放前面。
+
+- 错误写法:
+
+```python
+serverCompFactory = serverApi.GetEngineCompFactory()
+class DemoServerSystem(ServerSystem):
+ def HandleBlocks(self, pos, dimensionId):
+ # 获取方块信息
+ blockIdentifier = serverCompFactory.CreateBlockInfo(levelId).GetBlockNew(pos, dimensionId)[0]
+ # 根据方块类型做出不同的处理
+ if blockIdentifier == "minecraft:iron_ore":
+ self.handleIronBlock()
+ elif blockIdentifier == "minecraft:gold_ore":
+ self.handleGoldBlock()
+ elif blockIdentifier == "minecraft:diamond_ore":
+ self.handleDiamondBlock()
+ ...
+```
+
+- 正确写法:
+
+```python
+serverCompFactory = serverApi.GetEngineCompFactory()
+class DemoServerSystem(ServerSystem):
+ def __init__(self):
+ # 注册处理函数
+ self.blockHandlers = {
+ "minecraft:iron_ore": self.handleIronBlock,
+ "minecraft:gold_ore": self.handleGoldBlock,
+ "minecraft:diamond_ore": self.handleDiamondBlock,
+ }
+
+ def HandleBlocks(self, data):
+ blockIdentifier = serverCompFactory.CreateBlockInfo(levelId).GetBlockNew(pos, dimensionId)[0]
+ # 从dict中选取处理函数
+ handler = self.blockHandlers.get(blockIdentifier)
+ if handler:
+ handler()
+```
+
+## 使用分帧(实时性换CPU)
+
+同一时刻内处理大量的逻辑,容易造成卡顿。这时候需要把逻辑执行的时间错开到多帧去执行,让每一帧的任务量不要太重。
+
+### 大批量修改数据分多帧处理
+
+这里以方块为例:
+
+- 错误写法: (同一时刻全部处理,需要处理 100 * 100 * 100 即一百万个方块,必然会卡)
+
+```python
+# 修改某个区域 100 * 100 * 100范围内的方块为空气
+def SetBlocksToAir(self, fromPos):
+ blockcomp = serverApi.CreateComponent(id, "Minecraft", "blockInfo")
+ for x in range(1, 100):
+ for y in range(1, 100):
+ for z in range(1, 100):
+ blockcomp.SetBlockNew((fromPos[0] + x, fromPos[1] + y, fromPos[2] + z), {'name':'minecraft:air'})
+```
+
+- 正确写法: (分开每帧只处理5个)
+
+```python
+# 修改某个区域 100 * 100 * 100范围内的方块为空气
+def SetBlocksToAir(self, fromPos):
+ # 命令队列
+ self.posList = []
+ self.posIndex = 0
+
+ for x in range(1, 100):
+ for y in range(1, 100):
+ for z in range(1, 100):
+ self.posList.append((fromPos[0] + x, fromPos[1] + y, fromPos[2] + z))
+
+# 被引擎直接执行的父类的重写函数,引擎会执行该Update回调,1秒钟30帧
+def Update(self):
+ if self.posList:
+ posListLen = len(self.posList)
+ blockcomp = serverApi.CreateComponent(id, "Minecraft", "blockInfo")
+ #每帧处理5个
+ handleNum = 5
+ while(handleNum > 0 and self.posIndex < posListLen):
+ blockcomp.SetBlockNew(self.posList[self.posIndex], {'name':'minecraft:air'})
+ self.posIndex = self.posIndex + 1
+ handleNum = handleNum - 1
+
+ # 全部处理完成
+ if self.posIndex >= posListLen:
+ self.posList = None
+```
+
+### 非重要逻辑降帧处理
+
+不要每帧执行所有逻辑更新,不同的逻辑实际中根据实时性要求进行间隔更新
+
+- 错误写法:
+(每帧执行所有更新逻辑)
+```python
+def Update(self):
+ self.do_something1()
+ self.do_something2()
+ self.do_something3()
+```
+
+- 正确写法:
+(分开每帧只处理5个)
+```python
+class DemoClientSystem(ClientSystem):
+ # 构造函数
+ def __init__(self, namespace, systemName):
+ ClientSystem.__init__(self, namespace, systemName)
+ self.tick = 0
+
+ def Update(self):
+ self.tick = self.tick + 1
+ # 重要逻辑每帧执行
+ self.do_something1()
+
+ if self.tick % 5 == 0:
+ # 次要逻辑降帧执行
+ self.do_something2()
+
+ if self.tick % 10 == 0:
+ # 更次要的逻辑,使用更低的帧率执行
+ self.do_something3()
+```
+
+### 少用轮询逻辑
+
+使用事件或一些适用的接口来代替每帧尝试的操作。
+
+假想有一个需求:我想删除一个实体,但是当前这个实体没有被加载
+
+- 错误写法:
+
+ 每帧尝试删除该实体,直到成功为止
+
+- 推荐写法:
+
+ 1. 监听AddEntityServerEvent,在该实体的回调中删除。
+ 2. 如果该实体是手动创建的,可以使用SetPersistence接口将其设置为不存盘,那就不再需要处理该实体被卸载而无法删除的情况。
+
+## 优化字节码
+
+Python 是解释型语言,代码在运行时会先编译为字节码(Bytecode),再由解释器逐行执行字节码,优化字节码可以直接提升执行效率。
+
+### 使用推导式
+
+如果要对容器进行操作,使用推导式是最快的办法。在可以使用列表/字典/集合推导式时,尽量使用推导式,而不是使用for循环。
+
+**列表添加元素:**
+
+```python
+a = []
+for i in xrange(1000):
+ if i % 2 == 0:
+ a.append(i*i)
+```
+
+**缓存append方法:**
+
+```python
+a = []
+l = a.append
+for i in xrange(1000):
+ if i % 2 == 0:
+ l(i*i)
+```
+
+**列表推导式:**
+
+```python
+a = [i*i for i in xrange(1000) if i % 2 == 0]
+```
+
+**测试样例:**
+
+```python
+from timeit import timeit
+print "loop + append:", timeit("for i in xrange(1000):\n if i % 2 == 0:\n a.append(i*i)", "a=[]", number=10000)
+print "loop + append(cache):", timeit("for i in xrange(1000):\n if i % 2 == 0:\n l(i*i)", "a=[];l=a.append", number=10000)
+print "list comprehenshion:", timeit("a = [i*i for i in xrange(1000) if i % 2 == 0]", number=10000)
+```
+
+**测试结果:**
+
+```python
+loop + append: 0.6161811
+loop + append(cache): 0.5132234
+list comprehenshion: 0.4063318
+```
+
+**结论:**
+
+列表推导式,能获得明显的性能提升,元素越多差距越明显。
+
+还有**字典推导式:**
+
+```python
+g = (('a',1),('b',2),('c',3),('d',4),('e',5),('f',6))
+d = {k:v for k, v in g if v % 2 == 0}
+```
+
+**集合推导式:**
+
+```python
+g = (1,2,3,4,5,6)
+s = {v for v in g if v % 2 == 0}
+```
+
+### 字符串拼接
+
+我们有很多办法拼接字符串,比如直接相加、使用format、使用%、使用join,那么到底哪种办法最快呢?
+
+**常见写法:**
+
+```python
+s = s1 + s2 + s3
+
+s = s1; s += s2; s += s3
+
+s = '%s%s%s' % (s1,s2,s3)
+
+s = ''.join((s1,s2,s3))
+```
+
+**测试样例1:**
+
+```python
+from timeit import timeit
+N = 10000000
+setup = 's1="hello"*35; s2="world"*25; s3="!"*30; s4=s3*2; s5=s3*2'
+print(timeit("s = s1 + s2 + s3", setup, number=N))
+print(timeit("s = s1; s+=s2; s+=s3", setup, number=N))
+print(timeit("s = '%s%s%s' % (s1,s2,s3)", setup, number=N))
+print(timeit("s = '{}{}{}'.format(s1,s2,s3)", setup, number=N))
+print(timeit("s = ''.join((s1,s2,s3))", setup, number=N))
+```
+
+**测试结果1:**
+
+```python
+0.7396258
+0.8553558
+1.5691264
+3.8130296
+1.0085892
+```
+
+**测试样例2:**
+
+```python
+from timeit import timeit
+N = 10000000
+setup = 's1="hello"*35; s2="world"*25; s3="!"*30; s4=s3*2; s5=s3*2'
+print(timeit("s = s1 + s2 + s3 + s4 + s5", setup, number=N))
+print(timeit("s = s1; s+=s2; s+= s3; s+= s4; s+= s5", setup, number=N))
+print(timeit("s = '%s%s%s%s%s' % (s1,s2,s3,s4,s5)", setup, number=N))
+print(timeit("s = '{}{}{}{}{}'.format(s1,s2,s3,s4,s5)", setup, number=N))
+print(timeit("s = ''.join((s1,s2,s3,s4,s5))", setup, number=N))
+```
+
+**测试结果2:**
+
+```python
+1.4091635
+1.6201083
+3.4721674
+4.6679361
+1.2252783
+```
+
+**结论:**
+
+- 要拼接的子串数量较少时(如不多于3个),直接相加是最快的
+- 当拼接的子串数量较多时,`join`方法是最快的
+- 如果只是想纯粹拼接一下字符串,不要使用格式化方法
+
+### 变量访问
+
+局部变量访问速度最快,其次是全局变量。如果要访问对象的属性,比如self.client.aaa.bbb中出现了三个点,而每一个点代表一次访问,就会多消耗一次性能。建议在频繁使用时缓存为局部变量。
+
+```python
+# 缓存为全局变量CF,减少了一次访问
+CF = serverApi.GetEngineCompFactory()
+def OnCustomCommandTrigger(self, args):
+ # 在循环前,将api方法缓存为局部变量
+ createExplosion = CF.CreateExplosion(levelId).CreateExplosion
+ for _ in xrange(1000):
+ createExplosion(...)# 直接调用
+
+ # 将自己的方法/属性缓存为局部变量
+ func = self.xxxsystem.aaa.bbb
+ for _ in xrange(1000):
+ func(...)
+```
+
+### 字典查询
+
+字典的查询属于属性访问中的一个特例。取字典中特定key的值,如取不到返回None,可有下列写法:
+
+```python
+def get1(d, key):
+ if key in d:
+ return d[key]
+ return None
+
+def get2(d, key):
+ if d.has_key(key):
+ return d[key]
+ return None
+
+def get3(d, key):
+ return d.get(key)
+
+def get4(d, key):
+ return d.get(key, None)
+
+def get5(d, key):
+ try:
+ return d[key]
+ except KeyError:
+ pass
+```
+
+**测试样例:**
+
+```python
+g_d = {"a": 23, "b": 11, "c": 88, "d": 2, "e": 3, "f": 4, "g": 11, "h": 25, "i": 46}
+from timeit import timeit
+print(timeit('get1(g_d, "b")', 'from __main__ import get1, g_d', number=100000))
+print(timeit('get2(g_d, "b")', 'from __main__ import get2, g_d', number=100000))
+print(timeit('get3(g_d, "b")', 'from __main__ import get3, g_d', number=100000))
+print(timeit('get4(g_d, "b")', 'from __main__ import get4, g_d', number=100000))
+print(timeit('get5(g_d, "b")', 'from __main__ import get5, g_d', number=100000))
+
+print(timeit('get1(g_d, "z")', 'from __main__ import get1, g_d', number=100000))
+print(timeit('get2(g_d, "z")', 'from __main__ import get2, g_d', number=100000))
+print(timeit('get3(g_d, "z")', 'from __main__ import get3, g_d', number=100000))
+print(timeit('get4(g_d, "z")', 'from __main__ import get4, g_d', number=100000))
+print(timeit('get5(g_d, "z")', 'from __main__ import get5, g_d', number=100000))
+```
+
+结果分命中、不命中两种情况汇总:
+
+| 单位:ms/1w次 | 命中 | 不命中 |
+| --------- | -------- | -------- |
+| get1 | 1.17 | **1.05** |
+| get2 | 1.59 | 1.43 |
+| get3 | 1.62 | 1.59 |
+| get4 | **1.75** | 1.80 |
+| get5 | **1.04** | **9.01** |
+
+从这个表可以看到,get1用in来判断,平均表现是最好的,是否命中,都是1ms多一点。而最后这个try except,命中的时候是最佳的,不命中的时候性能就大幅恶化。
+
+**结论:**
+
+- 对于key是否存在,直接用in来做判断即可,has_key接口比in慢。当然in方法不止可以对字典用,也可以对任何iterable的对象用,python是动态语言,要清楚你in的对象到底是什么。
+- get的default参数不必填None,因为它本来就是None,填进去反而更慢。
+
+### 函数调用
+
+函数调用是有额外开销的,效率敏感场合不容忽略。
+
+**测试样例:**
+
+```python
+log = lambda msg: None
+
+def foo(msg):
+ log(msg)
+
+from timeit import timeit
+print(timeit('foo("hello")', 'from __main__ import foo', number=100000))
+print(timeit('log("hello")', 'from __main__ import log', number=100000))
+```
+
+**测试结果:**
+
+```python
+0.0104322
+0.0051873
+```
+
+**结论:**
+
+python里1万次的函数调用的消耗,约1毫秒的量级。在效率敏感场合,尽量省去不必要的几行代码的函数包装,减少调用层级,以及减少默认参数个数。
+
+### 方法调用
+
+类与实例方法的调用和函数调用类似,封装太多也会有明显的效率下降,而且情况可能更严重。
+
+**测试样例:**
+
+```python
+# -*- coding: gbk -*-
+import time
+# 定义时间测量装饰器
+def time_it(func):
+ def wrapper(*args, **kwargs):
+ start_time = time.time()
+ result = func(*args, **kwargs)
+ end_time = time.time()
+ print "函数 {} 耗时: {:.0f} 毫秒".format(func.__name__, (end_time - start_time) * 1000)
+ return result
+ return wrapper
+def show_warn(message):
+ pass
+HP_TH = 10
+class Player(object):
+ def __init__(self):
+ self.hp = 0
+ self.hp_th = HP_TH
+ def tick(self):
+ if self.hp < self.hp_th:
+ self.perform_warn()
+ def perform_warn(self):
+ show_warn("warn")
+class Player2(object):
+ def __init__(self):
+ self.hp = 0
+ self.hp_th = HP_TH
+ def tick(self):
+ if self.hp < self.hp_th:
+ show_warn("warn")
+# 性能测试
+if __name__ == "__main__":
+ N = 10000
+ # 测试 Player 类
+ players = []
+ for _ in xrange(N):
+ players.append(Player())
+ @time_it
+ def run(n):
+ for _ in xrange(n):
+ for p in players:
+ p.tick()
+ run(100)
+ # 测试 Player2 类
+ players = []
+ for _ in xrange(N):
+ players.append(Player2())
+ @time_it
+ def run2(n):
+ for _ in xrange(n):
+ for p in players:
+ p.tick()
+ run2(100)
+```
+
+**测试结果:**
+
+```python
+函数 run 耗时: 274 毫秒
+函数 run2 耗时: 168 毫秒
+```
+
+可见,减少一层方法调用后,耗时274ms能降到168ms。
+
+**结论:**
+
+为了效率的话,请尽量避免过多的类方法封装;同一实例方法的频繁调用,请先缓存下来(如第一个例子中的l=a.append)
+
+### 模块导入
+
+关于import写在什么地方,我们都知道,写在模块开头,有这么一些弊端:
+
+- 首次加载卡顿
+- 内存过多
+- 带来冗余
+- 循环引用
+
+但写在函数内就一定是最好的办法吗?
+
+**测试样例:**
+
+```python
+def tick():
+ from packageA.subpackageA import math
+ math.fabs(100)
+
+from packageA.subpackageA import math
+def tick2():
+ math.fabs(100)
+
+from timeit import timeit
+print timeit("tick()", "from __main__ import tick", number=100000)
+print timeit("tick2()", "from __main__ import tick2", number=100000)
+
+# 假设把tick函数移到另一个package下(packageB/test.py):
+print timeit("tick()", "from packageB.test import tick", number=100000)
+```
+
+**测试结果:**
+
+```python
+0.1006268
+0.0177434
+0.1125192
+```
+
+可见,函数内import明显要慢很多,尤其是在另外一个package里面import。
+
+**结论:**
+
+基础性/通用性模块的导入,import写在模块头,当然前提是这些基础模块要做好规划,不要过于臃肿,不要互相耦合严重。
+
+对于频繁调用的函数,函数开头不适宜有太多import,package结构也不宜搞得过于复杂。
\ No newline at end of file
diff --git a/mcguide/20-玩法开发/18-性能优化/着色器优化.md b/mcguide/20-玩法开发/18-性能优化/着色器优化.md
new file mode 100644
index 0000000..1ccaa4b
--- /dev/null
+++ b/mcguide/20-玩法开发/18-性能优化/着色器优化.md
@@ -0,0 +1,222 @@
+---
+front: https://nie.res.netease.com/r/pic/20210728/5a263f49-e1f3-4a9a-96b3-307b11848590.png
+hard: 进阶
+time: 30分钟
+---
+
+# Shader优化
+
+## 前言
+
+为了做出更加炫酷的效果,我们往往会自定义材质,然后定义自己的Shader,或者直接重写替换原版Shader,特别是目前的很多光影MOD,基本都需要对Shader进行修改。Shader与GPU性能密切相关,Shader写得好能让配置不是很高的玩家也能流畅体验炫酷的效果。写得不好,则可能导致高端机也很卡。
+
+## 尽量少用 if else 条件语句
+
+GPU是并行处理逻辑的,采用SIMD(单指令多数据)结构, 同一段代码,同一时刻会被多个GPU的处理单元同时处理,这段代码的执行耗时取决于会被执行到的时间最长的代码。为了充分发挥GPU的并行性,我们尽量少用条件分支逻辑,让所有GPU处理单元都执行相同的代码。
+
+if else的写法如果底下逻辑不多,大部分可以合并,则常常可以改用step()函数进行优化
+
+step(a,b)的功能为:
+```glsl
+若b >= a则返回1,否则返回0
+```
+
+所以如果有这么一个写法:
+```glsl
+if(r >= 0.5)
+{
+ r = 0.6;
+}else{
+ r = 0.4;
+}
+```
+
+则应该写成:
+```glsl
+r = 0.4 + step(0.5, r) * (0.6 - 0.4);
+```
+
+逻辑上相当于若r >= 0.5 ,则:
+```glsl
+r = 0.4 + 1 * 0.2 = 0.6;
+```
+否则r < 0.5,则:
+```glsl
+r = 0.4 + 0 * 0.2 = 0.4;
+```
+由此即可消去if else语句。
+
+
+- 错误写法:
+(if else大量使用)
+```python
+ // 简单的卡通着色例子,把连续的颜色值映射到几个特殊的离散的值上面
+ //根据传入的颜色值取得一个新的颜色值, 这里为了展示简单,我们用仅用一个通道进行举例
+ void main()
+ {
+ color.r = getNewRedColor(color.r);
+ ...(省略无关代码)
+ }
+ float getNewRedColor(float r)
+ {
+ float newR;
+ if(r >= 0.6)
+ {
+ newR = 0.8;
+ }else if(r >= 0.3)
+ {
+ newR = 0.5;
+ }else{
+ newR = 0.1;
+ }
+ return newR;
+ }
+```
+
+- 正确写法:
+(分开每帧只处理5个)
+```python
+ // 简单的卡通着色例子,把连续的颜色值映射到几个特殊的离散的值上面
+ //根据传入的颜色值取得一个新的颜色值, 这里为了展示简单,我们用仅用一个通道进行举例
+ void main()
+ {
+ color.r = getNewRedColor(color.r);
+ ...(省略无关代码)
+ }
+ float getNewRedColor(float r)
+ {
+ float newR = 0.0;
+ newR = newR + step(0.6, r) * 0.8;
+ newR = newR + step(0.3, r) * step(r, 0.6) * 0.5;
+ newR = newR + step(r, 0.3) * 0.1;
+ return newR;
+ }
+```
+
+## 循环语句
+
+for, while这类的循环语句内部实现其实也会有条件判断if else语句,并行性比较低,所以如果可以不用尽量不用,但这并不是让大家去复制粘贴多少次代码,这没有意义,则是尽量从逻辑上避免循环逻辑的出现,如果实在需要使用,则建议循环体内不要做太多耗性能的操作。
+除此之外,循环变量一定要记得初始化!变量的初始值在不同设备上有时候是不一样的, 比如int的初始值并不一定在所有设备上都是0。
+
+- 错误写法:
+(循环变量i没有初始化)
+```python
+ for(int i; i < 5; i ++)
+ {
+ func();
+ }
+```
+在一些设备上i的值会被初始化为0,循环5次没有问题。但在一些设备上,i的默认值可能是一个没有意义的数,甚至是负数!例如是−2147483648,上面循环则会循环超级多次,玩家会直接卡到动不了。
+
+- 正确写法:
+(分开每帧只处理5个)
+```python
+ //这里i一定要给一个默认值
+ for(int i = 0; i < 5; i ++)
+ {
+ func();
+ }
+```
+
+## 精美贴图开关
+
+开关在游戏中的位置:设置->视频->精美贴图
+开发者可根据玩家是否开启精美贴图执行不一样的shader逻辑。这里需要声明两个文件,materials/sad.json 和 materials/fancy.json。我们先看下原版中两个文件的内容:
+```python
+ sad.json:
+ [
+ {"path":"materials/sad.material"},
+ {"path":"materials/entity.material"},
+ {"path":"materials/terrain.material"},
+ {"path":"materials/portal.material"},
+ {"path":"materials/barrier.material"},
+ {"path":"materials/wireframe.material"}
+ ]
+
+ fancy.json:
+ [
+ {"path":"materials/fancy.material", "+defines":["FANCY"]},
+ {"path":"materials/entity.material", "+defines":["FANCY"]},
+ {"path":"materials/terrain.material", "+defines":["FANCY"]},
+ {"path":"materials/hologram.material"},
+ {"path":"materials/portal.material", "+defines":["FANCY"]},
+ {"path":"materials/barrier.material"},
+ {"path":"materials/wireframe.material"}
+ ]
+```
+
+开启精美贴图的时候会加载下面的材质,不开启的话加载上面的材质。我们用一个材质进行举例,比如sad和fancy中都有的terrain.material材质,fancy中不同在于额外定义了FANCY字段,则在Shader中可以这样写:
+```python
+ void main()
+ {
+#ifdef FANCY
+ //这里可以做更多的逻辑,渲染更好的效果
+ renderBeautiful();
+#else
+ // 这里是关闭了精美贴图,这里不应该执行过多逻辑,只需要提供简单的显示效果就可以了
+ renderSimple();
+#endif
+ }
+```
+
+## 降低精度
+
+通常来说,我们写的shader不需要过于关注精度,因为大部分情况下性能瓶颈不在这里,但一些过于复杂,大部分玩家都说卡的MOD,建议可以考虑在精度方面做一些优化。
+
+shader中变量精度越低,GPU运算越快,精度分为3档,关键字分别为:
+```glsl
+低:lowp
+中:mediump
+高:highp
+```
+
+int(整数):建议256内的整数使用lowp, 1024内的整数使用mediump,其它情况则使用highp
+float(浮点):建议256内的浮点数使用lowp, 16384内的浮点数使用mediump,其它情况则使用highp
+
+默认精度:
+```glsl
+顶点着色器中float, int均为highp
+像素着色器中int为mediump,float根据设备不同无默认精度
+```
+声明方法例子(直接把精度关键字加在变量类型前面):
+```glsl
+lowp float color
+```
+
+## 移除无用变量与逻辑
+
+部分开发者编写Shader的时候可能会偷下懒,从自己以前写的代码里面复制粘贴过来,但这部分代码可能有很多逻辑或者变量都没有用上,导致大量的运算是无意义浪费性能的,需要去掉。
+
+- 错误写法:
+(包含大量无用逻辑)
+```python
+ void main()
+ {
+ //这里声明多个变量,又或许是从其它地方复制过来,具体值先省略
+ A = ...;
+ B = ...;
+ C = ...;
+
+ //这里只用了变量A;B和C都没有用到
+ DoSomeThingWithA(A);
+ return;
+ }
+```
+
+- 正确写法:
+(删除无用逻辑)
+```python
+ void main()
+ {
+ //只留下A,把其它没用上的都删除掉
+ A = ...;
+
+ //这里只用了变量A;B和C都没有用到
+ DoSomeThingWithA(A);
+ return;
+ }
+```
+
+## 分级做多个MOD版本
+
+开发者可根据Shader复杂度上架不同版本,举个例子,例如可以有“网易光影低配版”, “网易光影高配版”,玩家看名字就大概知道对性能有不同的要求了,让玩家下载时自行选择。
\ No newline at end of file
diff --git a/mcguide/20-玩法开发/18-性能优化/配置文件优化.md b/mcguide/20-玩法开发/18-性能优化/配置文件优化.md
new file mode 100644
index 0000000..f9533de
--- /dev/null
+++ b/mcguide/20-玩法开发/18-性能优化/配置文件优化.md
@@ -0,0 +1,177 @@
+---
+front: https://nie.res.netease.com/r/pic/20210728/5507b669-4c6f-4958-b5d0-b8556ab4cfb5.png
+hard: 进阶
+time: 20分钟
+---
+
+# 配置文件优化指南
+
+本文介绍了如何优化Python配置文件的内存使用。
+
+## 1. 使用结构优化建筑生成
+
+在建筑生成和放置方面,我们推荐使用结构文件而不是Python配置。
+
+### 使用feature\_rules控制建筑生成
+
+参考教程:[自定义特征](../15-自定义游戏内容/4-自定义维度/4-自定义特征.md)
+
+**优点:**
+
+* 无需代码处理,无卡顿效果
+* 采用微软原生机制,性能优异
+
+**缺点:**
+
+* feature\_rules文件中的molang表达式不宜过于复杂
+* 复杂的表达式可能导致内存占用增加,影响游戏加载速度
+
+### 通过API放置structure
+
+
+参考API:PlaceStructure
+
+**优点:**
+
+* 提供灵活的代码控制能力
+* 可实现复杂的生成规则
+
+**缺点:**
+
+* 放置时可能出现短暂卡顿
+
+## 2. 使用方块调色板节约内存
+
+方块调色板可用于保存建筑数据。使用GetBlockPaletteBetweenPos等接口获取方块调色板后,使用SerializeBlockPalette将调色板转化成字典后,手动存入配置文件中。
+
+**优点:**
+
+* 方块调色板是高度压缩的字典结构,可最大程度节约内存
+* 对应的放置接口SetBlockByBlockPalette是原生c++批量放置,性能较好
+* 可实现复杂的生成规则
+
+**缺点:**
+
+* 放置时可能出现短暂卡顿
+
+## 3. 使用引用避免重复定义
+
+在配置文件中,应避免重复定义相同的配置项,而是采用引用方式:
+
+* 错误的写法
+
+```python
+# 存在大量重复的方块数据定义
+building = {
+ 'build_A': {
+ 'size': [0, 1, 2],
+ 'blocks': [
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ {'aux': 0, 'name': 'minecraft:air'},
+ ],
+ },
+}
+```
+
+* 正确的写法
+
+```python
+# 定义基础方块数据
+AirBlock = {'aux': 0, 'name': 'minecraft:air'}
+GrassBlock = {'aux': 0, 'name': 'minecraft:grass'}
+StoneBlock = {'aux': 0, 'name': 'minecraft:stone'}
+
+# 通过引用复用方块数据
+building = {
+ 'build_A': {
+ 'size': (0, 1, 2),
+ 'blocks': [
+ AirBlock, AirBlock, StoneBlock, AirBlock, AirBlock,
+ GrassBlock, AirBlock, GrassBlock, AirBlock, AirBlock, StoneBlock,
+ ],
+ },
+}
+```
+
+## 4. 使用元组替代字典
+
+对于只读的配置数据,建议使用元组代替字典,以提高内存使用效率:
+
+* 错误的写法
+
+```python
+# 定义基础方块数据
+AirBlock = {'aux': 0, 'name': 'minecraft:air'}
+GrassBlock = {'aux': 0, 'name': 'minecraft:grass'}
+StoneBlock = {'aux': 0, 'name': 'minecraft:stone'}
+```
+
+* 正确的写法
+
+```python
+# 使用元组存储只读数据,提高内存效率
+AirBlock = ('minecraft:air', 0)
+GrassBlock = ('minecraft:grass', 0)
+StoneBlock = ('minecraft:stone', 0)
+```
+
+## 5. 分割配置文件并动态加载
+
+如果你的配置文件已经有几十M的大小,建议将配置文件按功能模块分割,采用动态加载方式:
+
+* 错误的写法
+
+```python
+# 一次性导入所有配置
+from build import build1, build2, build3
+```
+
+* 正确的写法
+
+```python
+def load_build_config(data):
+ building = data['build']
+
+ if build == '1':
+ # 按需导入配置
+ import build1
+ place_build(data, build1)
+ elif build == '2':
+ # 按需导入配置
+ import build2
+ place_build(data, build)
+```
+
+## 注意事项
+
+* 建议将一个模块切割得尽量细,并结合前面所述的方法减少单个模块的大小,否则动态加载模块也会带来卡顿。
+* 即便使用动态加载,如果玩家将各个类型的建筑都摆放一次,那么所有配置也会被加载进来,大量占用内存。
+* 如果想进一步优化,可以将配置存储为json文件,通过json方式使用和卸载,相关接口GetModConfigJson。
+* 可以使用`zlib`库压缩数据。
+
+## 优化效果
+
+**优化前内存占用715.32M、优化后占用下降到了224.46M**
+
+优化前的内存占用(使用方块探针工具):
+
+
+优化后的内存占用(使用方块探针工具):
+
+
+## 总结
+
+1. 优先使用结构文件/方块调色板存储大型数据
+2. 使用类组织相关配置
+3. 采用引用而不是重复定义
+4. 使用元组存储只读数据
+5. 按功能分割配置文件
\ No newline at end of file
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/README.md b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/README.md
similarity index 100%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/README.md
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/README.md
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_0.png b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_0.png
similarity index 100%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_0.png
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_0.png
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_1.png b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_1.png
similarity index 100%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_1.png
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_1.png
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_2.png b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_2.png
similarity index 100%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_2.png
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_2.png
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_3.png b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_3.png
similarity index 100%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_3.png
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_3.png
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_4.png b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_4.png
similarity index 100%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_4.png
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_4.png
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_5.png b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_5.png
similarity index 100%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/images/0_5.png
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/images/0_5.png
diff --git a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/第1节:基岩版网络游戏概述与工具指引.md b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/第1节:基岩版网络游戏概述与工具指引.md
similarity index 97%
rename from mcguide/27-网络游戏/课程0:基岩版网络游戏概述/第1节:基岩版网络游戏概述与工具指引.md
rename to mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/第1节:基岩版网络游戏概述与工具指引.md
index ca0fd70..67e2997 100644
--- a/mcguide/27-网络游戏/课程0:基岩版网络游戏概述/第1节:基岩版网络游戏概述与工具指引.md
+++ b/mcguide/27-手机网络游戏/课程0:基岩版网络游戏概述/第1节:基岩版网络游戏概述与工具指引.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 5分钟
---
@@ -10,7 +10,7 @@ time: 5分钟
-基岩版网络游戏是指开发者通过 **官方提供** 的服务器资源进行玩法搭建的多人游戏服务。在《我的世界》手机版主页右下方有显目的入口位置,用户可以通过入口找到处于 **上线阶段** 的在线多人服务器。 **网络游戏解除了本地联机的多种限制,让玩家与玩家间可以不受时间和地区因素干扰,遇到更多兴趣相投的玩家好友。**
+基岩版网络游戏是指开发者通过 **官方提供** 的服务器资源进行玩法搭建的多人游戏服务。在《我的世界》手机版主页右下方有显目的入口位置,用户可以通过入口找到处于 **上线阶段** 的在线多人服务器。 **网络游戏解除了本地联机的多种限制,让玩家与玩家间可以不受时间和地区因素干扰,遇到更多兴趣相投的玩家好友。**
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/10-支持基岩版客户端的Java版网络游戏概述.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/10-支持基岩版客户端的Java版网络游戏概述.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/10-支持基岩版客户端的Java版网络游戏概述.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/10-支持基岩版客户端的Java版网络游戏概述.md
index 0a56038..c398e8f 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/10-支持基岩版客户端的Java版网络游戏概述.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/10-支持基岩版客户端的Java版网络游戏概述.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -18,15 +18,15 @@ time: 60分钟
### 名词介绍
- Spigot、Spigot服
-
+
> Spigot是一个开源的、高效的Java版MC服务器,并且提供了丰富的api可以编写插件。他是由第三方提供的,并非官方提供,是由官方的minecraft server反编译后,打进去一些patch后而来
- BC、BungeeCord、BC服
-
+
> BungeeCord(后面简称BC)是一个代理,提供了切服、数据包转发、插件编写、BC指令等等
- Geyser、Geyser服、协议服
-
+
> Geyser是第三方开源的MC协议转换工具,它能把MC-Bedrock版本协议转换为MC-java版本协议,也就是说通过Geyser,我们能实现基岩版客户端进入Java版服务器游玩的效果
- Master服、Proxy服
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/11-部署服务器.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/11-部署服务器.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/11-部署服务器.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/11-部署服务器.md
index a70417a..10eddbc 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/11-部署服务器.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/11-部署服务器.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -11,13 +11,13 @@ time: 60分钟
在进行Java版网络游戏搭建和部署流程前,首先需要注册成为我的世界开发者,并完成入驻申请,申请开发阶段服务器。具体步骤,请详细阅读如下文档:
1. [开发准备阶段概述](../课程1:成为Apollo服主及相关准备/第2节:开发准备阶段概述.md)
-
+
2. [入驻申请](../课程1:成为Apollo服主及相关准备/第3节:入驻申请.md)
-
+
3. [申请开发阶段服务器](../课程1:成为Apollo服主及相关准备/第4节:申请开发阶段服务器.md)
-
+
4. [使用数据库前端连接数据库](../课程1:成为Apollo服主及相关准备/第5节(拓展):使用数据库前端连接数据库.md)
-
+
5. [连接开发机](../课程1:成为Apollo服主及相关准备/第5节:连接开发机.md)
## 特别提示
@@ -58,17 +58,17 @@ time: 60分钟

- 打开**BC服目录/config.yml**文件(此为bc服配置),配置bc服监听的端口,端口范围要求[29000,31000)
-
+
- 记下端口参数,后面需要在studio中填写
- 注意,此处的**query_port**和**host中冒号后面的端口值**,请保持一致
- 该处的端口,均为**BC服**用于监听来自**Geyser**服相关连接的端口
-
+

## 负载/协议转换部分部署流程
- 打开MCStudio,选择基岩版服务器,并选择右上角新建选项,打开后,选择空白Spigot服
-
+

- 选择更多后,点击服务器配置,开始配置
@@ -97,7 +97,7 @@ time: 60分钟
- 查看日志,若部署成功,则可以通过工具箱打开ModPC开发包,进入游戏开始测试

-
+
## 部署多个代理服与BC
- 在代理服的配置界面填写数量即可部署多个代理服(协议服与代理服为一对一的关系,所以这个数量也是协议服的数量),点击增加代理服则可以在不同机器上部署代理服。
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/12-Spigot服务器开发规范.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/12-Spigot服务器开发规范.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/12-Spigot服务器开发规范.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/12-Spigot服务器开发规范.md
index 5cd5483..d4ff450 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/12-Spigot服务器开发规范.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/12-Spigot服务器开发规范.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -33,12 +33,12 @@ time: 60分钟
## Spigot服 server.properties参数规范
- view-distance
-
+
```
建议值: 4-6
```
决定服务端发送的区块信息数据,对服务器性能与流量消耗影响巨大,建议调小。
-
+
- online-mode
```
必须值: false
@@ -51,7 +51,7 @@ time: 60分钟
必须值: true
```
决定Spigot是否进行飞行检测。由于目前基岩版登录Java服务器需要经过Geyser服翻译协议,在这过程中,玩家移动相关包体不能完美翻译,若这个字段设为false,存在玩家移动被服务器当作飞行封禁的可能性。
-
+
- network-compression-threshold
```
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/13-1-【必读】玩家uuid数据存储说明.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/13-1-【必读】玩家uuid数据存储说明.md
similarity index 100%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/13-1-【必读】玩家uuid数据存储说明.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/13-1-【必读】玩家uuid数据存储说明.md
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/13-其他部署时可配置字段.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/13-其他部署时可配置字段.md
similarity index 100%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/13-其他部署时可配置字段.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/13-其他部署时可配置字段.md
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/20-Spigot插件结构与部署.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/20-Spigot插件结构与部署.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/20-Spigot插件结构与部署.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/20-Spigot插件结构与部署.md
index b9a193a..f7e6843 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/20-Spigot插件结构与部署.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/20-Spigot插件结构与部署.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -37,6 +37,6 @@ time: 60分钟
## Spigot插件加载流程
- 如图所示,把mvn clean install编译出的xxx.jar放入Spigot的Plugin文件夹

-
+
- Spigot加载插件后,会有输出,具体命名由plugin.yml决定

\ No newline at end of file
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/21-Spigot服与客户端python通信原理简介.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/21-Spigot服与客户端python通信原理简介.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/21-Spigot服与客户端python通信原理简介.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/21-Spigot服与客户端python通信原理简介.md
index 16933ad..cf5d97c 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/21-Spigot服与客户端python通信原理简介.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/21-Spigot服与客户端python通信原理简介.md
@@ -42,7 +42,7 @@
@Mod.InitClient()
def InitClient(self):
clientApi.RegisterSystem("MyMod", "MySystemClient", client_system_class_path)
-
+
# clientSystem
class MySystemClient(ClientSystem):
def __init__(self, namespace, systemName):
@@ -51,7 +51,7 @@
self.ListenForEvent("MyMod", "MySystemServer", "serverEvent", self, self.onEvent)
# 给spigot发一个事件
self.NotifyToServer("clientEvent", {'a': 1})
-
+
def onEvent(self, data):
# 可以在客户端日志中看到onEvent {"a": 1}
print 'onEvent', data
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/21-客户端Mod结构与部署.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/21-客户端Mod结构与部署.md
similarity index 96%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/21-客户端Mod结构与部署.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/21-客户端Mod结构与部署.md
index a80c8ed..199c86d 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/21-客户端Mod结构与部署.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/21-客户端Mod结构与部署.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -20,10 +20,10 @@ time: 60分钟
modMain.py
__init__.py
entities
- pack_manifest.json
+ manifest.json
resource_packs
resource_pack_geyser_demo_mod
- pack_manifest.json
+ manifest.json
| 文件/文件夹 | 解释 |
| ------------------------- | ------------------------------------------------------------ |
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/22-Spigot服自定义物品原理简介.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/22-Spigot服自定义物品原理简介.md
similarity index 98%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/22-Spigot服自定义物品原理简介.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/22-Spigot服自定义物品原理简介.md
index 7522397..1dc47b2 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/22-Spigot服自定义物品原理简介.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/22-Spigot服自定义物品原理简介.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -42,13 +42,13 @@ time: 60分钟
设置物品是否防火
"netease:fire_resistant"{ "value" : true}
```
-
+
- 基岩版自定义物品中用于物品是否可做燃料的组件
```
设置物品是否可作为燃料
"netease:fuel" { "value" : true}
```
-
+
- 基岩版自定义物品中用于物品的使用间隔
```
设置物品使用间隔
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/23-Spigot服自定义实体原理简介.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/23-Spigot服自定义实体原理简介.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/23-Spigot服自定义实体原理简介.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/23-Spigot服自定义实体原理简介.md
index 3d0ee48..870ef08 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/23-Spigot服自定义实体原理简介.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/23-Spigot服自定义实体原理简介.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -16,7 +16,7 @@ time: 60分钟
- 开发流程如下:
1. 编写客户端Mod,制作生物的模型、贴图、动画、客户端逻辑等
2. 编写Spigot插件,制作生物运行逻辑、属性、生成规则等
-
+
- 对于客户端Mod来说,请参照文档 [自定义生物](../../20-玩法开发/15-自定义游戏内容/3-自定义生物/01-自定义基础生物.md) 制作生物的模型、贴图、动画等
- 与纯基岩版的自定义生物区别在于,绝大部分Components、ComponentGroups、events均需要通过Java插件实现,无法通过Json配置生效
- 客户端Mod的主要作用为告知客户端当生成对应Identifier生物时,渲染的模型、贴图、动画、碰撞体等
@@ -69,4 +69,4 @@ time: 60分钟
```
- 1.12版本的Spigot由于需要使用Viaversion,因此在通过反射注册新生物时,需要注意生物的type必须复用已有的生物,或者同时为Viaversion注册,不然会出现生物无法生成的问题。
-
+
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/24-Spigot服自定义方块原理简介.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/24-Spigot服自定义方块原理简介.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/24-Spigot服自定义方块原理简介.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/24-Spigot服自定义方块原理简介.md
index 4ca318d..27d0fc0 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/24-Spigot服自定义方块原理简介.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/24-Spigot服自定义方块原理简介.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -26,7 +26,7 @@ time: 60分钟
- 开发流程如下:
1. 编写客户端Mod,配置方块Json、客户端逻辑等
2. 编写Spigot插件,制作基于头颅实体的自定义逻辑等
-
+
- 对于客户端Mod来说,请参照文档 [自定义生物](../../20-玩法开发/15-自定义游戏内容/2-自定义方块/0-自定义方块概述.md) 制作自定义方块
- 对于Spigot插件来说,仅需给对应Skull方块设置上给定要求的SkullOwner即可,如:
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/1-自定义物品Demo详解.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/1-自定义物品Demo详解.md
similarity index 98%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/1-自定义物品Demo详解.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/1-自定义物品Demo详解.md
index ce18f5a..0d87bfd 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/1-自定义物品Demo详解.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/1-自定义物品Demo详解.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 60分钟
---
@@ -101,11 +101,11 @@ Demo实现了11个不同的自定义物品:
##### 流程
1. 安装SpigotMaster插件
-
+
详见[下载内容](../99-下载内容.md)
2. 如App.java所示,实例ServerOriginalListener监听了Spigot原生事件
-
+
通过下述接口实现
```
getServer().getPluginManager().registerEvents(new ServerOriginalListener(), this);
@@ -196,4 +196,4 @@ Demo实现了11个不同的自定义物品:
"armor_slot":2
}
```
- 盔甲槽位,详见 ArmorSlotType
+ 盔甲槽位,详见 ArmorSlotType
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/2-Python通信Demo详解.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/2-Python通信Demo详解.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/2-Python通信Demo详解.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/2-Python通信Demo详解.md
index 49bda49..fe2c6cc 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/2-Python通信Demo详解.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/2-Python通信Demo详解.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 30分钟
---
@@ -22,7 +22,7 @@ time: 30分钟
* 点击”广播消息“会在spigot内所有玩家的聊天栏显示一条消息
-
+
### 客户端部分
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/3-商城Demo详解.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/3-商城Demo详解.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/3-商城Demo详解.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/3-商城Demo详解.md
index b0a5a72..ff4a5dd 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/3-商城Demo详解.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/3-商城Demo详解.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 30分钟
---
@@ -9,7 +9,7 @@ time: 30分钟
Demo给出了基于目前SpigotMaster提供的接口接入商场的基础方案
- 提供了四个命令
- - openShop
+ - openShop
打开玩家商城界面
- closeShop
@@ -36,7 +36,7 @@ Demo给出了基于目前SpigotMaster提供的接口接入商场的基础方案
该接口用于通知网易服务器标记指定订单已发货
值得注意的是,目前两个接口采用http异步请求,意味着调用**finPlayerOrder**后,订单不一定已经标记完成。
-
+
如果出现已经通知过网易服务器完成发货的订单,请调用**finPlayerOrder**再次通知网易服务器
# 插件逻辑流程
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/4-自定义生物模型Demo详解.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/4-自定义生物模型Demo详解.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/4-自定义生物模型Demo详解.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/4-自定义生物模型Demo详解.md
index b3055f1..d7c8ec8 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/4-自定义生物模型Demo详解.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/4-自定义生物模型Demo详解.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 40分钟
---
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/5-自定义实体Demo详解.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/5-自定义实体Demo详解.md
similarity index 98%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/5-自定义实体Demo详解.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/5-自定义实体Demo详解.md
index ea9bb11..dfb6487 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/5-自定义实体Demo详解.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/5-自定义实体Demo详解.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 40分钟
---
@@ -39,8 +39,8 @@ time: 40分钟
- 生成客户端为机器人,实际为MythicMob骷髅王,骷髅王被攻击后会发送信息,并且有概率会召唤骷髅兵
- 继承原生生物类进行换皮
- - 命令
- - /addEntity
+ - 命令
+ - /addEntity
- 效果
- 生成一只客户端表现为机器人,实际行为为狼的生物,修改攻击力为20,同时覆写了攻击函数,实现攻击时产生随机特效
- 生成一只客户端表现为蜘蛛,实际行为为马的生物,同时覆写骑乘函数,实现骑乘两人
@@ -49,7 +49,7 @@ time: 40分钟
- 自定义松鼠
1. 参照[自定义生物](../../../20-玩法开发/15-自定义游戏内容/3-自定义生物/01-自定义基础生物.md),如实体定义、动画controller、动画、客户端实体定义、骨骼模型、贴图等

-
+
2. 需要注意的是animation_controllers中使用molong语法,获取mod.is_moving变量,当收到rpc调用时,修改相关值,让松鼠在被攻击时播放移动动作

@@ -63,10 +63,10 @@ time: 40分钟

3. 机器人的 animation_controllers使用Mod自定义molang变量,只要plugin发送rpc包,即可触发机器人放技能动作

-
+
强烈建议阅读:
- 关于机器人的模型来源、动画制作、molong语法详细解读
-
+
[机器人Demo](https://learn.microsoft.com/zh-cn/minecraft/creator/documents/entitymodelingandanimation)
- 自定义蜘蛛
@@ -82,7 +82,7 @@ Demo中的Java插件演示了三种换皮方式,其具体的适用范围、实
### 仅客户端换皮
- 应用场景:
-
+
- 只支持修改生物的模型、动画、碰撞盒大小
- 不支持修改生物的行为逻辑,如攻击、生命、敌对行为等等
@@ -99,7 +99,7 @@ Demo中的Java插件演示了三种换皮方式,其具体的适用范围、实
EntityType spigotType = EntityType.valueOf(spigotIdentifier);
Entity mob = spigotMaster.spawnEntity(player, player.getLocation(), spigotType, clientIdentifier);
```
-
+
- 上述代码的最终效果如下,生成一个本质上为狼,但是模型是机器人的实体

@@ -108,7 +108,7 @@ Demo中的Java插件演示了三种换皮方式,其具体的适用范围、实
Demo中使用的MythicMob插件为**4.13.0**版本
- 应用场景:
-
+
- MythicMob插件提供了强大的自定义生物功能,包括生物的技能、血量、体积等等
- 不同版本的MythicMob需要根据各自版本的事件、API自行适配
@@ -118,7 +118,7 @@ Demo中使用的MythicMob插件为**4.13.0**版本

- 同时新增Mechanic,通过配置,达到玩家触发技能时,发送rpc包
-
+
下图演示的是新增的yml配置


@@ -140,7 +140,7 @@ Demo中使用的MythicMob插件为**4.13.0**版本
String typeStr = event.getMob().getMobType();
spigotMaster.setMythicMobIdentifier(event.getEntity(), typeStr);
```
-
+
- 第二种适用于想自定义对应identifier,相同Mob可对应不同identifier,如下代码
```
// 把MythicMob插件的骷髅王样例映射为客户端的机器人
@@ -161,15 +161,15 @@ Demo中使用的MythicMob插件为**4.13.0**版本
### 继承原生生物类进行换皮
- 应用场景:
-
+
- 要求十分了解生物属性、逻辑,能阅读混淆后逻辑,并自行继承改造相应逻辑
- 可改造范围十分广泛,行为逻辑定制灵活性很高
- 命令格式为:
-
+
1、目前demo样例中,展示了如何继承并修改原生狼的攻击函数,在客户端以机器人的模型表现出来
-
+
2、展示了客户端模型为蜘蛛的马
```
@@ -188,7 +188,7 @@ Demo中使用的MythicMob插件为**4.13.0**版本

- MySpider类中,修改马的骑乘判断函数、骑乘函数
-
+

diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/6-ServerFormDemo详解.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/6-ServerFormDemo详解.md
similarity index 98%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/6-ServerFormDemo详解.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/6-ServerFormDemo详解.md
index 5ec283b..f4549f9 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/6-ServerFormDemo详解.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/6-ServerFormDemo详解.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 40分钟
---
@@ -45,9 +45,9 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
### ModalForm
- 应用场景:
-
+
- ModalForm是最简单的表单形式,但可定制程度较低
-
+
- 仅支持标题、内容和两个按钮
- 命令格式为:
@@ -72,7 +72,7 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
});
spigotMaster.sendForm(player, builder);
```
-
+
- 最终效果如下:

@@ -80,7 +80,7 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
### SimpleForm
- 应用场景:
-
+
- SimpleForm比ModalForm稍显复杂,但是可定制程度也更高,支持带图片按钮
- 仅支持标题、内容和不限数量的按钮
@@ -109,7 +109,7 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
### CustomForm
- 应用场景:
-
+
- 最为复杂,但是可定制程度最高
- 支持标题、内容、标签列表、滑块、输入等等
@@ -176,9 +176,9 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
从上面几种form的效果我们可以看到,在不修改客户端Json配置的情况下,FormUI的布局、贴图等表现效果十分受限,排序只能从头列到尾,控件效果也只有单调的一种
### 扩展方案
-
+
我们可以通过修改客户端JSON配置文件,来让FormUI的样式更丰富,同时不需要编写额外的客户端Python代码。
-
+
在阅读下述内容前,默认开发者已阅读过 [客户端ui开发相关知识](../../../18-界面与交互/2-从零开始创建UI.md)
同时默认开发者已阅读过 [客户端基础ui知识](https://wiki.bedrock.dev/json-ui/json-ui-intro.html)
@@ -268,11 +268,11 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
- 定义五个自定义控件
- - grid_long_form@server_form.long_form
-
- 继承自原生server_form.long_form
+ - grid_long_form@server_form.long_form
+
+ 继承自原生server_form.long_form
- grid_long_form_panel
-
+
为内容面板增加了背景贴图
```
{
@@ -296,11 +296,11 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
```
- grid_long_form_scrolling_content@server_form.long_form_scrolling_content
-
+
继承自原生**server_form.long_form_scrolling_content**的滚动面板,内容填充为**grid_long_form_dynamic_buttons_panel@server_form.grid_long_form_dynamic_buttons_panel**
-
+
- grid_long_form_dynamic_buttons_panel
-
+
自定义的grid面板,用于生成动态按钮,从配置中可以见到,我们定义该面板由6行2列组成,每项控件模板为**server_form.grid_dynamic_button**
```
@@ -359,10 +359,10 @@ Demo中的Java插件演示了三种FormUI及FormUI响应处理逻辑,其具体
- 最后,我们把原生的long_form的定义改为我们自定义的控件**@server_form.apollo_demo_switch_long_form**
-
+
long_form对应的是SimpleForm,custom_form对应的是CustomForm

-
+
- Spigot中我们构造如下的Form,把Title设置为**§g**开头

diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/7-自定义方块Demo详解.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/7-自定义方块Demo详解.md
similarity index 98%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/7-自定义方块Demo详解.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/7-自定义方块Demo详解.md
index ba25464..b131aa0 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/7-自定义方块Demo详解.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/30-Spigot服Demo详解/7-自定义方块Demo详解.md
@@ -1,5 +1,5 @@
---
-front:
+front:
hard: 入门
time: 40分钟
---
@@ -16,22 +16,22 @@ time: 40分钟
使用了自定义松鼠模型的方块
- custom:my_block1
-
+
破坏时间为10s的自定义方块
- custom:my_block2
-
+
自发光方块,发光强度为1.0
- custom:my_block3
-
+
四面向方块,根据玩家摆放方向不同而不同
## 开发流程
- 自定义方块1-3
1. 参照[自定义方块实体概述](../../../20-玩法开发/15-自定义游戏内容/2-自定义方块/0-自定义方块概述.md) 、[自定义方块Json组件](../../../20-玩法开发/15-自定义游戏内容/2-自定义方块/1-JSON组件.md),增加对应方块定义、Json组件

-
+
2. 使用原生Spigot命令,获取带SkullOwner的头颅
```
/give @s minecraft:skull 64 3 {SkullOwner: { "Name" : "geyser_custom_block_custom:my_block1"}}
@@ -45,7 +45,7 @@ time: 40分钟
- 自定义松鼠方块
1. 参照[自定义方块实体外观](../../../20-玩法开发/15-自定义游戏内容/2-自定义方块/4.1-自定义方块实体外观.md),定义方块实体、动画controller、动画、骨骼模型、贴图等

-
+
2. 需要注意的是,基于头颅换皮的情况下,方块本身即带有服务端方块实体。若加上**netease:block_entity**字段,则同时会生成客户端方块实体;不加**netease:block_entity**字段则无客户端方块实体。
```
"netease:block_entity": {
@@ -61,11 +61,11 @@ time: 40分钟
4. 最终效果如下:

-
+
## 目前支持组件详解
1. Q: **netease:aabb** 组件在使用上有没有限制?
-
+
A: 由于方块实际上为头颅换皮,因此目前**netease:aabb**设置值应大于头颅的aabb,否则会出现服务端客户端不一致的挖掘表现,头颅aabb具体为
```json
{
@@ -85,13 +85,13 @@ time: 40分钟
PS:另外需要注意的是,在apollo2.0中**collision**和**clip**均为必须字段,缺少时Geyser会报错!
2. Q: **netease:face_directional** 组件在使用上有没有限制?
-
+
A: 由于头颅方块并没有细致到上下朝向的区分,因此目前组件只支持四方向类型,即只支持 **type: "direction"**
3. Q:**netease:block_entity**使用时有什么需要注意的地方?
-
+
A:对于Apollo2.0来说,服务端本身就自带了Skull方块实体,而只需要有这个组件即可保证客户端同时生成方块实体。
-
+
由于子字段中的 **tick** 、 **moveable** 为服务端逻辑,在Apollo2.0中为无效字段,需要自行通过Spigot插件的方式,修改Skull方块实体进行兼容。
**tick** 、 **moveable** 为无效字段可以理解成不配置相应字段也不会出现问题
@@ -99,5 +99,5 @@ time: 40分钟
4. Q:**minecraft:destory_time**使用时有什么需要注意的地方吗?
A:目前**destory_time** 可以设置方块所需的挖掘时间,由于服务端仍然是头颅 **destory_time**设置小于原生头颅时,会出现挖掘纹理和挖掘时间不一致问题。
-
+
因此,不建议**destory_time**值小于 **1.5**
diff --git a/mcguide/27-网络游戏/课程10:使用Spigot开服/81-SpigotMasterAPI文档.md b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/81-SpigotMasterAPI文档.md
similarity index 99%
rename from mcguide/27-网络游戏/课程10:使用Spigot开服/81-SpigotMasterAPI文档.md
rename to mcguide/27-手机网络游戏/课程10:使用Spigot开服/81-SpigotMasterAPI文档.md
index 2a13f35..6c5cff3 100644
--- a/mcguide/27-网络游戏/课程10:使用Spigot开服/81-SpigotMasterAPI文档.md
+++ b/mcguide/27-手机网络游戏/课程10:使用Spigot开服/81-SpigotMasterAPI文档.md
@@ -11,7 +11,7 @@ SpigotMaster
import com.neteasemc.spigotmaster.SpigotMaster;
SpigotMaster spigotMaster = (SpigotMaster)Bukkit.getPluginManager().getPlugin("SpigotMaster");
```
-
+
## `public Material getCustomItemMaterial(String customItemIdentifier)`
@@ -222,7 +222,7 @@ SpigotMaster
| -----------------| ---------------| ---- |
| player | Player | 玩家 |
| json_result | 订单json数据 | 玩家 |
-
+
## `public void finPlayerOrder(Player player, List orderList, FutureCallback