Skip to content
SoulFire LogoSoulFire

Dig block

POST
/v1/instances/{instance_id}/bots/{bot_id}/actions/dig

Starts (or stops, when cancel is set) breaking a block at a specific position. Unlike MouseClick, the target is explicit, with no raytrace from the current look direction is performed.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string
Formatuuid
bot_id*string
Formatuuid

Request Body

application/json
  1. body
position*

Block to break. Must be within reach of the bot.

cancel?boolean

If true, cancel an in-progress dig on this block instead of starting one.

Response Body

Successful response.

application/json
  1. response
result*
Example Request
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/actions/dig' \
  -H 'Content-Type: application/json' \
  -d '{
  "position": {
    "x": 0,
    "y": 0,
    "z": 0
  }
}'
Example Response
{
  "result": {
    "actionId": "4a2794ff-94cb-4bac-8d36-d5fb36c563a0",
    "status": "BOT_ACTION_STATUS_UNSPECIFIED",
    "error": "string"
  }
}

Was this page helpful?