Interface Zombie

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

public interface Zombie extends Mob
A zombie (minecraft:zombie), or one of its kin: the husk, the drowned and the frostbite.

Some zombies are babies, faster and smaller; some lead the others. A zombie that keeps its eyes under water for 30 seconds turns into its drowned form, and one that stays in powder snow for 7 seconds into its frozen form.

Like every entity, change it from the region thread owning its chunk.

Since:
0.1.0
  • Method Details

    • isBaby

      boolean isBaby()
      Returns true for a baby zombie.
      Returns:
      true for a baby zombie
      Since:
      0.1.0
    • setBaby

      void setBaby(boolean baby)
      Makes this zombie a baby, or an adult again.
      Parameters:
      baby - true for a baby
      Since:
      0.1.0
    • isLeader

      boolean isLeader()
      Returns true if this zombie leads the others.: it has more health, calls for reinforcements far more often and breaks doors
      Returns:
      true if this zombie leads the others
      Since:
      0.1.0
    • canBreakDoors

      boolean canBreakDoors()
      Returns true if this zombie breaks the wooden doors in its way., which it only does on hard difficulty
      Returns:
      true if this zombie breaks the wooden doors in its way
      Since:
      0.1.0
    • setCanBreakDoors

      void setCanBreakDoors(boolean canBreakDoors)
      Lets this zombie break the wooden doors in its way, on hard difficulty.
      Parameters:
      canBreakDoors - true to let it
      Since:
      0.1.0
    • reinforcementChance

      double reinforcementChance()
      Returns the chance, between 0 and 1, that this zombie calls a reinforcement when it is hurt on hard difficulty.
      Returns:
      the chance, between 0 and 1, that this zombie calls a reinforcement when it is hurt on hard difficulty
      Since:
      0.1.0
    • setReinforcementChance

      void setReinforcementChance(double chance)
      Sets how likely this zombie calls a reinforcement, whatever was rolled for it.
      Parameters:
      chance - the chance, between 0 and 1
      Since:
      0.1.0
    • isUnderWaterConverting

      boolean isUnderWaterConverting()
      Returns true while this zombie shakes under water, about to turn into its drowned form.
      Returns:
      true while this zombie shakes under water, about to turn into its drowned form
      Since:
      0.1.0
    • isFreezeConverting

      boolean isFreezeConverting()
      Returns true while this zombie shakes in powder snow, about to turn into its frozen form.
      Returns:
      true while this zombie shakes in powder snow, about to turn into its frozen form
      Since:
      0.1.0
    • setInWaterTime

      void setInWaterTime(int ticks)
      Sets for how many ticks this zombie has had its eyes under water; it starts to turn into its drowned form at 600.
      Parameters:
      ticks - the time under water
      Since:
      0.1.0
    • setFreezingTime

      void setFreezingTime(int ticks)
      Sets for how many ticks this zombie has been in powder snow; it starts to turn into its frozen form at 140.
      Parameters:
      ticks - the time in powder snow
      Since:
      0.1.0