minecraft:behavior.pet_sleep_with_owner

Allows the pet mob to move onto a bed with its owner while sleeping.

Properties

PropertyTypeDefaultWhat it does
speed_multiplierDecimal1Movement speed multiplier of the mob when using this AI Goal
search_rangeInteger0The distance in blocks from the owner the pet can be to sleep with owner.
search_heightInteger1Height in blocks from the owner the pet can be to sleep with owner.
goal_radiusDecimal0.5Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

This is how vanilla Cat uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:behavior.pet_sleep_with_owner": {
    "priority": 2,
    "speed_multiplier": 1.2,
    "search_height": 10,
    "goal_radius": 1.0
  }
}

Used by 1

Vanilla entities with minecraft:behavior.pet_sleep_with_owner in their definition:

Related components