feat:上传mcguide-开发指南部份

This commit is contained in:
Othniel su
2024-12-23 10:57:59 +08:00
parent 7292166c88
commit 0dc59fa4f0
3297 changed files with 63375 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
---
front:
hard: 入门
time: 分钟
---
# 自定义红石方块
自定义红石方块是一种特殊的自定义方块,包括信号源方块与红石机械元件方块,支持方块相关的所有事件以及接口。
## 自定义红石信号源方块
自定义红石信号源方块放置在地图上会发出红石信号,信号的初始值可以配置。
其中type为producerstrength为初始红石信号量。
```json
{
"format_version": "1.10.0",
"minecraft:block": {
"description": {
"identifier": "customblocks:customblocks_redstone",
"register_to_creative_menu": true,
"is_experimental": false,
},
"components": {
"minecraft:map_color": {
"color": "#408080"
},
"netease:redstone": {
"type": "producer",
"strength": 10
}
}
}
}
```
## 自定义红石机械元件方块
自定义红石机械元件方块放置在地图上会接收红石信号,可以被激活。
对于自定义红石机械元件方块,其红石信号变化时触发事件<a href="../../../../../mcdocs/1-ModAPI/事件/方块.html#blockstrengthchangedserverevent" rel="noopenner"> BlockStrengthChangedServerEvent </a>。
其中type为consumer初始红石信号量为0未激活状态不能通过netease:redstone的strength字段进行配置。
```json
{
"format_version": "1.10.0",
"minecraft:block": {
"description": {
"identifier": "customblocks:customblocks_redstone_consumer",
"register_to_creative_menu": true,
"is_experimental": false,
},
"components": {
"netease:redstone": {
"type": "consumer"
}
}
}
}
```