Interface Wither

All Superinterfaces:
Attributable, Audience, Boss, CommandSender, Creature, Damageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, RangedEntity, ServerOperator, Sound.Emitter

public interface Wither extends Monster, Boss, RangedEntity
Represents a Wither boss
  • Method Details

    • setTarget

      void setTarget(@Nullable @Nullable LivingEntity target)
      Instructs this Mob to set the specified LivingEntity as its target.

      Hostile creatures may attack their target, and friendly creatures may follow their target.

      This method will set the target of the center head of the wither.

      Specified by:
      setTarget in interface Mob
      Parameters:
      target - New LivingEntity to target, or null to clear the target
      See Also:
    • setTarget

      This method will set the target of individual heads Wither.Head of the wither.
      Parameters:
      head - the individual head
      target - the entity that should be targeted
    • getTarget

      This method will get the target of individual heads Wither.Head of the wither.
      Parameters:
      head - the individual head
      Returns:
      the entity targeted by the given head, or null if none is targeted
    • isCharged

      boolean isCharged()
      Returns:
      whether the wither is charged
    • getInvulnerableTicks

      int getInvulnerableTicks()
      Returns:
      ticks the wither is invulnerable for
    • setInvulnerableTicks

      void setInvulnerableTicks(int ticks)
      Sets for how long in the future, the wither should be invulnerable.
      Parameters:
      ticks - ticks the wither is invulnerable for
    • canTravelThroughPortals

      boolean canTravelThroughPortals()
      Returns:
      whether the wither can travel through portals
    • setCanTravelThroughPortals

      void setCanTravelThroughPortals(boolean value)
      Sets whether the wither can travel through portals.
      Parameters:
      value - whether the wither can travel through portals