Interface Zombie

All Superinterfaces:
Ageable, Attributable, Audience, CommandSender, Creature, Damageable, Enemy, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter
All Known Subinterfaces:
Drowned, Husk, PigZombie, ZombieVillager

public interface Zombie extends Monster, Ageable
Represents a Zombie.
  • Method Details

    • isBaby

      @Deprecated boolean isBaby()
      Deprecated.
      Gets whether the zombie is a baby
      Returns:
      Whether the zombie is a baby
    • setBaby

      @Deprecated void setBaby(boolean flag)
      Sets whether the zombie is a baby
      Parameters:
      flag - Whether the zombie is a baby
    • isVillager

      @Deprecated boolean isVillager()
      Deprecated.
      check if instanceof ZombieVillager.
      Gets whether the zombie is a villager
      Returns:
      Whether the zombie is a villager
    • setVillager

      @Deprecated @Contract("_ -> fail") void setVillager(boolean flag)
      Deprecated.
      must spawn ZombieVillager.
      Parameters:
      flag - flag
    • setVillagerProfession

      @Deprecated @Contract("_ -> fail") void setVillagerProfession(Villager.Profession profession)
      Deprecated.
      Parameters:
      profession - profession
      See Also:
    • getVillagerProfession

      @Deprecated @Nullable @Contract("-> null") Villager.Profession getVillagerProfession()
      Deprecated.
      Returns:
      profession
      See Also:
    • isConverting

      boolean isConverting()
      Get if this entity is in the process of converting to a Drowned as a result of being underwater.
      Returns:
      conversion status
    • getConversionTime

      int getConversionTime()
      Gets the amount of ticks until this entity will be converted to a Drowned as a result of being underwater. When this reaches 0, the entity will be converted.
      Returns:
      conversion time
      Throws:
      IllegalStateException - if isConverting() is false.
    • setConversionTime

      void setConversionTime(int time)
      Sets the amount of ticks until this entity will be converted to a Drowned as a result of being underwater. When this reaches 0, the entity will be converted. A value of less than 0 will stop the current conversion process without converting the current entity.
      Parameters:
      time - new conversion time
    • canBreakDoors

      boolean canBreakDoors()
      Gets whether this zombie can break doors
      Returns:
      Whether this zombie can break doors
    • setCanBreakDoors

      void setCanBreakDoors(boolean flag)
      Sets whether this zombie can break doors

      Check supportsBreakingDoors() to see if this zombie type will even be affected by using this method. Will also stop the action if the entity is currently breaking a door.

      Parameters:
      flag - Whether this zombie can break doors
    • isDrowning

      boolean isDrowning()
      Check if zombie is drowning
      Returns:
      True if zombie conversion process has begun
    • startDrowning

      @Deprecated void startDrowning(int drownedConversionTime)
      Deprecated.
      Make zombie start drowning
      Parameters:
      drownedConversionTime - Amount of time until zombie converts from drowning
    • stopDrowning

      void stopDrowning()
      Stop a zombie from starting the drowning conversion process
    • setArmsRaised

      void setArmsRaised(boolean raised)
      Set if zombie has its arms raised
      Parameters:
      raised - True to raise arms
    • isArmsRaised

      boolean isArmsRaised()
      Check if zombie has arms raised
      Returns:
      True if arms are raised
    • shouldBurnInDay

      boolean shouldBurnInDay()
      Check if this zombie will burn in the sunlight
      Returns:
      True if zombie will burn in sunlight
    • setShouldBurnInDay

      void setShouldBurnInDay(boolean shouldBurnInDay)
      Set if this zombie should burn in the sunlight
      Parameters:
      shouldBurnInDay - True to burn in sunlight
    • supportsBreakingDoors

      boolean supportsBreakingDoors()
      Checks if this zombie type supports breaking doors. Drowned do not have support for breaking doors so using setCanBreakDoors(boolean) on them has no effect.
      Returns:
      true if entity supports breaking doors