Interface Angerable
- All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Sound.Emitter, Sound.Source.Provider
- All Known Subinterfaces:
Enderman
A mob that leaves the others alone until provoked, then holds a grudge for a while: an enderman.
Once provoked it stays angry at the one that provoked it until a time of its world, and keeps
that grudge when saved. With the universal_anger game rule, a mob angry at no one in
particular is angry at every player; with forgive_dead_players, it forgives a player
that dies.
Like every entity, change it from the region thread owning its chunk.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionangryAt()Returns the one this mob holds a grudge against,nullwhen it is angry at no one in particular or not angry.booleanisAngry()Returnstrueuntil the anger of this mob runs out.booleanisAngryAt(LivingEntity entity) Returnstrueif this mob is angry at a living entity.longReturns how many ticks are left before the anger of this mob runs out,0when it is not angry.voidsetAngryAt(LivingEntity entity, long ticks) Makes this mob angry at a living entity for a while, and go after it.voidCalms this mob down: it forgets who hurt it and gives up its target.Methods inherited from interface Entity
chunk, displayName, entityId, isRemoved, location, remove, server, teleport, teleport, teleport, type, uuid, worldMethods inherited from interface HoverEventSource
asHoverEvent, asHoverEventMethods inherited from interface LivingEntity
absorptionAmount, activeEffects, addEffect, armor, armorToughness, clearEffects, damage, effect, equipment, fireTicks, hasEffect, headYaw, heal, health, isAlive, isDead, kill, knockbackResistance, maxHealth, removeEffect, setAbsorptionAmount, setFireTicks, setHeadYaw, setHealthMethods inherited from interface Mob
attackDamage, behaviour, behaviours, definition, distanceSqTo, followRange, goals, hasLineOfSightTo, height, lookAt, lookAt, movementSpeed, navigateTo, navigation, nearestPlayer, onGround, playSound, setFollowRange, setMoveSpeed, setTarget, setVelocity, target, velocityX, velocityY, velocityZ, widthMethods inherited from interface SchedulerSource
execute, execute, executeDelayed, executeDelayed, isOwnedByCurrentThreadMethods inherited from interface Sound.Source.Provider
soundSource
-
Method Details
-
isAngry
boolean isAngry()Returnstrueuntil the anger of this mob runs out.- Returns:
trueuntil the anger of this mob runs out- Since:
- 0.1.0
-
remainingAngerTicks
long remainingAngerTicks()Returns how many ticks are left before the anger of this mob runs out,0when it is not angry.- Returns:
- how many ticks are left before the anger of this mob runs out,
0when it is not angry - Since:
- 0.1.0
-
angryAt
-
isAngryAt
Returnstrueif this mob is angry at a living entity.: it may attack it, and it holds a grudge against it, or it is a player while this mob is angry at every player- Parameters:
entity- the entity- Returns:
trueif this mob is angry at a living entity- Since:
- 0.1.0
-
setAngryAt
Makes this mob angry at a living entity for a while, and go after it.- Parameters:
entity- the entity to hold a grudge againstticks- how long the anger lasts, if nothing starts it over- Since:
- 0.1.0
-
stopBeingAngry
void stopBeingAngry()Calms this mob down: it forgets who hurt it and gives up its target.- Since:
- 0.1.0
-