Find blocks
Diese Anleitung gibt es nur auf Englisch.
POST
Finds blocks of the given ids within a radius of the bot. Results are sorted by ascending distance.
header
AuthorizationBearer <JWT>Preferred API authentication. Use a JWT with the api audience.
instance_id*stringFormat
uuidbot_id*stringFormat
uuidapplication/json- body
blockIds*array<string>Block ids to match (namespaced, e.g. "minecraft:diamond_ore"). A block matches if its id equals any entry in this list.
maxDistance*integerMaximum search radius in blocks, measured from the bot's current block position. Server clamps to an implementation-defined maximum.
Format
int32maxCount*integerMaximum number of matches to return. Results are ordered by ascending distance from the bot.
Format
int32Successful response.
application/json- response
blocks?array<>curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/live/world/blocks:find' \
-H 'Content-Type: application/json' \
-d '{
"blockIds": [
"string"
],
"maxDistance": 0,
"maxCount": 0
}'Example Response
{
"blocks": [
{
"position": {
"x": 0,
"y": 0,
"z": 0,
"dimension": "string"
},
"blockId": "string",
"properties": {
"property1": "string",
"property2": "string"
}
}
]
}War diese Seite hilfreich?
