Class AbstractPiglinEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Monster, Targeter, ScoreHolder, CommandOutput, Nameable, EntityLike
Direct Known Subclasses:
PiglinBruteEntity, PiglinEntity

public abstract class AbstractPiglinEntity extends HostileEntity
Mappings:
Namespace Name
named net/minecraft/entity/mob/AbstractPiglinEntity
intermediary net/minecraft/class_5418
official clo
  • Field Details

    • IMMUNE_TO_ZOMBIFICATION

      protected static final TrackedData<Boolean> IMMUNE_TO_ZOMBIFICATION
      Mappings:
      Namespace Name Mixin selector
      named IMMUNE_TO_ZOMBIFICATION Lnet/minecraft/entity/mob/AbstractPiglinEntity;IMMUNE_TO_ZOMBIFICATION:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_25758 Lnet/minecraft/class_5418;field_25758:Lnet/minecraft/class_2940;
      official b Lclo;b:Lakk;
    • TIME_TO_ZOMBIFY

      protected static final int TIME_TO_ZOMBIFY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named TIME_TO_ZOMBIFY Lnet/minecraft/entity/mob/AbstractPiglinEntity;TIME_TO_ZOMBIFY:I
      intermediary field_30547 Lnet/minecraft/class_5418;field_30547:I
      official c Lclo;c:I
    • timeInOverworld

      protected int timeInOverworld
      Mappings:
      Namespace Name Mixin selector
      named timeInOverworld Lnet/minecraft/entity/mob/AbstractPiglinEntity;timeInOverworld:I
      intermediary field_25759 Lnet/minecraft/class_5418;field_25759:I
      official d Lclo;d:I
  • Constructor Details

    • AbstractPiglinEntity

      public AbstractPiglinEntity(EntityType<? extends AbstractPiglinEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      official <init> Lbsw;<init>(Lbtc;Ldca;)V
  • Method Details

    • setCanPathThroughDoors

      private void setCanPathThroughDoors()
      Mappings:
      Namespace Name Mixin selector
      named setCanPathThroughDoors Lnet/minecraft/entity/mob/AbstractPiglinEntity;setCanPathThroughDoors()V
      intermediary method_30239 Lnet/minecraft/class_5418;method_30239()V
      official y Lclo;y()V
    • canHunt

      protected abstract boolean canHunt()
      Mappings:
      Namespace Name Mixin selector
      named canHunt Lnet/minecraft/entity/mob/AbstractPiglinEntity;canHunt()Z
      intermediary method_26952 Lnet/minecraft/class_5418;method_26952()Z
      official s Lclo;s()Z
    • setImmuneToZombification

      public void setImmuneToZombification(boolean immuneToZombification)
      Mappings:
      Namespace Name Mixin selector
      named setImmuneToZombification Lnet/minecraft/entity/mob/AbstractPiglinEntity;setImmuneToZombification(Z)V
      intermediary method_30240 Lnet/minecraft/class_5418;method_30240(Z)V
      official w Lclo;w(Z)V
    • isImmuneToZombification

      protected boolean isImmuneToZombification()
      Mappings:
      Namespace Name Mixin selector
      named isImmuneToZombification Lnet/minecraft/entity/mob/AbstractPiglinEntity;isImmuneToZombification()Z
      intermediary method_30234 Lnet/minecraft/class_5418;method_30234()Z
      official u Lclo;u()Z
    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Overrides:
      initDataTracker in class MobEntity
      API Note:
      Subclasses should override this and add to the builder any data that needs to be tracked.
      Mappings:
      Namespace Name Mixin selector
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)V
      official a Lbsw;a(Lako$a;)V
    • writeCustomDataToNbt

      public void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      Overrides:
      writeCustomDataToNbt in class MobEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      official b Lbsw;b(Lus;)V
    • readCustomDataFromNbt

      public void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      nbt might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.

      Overrides:
      readCustomDataFromNbt in class MobEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      official a Lbsw;a(Lus;)V
    • mobTick

      protected void mobTick()
      Overrides:
      mobTick in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named mobTick Lnet/minecraft/entity/mob/MobEntity;mobTick()V
      intermediary method_5958 Lnet/minecraft/class_1308;method_5958()V
      official Z Lbtt;Z()V
    • shouldZombify

      public boolean shouldZombify()
      Mappings:
      Namespace Name Mixin selector
      named shouldZombify Lnet/minecraft/entity/mob/AbstractPiglinEntity;shouldZombify()Z
      intermediary method_30235 Lnet/minecraft/class_5418;method_30235()Z
      official gq Lclo;gq()Z
    • zombify

      protected void zombify(ServerWorld world)
      Mappings:
      Namespace Name Mixin selector
      named zombify Lnet/minecraft/entity/mob/AbstractPiglinEntity;zombify(Lnet/minecraft/server/world/ServerWorld;)V
      intermediary method_24694 Lnet/minecraft/class_5418;method_24694(Lnet/minecraft/class_3218;)V
      official c Lclo;c(Larf;)V
    • isAdult

      public boolean isAdult()
      Mappings:
      Namespace Name Mixin selector
      named isAdult Lnet/minecraft/entity/mob/AbstractPiglinEntity;isAdult()Z
      intermediary method_30236 Lnet/minecraft/class_5418;method_30236()Z
      official gr Lclo;gr()Z
    • getActivity

      public abstract PiglinActivity getActivity()
      Mappings:
      Namespace Name Mixin selector
      named getActivity Lnet/minecraft/entity/mob/AbstractPiglinEntity;getActivity()Lnet/minecraft/entity/mob/PiglinActivity;
      intermediary method_24705 Lnet/minecraft/class_5418;method_24705()Lnet/minecraft/class_4837;
      official gs Lclo;gs()Lclr;
    • getTarget

      @Nullable public @Nullable LivingEntity getTarget()
      Specified by:
      getTarget in interface Targeter
      Overrides:
      getTarget in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named getTarget Lnet/minecraft/entity/Targeter;getTarget()Lnet/minecraft/entity/LivingEntity;
      intermediary method_5968 Lnet/minecraft/class_8152;method_5968()Lnet/minecraft/class_1309;
      official p Lbup;p()Lbtr;
    • isHoldingTool

      protected boolean isHoldingTool()
      Mappings:
      Namespace Name Mixin selector
      named isHoldingTool Lnet/minecraft/entity/mob/AbstractPiglinEntity;isHoldingTool()Z
      intermediary method_30237 Lnet/minecraft/class_5418;method_30237()Z
      official gt Lclo;gt()Z
    • playAmbientSound

      public void playAmbientSound()
      Overrides:
      playAmbientSound in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named playAmbientSound Lnet/minecraft/entity/mob/MobEntity;playAmbientSound()V
      intermediary method_5966 Lnet/minecraft/class_1308;method_5966()V
      official Q Lbtt;Q()V
    • sendAiDebugData

      protected void sendAiDebugData()
      Overrides:
      sendAiDebugData in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named sendAiDebugData Lnet/minecraft/entity/mob/MobEntity;sendAiDebugData()V
      intermediary method_18409 Lnet/minecraft/class_1308;method_18409()V
      official Y Lbtt;Y()V
    • playZombificationSound

      protected abstract void playZombificationSound()
      Mappings:
      Namespace Name Mixin selector
      named playZombificationSound Lnet/minecraft/entity/mob/AbstractPiglinEntity;playZombificationSound()V
      intermediary method_30238 Lnet/minecraft/class_5418;method_30238()V
      official gu Lclo;gu()V