1. Wiki
  2. /Entities
  3. /minecraft:teleport

minecraft:teleport

Don't want to write this by hand? GodCraft sets minecraft:teleport for you with a switch.Get GodCraft

Overview

minecraft:teleport is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the entity teleport around randomly or toward its target, like an enderman.

Fields

FieldTypeDefaultDescription
dark_teleport_chanceDecimal"0.01"Changes how likely a random teleport is when the entity is in darkness.
light_teleport_chanceDecimal"0.01"Changes how likely a random teleport is when the entity is in daylight.
max_random_teleport_timeDecimal"20"Longest time in seconds between random teleports.
min_random_teleport_timeDecimal"0"Shortest time in seconds between random teleports.
projectile_filterMinecraft FilternoneDecides which projectiles make the entity try to teleport; leave it out for all of them.
random_teleport_cubeVector [a, b, c]"[32, 16, 32]"Size of the box around the entity where random teleports can land.
random_teleportsBoolean"true"If true, the entity teleports randomly now and then.
target_distanceDecimal"16"Farthest the entity will teleport while chasing a target.
target_teleport_chanceDecimal"1"Chance from 0.0 to 1.0 of teleporting toward its target.
teleports_on_projectile_hitBoolean"false"If true, the entity dodges incoming projectiles by teleporting.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:teleport": {
    "dark_teleport_chance": "0.01",
    "light_teleport_chance": "0.01",
    "max_random_teleport_time": "20",
    "min_random_teleport_time": "0",
    "projectile_filter": {},
    "random_teleport_cube": "[32, 16, 32]",
    "random_teleports": "true",
    "target_distance": "16"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more