WardenAnger 5.46.0
The warden's anger towards each suspect (vanilla minecraft:anger_level): every disturbance adds anger to the entity which caused it, anger decays by 1 every second, and a suspect with 80 or more anger is a target. The anger level of the warden is the highest anger towards any suspect (it drives the heartbeat and the ambient sounds).
Values from Mojang's bedrock-samples behavior_pack/entities/warden.json: angry_threshold 80, angry_boost 20 (added when the warden roars at a new target), default_annoyingness 35, default_projectile_annoyingness 10, max_anger 150, anger_decrement_interval 1 s; agitated sounds from 40.
Constants
AGITATED_THRESHOLD
public const AGITATED_THRESHOLD = 40ANGRY_BOOST
public const ANGRY_BOOST = 20ANGRY_THRESHOLD
public const ANGRY_THRESHOLD = 80DEFAULT_ANNOYINGNESS
public const DEFAULT_ANNOYINGNESS = 35HURT_ANNOYINGNESS
public const HURT_ANNOYINGNESS = 100Anger added by hurting the warden (vanilla Java: 100).
MAX_ANGER
public const MAX_ANGER = 150MAX_SUSPECTS
public const MAX_SUSPECTS = 100Most suspects remembered (vanilla Java keeps at most 100).
PROJECTILE_ANNOYINGNESS
public const PROJECTILE_ANNOYINGNESS = 10Methods
clear()
public function clear() : voiddecay()
public function decay(int $amount = 1) : voidLowers every anger by the given amount, forgetting suspects whose anger reaches 0.
forget()
public function forget(int $entityId) : voidget()
public function get(int $entityId) : intgetAll()
public function getAll() : arraygetAngerLevel()
public function getAngerLevel() : intReturns the warden's anger level: the highest anger towards any suspect.
getAngriest()
public function getAngriest(?\Closure $isValid = null) : ?intReturns the suspects the warden is angry at (anger >= 80), best target first: players before other mobs, then the angriest first (vanilla priority).
increase()
public function increase(int $entityId, bool $isPlayer, int $amount) : intAdds anger towards the entity and returns its new anger, capped at WardenAnger::MAX_ANGER.
isAngryAt()
public function isAngryAt(int $entityId) : bool