126 lines
3.2 KiB
Markdown
126 lines
3.2 KiB
Markdown
---
|
||
front:
|
||
hard: 入门
|
||
time: 分钟
|
||
---
|
||
# 自定义含水方块
|
||
|
||
## 概述
|
||
|
||
自定义含水方块支持在组件中配置自定义方块含水的相关功能,并支持python监听事件、接口设置等。
|
||
|
||
## netease:water_destory
|
||
|
||
可在netease:water_destory组件中设置是否无法摆放在水源和流水方块中,如果设置为true,会被流水摧毁。
|
||
|
||
| 键 | 类型 | 默认值 | 解释 |
|
||
| ----- | ---- | ------ | -------------------------------------------- |
|
||
| value | bool | | 必须设置,用于设置无法摆放在水源和流水方块中 |
|
||
|
||
- 可以在方块的loottable中设置被水流摧毁后的掉落物
|
||
|
||
### 示例
|
||
```json
|
||
{
|
||
"format_version": "1.10.0",
|
||
"minecraft:block": {
|
||
"description": {
|
||
"identifier": "customblocks:water_destroy_test_block",
|
||
"category": "custom"
|
||
},
|
||
"components": {
|
||
"netease:water_destory": {
|
||
"value": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
```
|
||
|
||
## netease:water_only
|
||
|
||
可在netease:water_only组件中设置是否必须放置在水中。
|
||
|
||
| 键 | 类型 | 默认值 | 解释 |
|
||
| ----- | ---- | ------ | ------------------------------------ |
|
||
| value | bool | | 必须设置,用于设置是否必须放在水中。 |
|
||
|
||
### 示例
|
||
```json
|
||
{
|
||
"format_version": "1.10.0",
|
||
"minecraft:block": {
|
||
"description": {
|
||
"identifier": "customblocks:water_only_test_block",
|
||
"category": "custom"
|
||
},
|
||
"components": {
|
||
"netease:water_only": {
|
||
"value": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
```
|
||
|
||
## netease:water_source
|
||
|
||
可在netease:water_source组件中设置是否在水源方块中表现为含水。
|
||
|
||
| 键 | 类型 | 默认值 | 解释 |
|
||
| ----- | ---- | ------ | -------------------------------------- |
|
||
| value | bool | | 必须设置,是否在水源方块中表现为含水。 |
|
||
|
||
### 示例
|
||
```json
|
||
{
|
||
"format_version": "1.10.0",
|
||
"minecraft:block": {
|
||
"description": {
|
||
"identifier": "customblocks:water_source_test_block",
|
||
"category": "custom"
|
||
},
|
||
"components": {
|
||
"netease:water_source": {
|
||
"value": true
|
||
},
|
||
"netease:render_layer": {
|
||
"value": "alpha"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
```
|
||
|
||
## netease:water_flow_source
|
||
|
||
可在netease:water_flow_source组件中设置是否在水源和流水方块中表现为含水。
|
||
|
||
| 键 | 类型 | 默认值 | 解释 |
|
||
| ----- | ---- | ------ | -------------------------------------- |
|
||
| value | bool | | 必须设置,是否在水源和流水方块中表现为含水。 |
|
||
|
||
### 示例
|
||
```json
|
||
{
|
||
"format_version": "1.10.0",
|
||
"minecraft:block": {
|
||
"description": {
|
||
"identifier": "customblocks:water_flow_source_test_block",
|
||
"category": "custom"
|
||
},
|
||
"components": {
|
||
"netease:water_flow_source": {
|
||
"value": true
|
||
},
|
||
"netease:render_layer": {
|
||
"value": "alpha"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
```
|
||
|
||
|
||
|