Class ZoglinEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Hoglin, Monster, Targeter, ScoreHolder, CommandOutput, Nameable, EntityLike

public class ZoglinEntity extends HostileEntity implements Monster, Hoglin
Mappings:
Namespace Name
named net/minecraft/entity/mob/ZoglinEntity
intermediary net/minecraft/class_5136
official ckx
  • Field Details

    • BABY

      private static final TrackedData<Boolean> BABY
      Mappings:
      Namespace Name Mixin selector
      named BABY Lnet/minecraft/entity/mob/ZoglinEntity;BABY:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_23734 Lnet/minecraft/class_5136;field_23734:Lnet/minecraft/class_2940;
      official d Lckx;d:Lakk;
    • field_30514

      private static final int field_30514
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_30514 Lnet/minecraft/entity/mob/ZoglinEntity;field_30514:I
      intermediary field_30514 Lnet/minecraft/class_5136;field_30514:I
      official e Lckx;e:I
    • field_30505

      private static final int field_30505
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_30505 Lnet/minecraft/entity/mob/ZoglinEntity;field_30505:I
      intermediary field_30505 Lnet/minecraft/class_5136;field_30505:I
      official bY Lckx;bY:I
    • DEFAULT_KNOCKBACK_RESISTANCE

      private static final float DEFAULT_KNOCKBACK_RESISTANCE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_KNOCKBACK_RESISTANCE Lnet/minecraft/entity/mob/ZoglinEntity;DEFAULT_KNOCKBACK_RESISTANCE:F
      intermediary field_30506 Lnet/minecraft/class_5136;field_30506:F
      official bZ Lckx;bZ:F
    • DEFAULT_ATTACK_DAMAGE

      private static final int DEFAULT_ATTACK_DAMAGE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_ATTACK_DAMAGE Lnet/minecraft/entity/mob/ZoglinEntity;DEFAULT_ATTACK_DAMAGE:I
      intermediary field_30507 Lnet/minecraft/class_5136;field_30507:I
      official ca Lckx;ca:I
    • BABY_ATTACK_DAMAGE

      private static final float BABY_ATTACK_DAMAGE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named BABY_ATTACK_DAMAGE Lnet/minecraft/entity/mob/ZoglinEntity;BABY_ATTACK_DAMAGE:F
      intermediary field_30508 Lnet/minecraft/class_5136;field_30508:F
      official cb Lckx;cb:F
    • ADULT_MELEE_ATTACK_COOLDOWN

      private static final int ADULT_MELEE_ATTACK_COOLDOWN
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named ADULT_MELEE_ATTACK_COOLDOWN Lnet/minecraft/entity/mob/ZoglinEntity;ADULT_MELEE_ATTACK_COOLDOWN:I
      intermediary field_30509 Lnet/minecraft/class_5136;field_30509:I
      official cc Lckx;cc:I
    • BABY_MELEE_ATTACK_COOLDOWN

      private static final int BABY_MELEE_ATTACK_COOLDOWN
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named BABY_MELEE_ATTACK_COOLDOWN Lnet/minecraft/entity/mob/ZoglinEntity;BABY_MELEE_ATTACK_COOLDOWN:I
      intermediary field_30510 Lnet/minecraft/class_5136;field_30510:I
      official cd Lckx;cd:I
    • ATTACK_TARGET_DURATION

      private static final int ATTACK_TARGET_DURATION
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named ATTACK_TARGET_DURATION Lnet/minecraft/entity/mob/ZoglinEntity;ATTACK_TARGET_DURATION:I
      intermediary field_30511 Lnet/minecraft/class_5136;field_30511:I
      official ce Lckx;ce:I
    • DEFAULT_MOVEMENT_SPEED

      private static final float DEFAULT_MOVEMENT_SPEED
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_MOVEMENT_SPEED Lnet/minecraft/entity/mob/ZoglinEntity;DEFAULT_MOVEMENT_SPEED:F
      intermediary field_30512 Lnet/minecraft/class_5136;field_30512:F
      official cf Lckx;cf:F
    • field_30513

      private static final float field_30513
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_30513 Lnet/minecraft/entity/mob/ZoglinEntity;field_30513:F
      intermediary field_30513 Lnet/minecraft/class_5136;field_30513:F
      official cg Lckx;cg:F
    • USED_SENSORS

      protected static final ImmutableList<? extends SensorType<? extends Sensor<? super ZoglinEntity>>> USED_SENSORS
      Mappings:
      Namespace Name Mixin selector
      named USED_SENSORS Lnet/minecraft/entity/mob/ZoglinEntity;USED_SENSORS:Lcom/google/common/collect/ImmutableList;
      intermediary field_23731 Lnet/minecraft/class_5136;field_23731:Lcom/google/common/collect/ImmutableList;
      official b Lckx;b:Lcom/google/common/collect/ImmutableList;
    • USED_MEMORY_MODULES

      protected static final ImmutableList<? extends MemoryModuleType<?>> USED_MEMORY_MODULES
      Mappings:
      Namespace Name Mixin selector
      named USED_MEMORY_MODULES Lnet/minecraft/entity/mob/ZoglinEntity;USED_MEMORY_MODULES:Lcom/google/common/collect/ImmutableList;
      intermediary field_23733 Lnet/minecraft/class_5136;field_23733:Lcom/google/common/collect/ImmutableList;
      official c Lckx;c:Lcom/google/common/collect/ImmutableList;
    • movementCooldownTicks

      private int movementCooldownTicks
      Mappings:
      Namespace Name Mixin selector
      named movementCooldownTicks Lnet/minecraft/entity/mob/ZoglinEntity;movementCooldownTicks:I
      intermediary field_23732 Lnet/minecraft/class_5136;field_23732:I
      official ch Lckx;ch:I
  • Constructor Details

    • ZoglinEntity

      public ZoglinEntity(EntityType<? extends ZoglinEntity> 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

    • createBrainProfile

      protected Brain.Profile<ZoglinEntity> createBrainProfile()
      Overrides:
      createBrainProfile in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named createBrainProfile Lnet/minecraft/entity/LivingEntity;createBrainProfile()Lnet/minecraft/entity/ai/brain/Brain$Profile;
      intermediary method_28306 Lnet/minecraft/class_1309;method_28306()Lnet/minecraft/class_4095$class_5303;
      official dT Lbtr;dT()Lbut$b;
    • deserializeBrain

      protected Brain<?> deserializeBrain(com.mojang.serialization.Dynamic<?> dynamic)
      Overrides:
      deserializeBrain in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named deserializeBrain Lnet/minecraft/entity/LivingEntity;deserializeBrain(Lcom/mojang/serialization/Dynamic;)Lnet/minecraft/entity/ai/brain/Brain;
      intermediary method_18867 Lnet/minecraft/class_1309;method_18867(Lcom/mojang/serialization/Dynamic;)Lnet/minecraft/class_4095;
      official a Lbtr;a(Lcom/mojang/serialization/Dynamic;)Lbut;
    • addCoreTasks

      private static void addCoreTasks(Brain<ZoglinEntity> brain)
      Mappings:
      Namespace Name Mixin selector
      named addCoreTasks Lnet/minecraft/entity/mob/ZoglinEntity;addCoreTasks(Lnet/minecraft/entity/ai/brain/Brain;)V
      intermediary method_26928 Lnet/minecraft/class_5136;method_26928(Lnet/minecraft/class_4095;)V
      official a Lckx;a(Lbut;)V
    • addIdleTasks

      private static void addIdleTasks(Brain<ZoglinEntity> brain)
      Mappings:
      Namespace Name Mixin selector
      named addIdleTasks Lnet/minecraft/entity/mob/ZoglinEntity;addIdleTasks(Lnet/minecraft/entity/ai/brain/Brain;)V
      intermediary method_26929 Lnet/minecraft/class_5136;method_26929(Lnet/minecraft/class_4095;)V
      official b Lckx;b(Lbut;)V
    • addFightTasks

      private static void addFightTasks(Brain<ZoglinEntity> brain)
      Mappings:
      Namespace Name Mixin selector
      named addFightTasks Lnet/minecraft/entity/mob/ZoglinEntity;addFightTasks(Lnet/minecraft/entity/ai/brain/Brain;)V
      intermediary method_26930 Lnet/minecraft/class_5136;method_26930(Lnet/minecraft/class_4095;)V
      official c Lckx;c(Lbut;)V
    • getHoglinTarget

      private Optional<? extends LivingEntity> getHoglinTarget()
      Mappings:
      Namespace Name Mixin selector
      named getHoglinTarget Lnet/minecraft/entity/mob/ZoglinEntity;getHoglinTarget()Ljava/util/Optional;
      intermediary method_26934 Lnet/minecraft/class_5136;method_26934()Ljava/util/Optional;
      official gs Lckx;gs()Ljava/util/Optional;
    • shouldAttack

      private boolean shouldAttack(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named shouldAttack Lnet/minecraft/entity/mob/ZoglinEntity;shouldAttack(Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_26936 Lnet/minecraft/class_5136;method_26936(Lnet/minecraft/class_1309;)Z
      official j Lckx;j(Lbtr;)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
    • onTrackedDataSet

      public void onTrackedDataSet(TrackedData<?> data)
      Specified by:
      onTrackedDataSet in interface DataTracked
      Overrides:
      onTrackedDataSet in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named onTrackedDataSet Lnet/minecraft/entity/data/DataTracked;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
      intermediary method_5674 Lnet/minecraft/class_9221;method_5674(Lnet/minecraft/class_2940;)V
      official a Lakn;a(Lakk;)V
    • createZoglinAttributes

      public static DefaultAttributeContainer.Builder createZoglinAttributes()
      Mappings:
      Namespace Name Mixin selector
      named createZoglinAttributes Lnet/minecraft/entity/mob/ZoglinEntity;createZoglinAttributes()Lnet/minecraft/entity/attribute/DefaultAttributeContainer$Builder;
      intermediary method_26937 Lnet/minecraft/class_5136;method_26937()Lnet/minecraft/class_5132$class_5133;
      official s Lckx;s()Lbuy$a;
    • isAdult

      public boolean isAdult()
      Mappings:
      Namespace Name Mixin selector
      named isAdult Lnet/minecraft/entity/mob/ZoglinEntity;isAdult()Z
      intermediary method_26939 Lnet/minecraft/class_5136;method_26939()Z
      official u Lckx;u()Z
    • tryAttack

      public boolean tryAttack(Entity target)
      Overrides:
      tryAttack in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named tryAttack Lnet/minecraft/entity/LivingEntity;tryAttack(Lnet/minecraft/entity/Entity;)Z
      intermediary method_6121 Lnet/minecraft/class_1309;method_6121(Lnet/minecraft/class_1297;)Z
      official C Lbtr;C(Lbsw;)Z
    • canBeLeashedBy

      public boolean canBeLeashedBy(PlayerEntity player)
      Overrides:
      canBeLeashedBy in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named canBeLeashedBy Lnet/minecraft/entity/mob/MobEntity;canBeLeashedBy(Lnet/minecraft/entity/player/PlayerEntity;)Z
      intermediary method_5931 Lnet/minecraft/class_1308;method_5931(Lnet/minecraft/class_1657;)Z
      official a Lbtt;a(Lcmz;)Z
    • knockback

      protected void knockback(LivingEntity target)
      Overrides:
      knockback in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named knockback Lnet/minecraft/entity/LivingEntity;knockback(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_6060 Lnet/minecraft/class_1309;method_6060(Lnet/minecraft/class_1309;)V
      official e Lbtr;e(Lbtr;)V
    • damage

      public boolean damage(DamageSource source, float amount)
      Applies a damage to this entity. The exact implementation differs between subclasses.

      LivingEntity has health value, and damaging the entity decreases it. This also handles shields, extra damage to helmets for falling blocks, setting the attacker, playing hurt sound, etc.

      Some entities like

      invalid reference
      ItemEntity
      also have health value, which the overridden method decrements. There also exist several entities, like EndCrystalEntity, where any damage discards the entity (perhaps with an explosion).

      If this is overridden, it must check the result of Entity.isInvulnerableTo(net.minecraft.entity.damage.DamageSource) and return early.

      Overrides:
      damage in class LivingEntity
      Returns:
      whether the entity was actually damaged
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z
      intermediary method_5643 Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;F)Z
      official a Lbsw;a(Lbrp;F)Z
    • setAttackTarget

      private void setAttackTarget(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named setAttackTarget Lnet/minecraft/entity/mob/ZoglinEntity;setAttackTarget(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_26938 Lnet/minecraft/class_5136;method_26938(Lnet/minecraft/class_1309;)V
      official k Lckx;k(Lbtr;)V
    • getBrain

      public Brain<ZoglinEntity> getBrain()
      Overrides:
      getBrain in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getBrain Lnet/minecraft/entity/LivingEntity;getBrain()Lnet/minecraft/entity/ai/brain/Brain;
      intermediary method_18868 Lnet/minecraft/class_1309;method_18868()Lnet/minecraft/class_4095;
      official dS Lbtr;dS()Lbut;
    • tickBrain

      protected void tickBrain()
      Mappings:
      Namespace Name Mixin selector
      named tickBrain Lnet/minecraft/entity/mob/ZoglinEntity;tickBrain()V
      intermediary method_26931 Lnet/minecraft/class_5136;method_26931()V
      official y Lckx;y()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
    • setBaby

      public void setBaby(boolean baby)
      Overrides:
      setBaby in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named setBaby Lnet/minecraft/entity/mob/MobEntity;setBaby(Z)V
      intermediary method_7217 Lnet/minecraft/class_1308;method_7217(Z)V
      official a Lbtt;a(Z)V
    • isBaby

      public boolean isBaby()
      Overrides:
      isBaby in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named isBaby Lnet/minecraft/entity/LivingEntity;isBaby()Z
      intermediary method_6109 Lnet/minecraft/class_1309;method_6109()Z
      official p_ Lbtr;p_()Z
    • tickMovement

      public void tickMovement()
      Overrides:
      tickMovement in class HostileEntity
      Mappings:
      Namespace Name Mixin selector
      named tickMovement Lnet/minecraft/entity/LivingEntity;tickMovement()V
      intermediary method_6007 Lnet/minecraft/class_1309;method_6007()V
      official n_ Lbtr;n_()V
    • handleStatus

      public void handleStatus(byte status)
      Called on the client when the entity receives an entity status from the server. They are often used to spawn particles or play sounds. Subclasses can override this method to handle custom entity status.
      Overrides:
      handleStatus in class MobEntity
      See Also:
      API Note:
      To send an entity status, use World.sendEntityStatus(net.minecraft.entity.Entity, byte).
      Mappings:
      Namespace Name Mixin selector
      named handleStatus Lnet/minecraft/entity/Entity;handleStatus(B)V
      intermediary method_5711 Lnet/minecraft/class_1297;method_5711(B)V
      official b Lbsw;b(B)V
    • getMovementCooldownTicks

      public int getMovementCooldownTicks()
      Specified by:
      getMovementCooldownTicks in interface Hoglin
      Mappings:
      Namespace Name Mixin selector
      named getMovementCooldownTicks Lnet/minecraft/entity/mob/Hoglin;getMovementCooldownTicks()I
      intermediary method_24657 Lnet/minecraft/class_5137;method_24657()I
      official gq Lcll;gq()I
    • getAmbientSound

      protected SoundEvent getAmbientSound()
      Overrides:
      getAmbientSound in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named getAmbientSound Lnet/minecraft/entity/mob/MobEntity;getAmbientSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_5994 Lnet/minecraft/class_1308;method_5994()Lnet/minecraft/class_3414;
      official v Lbtt;v()Lavz;
    • getHurtSound

      protected SoundEvent getHurtSound(DamageSource source)
      Overrides:
      getHurtSound in class HostileEntity
      Mappings:
      Namespace Name Mixin selector
      named getHurtSound Lnet/minecraft/entity/LivingEntity;getHurtSound(Lnet/minecraft/entity/damage/DamageSource;)Lnet/minecraft/sound/SoundEvent;
      intermediary method_6011 Lnet/minecraft/class_1309;method_6011(Lnet/minecraft/class_1282;)Lnet/minecraft/class_3414;
      official d Lbtr;d(Lbrp;)Lavz;
    • getDeathSound

      protected SoundEvent getDeathSound()
      Overrides:
      getDeathSound in class HostileEntity
      Mappings:
      Namespace Name Mixin selector
      named getDeathSound Lnet/minecraft/entity/LivingEntity;getDeathSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_6002 Lnet/minecraft/class_1309;method_6002()Lnet/minecraft/class_3414;
      official o_ Lbtr;o_()Lavz;
    • playStepSound

      protected void playStepSound(BlockPos pos, BlockState state)
      Overrides:
      playStepSound in class Entity
      Mappings:
      Namespace Name Mixin selector
      named playStepSound Lnet/minecraft/entity/Entity;playStepSound(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary method_5712 Lnet/minecraft/class_1297;method_5712(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official b Lbsw;b(Liz;Ldse;)V
    • playAngrySound

      protected void playAngrySound()
      Mappings:
      Namespace Name Mixin selector
      named playAngrySound Lnet/minecraft/entity/mob/ZoglinEntity;playAngrySound()V
      intermediary method_26933 Lnet/minecraft/class_5136;method_26933()V
      official gr Lckx;gr()V
    • 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;
    • 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
    • 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