Interface Piglin

    • Method Detail

      • 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
      • isAbleToHunt

        boolean isAbleToHunt()
        Get whether the piglin is able to hunt hoglins.
        Returns:
        Whether the piglin is able to hunt hoglins
      • setIsAbleToHunt

        void setIsAbleToHunt​(boolean flag)
        Sets whether the piglin is able to hunt hoglins.
        Parameters:
        flag - Whether the piglin is able to hunt hoglins.
      • 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

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

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