Merge branch 'MCNeteaseDevs:main' into main
34
mcguide/10-新内容/1-开发工作台/933-1.1.44.md
Normal file
@@ -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会遮挡的问题
|
||||
34
mcguide/10-新内容/1-开发工作台/934-1.1.43.md
Normal file
@@ -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
|
||||
|
||||

|
||||
|
||||
## 配置编辑器
|
||||
|
||||
- 新建页签优化
|
||||
|
||||
现在新建配置会根据当前所在页面打开对应的配置选择界面。如在**界面编辑器界面**,新建文件向导会默认**选择界面选项**(见下图)
|
||||
|
||||

|
||||
26
mcguide/10-新内容/1-开发工作台/935-1.1.42.md
Normal file
@@ -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键**点击可以多选所需要替换/填充的方块行,再次点击右侧方块即可全部**预选**该方块进行替换/填充
|
||||
|
||||

|
||||
|
||||
## 问题修复
|
||||
|
||||
- 修复界面编辑器使用原版贴图会复制问题
|
||||
22
mcguide/10-新内容/1-开发工作台/936-1.1.41.md
Normal file
@@ -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
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 问题修复
|
||||
|
||||
- 修复方块易测获取测试端游戏进程失败问题
|
||||
38
mcguide/10-新内容/1-开发工作台/937-1.1.40.md
Normal file
@@ -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调试工具仅顶部分割线才可拖动 变为 右侧分割线均可拖动
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 方块易测连接失败问题修复
|
||||
|
||||
- 修复贴图资源复制问题
|
||||
26
mcguide/10-新内容/1-开发工作台/938-1.1.39.md
Normal file
@@ -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消耗、优化获取进程列表的效率等
|
||||
- 组件编辑界面优化,编辑界面排布与配置界面一致
|
||||
- 日志与调试工具,保存窗口位置和大小以及字号大小为配置,下次打开工具使用保存配置
|
||||
|
||||
## 编辑器
|
||||
|
||||
- 自定义指令支持参数变体配置
|
||||
|
||||

|
||||
|
||||
- 支持批量导入原版方块模型,点击导入-原版方块模型后打开模型所在文件夹,可以选择多个文件导入
|
||||
|
||||
## 问题修复
|
||||
|
||||
- 编辑功能对橡木方块进行旋转操作后变为白桦木方块
|
||||
22
mcguide/10-新内容/1-开发工作台/939-1.1.33.md
Normal file
@@ -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
|
||||
37
mcguide/10-新内容/1-开发工作台/940-1.1.31.md
Normal file
@@ -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部分字段与实际配置不符
|
||||
33
mcguide/10-新内容/1-开发工作台/941-1.1.30.md
Normal file
@@ -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导入地图编辑器后方块颜色错误
|
||||
- 修复放置带有箱子的结构体时内嵌游戏崩溃
|
||||
- 修复配方配置的结果选择自定义物品后属性栏不显示
|
||||
- 修复物品选择器部分物品贴图错误问题
|
||||
35
mcguide/10-新内容/1-开发工作台/942-1.1.29.md
Normal file
@@ -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
|
||||
58
mcguide/10-新内容/1-开发工作台/943-1.1.28.md
Normal file
@@ -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,
|
||||
```
|
||||
|
||||
## 测试配置
|
||||
|
||||
开发测试的配置界面支持搜索作品,方便测试同时加载多个作品的情况。
|
||||
|
||||

|
||||
|
||||
## 新建作品
|
||||
|
||||
新建空白地图和空白附加包支持仅创建。
|
||||
|
||||

|
||||
BIN
mcguide/10-新内容/1-开发工作台/images/241219/1.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/241219/2.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/241219/3.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/241219/4.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250109/1.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250109/2.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250109/3.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250109/4.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250123/1.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250123/2.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250123/3.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250220/1.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250220/2.png
Normal file
|
After Width: | Height: | Size: 438 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250422/0_0.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250527/0_0.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250527/0_1.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250610/0_0.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250610/0_1.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250625/0_0.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250625/0_1.png
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250625/0_2.png
Normal file
|
After Width: | Height: | Size: 293 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250708/0_0.png
Normal file
|
After Width: | Height: | Size: 215 KiB |
BIN
mcguide/10-新内容/1-开发工作台/images/250708/0_1.png
Normal file
|
After Width: | Height: | Size: 183 KiB |
143
mcguide/16-美术/6-模型和动作/12-动作优化规范.md
Normal file
@@ -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皮肤,可通过邮件领取
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
mcguide/16-美术/6-模型和动作/resources/0_1.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
mcguide/16-美术/6-模型和动作/resources/0_2.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
473
mcguide/16-美术/6-模型和动作/resources/standard_steve.geo.json
Normal file
@@ -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]}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
mcguide/16-美术/6-模型和动作/resources/standard_steve.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
mcguide/16-美术/7-材质与着色器/images/netease_outline.png
Normal file
|
After Width: | Height: | Size: 937 KiB |
BIN
mcguide/16-美术/7-材质与着色器/images/netease_outline2.png
Normal file
|
After Width: | Height: | Size: 308 KiB |
@@ -187,12 +187,12 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||
要表现一个属性动画,需要先写一个Json数据块,透明度动画举例如下(相关参数会在下文详细描述):
|
||||
|
||||
```json
|
||||
{
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 1.0,
|
||||
"from" : 0.0,
|
||||
"to" : 1.0
|
||||
}
|
||||
{
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 1.0,
|
||||
"from" : 0.0,
|
||||
"to" : 1.0
|
||||
}
|
||||
```
|
||||
|
||||
这段代码块代表一个控件在1秒钟内alpha值从0线性变化到1的属性动画,为了将这个动画绑定到控件上,一共有两种写法。
|
||||
@@ -200,38 +200,38 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||
一种是将Json数据块直接赋给alpha属性:
|
||||
|
||||
```json
|
||||
{
|
||||
"alphaImg" : {
|
||||
"alpha" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 0.0,
|
||||
"to" : 1.0
|
||||
},
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
另一种则是将属性动画写成自定义控件的形式写在UIjson文件的最外层,在alpha属性值以 “@”+动画名 的形式进行赋值:
|
||||
|
||||
```json
|
||||
{
|
||||
"alphaImg" : {
|
||||
"alpha" : "@show_alpha_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"show_alpha_ani": {
|
||||
{
|
||||
"alphaImg" : {
|
||||
"alpha" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 0.0,
|
||||
"to" : 1.0
|
||||
},
|
||||
}
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
另一种则是将属性动画写成自定义控件的形式写在UIjson文件的最外层,在alpha属性值以 “@”+动画名 的形式进行赋值:
|
||||
|
||||
```json
|
||||
{
|
||||
"alphaImg" : {
|
||||
"alpha" : "@show_alpha_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"show_alpha_ani": {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 0.0,
|
||||
"to" : 1.0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
两种写法都能达成相同的效果,不同的是第二种写法能够被复用。
|
||||
@@ -259,33 +259,34 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||
* 注2
|
||||
|
||||
```json
|
||||
"alphaImg" : {
|
||||
"alpha" : "@show_alpha_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"show_alpha_ani": {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 0.0,
|
||||
"next" : "@hold_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hold_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 1,
|
||||
"from" : 1.0,
|
||||
"next" : "@hide_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hide_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 1.0,
|
||||
"to" : 0.0
|
||||
},
|
||||
|
||||
{
|
||||
"alphaImg" : {
|
||||
"alpha" : "@show_alpha_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"show_alpha_ani": {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 0.0,
|
||||
"next" : "@hold_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hold_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 1,
|
||||
"from" : 1.0,
|
||||
"next" : "@hide_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hide_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 1.0,
|
||||
"to" : 0.0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 透明度动画
|
||||
@@ -301,33 +302,34 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||

|
||||
|
||||
```json
|
||||
"alphaImg" : {
|
||||
"alpha" : "@show_alpha_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"show_alpha_ani": {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 0.0,
|
||||
"next" : "@hold_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hold_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 1,
|
||||
"from" : 1.0,
|
||||
"next" : "@hide_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hide_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 1.0,
|
||||
"to" : 0.0
|
||||
},
|
||||
|
||||
{
|
||||
"alphaImg" : {
|
||||
"alpha" : "@show_alpha_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"show_alpha_ani": {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 0.0,
|
||||
"next" : "@hold_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hold_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 1,
|
||||
"from" : 1.0,
|
||||
"next" : "@hide_alpha_ani",
|
||||
"to" : 1.0
|
||||
},
|
||||
"hide_alpha_ani" : {
|
||||
"anim_type" : "alpha",
|
||||
"duration" : 0.30,
|
||||
"from" : 1.0,
|
||||
"to" : 0.0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 裁剪动画
|
||||
@@ -343,18 +345,19 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||

|
||||
|
||||
```json
|
||||
"clipImg" : {
|
||||
"clip_ratio" : {
|
||||
"anim_type" : "clip",
|
||||
"duration" : 1.0,
|
||||
"from" : 0.0,
|
||||
"to" : 1.0
|
||||
},
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
|
||||
{
|
||||
"clipImg" : {
|
||||
"clip_ratio" : {
|
||||
"anim_type" : "clip",
|
||||
"duration" : 1.0,
|
||||
"from" : 0.0,
|
||||
"to" : 1.0
|
||||
},
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 颜色动画
|
||||
@@ -370,19 +373,20 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||

|
||||
|
||||
```json
|
||||
"colorImg" : {
|
||||
"color": "@color_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"color_ani": {
|
||||
"anim_type" : "color",
|
||||
"duration" : 1.0,
|
||||
"from" : [1,0,0],
|
||||
"to" : [0,0,1]
|
||||
},
|
||||
|
||||
{
|
||||
"colorImg" : {
|
||||
"color": "@color_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"color_ani": {
|
||||
"anim_type" : "color",
|
||||
"duration" : 1.0,
|
||||
"from" : [1,0,0],
|
||||
"to" : [0,0,1]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 序列帧动画
|
||||
@@ -402,20 +406,22 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||

|
||||
|
||||
```json
|
||||
"flipbookImg" : {
|
||||
"texture" : "textures/ui/my_eating_apple",
|
||||
"type" : "image",
|
||||
"uv" : "@flipbook_ani",
|
||||
"uv_size" : [ 64.0, 64.0 ],
|
||||
"visible" : true
|
||||
},
|
||||
"flipbook_ani": {
|
||||
"anim_type": "flip_book",
|
||||
"initial_frame": 10,
|
||||
"frame_count": 36,
|
||||
"fps": 10,
|
||||
"reversible": false
|
||||
},
|
||||
{
|
||||
"flipbookImg" : {
|
||||
"texture" : "textures/ui/my_eating_apple",
|
||||
"type" : "image",
|
||||
"uv" : "@flipbook_ani",
|
||||
"uv_size" : [ 64.0, 64.0 ],
|
||||
"visible" : true
|
||||
},
|
||||
"flipbook_ani": {
|
||||
"anim_type": "flip_book",
|
||||
"initial_frame": 10,
|
||||
"frame_count": 36,
|
||||
"fps": 10,
|
||||
"reversible": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
当一个图片控件被用作序列帧的载体时,该控件的属性配置有以下规则需要遵守:
|
||||
@@ -441,19 +447,20 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||

|
||||
|
||||
```json
|
||||
"offsetImg" : {
|
||||
"offset" : "@offset_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"offset_ani": {
|
||||
"anim_type" : "offset",
|
||||
"duration" : 1.0,
|
||||
"from" : [0, 0],
|
||||
"to" : [0, 50]
|
||||
},
|
||||
|
||||
{
|
||||
"offsetImg" : {
|
||||
"offset" : "@offset_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"offset_ani": {
|
||||
"anim_type" : "offset",
|
||||
"duration" : 1.0,
|
||||
"from" : [0, 0],
|
||||
"to" : [0, 50]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**注**
|
||||
@@ -477,19 +484,20 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||

|
||||
|
||||
```json
|
||||
"sizeImg" : {
|
||||
"size" : "@size_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"size_ani": {
|
||||
"anim_type" : "size",
|
||||
"duration" : 1.0,
|
||||
"from" : [100, 100],
|
||||
"to" : [150, 150]
|
||||
},
|
||||
|
||||
{
|
||||
"sizeImg" : {
|
||||
"size" : "@size_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"size_ani": {
|
||||
"anim_type" : "size",
|
||||
"duration" : 1.0,
|
||||
"from" : [100, 100],
|
||||
"to" : [150, 150]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**注**
|
||||
@@ -513,19 +521,20 @@ uv动画和序列帧动画都是uv起点属性的动画,不同于其他属性
|
||||

|
||||
|
||||
```json
|
||||
"sizeImg" : {
|
||||
"uv" : "@uv_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"uv_ani": {
|
||||
"anim_type" : "uv",
|
||||
"duration" : 5,
|
||||
"from" : [0, 0],
|
||||
"to" : [2240, 0]
|
||||
},
|
||||
|
||||
{
|
||||
"sizeImg" : {
|
||||
"uv" : "@uv_ani",
|
||||
"texture" : "textures/netease/common/image/default",
|
||||
"type" : "image",
|
||||
"visible" : true
|
||||
},
|
||||
"uv_ani": {
|
||||
"anim_type" : "uv",
|
||||
"duration" : 5,
|
||||
"from" : [0, 0],
|
||||
"to" : [2240, 0]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -248,20 +248,20 @@ shootButton的锚点,位移XY,尺寸XY的参考属性如下。按照这种
|
||||
3. 然后激活(显示)对应的界面预设
|
||||
|
||||
```python
|
||||
def InitClient(self):
|
||||
import mod.client.extraClientApi as clientApi
|
||||
self.ListenForEngineEvent(UiInitFinishedEvent, self, self.OnUIInitFinished)
|
||||
def InitClient(self):
|
||||
import mod.client.extraClientApi as clientApi
|
||||
self.ListenForEngineEvent(UiInitFinishedEvent, self, self.OnUIInitFinished)
|
||||
```
|
||||
|
||||
```python
|
||||
def OnUIInitFinished(self, args):
|
||||
import mod.client.extraClientApi as clientApi
|
||||
if clientApi.GetPlatform() == 0:
|
||||
uiNodePreset = self.GetParent().GetChildPresetsByName("PC版UI界面")[0]
|
||||
else:
|
||||
uiNodePreset = self.GetParent().GetChildPresetsByName("PE版UI界面")[0]
|
||||
if uiNodePreset:
|
||||
uiNodePreset.SetUiActive(True)
|
||||
def OnUIInitFinished(self, args):
|
||||
import mod.client.extraClientApi as clientApi
|
||||
if clientApi.GetPlatform() == 0:
|
||||
uiNodePreset = self.GetParent().GetChildPresetsByName("PC版UI界面")[0]
|
||||
else:
|
||||
uiNodePreset = self.GetParent().GetChildPresetsByName("PE版UI界面")[0]
|
||||
if uiNodePreset:
|
||||
uiNodePreset.SetUiActive(True)
|
||||
```
|
||||
|
||||
我们利用[UI API文档](40-UIAPI文档.html)中对各个控件的接口和游戏原生支持的格式化,可以在python代码中动态的改变界面的表现,具体可以参考[样式代码](https://minecraft-zh.gamepedia.com/index.php?title=%E6%A0%B7%E5%BC%8F%E4%BB%A3%E7%A0%81&variant=zh)
|
||||
|
||||
@@ -23,8 +23,8 @@ sidebarDepth: 1
|
||||
ScreenNode的一些有用的函数,界面Node节点的获取方式在[UI使用文档](30-UI说明文档.html)中有详细说明。
|
||||
|
||||
```python
|
||||
import mod.client.extraClientApi as clientApi
|
||||
uiNode = clientApi.GetUI("myModName", "myUIName")
|
||||
import mod.client.extraClientApi as clientApi
|
||||
uiNode = clientApi.GetUI("myModName", "myUIName")
|
||||
```
|
||||
|
||||
假设下文中的函数,uiNode为获取到的ScreenNode继承类,调用的UI界面是按下面的节点树组织结构的
|
||||
|
||||
@@ -116,8 +116,10 @@ CustomUIScreenProxy是原生界面的代理类,可通过extraClientApi.GetUISc
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# coding=utf-8
|
||||
import client.extraClientApi as clientApi
|
||||
CustomUIScreenProxy = clientApi.GetUIScreenProxyCls()
|
||||
ViewBinder = clientApi.GetViewBinderCls()
|
||||
|
||||
|
||||
class PauseScreenProxy(CustomUIScreenProxy):
|
||||
@@ -135,10 +137,10 @@ class PauseScreenProxy(CustomUIScreenProxy):
|
||||
|
||||
@ViewBinder.binding(ViewBinder.BF_ToggleChanged, "#myMod.myToggle")
|
||||
def onToggleChanged(self, args):
|
||||
"""
|
||||
proxy也支持binding,这里展示的是绑定一类toggle(这类toggle甚至可以不存在),这类toggle满足"toggle_name"属性是"#myMod.myToggle"这一要求,当他们发生状态改变的时候就会调用该函数。
|
||||
"""
|
||||
print("myToggle onToggleChanged: {}".format(args))
|
||||
"""
|
||||
proxy也支持binding,这里展示的是绑定一类toggle(这类toggle甚至可以不存在),这类toggle满足"toggle_name"属性是"#myMod.myToggle"这一要求,当他们发生状态改变的时候就会调用该函数。
|
||||
"""
|
||||
print("myToggle onToggleChanged: {}".format(args))
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -387,9 +387,9 @@ def OnItemToggleChecked(self, args):
|
||||
toggleIndex = 0
|
||||
self.mCurItemIndex = toggleIndex
|
||||
itemDict = self.mItemData[self.mCurItemTab][toggleIndex]
|
||||
self.SetSprite(self.mItemIcon, itemDict["icon"])
|
||||
self.SetText(self.mItemName, itemDict["name"])
|
||||
self.SetText(self.mItemDesc, itemDict["desc"])
|
||||
self.GetBaseUIControl(self.mItemIcon).asImage().SetSprite(itemDict["icon"])
|
||||
self.GetBaseUIControl(self.mItemName).asLabel().SetText(itemDict["name"])
|
||||
self.GetBaseUIControl(self.mItemDesc).asLabel().SetText(itemDict["desc"])
|
||||
self.set_control_visible(self.mItemInfoWrap, True)
|
||||
```
|
||||
|
||||
|
||||
BIN
mcguide/18-界面与交互/picture/IntroduceUI/ui_image_clip.png
Normal file
|
After Width: | Height: | Size: 196 KiB |
BIN
mcguide/18-界面与交互/picture/IntroduceUI/ui_image_keep_ratio.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled1.png
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
mcguide/18-界面与交互/picture/IntroduceUI/ui_image_tiled2.png
Normal file
|
After Width: | Height: | Size: 188 KiB |
BIN
mcguide/18-界面与交互/picture/IntroduceUI/ui_modifications.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
@@ -296,6 +296,72 @@ c = Vector3.Cross(a, b)
|
||||
|
||||
## 成员方法
|
||||
|
||||
### x
|
||||
|
||||
- 描述
|
||||
|
||||
返回该向量的x坐标值。
|
||||
|
||||
- 返回值
|
||||
|
||||
| 数据类型 | 说明 |
|
||||
| :------- | :-------------- |
|
||||
| float | 该向量x的坐标值 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
from common.utils.mcmath import Vector3
|
||||
a = Vector3(3.0, 4.0, 0.0)
|
||||
print a.x # 打印 3.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
### y
|
||||
|
||||
- 描述
|
||||
|
||||
返回该向量的y坐标值。
|
||||
|
||||
- 返回值
|
||||
|
||||
| 数据类型 | 说明 |
|
||||
| :------- | :-------------- |
|
||||
| float | 该向量y的坐标值 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
from common.utils.mcmath import Vector3
|
||||
a = Vector3(3.0, 4.0, 0.0)
|
||||
print a.y # 打印 4.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
### z
|
||||
|
||||
- 描述
|
||||
|
||||
返回该向量的z坐标值。
|
||||
|
||||
- 返回值
|
||||
|
||||
| 数据类型 | 说明 |
|
||||
| :------- | :-------------- |
|
||||
| float | 该向量z的坐标值 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
from common.utils.mcmath import Vector3
|
||||
a = Vector3(3.0, 4.0, 0.0)
|
||||
print a.z # 打印 0.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Length
|
||||
|
||||
- 描述
|
||||
|
||||
203
mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/101-3.2版本物品id变更.md
Normal file
@@ -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`。
|
||||
130
mcguide/20-玩法开发/13-模组SDK编程/2-Python脚本开发/102-3.4版本物品id变更.md
Normal file
@@ -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 |
|
||||
73
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/config.json
Normal file
@@ -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"
|
||||
}
|
||||
256
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.0.md
Normal file
@@ -0,0 +1,256 @@
|
||||
# 1.23.0
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.GameObject.GameObject](../预设对象/通用/游戏对象GameObject.md#__init__),游戏对象<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.GameObject.GameObject.LoadFile](../预设对象/通用/游戏对象GameObject.md#loadfile),加载指定路径的非python脚本文件内容<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset](../预设对象/预设/实体预设EntityPreset.md#__init__),实体预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetHealth](../预设对象/预设/实体预设EntityPreset.md#gethealth),获取实体预设的生命值<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetHealth](../预设对象/预设/实体预设EntityPreset.md#sethealth),设置实体预设的生命值<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset](../预设对象/预设/特效预设EffectPreset.md#__init__),特效预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.Play](../预设对象/预设/特效预设EffectPreset.md#play),播放特效<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.Stop](../预设对象/预设/特效预设EffectPreset.md#stop),停止播放特效<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.GetResource](../预设对象/预设/特效预设EffectPreset.md#getresource),获取绑定的json资源<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectPreset.EffectPreset.SetResource](../预设对象/预设/特效预设EffectPreset.md#setresource),设置绑定的json资源<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Transform.Transform](../预设对象/通用/坐标变换Transform.md#__init__),坐标变换Transform<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Transform.Transform.AddOffset](../预设对象/通用/坐标变换Transform.md#addoffset),给坐标变换位置增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Transform.Transform.AddRotation](../预设对象/通用/坐标变换Transform.md#addrotation),给坐标变换旋转增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Transform.Transform.AddScale](../预设对象/通用/坐标变换Transform.md#addscale),给坐标变换缩放增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Transform.Transform.AddTransform](../预设对象/通用/坐标变换Transform.md#addtransform),给坐标变换增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Transform.Transform.GetMatrix](../预设对象/通用/坐标变换Transform.md#getmatrix),获取坐标变换矩阵<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase](../预设对象/零件/零件PartBase.md#__init__),零件基类<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.InitClient](../预设对象/零件/零件PartBase.md#initclient),客户端的零件对象初始化入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.InitServer](../预设对象/零件/零件PartBase.md#initserver),服务端的零件对象初始化入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.TickClient](../预设对象/零件/零件PartBase.md#tickclient),客户端的零件对象逻辑驱动入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.TickServer](../预设对象/零件/零件PartBase.md#tickserver),服务端的零件对象逻辑驱动入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnloadClient](../预设对象/零件/零件PartBase.md#unloadclient),客户端的零件对象卸载逻辑入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnloadServer](../预设对象/零件/零件PartBase.md#unloadserver),服务端的零件对象卸载逻辑入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.DestroyClient](../预设对象/零件/零件PartBase.md#destroyclient),客户端的零件对象销毁逻辑入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.DestroyServer](../预设对象/零件/零件PartBase.md#destroyserver),服务端的零件对象销毁逻辑入口<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.CanAdd](../预设对象/零件/零件PartBase.md#canadd),判断零件是否可以挂接到指定的父节点上<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.GetTickCount](../预设对象/零件/零件PartBase.md#gettickcount),获取当前帧数<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.ListenForEvent](../预设对象/零件/零件PartBase.md#listenforevent),监听指定的事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnListenForEvent](../预设对象/零件/零件PartBase.md#unlistenforevent),反监听指定的事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.DefineEvent](../预设对象/零件/零件PartBase.md#defineevent),定义事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnDefineEvent](../预设对象/零件/零件PartBase.md#undefineevent),反定义事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.BroadcastEvent](../预设对象/零件/零件PartBase.md#broadcastevent),广播事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.BroadcastClientEvent](../预设对象/零件/零件PartBase.md#broadcastclientevent),广播给所有客户端<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.BroadcastServerEvent](../预设对象/零件/零件PartBase.md#broadcastserverevent),广播给所有服务端<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.NotifyToServer](../预设对象/零件/零件PartBase.md#notifytoserver),通知服务端触发事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.NotifyToClient](../预设对象/零件/零件PartBase.md#notifytoclient),通知指定客户端触发事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.BroadcastToAllClient](../预设对象/零件/零件PartBase.md#broadcasttoallclient),通知指所有客户端触发事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.ListenSelfEvent](../预设对象/零件/零件PartBase.md#listenselfevent),监听来自自己的事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnListenSelfEvent](../预设对象/零件/零件PartBase.md#unlistenselfevent),反监听来自自己的事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.ListenPartEvent](../预设对象/零件/零件PartBase.md#listenpartevent),监听来自指定零件的事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnListenPartEvent](../预设对象/零件/零件PartBase.md#unlistenpartevent),反监听来自指定零件的事件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.CreateComponent](../预设对象/零件/零件PartBase.md#createcomponent),给实体创建组件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset](../预设对象/预设/玩家预设PlayerPreset.md#__init__),玩家预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetPlayerId](../预设对象/预设/玩家预设PlayerPreset.md#getplayerid),获取玩家预设的玩家ID<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Block.BlockPreset.BlockPreset](../预设对象/预设/方块预设BlockPreset.md#__init__),方块预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.Block.BlockPreset.BlockPreset.GetEngineTypeStr](../预设对象/预设/方块预设BlockPreset.md#getenginetypestr),获取方块预设的方块类型ID<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.BoxData.BoxData](../预设对象/通用/素材数据BoxData.md#__init__),素材数据<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase](../预设对象/预设/预设基类PresetBase.md#__init__),预设基类<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetIsAlive](../预设对象/预设/预设基类PresetBase.md#getisalive),获取预设的存活状态<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetGameObjectById](../预设对象/预设/预设基类PresetBase.md#getgameobjectbyid),获取当前预设节点底下指定ID的游戏对象<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetGameObjectByEntityId](../预设对象/预设/预设基类PresetBase.md#getgameobjectbyentityid),获取当前预设节点底下指定实体ID的游戏对象<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresets](../预设对象/预设/预设基类PresetBase.md#getchildpresets),获取当前预设的所有子预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresetsByName](../预设对象/预设/预设基类PresetBase.md#getchildpresetsbyname),获取指定名称的所有子预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresetsByType](../预设对象/预设/预设基类PresetBase.md#getchildpresetsbytype),获取指定类型的所有子预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.Replicate](../预设对象/预设/预设基类PresetBase.md#replicate),在指定位置坐标下复制当前预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.RemoveChild](../预设对象/预设/预设基类PresetBase.md#removechild),移除指定的子节点对象<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.AddBoxData](../预设对象/预设/预设基类PresetBase.md#addboxdata),添加指定的素材数据<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.RemoveBoxData](../预设对象/预设/预设基类PresetBase.md#removeboxdata),移除指定的素材数据<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.AddPreset](../预设对象/预设/预设基类PresetBase.md#addpreset),添加指定预设作为子预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.RemovePreset](../预设对象/预设/预设基类PresetBase.md#removepreset),移除指定的子预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.AddPart](../预设对象/预设/预设基类PresetBase.md#addpart),添加指定零件作为子零件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.RemovePart](../预设对象/预设/预设基类PresetBase.md#removepart),移除指定的子零件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetPartsByName](../预设对象/预设/预设基类PresetBase.md#getpartsbyname),获取指定名称的所有零件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetPartByName](../预设对象/预设/预设基类PresetBase.md#getpartbyname),获取指定名称的第一个零件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetPartsByType](../预设对象/预设/预设基类PresetBase.md#getpartsbytype),获取指定类型的所有零件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetPartByType](../预设对象/预设/预设基类PresetBase.md#getpartbytype),获取指定类型的第一个零件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.RemovePartsByType](../预设对象/预设/预设基类PresetBase.md#removepartsbytype),移除指定类型的所有零件<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject](../预设对象/通用/变换对象TransformObject.md#__init__),变换对象<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetDependencyChunks](../预设对象/通用/变换对象TransformObject.md#getdependencychunks),获取所有依赖的chunkPos<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetChildTransformObjects](../预设对象/通用/变换对象TransformObject.md#getchildtransformobjects),获取子TransformObject列表<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetTransformObjects](../预设对象/通用/变换对象TransformObject.md#gettransformobjects),获取TransformObject列表<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetChildGameObjects](../预设对象/通用/变换对象TransformObject.md#getchildgameobjects),获取GameObject列表<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetGameObjects](../预设对象/通用/变换对象TransformObject.md#getgameobjects),获取GameObject列表<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetGameObjectById](../预设对象/通用/变换对象TransformObject.md#getgameobjectbyid),根据ID获取GameObject<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetGameObjectByEntityId](../预设对象/通用/变换对象TransformObject.md#getgameobjectbyentityid),根据实体ID获取GameObject<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetLevelId](../预设对象/通用/变换对象TransformObject.md#getlevelid),获取当前对象所在的level_id<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetDisplayName](../预设对象/通用/变换对象TransformObject.md#getdisplayname),获取当前预设的显示名称<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetDisplayPath](../预设对象/通用/变换对象TransformObject.md#getdisplaypath),获取当前预设到根节点的显示路径<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalTransform](../预设对象/通用/变换对象TransformObject.md#getlocaltransform),获取当前预设的局部坐标变换<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalTransform](../预设对象/通用/变换对象TransformObject.md#setlocaltransform),设置当前预设的局部坐标变换<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalPosition](../预设对象/通用/变换对象TransformObject.md#getlocalposition),获取当前预设的局部坐标位置<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalPosition](../预设对象/通用/变换对象TransformObject.md#setlocalposition),设置当前预设的局部坐标位置<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalRotation](../预设对象/通用/变换对象TransformObject.md#getlocalrotation),获取当前预设的局部坐标旋转<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalRotation](../预设对象/通用/变换对象TransformObject.md#setlocalrotation),设置当前预设的局部坐标旋转<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalScale](../预设对象/通用/变换对象TransformObject.md#getlocalscale),获取当前预设的局部坐标缩放<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetLocalScale](../预设对象/通用/变换对象TransformObject.md#setlocalscale),设置当前预设的局部坐标缩放<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldTransform](../预设对象/通用/变换对象TransformObject.md#getworldtransform),获取当前预设的世界坐标变换<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldMatrix](../预设对象/通用/变换对象TransformObject.md#getworldmatrix),获取世界坐标变换矩阵<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetLocalMatrix](../预设对象/通用/变换对象TransformObject.md#getlocalmatrix),获取局部坐标变换矩阵<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldTransform](../预设对象/通用/变换对象TransformObject.md#setworldtransform),设置当前预设的世界坐标变换<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldPosition](../预设对象/通用/变换对象TransformObject.md#getworldposition),获取当前预设的世界坐标位置<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldPosition](../预设对象/通用/变换对象TransformObject.md#setworldposition),设置当前预设的世界坐标位置<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldRotation](../预设对象/通用/变换对象TransformObject.md#getworldrotation),获取当前预设的世界坐标旋转<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldRotation](../预设对象/通用/变换对象TransformObject.md#setworldrotation),设置当前预设的世界坐标旋转<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetWorldScale](../预设对象/通用/变换对象TransformObject.md#getworldscale),获取当前预设的世界坐标缩放<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetWorldScale](../预设对象/通用/变换对象TransformObject.md#setworldscale),设置当前预设的世界坐标缩放<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalOffset](../预设对象/通用/变换对象TransformObject.md#addlocaloffset),给局部坐标变换位置增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldOffset](../预设对象/通用/变换对象TransformObject.md#addworldoffset),给世界坐标变换位置增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalRotation](../预设对象/通用/变换对象TransformObject.md#addlocalrotation),给局部坐标变换旋转增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldRotation](../预设对象/通用/变换对象TransformObject.md#addworldrotation),给世界坐标变换旋转增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalScale](../预设对象/通用/变换对象TransformObject.md#addlocalscale),给局部坐标变换缩放增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldScale](../预设对象/通用/变换对象TransformObject.md#addworldscale),给世界坐标变换缩放增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddLocalTransform](../预设对象/通用/变换对象TransformObject.md#addlocaltransform),给局部坐标变换增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.AddWorldTransform](../预设对象/通用/变换对象TransformObject.md#addworldtransform),给世界坐标变换增加偏移量<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetRootParent](../预设对象/通用/变换对象TransformObject.md#getrootparent),获取当前预设所在的根预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetParent](../预设对象/通用/变换对象TransformObject.md#getparent),获取当前预设的父预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetParent](../预设对象/通用/变换对象TransformObject.md#setparent),设置当前预设的父预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetManager](../预设对象/通用/变换对象TransformObject.md#getmanager),获取当前预设所在的预设管理器<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.Unload](../预设对象/通用/变换对象TransformObject.md#unload),卸载当前预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.Destroy](../预设对象/通用/变换对象TransformObject.md#destroy),销毁当前预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetAllPresets](../预设管理/PresetApi.md#getallpresets),获取所有预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetBlockPresetByPosition](../预设管理/PresetApi.md#getblockpresetbyposition),获取指定位置的第一个方块预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetGameObjectByEntityId](../预设管理/PresetApi.md#getgameobjectbyentityid),获取指定实体ID的游戏对象<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetGameObjectById](../预设管理/PresetApi.md#getgameobjectbyid),获取指定ID的游戏对象<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetManager](../预设管理/PresetApi.md#getmanager),获取预设管理器<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetPresetByName](../预设管理/PresetApi.md#getpresetbyname),获取指定名称的第一个预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetPresetByType](../预设管理/PresetApi.md#getpresetbytype),获取指定类型的第一个预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetPresetsByName](../预设管理/PresetApi.md#getpresetsbyname),获取指定名称的所有预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetPresetsByType](../预设管理/PresetApi.md#getpresetsbytype),获取指定类型的所有预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetTickCount](../预设管理/PresetApi.md#gettickcount),获取当前帧数<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.LoadPartByModulePath](../预设管理/PresetApi.md#loadpartbymodulepath),通过模块相对路径加载零件并实例化<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.LoadPartByType](../预设管理/PresetApi.md#loadpartbytype),通过类名加载零件并实例化<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.SpawnPreset](../预设管理/PresetApi.md#spawnpreset),在指定坐标变换处生成指定预设<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Parts.PartEvent.OnTriggerEntityEnter](../预设对象/零件/零件事件PartEvent.md#ontriggerentityenter),触发器范围有实体进入时触发<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Parts.PartEvent.OnTriggerEntityExit](../预设对象/零件/零件事件PartEvent.md#ontriggerentityexit),触发器范围有实体离开时触发<!--by gzxuguobin-->
|
||||
|
||||
1. 新增[Preset.Parts.PartEvent.OnTriggerEntityStay](../预设对象/零件/零件事件PartEvent.md#ontriggerentitystay),触发器范围有实体停留时触发<!--by gzxuguobin-->
|
||||
|
||||
770
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.1.md
Normal file
@@ -0,0 +1,770 @@
|
||||
# 1.23.1
|
||||
|
||||
* 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.24大版本更新。
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxHealth](../预设对象/预设/实体预设EntityPreset.md#getmaxhealth),获取实体预设的最大生命值<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxHealth](../预设对象/预设/实体预设EntityPreset.md#setmaxhealth),设置实体预设的最大生命值<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetSpeed](../预设对象/预设/实体预设EntityPreset.md#getspeed),获取实体预设的速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetSpeed](../预设对象/预设/实体预设EntityPreset.md#setspeed),设置实体预设的速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxSpeed](../预设对象/预设/实体预设EntityPreset.md#getmaxspeed),获取实体预设的最大速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxSpeed](../预设对象/预设/实体预设EntityPreset.md#setmaxspeed),设置实体预设的最大速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetDamage](../预设对象/预设/实体预设EntityPreset.md#getdamage),获取实体预设的伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetDamage](../预设对象/预设/实体预设EntityPreset.md#setdamage),设置实体预设的伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxDamage](../预设对象/预设/实体预设EntityPreset.md#getmaxdamage),获取实体预设的最大伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxDamage](../预设对象/预设/实体预设EntityPreset.md#setmaxdamage),设置实体预设的最大伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.ShowHealth](../预设对象/预设/实体预设EntityPreset.md#showhealth),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAttackTarget](../预设对象/预设/实体预设EntityPreset.md#setattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.ResetAttackTarget](../预设对象/预设/实体预设EntityPreset.md#resetattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAttackTarget](../预设对象/预设/实体预设EntityPreset.md#getattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetKnockback](../预设对象/预设/实体预设EntityPreset.md#setknockback),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetOwner](../预设对象/预设/实体预设EntityPreset.md#setowner),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetOwner](../预设对象/预设/实体预设EntityPreset.md#getowner),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsOnFire](../预设对象/预设/实体预设EntityPreset.md#isonfire),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetOnFire](../预设对象/预设/实体预设EntityPreset.md#setonfire),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAttrValue](../预设对象/预设/实体预设EntityPreset.md#getattrvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAttrMaxValue](../预设对象/预设/实体预设EntityPreset.md#getattrmaxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAttrValue](../预设对象/预设/实体预设EntityPreset.md#setattrvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAttrMaxValue](../预设对象/预设/实体预设EntityPreset.md#setattrmaxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsInLava](../预设对象/预设/实体预设EntityPreset.md#isinlava),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsOnGround](../预设对象/预设/实体预设EntityPreset.md#isonground),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetAuxValue](../预设对象/预设/实体预设EntityPreset.md#getauxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetCurrentAirSupply](../预设对象/预设/实体预设EntityPreset.md#getcurrentairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetMaxAirSupply](../预设对象/预设/实体预设EntityPreset.md#getmaxairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetCurrentAirSupply](../预设对象/预设/实体预设EntityPreset.md#setcurrentairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetMaxAirSupply](../预设对象/预设/实体预设EntityPreset.md#setmaxairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsConsumingAirSupply](../预设对象/预设/实体预设EntityPreset.md#isconsumingairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetRecoverTotalAirSupplyTime](../预设对象/预设/实体预设EntityPreset.md#setrecovertotalairsupplytime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetSourceId](../预设对象/预设/实体预设EntityPreset.md#getsourceid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetCollisionBoxSize](../预设对象/预设/实体预设EntityPreset.md#setcollisionboxsize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetCollisionBoxSize](../预设对象/预设/实体预设EntityPreset.md#getcollisionboxsize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetBlockControlAi](../预设对象/预设/实体预设EntityPreset.md#setblockcontrolai),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetDimensionId](../预设对象/预设/实体预设EntityPreset.md#getdimensionid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.ChangeDimension](../预设对象/预设/实体预设EntityPreset.md#changedimension),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.RemoveEffect](../预设对象/预设/实体预设EntityPreset.md#removeeffect),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.AddEffect](../预设对象/预设/实体预设EntityPreset.md#addeffect),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetEffects](../预设对象/预设/实体预设EntityPreset.md#geteffects),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.TriggerCustomEvent](../预设对象/预设/实体预设EntityPreset.md#triggercustomevent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.IsAlive](../预设对象/预设/实体预设EntityPreset.md#isalive),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetGravity](../预设对象/预设/实体预设EntityPreset.md#getgravity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetGravity](../预设对象/预设/实体预设EntityPreset.md#setgravity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetHurt](../预设对象/预设/实体预设EntityPreset.md#sethurt),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetImmuneDamage](../预设对象/预设/实体预设EntityPreset.md#setimmunedamage),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetModAttr](../预设对象/预设/实体预设EntityPreset.md#setmodattr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetModAttr](../预设对象/预设/实体预设EntityPreset.md#getmodattr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.RegisterModAttrUpdateFunc](../预设对象/预设/实体预设EntityPreset.md#registermodattrupdatefunc),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.UnRegisterModAttrUpdateFunc](../预设对象/预设/实体预设EntityPreset.md#unregistermodattrupdatefunc),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.GetName](../预设对象/预设/实体预设EntityPreset.md#getname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetName](../预设对象/预设/实体预设EntityPreset.md#setname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetShowName](../预设对象/预设/实体预设EntityPreset.md#setshowname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetAlwaysShowName](../预设对象/预设/实体预设EntityPreset.md#setalwaysshowname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityPreset.EntityPreset.SetPersistence](../预设对象/预设/实体预设EntityPreset.md#setpersistence),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.GetGameObjectById](../预设对象/零件/零件PartBase.md#getgameobjectbyid),获取指定ID的游戏对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.GetGameObjectByEntityId](../预设对象/零件/零件PartBase.md#getgameobjectbyentityid),获取指定实体ID的游戏对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.CreateGameObjectByEntityId](../预设对象/零件/零件PartBase.md#creategameobjectbyentityid),根据指定实体ID创建游戏对象,已存在则直接返回<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.CreateEventData](../预设对象/零件/零件PartBase.md#createeventdata),反定义事件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.IsSneaking](../预设对象/预设/玩家预设PlayerPreset.md#issneaking),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetHunger](../预设对象/预设/玩家预设PlayerPreset.md#gethunger),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetHunger](../预设对象/预设/玩家预设PlayerPreset.md#sethunger),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetMotion](../预设对象/预设/玩家预设PlayerPreset.md#setmotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetMotion](../预设对象/预设/玩家预设PlayerPreset.md#getmotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetStepHeight](../预设对象/预设/玩家预设PlayerPreset.md#setstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetStepHeight](../预设对象/预设/玩家预设PlayerPreset.md#getstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.ResetStepHeight](../预设对象/预设/玩家预设PlayerPreset.md#resetstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetExp](../预设对象/预设/玩家预设PlayerPreset.md#getexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.AddExp](../预设对象/预设/玩家预设PlayerPreset.md#addexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetTotalExp](../预设对象/预设/玩家预设PlayerPreset.md#gettotalexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetTotalExp](../预设对象/预设/玩家预设PlayerPreset.md#settotalexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.IsFlying](../预设对象/预设/玩家预设PlayerPreset.md#isflying),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.ChangeFlyState](../预设对象/预设/玩家预设PlayerPreset.md#changeflystate),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.GetLevel](../预设对象/预设/玩家预设PlayerPreset.md#getlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.AddLevel](../预设对象/预设/玩家预设PlayerPreset.md#addlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerPreset.PlayerPreset.SetPrefixAndSuffixName](../预设对象/预设/玩家预设PlayerPreset.md#setprefixandsuffixname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcomponent),给实体创建组件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactioncomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAttackTarget](../预设对象/通用/SDK接口封装SdkInterface.md#setentityattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ResetEntityAttackTarget](../预设对象/通用/SDK接口封装SdkInterface.md#resetentityattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAttackTarget](../预设对象/通用/SDK接口封装SdkInterface.md#getentityattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetMobKnockback](../预设对象/通用/SDK接口封装SdkInterface.md#setmobknockback),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorLootComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorlootcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnLootTable](../预设对象/通用/SDK接口封装SdkInterface.md#spawnloottable),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnLootTableWithActor](../预设对象/通用/SDK接口封装SdkInterface.md#spawnloottablewithactor),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorMotionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactormotioncomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetDirFromRot](../预设对象/通用/SDK接口封装SdkInterface.md#getdirfromrot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityMotion](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityMotion](../预设对象/通用/SDK接口封装SdkInterface.md#getentitymotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetInputVector](../预设对象/通用/SDK接口封装SdkInterface.md#getinputvector),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.LockInputVector](../预设对象/通用/SDK接口封装SdkInterface.md#lockinputvector),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.UnlockInputVector](../预设对象/通用/SDK接口封装SdkInterface.md#unlockinputvector),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorOwnerComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorownercomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityOwner](../预设对象/通用/SDK接口封装SdkInterface.md#setentityowner),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityOwner](../预设对象/通用/SDK接口封装SdkInterface.md#getentityowner),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorPushableComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorpushablecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetActorPushable](../预设对象/通用/SDK接口封装SdkInterface.md#setactorpushable),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateAttrComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createattrcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityOnFire](../预设对象/通用/SDK接口封装SdkInterface.md#isentityonfire),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityOnFire](../预设对象/通用/SDK接口封装SdkInterface.md#setentityonfire),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAttrValue](../预设对象/通用/SDK接口封装SdkInterface.md#getentityattrvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAttrMaxValue](../预设对象/通用/SDK接口封装SdkInterface.md#getentityattrmaxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAttrValue](../预设对象/通用/SDK接口封装SdkInterface.md#setentityattrvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAttrMaxValue](../预设对象/通用/SDK接口封装SdkInterface.md#setentityattrmaxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerStepHeight](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerStepHeight](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ResetPlayerStepHeight](../预设对象/通用/SDK接口封装SdkInterface.md#resetplayerstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityInLava](../预设对象/通用/SDK接口封装SdkInterface.md#isentityinlava),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityOnGround](../预设对象/通用/SDK接口封装SdkInterface.md#isentityonground),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateAuxValueComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createauxvaluecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityAuxValue](../预设对象/通用/SDK接口封装SdkInterface.md#getentityauxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBiomeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbiomecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBiomeName](../预设对象/通用/SDK接口封装SdkInterface.md#getbiomename),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createblockcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RegisterBlockPatterns](../预设对象/通用/SDK接口封装SdkInterface.md#registerblockpatterns),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMicroBlockResStr](../预设对象/通用/SDK接口封装SdkInterface.md#createmicroblockresstr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockEntityData](../预设对象/通用/SDK接口封装SdkInterface.md#createblockentitydata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCustomBlockEntityData](../预设对象/通用/SDK接口封装SdkInterface.md#getcustomblockentitydata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockInfoComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createblockinfocomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlock](../预设对象/通用/SDK接口封装SdkInterface.md#getblock),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetBlock](../预设对象/通用/SDK接口封装SdkInterface.md#setblock),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetTopBlockHeight](../预设对象/通用/SDK接口封装SdkInterface.md#gettopblockheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockDestroyTime](../预设对象/通用/SDK接口封装SdkInterface.md#getblockdestroytime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockEntityData](../预设对象/通用/SDK接口封装SdkInterface.md#getblockentitydata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockStateComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createblockstatecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockStates](../预设对象/通用/SDK接口封装SdkInterface.md#getblockstates),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetBlockStates](../预设对象/通用/SDK接口封装SdkInterface.md#setblockstates),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockAuxValueFromStates](../预设对象/通用/SDK接口封装SdkInterface.md#getblockauxvaluefromstates),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBlockStatesFromAuxValue](../预设对象/通用/SDK接口封装SdkInterface.md#getblockstatesfromauxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBlockUseEventWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#createblockuseeventwhitelist),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddBlockItemListenForUseEvent](../预设对象/通用/SDK接口封装SdkInterface.md#addblockitemlistenforuseevent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveBlockItemListenForUseEvent](../预设对象/通用/SDK接口封装SdkInterface.md#removeblockitemlistenforuseevent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearAllListenForBlockUseEventItems](../预设对象/通用/SDK接口封装SdkInterface.md#clearalllistenforblockuseeventitems),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBreathComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbreathcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetUnitBubbleAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#getunitbubbleairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityCurrentAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#getentitycurrentairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityMaxAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#getentitymaxairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityCurrentAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#setentitycurrentairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityMaxAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymaxairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityConsumingAirSupply](../预设对象/通用/SDK接口封装SdkInterface.md#isentityconsumingairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityRecoverTotalAirSupplyTime](../预设对象/通用/SDK接口封装SdkInterface.md#setentityrecovertotalairsupplytime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBulletAttributesComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbulletattributescomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntitySourceId](../预设对象/通用/SDK接口封装SdkInterface.md#getentitysourceid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateChestBlockComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createchestblockcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChestBoxSize](../预设对象/通用/SDK接口封装SdkInterface.md#getchestboxsize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetChestBoxItemNum](../预设对象/通用/SDK接口封装SdkInterface.md#setchestboxitemnum),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetChestBoxItemExchange](../预设对象/通用/SDK接口封装SdkInterface.md#setchestboxitemexchange),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateChunkSourceComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createchunksourcecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetAddArea](../预设对象/通用/SDK接口封装SdkInterface.md#setaddarea),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.DeleteArea](../预设对象/通用/SDK接口封装SdkInterface.md#deletearea),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.DeleteAllArea](../预设对象/通用/SDK接口封装SdkInterface.md#deleteallarea),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetAllAreaKeys](../预设对象/通用/SDK接口封装SdkInterface.md#getallareakeys),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CheckChunkState](../预设对象/通用/SDK接口封装SdkInterface.md#checkchunkstate),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetLoadedChunks](../预设对象/通用/SDK接口封装SdkInterface.md#getloadedchunks),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChunkEntities](../预设对象/通用/SDK接口封装SdkInterface.md#getchunkentities),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChunkMobNum](../预设对象/通用/SDK接口封装SdkInterface.md#getchunkmobnum),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsChunkGenerated](../预设对象/通用/SDK接口封装SdkInterface.md#ischunkgenerated),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCollisionBoxComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcollisionboxcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityCollisionBoxSize](../预设对象/通用/SDK接口封装SdkInterface.md#setentitycollisionboxsize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityCollisionBoxSize](../预设对象/通用/SDK接口封装SdkInterface.md#getentitycollisionboxsize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCommandComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcommandcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetCommand](../预设对象/通用/SDK接口封装SdkInterface.md#setcommand),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCommandPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#getcommandpermissionlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetCommandPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#setcommandpermissionlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetDefaultPlayerPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#getdefaultplayerpermissionlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetDefaultPlayerPermissionLevel](../预设对象/通用/SDK接口封装SdkInterface.md#setdefaultplayerpermissionlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateControlAiComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcontrolaicomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityBlockControlAi](../预设对象/通用/SDK接口封装SdkInterface.md#setentityblockcontrolai),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateDimensionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createdimensioncomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityDimensionId](../预设对象/通用/SDK接口封装SdkInterface.md#getentitydimensionid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangeEntityDimension](../预设对象/通用/SDK接口封装SdkInterface.md#changeentitydimension),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangePlayerDimension](../预设对象/通用/SDK接口封装SdkInterface.md#changeplayerdimension),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.MirrorDimension](../预设对象/通用/SDK接口封装SdkInterface.md#mirrordimension),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateDimension](../预设对象/通用/SDK接口封装SdkInterface.md#createdimension),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RegisterEntityAOIEvent](../预设对象/通用/SDK接口封装SdkInterface.md#registerentityaoievent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.UnRegisterEntityAOIEvent](../预设对象/通用/SDK接口封装SdkInterface.md#unregisterentityaoievent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetUseLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#setuselocaltime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetUseLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#getuselocaltime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#setlocaltime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetLocalTimeOfDay](../预设对象/通用/SDK接口封装SdkInterface.md#setlocaltimeofday),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetLocalTime](../预设对象/通用/SDK接口封装SdkInterface.md#getlocaltime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetLocalDoDayNightCycle](../预设对象/通用/SDK接口封装SdkInterface.md#setlocaldodaynightcycle),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetLocalDoDayNightCycle](../预设对象/通用/SDK接口封装SdkInterface.md#getlocaldodaynightcycle),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEffectComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createeffectcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveEffectFromEntity](../预设对象/通用/SDK接口封装SdkInterface.md#removeeffectfromentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddEffectToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#addeffecttoentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityEffects](../预设对象/通用/SDK接口封装SdkInterface.md#getentityeffects),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEngineTypeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createenginetypecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityEngineTypeStr](../预设对象/通用/SDK接口封装SdkInterface.md#getentityenginetypestr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityEngineType](../预设对象/通用/SDK接口封装SdkInterface.md#getentityenginetype),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEntityEventComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createentityeventcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.TriggerEntityCustomEvent](../预设对象/通用/SDK接口封装SdkInterface.md#triggerentitycustomevent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExtraDataComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createextradatacomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#getextradata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SaveExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#saveextradata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#setextradata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CleanExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#cleanextradata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetWholeExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#getwholeextradata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExpComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createexpcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerExp](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddPlayerExp](../预设对象/通用/SDK接口封装SdkInterface.md#addplayerexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerTotalExp](../预设对象/通用/SDK接口封装SdkInterface.md#getplayertotalexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerTotalExp](../预设对象/通用/SDK接口封装SdkInterface.md#setplayertotalexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetOrbExperience](../预设对象/通用/SDK接口封装SdkInterface.md#getorbexperience),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetOrbExperience](../预设对象/通用/SDK接口封装SdkInterface.md#setorbexperience),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExperienceOrb](../预设对象/通用/SDK接口封装SdkInterface.md#createexperienceorb),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExplosionComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createexplosioncomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateExplosion](../预设对象/通用/SDK接口封装SdkInterface.md#createexplosion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFeatureComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createfeaturecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddNeteaseFeatureWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#addneteasefeaturewhitelist),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveNeteaseFeatureWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#removeneteasefeaturewhitelist),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearAllNeteaseFeatureWhiteList](../预设对象/通用/SDK接口封装SdkInterface.md#clearallneteasefeaturewhitelist),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.LocateStructureFeature](../预设对象/通用/SDK接口封装SdkInterface.md#locatestructurefeature),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.LocateNeteaseFeatureRule](../预设对象/通用/SDK接口封装SdkInterface.md#locateneteasefeaturerule),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFlyComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createflycomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsPlayerFlying](../预设对象/通用/SDK接口封装SdkInterface.md#isplayerflying),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangePlayerFlyState](../预设对象/通用/SDK接口封装SdkInterface.md#changeplayerflystate),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateGameComponent](../预设对象/通用/SDK接口封装SdkInterface.md#creategamecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.KillEntity](../预设对象/通用/SDK接口封装SdkInterface.md#killentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateEngineEntityByTypeStr](../预设对象/通用/SDK接口封装SdkInterface.md#createengineentitybytypestr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.PlaceStructure](../预设对象/通用/SDK接口封装SdkInterface.md#placestructure),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddTimer](../预设对象/通用/SDK接口封装SdkInterface.md#addtimer),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddRepeatedTimer](../预设对象/通用/SDK接口封装SdkInterface.md#addrepeatedtimer),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CancelTimer](../预设对象/通用/SDK接口封装SdkInterface.md#canceltimer),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntitiesInArea](../预设对象/通用/SDK接口封装SdkInterface.md#getentitiesinarea),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntitiesAround](../预设对象/通用/SDK接口封装SdkInterface.md#getentitiesaround),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ShowHealthBar](../预设对象/通用/SDK接口封装SdkInterface.md#showhealthbar),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetNameDeeptest](../预设对象/通用/SDK接口封装SdkInterface.md#setnamedeeptest),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetScreenSize](../预设对象/通用/SDK接口封装SdkInterface.md#getscreensize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetRenderLocalPlayer](../预设对象/通用/SDK接口封装SdkInterface.md#setrenderlocalplayer),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddPickBlacklist](../预设对象/通用/SDK接口封装SdkInterface.md#addpickblacklist),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearPickBlacklist](../预设对象/通用/SDK接口封装SdkInterface.md#clearpickblacklist),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CheckWordsValid](../预设对象/通用/SDK接口封装SdkInterface.md#checkwordsvalid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CheckNameValid](../预设对象/通用/SDK接口封装SdkInterface.md#checknamevalid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetScreenViewInfo](../预设对象/通用/SDK接口封装SdkInterface.md#getscreenviewinfo),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SimulateTouchWithMouse](../预设对象/通用/SDK接口封装SdkInterface.md#simulatetouchwithmouse),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCurrentDimension](../预设对象/通用/SDK接口封装SdkInterface.md#getcurrentdimension),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetChinese](../预设对象/通用/SDK接口封装SdkInterface.md#getchinese),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetDisableHunger](../预设对象/通用/SDK接口封装SdkInterface.md#setdisablehunger),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetOneTipMessage](../预设对象/通用/SDK接口封装SdkInterface.md#setonetipmessage),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPopupNotice](../预设对象/通用/SDK接口封装SdkInterface.md#setpopupnotice),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetTipMessage](../预设对象/通用/SDK接口封装SdkInterface.md#settipmessage),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetNotifyMsg](../预设对象/通用/SDK接口封装SdkInterface.md#setnotifymsg),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerGameType](../预设对象/通用/SDK接口封装SdkInterface.md#getplayergametype),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.HasEntity](../预设对象/通用/SDK接口封装SdkInterface.md#hasentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsEntityAlive](../预设对象/通用/SDK接口封装SdkInterface.md#isentityalive),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateGravityComponent](../预设对象/通用/SDK接口封装SdkInterface.md#creategravitycomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityGravity](../预设对象/通用/SDK接口封装SdkInterface.md#getentitygravity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityGravity](../预设对象/通用/SDK接口封装SdkInterface.md#setentitygravity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateHurtComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createhurtcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetHurtByEntity](../预设对象/通用/SDK接口封装SdkInterface.md#sethurtbyentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetHurtByEntityNew](../预设对象/通用/SDK接口封装SdkInterface.md#sethurtbyentitynew),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityImmuneDamage](../预设对象/通用/SDK接口封装SdkInterface.md#setentityimmunedamage),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateItemBannedComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createitembannedcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddBannedItem](../预设对象/通用/SDK接口封装SdkInterface.md#addbanneditem),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBannedItemList](../预设对象/通用/SDK接口封装SdkInterface.md#getbanneditemlist),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveBannedItem](../预设对象/通用/SDK接口封装SdkInterface.md#removebanneditem),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearBannedItems](../预设对象/通用/SDK接口封装SdkInterface.md#clearbanneditems),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateItemComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createitemcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemBasicInfo](../预设对象/通用/SDK接口封装SdkInterface.md#getitembasicinfo),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ClearPlayerOffHand](../预设对象/通用/SDK接口封装SdkInterface.md#clearplayeroffhand),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerItem](../预设对象/通用/SDK接口封装SdkInterface.md#getplayeritem),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangePlayerItemTipsAndExtraId](../预设对象/通用/SDK接口封装SdkInterface.md#changeplayeritemtipsandextraid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddEnchantToInvItem](../预设对象/通用/SDK接口封装SdkInterface.md#addenchanttoinvitem),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetInvItemEnchantData](../预设对象/通用/SDK接口封装SdkInterface.md#getinvitemenchantdata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetOffhandItem](../预设对象/通用/SDK接口封装SdkInterface.md#getoffhanditem),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetInvItemNum](../预设对象/通用/SDK接口封装SdkInterface.md#setinvitemnum),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnItemToLevel](../预设对象/通用/SDK接口封装SdkInterface.md#spawnitemtolevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnItemToPlayerInv](../预设对象/通用/SDK接口封装SdkInterface.md#spawnitemtoplayerinv),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnItemToPlayerCarried](../预设对象/通用/SDK接口封装SdkInterface.md#spawnitemtoplayercarried),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetCarriedItem](../预设对象/通用/SDK接口封装SdkInterface.md#getcarrieditem),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetSlotId](../预设对象/通用/SDK接口封装SdkInterface.md#getslotid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemFormattedHoverText](../预设对象/通用/SDK接口封装SdkInterface.md#getitemformattedhovertext),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemHoverName](../预设对象/通用/SDK接口封装SdkInterface.md#getitemhovername),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetItemEffectName](../预设对象/通用/SDK接口封装SdkInterface.md#getitemeffectname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetUserDataInEvent](../预设对象/通用/SDK接口封装SdkInterface.md#getuserdatainevent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ChangeItemTexture](../预设对象/通用/SDK接口封装SdkInterface.md#changeitemtexture),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateLvComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createlvcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerLevel](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddPlayerLevel](../预设对象/通用/SDK接口封装SdkInterface.md#addplayerlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMobSpawnComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmobspawncomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SpawnCustomModule](../预设对象/通用/SDK接口封装SdkInterface.md#spawncustommodule),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateModAttrComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmodattrcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityModAttr](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymodattr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityModAttr](../预设对象/通用/SDK接口封装SdkInterface.md#getentitymodattr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RegisterEntityModAttrUpdateFunc](../预设对象/通用/SDK接口封装SdkInterface.md#registerentitymodattrupdatefunc),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.UnRegisterEntityModAttrUpdateFunc](../预设对象/通用/SDK接口封装SdkInterface.md#unregisterentitymodattrupdatefunc),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateModelComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmodelcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityOpacity](../预设对象/通用/SDK接口封装SdkInterface.md#setentityopacity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.PlayEntityAnim](../预设对象/通用/SDK接口封装SdkInterface.md#playentityanim),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetModelId](../预设对象/通用/SDK接口封装SdkInterface.md#getmodelid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityModel](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymodel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ResetEntityModel](../预设对象/通用/SDK接口封装SdkInterface.md#resetentitymodel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.BindModelToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#bindmodeltoentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.UnBindModelToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#unbindmodeltoentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMoveToComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmovetocomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityMoveSetting](../预设对象/通用/SDK接口封装SdkInterface.md#setentitymovesetting),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateMsgComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createmsgcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SendMsg](../预设对象/通用/SDK接口封装SdkInterface.md#sendmsg),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SendMsgToPlayer](../预设对象/通用/SDK接口封装SdkInterface.md#sendmsgtoplayer),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.NotifyOneMessage](../预设对象/通用/SDK接口封装SdkInterface.md#notifyonemessage),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateNameComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createnamecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityName](../预设对象/通用/SDK接口封装SdkInterface.md#getentityname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityName](../预设对象/通用/SDK接口封装SdkInterface.md#setentityname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerPrefixAndSuffixName](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerprefixandsuffixname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityShowName](../预设对象/通用/SDK接口封装SdkInterface.md#setentityshowname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityAlwaysShowName](../预设对象/通用/SDK接口封装SdkInterface.md#setentityalwaysshowname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePersistenceComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createpersistencecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityPersistence](../预设对象/通用/SDK接口封装SdkInterface.md#setentitypersistence),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePetComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createpetcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.DisablePet](../预设对象/通用/SDK接口封装SdkInterface.md#disablepet),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.EnablePet](../预设对象/通用/SDK接口封装SdkInterface.md#enablepet),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePlayerComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createplayercomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.IsPlayerSneaking](../预设对象/零件/零件PartBase.md#isplayersneaking),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerHunger](../预设对象/零件/零件PartBase.md#getplayerhunger),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerHunger](../预设对象/零件/零件PartBase.md#setplayerhunger),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePortalComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createportalcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePosComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createposcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityPos](../预设对象/通用/SDK接口封装SdkInterface.md#getentitypos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityFootPos](../预设对象/通用/SDK接口封装SdkInterface.md#getentityfootpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityPos](../预设对象/通用/SDK接口封装SdkInterface.md#setentitypos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityFootPos](../预设对象/通用/SDK接口封装SdkInterface.md#setentityfootpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateProjectileComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createprojectilecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateProjectileEntity](../预设对象/通用/SDK接口封装SdkInterface.md#createprojectileentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRecipeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createrecipecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetRecipeResult](../预设对象/通用/SDK接口封装SdkInterface.md#getreciperesult),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetRecipesByResult](../预设对象/通用/SDK接口封装SdkInterface.md#getrecipesbyresult),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetRecipesByInput](../预设对象/通用/SDK接口封装SdkInterface.md#getrecipesbyinput),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRedStoneComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createredstonecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRideComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createridecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateRotComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createrotcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityRot](../预设对象/通用/SDK接口封装SdkInterface.md#getentityrot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityRot](../预设对象/通用/SDK接口封装SdkInterface.md#setentityrot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetEntityLookAtPos](../预设对象/通用/SDK接口封装SdkInterface.md#setentitylookatpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetBodyRot](../预设对象/通用/SDK接口封装SdkInterface.md#getbodyrot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.LockLocalPlayerRot](../预设对象/通用/SDK接口封装SdkInterface.md#locklocalplayerrot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerLookAtPos](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerlookatpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateScaleComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createscalecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTameComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtamecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTimeComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtimecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetTime](../预设对象/通用/SDK接口封装SdkInterface.md#gettime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateWeatherComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createweathercomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorCollidableComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorcollidablecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateActorRenderComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createactorrendercomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCustomAudioComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcustomaudiocomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateBrightnessComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createbrightnesscomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateCameraComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createcameracomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.PickFacing](../预设对象/通用/SDK接口封装SdkInterface.md#pickfacing),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFogComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createfogcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniControlComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeanicontrolcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniLoop](../预设对象/通用/SDK接口封装SdkInterface.md#setframeaniloop),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniFaceCamera](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanifacecamera),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniDeepTest](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanideeptest),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniEntityBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeanientitybindcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniSkeletonBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeaniskeletonbindcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateFrameAniTransComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createframeanitranscomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniPos](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanipos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniRot](../预设对象/通用/SDK接口封装SdkInterface.md#setframeanirot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetFrameAniScale](../预设对象/通用/SDK接口封装SdkInterface.md#setframeaniscale),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateHealthComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createhealthcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ShowEntityHealth](../预设对象/通用/SDK接口封装SdkInterface.md#showentityhealth),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateOperationComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createoperationcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetCanAll](../预设对象/通用/SDK接口封装SdkInterface.md#setcanall),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateDeviceComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createdevicecomponent),创建device组件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleControlComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticlecontrolcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleEntityBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticleentitybindcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleSkeletonBindComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticleskeletonbindcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateParticleTransComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createparticletranscomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetParticlePos](../预设对象/通用/SDK接口封装SdkInterface.md#setparticlepos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetParticleRot](../预设对象/通用/SDK接口封装SdkInterface.md#setparticlerot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePlayerViewComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createplayerviewcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetPlayerPerspective](../预设对象/通用/SDK接口封装SdkInterface.md#getplayerperspective),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SetPlayerPerspective](../预设对象/通用/SDK接口封装SdkInterface.md#setplayerperspective),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.LockPlayerPerspective](../预设对象/通用/SDK接口封装SdkInterface.md#lockplayerperspective),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateQueryVariableComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createqueryvariablecomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateSkyRenderComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createskyrendercomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTextBoardComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtextboardcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateTextNotifyClientComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createtextnotifyclientcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateConfigClientComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createconfigclientcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreateVirtualWorldComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createvirtualworldcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePlayerAnimComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createplayeranimcomponent),组件工厂化<!--by xgb-->
|
||||
|
||||
24
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.2.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# 1.23.2
|
||||
|
||||
* 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.24大版本更新。
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetServerSystem](../预设对象/通用/SDK接口封装SdkInterface.md#getserversystem),返回当前对象可使用的服务端system<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetClientSystem](../预设对象/通用/SDK接口封装SdkInterface.md#getclientsystem),返回当前对象可使用的客户端system<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetSystem](../预设对象/通用/SDK接口封装SdkInterface.md#getsystem),返回当前对象可使用的system<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.UI.UIPreset.UIPreset](../预设对象/预设/界面预设UIPreset.md#__init__),界面预设<!--by panlei01-->
|
||||
|
||||
1. 新增[Preset.Model.UI.UIPreset.UIPreset.SetUiActive](../预设对象/预设/界面预设UIPreset.md#setuiactive),界面预设<!--by panlei01-->
|
||||
|
||||
1. 新增[Preset.Model.UI.UIPreset.UIPreset.GetUiActive](../预设对象/预设/界面预设UIPreset.md#getuiactive),界面预设<!--by panlei01-->
|
||||
|
||||
1. 新增[Preset.Model.UI.UIPreset.UIPreset.SetUiVisible](../预设对象/预设/界面预设UIPreset.md#setuivisible),界面预设<!--by panlei01-->
|
||||
|
||||
1. 新增[Preset.Model.UI.UIPreset.UIPreset.GetUiVisible](../预设对象/预设/界面预设UIPreset.md#getuivisible),界面预设<!--by panlei01-->
|
||||
|
||||
1. 新增[Preset.Model.UI.UIPreset.UIPreset.GetScreenNode](../预设对象/预设/界面预设UIPreset.md#getscreennode),界面预设<!--by panlei01-->
|
||||
|
||||
21
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.3.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# 1.23.3
|
||||
|
||||
- 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.24大版本更新。
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.LogDebug](../预设对象/零件/零件PartBase.md#logdebug),打印调试日志,仅PC开发包有效<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.LogInfo](../预设对象/零件/零件PartBase.md#loginfo),打印消息日志<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.LogError](../预设对象/零件/零件PartBase.md#logerror),打印错误日志<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.ListenForEngineEvent](../预设对象/零件/零件PartBase.md#listenforengineevent),监听指定的引擎事件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnListenForEngineEvent](../预设对象/零件/零件PartBase.md#unlistenforengineevent),反监听指定的引擎事件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetApi](../预设对象/零件/零件PartBase.md#getapi),返回当前对象可使用的SDK API模块<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#getextradata),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.SaveExtraData](../预设对象/通用/SDK接口封装SdkInterface.md#saveextradata),组件工厂化<!--by xgb-->
|
||||
|
||||
225
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.23.4.md
Normal file
@@ -0,0 +1,225 @@
|
||||
# 1.23.4
|
||||
|
||||
- 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.25大版本更新。
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectObject.EffectObject](../预设对象/预设/特效对象EffectObject.md#__init__),特效对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectObject.EffectObject.Play](../预设对象/预设/特效对象EffectObject.md#play),播放特效<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectObject.EffectObject.Stop](../预设对象/预设/特效对象EffectObject.md#stop),停止播放特效<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectObject.EffectObject.BindToEntity](../预设对象/预设/特效对象EffectObject.md#bindtoentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Effect.EffectObject.EffectObject.BindToSkeleton](../预设对象/预设/特效对象EffectObject.md#bindtoskeleton),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject](../预设对象/预设/玩家对象PlayerObject.md#__init__),玩家对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetPlayerId](../预设对象/预设/玩家对象PlayerObject.md#getplayerid),获取玩家预设的玩家ID<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.IsLocalPlayer](../预设对象/预设/玩家对象PlayerObject.md#islocalplayer),判断当前玩家对象是否本地玩家,服务端为False<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.IsSneaking](../预设对象/预设/玩家对象PlayerObject.md#issneaking),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetHunger](../预设对象/预设/玩家对象PlayerObject.md#gethunger),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetHunger](../预设对象/预设/玩家对象PlayerObject.md#sethunger),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetMotion](../预设对象/预设/玩家对象PlayerObject.md#setmotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetMotion](../预设对象/预设/玩家对象PlayerObject.md#getmotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetStepHeight](../预设对象/预设/玩家对象PlayerObject.md#setstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetStepHeight](../预设对象/预设/玩家对象PlayerObject.md#getstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.ResetStepHeight](../预设对象/预设/玩家对象PlayerObject.md#resetstepheight),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetExp](../预设对象/预设/玩家对象PlayerObject.md#getexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddExp](../预设对象/预设/玩家对象PlayerObject.md#addexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetTotalExp](../预设对象/预设/玩家对象PlayerObject.md#gettotalexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetTotalExp](../预设对象/预设/玩家对象PlayerObject.md#settotalexp),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.IsFlying](../预设对象/预设/玩家对象PlayerObject.md#isflying),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.ChangeFlyState](../预设对象/预设/玩家对象PlayerObject.md#changeflystate),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.GetLevel](../预设对象/预设/玩家对象PlayerObject.md#getlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddLevel](../预设对象/预设/玩家对象PlayerObject.md#addlevel),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetPrefixAndSuffixName](../预设对象/预设/玩家对象PlayerObject.md#setprefixandsuffixname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.GetPlayerObject](../预设对象/零件/零件PartBase.md#getplayerobject),获取玩家对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.GetEntityObject](../预设对象/零件/零件PartBase.md#getentityobject),获取实体对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.GetEffectObject](../预设对象/零件/零件PartBase.md#geteffectobject),获取特效对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.CreateEffectPreset](../预设对象/零件/零件PartBase.md#createeffectpreset),创建特效对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetChildPresetsByName](../预设对象/预设/预设基类PresetBase.md#getchildpresetsbyname),增加递归查找参数<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetChildObjectByTypeName](../预设对象/预设/预设基类PresetBase.md#getchildobjectbytypename),获取指定类型和名称的第一个游戏对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.GetChildObjectsByTypeName](../预设对象/预设/预设基类PresetBase.md#getchildobjectsbytypename),获取指定类型和名称的第一个游戏对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.GetEntityId](../预设对象/通用/SDK接口封装SdkInterface.md#getentityid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ToPlayerPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toplayerpreset),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ToEntityPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toentitypreset),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ToEffectPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toeffectpreset),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ToBlockPreset](../预设对象/通用/SDK接口封装SdkInterface.md#toblockpreset),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.ToUIPreset](../预设对象/通用/SDK接口封装SdkInterface.md#touipreset),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.DestroyEntity](../预设对象/通用/SDK接口封装SdkInterface.md#destroyentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.BindFrameAniToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#bindframeanitoentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.BindFrameAniToSkeleton](../预设对象/通用/SDK接口封装SdkInterface.md#bindframeanitoskeleton),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.BindParticleToEntity](../预设对象/通用/SDK接口封装SdkInterface.md#bindparticletoentity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.BindParticleToSkeleton](../预设对象/通用/SDK接口封装SdkInterface.md#bindparticletoskeleton),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject](../预设对象/预设/实体对象EntityObject.md#__init__),实体对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetEngineTypeStr](../预设对象/预设/实体对象EntityObject.md#getenginetypestr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetEngineType](../预设对象/预设/实体对象EntityObject.md#getenginetype),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetModelId](../预设对象/预设/实体对象EntityObject.md#getmodelid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.PlayAnim](../预设对象/预设/实体对象EntityObject.md#playanim),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetOpacity](../预设对象/预设/实体对象EntityObject.md#setopacity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetHealth](../预设对象/预设/实体对象EntityObject.md#gethealth),获取实体预设的生命值<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetHealth](../预设对象/预设/实体对象EntityObject.md#sethealth),设置实体预设的生命值<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxHealth](../预设对象/预设/实体对象EntityObject.md#getmaxhealth),获取实体预设的最大生命值<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxHealth](../预设对象/预设/实体对象EntityObject.md#setmaxhealth),设置实体预设的最大生命值<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetSpeed](../预设对象/预设/实体对象EntityObject.md#getspeed),获取实体预设的速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetSpeed](../预设对象/预设/实体对象EntityObject.md#setspeed),设置实体预设的速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxSpeed](../预设对象/预设/实体对象EntityObject.md#getmaxspeed),获取实体预设的最大速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxSpeed](../预设对象/预设/实体对象EntityObject.md#setmaxspeed),设置实体预设的最大速度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetDamage](../预设对象/预设/实体对象EntityObject.md#getdamage),获取实体预设的伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetDamage](../预设对象/预设/实体对象EntityObject.md#setdamage),设置实体预设的伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxDamage](../预设对象/预设/实体对象EntityObject.md#getmaxdamage),获取实体预设的最大伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxDamage](../预设对象/预设/实体对象EntityObject.md#setmaxdamage),设置实体预设的最大伤害<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.ShowHealth](../预设对象/预设/实体对象EntityObject.md#showhealth),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAttackTarget](../预设对象/预设/实体对象EntityObject.md#setattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.ResetAttackTarget](../预设对象/预设/实体对象EntityObject.md#resetattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAttackTarget](../预设对象/预设/实体对象EntityObject.md#getattacktarget),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetKnockback](../预设对象/预设/实体对象EntityObject.md#setknockback),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetOwner](../预设对象/预设/实体对象EntityObject.md#setowner),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetOwner](../预设对象/预设/实体对象EntityObject.md#getowner),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsOnFire](../预设对象/预设/实体对象EntityObject.md#isonfire),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetOnFire](../预设对象/预设/实体对象EntityObject.md#setonfire),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAttrValue](../预设对象/预设/实体对象EntityObject.md#getattrvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAttrMaxValue](../预设对象/预设/实体对象EntityObject.md#getattrmaxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAttrValue](../预设对象/预设/实体对象EntityObject.md#setattrvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAttrMaxValue](../预设对象/预设/实体对象EntityObject.md#setattrmaxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsInLava](../预设对象/预设/实体对象EntityObject.md#isinlava),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsOnGround](../预设对象/预设/实体对象EntityObject.md#isonground),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetAuxValue](../预设对象/预设/实体对象EntityObject.md#getauxvalue),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetCurrentAirSupply](../预设对象/预设/实体对象EntityObject.md#getcurrentairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxAirSupply](../预设对象/预设/实体对象EntityObject.md#getmaxairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCurrentAirSupply](../预设对象/预设/实体对象EntityObject.md#setcurrentairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxAirSupply](../预设对象/预设/实体对象EntityObject.md#setmaxairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsConsumingAirSupply](../预设对象/预设/实体对象EntityObject.md#isconsumingairsupply),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetRecoverTotalAirSupplyTime](../预设对象/预设/实体对象EntityObject.md#setrecovertotalairsupplytime),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetSourceId](../预设对象/预设/实体对象EntityObject.md#getsourceid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCollisionBoxSize](../预设对象/预设/实体对象EntityObject.md#setcollisionboxsize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetCollisionBoxSize](../预设对象/预设/实体对象EntityObject.md#getcollisionboxsize),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetBlockControlAi](../预设对象/预设/实体对象EntityObject.md#setblockcontrolai),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetDimensionId](../预设对象/预设/实体对象EntityObject.md#getdimensionid),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.ChangeDimension](../预设对象/预设/实体对象EntityObject.md#changedimension),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.RemoveEffect](../预设对象/预设/实体对象EntityObject.md#removeeffect),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddEffect](../预设对象/预设/实体对象EntityObject.md#addeffect),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetEffects](../预设对象/预设/实体对象EntityObject.md#geteffects),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.TriggerCustomEvent](../预设对象/预设/实体对象EntityObject.md#triggercustomevent),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.IsAlive](../预设对象/预设/实体对象EntityObject.md#isalive),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetGravity](../预设对象/预设/实体对象EntityObject.md#getgravity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetGravity](../预设对象/预设/实体对象EntityObject.md#setgravity),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetHurt](../预设对象/预设/实体对象EntityObject.md#sethurt),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetImmuneDamage](../预设对象/预设/实体对象EntityObject.md#setimmunedamage),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetModAttr](../预设对象/预设/实体对象EntityObject.md#setmodattr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetModAttr](../预设对象/预设/实体对象EntityObject.md#getmodattr),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.RegisterModAttrUpdateFunc](../预设对象/预设/实体对象EntityObject.md#registermodattrupdatefunc),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.UnRegisterModAttrUpdateFunc](../预设对象/预设/实体对象EntityObject.md#unregistermodattrupdatefunc),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetName](../预设对象/预设/实体对象EntityObject.md#getname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetName](../预设对象/预设/实体对象EntityObject.md#setname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetShowName](../预设对象/预设/实体对象EntityObject.md#setshowname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetAlwaysShowName](../预设对象/预设/实体对象EntityObject.md#setalwaysshowname),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetPersistence](../预设对象/预设/实体对象EntityObject.md#setpersistence),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetGameObjectByTypeName](../预设管理/PresetApi.md#getgameobjectbytypename),获取指定类型和名称的第一个游戏对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetGameObjectsByTypeName](../预设管理/PresetApi.md#getgameobjectsbytypename),获取指定类型和名称的所有游戏对象<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetPartApi](../预设管理/PresetApi.md#getpartapi),获取零件API<!--by xgb-->
|
||||
|
||||
29
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.0.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 1.24.0
|
||||
|
||||
- 注:该版本功能仅在modpc开发包生效,移动端生效请期待1.25大版本更新。
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.EnableKeepInventory](../预设对象/预设/玩家对象PlayerObject.md#enablekeepinventory),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.GetLoadedPlayers](../预设对象/零件/零件PartBase.md#getloadedplayers),获取服务器所有玩家的ID列表<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.BroadcastPresetSystemEvent](../预设对象/零件/零件PartBase.md#broadcastpresetsystemevent),广播给预设系统<!--by zqh-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.ListenPresetSystemEvent](../预设对象/零件/零件PartBase.md#listenpresetsystemevent),监听来自预设系统的事件<!--by zqh-->
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.UnListenPresetSystemEvent](../预设对象/零件/零件PartBase.md#unlistenpresetsystemevent),反监听来自预设系统的事件<!--by zqh-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.EnablePlayerKeepInventory](../预设对象/通用/SDK接口封装SdkInterface.md#enableplayerkeepinventory),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetPos](../预设对象/预设/实体对象EntityObject.md#getpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetFootPos](../预设对象/预设/实体对象EntityObject.md#getfootpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetPos](../预设对象/预设/实体对象EntityObject.md#setpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetFootPos](../预设对象/预设/实体对象EntityObject.md#setfootpos),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetRot](../预设对象/预设/实体对象EntityObject.md#getrot),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetRot](../预设对象/预设/实体对象EntityObject.md#setrot),组件工厂化<!--by xgb-->
|
||||
|
||||
32
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.24.1.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# 1.24.1
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetId](../预设对象/通用/变换对象TransformObject.md#getid),获取当前预设的ID<!--by czk-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.AddBlockProtectField](../预设对象/通用/SDK接口封装SdkInterface.md#addblockprotectfield),设置一个方块无法被玩家/实体破坏的区域<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.RemoveBlockProtectField](../预设对象/通用/SDK接口封装SdkInterface.md#removeblockprotectfield),取消一个方块无法被玩家/实体破坏的区域<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CleanBlockProtectField](../预设对象/通用/SDK接口封装SdkInterface.md#cleanblockprotectfield),取消全部已设置的方块无法被玩家/实体破坏的区域<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.TriggerPart.TriggerPart](../预设对象/零件/触发器零件TriggerPart.md#__init__),触发器零件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.TriggerPart.TriggerPart.GetEntitiesInTrigger](../预设对象/零件/触发器零件TriggerPart.md#getentitiesintrigger),获取当前在触发器区域的实体列表<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.NavPointsPart.NavPointsPart](../预设对象/零件/导航路径零件NavPointsPart.md#__init__),导航路径零件<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.EntityBasePart.EntityBasePart](../预设对象/零件/实体零件EntityBasePart.md#__init__),实体零件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.EntityBasePart.EntityBasePart.CreateVirtualEntity](../预设对象/零件/实体零件EntityBasePart.md#createvirtualentity),手动创建关联实体<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.EntityBasePart.EntityBasePart.DestroyVirtualEntity](../预设对象/零件/实体零件EntityBasePart.md#destroyvirtualentity),移除已创建的关联实体<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart](../预设对象/零件/相机轨迹CameraTrackPart.md#__init__),相机轨迹零件<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.PortalPart.PortalPart](../预设对象/零件/传送门零件PortalPart.md#__init__),传送门零件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.PlayerBasicPart.PlayerBasicPart](../预设对象/零件/玩家基础属性零件PlayerBasicPart.md#__init__),玩家基础属性零件<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.WorldPart.WorldPart](../预设对象/零件/世界属性零件WorldPart.md#__init__),世界属性零件<!--by xgb-->
|
||||
|
||||
22
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/1.25.0.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# 1.25.0
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.PresetBase.PresetBase.SetBlockProtect](../预设对象/预设/预设基类PresetBase.md#setblockprotect),设置预设内的所有素材区域的方块保护状态<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.GameObject.type.fromDict](../预设对象/通用/游戏对象GameObject.md#fromdict),将字典根据classType字段转换为对应类型的对象,该类型必须使用@registerGenericClass装饰<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.NavPointsPart.NavPointsPart](../预设对象/零件/导航路径零件NavPointsPart.md#__init__),导航路径零件<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.NavPointsPart.NavPointsPart.GetNavigationPoints](../预设对象/零件/导航路径零件NavPointsPart.md#getnavigationpoints),获得路径点的世界坐标列表<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart](../预设对象/零件/相机轨迹CameraTrackPart.md#__init__),相机轨迹零件<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.PlayFromStart](../预设对象/零件/相机轨迹CameraTrackPart.md#playfromstart),从头开始播放相机运动轨迹<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.Pause](../预设对象/零件/相机轨迹CameraTrackPart.md#pause),暂停播放相机轨迹<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.Continue](../预设对象/零件/相机轨迹CameraTrackPart.md#continue),继续播放相机轨迹<!--by panlei-->
|
||||
|
||||
1. 新增[Preset.Parts.CameraTrackPart.CameraTrackPart.Stop](../预设对象/零件/相机轨迹CameraTrackPart.md#stop),停止播放相机轨迹<!--by panlei-->
|
||||
|
||||
10
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.1.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# 2.0.1
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMotion](../预设对象/预设/实体对象EntityObject.md#setmotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMotion](../预设对象/预设/实体对象EntityObject.md#getmotion),组件工厂化<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Parts.NavPointsPart.NavPointsPart.GetNavigationRadius](../预设对象/零件/导航路径零件NavPointsPart.md#getnavigationradius),获得路径点的随机半径列表<!--by panlei-->
|
||||
|
||||
76
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.2.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# 2.0.2
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddAnimation](../预设对象/预设/玩家对象PlayerObject.md#addanimation),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetHealthLevel](../预设对象/预设/玩家对象PlayerObject.md#sethealthlevel),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetStarveLevel](../预设对象/预设/玩家对象PlayerObject.md#setstarvelevel),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetNaturalStarve](../预设对象/预设/玩家对象PlayerObject.md#setnaturalstarve),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetStarveTick](../预设对象/预设/玩家对象PlayerObject.md#setstarvetick),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetNaturalRegen](../预设对象/预设/玩家对象PlayerObject.md#setnaturalregen),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetHealthTick](../预设对象/预设/玩家对象PlayerObject.md#sethealthtick),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetMaxExhaustionValue](../预设对象/预设/玩家对象PlayerObject.md#setmaxexhaustionvalue),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetPickUpArea](../预设对象/预设/玩家对象PlayerObject.md#setpickuparea),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetJumpable](../预设对象/预设/玩家对象PlayerObject.md#setjumpable),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetMovable](../预设对象/预设/玩家对象PlayerObject.md#setmovable),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddAnimationController](../预设对象/预设/玩家对象PlayerObject.md#addanimationcontroller),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddAnimationIntoState](../预设对象/预设/玩家对象PlayerObject.md#addanimationintostate),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddGeometry](../预设对象/预设/玩家对象PlayerObject.md#addgeometry),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddParticleEffect](../预设对象/预设/玩家对象PlayerObject.md#addparticleeffect),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddRenderController](../预设对象/预设/玩家对象PlayerObject.md#addrendercontroller),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddRenderMaterial](../预设对象/预设/玩家对象PlayerObject.md#addrendermaterial),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddSoundEffect](../预设对象/预设/玩家对象PlayerObject.md#addsoundeffect),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.AddTexture](../预设对象/预设/玩家对象PlayerObject.md#addtexture),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Player.PlayerObject.PlayerObject.SetSkin](../预设对象/预设/玩家对象PlayerObject.md#setskin),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetItem](../预设对象/预设/实体对象EntityObject.md#setitem),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCanOtherPlayerRide](../预设对象/预设/实体对象EntityObject.md#setcanotherplayerride),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetControl](../预设对象/预设/实体对象EntityObject.md#setcontrol),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetRidePos](../预设对象/预设/实体对象EntityObject.md#setridepos),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetNotRender](../预设对象/预设/实体对象EntityObject.md#setnotrender),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetCollidable](../预设对象/预设/实体对象EntityObject.md#setcollidable),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetHealthColor](../预设对象/预设/实体对象EntityObject.md#sethealthcolor),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddAnimation](../预设对象/预设/实体对象EntityObject.md#addanimation),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddAnimationController](../预设对象/预设/实体对象EntityObject.md#addanimationcontroller),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddScriptAnimate](../预设对象/预设/实体对象EntityObject.md#addscriptanimate),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddParticleEffect](../预设对象/预设/实体对象EntityObject.md#addparticleeffect),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddRenderController](../预设对象/预设/实体对象EntityObject.md#addrendercontroller),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddRenderMaterial](../预设对象/预设/实体对象EntityObject.md#addrendermaterial),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.AddSoundEffect](../预设对象/预设/实体对象EntityObject.md#addsoundeffect),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetPushable](../预设对象/预设/实体对象EntityObject.md#setpushable),铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetModel](../预设对象/预设/实体对象EntityObject.md#setmodel),铺量属性接口<!--by OOP-->
|
||||
|
||||
38
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.0.3.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# 2.0.3
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.PartBase.PartBase.CreateTextboardPreset](../预设对象/零件/零件PartBase.md#createtextboardpreset)(客户端/服务端), 创建文字面板对象<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardPreset.TextboardPreset](../预设对象/预设/文字面板预设TextboardPreset.md#__init__)(客户端/服务端), 文字面板预设<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.SdkInterface.SdkInterface.CreatePostProcessComponent](../预设对象/通用/SDK接口封装SdkInterface.md#createpostprocesscomponent)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetLavaSpeed](../预设对象/预设/实体对象EntityObject.md#getlavaspeed)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetLavaSpeed](../预设对象/预设/实体对象EntityObject.md#setlavaspeed)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.GetMaxLavaSpeed](../预设对象/预设/实体对象EntityObject.md#getmaxlavaspeed)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Entity.EntityObject.EntityObject.SetMaxLavaSpeed](../预设对象/预设/实体对象EntityObject.md#setmaxlavaspeed)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject](../预设对象/预设/文字面板对象TextboardObject.md#__init__)(客户端/服务端), 文字面板对象<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetBindEntity](../预设对象/预设/文字面板对象TextboardObject.md#setbindentity)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetPos](../预设对象/预设/文字面板对象TextboardObject.md#setpos)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetRot](../预设对象/预设/文字面板对象TextboardObject.md#setrot)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetScale](../预设对象/预设/文字面板对象TextboardObject.md#setscale)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetText](../预设对象/预设/文字面板对象TextboardObject.md#settext)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetColor](../预设对象/预设/文字面板对象TextboardObject.md#setcolor)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetBackgroundColor](../预设对象/预设/文字面板对象TextboardObject.md#setbackgroundcolor)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetFaceCamera](../预设对象/预设/文字面板对象TextboardObject.md#setfacecamera)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
1. 新增[Preset.Model.Textboard.TextboardObject.TextboardObject.SetBoardDepthTest](../预设对象/预设/文字面板对象TextboardObject.md#setboarddepthtest)(客户端/服务端), 铺量属性接口<!--by OOP-->
|
||||
|
||||
6
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.2.0.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# 2.2.0
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.CreateTransform](../预设管理/PresetApi.md#createtransform)(客户端/服务端), 构造变换对象<!--by czk-->
|
||||
|
||||
30
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/更新信息/2.4.0.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# 2.4.0
|
||||
|
||||
- 新增
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.GetDimension](../预设对象/通用/变换对象TransformObject.md#getdimension)(客户端/服务端), 获取所在的维度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Model.TransformObject.TransformObject.SetDimension](../预设对象/通用/变换对象TransformObject.md#setdimension)(客户端/服务端), 设置所在的维度<!--by xgb-->
|
||||
|
||||
1. 新增[Preset.Controller.PresetApi.GetPresetSize](../预设管理/PresetApi.md#getpresetsize)(客户端/服务端), 根据预设ID获取预设的包围盒大小<!--by xgb-->
|
||||
|
||||
- 调整
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetAllPresets](../预设管理/PresetApi.md#getallpresets)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetBlockPresetByPosition](../预设管理/PresetApi.md#getblockpresetbyposition)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetGameObjectByTypeName](../预设管理/PresetApi.md#getgameobjectbytypename)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetGameObjectsByTypeName](../预设管理/PresetApi.md#getgameobjectsbytypename)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetPresetByName](../预设管理/PresetApi.md#getpresetbyname)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetPresetByType](../预设管理/PresetApi.md#getpresetbytype)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetPresetsByName](../预设管理/PresetApi.md#getpresetsbyname)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.GetPresetsByType](../预设管理/PresetApi.md#getpresetsbytype)(客户端/服务端), 新增dimension参数<!--by xgb-->
|
||||
|
||||
1. 调整[Preset.Controller.PresetApi.SpawnPreset](../预设管理/PresetApi.md#spawnpreset)(客户端/服务端), 新增dimension与virtual参数<!--by xgb-->
|
||||
|
||||
10317
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/SDK接口封装SdkInterface.md
Normal file
157
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/通用/坐标变换Transform.md
Normal file
@@ -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: (点击跳转)
|
||||
```
|
||||
|
||||
- 描述
|
||||
|
||||
坐标变换,包含位置、旋转和缩放
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| pos | tuple(float,float,float) | 位置变换 |
|
||||
| rotation | tuple(float,float,float) | 旋转变换 |
|
||||
| scale | tuple(float,float,float) | 缩放变换 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [AddOffset](#addoffset) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 给坐标变换位置增加偏移量 |
|
||||
| [AddRotation](#addrotation) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 给坐标变换旋转增加偏移量 |
|
||||
| [AddScale](#addscale) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 给坐标变换缩放增加偏移量 |
|
||||
| [AddTransform](#addtransform) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 给坐标变换增加偏移量 |
|
||||
| [GetMatrix](#getmatrix) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取坐标变换矩阵 |
|
||||
|
||||
|
||||
|
||||
|
||||
## AddOffset
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.Transform.Transform
|
||||
|
||||
- 描述
|
||||
|
||||
给坐标变换位置增加偏移量
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| offset | tuple(float,float,float) | 变换位置 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## AddRotation
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.Transform.Transform
|
||||
|
||||
- 描述
|
||||
|
||||
给坐标变换旋转增加偏移量
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| rotation | tuple(float,float,float) | 变换旋转 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## AddScale
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.Transform.Transform
|
||||
|
||||
- 描述
|
||||
|
||||
给坐标变换缩放增加偏移量
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| scale | tuple(float,float,float) | 变换缩放 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## AddTransform
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.Transform.Transform
|
||||
|
||||
- 描述
|
||||
|
||||
给坐标变换增加偏移量
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| transform | Transform | 坐标变换 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## GetMatrix
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.Transform.Transform
|
||||
|
||||
- 描述
|
||||
|
||||
获取坐标变换矩阵
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| Matrix | 坐标变换矩阵 |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 游戏对象GameObject
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
GameObject(游戏对象)是所有预设对象的基类,即API文档中Preset API - 预设对象下的所有类都继承自GameObject。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| id | int | 对象ID |
|
||||
| classType | str | 对象类名 |
|
||||
| isClient | bool | 对象运行于客户端还是服务端 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [LoadFile](#loadfile) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 加载指定路径的非python脚本文件内容,如配置文件 |
|
||||
| [fromDict](#fromdict) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 将字典根据classType字段转换为对应类型的对象,该类型必须使用@registerGenericClass装饰 |
|
||||
|
||||
|
||||
|
||||
|
||||
## LoadFile
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.GameObject.GameObject
|
||||
|
||||
- 描述
|
||||
|
||||
加载指定路径的非python脚本文件内容,如配置文件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| path | str | 指定相对路径 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| str | 文件内容 |
|
||||
|
||||
|
||||
|
||||
## fromDict
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.GameObject.type
|
||||
|
||||
- 描述
|
||||
|
||||
将字典根据classType字段转换为对应类型的对象,该类型必须使用@registerGenericClass装饰
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| data | dict | 要转换的字典 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| GameObject或dict | 转换成功返回对象,否则返回字典本身 |
|
||||
|
||||
|
||||
|
||||
@@ -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在编辑器中不会实际生成,可以重叠放置。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| filePath | str | 素材相对于BoxData目录的相对路径 |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 世界属性零件WorldPart
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
世界属性零件
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| gameMode | int | 游戏模式 |
|
||||
| difficulty | int | 游戏难度 |
|
||||
| cheat | bool | 作弊模式 |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 传送门零件PortalPart
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
传送门零件
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| portalGateType | int | 传送门类型,0表示单向,1表示双向 |
|
||||
| portalGateShape | int | 传送门形状,当前只能是立式方框0 |
|
||||
| portalGateWidth | int | 传送门宽度 |
|
||||
| portalGateHeight | int | 传送门高度 |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 实体零件EntityBasePart
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
实体零件
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| engineType | str | 实体类型 |
|
||||
| autoCreate | bool | 是否在零件初始化时,自动创建关联实体,默认为True |
|
||||
| persistence | bool | 创建的实体是否持久化,默认为False,设为True时,创建完实体会将autoCreate重置为False |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [CreateVirtualEntity](#createvirtualentity) | <span style="display:inline;color:#ff5555">服务端</span> | 手动创建关联实体,如果已创建会直接返回 |
|
||||
| [DestroyVirtualEntity](#destroyvirtualentity) | <span style="display:inline;color:#ff5555">服务端</span> | 移除已创建的关联实体,引擎退出时会默认调用 |
|
||||
|
||||
|
||||
|
||||
|
||||
## CreateVirtualEntity
|
||||
|
||||
<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.EntityBasePart.EntityBasePart
|
||||
|
||||
- 描述
|
||||
|
||||
手动创建关联实体,如果已创建会直接返回
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| str | 返回创建的实体ID |
|
||||
|
||||
|
||||
|
||||
## DestroyVirtualEntity
|
||||
|
||||
<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.EntityBasePart.EntityBasePart
|
||||
|
||||
- 描述
|
||||
|
||||
移除已创建的关联实体,引擎退出时会默认调用
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 导航路径零件NavPointsPart
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
导航路径零件, 在编辑器内可以选定一系列相对于该零件的坐标点,当零件运行时可以获得这些坐标点的世界坐标列表
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| patrolsPath | list(tuple(float,float,float)) | 路径点列表 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [GetNavigationPoints](#getnavigationpoints) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获得路径点的世界坐标列表 |
|
||||
| [GetNavigationRadius](#getnavigationradius) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获得路径点的随机半径列表 |
|
||||
|
||||
|
||||
|
||||
|
||||
## GetNavigationPoints
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.NavPointsPart.NavPointsPart
|
||||
|
||||
- 描述
|
||||
|
||||
获得路径点的世界坐标列表
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(tuple(float,float,float)) | 路径点的世界坐标列表 |
|
||||
|
||||
|
||||
|
||||
## GetNavigationRadius
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.NavPointsPart.NavPointsPart
|
||||
|
||||
- 描述
|
||||
|
||||
获得路径点的随机半径列表
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(float) | 路径点的随机半径列表 |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 玩家基础属性零件PlayerBasicPart
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
玩家基础属性零件
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| attackDamage | float | 攻击力 |
|
||||
| healthMax | float | 生命上限 |
|
||||
| disableHunger | bool | 是否锁定饥饿值 |
|
||||
| spawnPos | tuple(float,float,float) | 玩家复活点 |
|
||||
| nameDeeptest | bool | 名字是否透视 |
|
||||
| showName | bool | 是否在头顶显示名字 |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 相机轨迹CameraTrackPart
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
相机轨迹零件
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| track | list(dict) | 路径点列表 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [PlayFromStart](#playfromstart) | <span style="display:inline;color:#7575f9">客户端</span> | 从头开始播放相机运动轨迹 |
|
||||
| [Pause](#pause) | <span style="display:inline;color:#7575f9">客户端</span> | 暂停播放相机轨迹 |
|
||||
| [Continue](#continue) | <span style="display:inline;color:#7575f9">客户端</span> | 继续播放相机轨迹 |
|
||||
| [Stop](#stop) | <span style="display:inline;color:#7575f9">客户端</span> | 停止播放相机轨迹 |
|
||||
|
||||
|
||||
|
||||
|
||||
## PlayFromStart
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Parts.CameraTrackPart.CameraTrackPart
|
||||
|
||||
- 描述
|
||||
|
||||
从头开始播放相机运动轨迹
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## Pause
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Parts.CameraTrackPart.CameraTrackPart
|
||||
|
||||
- 描述
|
||||
|
||||
暂停播放相机轨迹
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## Continue
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Parts.CameraTrackPart.CameraTrackPart
|
||||
|
||||
- 描述
|
||||
|
||||
继续播放相机轨迹
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## Stop
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Parts.CameraTrackPart.CameraTrackPart
|
||||
|
||||
- 描述
|
||||
|
||||
停止播放相机轨迹
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 触发器零件TriggerPart
|
||||
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
- 描述
|
||||
|
||||
触发器零件,当实体进入时触发OnTriggerEntityEnter,当实体退出时触发OnTriggerEntityExit,当实体停留时触发OnTriggerEntityStay
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| isTriggerEnter | bool | 是否监听实体进入,默认为True |
|
||||
| isTriggerExit | bool | 是否监听实体退出,默认为True |
|
||||
| isTriggerStay | bool | 是否监听实体进入,默认为False |
|
||||
| support | int | 支持客户端(1)/服务端(2)/双端(3),默认为双端(3) |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [GetEntitiesInTrigger](#getentitiesintrigger) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取当前在触发器区域的实体列表 |
|
||||
|
||||
|
||||
|
||||
|
||||
## GetEntitiesInTrigger
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.TriggerPart.TriggerPart
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前在触发器区域的实体列表
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
1169
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件PartBase.md
Normal file
112
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/零件/零件事件PartEvent.md
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# 零件事件PartEvent
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [OnTriggerEntityEnter](#ontriggerentityenter) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 触发器范围有实体进入时触发,只适用于TriggerPart |
|
||||
| [OnTriggerEntityExit](#ontriggerentityexit) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 触发器范围有实体离开时触发,只适用于TriggerPart |
|
||||
| [OnTriggerEntityStay](#ontriggerentitystay) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 触发器范围有实体停留时触发,只适用于TriggerPart |
|
||||
|
||||
|
||||
|
||||
|
||||
## OnTriggerEntityEnter
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.PartEvent
|
||||
|
||||
- 描述
|
||||
|
||||
触发器范围有实体进入时触发,只适用于TriggerPart
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| 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
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.PartEvent
|
||||
|
||||
- 描述
|
||||
|
||||
触发器范围有实体离开时触发,只适用于TriggerPart
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| 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
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Parts.PartEvent
|
||||
|
||||
- 描述
|
||||
|
||||
触发器范围有实体停留时触发,只适用于TriggerPart
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| TriggerPart | PartBase | 发射事件的触发器零件 |
|
||||
| StayEntityIds | list(str) | 停留在触发器范围的实体ID列表 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
part = self.GetParent().GetPartByType("TriggerPart")
|
||||
if not part:
|
||||
return
|
||||
self.ListenPartClientEvent(part.id, "OnTriggerEntityStay", self, self.OnTriggerEntityStay)
|
||||
```
|
||||
|
||||
|
||||
|
||||
2843
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/实体对象EntityObject.md
Normal file
@@ -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原版实体绑定的实体预设,那么只会加载第一个这种实体预设。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| engineTypeStr | str | 实体的类型ID |
|
||||
| entityId | str | 实体ID |
|
||||
| updateTransformInterval | int | 实体预设子节点的变换更新间隔,0表示永不更新 |
|
||||
|
||||
|
||||
|
||||
@@ -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(文字面板对象)是对文字面板对象封装的基类,为文字面板提供了面向对象方法
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| textboardId | int | 关联文字面板ID |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [SetBindEntity](#setbindentity) | <span style="display:inline;color:#7575f9">客户端</span> | 文字面板绑定实体对象 |
|
||||
| [SetPos](#setpos) | <span style="display:inline;color:#7575f9">客户端</span> | 修改文字面板预设位置 |
|
||||
| [SetRot](#setrot) | <span style="display:inline;color:#7575f9">客户端</span> | 修改旋转角度, 若设置了文本朝向相机,则旋转角度的修改不会生效 |
|
||||
| [SetScale](#setscale) | <span style="display:inline;color:#7575f9">客户端</span> | 内容整体缩放 |
|
||||
| [SetText](#settext) | <span style="display:inline;color:#7575f9">客户端</span> | 修改文字面板内容 |
|
||||
| [SetColor](#setcolor) | <span style="display:inline;color:#7575f9">客户端</span> | 修改字体颜色 |
|
||||
| [SetBackgroundColor](#setbackgroundcolor) | <span style="display:inline;color:#7575f9">客户端</span> | 修改背景颜色 |
|
||||
| [SetFaceCamera](#setfacecamera) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否始终朝向相机 |
|
||||
| [SetBoardDepthTest](#setboarddepthtest) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否开启深度测试, 默认状态下是开启 |
|
||||
|
||||
|
||||
|
||||
|
||||
## SetBindEntity
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
文字面板绑定实体对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| bindEntityId | str | 绑定entity的Id; 如果为None,则为取消实体绑定, 此时下面参数为世界坐标和旋转 |
|
||||
| offset | tuple(float,float,float) | 相对于实体的偏移量 |
|
||||
| rot | tuple(float,float,float) | 相对于实体的偏移角度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetBindEntity(self.GetLocalPlayerId(), (0.0, 1.5, 0.0), (0.0, 0.0, 0.0))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetPos
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
修改文字面板预设位置
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| pos | tuple(float,float,float) | 坐标 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetPos((0.0, 3.0, 0.0))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetRot
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
修改旋转角度, 若设置了文本朝向相机,则旋转角度的修改不会生效
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| rot | tuple(float,float,float) | 角度(不是弧度) |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetRot((45.0, 90.0, 0.0))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetScale
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
内容整体缩放
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| scale | tuple(float,float) | x,y方向上的缩放值,要求值大于0,正常状态下是(1.0,1.0) |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetScale((2.0, 2.0))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetText
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
修改文字面板内容
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| text | str | 文字内容 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 是否修改成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetText("修改后的文字")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetColor
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
修改字体颜色
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| textColor | tuple(float,float,float,float) | 颜色的RGBA值,范围0-1 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetColor((1.0, 1.0, 0.0, 0.8))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetBackgroundColor
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
修改背景颜色
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| backgroundColor | tuple(float,float,float,float) | 颜色的RGBA值,范围0-1 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetBackgroundColor((1.0, 1.0, 1.0, 1.0))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetFaceCamera
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
设置是否始终朝向相机
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| faceCamera | bool | 是否始终朝向相机, 默认为True |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetFaceCamera(True)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetBoardDepthTest
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Textboard.TextboardObject.TextboardObject
|
||||
|
||||
- 描述
|
||||
|
||||
设置是否开启深度测试, 默认状态下是开启
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| depthTest | bool | True为开启深度测试,False为不开启 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 返回是否设置成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.SetBoardDepthTest(False)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -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(文字面板预设)与文字面板实体绑定,以面向对象的形式提供文字面板相关属性修改接口。
|
||||
|
||||
- 成员变量
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
@@ -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的原生方块绑定,尤其是地图中常见的原生方块可能对性能造成重大影响。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| engineTypeStr | str | 方块类型ID |
|
||||
| blockId | str | 方块类型数字ID |
|
||||
| auxValue | int | 附加值 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [GetEngineTypeStr](#getenginetypestr) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取方块预设的方块类型ID |
|
||||
|
||||
|
||||
|
||||
|
||||
## GetEngineTypeStr
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.Block.BlockPreset.BlockPreset
|
||||
|
||||
- 描述
|
||||
|
||||
获取方块预设的方块类型ID
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| str | 方块类型ID |
|
||||
|
||||
|
||||
|
||||
@@ -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(特效对象)是对特效对象封装的基类,它为特效提供了面向对象的使用方式。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| effectId | int | 关联特效ID |
|
||||
| effectType | str | 关联特效类型,frame/particle |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [Play](#play) | <span style="display:inline;color:#7575f9">客户端</span> | 播放特效,仅客户端有效 |
|
||||
| [Stop](#stop) | <span style="display:inline;color:#7575f9">客户端</span> | 停止播放特效,仅客户端有效 |
|
||||
| [BindToEntity](#bindtoentity) | <span style="display:inline;color:#7575f9">客户端</span> | 绑定到实体 |
|
||||
| [BindToSkeleton](#bindtoskeleton) | <span style="display:inline;color:#7575f9">客户端</span> | 绑定骨骼模型 |
|
||||
| [SetLoop](#setloop) | <span style="display:inline;color:#7575f9">客户端</span> | 设置特效是否循环播放,默认为否,仅对序列帧有效 |
|
||||
| [SetDeepTest](#setdeeptest) | <span style="display:inline;color:#7575f9">客户端</span> | 设置序列帧是否透视,默认为否 |
|
||||
| [SetFaceCamera](#setfacecamera) | <span style="display:inline;color:#7575f9">客户端</span> | 设置序列帧是否始终朝向摄像机,默认为是 |
|
||||
|
||||
|
||||
|
||||
|
||||
## Play
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectObject.EffectObject
|
||||
|
||||
- 描述
|
||||
|
||||
播放特效,仅客户端有效
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## Stop
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectObject.EffectObject
|
||||
|
||||
- 描述
|
||||
|
||||
停止播放特效,仅客户端有效
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## BindToEntity
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectObject.EffectObject
|
||||
|
||||
- 描述
|
||||
|
||||
绑定到实体
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| bindEntityId | str | 绑定的实体ID |
|
||||
| offset | tuple(float,float,float) | 绑定的偏移量 |
|
||||
| rot | tuple(float,float,float) | 绑定的旋转角度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 设置是否成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.BindToEntity(entityId, (0, 1, 0), (0, 0, 0))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## BindToSkeleton
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectObject.EffectObject
|
||||
|
||||
- 描述
|
||||
|
||||
绑定骨骼模型
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| modelId | int | 绑定的骨骼模型的ID(见model组件的GetModelId) |
|
||||
| boneName | str | 绑定具体骨骼的名称 |
|
||||
| offset | tuple(float,float,float) | 绑定的偏移量 |
|
||||
| rot | tuple(float,float,float) | 绑定的旋转角度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 设置是否成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.BindToSkeleton(modelId, "root", (0, 1, 0), (0, 0, 0))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetLoop
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectObject.EffectObject
|
||||
|
||||
- 描述
|
||||
|
||||
设置特效是否循环播放,默认为否,仅对序列帧有效
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| loop | bool | True表示循环播放 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 设置是否成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 设置为循环播放
|
||||
self.SetLoop(True)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetDeepTest
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectObject.EffectObject
|
||||
|
||||
- 描述
|
||||
|
||||
设置序列帧是否透视,默认为否
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| deepTest | bool | False表示透视,则被物体/方块阻挡时仍然能看到序列帧 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 设置是否成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 设置为透视
|
||||
self.SetDeepTest(False)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetFaceCamera
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectObject.EffectObject
|
||||
|
||||
- 描述
|
||||
|
||||
设置序列帧是否始终朝向摄像机,默认为是
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| face | bool | True表示朝摄像机 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 设置是否成功 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 设置为不始终朝摄像机
|
||||
self.SetFaceCamera(False)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -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(特效预设)是一类绑定特效资源的预设。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| resource | str | 特效json的相对路径,不含后缀.json |
|
||||
| effectType | str | 特效类型,frame/particle |
|
||||
| effectId | int | 特效ID |
|
||||
| auto | bool | 是否自动播放 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [GetResource](#getresource) | <span style="display:inline;color:#7575f9">客户端</span> | 获取绑定的json资源 |
|
||||
| [SetResource](#setresource) | <span style="display:inline;color:#7575f9">客户端</span> | 设置绑定的json资源 |
|
||||
|
||||
|
||||
|
||||
|
||||
## GetResource
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectPreset.EffectPreset
|
||||
|
||||
- 描述
|
||||
|
||||
获取绑定的json资源
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| str | json资源相对路径,不含.json后缀 |
|
||||
|
||||
|
||||
|
||||
## SetResource
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.Effect.EffectPreset.EffectPreset
|
||||
|
||||
- 描述
|
||||
|
||||
设置绑定的json资源
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| resource | str | json资源相对路径,不含.json后缀 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
1199
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/玩家对象PlayerObject.md
Normal file
@@ -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,只会加载第一个玩家预设。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| entityId | str | 玩家ID |
|
||||
|
||||
|
||||
|
||||
177
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/界面预设UIPreset.md
Normal file
@@ -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(界面预设)是一类绑定界面资源的预设。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| 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 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [SetUiActive](#setuiactive) | <span style="display:inline;color:#7575f9">客户端</span> | 设置UI激活 |
|
||||
| [GetUiActive](#getuiactive) | <span style="display:inline;color:#7575f9">客户端</span> | 获取当前UI是否激活 |
|
||||
| [SetUiVisible](#setuivisible) | <span style="display:inline;color:#7575f9">客户端</span> | 设置UI显隐 |
|
||||
| [GetUiVisible](#getuivisible) | <span style="display:inline;color:#7575f9">客户端</span> | 获取当前UI是否显示 |
|
||||
| [GetScreenNode](#getscreennode) | <span style="display:inline;color:#7575f9">客户端</span> | 获取当前ScreenNode实例 |
|
||||
|
||||
|
||||
|
||||
|
||||
## SetUiActive
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.UI.UIPreset.UIPreset
|
||||
|
||||
- 描述
|
||||
|
||||
设置UI激活
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| active | bool | 是否激活 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## GetUiActive
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.UI.UIPreset.UIPreset
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前UI是否激活
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | UI是否激活 |
|
||||
|
||||
|
||||
|
||||
## SetUiVisible
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.UI.UIPreset.UIPreset
|
||||
|
||||
- 描述
|
||||
|
||||
设置UI显隐
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| visible | bool | 是否显示 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## GetUiVisible
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.UI.UIPreset.UIPreset
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前UI是否显示
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | UI是否显示 |
|
||||
|
||||
|
||||
|
||||
## GetScreenNode
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
method in Preset.Model.UI.UIPreset.UIPreset
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前ScreenNode实例
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| ScreenNode | 当前ScreenNode实例 |
|
||||
|
||||
|
||||
|
||||
598
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设对象/预设/预设基类PresetBase.md
Normal file
@@ -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,可以通过这种方式对游戏逻辑进行简单的封装。在编辑器中放置预设时,会生成预设的虚拟实例,在游戏中生成预设,会生成实例。
|
||||
|
||||
- 成员变量
|
||||
|
||||
| 变量名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| presetId | str | 预设文件ID |
|
||||
| preLoad | bool | 是否预加载 |
|
||||
| forceLoad | bool | 是否常加载 |
|
||||
| childPresetInstances | list(PresetBase) | 子预设列表 |
|
||||
| childPartInstances | list(PartBase) | 子零件列表 |
|
||||
| dimension | int | 预设所在维度 |
|
||||
| isAlive | bool | 预设是否存活 |
|
||||
|
||||
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [GetIsAlive](#getisalive) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取预设的存活状态 |
|
||||
| [GetGameObjectById](#getgameobjectbyid) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取当前预设节点底下指定ID的游戏对象 |
|
||||
| [GetGameObjectByEntityId](#getgameobjectbyentityid) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取当前预设节点底下指定实体ID的游戏对象 |
|
||||
| [GetChildPresets](#getchildpresets) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取当前预设的所有子预设 |
|
||||
| [GetChildPresetsByName](#getchildpresetsbyname) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定名称的所有子预设 |
|
||||
| [GetChildPresetsByType](#getchildpresetsbytype) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定类型的所有子预设 |
|
||||
| [GetChildObjectByTypeName](#getchildobjectbytypename) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定实体ID的游戏对象 |
|
||||
| [GetChildObjectsByTypeName](#getchildobjectsbytypename) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定实体ID的游戏对象 |
|
||||
| [SetBlockProtect](#setblockprotect) | <span style="display:inline;color:#ff5555">服务端</span> | 设置预设内的所有素材区域的方块保护状态 |
|
||||
| [Replicate](#replicate) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 在指定位置坐标下复制当前预设 |
|
||||
| [RemoveChild](#removechild) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 移除指定的子节点对象 |
|
||||
| [AddBoxData](#addboxdata) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 添加指定的素材数据 |
|
||||
| [RemoveBoxData](#removeboxdata) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 移除指定的素材数据 |
|
||||
| [AddPreset](#addpreset) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 添加指定预设作为子预设 |
|
||||
| [RemovePreset](#removepreset) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 移除指定的子预设 |
|
||||
| [AddPart](#addpart) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 添加指定零件作为子零件 |
|
||||
| [RemovePart](#removepart) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 移除指定的子零件 |
|
||||
| [GetPartsByName](#getpartsbyname) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定名称的所有子零件 |
|
||||
| [GetPartByName](#getpartbyname) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定名称的第一个子零件 |
|
||||
| [GetPartsByType](#getpartsbytype) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定类型的所有子零件 |
|
||||
| [GetPartByType](#getpartbytype) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定类型的第一个子零件 |
|
||||
| [RemovePartsByType](#removepartsbytype) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 移除指定类型的所有子零件 |
|
||||
|
||||
|
||||
|
||||
|
||||
## GetIsAlive
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取预设的存活状态
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| bool | 是否存活 |
|
||||
|
||||
|
||||
|
||||
## GetGameObjectById
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前预设节点底下指定ID的游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| id | int | 对象ID |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| GameObject | 成功返回游戏对象,失败返回None |
|
||||
|
||||
|
||||
|
||||
## GetGameObjectByEntityId
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前预设节点底下指定实体ID的游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| entityId | str | 实体ID |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| GameObject | 成功返回游戏对象,失败返回None |
|
||||
|
||||
|
||||
|
||||
## GetChildPresets
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前预设的所有子预设
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PresetBase) | 子预设列表 |
|
||||
|
||||
|
||||
|
||||
## GetChildPresetsByName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定名称的所有子预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| name | str | 名称 |
|
||||
| recursive | bool | 是否递归查找,默认为是 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PresetBase) | 子预设列表 |
|
||||
|
||||
|
||||
|
||||
## GetChildPresetsByType
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定类型的所有子预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| classType | str | 类型 |
|
||||
| recursive | bool | 是否递归查找,默认为是 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PresetBase) | 子预设列表 |
|
||||
|
||||
|
||||
|
||||
## GetChildObjectByTypeName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定实体ID的游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| classType | str | 指定类型 |
|
||||
| name | str | 指定名称,可缺省 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| TransformObject | 成功返回游戏对象,失败返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.GetChildObjectByTypeName("PresetDebugPart")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetChildObjectsByTypeName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定实体ID的游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| classType | str | 指定类型 |
|
||||
| name | str | 指定名称,可缺省 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| TransformObject | 成功返回游戏对象,失败返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
self.GetChildObjectsByTypeName("PresetDebugPart")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SetBlockProtect
|
||||
|
||||
<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
设置预设内的所有素材区域的方块保护状态
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| protect | bool | 保护/取消保护 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## Replicate
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
在指定位置坐标下复制当前预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| pos | tuple(float,float,float) | 位置坐标 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PresetBase | 返回复制的预设,失败返回None |
|
||||
|
||||
|
||||
|
||||
## RemoveChild
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
移除指定的子节点对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| child | TransformObject | 待移除的子对象 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## AddBoxData
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
添加指定的素材数据
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| boxData | BoxData | 待添加的素材数据 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## RemoveBoxData
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
移除指定的素材数据
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| boxData | BoxData | 待移除的素材数据 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## AddPreset
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
添加指定预设作为子预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| preset | PresetBase | 待添加的预设 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## RemovePreset
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
移除指定的子预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| preset | PresetBase | 待移除的子预设 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## AddPart
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
添加指定零件作为子零件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| part | PartBase | 待添加的零件 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## RemovePart
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
移除指定的子零件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| part | PartBase | 待移除的零件 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
## GetPartsByName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定名称的所有子零件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| name | str | 零件名称 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PartBase) | 零件列表 |
|
||||
|
||||
|
||||
|
||||
## GetPartByName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定名称的第一个子零件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| name | str | 零件名称 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PartBase | 零件/None |
|
||||
|
||||
|
||||
|
||||
## GetPartsByType
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定类型的所有子零件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| type | str | 零件类名 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PartBase) | 零件列表 |
|
||||
|
||||
|
||||
|
||||
## GetPartByType
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定类型的第一个子零件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| type | str | 零件类名 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PartBase | 零件/None |
|
||||
|
||||
|
||||
|
||||
## RemovePartsByType
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Model.PresetBase.PresetBase
|
||||
|
||||
- 描述
|
||||
|
||||
移除指定类型的所有子零件
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| type | str | 零件类名 |
|
||||
|
||||
- 返回值
|
||||
|
||||
无
|
||||
|
||||
|
||||
|
||||
581
mcguide/20-玩法开发/14-预设玩法编程/13-PresetAPI/预设管理/PresetApi.md
Normal file
@@ -0,0 +1,581 @@
|
||||
---
|
||||
sidebarDepth: 1
|
||||
---
|
||||
# PresetApi
|
||||
|
||||
## 索引
|
||||
|
||||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||||
| --- | --- | --- |
|
||||
| [CreateTransform](#createtransform) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 构造变换对象 |
|
||||
| [GetAllPresets](#getallpresets) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取所有预设 |
|
||||
| [GetBlockPresetByPosition](#getblockpresetbyposition) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定位置的第一个方块预设 |
|
||||
| [GetGameObjectByEntityId](#getgameobjectbyentityid) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定实体ID的游戏对象 |
|
||||
| [GetGameObjectById](#getgameobjectbyid) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定对象ID的游戏对象 |
|
||||
| [GetGameObjectByTypeName](#getgameobjectbytypename) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定类型和名称的第一个游戏对象 |
|
||||
| [GetGameObjectsByTypeName](#getgameobjectsbytypename) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定类型和名称的所有游戏对象 |
|
||||
| [GetPartApi](#getpartapi) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取零件API |
|
||||
| [GetPresetByName](#getpresetbyname) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定名称的第一个预设 |
|
||||
| [GetPresetByType](#getpresetbytype) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定维度的指定类型的第一个预设 |
|
||||
| [GetPresetSize](#getpresetsize) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 根据预设ID获取预设的包围盒大小 |
|
||||
| [GetPresetsByName](#getpresetsbyname) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定名称的所有预设 |
|
||||
| [GetPresetsByType](#getpresetsbytype) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取指定维度的指定类型的所有预设 |
|
||||
| [GetTickCount](#gettickcount) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 获取当前帧数 |
|
||||
| [LoadPartByModulePath](#loadpartbymodulepath) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 通过模块相对路径加载零件并实例化 |
|
||||
| [LoadPartByType](#loadpartbytype) | <span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span> | 通过类名加载零件并实例化 |
|
||||
| [SpawnPreset](#spawnpreset) | <span style="display:inline;color:#ff5555">服务端</span> | 在指定维度的指定坐标变换处生成指定预设 |
|
||||
|
||||
|
||||
|
||||
|
||||
## CreateTransform
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
构造变换对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| pos | tuple(float,float,float) | 位置变换 |
|
||||
| rotation | tuple(float,float,float) | 旋转变换 |
|
||||
| scale | tuple(float,float,float) | 缩放变换 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| Transform | 生成的变换对象 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 创建Transform对象
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
transform = presetApi.CreateTransform((0, 0, 0), (0, 0, 0), (1, 1, 1))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetAllPresets
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取所有预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PresetBase) | 预设列表 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
presets = presetApi.GetAllPresets()
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetBlockPresetByPosition
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定位置的第一个方块预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| x | int | X轴坐标 |
|
||||
| y | int | Y轴坐标 |
|
||||
| z | int | Z轴坐标 |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| BlockPreset | 指定位置的第一个方块预设,没有返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetBlockPresetByPosition(0, 0, 0)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetGameObjectByEntityId
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定实体ID的游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| entityId | str | 指定的实体ID |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| TransformObject | 成功返回游戏对象,失败返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetGameObjectByEntityId(0)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetGameObjectById
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定对象ID的游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| id | int | 指定的对象ID |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| TransformObject | 成功返回游戏对象,失败返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetGameObjectById(0)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetGameObjectByTypeName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定类型和名称的第一个游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| classType | str | 指定类型 (包括预设,零件,素材数据的类型) |
|
||||
| name | str | 指定名称,可缺省 |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| TransformObject | 成功返回游戏对象,失败返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 找到第一个实体预设
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetGameObjectByTypeName("EntityPreset")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetGameObjectsByTypeName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定类型和名称的所有游戏对象
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| classType | str | 指定类型 (包括预设,零件,素材数据的类型) |
|
||||
| name | str | 指定名称,可缺省 |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(TransformObject) | 变换对象列表 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 找到第一个实体预设
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
objects = presetApi.GetGameObjectsByTypeName("EntityPreset")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetPartApi
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取零件API
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PartBase | 空零件,用于调用零件API |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
partApi = presetApi.GetPartApi()
|
||||
partApi.LogDebug("debug")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetPresetByName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定名称的第一个预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| name | str | 指定名称 |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PresetBase | 预设/None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetPresetByName("name")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetPresetByType
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定维度的指定类型的第一个预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| classType | str | 指定类型 |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PresetBase | 预设/None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 获取第一个实体预设
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetPresetByType("EntityPreset")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetPresetSize
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
根据预设ID获取预设的包围盒大小
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| presetId | str | 预设ID |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| tuple(float, | float, float) 预设的包围盒大小 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
size = presetApi.GetPresetSize(presetId)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetPresetsByName
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定名称的所有预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| name | str | 指定名称 |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PresetBase) | 预设列表 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetPresetsByName("name")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetPresetsByType
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取指定维度的指定类型的所有预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| classType | str | 指定类型 |
|
||||
| dimension | int | 指定维度ID,默认为-1表示所有维度,本参数在客户端调用时无效,客户端只能获取当前维度 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| list(PresetBase) | 预设列表 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 获取所有的空预设
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.GetPresetsByType("EmptyPreset")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetTickCount
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取当前帧数
|
||||
|
||||
- 参数
|
||||
|
||||
无
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| int | 当前帧数 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
cnt = presetApi.GetTickCount()
|
||||
```
|
||||
|
||||
|
||||
|
||||
## LoadPartByModulePath
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
通过模块相对路径加载零件并实例化
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| modulePath | str | 零件模块相对路径 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| 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
|
||||
|
||||
<span style="display:inline;color:#7575f9">客户端</span>/<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
通过类名加载零件并实例化
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| partType | str | 零件类名 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PartBase | 实例化后的零件,失败返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
obj = presetApi.LoadPartByType("WorldPart")
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SpawnPreset
|
||||
|
||||
<span style="display:inline;color:#ff5555">服务端</span>
|
||||
|
||||
method in Preset.Controller.PresetApi
|
||||
|
||||
- 描述
|
||||
|
||||
在指定维度的指定坐标变换处生成指定预设
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| presetId | str | 指定预设的文件ID,对应预设对象的属性presetId |
|
||||
| transform | Transform | 指定的坐标变换(预设对象->通用->坐标变换Transform) |
|
||||
| dimension | int | 指定的维度ID |
|
||||
| virtual | bool | 素材是否已实例化到地图,True表示未实例化,会在首次加载该预设时实例化素材到地图存档,False则会忽略所有素材 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| PresetBase | 返回生成的预设,失败返回None |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
# 内置空预设,特效预设的文件ID分别为EmptyPreset,EffectPreset
|
||||
import Preset.Controller.PresetApi as presetApi
|
||||
from Preset.Model.Transform import Transform
|
||||
preset = presetApi.SpawnPreset("EmptyPreset", Transform(), 0)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -10,37 +10,35 @@ time: 分钟
|
||||
|
||||
基岩版自定义方块的json结构曾经过多次调整,当填写format_version时,需要按照对应版本的json结构编写components。
|
||||
|
||||
你可以在以下两个版本进行选择:
|
||||
例如`minecraft:destroy_time`,在1.10.0中为
|
||||
|
||||
- 1.16.0
|
||||
```json
|
||||
"minecraft:destroy_time": {
|
||||
"value": 4.0
|
||||
}
|
||||
```
|
||||
|
||||
该版本的components结构详见[bedrock.dev](https://bedrock.dev/zh/docs/1.16.0.0/1.16.0.66/Blocks)。
|
||||
而在1.16.0的版本中为
|
||||
|
||||
- 1.10.0
|
||||
```json
|
||||
"minecraft:destroy_time": 4.0
|
||||
```
|
||||
|
||||
该版本的components结构详见[bedrock.dev](https://bedrock.dev/zh/docs/1.12.0.0/1.12.0.28/Blocks)。该版本相比于1.16.0,component的值为一个Json Object,例如`minecraft:destroy_time`,在1.10.0中为
|
||||
而在1.19.20以上的版本中为
|
||||
|
||||
```json
|
||||
"minecraft:destroy_time": {
|
||||
"value": 4.0
|
||||
}
|
||||
```
|
||||
|
||||
而在更高的版本中为
|
||||
|
||||
```json
|
||||
"minecraft:destroy_time": 4.0
|
||||
```
|
||||
|
||||
|
||||
```json
|
||||
"minecraft:destructible_by_mining": {
|
||||
"seconds_to_destroy": 4.0
|
||||
}
|
||||
```
|
||||
|
||||
## description
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----------------------- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| identifier | str | | 包括命名空间及物品名。需要全局唯一。<br>建议使用mod名称作为命名空间 |
|
||||
| identifier | str | | 包括命名空间及物品名。需要全局唯一。建议使用mod名称作为命名空间 |
|
||||
| register_to_create_menu | bool | false | 是否注册到创造栏 |
|
||||
| category | str | Nature | 注册到创造栏的分类,可选的值有:<br>Construction<br>Nature<br>Equipment<br>Items |
|
||||
| category | str | Nature | 注册到创造栏的分类,可选的值有:<br/>Construction<br/>Nature<br/>Equipment<br/>Items |
|
||||
|
||||
## components
|
||||
|
||||
@@ -56,6 +54,12 @@ time: 分钟
|
||||
|
||||
可参考[CustomBlocksMod](../../13-模组SDK编程/60-Demo示例.md#CustomBlocksMod)的customblocks:customblocks_test_ore方块
|
||||
|
||||
<span id="minecraft_friction"></span>
|
||||
|
||||
### minecraft:friction
|
||||
|
||||
可用于设置方块的摩擦力,取值范围为(0.0-0.9)。`注意此摩擦力和原版方块的摩擦力不是同一个摩擦力`
|
||||
|
||||
<span id="minecraft_max_stack_size"></span>
|
||||
|
||||
### minecraft:max_stack_size
|
||||
@@ -70,11 +74,40 @@ time: 分钟
|
||||
|
||||
主要用于[挖掘](./2-功能.md#wajue)的功能
|
||||
|
||||
<span id="minecraft_destructible_by_mining"></span>
|
||||
|
||||
### minecraft:destructible_by_mining
|
||||
|
||||
可用于控制挖掘所需的时间。该值的含义与[官方wiki](https://minecraft-zh.gamepedia.com/%E6%8C%96%E6%8E%98#.E6.96.B9.E5.9D.97.E7.A1.AC.E5.BA.A6)的“硬度”一致
|
||||
|
||||
- 如果设置为 `true`,方块会采用默认的破坏时间。
|
||||
- 如果设置为 `false`,方块将不可被挖掘破坏。
|
||||
- 如果省略该组件,则方块同样会使用默认的破坏时间。
|
||||
- 如果类型为object,则是以下参数:
|
||||
|
||||
| 键 | 类型| 默认值 | 解释|
|
||||
|------------------|--------|----------------|-------------|
|
||||
| seconds_to_destroy| 浮点数| `0.0` |设置方块的硬度,实际破坏时间 = 1.5 × seconds_to_destroy。 |
|
||||
|
||||
此组件需要在`format_version`大于等于1.19.20的方块行为中代替[minecraft:destroy_time](./1-JSON组件.md###minecraft:destroy_time)使用。
|
||||
|
||||
主要用于[挖掘](./2-功能.md#wajue)的功能
|
||||
|
||||
<span id="minecraft_block_light_emission"></span>
|
||||
|
||||
### minecraft:block_light_emission
|
||||
|
||||
可用于设置方块亮度。关于亮度及方块光源可参考[官方wiki](https://minecraft-zh.gamepedia.com/%E4%BA%AE%E5%BA%A6)
|
||||
可用于设置方块亮度,取值范围为[0, 1]。关于亮度及方块光源可参考[官方wiki](https://minecraft-zh.gamepedia.com/%E4%BA%AE%E5%BA%A6)
|
||||
|
||||
主要用于[亮度](./2-功能.md#liangdu)的功能
|
||||
|
||||
<span id="minecraft_light_emission"></span>
|
||||
|
||||
### minecraft:light_emission
|
||||
|
||||
可用于设置方块亮度, 取值范围为[0, 15]。此组件需要在`format_version`大于等于1.19.20的方块行为中代替
|
||||
[minecraft:block_light_emission](./1-JSON组件.md###minecraft:block_light_emission)使用。
|
||||
关于亮度及方块光源可参考[官方wiki](https://minecraft-zh.gamepedia.com/%E4%BA%AE%E5%BA%A6)
|
||||
|
||||
主要用于[亮度](./2-功能.md#liangdu)的功能
|
||||
|
||||
@@ -84,6 +117,26 @@ time: 分钟
|
||||
|
||||
可用于设置爆炸抗性。原版方块的爆炸抗性见[官方wiki](https://minecraft-zh.gamepedia.com/%E7%88%86%E7%82%B8#.E7.88.86.E7.82.B8.E6.8A.97.E6.80.A7)
|
||||
|
||||
<span id="minecraft_destructible_by_explosion"></span>
|
||||
|
||||
### minecraft:destructible_by_explosion
|
||||
|
||||
可用于控制挖掘所需的时间。该值的含义与[官方wiki](https://minecraft-zh.gamepedia.com/%E6%8C%96%E6%8E%98#.E6.96.B9.E5.9D.97.E7.A1.AC.E5.BA.A6)的“硬度”一致
|
||||
|
||||
- 如果设置为 `true`,方块会采用默认的爆炸抗性。
|
||||
- 如果设置为 `false`,方块将不可被爆炸破坏。
|
||||
- 如果省略该组件,则方块同样会使用默认的爆炸抗性。
|
||||
- 如果类型为object,则是以下参数:
|
||||
|
||||
| 键 | 类型| 默认值 | 解释|
|
||||
|------------------|--------|----------------|-------------|
|
||||
| explosion_resistance| 浮点数| `0.0` |设置方块的爆炸抗性,实际爆炸抗性 = 5 × explosion_resistance。 |
|
||||
|
||||
此组件需要在`format_version`大于等于1.19.20的方块行为中代替[minecraft:explosion_resistance](./1-JSON组件.md###minecraft:explosion_resistance)使用。
|
||||
|
||||
原版方块的爆炸抗性见[官方wiki](https://minecraft-zh.gamepedia.com/%E7%88%86%E7%82%B8#.E7.88.86.E7.82.B8.E6.8A.97.E6.80.A7)
|
||||
|
||||
|
||||
<span id="minecraft_block_light_absorption"></span>
|
||||
|
||||
### minecraft:block_light_absorption
|
||||
@@ -94,12 +147,27 @@ time: 分钟
|
||||
|
||||
主要用于[亮度](./2-功能.md#liangdu)的功能
|
||||
|
||||
<span id="minecraft_light_dampening"></span>
|
||||
|
||||
### minecraft:light_dampening
|
||||
|
||||
可用于设置方块吸光程度, 取值范围为[0, 15]。此组件需要在 `format_version`大于等于1.19.20的方块行为中代替[minecraft:block_light_absorption](./1-JSON组件.md###minecraft:block_light_absorption)使用。
|
||||
关于亮度及方块光源可参考[官方wiki](https://minecraft-zh.gamepedia.com/%E4%BA%AE%E5%BA%A6)
|
||||
|
||||
主要用于[亮度](./2-功能.md#liangdu)的功能
|
||||
|
||||
<span id="minecraft_map_color"></span>
|
||||
|
||||
### minecraft:map_color
|
||||
|
||||
可用于设置方块显示在地图上的颜色
|
||||
|
||||
<span id="minecraft_display_name"></span>
|
||||
|
||||
### minecraft:display_name
|
||||
|
||||
指定语言文件键,用于映射鼠标悬停在物品栏和快捷栏中的方块物品上时显示的文本。如果给定的字符串无法解析为本地字符串,则将显示给定的原始字符串。使用需要方块行为的 `format_version`大于等于1.19.60。
|
||||
|
||||
<span id="netease_tier"></span>
|
||||
|
||||
### netease:tier
|
||||
@@ -108,11 +176,11 @@ time: 分钟
|
||||
|
||||
主要用于[挖掘](./2-功能.md#wajue)的功能
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| :-------------: | :----: | :----: | :----------------------------------------------------------- |
|
||||
| digger | string | | 必须设置。表示方块使用此工具挖掘时有速度加成。<br>可选的值有:<br> shovel:铲<br> pickaxe:镐<br> hatchet:斧<br> hoe:锄 |
|
||||
| destroy_special | bool | false | 可选。<br>当设置为true时,表示只有使用digger设置的工具进行挖掘才会产生掉落物。 |
|
||||
| level | int | 0 | 可选。<br>当destroy_special为true时才会生效。表示挖掘所需的工具等级,若手持工具等级小于该值,则不会产生掉落物。<br>原版工具的等级:<br> 空手/其他非工具物品:0<br> 木制/金制工具:0<br> 石制工具:1<br> 铁制工具:2<br> 钻石工具:3 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| :-------------: | :----: | :----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| digger | string | | 必须设置。表示方块使用此工具挖掘时有速度加成。<br/>可选的值有: <br/>shovel:铲 <br/>pickaxe:镐 <br/>hatchet:斧 <br/>hoe:锄 |
|
||||
| destroy_special | bool | false | 可选。当设置为true时,表示只有使用digger设置的工具进行挖掘才会产生掉落物。 |
|
||||
| level | int | 0 | 可选。当destroy_special为true时才会生效。表示挖掘所需的工具等级,若手持工具等级小于该值,则不会产生掉落物。<br/>原版工具的等级: <br/>空手/其他非工具物品:0<br/>木制/金制工具:0<br/>石制工具:1 <br/>铁制工具:2 <br/>钻石工具:3 |
|
||||
|
||||
<span id="netease_aabb"></span>
|
||||
|
||||
@@ -128,25 +196,25 @@ time: 分钟
|
||||
|
||||
可参考[CustomBlocksMod](../../13-模组SDK编程/60-Demo示例.md#CustomBlocksMod)的customblocks_model_flower及customblocks_model_wire方块。
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| --------- | ------------- | ------ | ------------------------------------------------------------ |
|
||||
| collision | object或array | | 计算与物体碰撞时用的碰撞盒 |
|
||||
| clip | object或array | | 计算射线检测时用的碰撞盒。如准心选取及弹射物碰撞。<br>(那么当该AABB没有体积时,准心与弹射物都会无视这个方块) |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| --------- | ------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
|
||||
| collision | object或array | | 计算与物体碰撞时用的碰撞盒 |
|
||||
| clip | object或array | | 计算射线检测时用的碰撞盒。如准心选取及弹射物碰撞。(那么当该AABB没有体积时,准心与弹射物都会无视这个方块) |
|
||||
|
||||
当collision或clip为object时,用于表示恒定大小的单一碰撞盒,结构为:
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ---- | ------------ | --------- | ---------------------------------- |
|
||||
| min | array(float) | [0, 0, 0] | min的三个值必须小于等于max的三个值 |
|
||||
| max | array(float) | [1, 1, 1] | |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| --- | ------------ | --------- | ---------------------------------- |
|
||||
| min | array(float) | [0, 0, 0] | min的三个值必须小于等于max的三个值 |
|
||||
| max | array(float) | [1, 1, 1] | |
|
||||
|
||||
当collision或clip为array时,用于可变化的多个碰撞盒的组合,通常用于可变化的自定义方块模型。元素的结构为:
|
||||
|
||||
| | 类型 | 默认值 | 解释 |
|
||||
| ------ | ------------ | --------- | ------------------------------------------------------------ |
|
||||
| enable | molang | true | 控制是否开启该碰撞箱<br/>目前仅支持is_connect查询,详见[netease:connection](#netease_connection) |
|
||||
| min | array(float) | [0, 0, 0] | min的三个值必须小于等于max的三个值 |
|
||||
| max | array(float) | [1, 1, 1] | |
|
||||
| | 类型 | 默认值 | 解释 |
|
||||
| ------ | ------------ | --------- | ------------------------------------------------------------------------------------------------ |
|
||||
| enable | molang | true | 控制是否开启该碰撞箱目前仅支持is_connect查询,详见[netease:connection](#netease_connection) |
|
||||
| min | array(float) | [0, 0, 0] | min的三个值必须小于等于max的三个值 |
|
||||
| max | array(float) | [1, 1, 1] | |
|
||||
|
||||
<span id="netease_face_directional"></span>
|
||||
|
||||
@@ -158,17 +226,17 @@ time: 分钟
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ---- | ------ | ------ | ----------------------------------------------------- |
|
||||
| type | string | | direction:四面向方块<br>facing_direction:六面向方块 |
|
||||
| type | string | | direction:四面向方块facing_direction:六面向方块 |
|
||||
|
||||
<span id="netease:fuel "></span>
|
||||
|
||||
### netease:fuel
|
||||
### netease:fuel
|
||||
|
||||
可燃类物品组件。允许该方块物品作为燃料在熔炉中燃烧
|
||||
可燃类物品组件。允许该方块物品作为燃料在熔炉中燃烧
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ------- | ------ | ------ | ------------------------------------------------------------ |
|
||||
| duration| float | 0 | 可填, 该物品可提供的熔炉燃烧时长(秒)。 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| -------- | ----- | ------ | ----------------------------------------- |
|
||||
| duration | float | 0 | 可填, 该物品可提供的熔炉燃烧时长(秒)。 |
|
||||
|
||||
<span id="netease_render_layer"></span>
|
||||
|
||||
@@ -180,7 +248,7 @@ time: 分钟
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ------ | ------ | ------------------------------------------------------------ |
|
||||
| value | string | | 目前支持的材质有:<br>opaque:不透明,即“terrain_opaque”材质。默认为此项<br>alpha:全透明,即“terrain_alpha”材质,如火焰,该材质用于异形方块,用在方块类上但与其他方块重合时会出现闪烁,可以使用no_crop_face_block组件避免闪烁。<br>blend:半透明,即“terrain_blend”材质,如彩色玻璃。<br>optionalAlpha:局部透明,与alpha不同,alpha超过一定距离将不渲染,而optionalAlpha不会,能配合no_crop_face_block组件实现原版叶子效果。 |
|
||||
| value | string | | 目前支持的材质有:<br>opaque:不透明,即“terrain_opaque”材质。默认为此项<br/>alpha:全透明,即“terrain_alpha”材质,如火焰,该材质用于异形方块,用在方块类上但与其他方块重合时会出现闪烁,可以使用no_crop_face_block组件避免闪烁。<br/>blend:半透明,即“terrain_blend”材质,如彩色玻璃。<br/>optionalAlpha:局部透明,与alpha不同,alpha超过一定距离将不渲染,而optionalAlpha不会,能配合no_crop_face_block组件实现原版叶子效果。 |
|
||||
|
||||
<span id="netease_solid"></span>
|
||||
|
||||
@@ -192,9 +260,9 @@ time: 分钟
|
||||
|
||||
可参考[CustomBlocksMod](../../13-模组SDK编程/60-Demo示例.md#CustomBlocksMod)的customblocks:customblocks_model_flower方块。
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| value | bool | true | 为true时,生物在方块内会受到窒息伤害<br>为false时,生物在方块内不会受到窒息伤害 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | ------------------------------------------------------------------------------- |
|
||||
| value | bool | true | 为true时,生物在方块内会受到窒息伤害为false时,生物在方块内不会受到窒息伤害 |
|
||||
|
||||
<span id="netease_pathable"></span>
|
||||
|
||||
@@ -204,22 +272,23 @@ time: 分钟
|
||||
|
||||
可参考[CustomBlocksMod](../../13-模组SDK编程/60-Demo示例.md#CustomBlocksMod)的customblocks:customblocks_model_flower方块。
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| value | bool | false | 为true时,寻路时被当作空气<br>为false时,寻路时被当作障碍物,并且可在其上方行走 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | ------------------------------------------------------------------------------- |
|
||||
| value | bool | false | 为true时,寻路时被当作空气为false时,寻路时被当作障碍物,并且可在其上方行走 |
|
||||
|
||||
<span id="netease_block_entity"></span>
|
||||
|
||||
### netease:block_entity
|
||||
|
||||
用于给自定义方块添加[自定义方块实体](./4-自定义方块实体.md)。
|
||||
|
||||
可参考[CustomBlocksMod](../../13-模组SDK编程/60-Demo示例.md#CustomBlocksMod)的customblocks:customblocks_test_block_entity方块。
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ------- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| tick | bool | false | 为true时,当玩家进入方块tick范围时,该方块每秒会发送**20次**ServerBlockEntityTickEvent事件<br>为false时,该方块不会发送ServerBlockEntityTickEvent事件 |
|
||||
| client_tick | bool | false | 为true时,当玩家进入方块tick范围时,该方块每秒会发送**20次**ModBlockEntityTickClientEvent事件<br>为false时,该方块不会发送ModBlockEntityTickClientEvent事件 |
|
||||
| movable | bool | true | 为true时,该方块可被粘性活塞拉回<br>为false时,该方块不可被粘性活塞拉回 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----------- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| tick | bool | false | 为true时,当玩家进入方块tick范围时,该方块每秒会发送**20次**ServerBlockEntityTickEvent事件<br/>为false时,该方块不会发送ServerBlockEntityTickEvent事件 |
|
||||
| client_tick | bool | false | 为true时,当玩家进入方块tick范围时,该方块每秒会发送**20次**ModBlockEntityTickClientEvent事件<br/>为false时,该方块不会发送ModBlockEntityTickClientEvent事件 |
|
||||
| movable | bool | true | 为true时,该方块可被粘性活塞拉回为false时,该方块不可被粘性活塞拉回 |
|
||||
|
||||
<span id="netease_random_tick"></span>
|
||||
|
||||
@@ -227,24 +296,24 @@ time: 分钟
|
||||
|
||||
用于给自定义方块定义是否可以随机tick,并且设置该tick事件是否发送到脚本层。
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| -------------- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| enable | bool | false | 方块是否随机tick |
|
||||
| tick_to_script | bool | false | 是否发送事件<a href="../../../../mcdocs/1-ModAPI/事件/方块.html#blockrandomtickserverevent" rel="noopenner"> BlockRandomTickServerEvent </a>到python脚本 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| -------------- | ---- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| enable | bool | false | 方块是否随机tick |
|
||||
| tick_to_script | bool | false | 是否发送事件 BlockRandomTickServerEvent 到python脚本 |
|
||||
|
||||
### netease:redstone_property
|
||||
|
||||
用于给自定义方块设置红石属性
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | ----------------------------------------------------------------------------------------------- |
|
||||
| value | str | None | 目前只支持break_on_push,设置之后,方块可以被活塞破坏变成掉落物,否则,方块会被活塞推动而不破坏 |
|
||||
|
||||
### netease:neighborchanged_sendto_script
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | ------------------------------------------------------------ |
|
||||
| value | bool | false | 方块周围环境变化是否发送事件<a href="../../../../mcdocs/1-ModAPI/事件/方块.html#blockneighborchangedserverevent#blockneighborchangedserverevent" rel="noopenner"> BlockNeighborChangedServerEvent </a>到脚本层 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| value | bool | false | 方块周围环境变化是否发送事件 BlockNeighborChangedServerEvent 到脚本层 |
|
||||
|
||||
<span id="netease_connection"></span>
|
||||
|
||||
@@ -266,7 +335,7 @@ time: 分钟
|
||||
|
||||
| 名称 | 解释 |
|
||||
| ---------------- | ------------------------------------------------------------ |
|
||||
| query.is_connect | 传入一个参数,返回该方块与对应临面上的方块是否有connection属性<br/>参数取值与对应的面:<br>0-down面,1-up面,2-north面,3-south面,4-west面,5-east面。 |
|
||||
| query.is_connect | 传入一个参数,返回该方块与对应临面上的方块是否有connection属性参数取值与对应的面:<br/>0-down面,<br/>1-up面,<br/>2-north面,<br/>3-south面,<br/>4-west面,<br/>5-east面。 |
|
||||
|
||||
<span id="netease_redstone"></span>
|
||||
|
||||
@@ -283,8 +352,6 @@ time: 分钟
|
||||
| type | str | | 红石类型:<br/>producer:红石源<br/>consumer:红石机械元件 |
|
||||
| strength | int | 15 | 红石信号值,范围[0,15] |
|
||||
|
||||
|
||||
|
||||
<span id="listen_block_remove"></span>
|
||||
|
||||
### netease:listen_block_remove
|
||||
@@ -305,11 +372,11 @@ time: 分钟
|
||||
|
||||
可参考CustomBlocksMod示例中的customblocks_model_flower
|
||||
|
||||
| 键 | 类型 | 默认值 | 说明 |
|
||||
| --------------- | ------------ | ------ | ------------------------------------------------------------ |
|
||||
| block | list(str) | | 方块identifier的列表。这些方块的所有[方块状态](../../10-基本概念/1-我的世界基础概念.md#方块状态)都可放置 |
|
||||
| block_state | list(object) | | [方块状态](../../10-基本概念/1-我的世界基础概念.md#方块状态)的列表。<br>每个元素只对应一个特定的方块状态,如果方块有多个种类的状态,需要考虑排列组合的所有情况<br>最终可在上面放置的方块是block字段与block_state字段的并集 |
|
||||
| spawn_resources | bool | true | 已存在的方块因下方的方块发生改变而被破坏时,是否生成掉落物 |
|
||||
| 键 | 类型 | 默认值 | 说明 |
|
||||
| --------------- | ------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| block | list(str) | | 方块identifier的列表。这些方块的所有[方块状态](../../10-基本概念/1-我的世界基础概念.md#方块状态)都可放置 |
|
||||
| block_state | list(object) | | [方块状态](../../10-基本概念/1-我的世界基础概念.md#方块状态)的列表。每个元素只对应一个特定的方块状态,如果方块有多个种类的状态,需要考虑排列组合的所有情况最终可在上面放置的方块是block字段与block_state字段的并集 |
|
||||
| spawn_resources | bool | true | 已存在的方块因下方的方块发生改变而被破坏时,是否生成掉落物 |
|
||||
|
||||
<span id="netease_fire_resistant"></span>
|
||||
|
||||
@@ -333,31 +400,31 @@ time: 分钟
|
||||
|
||||
可参考CustomBlocksMod示例中的customblocks_slime、customblocks_flower_extend
|
||||
|
||||
| 键 | 类型 | 默认值 | 说明 |
|
||||
| ----- | ---- | ------ | -------- |
|
||||
| 键 | 类型 | 默认值 | 说明 |
|
||||
| ---------- | ----- | ------ | -------------- |
|
||||
| properties | array | | 所有属性字符串 |
|
||||
|
||||
其中properties数组目前支持以下字符串填充
|
||||
|
||||
| 键 | 说明 |
|
||||
| ----- |-------- |
|
||||
| piston_block_grabber | 被活塞推动时是否带动旁边方块 |
|
||||
| slime | 主要用于变为移动方块(例如被活塞推)时修改对实体力的计算 |
|
||||
|breaks_when_fallen_on_by_heavy| 当重力方块结束下落在该方块位置后,自身是否被毁坏|
|
||||
| 键 | 说明 |
|
||||
| ------------------------------ | -------------------------------------------------------- |
|
||||
| piston_block_grabber | 被活塞推动时是否带动旁边方块 |
|
||||
| slime | 主要用于变为移动方块(例如被活塞推)时修改对实体力的计算 |
|
||||
| breaks_when_fallen_on_by_heavy | 当重力方块结束下落在该方块位置后,自身是否被毁坏 |
|
||||
|
||||
如果方块碰撞盒体积使用netease:aabb或minecraft:entity_collision改小可能会导致无法触发(目前可参考范围是边长0.4以下不会触发)。
|
||||
|
||||
### netease:on_stand_on
|
||||
|
||||
用于触发实体站在方块上的事件
|
||||
用于触发实体站在方块上的事件
|
||||
|
||||
可参考CustomBlocksMod示例中的customblocks_slime,利用了该事件组合做出了个模拟原版粘液块的效果。
|
||||
|
||||
| 键 | 类型 | 默认值 | 说明 |
|
||||
| ----- | ---- | ------ | -------- |
|
||||
| 键 | 类型 | 默认值 | 说明 |
|
||||
| ----------------- | ---- | ------ | -------------------- |
|
||||
| send_python_event | bool | | 是否发送事件至python |
|
||||
|
||||
当send_python_event为true时,该方块会触发OnStandOnBlockClientEvent、OnStandOnBlockServerEvent事件。
|
||||
当send_python_event为true时,该方块会触发OnStandOnBlockClientEvent、OnStandOnBlockServerEvent事件。
|
||||
|
||||
如果方块碰撞盒体积使用netease:aabb或minecraft:entity_collision改小可能会导致无法触发(目前可参考范围是边长0.4以下不会触发)。
|
||||
|
||||
@@ -383,7 +450,6 @@ time: 分钟
|
||||
|
||||
当send_python_event为true时,该方块会触发OnEntityInsideBlockClientEvent、OnEntityInsideBlockServerEvent事件。
|
||||
|
||||
|
||||
### netease:on_step_on
|
||||
|
||||
用于触发实体刚移动至一个实心方块上的事件
|
||||
@@ -406,8 +472,8 @@ time: 分钟
|
||||
|
||||
该组件会把方块的材质设置为透明,且不可与netease:render_layer的不透明材质一起共用,否则会出现渲染错误
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ------- | ------------- | ------ | ------------------------------------------------------------ |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ------- | ------------- | ------ | ------------------------------------------------------------------------------ |
|
||||
| x_scope | [float,float] | [0,0] | x轴方向的偏移范围,size为2的array,取值范围为0.0~1.0,如果两个值相同则为指定点 |
|
||||
| z_scope | [float,float] | [0,0] | z轴方向的偏移范围,size为2的array,取值范围为0.0~1.0,如果两个值相同则为指定点 |
|
||||
|
||||
@@ -423,14 +489,26 @@ time: 分钟
|
||||
|
||||
使用SetBlockNew接口创建自定义箱子的时候,需要先调用一次SetBlockNew将目标位置方块设置为Air,再使用AddTimer延后调用SetBlockNew创建自定义箱子
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ------------------ | ---- | ------ | ------------------------------------------------------------ |
|
||||
| custom_description | str | | 箱子UI上面显示的箱子名称,不填为空 |
|
||||
| chest_capacity | int | | 必填,箱子的容量行数,取值范围1-8,如果can_pair取值为true且该值大于4,将自动变为4 |
|
||||
| can_pair | bool | false | 是否可以与隔壁箱子组合,合成一个大箱子 |
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ------------------ | ---- | ------ | ------------------------------------------------------------------------------------------ |
|
||||
| custom_description | str | | 箱子UI上面显示的箱子名称,不填为空 |
|
||||
| chest_capacity | int | | 必填,箱子的容量行数,取值范围1-8,如果can_pair取值为true且该值大于4,将自动变为4 |
|
||||
| can_pair | bool | false | 是否可以与隔壁箱子组合,合成一个大箱子 |
|
||||
| is_shulker_box | bool | false | 是否为潜影盒箱子,如果开启摧毁方块将不会掉落,与原版潜影盒功能相同,无法与隔壁箱子进行组合 |
|
||||
| mute | bool | true | 是否关闭箱子开启与关闭时的音效 |
|
||||
| can_be_blocked | bool | false | 是否能被阻挡,即箱子上面有阻挡的方块时能否打开箱子 |
|
||||
| mute | bool | true | 是否关闭箱子开启与关闭时的音效 |
|
||||
| can_be_blocked | bool | false | 是否能被阻挡,即箱子上面有阻挡的方块时能否打开箱子 |
|
||||
|
||||
<span id="block_container"></span>
|
||||
|
||||
### netease:block_container
|
||||
|
||||
[自定义容器](./3-特殊方块/11-自定义容器.md)组件,使用时需要将base_block设为netease_container。相比[netease:block_chest](#netease-block-chest),该组件支持使用资源包UI Json配置方块打开后的UI界面,方便开发者制作自定义熔炉等界面,而无需考虑复杂的交互逻辑,数据同步逻辑等。
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ------------------ | ---- | ----- | ------------------------------------------ |
|
||||
| custom_description | str | | 容器ui打开时的title(复用原版ui时生效) |
|
||||
| screen_name | str | | 交互方块时打开的ui,形如namespace.screenName |
|
||||
| container_size | int | | 方块容器能够存放的物品槽位数量,取值范围1-108,需与ui槽位匹配。若ui槽位大于配置容量,超过配置的部分无法放入物品;若ui槽位小于配置容量,按shift可放入,但无法在ui中显示 |
|
||||
|
||||
<span id="no_crop_face_block"></span>
|
||||
|
||||
@@ -459,3 +537,4 @@ time: 分钟
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----- | ---- | -------- | -------------- |
|
||||
| value | str | 物品名称 | 物品的描述信息 |
|
||||
|
||||
|
||||
309
mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/11-自定义容器.md
Normal file
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -500,23 +500,23 @@ resource_pack/models/entity/squirrel.geo.json
|
||||
|
||||
```json
|
||||
"render_controllers": [
|
||||
{ "controller.render.player.first_person": "variable.is_first_person" },
|
||||
{ "controller.render.player.third_person": "!variable.is_first_person && !variable.map_face_icon" },
|
||||
{ "controller.render.player.map": "variable.map_face_icon" },
|
||||
{ "controller.render.player.first_person_bloom": "variable.is_first_person" },
|
||||
{ "controller.render.player.third_person_bloom": "!variable.is_first_person && !variable.map_face_icon" }
|
||||
{"controller.render.player.first_person_spectator": "variable.is_first_person && query.is_spectator"},
|
||||
{"controller.render.player.third_person_spectator": "!variable.is_first_person && !variable.map_face_icon && query.is_spectator"},
|
||||
{"controller.render.player.first_person": "variable.is_first_person && !query.is_spectator"},
|
||||
{"controller.render.player.third_person": "!variable.is_first_person && !variable.map_face_icon && !query.is_spectator"},
|
||||
{"controller.render.player.map": "variable.map_face_icon"}
|
||||
],
|
||||
```
|
||||
|
||||
在render_controllers数组中,玩家存在五个渲染控制器。
|
||||
|
||||
| 渲染控制器名称 | 渲染控制器应用条件 | 说明 |
|
||||
| ------------------------------------------- | ---------------------------------------------------- | -------------------------------- |
|
||||
| controller.render.player.first_person | variable.is_first_person | 第一人称时该渲染控制器生效 |
|
||||
| controller.render.player.third_person | !variable.is_first_person && !variable.map_face_icon | 非第一人称下同时非地图图标下生效 |
|
||||
| controller.render.player.map | variable.map_face_icon | 地图图标模式下生效 |
|
||||
| controller.render.player.first_person_bloom | variable.is_first_person | 第一人称时该渲染控制器生效 |
|
||||
| controller.render.player.third_person_bloom | !variable.is_first_person && !variable.map_face_icon | 非第一人称下同时非地图图标下生效 |
|
||||
| ------------------------------------------- | ---------------------------------------------------- | -------------------------------- |
|
||||
| controller.render.player.first_person_spectator | variable.is_first_person && query.is_spectator | 第一人称且旁观者模式下该渲染控制器生效 |
|
||||
| controller.render.player.third_person_spectator | !variable.is_first_person && !variable.map_face_icon && query.is_spectator | 非第一人称、非地图图标、旁观者模式下生效 |
|
||||
| controller.render.player.first_person | variable.is_first_person && !query.is_spectator | 第一人称且非旁观者模式下生效 |
|
||||
| controller.render.player.third_person | !variable.is_first_person && !variable.map_face_icon && !query.is_spectator | 非第一人称、非地图图标、非旁观者模式下生效 |
|
||||
| controller.render.player.map | variable.map_face_icon | 地图图标下生效 |
|
||||
|
||||
**其中,以上五个渲染控制器在渲染过程中并不保证顺序。**
|
||||
|
||||
|
||||
BIN
mcguide/20-玩法开发/15-自定义游戏内容/picture/custom_command6.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
mcguide/20-玩法开发/18-性能优化/images/after_optimization.png
Normal file
|
After Width: | Height: | Size: 13 KiB |