Uses of Class
net.minecraft.entity.LivingEntity
Package
Description
This and its subpackages make up the brain system used by some modern Minecraft entities,
such as villagers, piglins, and axolotls.
The basic AI system for Minecraft living entities.
-
Uses of LivingEntity in net.minecraft.block
Modifier and TypeMethodDescriptionvoid
AbstractRedstoneGateBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
BedBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
Block.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
CommandBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
CrafterBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
DoorBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
JukeboxBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
PistonBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
PitcherCropBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
SmallDripleafBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
StructureBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
TallPlantBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
TripwireHookBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
WallWitherSkullBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
WitherSkullBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.private static void
TntBlock.primeTnt
(World world, BlockPos pos, @Nullable LivingEntity igniter) private static void
LecternBlock.putBook
(@Nullable LivingEntity user, World world, BlockPos pos, BlockState state, ItemStack stack) static boolean
LecternBlock.putBookIfAbsent
(@Nullable LivingEntity user, World world, BlockPos pos, BlockState state, ItemStack stack) -
Uses of LivingEntity in net.minecraft.block.entity
Modifier and TypeMethodDescriptionprivate static @Nullable LivingEntity
ConduitBlockEntity.findTargetEntity
(World world, BlockPos pos, UUID uuid) Modifier and TypeMethodDescriptionboolean
CampfireBlockEntity.addItem
(@Nullable LivingEntity user, ItemStack stack, int cookTime) private static void
BellBlockEntity.applyGlowToEntity
(LivingEntity entity) Gives theStatusEffects.GLOWING
status effect to the given entity for 3 seconds (60 ticks).private static boolean
BellBlockEntity.isRaiderEntity
(BlockPos pos, LivingEntity entity) Determines whether the given entity is in theEntityTypeTags.RAIDERS
entity type tag and within 48 blocks of the given position.void
StructureBlockBlockEntity.setAuthor
(LivingEntity entity) private void
SculkCatalystBlockEntity.Listener.triggerCriteria
(World world, LivingEntity deadEntity) Modifier and TypeMethodDescriptionprivate static void
BellBlockEntity.applyGlowToRaiders
(World world, BlockPos pos, List<LivingEntity> hearingEntities) private static void
BellBlockEntity.applyParticlesToRaiders
(World world, BlockPos pos, List<LivingEntity> hearingEntities) SpawnsParticleTypes.ENTITY_EFFECT
particles around raiders within 48 blocks.private static boolean
BellBlockEntity.raidersHearBell
(BlockPos pos, List<LivingEntity> hearingEntities) Determines whether at least one of the given entities would be affected by the bell.void
BellBlockEntity.Effect.run
(World world, BlockPos pos, List<LivingEntity> hearingEntities) -
Uses of LivingEntity in net.minecraft.client.gui
Modifier and TypeMethodDescriptionprivate void
DrawContext.drawItem
(@Nullable LivingEntity entity, @Nullable World world, ItemStack stack, int x, int y, int seed) private void
DrawContext.drawItem
(@Nullable LivingEntity entity, @Nullable World world, ItemStack stack, int x, int y, int seed, int z) void
DrawContext.drawItem
(LivingEntity entity, ItemStack stack, int x, int y, int seed) -
Uses of LivingEntity in net.minecraft.client.gui.hud
Modifier and TypeMethodDescriptionprivate int
InGameHud.getHeartCount
(@Nullable LivingEntity entity) -
Uses of LivingEntity in net.minecraft.client.gui.screen.ingame
Modifier and TypeMethodDescriptionstatic void
InventoryScreen.drawEntity
(DrawContext context, float x, float y, float size, Vector3f vector3f, Quaternionf quaternionf, @Nullable Quaternionf quaternionf2, LivingEntity entity) static void
InventoryScreen.drawEntity
(DrawContext context, int x1, int y1, int x2, int y2, int size, float float2, float mouseX, float mouseY, LivingEntity entity) -
Uses of LivingEntity in net.minecraft.client.item
Modifier and TypeMethodDescriptiondefault float
ClampedModelPredicateProvider.call
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) Deprecated.float
ModelPredicateProvider.call
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) Deprecated.float
ClampedModelPredicateProvider.unclampedCall
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) float
CompassAnglePredicateProvider.unclampedCall
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) -
Uses of LivingEntity in net.minecraft.client.network
Modifier and TypeClassDescriptionclass
class
Represents the client's own player entity.class
Represents a player entity that is present on the client but is not the client's own player. -
Uses of LivingEntity in net.minecraft.client.render
Modifier and TypeMethodDescriptionfloat
BackgroundRenderer.DarknessFogModifier.applyColorModifier
(LivingEntity entity, StatusEffectInstance effect, float float2, float tickDelta) default float
BackgroundRenderer.StatusEffectFogModifier.applyColorModifier
(LivingEntity entity, StatusEffectInstance effect, float float2, float tickDelta) void
BackgroundRenderer.BlindnessFogModifier.applyStartEndModifier
(BackgroundRenderer.FogData fogData, LivingEntity entity, StatusEffectInstance effect, float viewDistance, float tickDelta) void
BackgroundRenderer.DarknessFogModifier.applyStartEndModifier
(BackgroundRenderer.FogData fogData, LivingEntity entity, StatusEffectInstance effect, float viewDistance, float tickDelta) void
BackgroundRenderer.StatusEffectFogModifier.applyStartEndModifier
(BackgroundRenderer.FogData fogData, LivingEntity entity, StatusEffectInstance effect, float viewDistance, float tickDelta) private float
LightmapTextureManager.getDarkness
(LivingEntity entity, float factor, float delta) static float
GameRenderer.getNightVisionStrength
(LivingEntity entity, float tickDelta) default boolean
BackgroundRenderer.StatusEffectFogModifier.shouldApply
(LivingEntity entity, float tickDelta) -
Uses of LivingEntity in net.minecraft.client.render.entity
Modifier and TypeClassDescriptionclass
LivingEntityRenderer<T extends LivingEntity,
M extends EntityModel<T>> Modifier and TypeMethodDescriptionprivate Vec3d
GuardianEntityRenderer.fromLerpedPosition
(LivingEntity entity, double yOffset, float delta) static int
LivingEntityRenderer.getOverlay
(LivingEntity entity, float whiteOverlayProgress) Returns the packed overlay color for an entity.static boolean
LivingEntityRenderer.shouldFlipUpsideDown
(LivingEntity entity) -
Uses of LivingEntity in net.minecraft.client.render.entity.feature
Modifier and TypeClassDescriptionclass
ArmorFeatureRenderer<T extends LivingEntity,
M extends BipedEntityModel<T>, A extends BipedEntityModel<T>> class
ElytraFeatureRenderer<T extends LivingEntity,
M extends EntityModel<T>> class
EndermanEyesFeatureRenderer<T extends LivingEntity>
class
HeadFeatureRenderer<T extends LivingEntity,
M extends EntityModel<T> & ModelWithHead> class
HeldItemFeatureRenderer<T extends LivingEntity,
M extends EntityModel<T> & ModelWithArms> class
SlimeOverlayFeatureRenderer<T extends LivingEntity>
class
StuckArrowsFeatureRenderer<T extends LivingEntity,
M extends PlayerEntityModel<T>> class
StuckObjectsFeatureRenderer<T extends LivingEntity,
M extends PlayerEntityModel<T>> class
StuckStingersFeatureRenderer<T extends LivingEntity,
M extends PlayerEntityModel<T>> class
TridentRiptideFeatureRenderer<T extends LivingEntity>
class
VillagerClothingFeatureRenderer<T extends LivingEntity & VillagerDataContainer,
M extends EntityModel<T> & ModelWithHat> class
VillagerHeldItemFeatureRenderer<T extends LivingEntity,
M extends EntityModel<T>> class
WitchHeldItemFeatureRenderer<T extends LivingEntity>
Modifier and TypeMethodDescriptionprotected static <T extends LivingEntity>
voidFeatureRenderer.render
(EntityModel<T> contextModel, EntityModel<T> model, Identifier texture, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, T entity, float limbAngle, float limbDistance, float age, float headYaw, float headPitch, float tickDelta, int int2) protected static <T extends LivingEntity>
voidFeatureRenderer.renderModel
(EntityModel<T> model, Identifier texture, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, T entity, int int2) Modifier and TypeMethodDescriptionprotected void
HeldItemFeatureRenderer.renderItem
(LivingEntity entity, ItemStack stack, ModelTransformationMode transformationMode, Arm arm, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) protected void
PlayerHeldItemFeatureRenderer.renderItem
(LivingEntity entity, ItemStack stack, ModelTransformationMode transformationMode, Arm arm, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) private void
PlayerHeldItemFeatureRenderer.renderSpyglass
(LivingEntity entity, ItemStack stack, Arm arm, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) -
Uses of LivingEntity in net.minecraft.client.render.entity.model
Modifier and TypeClassDescriptionclass
ArmorEntityModel<T extends LivingEntity>
class
BipedEntityModel<T extends LivingEntity>
Represents the model of a biped living entity.class
ElytraEntityModel<T extends LivingEntity>
Represents the model of a worn elytra.class
EndermanEntityModel<T extends LivingEntity>
Represents the model of an enderman-like living entity.class
PlayerEntityModel<T extends LivingEntity>
Represents the model of a player-like entity.Modifier and TypeMethodDescriptionstatic void
CrossbowPosing.charge
(ModelPart holdingArm, ModelPart pullingArm, LivingEntity actor, boolean rightArmed) -
Uses of LivingEntity in net.minecraft.client.render.item
Modifier and TypeMethodDescriptionItemRenderer.getModel
(ItemStack stack, @Nullable World world, @Nullable LivingEntity entity, int seed) void
HeldItemRenderer.renderItem
(LivingEntity entity, ItemStack stack, ModelTransformationMode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) void
ItemRenderer.renderItem
(@Nullable LivingEntity entity, ItemStack item, ModelTransformationMode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, @Nullable World world, int light, int overlay, int seed) -
Uses of LivingEntity in net.minecraft.client.render.model.json
Modifier and TypeMethodDescriptionModelOverrideList.apply
(BakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) -
Uses of LivingEntity in net.minecraft.enchantment
Modifier and TypeFieldDescriptionprivate final @Nullable LivingEntity
EnchantmentEffectContext.owner
The field for theowner
record component.Modifier and TypeMethodDescriptionEnchantmentEffectContext.owner()
Returns the value of theowner
record component.Modifier and TypeMethodDescriptionvoid
Enchantment.applyLocationBasedEffects
(ServerWorld world, int level, EnchantmentEffectContext context, LivingEntity user) static void
EnchantmentHelper.applyLocationBasedEffects
(ServerWorld world, LivingEntity user) static void
EnchantmentHelper.applyLocationBasedEffects
(ServerWorld world, ItemStack stack, LivingEntity user, EquipmentSlot slot) static Optional
<EnchantmentEffectContext> EnchantmentHelper.chooseEquipmentWith
(ComponentType<?> componentType, LivingEntity entity, Predicate<ItemStack> stackPredicate) Returns a pair of an equipment slot and the item stack in the supplied entity's slot.private static void
EnchantmentHelper.forEachEnchantment
(LivingEntity entity, EnchantmentHelper.ContextAwareConsumer contextAwareConsumer) private static void
EnchantmentHelper.forEachEnchantment
(ItemStack stack, EquipmentSlot slot, LivingEntity entity, EnchantmentHelper.ContextAwareConsumer contextAwareConsumer) static float
EnchantmentHelper.getCrossbowChargeTime
(LivingEntity user, float baseCrossbowChargeTime) Enchantment.getEquipment
(LivingEntity entity) static float
EnchantmentHelper.getEquipmentDropChance
(ServerWorld world, LivingEntity attacker, DamageSource damageSource, float baseEquipmentDropChance) static int
EnchantmentHelper.getEquipmentLevel
(RegistryEntry<Enchantment> enchantment, LivingEntity entity) Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static float
EnchantmentHelper.getProtectionAmount
(ServerWorld world, LivingEntity user, DamageSource damageSource) static float
EnchantmentHelper.getTridentSpinAttackStrength
(LivingEntity user) static boolean
EnchantmentHelper.isInvulnerableTo
(ServerWorld world, LivingEntity user, DamageSource damageSource) static void
EnchantmentHelper.onHitBlock
(ServerWorld world, ItemStack stack, @Nullable LivingEntity user, Entity enchantedEntity, @Nullable EquipmentSlot slot, Vec3d pos, BlockState blockState, Consumer<Item> consumer) static void
EnchantmentHelper.onTick
(ServerWorld world, LivingEntity user) void
Enchantment.removeLocationBasedEffects
(int level, EnchantmentEffectContext context, LivingEntity user) static void
EnchantmentHelper.removeLocationBasedEffects
(LivingEntity user) static void
EnchantmentHelper.removeLocationBasedEffects
(ItemStack stack, LivingEntity user, EquipmentSlot slot) ModifierConstructorDescriptionEnchantmentEffectContext
(ItemStack itemStack, @Nullable EquipmentSlot equipmentSlot, @Nullable LivingEntity livingEntity, Consumer<Item> consumer) EnchantmentEffectContext
(ItemStack stack, EquipmentSlot slot, LivingEntity owner) -
Uses of LivingEntity in net.minecraft.entity
Modifier and TypeFieldDescriptionprivate @Nullable LivingEntity
LivingEntity.attacker
private @Nullable LivingEntity
LivingEntity.attacking
private @Nullable LivingEntity
TntEntity.causingEntity
private @Nullable LivingEntity
AreaEffectCloudEntity.owner
Modifier and TypeMethodDescriptionstatic <T extends LivingEntity & Bucketable>
Optional<ActionResult> Bucketable.tryBucket
(PlayerEntity player, Hand hand, T entity) Modifier and TypeMethodDescriptionLivingEntity.getAttacker()
LivingEntity.getAttacking()
Entity.getControllingPassenger()
Returns the passenger in control of this entity, ornull
if there is none.Attackable.getLastAttacker()
LivingEntity.getLastAttacker()
AreaEffectCloudEntity.getOwner()
default @Nullable LivingEntity
Tameable.getOwner()
TntEntity.getOwner()
LivingEntity.getPrimeAdversary()
CrossbowUser.getTarget()
Targeter.getTarget()
Modifier and TypeMethodDescriptionprotected void
LivingEntity.attackLivingEntity
(LivingEntity target) static boolean
Dismounting.canPlaceEntityAt
(CollisionView world, LivingEntity entity, Box targetBox) static boolean
Dismounting.canPlaceEntityAt
(CollisionView world, Vec3d offset, LivingEntity entity, EntityPose pose) boolean
LivingEntity.canTarget
(LivingEntity target) static float
DamageUtil.getDamageLeft
(LivingEntity armorWearer, float damageAmount, DamageSource damageSource, float armor, float armorToughness) private static StackReference
LivingEntity.getStackReference
(LivingEntity entity, EquipmentSlot slot) boolean
LivingEntity.isTarget
(LivingEntity entity, TargetPredicate predicate) protected void
LivingEntity.knockback
(LivingEntity target) protected void
LivingEntity.onKilledBy
(@Nullable LivingEntity adversary) Performs secondary effects after this mob has been killed.boolean
Entity.onKilledOther
(ServerWorld world, LivingEntity other) Called when this entity killsother
.void
LivingEntity.setAttacker
(@Nullable LivingEntity attacker) void
AreaEffectCloudEntity.setOwner
(@Nullable LivingEntity owner) default void
CrossbowUser.shoot
(LivingEntity entity, float speed) protected void
LivingEntity.takeShieldHit
(LivingEntity attacker) Entity.updatePassengerForDismount
(LivingEntity passenger) Returns the position of the dismountedpassenger
.ModifierConstructorDescriptionTntEntity
(World world, double x, double y, double z, @Nullable LivingEntity igniter) ModifierConstructorDescriptionprotected
LivingEntity
(EntityType<? extends LivingEntity> type, World world) -
Uses of LivingEntity in net.minecraft.entity.ai
Modifier and TypeFieldDescriptionprivate @Nullable Predicate
<LivingEntity> TargetPredicate.predicate
Modifier and TypeMethodDescriptionvoid
RangedAttackMob.shootAt
(LivingEntity target, float pullProgress) boolean
TargetPredicate.test
(@Nullable LivingEntity baseEntity, LivingEntity targetEntity) Modifier and TypeMethodDescriptionTargetPredicate.setPredicate
(@Nullable Predicate<LivingEntity> predicate) -
Uses of LivingEntity in net.minecraft.entity.ai.brain
Modifier and TypeClassDescriptionclass
Brain<E extends LivingEntity>
A brain is associated with each living entity.static final class
Brain.Profile<E extends LivingEntity>
A simple profile of a brain.Modifier and TypeFieldDescriptionstatic final MemoryModuleType
<LivingEntity> MemoryModuleType.ATTACK_TARGET
static final MemoryModuleType
<LivingEntity> MemoryModuleType.AVOID_TARGET
private final List
<LivingEntity> LivingTargetCache.entities
static final MemoryModuleType
<LivingEntity> MemoryModuleType.HURT_BY_ENTITY
static final MemoryModuleType
<LivingEntity> MemoryModuleType.INTERACTION_TARGET
static final MemoryModuleType
<List<LivingEntity>> MemoryModuleType.MOBS
static final MemoryModuleType
<LivingEntity> MemoryModuleType.NEAREST_ATTACKABLE
static final MemoryModuleType
<LivingEntity> MemoryModuleType.NEAREST_HOSTILE
static final MemoryModuleType
<LivingEntity> MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED
static final MemoryModuleType
<LivingEntity> MemoryModuleType.ROAR_TARGET
private final Predicate
<LivingEntity> LivingTargetCache.targetPredicate
static final MemoryModuleType
<List<LivingEntity>> MemoryModuleType.VISIBLE_VILLAGER_BABIES
Modifier and TypeMethodDescriptionstatic <E extends LivingEntity>
com.mojang.serialization.Codec<Brain<E>> Brain.createBrainCodec
(Collection<? extends MemoryModuleType<?>> memoryModules, Collection<? extends SensorType<? extends Sensor<? super E>>> sensors) static <E extends LivingEntity>
Brain.Profile<E> Brain.createProfile
(Collection<? extends MemoryModuleType<?>> memoryModules, Collection<? extends SensorType<? extends Sensor<? super E>>> sensors) Modifier and TypeMethodDescriptionLivingTargetCache.findFirst
(Predicate<LivingEntity> predicate) LivingTargetCache.iterate
(Predicate<LivingEntity> predicate) LivingTargetCache.stream
(Predicate<LivingEntity> predicate) Modifier and TypeMethodDescriptionboolean
LivingTargetCache.contains
(LivingEntity entity) boolean
BlockPosLookTarget.isSeenBy
(LivingEntity entity) boolean
EntityLookTarget.isSeenBy
(LivingEntity entity) boolean
LookTarget.isSeenBy
(LivingEntity entity) Modifier and TypeMethodDescriptionboolean
LivingTargetCache.anyMatch
(Predicate<LivingEntity> predicate) LivingTargetCache.findFirst
(Predicate<LivingEntity> predicate) LivingTargetCache.iterate
(Predicate<LivingEntity> predicate) LivingTargetCache.stream
(Predicate<LivingEntity> predicate) -
Uses of LivingEntity in net.minecraft.entity.ai.brain.sensor
Modifier and TypeClassDescriptionclass
ArmadilloScareDetectedSensor<T extends LivingEntity>
class
NearestLivingEntitiesSensor<T extends LivingEntity>
class
Sensor<E extends LivingEntity>
A sensor can update memories over time in a brain.Modifier and TypeFieldDescriptionstatic final SensorType
<NearestLivingEntitiesSensor<LivingEntity>> SensorType.NEAREST_LIVING_ENTITIES
private final BiPredicate
<T, LivingEntity> ArmadilloScareDetectedSensor.threateningEntityPredicate
Modifier and TypeMethodDescriptionprivate static Optional
<LivingEntity> WardenAttackablesSensor.findNearestTarget
(WardenEntity warden, Predicate<LivingEntity> targetPredicate) private Optional
<LivingEntity> NearestVisibleLivingEntitySensor.getNearestVisibleLivingEntity
(LivingEntity entity) protected MemoryModuleType
<LivingEntity> AxolotlAttackablesSensor.getOutputMemoryModule()
protected MemoryModuleType
<LivingEntity> FrogAttackablesSensor.getOutputMemoryModule()
protected abstract MemoryModuleType
<LivingEntity> NearestVisibleLivingEntitySensor.getOutputMemoryModule()
protected MemoryModuleType
<LivingEntity> VillagerHostilesSensor.getOutputMemoryModule()
private List
<LivingEntity> VillagerBabiesSensor.getVisibleVillagerBabies
(LivingEntity entities) Modifier and TypeMethodDescriptionprivate boolean
AxolotlAttackablesSensor.canHunt
(LivingEntity axolotl, LivingEntity target) PiglinSpecificSensor.findPiglinRepellent
(ServerWorld world, LivingEntity entity) private Optional
<LivingEntity> NearestVisibleLivingEntitySensor.getNearestVisibleLivingEntity
(LivingEntity entity) protected Optional
<LivingTargetCache> NearestVisibleLivingEntitySensor.getVisibleLivingEntities
(LivingEntity entity) private LivingTargetCache
VillagerBabiesSensor.getVisibleMobs
(LivingEntity entity) private List
<LivingEntity> VillagerBabiesSensor.getVisibleVillagerBabies
(LivingEntity entities) private boolean
AxolotlAttackablesSensor.isAlwaysHostileTo
(LivingEntity axolotl) private boolean
VillagerHostilesSensor.isCloseEnoughForDanger
(LivingEntity villager, LivingEntity target) private boolean
VillagerHostilesSensor.isHostile
(LivingEntity entity) private boolean
AxolotlAttackablesSensor.isInRange
(LivingEntity axolotl, LivingEntity target) private boolean
FrogAttackablesSensor.isTargetUnreachable
(LivingEntity entity, LivingEntity target) private boolean
VillagerBabiesSensor.isVillagerBaby
(LivingEntity entity) protected boolean
AxolotlAttackablesSensor.matches
(LivingEntity entity, LivingEntity target) protected boolean
FrogAttackablesSensor.matches
(LivingEntity entity, LivingEntity target) protected abstract boolean
NearestVisibleLivingEntitySensor.matches
(LivingEntity entity, LivingEntity target) protected boolean
VillagerHostilesSensor.matches
(LivingEntity entity, LivingEntity target) static void
GolemLastSeenSensor.rememberIronGolem
(LivingEntity entity) protected void
DummySensor.sense
(ServerWorld world, LivingEntity entity) protected void
GolemLastSeenSensor.sense
(ServerWorld world, LivingEntity entity) protected void
HurtBySensor.sense
(ServerWorld world, LivingEntity entity) protected void
IsInWaterSensor.sense
(ServerWorld world, LivingEntity entity) protected void
NearestPlayersSensor.sense
(ServerWorld world, LivingEntity entity) protected void
NearestVisibleLivingEntitySensor.sense
(ServerWorld world, LivingEntity entity) protected void
PiglinBruteSpecificSensor.sense
(ServerWorld world, LivingEntity entity) protected void
PiglinSpecificSensor.sense
(ServerWorld world, LivingEntity entity) protected void
VillagerBabiesSensor.sense
(ServerWorld world, LivingEntity entity) static void
GolemLastSeenSensor.senseIronGolem
(LivingEntity entity) static boolean
Sensor.testAttackableTargetPredicate
(LivingEntity entity, LivingEntity target) static boolean
Sensor.testAttackableTargetPredicateIgnoreVisibility
(LivingEntity entity, LivingEntity target) static boolean
Sensor.testTargetPredicate
(LivingEntity entity, LivingEntity target) Modifier and TypeMethodDescriptionprivate static Optional
<LivingEntity> WardenAttackablesSensor.findNearestTarget
(WardenEntity warden, Predicate<LivingEntity> targetPredicate) ModifierConstructorDescriptionArmadilloScareDetectedSensor
(int senseInterval, BiPredicate<T, LivingEntity> threateningEntityPredicate, Predicate<T> canRollUpPredicate, MemoryModuleType<Boolean> memoryModuleType, int expiry) -
Uses of LivingEntity in net.minecraft.entity.ai.brain.task
Modifier and TypeClassDescriptionclass
CompositeTask<E extends LivingEntity>
class
CrossbowAttackTask<E extends MobEntity & CrossbowUser,
T extends LivingEntity> class
GiveInventoryToLookTargetTask<E extends LivingEntity & InventoryOwner>
class
MultiTickTask<E extends LivingEntity>
class
RandomTask<E extends LivingEntity>
class
SingleTickTask<E extends LivingEntity>
interface
Task<E extends LivingEntity>
interface
TaskRunnable<E extends LivingEntity>
A functional interface that represents a task.class
TaskTriggerer<E extends LivingEntity,
M> A lambda-based alternative to subclassingTask
.static final class
TaskTriggerer.K1<E extends LivingEntity>
private static final class
TaskTriggerer.QueryMemory<E extends LivingEntity,
F extends com.mojang.datafixers.kinds.K1, Value> private static final class
TaskTriggerer.Supply<E extends LivingEntity,
A> static final class
TaskTriggerer.TaskContext<E extends LivingEntity>
private static final class
TaskTriggerer.TaskContext.Mu<E extends LivingEntity>
private static interface
TaskTriggerer.TaskFunction<E extends LivingEntity,
R> private static final class
TaskTriggerer.Trigger<E extends LivingEntity>
Modifier and TypeFieldDescriptionprivate final Function
<LivingEntity, Optional<LookTarget>> GiveInventoryToLookTargetTask.lookTargetFunction
private final Function
<LivingEntity, Float> TemptTask.speed
private final Function
<LivingEntity, Double> TemptTask.stopDistanceGetter
Modifier and TypeMethodDescriptionstatic <E extends LivingEntity,
M>
TaskTriggerer<E, M> TaskTriggerer.cast
(com.mojang.datafixers.kinds.App<TaskTriggerer.K1<E>, M> app) static <E extends LivingEntity,
T extends LivingEntity>
Task<E> FindEntityTask.create
(EntityType<? extends T> type, int maxDistance, Predicate<E> entityPredicate, Predicate<T> targetPredicate, MemoryModuleType<T> targetModule, float speed, int completionRange) static <E extends LivingEntity,
T extends LivingEntity>
Task<E> FindEntityTask.create
(EntityType<? extends T> type, int maxDistance, Predicate<E> entityPredicate, Predicate<T> targetPredicate, MemoryModuleType<T> targetModule, float speed, int completionRange) static <T extends LivingEntity>
Task<LivingEntity> FindEntityTask.create
(EntityType<? extends T> type, int maxDistance, MemoryModuleType<T> targetModule, float speed, int completionRange) static <E extends LivingEntity>
Task<E> ForgetTask.create
(Predicate<E> condition, MemoryModuleType<?> memory) static <E extends LivingEntity,
T>
Task<E> MemoryTransferTask.create
(Predicate<E> runPredicate, MemoryModuleType<? extends T> sourceType, MemoryModuleType<T> targetType, UniformIntProvider expiry) static <E extends LivingEntity>
Task<E> RidingTask.create
(int range, BiPredicate<E, Entity> alternativeRideCondition) static <E extends LivingEntity>
Task<E> WalkToNearestVisibleWantedItemTask.create
(Predicate<E> startCondition, float speed, boolean requiresWalkTarget, int radius) (package private) static <E extends LivingEntity,
M>
TaskTriggerer.TaskFunction<E, M> TaskTriggerer.getFunction
(com.mojang.datafixers.kinds.App<TaskTriggerer.K1<E>, M> app) static <E extends LivingEntity>
TaskTriggerer.TaskContext<E> TaskTriggerer.newContext()
(package private) static <E extends LivingEntity,
M>
TaskTriggerer<E, M> TaskTriggerer.of
(TaskTriggerer.TaskFunction<E, M> function) static <E extends LivingEntity>
SingleTickTask<E> Tasks.pickRandomly
(List<com.mojang.datafixers.util.Pair<? extends TaskRunnable<? super E>, Integer>> weightedTasks) Returns a task that picks and runs a task fromweightedTasks
randomly.static <E extends LivingEntity>
SingleTickTask<E> TaskTriggerer.predicate
(BiPredicate<ServerWorld, E> predicate) static <E extends LivingEntity>
SingleTickTask<E> abstract <E extends LivingEntity>
voidCompositeTask.RunMode.run
(Stream<Task<? super E>> tasks, ServerWorld world, E entity, long time) static <E extends LivingEntity>
SingleTickTask<E> TaskTriggerer.runIf
(Predicate<E> predicate, SingleTickTask<? super E> task) static <E extends LivingEntity>
SingleTickTask<E> TaskTriggerer.runIf
(TaskRunnable<? super E> predicate, TaskRunnable<? super E> task) static <E extends LivingEntity>
SingleTickTask<E> TaskTriggerer.task
(Function<TaskTriggerer.TaskContext<E>, ? extends com.mojang.datafixers.kinds.App<TaskTriggerer.K1<E>, TaskRunnable<E>>> creator) static <E extends LivingEntity>
SingleTickTask<E> Tasks.weighted
(List<com.mojang.datafixers.util.Pair<? extends TaskRunnable<? super E>, Integer>> weightedTasks, CompositeTask.Order order, CompositeTask.RunMode runMode) Returns a task that runs task(s) fromweightedTasks
.Modifier and TypeMethodDescriptionprivate LivingEntity
HoldTradeOffersTask.findPotentialCustomer
(VillagerEntity villager) private static LivingEntity
CrossbowAttackTask.getAttackTarget
(LivingEntity entity) static LivingEntity
LookTargetUtil.getCloserEntity
(LivingEntity source, Optional<LivingEntity> first, LivingEntity second) static LivingEntity
LookTargetUtil.getCloserEntity
(LivingEntity source, LivingEntity first, LivingEntity second) PrepareRamTask.Ram.getEntity()
private static LivingEntity
PlayWithVillagerBabiesTask.getInteractionTarget
(LivingEntity baby) Modifier and TypeMethodDescriptionstatic Task
<LivingEntity> AdmireItemTask.create
(int duration) static Task
<LivingEntity> AdmireItemTimeLimitTask.create
(int cooldown, int timeLimit) static Task
<LivingEntity> DefeatTargetTask.create
(int celebrationDuration, BiPredicate<LivingEntity, LivingEntity> predicate) static Task
<LivingEntity> EndRaidTask.create()
static <T extends LivingEntity>
Task<LivingEntity> FindEntityTask.create
(EntityType<? extends T> type, int maxDistance, MemoryModuleType<T> targetModule, float speed, int completionRange) static Task
<LivingEntity> FindInteractionTargetTask.create
(EntityType<?> type, int maxDistance) static Task
<LivingEntity> ForgetAngryAtTargetTask.create()
static Task
<LivingEntity> ForgetBellRingTask.create
(int maxHiddenSeconds, int distance) static Task
<LivingEntity> ForgetCompletedPointOfInterestTask.create
(Predicate<RegistryEntry<PointOfInterestType>> poiTypePredicate, MemoryModuleType<GlobalPos> poiPosModule) static SingleTickTask
<LivingEntity> GoTowardsLookTargetTask.create
(float speed, int completionRange) static SingleTickTask
<LivingEntity> GoTowardsLookTargetTask.create
(Predicate<LivingEntity> predicate, Function<LivingEntity, Float> speed, int completionRange) static SingleTickTask
<LivingEntity> HideInHomeTask.create
(int maxDistance, float walkSpeed, int preferredDistance) static Task
<LivingEntity> HideWhenBellRingsTask.create()
static Task
<LivingEntity> HuntFinishTask.create()
static Task
<LivingEntity> static Task
<LivingEntity> LookAtDisturbanceTask.create()
static SingleTickTask
<LivingEntity> LookAtMobTask.create
(float maxDistance) static SingleTickTask
<LivingEntity> LookAtMobTask.create
(Predicate<LivingEntity> predicate, float maxDistance) static SingleTickTask
<LivingEntity> LookAtMobTask.create
(EntityType<?> type, float maxDistance) static Task
<LivingEntity> LookAtMobTask.create
(SpawnGroup spawnGroup, float maxDistance) static SingleTickTask
<LivingEntity> MeetVillagerTask.create()
static Task
<LivingEntity> OpenDoorsTask.create()
static Task
<LivingEntity> PacifyTask.create
(MemoryModuleType<?> requiredMemory, int duration) static Task
<LivingEntity> PlayDeadTimerTask.create()
static Task
<LivingEntity> RingBellTask.create()
static Task
<LivingEntity> ScheduleActivityTask.create()
static SingleTickTask
<LivingEntity> SeekSkyTask.create
(float speed) static Task
<LivingEntity> StartRaidTask.create()
static Task
<LivingEntity> StartRidingTask.create
(float speed) static Task
<LivingEntity> StartSniffingTask.create()
static Task
<LivingEntity> StopPanickingTask.create()
static Task
<LivingEntity> WakeUpTask.create()
static Task
<LivingEntity> WalkToNearestVisibleWantedItemTask.create
(float speed, boolean requiresWalkTarget, int radius) static Task
<LivingEntity> WalkTowardsLookTargetTask.create
(Function<LivingEntity, Optional<LookTarget>> lookTargetFunction, Predicate<LivingEntity> predicate, int completionRange, int searchRange, float speed) static Task
<LivingEntity> WantNewItemTask.create
(int range) private static com.mojang.datafixers.util.Pair
<Integer, Task<LivingEntity>> VillagerTaskListProvider.createBusyFollowTask()
private static com.mojang.datafixers.util.Pair
<Integer, Task<LivingEntity>> VillagerTaskListProvider.createFreeFollowTask()
static Task
<LivingEntity> LookAtMobWithIntervalTask.follow
(float maxDistance, UniformIntProvider interval) Deprecated.private static Task
<LivingEntity> LookAtMobWithIntervalTask.follow
(float maxDistance, UniformIntProvider interval, Predicate<LivingEntity> predicate) Deprecated.static Task
<LivingEntity> LookAtMobWithIntervalTask.follow
(EntityType<?> type, float maxDistance, UniformIntProvider interval) Deprecated.private static Map
<LivingEntity, Integer> PlayWithVillagerBabiesTask.getBabyInteractionTargetCounts
(List<LivingEntity> babies) static Optional
<LivingEntity> LookTargetUtil.getEntity
(LivingEntity entity, MemoryModuleType<UUID> uuidMemoryModule) private static Optional
<LivingEntity> PlayWithVillagerBabiesTask.getLeastPopularBabyInteractionTarget
(List<LivingEntity> babies) Modifier and TypeMethodDescriptionprivate static boolean
OpenDoorsTask.cannotReachDoor
(ServerWorld world, LivingEntity entity, GlobalPos doorPos) private static boolean
ForgetAttackTargetTask.cannotReachTarget
(LivingEntity livingEntity, Optional<Long> optional) private static boolean
RidingTask.canRideTarget
(LivingEntity entity, Entity vehicle, int range) static boolean
LookTargetUtil.canSee
(Brain<?> brain, LivingEntity target) static void
SonicBoomTask.cooldown
(LivingEntity warden, int cooldown) SeekSkyTask.findNearbySky
(ServerWorld world, LivingEntity entity) private void
PrepareRamTask.findRam
(PathAwareEntity entity, LivingEntity target) PrepareRamTask.findRamStart
(PathAwareEntity entity, LivingEntity target) protected void
SleepTask.finishRunning
(ServerWorld world, LivingEntity entity, long time) protected void
TemptationCooldownTask.finishRunning
(ServerWorld world, LivingEntity entity, long time) private static LivingEntity
CrossbowAttackTask.getAttackTarget
(LivingEntity entity) static LivingEntity
LookTargetUtil.getCloserEntity
(LivingEntity source, Optional<LivingEntity> first, LivingEntity second) static LivingEntity
LookTargetUtil.getCloserEntity
(LivingEntity source, LivingEntity first, LivingEntity second) static Optional
<LivingEntity> LookTargetUtil.getEntity
(LivingEntity entity, MemoryModuleType<UUID> uuidMemoryModule) private static LivingEntity
PlayWithVillagerBabiesTask.getInteractionTarget
(LivingEntity baby) BreezeJumpTask.getPosToJumpTo
(LivingEntity breeze, Vec3d pos) static Vec3d
BreezeMovementUtil.getRandomPosBehindTarget
(LivingEntity target, Random random) private static Vec3d
BreezeSlideTowardsTargetTask.getRandomPosInMediumRange
(BreezeEntity breeze, LivingEntity target) TemptationCooldownTask.getTemptationCooldownTicks
(LivingEntity entity) static void
LookTargetUtil.give
(LivingEntity entity, ItemStack stack, Vec3d targetLocation) static void
LookTargetUtil.give
(LivingEntity entity, ItemStack stack, Vec3d targetLocation, Vec3d velocityFactor, float yOffset) private void
GiveGiftsToHeroTask.giveGifts
(VillagerEntity villager, LivingEntity recipient) private static void
GatherItemsVillagerTask.giveHalfOfStack
(VillagerEntity villager, Set<Item> validItems, LivingEntity target) private static boolean
VillagerTaskListProvider.hasActiveRaid
(ServerWorld world, LivingEntity entity) static boolean
LookTargetUtil.hasBreedTarget
(LivingEntity entity) private static boolean
PlayWithVillagerBabiesTask.hasInteractionTarget
(LivingEntity baby) private static boolean
OpenDoorsTask.hasOtherMobReachedDoor
(LivingEntity entity, BlockPos pos, Optional<List<LivingEntity>> otherMobs) private static boolean
ForgetCompletedPointOfInterestTask.isBedOccupiedByOthers
(ServerWorld world, BlockPos pos, LivingEntity entity) static boolean
BreezeShootTask.isFacingTarget
(BreezeEntity breeze, LivingEntity target) static boolean
PanicTask.isHostileNearby
(LivingEntity entity) private static boolean
PlayWithVillagerBabiesTask.isInteractionTargetOf
(LivingEntity entity, LivingEntity baby) static boolean
LookTargetUtil.isNewTargetTooFar
(LivingEntity source, LivingEntity target, double extraDistance) Checks if an entity can be a new attack target for the source entity.static boolean
SeekSkyTask.isSkyVisible
(ServerWorld world, LivingEntity entity, BlockPos pos) private static boolean
BreezeJumpTask.isTargetOutOfRange
(BreezeEntity breeze, LivingEntity target) private boolean
FrogEatEntityTask.isTargetReachable
(FrogEntity entity, LivingEntity target) private static boolean
BreezeJumpTask.isTargetTooClose
(BreezeEntity breeze, LivingEntity target) static boolean
LookTargetUtil.isTargetWithinAttackRange
(MobEntity mob, LivingEntity target, int rangedWeaponReachReduction) private static boolean
BreezeShootTask.isTargetWithinRange
(BreezeEntity breeze, LivingEntity target) static boolean
LookTargetUtil.isVisibleInMemory
(LivingEntity source, LivingEntity target) protected void
TemptationCooldownTask.keepRunning
(ServerWorld world, LivingEntity entity, long time) static void
LookTargetUtil.lookAt
(LivingEntity entity, LivingEntity target) static void
LookTargetUtil.lookAtAndWalkTowardsEachOther
(LivingEntity first, LivingEntity second, float speed, int walkCompletionRange) private static void
LookTargetUtil.lookAtEachOther
(LivingEntity first, LivingEntity second) private void
FrogEatEntityTask.markTargetAsUnreachable
(FrogEntity entity, LivingEntity target) static void
OpenDoorsTask.pathToDoor
(ServerWorld world, LivingEntity entity, @Nullable PathNode lastNode, @Nullable PathNode currentNode, Set<GlobalPos> doors, Optional<List<LivingEntity>> otherMobs) static void
GiveInventoryToLookTargetTask.playThrowSound
(LivingEntity entity, ItemStack stack, Vec3d target) protected void
DismountVehicleTask.run
(ServerWorld world, LivingEntity entity, long time) protected void
SleepTask.run
(ServerWorld world, LivingEntity entity, long time) private void
CrossbowAttackTask.setLookTarget
(MobEntity entity, LivingEntity target) private static void
PlayWithVillagerBabiesTask.setPlayTarget
(MemoryQueryResult<?, LivingEntity> interactionTarget, MemoryQueryResult<?, LookTarget> lookTarget, MemoryQueryResult<?, WalkTarget> walkTarget, LivingEntity baby) private void
HoldTradeOffersTask.setupOffers
(LivingEntity customer, VillagerEntity villager) protected boolean
SleepTask.shouldKeepRunning
(ServerWorld world, LivingEntity entity, long time) protected boolean
TemptationCooldownTask.shouldKeepRunning
(ServerWorld world, LivingEntity entity, long time) protected boolean
DismountVehicleTask.shouldRun
(ServerWorld world, LivingEntity entity) protected boolean
SleepTask.shouldRun
(ServerWorld world, LivingEntity entity) final void
WaitTask.stop
(ServerWorld world, LivingEntity entity, long time) final void
WaitTask.tick
(ServerWorld world, LivingEntity entity, long time) private void
CrossbowAttackTask.tickState
(E entity, LivingEntity target) final boolean
WaitTask.tryStarting
(ServerWorld world, LivingEntity entity, long time) static void
LookTargetUtil.walkTowards
(LivingEntity entity, LookTarget target, float speed, int completionRange) static void
LookTargetUtil.walkTowards
(LivingEntity entity, Entity target, float speed, int completionRange) static void
LookTargetUtil.walkTowards
(LivingEntity entity, BlockPos target, float speed, int completionRange) private static void
LookTargetUtil.walkTowardsEachOther
(LivingEntity first, LivingEntity second, float speed, int completionRange) static boolean
PanicTask.wasHurt
(LivingEntity entity) private static boolean
VillagerTaskListProvider.wonRaid
(ServerWorld world, LivingEntity entity) Modifier and TypeMethodDescriptionprivate static boolean
LookTargetUtil.canSee
(Brain<?> brain, MemoryModuleType<? extends LivingEntity> memoryType, Predicate<LivingEntity> filter) private static boolean
LookTargetUtil.canSee
(Brain<?> brain, MemoryModuleType<? extends LivingEntity> memoryType, Predicate<LivingEntity> filter) static boolean
LookTargetUtil.canSee
(Brain<?> brain, MemoryModuleType<? extends LivingEntity> memoryModuleType, EntityType<?> entityType) static Task
<LivingEntity> DefeatTargetTask.create
(int celebrationDuration, BiPredicate<LivingEntity, LivingEntity> predicate) static Task
<LivingEntity> DefeatTargetTask.create
(int celebrationDuration, BiPredicate<LivingEntity, LivingEntity> predicate) static <E extends WardenEntity>
Task<E> FindRoarTargetTask.create
(Function<E, Optional<? extends LivingEntity>> targetFinder) ForgetAttackTargetTask.create
(BiConsumer<E, LivingEntity> forgetCallback) ForgetAttackTargetTask.create
(Predicate<LivingEntity> alternativeCondition) ForgetAttackTargetTask.create
(Predicate<LivingEntity> alternativeCondition, BiConsumer<E, LivingEntity> forgetCallback, boolean shouldForgetIfTargetUnreachable) ForgetAttackTargetTask.create
(Predicate<LivingEntity> alternativeCondition, BiConsumer<E, LivingEntity> forgetCallback, boolean shouldForgetIfTargetUnreachable) static SingleTickTask
<LivingEntity> GoTowardsLookTargetTask.create
(Predicate<LivingEntity> predicate, Function<LivingEntity, Float> speed, int completionRange) static SingleTickTask
<LivingEntity> GoTowardsLookTargetTask.create
(Predicate<LivingEntity> predicate, Function<LivingEntity, Float> speed, int completionRange) static SingleTickTask
<LivingEntity> LookAtMobTask.create
(Predicate<LivingEntity> predicate, float maxDistance) RangedApproachTask.create
(Function<LivingEntity, Float> speed) UpdateAttackTargetTask.create
(Function<E, Optional<? extends LivingEntity>> targetGetter) UpdateAttackTargetTask.create
(Predicate<E> startCondition, Function<E, Optional<? extends LivingEntity>> targetGetter) static SingleTickTask
<PassiveEntity> WalkTowardClosestAdultTask.create
(UniformIntProvider executionRange, Function<LivingEntity, Float> speed) static Task
<LivingEntity> WalkTowardsLookTargetTask.create
(Function<LivingEntity, Optional<LookTarget>> lookTargetFunction, Predicate<LivingEntity> predicate, int completionRange, int searchRange, float speed) static Task
<LivingEntity> WalkTowardsLookTargetTask.create
(Function<LivingEntity, Optional<LookTarget>> lookTargetFunction, Predicate<LivingEntity> predicate, int completionRange, int searchRange, float speed) private static Task
<LivingEntity> LookAtMobWithIntervalTask.follow
(float maxDistance, UniformIntProvider interval, Predicate<LivingEntity> predicate) Deprecated.private static Map
<LivingEntity, Integer> PlayWithVillagerBabiesTask.getBabyInteractionTargetCounts
(List<LivingEntity> babies) static LivingEntity
LookTargetUtil.getCloserEntity
(LivingEntity source, Optional<LivingEntity> first, LivingEntity second) private static Optional
<LivingEntity> PlayWithVillagerBabiesTask.getLeastPopularBabyInteractionTarget
(List<LivingEntity> babies) private static boolean
OpenDoorsTask.hasOtherMobReachedDoor
(LivingEntity entity, BlockPos pos, Optional<List<LivingEntity>> otherMobs) static void
OpenDoorsTask.pathToDoor
(ServerWorld world, LivingEntity entity, @Nullable PathNode lastNode, @Nullable PathNode currentNode, Set<GlobalPos> doors, Optional<List<LivingEntity>> otherMobs) private static void
PlayWithVillagerBabiesTask.setPlayTarget
(MemoryQueryResult<?, LivingEntity> interactionTarget, MemoryQueryResult<?, LookTarget> lookTarget, MemoryQueryResult<?, WalkTarget> walkTarget, LivingEntity baby) ModifierConstructorDescriptionGiveInventoryToLookTargetTask
(Function<LivingEntity, Optional<LookTarget>> lookTargetFunction, float speed, int runTime) TemptTask
(Function<LivingEntity, Float> speed) TemptTask
(Function<LivingEntity, Float> speed, Function<LivingEntity, Double> stopDistanceGetter) -
Uses of LivingEntity in net.minecraft.entity.ai.goal
Modifier and TypeClassDescriptionclass
ActiveTargetGoal<T extends LivingEntity>
A target goal that finds a target by entity class when the goal starts.class
DisableableFollowTargetGoal<T extends LivingEntity>
An active target goal that can be disabled so that it cannot start.class
FleeEntityGoal<T extends LivingEntity>
class
RaidGoal<T extends LivingEntity>
class
UntamedActiveTargetGoal<T extends LivingEntity>
An active target goal that only starts for untamed tameable animals.Modifier and TypeFieldDescriptionprivate LivingEntity
TrackOwnerAttackerGoal.attacker
private LivingEntity
AttackWithOwnerGoal.attacking
private @Nullable LivingEntity
FollowOwnerGoal.owner
private LivingEntity
AttackGoal.target
private @Nullable LivingEntity
CreeperIgniteGoal.target
private LivingEntity
PounceAtTargetGoal.target
private @Nullable LivingEntity
ProjectileAttackGoal.target
private @Nullable LivingEntity
TrackIronGolemTargetGoal.target
protected @Nullable LivingEntity
TrackTargetGoal.target
private @Nullable LivingEntity
WanderNearTargetGoal.target
protected @Nullable LivingEntity
ActiveTargetGoal.targetEntity
protected T
FleeEntityGoal.targetEntity
Modifier and TypeFieldDescriptionprotected final Predicate
<LivingEntity> FleeEntityGoal.extraInclusionSelector
protected final Predicate
<LivingEntity> FleeEntityGoal.inclusionSelector
protected final Class
<? extends LivingEntity> LookAtEntityGoal.targetType
Modifier and TypeMethodDescriptionprotected void
MeleeAttackGoal.attack
(LivingEntity target) protected boolean
MeleeAttackGoal.canAttack
(LivingEntity target) private boolean
TrackTargetGoal.canNavigateToEntity
(LivingEntity entity) protected boolean
TrackTargetGoal.canTrack
(@Nullable LivingEntity target, TargetPredicate targetPredicate) private boolean
TemptGoal.isTemptedBy
(LivingEntity entity) protected void
RevengeGoal.setMobEntityTarget
(MobEntity mob, LivingEntity target) void
ActiveTargetGoal.setTargetEntity
(@Nullable LivingEntity targetEntity) ModifierConstructorDescriptionActiveTargetGoal
(MobEntity mob, Class<T> targetClass, boolean checkVisibility, Predicate<LivingEntity> targetPredicate) ActiveTargetGoal
(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable Predicate<LivingEntity> targetPredicate) DisableableFollowTargetGoal
(RaiderEntity actor, Class<T> targetEntityClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable Predicate<LivingEntity> targetPredicate) FleeEntityGoal
(PathAwareEntity fleeingEntity, Class<T> classToFleeFrom, float fleeDistance, double fleeSlowSpeed, double fleeFastSpeed, Predicate<LivingEntity> inclusionSelector) FleeEntityGoal
(PathAwareEntity mob, Class<T> fleeFromType, Predicate<LivingEntity> extraInclusionSelector, float distance, double slowSpeed, double fastSpeed, Predicate<LivingEntity> inclusionSelector) LookAtEntityGoal
(MobEntity mob, Class<? extends LivingEntity> targetType, float range) LookAtEntityGoal
(MobEntity mob, Class<? extends LivingEntity> targetType, float range, float chance) LookAtEntityGoal
(MobEntity mob, Class<? extends LivingEntity> targetType, float range, float chance, boolean lookForward) RaidGoal
(RaiderEntity raider, Class<T> targetEntityClass, boolean checkVisibility, @Nullable Predicate<LivingEntity> targetPredicate) StopAndLookAtEntityGoal
(MobEntity mob, Class<? extends LivingEntity> targetType, float range) StopAndLookAtEntityGoal
(MobEntity mob, Class<? extends LivingEntity> targetType, float range, float chance) UntamedActiveTargetGoal
(TameableEntity tameable, Class<T> targetClass, boolean checkVisibility, @Nullable Predicate<LivingEntity> targetPredicate) -
Uses of LivingEntity in net.minecraft.entity.attribute
Modifier and TypeFieldDescriptionprivate static final Map
<EntityType<? extends LivingEntity>, DefaultAttributeContainer> DefaultAttributeRegistry.DEFAULT_ATTRIBUTE_REGISTRY
Modifier and TypeMethodDescriptionstatic DefaultAttributeContainer
DefaultAttributeRegistry.get
(EntityType<? extends LivingEntity> type) -
Uses of LivingEntity in net.minecraft.entity.boss
Modifier and TypeFieldDescriptionprivate static final Predicate
<LivingEntity> WitherEntity.CAN_ATTACK_PREDICATE
Modifier and TypeMethodDescriptionvoid
WitherEntity.shootAt
(LivingEntity target, float pullProgress) private void
WitherEntity.shootSkullAt
(int headIndex, LivingEntity target) -
Uses of LivingEntity in net.minecraft.entity.boss.dragon
-
Uses of LivingEntity in net.minecraft.entity.boss.dragon.phase
Modifier and TypeMethodDescriptionvoid
StrafePlayerPhase.setTargetEntity
(LivingEntity targetEntity) -
Uses of LivingEntity in net.minecraft.entity.damage
Modifier and TypeMethodDescriptionstatic @Nullable FallLocation
FallLocation.fromEntity
(LivingEntity entity) DamageSource.getDeathMessage
(LivingEntity killed) DamageSources.mobAttack
(LivingEntity attacker) DamageSources.mobAttackNoAggro
(LivingEntity attacker) DamageSources.mobProjectile
(Entity source, @Nullable LivingEntity attacker) DamageSources.spit
(Entity source, @Nullable LivingEntity attacker) DamageSources.sting
(LivingEntity attacker) DamageSources.windCharge
(Entity source, @Nullable LivingEntity attacker) -
Uses of LivingEntity in net.minecraft.entity.decoration
Modifier and TypeMethodDescriptionInteractionEntity.getLastAttacker()
InteractionEntity.getTarget()
-
Uses of LivingEntity in net.minecraft.entity.effect
Modifier and TypeMethodDescriptionvoid
InstantHealthOrDamageStatusEffect.applyInstantEffect
(@Nullable Entity source, @Nullable Entity attacker, LivingEntity target, int amplifier, double proximity) void
StatusEffect.applyInstantEffect
(@Nullable Entity source, @Nullable Entity attacker, LivingEntity target, int amplifier, double proximity) boolean
AbsorptionStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
BadOmenStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
HungerStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
InstantHealthOrDamageStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
PoisonStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
RaidOmenStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
RegenerationStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
SaturationStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
StatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
WitherStatusEffect.applyUpdateEffect
(LivingEntity entity, int amplifier) OozingStatusEffect.SlimeCounter.around
(LivingEntity entity) float
StatusEffectInstance.Fading.calculate
(LivingEntity entity, float tickDelta) float
StatusEffectInstance.getFadeFactor
(LivingEntity entity, float tickDelta) Returns the factor (multiplier) for effect fade-in and fade-out.static int
StatusEffectUtil.getHasteAmplifier
(LivingEntity entity) static boolean
StatusEffectUtil.hasHaste
(LivingEntity entity) static boolean
StatusEffectUtil.hasWaterBreathing
(LivingEntity entity) void
AbsorptionStatusEffect.onApplied
(LivingEntity entity, int amplifier) void
StatusEffect.onApplied
(LivingEntity entity, int amplifier) void
StatusEffectInstance.onApplied
(LivingEntity entity) void
InfestedStatusEffect.onEntityDamage
(LivingEntity entity, int amplifier, DamageSource source, float amount) void
StatusEffect.onEntityDamage
(LivingEntity entity, int amplifier, DamageSource source, float amount) void
StatusEffectInstance.onEntityDamage
(LivingEntity entity, DamageSource source, float amount) void
OozingStatusEffect.onEntityRemoval
(LivingEntity entity, int amplifier, Entity.RemovalReason reason) void
StatusEffect.onEntityRemoval
(LivingEntity entity, int amplifier, Entity.RemovalReason reason) void
StatusEffectInstance.onEntityRemoval
(LivingEntity entity, Entity.RemovalReason reason) void
WeavingStatusEffect.onEntityRemoval
(LivingEntity entity, int amplifier, Entity.RemovalReason reason) void
WindChargedStatusEffect.onEntityRemoval
(LivingEntity entity, int amplifier, Entity.RemovalReason reason) void
StatusEffect.playApplySound
(LivingEntity entity, int amplifier) void
StatusEffectInstance.playApplySound
(LivingEntity entity) private void
InfestedStatusEffect.spawnSilverfish
(World world, LivingEntity entity, double x, double y, double z) boolean
StatusEffectInstance.update
(LivingEntity entity, Runnable overwriteCallback) -
Uses of LivingEntity in net.minecraft.entity.mob
Modifier and TypeClassDescriptionprivate static class
SpiderEntity.TargetGoal<T extends LivingEntity>
Modifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Modifier and TypeFieldDescriptionprivate @Nullable LivingEntity
GuardianEntity.cachedBeamTarget
private @Nullable LivingEntity
EvokerFangsEntity.owner
private @Nullable LivingEntity
EndermanEntity.ChasePlayerGoal.target
private @Nullable LivingEntity
MobEntity.target
Modifier and TypeFieldDescriptionprivate final Predicate
<LivingEntity> EndermanEntity.TeleportTowardsPlayerGoal.angerPredicate
Modifier and TypeMethodDescriptionAngerable.getAttacker()
GuardianEntity.getBeamTarget()
MobEntity.getControllingPassenger()
Returns the passenger in control of this entity, ornull
if there is none.EvokerFangsEntity.getOwner()
AbstractPiglinEntity.getTarget()
Angerable.getTarget()
BreezeEntity.getTarget()
HoglinEntity.getTarget()
MobEntity.getTarget()
WardenEntity.getTarget()
ZoglinEntity.getTarget()
protected final @Nullable LivingEntity
MobEntity.getTargetInBrain()
Modifier and TypeMethodDescriptionprivate static Optional
<LivingEntity> PiglinBrain.getAngryAt
(AbstractPiglinEntity piglin) static Optional
<LivingEntity> PiglinBrain.getAvoiding
(PiglinEntity piglin) private Optional
<? extends LivingEntity> ZoglinEntity.getHoglinTarget()
BreezeEntity.getHurtBy()
private static Optional
<? extends LivingEntity> HoglinBrain.getNearestVisibleTargetablePlayer
(HoglinEntity hoglin) private static Optional
<? extends LivingEntity> PiglinBrain.getPreferredTarget
(PiglinEntity piglin) WardenEntity.getPrimeSuspect()
private static Optional
<? extends LivingEntity> PiglinBruteBrain.getTarget
(AbstractPiglinEntity piglin) private static Optional
<? extends LivingEntity> PiglinBruteBrain.getTargetIfInRange
(AbstractPiglinEntity piglin, MemoryModuleType<? extends LivingEntity> targetMemoryModule) private static ImmutableList
<com.mojang.datafixers.util.Pair<SingleTickTask<LivingEntity>, Integer>> PiglinBrain.makeFollowTasks()
private static RandomTask
<LivingEntity> PiglinBrain.makeRandomFollowTask()
private static Task
<LivingEntity> PiglinBrain.makeRememberRideableHoglinTask()
Modifier and TypeMethodDescriptionprotected static void
PiglinBrain.angerAtCloserTargets
(AbstractPiglinEntity piglin, LivingEntity target) private static void
PiglinBrain.angerAtIfCloser
(AbstractPiglinEntity piglin, LivingEntity target) private static void
HoglinBrain.askAdultsForHelp
(HoglinEntity hoglin, LivingEntity target) private static void
HoglinBrain.askAdultsToAvoid
(HoglinEntity hoglin, LivingEntity target) private static void
HoglinBrain.avoid
(HoglinEntity hoglin, LivingEntity target) private static void
HoglinBrain.avoidEnemy
(HoglinEntity hoglin, LivingEntity target) protected static void
PiglinBrain.becomeAngryWith
(AbstractPiglinEntity piglin, LivingEntity target) private static void
PiglinBrain.becomeAngryWithPlayer
(AbstractPiglinEntity piglin, LivingEntity player) boolean
DrownedEntity.canDrownedAttackTarget
(@Nullable LivingEntity target) boolean
Angerable.canTarget
(LivingEntity target) boolean
IllagerEntity.canTarget
(LivingEntity target) private static boolean
PiglinBrain.canWander
(LivingEntity piglin) private void
EvokerFangsEntity.damage
(LivingEntity target) protected void
SlimeEntity.damage
(LivingEntity target) private static void
PiglinBrain.groupRunAwayFrom
(PiglinEntity piglin, LivingEntity target) private static boolean
PiglinBrain.hasBeenHurt
(LivingEntity piglin) private static boolean
PiglinBrain.hasPlayerHoldingWantedItemNearby
(LivingEntity entity) static boolean
PiglinBrain.isGoldHoldingPlayer
(LivingEntity target) private static boolean
PiglinBrain.isHoldingCrossbow
(LivingEntity piglin) private static boolean
PiglinBrain.isHuntingTarget
(LivingEntity piglin, LivingEntity target) boolean
MobEntity.isInAttackRange
(LivingEntity entity) private static boolean
PiglinBrain.isPreferredAttackTarget
(PiglinEntity piglin, LivingEntity target) private static boolean
PiglinBruteBrain.isTarget
(AbstractPiglinEntity piglin, LivingEntity entity) private static boolean
WardenBrain.isTargeting
(WardenEntity warden, LivingEntity entity) static void
Hoglin.knockback
(LivingEntity attacker, LivingEntity target) protected void
HoglinEntity.knockback
(LivingEntity target) protected void
RavagerEntity.knockback
(LivingEntity target) protected void
ZoglinEntity.knockback
(LivingEntity target) protected static void
HoglinBrain.onAttacked
(HoglinEntity hoglin, LivingEntity attacker) protected static void
PiglinBrain.onAttacked
(PiglinEntity piglin, LivingEntity attacker) protected static void
HoglinBrain.onAttacking
(HoglinEntity hoglin, LivingEntity target) boolean
ZombieEntity.onKilledOther
(ServerWorld world, LivingEntity other) Called when this entity killsother
.private static void
WardenBrain.removeDeadSuspect
(WardenEntity warden, LivingEntity suspect) static void
WardenBrain.resetDigCooldown
(LivingEntity warden) private static void
PiglinBrain.runAwayFrom
(PiglinEntity piglin, LivingEntity target) private static void
PiglinBrain.runAwayFromClosestTarget
(PiglinEntity piglin, LivingEntity target) private static void
PiglinBrain.setAdmiringItem
(LivingEntity entity) void
Angerable.setAttacker
(@Nullable LivingEntity attacker) private static void
HoglinBrain.setAttackTarget
(HoglinEntity hoglin, LivingEntity target) private void
ZoglinEntity.setAttackTarget
(LivingEntity entity) private static void
HoglinBrain.setAttackTargetIfCloser
(HoglinEntity hoglin, LivingEntity targetCandidate) void
EvokerFangsEntity.setOwner
(@Nullable LivingEntity owner) void
Angerable.setTarget
(@Nullable LivingEntity target) void
CreeperEntity.setTarget
(@Nullable LivingEntity target) void
EndermanEntity.setTarget
(@Nullable LivingEntity target) void
MobEntity.setTarget
(@Nullable LivingEntity target) protected static void
PiglinBruteBrain.setTarget
(PiglinBruteEntity piglinBrute, LivingEntity target) void
ZombifiedPiglinEntity.setTarget
(@Nullable LivingEntity target) void
AbstractSkeletonEntity.shootAt
(LivingEntity target, float pullProgress) void
DrownedEntity.shootAt
(LivingEntity target, float pullProgress) void
IllusionerEntity.shootAt
(LivingEntity target, float pullProgress) void
PiglinEntity.shootAt
(LivingEntity target, float pullProgress) void
PillagerEntity.shootAt
(LivingEntity target, float pullProgress) void
WitchEntity.shootAt
(LivingEntity target, float pullProgress) default boolean
Angerable.shouldAngerAt
(LivingEntity entity) private boolean
ZoglinEntity.shouldAttack
(LivingEntity entity) private static void
HoglinBrain.targetEnemy
(HoglinEntity hoglin, LivingEntity target) boolean
GuardianEntity.GuardianTargetPredicate.test
(@Nullable LivingEntity livingEntity) static boolean
Hoglin.tryAttack
(LivingEntity attacker, LivingEntity target) protected static void
PiglinBrain.tryRevenge
(AbstractPiglinEntity piglin, LivingEntity target) protected static void
PiglinBruteBrain.tryRevenge
(PiglinBruteEntity piglinBrute, LivingEntity target) void
WardenEntity.updateAttackTarget
(LivingEntity target) static boolean
PiglinBrain.wearsGoldArmor
(LivingEntity entity) Modifier and TypeMethodDescriptionprivate static Optional
<? extends LivingEntity> PiglinBruteBrain.getTargetIfInRange
(AbstractPiglinEntity piglin, MemoryModuleType<? extends LivingEntity> targetMemoryModule) ModifierConstructorDescriptionEvokerFangsEntity
(World world, double x, double y, double z, float yaw, int warmup, LivingEntity owner) ModifierConstructorDescriptionTeleportTowardsPlayerGoal
(EndermanEntity enderman, @Nullable Predicate<LivingEntity> targetPredicate) -
Uses of LivingEntity in net.minecraft.entity.passive
Modifier and TypeClassDescriptionprivate static class
CatEntity.CatFleeGoal<T extends LivingEntity>
private static class
OcelotEntity.FleeGoal<T extends LivingEntity>
private static class
PandaEntity.PandaFleeGoal<T extends LivingEntity>
private static class
RabbitEntity.FleeGoal<T extends LivingEntity>
private class
WolfEntity.AvoidLlamaGoal<T extends LivingEntity>
Modifier and TypeClassDescriptionclass
class
class
class
class
class
Represents an axolotl, the cutest predator.class
class
class
class
Meow.class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Modifier and TypeFieldDescriptionprivate @Nullable LivingEntity
FoxEntity.DefendFriendGoal.friend
private @Nullable LivingEntity
FoxEntity.DefendFriendGoal.offender
private LivingEntity
TraderLlamaEntity.DefendTraderGoal.offender
Modifier and TypeFieldDescriptionstatic final Predicate
<LivingEntity> TurtleEntity.BABY_TURTLE_ON_LAND_FILTER
private static final Predicate
<LivingEntity> PufferfishEntity.BLOW_UP_FILTER
static final Predicate
<LivingEntity> WolfEntity.FOLLOW_TAMED_PREDICATE
private static final Predicate
<LivingEntity> AbstractHorseEntity.IS_BRED_HORSE
Modifier and TypeMethodDescriptionAbstractHorseEntity.getControllingPassenger()
Returns the passenger in control of this entity, ornull
if there is none.PigEntity.getControllingPassenger()
Returns the passenger in control of this entity, ornull
if there is none.StriderEntity.getControllingPassenger()
Returns the passenger in control of this entity, ornull
if there is none.AxolotlEntity.getTarget()
FrogEntity.getTarget()
Modifier and TypeMethodDescriptionprivate static Optional
<? extends LivingEntity> AxolotlBrain.getAttackTarget
(AxolotlEntity axolotl) Modifier and TypeMethodDescriptionstatic void
AxolotlEntity.appreciatePlayer
(AxolotlEntity axolotl, LivingEntity entity) protected void
FoxEntity.AttackGoal.attack
(LivingEntity target) protected void
PolarBearEntity.AttackGoal.attack
(LivingEntity target) boolean
TameableEntity.canAttackWithOwner
(LivingEntity target, LivingEntity owner) boolean
WolfEntity.canAttackWithOwner
(LivingEntity target, LivingEntity owner) private static boolean
AxolotlBrain.canGoToLookTarget
(LivingEntity entity) static boolean
FoxEntity.canJumpChase
(FoxEntity fox, LivingEntity chasedEntity) boolean
TameableEntity.canTarget
(LivingEntity target) private static float
AxolotlBrain.getAdultFollowingSpeed
(LivingEntity entity) Returns the axolotl's speed when a baby axolotl is following an adult.protected Vec2f
AbstractHorseEntity.getControlledRotation
(LivingEntity controllingPassenger) protected Vec2f
CamelEntity.getControlledRotation
(LivingEntity controllingPassenger) private static Optional
<LookTarget> AllayBrain.getLikedLookTarget
(LivingEntity allay) static Optional
<ServerPlayerEntity> AllayBrain.getLikedPlayer
(LivingEntity allay) private static Optional
<LookTarget> AllayBrain.getLookTarget
(LivingEntity allay) private static float
AxolotlBrain.getTargetApproachingSpeed
(LivingEntity entity) Returns the axolotl's speed when approaching the attack target.private static float
AxolotlBrain.getTemptedSpeed
(LivingEntity entity) Returns the axolotl's speed when the axolotl is being tempted.private static boolean
AllayBrain.hasNearestVisibleWantedItem
(LivingEntity entity) boolean
ArmadilloEntity.isEntityThreatening
(LivingEntity entity) boolean
TameableEntity.isOwner
(LivingEntity entity) static boolean
FrogEntity.isValidFrogFood
(LivingEntity entity) AbstractHorseEntity.locateSafeDismountingPos
(Vec3d offset, LivingEntity passenger) static void
AllayBrain.rememberNoteBlock
(LivingEntity allay, BlockPos pos) void
VillagerEntity.setAttacker
(@Nullable LivingEntity attacker) protected void
BeeEntity.BeeRevengeGoal.setMobEntityTarget
(MobEntity mob, LivingEntity target) protected void
PandaEntity.PandaRevengeGoal.setMobEntityTarget
(MobEntity mob, LivingEntity target) protected void
PolarBearEntity.PolarBearRevengeGoal.setMobEntityTarget
(MobEntity mob, LivingEntity target) void
FoxEntity.setTarget
(@Nullable LivingEntity target) void
PandaEntity.LookAtEntityGoal.setTarget
(LivingEntity target) void
LlamaEntity.shootAt
(LivingEntity target, float pullProgress) void
SnowGolemEntity.shootAt
(LivingEntity target, float pullProgress) private static boolean
AllayBrain.shouldGoTowardsNoteBlock
(LivingEntity allay, Brain<?> brain, GlobalPos pos) private void
LlamaEntity.spitAt
(LivingEntity target) boolean
FoxEntity.WorriableEntityFilter.test
(LivingEntity livingEntity) AbstractHorseEntity.updatePassengerForDismount
(LivingEntity passenger) Returns the position of the dismountedpassenger
.PigEntity.updatePassengerForDismount
(LivingEntity passenger) Returns the position of the dismountedpassenger
.StriderEntity.updatePassengerForDismount
(LivingEntity passenger) Returns the position of the dismountedpassenger
.Modifier and TypeMethodDescriptionstatic boolean
AxolotlEntity.canSpawn
(EntityType<? extends LivingEntity> type, ServerWorldAccess world, SpawnReason reason, BlockPos pos, Random random) static boolean
GlowSquidEntity.canSpawn
(EntityType<? extends LivingEntity> type, ServerWorldAccess world, SpawnReason reason, BlockPos pos, Random random) ModifierConstructorDescriptionDefendFriendGoal
(Class<LivingEntity> targetEntityClass, boolean checkVisibility, boolean checkCanNavigate, @Nullable Predicate<LivingEntity> targetPredicate) DefendFriendGoal
(Class<LivingEntity> targetEntityClass, boolean checkVisibility, boolean checkCanNavigate, @Nullable Predicate<LivingEntity> targetPredicate) LookAtEntityGoal
(MobEntity fox, Class<? extends LivingEntity> targetType, float range) LookAtEntityGoal
(PandaEntity panda, Class<? extends LivingEntity> targetType, float range) -
Uses of LivingEntity in net.minecraft.entity.player
Modifier and TypeMethodDescriptionprotected void
PlayerEntity.attackLivingEntity
(LivingEntity target) boolean
PlayerEntity.onKilledOther
(ServerWorld world, LivingEntity other) Called when this entity killsother
.protected void
PlayerEntity.takeShieldHit
(LivingEntity attacker) -
Uses of LivingEntity in net.minecraft.entity.projectile
Modifier and TypeMethodDescriptionstatic PersistentProjectileEntity
ProjectileUtil.createArrowProjectile
(LivingEntity entity, ItemStack stack, float damageModifier, @Nullable ItemStack bow) static Hand
ProjectileUtil.getHandPossiblyHolding
(LivingEntity entity, Item item) FireworkRocketEntity.getKnockback
(LivingEntity target, DamageSource source) ProjectileEntity.getKnockback
(LivingEntity target, DamageSource source) protected void
PersistentProjectileEntity.knockback
(LivingEntity target, DamageSource source) protected void
ArrowEntity.onHit
(LivingEntity target) protected void
PersistentProjectileEntity.onHit
(LivingEntity target) protected void
SpectralArrowEntity.onHit
(LivingEntity target) ModifierConstructorDescriptionAbstractFireballEntity
(EntityType<? extends AbstractFireballEntity> type, LivingEntity owner, Vec3d velocity, World world) ArrowEntity
(World world, LivingEntity owner, ItemStack stack, @Nullable ItemStack shotFrom) DragonFireballEntity
(World world, LivingEntity owner, Vec3d velocity) ExplosiveProjectileEntity
(EntityType<? extends ExplosiveProjectileEntity> type, LivingEntity owner, Vec3d velocity, World world) FireballEntity
(World world, LivingEntity owner, Vec3d velocity, int explosionPower) FireworkRocketEntity
(World world, ItemStack stack, LivingEntity shooter) protected
PersistentProjectileEntity
(EntityType<? extends PersistentProjectileEntity> type, LivingEntity owner, World world, ItemStack stack, @Nullable ItemStack shotFrom) ShulkerBulletEntity
(World world, LivingEntity owner, Entity target, Direction.Axis axis) SmallFireballEntity
(World world, LivingEntity owner, Vec3d velocity) SpectralArrowEntity
(World world, LivingEntity owner, ItemStack stack, @Nullable ItemStack shotFrom) TridentEntity
(World world, LivingEntity owner, ItemStack stack) WitherSkullEntity
(World world, LivingEntity owner, Vec3d velocity) -
Uses of LivingEntity in net.minecraft.entity.projectile.thrown
Modifier and TypeFieldDescriptionstatic final Predicate
<LivingEntity> PotionEntity.AFFECTED_BY_WATER
Modifier and TypeMethodDescriptionPotionEntity.getKnockback
(LivingEntity target, DamageSource source) ModifierConstructorDescriptionEggEntity
(World world, LivingEntity owner) EnderPearlEntity
(World world, LivingEntity owner) ExperienceBottleEntity
(World world, LivingEntity owner) PotionEntity
(World world, LivingEntity owner) SnowballEntity
(World world, LivingEntity owner) protected
ThrownEntity
(EntityType<? extends ThrownEntity> type, LivingEntity owner, World world) ThrownItemEntity
(EntityType<? extends ThrownItemEntity> type, LivingEntity owner, World world) -
Uses of LivingEntity in net.minecraft.entity.raid
-
Uses of LivingEntity in net.minecraft.entity.vehicle
Modifier and TypeMethodDescriptionBoatEntity.getControllingPassenger()
Returns the passenger in control of this entity, ornull
if there is none.Modifier and TypeMethodDescriptionAbstractMinecartEntity.updatePassengerForDismount
(LivingEntity passenger) Returns the position of the dismountedpassenger
.BoatEntity.updatePassengerForDismount
(LivingEntity passenger) Returns the position of the dismountedpassenger
. -
Uses of LivingEntity in net.minecraft.inventory
Modifier and TypeMethodDescriptionstatic StackReference
StackReference.of
(LivingEntity entity, EquipmentSlot slot) Creates a stack reference backed by an equipment slot of a living entity with no filter, allowing direct manipulation of the equipment slot.static StackReference
StackReference.of
(LivingEntity entity, EquipmentSlot slot, Predicate<ItemStack> filter) Creates a stack reference backed by an equipment slot of a living entity and guarded by a condition for setting stacks into the inventory. -
Uses of LivingEntity in net.minecraft.item
Modifier and TypeMethodDescriptionprivate static Predicate
<LivingEntity> MaceItem.getKnockbackPredicate
(PlayerEntity player, Entity attacked) Modifier and TypeMethodDescriptionprivate static Vector3f
CrossbowItem.calcVelocity
(LivingEntity shooter, Vec3d direction, float yaw) ArrowItem.createArrow
(World world, ItemStack stack, LivingEntity shooter, @Nullable ItemStack shotFrom) SpectralArrowItem.createArrow
(World world, ItemStack stack, LivingEntity shooter, @Nullable ItemStack shotFrom) protected ProjectileEntity
CrossbowItem.createArrowEntity
(World world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) protected ProjectileEntity
RangedWeaponItem.createArrowEntity
(World world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) void
ItemStack.damage
(int amount, LivingEntity entity, EquipmentSlot slot) Damages this item stack.void
ItemStack.decrementUnlessCreative
(int amount, @Nullable LivingEntity entity) Decrements the count of items in this item stack, unlessentity
is a creative mode player.ChorusFruitItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.HoneyBottleItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.Item.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.ItemStack.finishUsing
(World world, LivingEntity user) MilkBucketItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.OminousBottleItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.PotionItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.SpyglassItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.SuspiciousStewItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.static ItemStack
RangedWeaponItem.getHeldProjectile
(LivingEntity entity, Predicate<ItemStack> predicate) private static double
MaceItem.getKnockback
(PlayerEntity player, LivingEntity attacked, Vec3d distance) int
BowItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
BrushItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
CrossbowItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
EnderEyeItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
GoatHornItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
HoneyBottleItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
Item.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
ItemStack.getMaxUseTime
(LivingEntity user) int
MilkBucketItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
OminousBottleItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
PotionItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
ShieldItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
SpyglassItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
TridentItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.protected static ItemStack
RangedWeaponItem.getProjectile
(ItemStack stack, ItemStack projectileStack, LivingEntity shooter, boolean multishot) private static float
CrossbowItem.getPullProgress
(int useTicks, ItemStack stack, LivingEntity user) static int
CrossbowItem.getPullTime
(LivingEntity user) RangedWeaponItem.load
(ItemStack stack, ItemStack projectileStack, LivingEntity shooter) private static boolean
CrossbowItem.loadProjectiles
(LivingEntity shooter, ItemStack crossbow) void
BowItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.void
CrossbowItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.void
Item.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.void
ItemStack.onStoppedUsing
(World world, LivingEntity user, int remainingUseTicks) void
SpyglassItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.void
TridentItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.private void
SpyglassItem.playStopUsingSound
(LivingEntity user) void
Item.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
ItemStack.postDamageEntity
(LivingEntity target, PlayerEntity player) void
MaceItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
MiningToolItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
SwordItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
TridentItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) boolean
Item.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
ItemStack.postHit
(LivingEntity target, PlayerEntity player) boolean
MaceItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
MiningToolItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
SwordItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
TridentItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
Item.postMine
(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) Called on the server when the item is used to break a block.boolean
ShearsItem.postMine
(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) Called on the server when the item is used to break a block.protected void
BowItem.shoot
(LivingEntity shooter, ProjectileEntity projectile, int index, float speed, float divergence, float yaw, @Nullable LivingEntity target) protected void
CrossbowItem.shoot
(LivingEntity shooter, ProjectileEntity projectile, int index, float speed, float divergence, float yaw, @Nullable LivingEntity target) protected abstract void
RangedWeaponItem.shoot
(LivingEntity shooter, ProjectileEntity projectile, int index, float speed, float divergence, float yaw, @Nullable LivingEntity target) void
CrossbowItem.shootAll
(World world, LivingEntity shooter, Hand hand, ItemStack stack, float speed, float divergence, @Nullable LivingEntity target) protected void
RangedWeaponItem.shootAll
(ServerWorld world, LivingEntity shooter, Hand hand, ItemStack stack, List<ItemStack> projectiles, float speed, float divergence, boolean critical, @Nullable LivingEntity target) static boolean
MaceItem.shouldDealAdditionalDamage
(LivingEntity attacker) ItemStack.splitUnlessCreative
(int amount, @Nullable LivingEntity entity) void
BrushItem.usageTick
(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.void
CrossbowItem.usageTick
(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.void
Item.usageTick
(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.void
ItemStack.usageTick
(World world, LivingEntity user, int remainingUseTicks) DyeItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.Item.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.ItemStack.useOnEntity
(PlayerEntity user, LivingEntity entity, Hand hand) NameTagItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.SaddleItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity. -
Uses of LivingEntity in net.minecraft.network.packet.s2c.play
-
Uses of LivingEntity in net.minecraft.predicate.entity
-
Uses of LivingEntity in net.minecraft.screen.slot
ModifierConstructorDescriptionArmorSlot
(Inventory inventory, LivingEntity entity, EquipmentSlot equipmentSlot, int index, int x, int y, @Nullable Identifier backgroundSprite) -
Uses of LivingEntity in net.minecraft.server
Modifier and TypeMethodDescriptionvoid
PlayerManager.sendStatusEffects
(LivingEntity entity, ServerPlayNetworkHandler networkHandler) -
Uses of LivingEntity in net.minecraft.server.command
Modifier and TypeMethodDescriptionprivate static LivingEntity
AttributeCommand.getLivingEntity
(Entity entity) private static LivingEntity
AttributeCommand.getLivingEntityWithAttribute
(Entity entity, RegistryEntry<EntityAttribute> attribute) -
Uses of LivingEntity in net.minecraft.server.network
Modifier and TypeMethodDescriptionDebugInfoSender.listMemories
(LivingEntity entity, long currentTime) static void
DebugInfoSender.sendBrainDebugData
(LivingEntity living) -
Uses of LivingEntity in net.minecraft.test
Modifier and TypeMethodDescription<E extends LivingEntity>
voidTestContext.expectEntityHoldingItem
(BlockPos pos, EntityType<E> entityType, Item item) Modifier and TypeMethodDescriptionTestContext.drown
(LivingEntity entity) TestContext.setHealthLow
(LivingEntity entity) Modifier and TypeMethodDescriptionTestContext.drown
(LivingEntity entity) void
TestContext.expectEntityHasEffect
(LivingEntity entity, RegistryEntry<StatusEffect> effect, int amplifier) TestContext.setHealthLow
(LivingEntity entity) -
Uses of LivingEntity in net.minecraft.world
Modifier and TypeMethodDescriptiondefault <T extends LivingEntity>
TEntityView.getClosestEntity
(Class<? extends T> entityClass, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z, Box box) default <T extends LivingEntity>
TEntityView.getClosestEntity
(List<? extends T> entityList, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z) default <T extends LivingEntity>
List<T> EntityView.getTargets
(Class<T> entityClass, TargetPredicate targetPredicate, LivingEntity targetingEntity, Box box) Modifier and TypeMethodDescriptiondefault <T extends LivingEntity>
TEntityView.getClosestEntity
(Class<? extends T> entityClass, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z, Box box) default <T extends LivingEntity>
TEntityView.getClosestEntity
(List<? extends T> entityList, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(TargetPredicate targetPredicate, LivingEntity entity) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(TargetPredicate targetPredicate, LivingEntity entity, double x, double y, double z) default List
<PlayerEntity> EntityView.getPlayers
(TargetPredicate targetPredicate, LivingEntity entity, Box box) default <T extends LivingEntity>
List<T> EntityView.getTargets
(Class<T> entityClass, TargetPredicate targetPredicate, LivingEntity targetingEntity, Box box) -
Uses of LivingEntity in net.minecraft.world.explosion
Modifier and TypeMethodDescriptionExplosion.getCausingEntity()
private static @Nullable LivingEntity
Explosion.getCausingEntity
(@Nullable Entity from)