Class HostileEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Monster, Targeter, ScoreHolder, CommandOutput, Nameable, EntityLike
Direct Known Subclasses:
AbstractPiglinEntity, AbstractSkeletonEntity, BlazeEntity, BreezeEntity, CreeperEntity, EndermanEntity, EndermiteEntity, GiantEntity, GuardianEntity, PatrolEntity, SilverfishEntity, SpiderEntity, VexEntity, WardenEntity, WitherEntity, ZoglinEntity, ZombieEntity

public abstract class HostileEntity extends PathAwareEntity implements Monster
Mappings:
Namespace Name
named net/minecraft/entity/mob/HostileEntity
intermediary net/minecraft/class_1588
official ckf
  • Constructor Details

    • HostileEntity

      protected HostileEntity(EntityType<? extends HostileEntity> 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

    • getSoundCategory

      public SoundCategory getSoundCategory()
      Returns the sound category for sounds from this entity.

      This is used by Entity.playSound(SoundEvent, float, float) and defaults to SoundCategory.NEUTRAL. Hostile entities should override this to return SoundCategory.HOSTILE.

      Overrides:
      getSoundCategory in class Entity
      Returns:
      the sound category for sounds from this entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getSoundCategory Lnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;
      intermediary method_5634 Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;
      official de Lbsw;de()Lawb;
    • tickMovement

      public void tickMovement()
      Overrides:
      tickMovement in class MobEntity
      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
    • updateDespawnCounter

      protected void updateDespawnCounter()
      Mappings:
      Namespace Name Mixin selector
      named updateDespawnCounter Lnet/minecraft/entity/mob/HostileEntity;updateDespawnCounter()V
      intermediary method_16827 Lnet/minecraft/class_1588;method_16827()V
      official gv Lckf;gv()V
    • isDisallowedInPeaceful

      protected boolean isDisallowedInPeaceful()
      Overrides:
      isDisallowedInPeaceful in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named isDisallowedInPeaceful Lnet/minecraft/entity/mob/MobEntity;isDisallowedInPeaceful()Z
      intermediary method_23734 Lnet/minecraft/class_1308;method_23734()Z
      official X Lbtt;X()Z
    • getSwimSound

      protected SoundEvent getSwimSound()
      Overrides:
      getSwimSound in class Entity
      Mappings:
      Namespace Name Mixin selector
      named getSwimSound Lnet/minecraft/entity/Entity;getSwimSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_5737 Lnet/minecraft/class_1297;method_5737()Lnet/minecraft/class_3414;
      official aP Lbsw;aP()Lavz;
    • getSplashSound

      protected SoundEvent getSplashSound()
      Overrides:
      getSplashSound in class Entity
      Mappings:
      Namespace Name Mixin selector
      named getSplashSound Lnet/minecraft/entity/Entity;getSplashSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_5625 Lnet/minecraft/class_1297;method_5625()Lnet/minecraft/class_3414;
      official aQ Lbsw;aQ()Lavz;
    • getHurtSound

      protected SoundEvent getHurtSound(DamageSource source)
      Overrides:
      getHurtSound in class LivingEntity
      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 LivingEntity
      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;
    • getFallSounds

      public LivingEntity.FallSounds getFallSounds()
      Overrides:
      getFallSounds in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getFallSounds Lnet/minecraft/entity/LivingEntity;getFallSounds()Lnet/minecraft/entity/LivingEntity$FallSounds;
      intermediary method_39760 Lnet/minecraft/class_1309;method_39760()Lnet/minecraft/class_1309$class_6823;
      official eL Lbtr;eL()Lbtr$a;
    • getPathfindingFavor

      public float getPathfindingFavor(BlockPos pos, WorldView world)
      Overrides:
      getPathfindingFavor in class PathAwareEntity
      Mappings:
      Namespace Name Mixin selector
      named getPathfindingFavor Lnet/minecraft/entity/mob/PathAwareEntity;getPathfindingFavor(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/WorldView;)F
      intermediary method_6144 Lnet/minecraft/class_1314;method_6144(Lnet/minecraft/class_2338;Lnet/minecraft/class_4538;)F
      official a Lbua;a(Liz;Ldcd;)F
    • isSpawnDark

      public static boolean isSpawnDark(ServerWorldAccess world, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      named isSpawnDark Lnet/minecraft/entity/mob/HostileEntity;isSpawnDark(Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Z
      intermediary method_20679 Lnet/minecraft/class_1588;method_20679(Lnet/minecraft/class_5425;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      official a Lckf;a(Ldcp;Liz;Lazh;)Z
    • canSpawnInDark

      public static boolean canSpawnInDark(EntityType<? extends HostileEntity> type, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      named canSpawnInDark Lnet/minecraft/entity/mob/HostileEntity;canSpawnInDark(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Z
      intermediary method_20680 Lnet/minecraft/class_1588;method_20680(Lnet/minecraft/class_1299;Lnet/minecraft/class_5425;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      official b Lckf;b(Lbtc;Ldcp;Lbtv;Liz;Lazh;)Z
    • canSpawnIgnoreLightLevel

      public static boolean canSpawnIgnoreLightLevel(EntityType<? extends HostileEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      named canSpawnIgnoreLightLevel Lnet/minecraft/entity/mob/HostileEntity;canSpawnIgnoreLightLevel(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Z
      intermediary method_20681 Lnet/minecraft/class_1588;method_20681(Lnet/minecraft/class_1299;Lnet/minecraft/class_1936;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      official c Lckf;c(Lbtc;Ldcb;Lbtv;Liz;Lazh;)Z
    • createHostileAttributes

      public static DefaultAttributeContainer.Builder createHostileAttributes()
      Mappings:
      Namespace Name Mixin selector
      named createHostileAttributes Lnet/minecraft/entity/mob/HostileEntity;createHostileAttributes()Lnet/minecraft/entity/attribute/DefaultAttributeContainer$Builder;
      intermediary method_26918 Lnet/minecraft/class_1588;method_26918()Lnet/minecraft/class_5132$class_5133;
      official gw Lckf;gw()Lbuy$a;
    • shouldDropXp

      public boolean shouldDropXp()
      Returns if this entity should drop experience on death when the doMobLoot game rule is enabled and has been attacked by a player.

      If shouldAlwaysDropXp() returns true, this check is disregarded.

      Overrides:
      shouldDropXp in class LivingEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named shouldDropXp Lnet/minecraft/entity/LivingEntity;shouldDropXp()Z
      intermediary method_6054 Lnet/minecraft/class_1309;method_6054()Z
      official eh Lbtr;eh()Z
    • shouldDropLoot

      protected boolean shouldDropLoot()
      Overrides:
      shouldDropLoot in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named shouldDropLoot Lnet/minecraft/entity/LivingEntity;shouldDropLoot()Z
      intermediary method_27071 Lnet/minecraft/class_1309;method_27071()Z
      official ei Lbtr;ei()Z
    • isAngryAt

      public boolean isAngryAt(PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named isAngryAt Lnet/minecraft/entity/mob/HostileEntity;isAngryAt(Lnet/minecraft/entity/player/PlayerEntity;)Z
      intermediary method_7076 Lnet/minecraft/class_1588;method_7076(Lnet/minecraft/class_1657;)Z
      official f Lckf;f(Lcmz;)Z
    • getProjectileType

      public ItemStack getProjectileType(ItemStack stack)
      Overrides:
      getProjectileType in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getProjectileType Lnet/minecraft/entity/LivingEntity;getProjectileType(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;
      intermediary method_18808 Lnet/minecraft/class_1309;method_18808(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;
      official g Lbtr;g(Lcur;)Lcur;