Ram Attack¶
文档版本:1.21.50.25
Allows the mob to search for a random target and, if a direct path exists between the mob and the target, it will perform a charge. If the attack hits, the target will be knocked back based on the mob's speed.
架构¶
ram_attack:
{
priority "priority"
number "baby_knockback_modifier" : opt
range_number_type "cooldown_range"
number "knockback_force" : opt
number "knockback_height" : opt
number "min_ram_distance" : opt
trigger "on_start"
sound_event "pre_ram_sound"
number "ram_distance" : opt
sound_event "ram_impact_sound"
number "ram_speed" : opt
number "run_speed" : opt
trigger "trigger"
}
priority:priority
baby_knockback_modifier:number- The modifier to knockback that babies have.
cooldown_range:range_number_type- Minimum and maximum cooldown time-range (positive, in seconds) between each attempted ram attack.
0..0:number- The first value of the range.
1..1:number- The second value of the range.
range_min:number- The minimum value of the range.
range_max:number- The maximum value of the range.
knockback_force:number- The force of the knockback of the ram attack.
knockback_height:number- The height of the knockback of the ram attack.
min_ram_distance:number- The minimum distance at which the mob can start a ram attack.
on_start:trigger- The event to trigger when attacking.
event:string- The event to run when the conditions for this trigger are met.
filters:filters- 一个过滤器组。The list of conditions for this trigger to execute.
target:subject- The target of the event.
trigger:
array
{
object "<any array element>" : opt
{
string "event" : opt
filters "filters"
subject "target"
}
}
<any array element>:object
<any array element>pre_ram_sound:sound_event- The sound to play when an entity is about to perform a ram attack.
ram_distance:number- The distance at which the mob start to run with ram speed.
ram_impact_sound:sound_event- The sound to play when an entity is impacting on a ram attack.
ram_speed:number- Sets the entity's speed when charging toward the target.
run_speed:number- Sets the entity's speed when running toward the target.
trigger:trigger- The event to trigger when attacking.