Interface Angerable

All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Sound.Emitter, Sound.Source.Provider
All Known Subinterfaces:
Enderman

public interface Angerable extends Mob
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 Details

    • isAngry

      boolean isAngry()
      Returns true until the anger of this mob runs out.
      Returns:
      true until 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, 0 when it is not angry.
      Returns:
      how many ticks are left before the anger of this mob runs out, 0 when it is not angry
      Since:
      0.1.0
    • angryAt

      @Nullable UUID angryAt()
      Returns the one this mob holds a grudge against, null when it is angry at no one in particular or not angry.
      Returns:
      the one this mob holds a grudge against, null when it is angry at no one in particular or not angry
      Since:
      0.1.0
    • isAngryAt

      boolean isAngryAt(LivingEntity entity)
      Returns true if 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:
      true if this mob is angry at a living entity
      Since:
      0.1.0
    • setAngryAt

      void setAngryAt(LivingEntity entity, long ticks)
      Makes this mob angry at a living entity for a while, and go after it.
      Parameters:
      entity - the entity to hold a grudge against
      ticks - 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