Interact with entity
POST
Right-clicks / interacts with a specific entity by network id. Used for trading with villagers, mounting mobs, etc.
header
AuthorizationBearer <JWT>Preferred API authentication. Use a JWT with the api audience.
instance_id*stringFormat
uuidbot_id*stringFormat
uuidapplication/json- body
entityId*integerNetwork entity id from NearbyEntity.entity_id.
Format
int32hand*stringWhich hand to interact with.
Value in
"HAND_UNSPECIFIED""HAND_MAIN""HAND_OFF"sneaking?booleanTrue if the bot is sneaking during the interaction (affects e.g. whether a villager trade menu opens).
connectionEpoch?|Observation epoch that produced entity_id. When present, the action fails if the bot has reconnected since that observation.
Format
uuidSuccessful response.
application/json- response
result*curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/actions/interact' \
-H 'Content-Type: application/json' \
-d '{
"entityId": 0,
"hand": "HAND_UNSPECIFIED"
}'Example Response
{
"result": {
"actionId": "4a2794ff-94cb-4bac-8d36-d5fb36c563a0",
"status": "BOT_ACTION_STATUS_UNSPECIFIED",
"error": "string"
}
}Was this page helpful?
