minecraft:home

Saves a home position for when the the entity is spawned.

Properties

PropertyTypeDefaultWhat it does
restriction_typeTextnone, all_movement, random_movement"none"Defines how the the entity will be restricted to its home position. The possible values are: - "none", which poses no restriction. - "random_movement", which restricts randomized movement to be around the home position. - "all_movement", which restricts any kind of movement to be around the home position. However, entities that somehow got too far away from their home will always be able to move closer to it, if prompted to do so.
restriction_radiusInteger0Optional radius that the entity will be restricted to in relation to its home.
home_block_listList of text[]Optional list of blocks that can be considered a valid home. If no such block longer exists at that position, the home restriction is removed. Example syntax: minecraft:sand. Not supported: minecraft:sand:1.

Example from the game files

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

{
  "minecraft:home": {
    "restriction_type": "random_movement",
    "restriction_radius": 22,
    "home_block_list": [
      "minecraft:bee_nest",
      "minecraft:beehive"
    ]
  }
}

Used by 10

Vanilla entities with minecraft:home in their definition:

Related components