Files
netease-modsdk-wiki/docs/mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/9-自定义含雪方块.md
2025-03-18 14:46:12 +08:00

69 lines
2.0 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:snow_recover_able
可在netease:snow_recover_able组件中设置方块是否能含雪。
| 键 | 类型 | 默认值 | 解释 |
| ----- | ---- | ------ | -------------------------------- |
| value | bool | | 必须设置,用于设置方块是否能含雪 |
## netease:can_built_over
可在netease:can_built_over组件中设置在放置其他方块时如果该位置已有含netease:can_built_over配置的方块其他方块能否和放置在此方块中。
| 键 | 类型 | 默认值 | 解释 |
| ----- | ---- | ------ | ------------------------------------------------------------ |
| value | bool | | 必须设置用于设置在放置其他方块时如果该位置已有含netease:can_built_over配置的方块其他方块能否和放置在此方块中 |
### 示例
```json
{
"format_version": "1.10.0",
"minecraft:block": {
"description": {
"identifier": "customblocks:customblocks_test_ore",
"category": "custom"
},
"components": {
"minecraft:block_light_absorption": {
"value": 0
},
"netease:render_layer": {
"value": "alpha"
},
"netease:snow_recover_able": {
"value": true
},
"netease:can_built_over": {
"value": true
},
"netease:aabb": {
"collision": {
"min": [0.0, 0.0, 0.0],
"max": [0.0, 0.0, 0.0]
},
"clip": {
"min": [0.0, 0.0, 0.0],
"max": [1.0, 0.188, 1.0]
}
}
}
}
}
```
## 注意
目前自定义含雪方块和方块实体不兼容(包括自定义方块实体,自定义刷怪箱等),请不要一起使用