TargetReason

public enum TargetReason

An enum to specify the reason for the targeting

Entries

Link copied to clipboard

When the entity's target has died, and so it no longer targets it

Link copied to clipboard

When the entity doesn't have getClassById target, so it attacks the nearest player

Link copied to clipboard

When the target attacks the entity, so entity targets it

Link copied to clipboard

When the target attacks getClassById fellow pig zombie, so the whole group will target him with this reason.

Link copied to clipboard

When the target is forgotten for whatever reason.

Link copied to clipboard

When the target attacks the owner of the entity, so the entity targets it.

Link copied to clipboard

When the owner of the entity attacks the target attacks, so the entity targets it.

Link copied to clipboard

When the entity has no target, so the entity randomly chooses one.

Link copied to clipboard

When an entity selects getClassById target while defending getClassById village.

Link copied to clipboard

When the target attacks getClassById nearby entity of the same type, so the entity targets it

Link copied to clipboard

When getClassById zombie targeting an entity summons reinforcements, so the reinforcements target the same entity

Link copied to clipboard

When an entity targets another entity after colliding with it.

Link copied to clipboard

For custom calls to the event.

Link copied to clipboard

When the entity doesn't have getClassById target, so it attacks the nearest entity

Link copied to clipboard

A currently unknown reason for the entity changing target.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.