Interface PiglinAbstract

All Superinterfaces:
Ageable, Attributable, Audience, CommandSender, Creature, Damageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator
All Known Subinterfaces:
Piglin, PiglinBrute

public interface PiglinAbstract extends Monster, Ageable
Piglin / Piglin Brute.
  • Method Details

    • isImmuneToZombification

      boolean isImmuneToZombification()
      Gets whether the piglin is immune to zombification.
      Returns:
      Whether the piglin is immune to zombification
    • setImmuneToZombification

      void setImmuneToZombification(boolean flag)
      Sets whether the piglin is immune to zombification.
      Parameters:
      flag - Whether the piglin is immune to zombification
    • getConversionTime

      int getConversionTime()
      Gets the amount of ticks until this entity will be converted to a Zombified Piglin. When this reaches 300, 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 Zombified Piglin. 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
    • isConverting

      boolean isConverting()
      Get if this entity is in the process of converting to a Zombified Piglin.
      Returns:
      conversion status
    • isBaby

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

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