Class ZoglinEntity

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

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

    • BABY

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

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

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

      private static final float field_30506
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official bU Lbws;bU:F
      intermediary field_30506 Lnet/minecraft/class_5136;field_30506:F
      named field_30506 Lnet/minecraft/entity/mob/ZoglinEntity;field_30506:F
    • field_30507

      private static final int field_30507
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official bV Lbws;bV:I
      intermediary field_30507 Lnet/minecraft/class_5136;field_30507:I
      named field_30507 Lnet/minecraft/entity/mob/ZoglinEntity;field_30507:I
    • field_30508

      private static final float field_30508
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official bW Lbws;bW:F
      intermediary field_30508 Lnet/minecraft/class_5136;field_30508:F
      named field_30508 Lnet/minecraft/entity/mob/ZoglinEntity;field_30508:F
    • field_30509

      private static final int field_30509
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official bX Lbws;bX:I
      intermediary field_30509 Lnet/minecraft/class_5136;field_30509:I
      named field_30509 Lnet/minecraft/entity/mob/ZoglinEntity;field_30509:I
    • field_30510

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

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

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

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

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

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

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

    • ZoglinEntity

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

    • createBrainProfile

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

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

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

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

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

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

      private boolean shouldAttack(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official l Lbws;l(Lbfx;)Z
      intermediary method_26936 Lnet/minecraft/class_5136;method_26936(Lnet/minecraft/class_1309;)Z
      named shouldAttack Lnet/minecraft/entity/mob/ZoglinEntity;shouldAttack(Lnet/minecraft/entity/LivingEntity;)Z
    • initDataTracker

      protected void initDataTracker()
      Initializes data tracker.
      Overrides:
      initDataTracker in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      official a_ Lbfh;a_()V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693()V
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker()V
    • onTrackedDataSet

      public void onTrackedDataSet(TrackedData<?> data)
      Called on the client when the tracked data is set.

      This can be overridden to refresh other fields when the tracked data is set or changed.

      Overrides:
      onTrackedDataSet in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Laby;)V
      intermediary method_5674 Lnet/minecraft/class_1297;method_5674(Lnet/minecraft/class_2940;)V
      named onTrackedDataSet Lnet/minecraft/entity/Entity;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
    • createZoglinAttributes

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

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

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

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

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

      public double getMountedHeightOffset()
      Overrides:
      getMountedHeightOffset in class Entity
      Mappings:
      Namespace Name Mixin selector
      official bw Lbfh;bw()D
      intermediary method_5621 Lnet/minecraft/class_1297;method_5621()D
      named getMountedHeightOffset Lnet/minecraft/entity/Entity;getMountedHeightOffset()D
    • 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 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
      official a Lbfh;a(Lbem;F)Z
      intermediary method_5643 Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;F)Z
      named damage Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z
    • setAttackTarget

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

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

      protected void tickBrain()
      Mappings:
      Namespace Name Mixin selector
      official t Lbws;t()V
      intermediary method_26931 Lnet/minecraft/class_5136;method_26931()V
      named tickBrain Lnet/minecraft/entity/mob/ZoglinEntity;tickBrain()V
    • mobTick

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

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

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

      public void tickMovement()
      Overrides:
      tickMovement in class HostileEntity
      Mappings:
      Namespace Name Mixin selector
      official b_ Lbfx;b_()V
      intermediary method_6007 Lnet/minecraft/class_1309;method_6007()V
      named tickMovement Lnet/minecraft/entity/LivingEntity;tickMovement()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:
      Mappings:
      Namespace Name Mixin selector
      official b Lbfh;b(B)V
      intermediary method_5711 Lnet/minecraft/class_1297;method_5711(B)V
      named handleStatus Lnet/minecraft/entity/Entity;handleStatus(B)V
    • getMovementCooldownTicks

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

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

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

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

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

      protected void playAngrySound()
      Mappings:
      Namespace Name Mixin selector
      official fY Lbws;fY()V
      intermediary method_26933 Lnet/minecraft/class_5136;method_26933()V
      named playAngrySound Lnet/minecraft/entity/mob/ZoglinEntity;playAngrySound()V
    • sendAiDebugData

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

      public EntityGroup getGroup()
      Overrides:
      getGroup in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      official eN Lbfx;eN()Lbgc;
      intermediary method_6046 Lnet/minecraft/class_1309;method_6046()Lnet/minecraft/class_1310;
      named getGroup Lnet/minecraft/entity/LivingEntity;getGroup()Lnet/minecraft/entity/EntityGroup;
    • writeCustomDataToNbt

      public void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses has 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
      official b Lbfh;b(Lqr;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • readCustomDataFromNbt

      public void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses has 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
      official a Lbfh;a(Lqr;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V