Interface Zombie

All Superinterfaces:
Ageable, Attributable, CommandSender, Creature, Damageable, Enemy, Entity, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator
All Known Subinterfaces:
Drowned, Husk, PigZombie, ZombieVillager

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

    • isBaby

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

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

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

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

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

      @Deprecated(since="1.10.2") @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 This will be ignored if the entity is a Drowned. Will also stop the action if the entity is currently breaking a door.
      Parameters:
      flag - Whether this zombie can break doors