Interface Wither

All Superinterfaces:
Attributable, Boss, CommandSender, Creature, Damageable, Enemy, Entity, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator

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

    • setTarget

      void setTarget(@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

      void setTarget(@NotNull Wither.Head head, @Nullable LivingEntity target)
      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
    • getInvulnerabilityTicks

      int getInvulnerabilityTicks()
      Returns the wither's current invulnerability ticks.
      Returns:
      amount of invulnerability ticks
    • setInvulnerabilityTicks

      void setInvulnerabilityTicks(int ticks)
      Sets the wither's current invulnerability ticks. When invulnerability ticks reach 0, the wither will trigger an explosion.
      Parameters:
      ticks - amount of invulnerability ticks