Entity Documentation - minecraft:behavior.slime_attack
minecraft:behavior.slime_attack
enables mobs with minecraft:movement.jump
to path towards their target like a slime
or magma_cube
does to attack.
Important
In order to attack, the entity must have a runtime_identifier
set to minecraft:slime
and a variant component with a value greater than 1. Otherwise it will still path towards a target but it will not cause damage.
Important
minecraft:behavior.slime_attack
requires a target in order to work properly. Target can be determined by using one of the following behaviors:
Important
minecraft:behavior.slime_attack
requires an attack attribute in order to work properly.
minecraft:attack
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
priority | not set | Integer | The higher the priority, the sooner this behavior will be executed as a goal. |
set_persistent | false | Boolean | Allows the entity to be set to persist upon targeting a player |
speed_multiplier | 1 | Decimal | During attack behavior, this multiplier modifies the entity's speed when moving toward the target. |
x_max_rotation | 10 | Decimal | Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. |
y_max_rotation | 10 | Decimal | Maximum rotation (in degrees), on the Y-axis, this entity can rotate while trying to look at the target. |
Example
"minecraft:behavior.slime_attack":{
"priority": 2,
"set_persistent": true,
"speed_multiplier": 3.0,
"x_max_rotation": 15.0,
"y_max_rotation": 15.0
}
Vanilla entities examples
slime
"minecraft:behavior.slime_attack": {
"priority": 3
}
Vanilla entities using minecraft:behavior.slime_attack
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour