minecraft:teleport

Defines an entity's teleporting behavior.

Properties

PropertyTypeDefaultWhat it does
random_teleportsBooleantrueIf true, the entity will teleport randomly
teleports_on_projectile_hitBooleanfalseIf true, the entity will attempt to teleport away from projectiles about to hit it
projectile_filterAny—Conditions that determine which projectiles cause the entity to attempt to teleport. If omitted, all projectiles cause a teleport attempt
min_random_teleport_timeDecimal0Minimum amount of time in seconds between random teleports
max_random_teleport_timeDecimal20Maximum amount of time in seconds between random teleports
random_teleport_cubeList of decimal or Object[32, 16, 32]Entity will teleport to a random position within the area defined by this cube
xDecimal0
yDecimal0
zDecimal0
target_distanceDecimal16Maximum distance the entity will teleport when chasing a target
target_teleport_chanceDecimal1The chance that the entity will teleport between 0.0 and 1.0. 1.0 means 100%
light_teleport_chanceDecimal0.01Modifies the chance that the entity will teleport if the entity is in daylight
dark_teleport_chanceDecimal0.01Modifies the chance that the entity will teleport if the entity is in darkness

Example from the game files

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

{
  "minecraft:teleport": {
    "random_teleports": true,
    "max_random_teleport_time": 30,
    "random_teleport_cube": [
      32,
      32,
      32
    ],
    "target_distance": 16,
    "target_teleport_chance": 0.05,
    "light_teleport_chance": 0.05,
    "teleports_on_projectile_hit": true
  }
}

Used by 1

Vanilla entities with minecraft:teleport in their definition:

Related components