Files
netease-modsdk-wiki/docs/mcdocs/3-PresetAPI/预设对象/预设/方块预设BlockPreset.md
2025-03-17 13:24:39 +08:00

78 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebarDepth: 1
---
# 方块预设BlockPreset
## 概述
- 继承关系
```mermaid
classDiagram
PresetBase <|-- BlockPreset
link PresetBase "../../../../mcdocs/3-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 "../../../../mcdocs/3-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 "../../../../mcdocs/3-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 "../../../../mcdocs/3-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 |