Tempt¶
文档版本:1.21.50.25
Allows an entity to be tempted by a set item.
架构¶
tempt:
{
  priority "priority"
  speed_multiplier "speed_multiplier"
  boolean "can_get_scared" : opt
  boolean "can_tempt_while_ridden" : opt
  boolean "can_tempt_vertically" : opt
  array "items" : opt
  {
    descriptor "<any array element>"
  }
  number "sound_interval" : opt
  array "sound_interval" : opt
  {
    integer "0..0" : opt
    integer "1..1" : opt
  }
  sound_event "tempt_sound"
  number "within_radius" : opt
}
priority:priority
speed_multiplier:speed_multiplier
can_get_scared:boolean- If true, the mob can stop being tempted if the player moves too fast while close to this mob.
 
can_tempt_while_ridden:boolean- If true, the mob can be tempted even if it has a passenger (i.e. if being ridden).
 
can_tempt_vertically:boolean- If true, vertical distance to the player will be considered when tempting.
 
items:array- List of items this mob is tempted by.
 
items<any array element>:descriptor
item:identifier
item:object- An object that describes an item.
 
itemtags:0- [UNDOCUMENTED] A Molang expression ran against item or block to match.
 
item_tag:string- [UNDOCUMENTED] A tag to lookup item or block by.
 
sound_interval:number- Range of random ticks to wait between tempt sounds.
 
sound_interval:array- Range of random ticks to wait between tempt sounds.
 
sound_interval0..0:integer
1..1:integer
tempt_sound:sound_event- Sound to play while the mob is being tempted.
 
within_radius:number- Distance in blocks this mob can get tempted by a player holding an item they like.