Class AbstractPiglin

All Implemented Interfaces:
CommandSource, SyncedDataHolder, Attackable, EquipmentUser, Enemy, Targeting, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension, ILivingEntityExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
Piglin, PiglinBrute

public abstract class AbstractPiglin extends Monster
  • Field Details

    • DATA_IMMUNE_TO_ZOMBIFICATION

      protected static final EntityDataAccessor<Boolean> DATA_IMMUNE_TO_ZOMBIFICATION
    • CONVERSION_TIME

      protected static final int CONVERSION_TIME
      See Also:
    • timeInOverworld

      protected int timeInOverworld
  • Constructor Details

  • Method Details

    • applyOpenDoorsAbility

      private void applyOpenDoorsAbility()
    • canHunt

      protected abstract boolean canHunt()
    • setImmuneToZombification

      public void setImmuneToZombification(boolean p_34671_)
    • isImmuneToZombification

      protected boolean isImmuneToZombification()
    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder p_326274_)
      Overrides:
      defineSynchedData in class Mob
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_34661_)
      Overrides:
      addAdditionalSaveData in class Mob
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_34659_)
      Overrides:
      readAdditionalSaveData in class Mob
    • customServerAiStep

      protected void customServerAiStep()
      Overrides:
      customServerAiStep in class Mob
    • isConverting

      public boolean isConverting()
    • finishConversion

      protected void finishConversion(ServerLevel p_34663_)
    • isAdult

      public boolean isAdult()
    • getArmPose

      public abstract PiglinArmPose getArmPose()
    • getTarget

      @Nullable public LivingEntity getTarget()
      Specified by:
      getTarget in interface Targeting
      Overrides:
      getTarget in class Mob
    • isHoldingMeleeWeapon

      protected boolean isHoldingMeleeWeapon()
    • playAmbientSound

      public void playAmbientSound()
      Overrides:
      playAmbientSound in class Mob
    • sendDebugPackets

      protected void sendDebugPackets()
      Overrides:
      sendDebugPackets in class Mob
    • playConvertedSound

      protected abstract void playConvertedSound()