觸發挖掘
這個動作(Action)是在檢測到觸發塊時進行挖掘而設計的。
組成
一個動作(Action)基本上由兩個主要組件組成:
- 類型(type)
triggerDigger- 數據(data)
參見 觸發挖掘數據
觸發挖掘數據(TriggerDiggerData)
Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
targets | 是 | - | 要挖掘的方塊。 | |
tool | 字串 | 否 | - | 要使用的工具。 (例如: pickaxe, shovel, axe, shears) |
can_move | 布林值 | 否 | false | 機器人在挖掘時是否可以移動。 |
fuzzy_range | 數字 | 否 | 3 | 移動到目標時停止的範圍。 (僅在 |
flying | 布林值 | 否 | false | 機器人在挖掘時是否可以飛行。 |
max_dig_amount | 數字 | 否 | 1 | 同時挖掘的最大方塊數量。 |
目標(Target)
目標方塊。
示例
[
{
"type": "triggerDigger",
"data": {
"targets": [
{
"pos": {
"x": 1,
"y": 4,
"z": 1
},
"blockProps": {
"name": "mushroom_stem"
}
},
{
"pos": {
"x": 1,
"y": 3,
"z": 1
},
"blockProps": {
"name": "mushroom_stem"
}
},
{
"pos": {
"x": 1,
"y": 2,
"z": 1
},
"blockProps": {
"name": "mushroom_stem"
}
},
{
"pos": {
"x": 1,
"y": 1,
"z": 1
},
"blockProps": {
"name": "mushroom_stem"
}
}
],
"tool": "axe",
"can_move": false
}
}
]
Last modified: 12 11月 2023