1. Wiki
  2. /Entities
  3. /minecraft:behavior.tempt

minecraft:behavior.tempt

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

Overview

minecraft:behavior.tempt is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the mob follow a player who holds an item it likes, such as wheat for cows. Great for leading animals home.

Fields

FieldTypeDefaultDescription
can_get_scaredBoolean"false"If true, the mob stops following if the player moves too fast close to it.
can_tempt_verticallyBoolean"false"If true, height difference also counts when checking how close the player is.
can_tempt_while_riddenBoolean"false"If true, the mob can be tempted even with a rider on it.
itemsArray"[]"Which items the mob will follow.
sound_intervalRange [a, b]"[0.0, 0.0]"Random wait, in ticks, between tempt sounds.
speed_multiplierDecimal"1.0"Speeds the mob up or slows it down while this goal runs: 1 is normal speed.
stop_distanceDecimal"1.5"How close the mob gets to the player before it stops moving.
tempt_soundStringnoneSound the mob makes while being tempted.
within_radiusDecimal"0.0"How close the player must be for the item to tempt the mob.

Example

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

BP/entities/<name>.json
{
  "minecraft:behavior.tempt": {
    "can_get_scared": "false",
    "can_tempt_vertically": "false",
    "can_tempt_while_ridden": "false",
    "items": "[]",
    "sound_interval": "[0.0, 0.0]",
    "speed_multiplier": "1.0",
    "stop_distance": "1.5",
    "tempt_sound": ""
  }
}

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