Files
netease-modsdk-wiki/docs/mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/7-自定义含水方块.md
2025-03-17 13:24:39 +08:00

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