Package net.minecraft.world.entity
Class LivingEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
- All Implemented Interfaces:
CommandSource
,Attackable
,EntityAccess
,Nameable
,ScoreHolder
,ICapabilityProvider
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,IForgeLivingEntity
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
ArmorStand
,Mob
,Player
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private final Map<MobEffect,
MobEffectInstance> protected float
protected float
static final int
static final int
float
protected int
private final AttributeMap
protected int
private static final float
protected Brain<?>
private final CombatTracker
private static final int
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Boolean>
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Float>
protected static final EntityDataAccessor<Byte>
private static final EntityDataAccessor<Integer>
protected boolean
static final int
protected int
int
static final double
protected static final float
private boolean
private boolean
static final int
static final float
protected int
private static final int
static final int
private LazyOptional<?>[]
int
int
final int
protected boolean
private final NonNullList<ItemStack>
private DamageSource
private long
private final NonNullList<ItemStack>
protected float
private LivingEntity
private int
protected Player
protected int
private LivingEntity
private int
private BlockPos
protected int
protected int
protected double
protected double
protected double
protected double
protected double
protected double
protected static final int
protected static final int
protected static final int
private static final org.slf4j.Logger
private static final double
static final double
protected int
private int
float
protected float
static final int
int
int
final float
protected float
protected float
private boolean
protected static final EntityDimensions
private static final EntityDataAccessor<Optional<BlockPos>>
private static final AttributeModifier
private static final UUID
private float
private static final UUID
private static final UUID
private static final AttributeModifier
private float
private float
static final int
boolean
int
private static final String
private static final int
final float
static final int
protected ItemStack
protected int
private static final int
final WalkAnimationState
float
float
float
float
float
float
float
Fields inherited from class net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
Fields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
LivingEntity
(EntityType<? extends LivingEntity> p_20966_, Level p_20967_) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
actuallyHurt
(DamageSource p_21240_, float p_21241_) void
addAdditionalSaveData
(CompoundTag p_21145_) private void
addEatEffect
(ItemStack p_21064_, Level p_21065_, LivingEntity p_21066_) final boolean
addEffect
(MobEffectInstance p_21165_) boolean
addEffect
(MobEffectInstance p_147208_, Entity p_147209_) void
aiStep()
void
animateHurt
(float p_265265_) static boolean
areAllEffectsAmbient
(Collection<MobEffectInstance> p_21180_) boolean
void
baseTick()
protected void
blockedByShield
(LivingEntity p_21246_) protected void
blockUsingShield
(LivingEntity p_21200_) protected Brain.Provider<?>
private void
void
broadcastBreakEvent
(EquipmentSlot p_21167_) void
broadcastBreakEvent
(InteractionHand p_21191_) void
calculateEntityAnimation
(boolean p_268129_) protected int
calculateFallDamage
(float p_21237_, float p_21238_) boolean
canAttack
(LivingEntity p_21171_) boolean
canAttack
(LivingEntity p_21041_, TargetingConditions p_21042_) boolean
canAttackType
(EntityType<?> p_21032_) boolean
canBeAffected
(MobEffectInstance p_21197_) boolean
boolean
final boolean
Deprecated.boolean
boolean
boolean
boolean
boolean
canStandOnFluid
(FluidState p_204042_) boolean
canTakeItem
(ItemStack p_21249_) boolean
causeFallDamage
(float p_147187_, float p_147188_, DamageSource p_147189_) protected void
checkAutoSpinAttack
(AABB p_21072_, AABB p_21073_) private boolean
protected void
checkFallDamage
(double p_20990_, boolean p_20991_, BlockState p_20992_, BlockPos p_20993_) private boolean
checkTotemDeathProtection
(DamageSource p_21263_) void
private Map<EquipmentSlot,
ItemStack> protected void
private static SlotAccess
createEquipmentSlotAccess
(LivingEntity p_147196_, EquipmentSlot p_147197_) static AttributeSupplier.Builder
protected void
createWitherRose
(LivingEntity p_21269_) boolean
curePotionEffects
(ItemStack curativeItem) Removes all potion effects that have curativeItem as a curative item for its effectprotected int
decreaseAirSupply
(int p_21303_) protected void
private void
void
die
(DamageSource p_21014_) private void
dismountVehicle
(Entity p_21029_) protected void
doAutoAttackOnTouch
(LivingEntity p_21277_) protected boolean
doesEmitEquipEvent
(EquipmentSlot p_217035_) boolean
doHurtTarget
(Entity p_20970_) protected void
protected void
dropAllDeathLoot
(DamageSource p_21192_) protected void
dropCustomDeathLoot
(DamageSource p_21018_, int p_21019_, boolean p_21020_) protected void
protected void
protected void
dropFromLootTable
(DamageSource p_21021_, boolean p_21022_) private static byte
entityEventForEquipmentBreak
(EquipmentSlot p_21267_) boolean
equipmentHasChanged
(ItemStack p_252265_, ItemStack p_251043_) void
forceAddEffect
(MobEffectInstance p_147216_, Entity p_147217_) float
float
int
final int
float
getAttackAnim
(float p_21325_) getAttribute
(Attribute p_21052_) double
getAttributeBaseValue
(Holder<Attribute> p_248605_) double
getAttributeBaseValue
(Attribute p_21173_) double
getAttributeValue
(Holder<Attribute> p_251296_) double
getAttributeValue
(Attribute p_21134_) protected float
Brain<?>
getBrain()
<T> LazyOptional<T>
getCapability
(Capability<T> capability, Direction facing) Retrieves the Optional handler for the capability requested on the specific side.private int
protected float
getDamageAfterArmorAbsorb
(DamageSource p_21162_, float p_21163_) protected float
getDamageAfterMagicAbsorb
(DamageSource p_21193_, float p_21194_) protected SoundEvent
getDimensions
(Pose p_21047_) com.google.common.collect.ImmutableList<Pose>
protected SoundEvent
getDrinkingSound
(ItemStack p_21174_) getEatingSound
(ItemStack p_21202_) private static EquipmentSlot
getEquipmentSlot
(int p_147212_) static EquipmentSlot
getEquipmentSlotForItem
(ItemStack p_147234_) int
protected final float
getEyeHeight
(Pose p_21049_, EntityDimensions p_21050_) private SoundEvent
getFallDamageSound
(int p_21313_) int
getFluidFallingAdjustedMovement
(double p_20995_, boolean p_20996_, Vec3 p_20997_) protected float
private float
getFrictionInfluencedSpeed
(float p_21331_) float
protected AABB
float
protected SoundEvent
getHurtSound
(DamageSource p_21239_) abstract ItemStack
getItemBySlot
(EquipmentSlot p_21127_) getItemInHand
(InteractionHand p_21121_) float
protected float
private ItemStack
getLastArmorItem
(EquipmentSlot p_21199_) private ItemStack
getLastHandItem
(EquipmentSlot p_21245_) int
int
getLocalBoundsForPose
(Pose p_21271_) long
abstract HumanoidArm
final float
protected float
final float
float
getMyRidingOffset
(Entity p_298892_) int
getPassengerRidingPosition
(Entity p_299288_) getProjectile
(ItemStack p_21272_) protected Vec3
getRelativePortalPosition
(Direction.Axis p_21085_, BlockUtil.FoundRectangle p_21086_) protected Vec3
getRiddenInput
(Player p_278326_, Vec3 p_275300_) protected float
getRiddenSpeed
(Player p_278286_) float
getScale()
getSlot
(int p_147238_) protected float
float
getSpeed()
protected float
getStandingEyeHeight
(Pose p_21131_, EntityDimensions p_21132_) final int
float
getSwimAmount
(float p_20999_) int
int
float
getViewYRot
(float p_21286_) double
getVisibilityPercent
(Entity p_20969_) float
float
protected float
float
protected void
Deprecated.void
handleDamageEvent
(DamageSource p_270229_) void
handleEntityEvent
(byte p_20975_) private void
handleEquipmentChanges
(Map<EquipmentSlot, ItemStack> p_21143_) private void
handleHandSwap
(Map<EquipmentSlot, ItemStack> p_21092_) private Vec3
handleOnClimbable
(Vec3 p_21298_) handleRelativeFrictionAndCalculateMovement
(Vec3 p_21075_, float p_21076_) boolean
boolean
hasItemInSlot
(EquipmentSlot p_21034_) boolean
hasLineOfSight
(Entity p_147185_) void
heal
(float p_21116_) boolean
hurt
(DamageSource p_21016_, float p_21017_) protected void
hurtArmor
(DamageSource p_21122_, float p_21123_) protected void
hurtCurrentlyUsedShield
(float p_21316_) protected void
hurtHelmet
(DamageSource p_147213_, float p_147214_) protected int
increaseAirSupply
(int p_21307_) void
indicateDamage
(double p_270514_, double p_270826_) protected void
internalSetAbsorptionAmount
(float p_299471_) void
protected boolean
boolean
boolean
isAlive()
protected boolean
boolean
boolean
isBaby()
boolean
boolean
boolean
isDamageSourceBlocked
(DamageSource p_21276_) boolean
boolean
boolean
boolean
protected boolean
boolean
boolean
isInWall()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
protected void
protected void
jumpInLiquid
(TagKey<Fluid> p_204043_) Deprecated.void
kill()
void
knockback
(double p_147241_, double p_147242_, double p_147243_) protected void
lerpHeadRotationStep
(int p_297258_, double p_301409_) void
lerpHeadTo
(float p_21005_, int p_21006_) double
float
double
float
double
void
lerpTo
(double p_20977_, double p_20978_, double p_20979_, float p_20980_, float p_20981_, int p_20982_) void
lookAt
(EntityAnchorArgument.Anchor p_21078_, Vec3 p_21079_) protected Brain<?>
makeBrain
(com.mojang.serialization.Dynamic<?> p_21069_) private void
float
private void
onAttributeUpdated
(Attribute p_298194_) protected void
protected void
onChangedBlock
(BlockPos p_21175_) boolean
protected void
onEffectAdded
(MobEffectInstance p_147190_, Entity p_147191_) protected void
onEffectRemoved
(MobEffectInstance p_21126_) protected void
onEffectUpdated
(MobEffectInstance p_147192_, boolean p_147193_, Entity p_147194_) void
void
onEquipItem
(EquipmentSlot p_238393_, ItemStack p_238394_, ItemStack p_238395_) void
onItemPickup
(ItemEntity p_21054_) void
protected boolean
void
onSyncedDataUpdated
(EntityDataAccessor<?> p_21104_) protected void
protected void
playHurtSound
(DamageSource p_21160_) void
protected void
boolean
randomTeleport
(double p_20985_, double p_20986_, double p_20987_, boolean p_20988_) void
readAdditionalSaveData
(CompoundTag p_21096_) void
recreateFromPacket
(ClientboundAddEntityPacket p_217037_) private void
void
void
remove
(Entity.RemovalReason p_276115_) boolean
boolean
removeEffect
(MobEffect p_21196_) removeEffectNoUpdate
(MobEffect p_21164_) protected void
protected void
protected void
static Vec3
void
void
rideTick()
void
sendEffectToPassengers
(MobEffectInstance p_289695_) protected void
final void
setAbsorptionAmount
(float p_21328_) final void
setArrowCount
(int p_21318_) void
setDiscardFriction
(boolean p_147245_) void
setHealth
(float p_21154_) void
setItemInHand
(InteractionHand p_21009_, ItemStack p_21010_) abstract void
setItemSlot
(EquipmentSlot p_21036_, ItemStack p_21037_) void
setJumping
(boolean p_21314_) private void
setLastArmorItem
(EquipmentSlot p_21129_, ItemStack p_21130_) private void
setLastHandItem
(EquipmentSlot p_21169_, ItemStack p_21170_) void
setLastHurtByMob
(LivingEntity p_21039_) void
setLastHurtByPlayer
(Player p_21248_) void
setLastHurtMob
(Entity p_21336_) protected void
setLivingEntityFlag
(int p_21156_, boolean p_21157_) void
setNoActionTime
(int p_21311_) private void
setPosToBed
(BlockPos p_21081_) void
setRecordPlayingNearby
(BlockPos p_21082_, boolean p_21083_) void
setSleepingPos
(BlockPos p_21251_) void
setSpeed
(float p_21320_) void
setSprinting
(boolean p_21284_) final void
setStingerCount
(int p_21322_) void
setYBodyRot
(float p_21309_) void
setYHeadRot
(float p_21306_) boolean
boolean
protected boolean
protected boolean
shouldRemoveSoulSpeed
(BlockState p_21140_) boolean
shouldRiderFaceForward
(Player player) Returns true if the entity's rider (EntityPlayer) should face forward when mounted.boolean
private boolean
void
private void
spawnItemParticles
(ItemStack p_21061_, int p_21062_) protected void
void
startSleeping
(BlockPos p_21141_) void
startUsingItem
(InteractionHand p_21159_) void
void
void
private void
void
swing
(InteractionHand p_21007_) void
swing
(InteractionHand p_21012_, boolean p_21013_) void
void
tick()
protected void
protected void
protected float
tickHeadTurn
(float p_21260_, float p_21261_) protected void
tickRidden
(Player p_278262_, Vec3 p_275242_) private boolean
trapdoorUsableAsLadder
(BlockPos p_21177_, BlockState p_21178_) void
private void
travelRidden
(Player p_278244_, Vec3 p_278231_) protected void
triggerItemUseEffects
(ItemStack p_21138_, int p_21139_) protected void
protected void
protected void
private void
private void
protected void
private void
protected void
protected void
updateUsingItem
(ItemStack p_147201_) protected void
updateWalkAnimation
(float p_268283_) private void
protected void
verifyEquippedItem
(ItemStack p_181123_) boolean
protected boolean
wouldNotSuffocateAtTargetPose
(Pose p_297537_) Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensionsForge, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getName, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killedEntity, lavaHurt, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, refreshDimensions, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, ridingOffset, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateInWaterStateAndDoWaterCurrentPushing, updateSwimming, waterSwimSound
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeHeightForge, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoating
Methods inherited from interface net.minecraftforge.common.extensions.IForgeLivingEntity
canDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, self, sinkInFluid
Methods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TAG_ACTIVE_EFFECTS
- See Also:
-
SPEED_MODIFIER_SOUL_SPEED_UUID
-
SPEED_MODIFIER_POWDER_SNOW_UUID
-
SLOW_FALLING_ID
-
SPEED_MODIFIER_SPRINTING
-
SLOW_FALLING
-
HAND_SLOTS
public static final int HAND_SLOTS- See Also:
-
ARMOR_SLOTS
public static final int ARMOR_SLOTS- See Also:
-
EQUIPMENT_SLOT_OFFSET
public static final int EQUIPMENT_SLOT_OFFSET- See Also:
-
ARMOR_SLOT_OFFSET
public static final int ARMOR_SLOT_OFFSET- See Also:
-
SWING_DURATION
public static final int SWING_DURATION- See Also:
-
PLAYER_HURT_EXPERIENCE_TIME
public static final int PLAYER_HURT_EXPERIENCE_TIME- See Also:
-
DAMAGE_SOURCE_TIMEOUT
private static final int DAMAGE_SOURCE_TIMEOUT- See Also:
-
MIN_MOVEMENT_DISTANCE
public static final double MIN_MOVEMENT_DISTANCE- See Also:
-
DEFAULT_BASE_GRAVITY
public static final double DEFAULT_BASE_GRAVITY- See Also:
-
DEATH_DURATION
public static final int DEATH_DURATION- See Also:
-
WAIT_TICKS_BEFORE_ITEM_USE_EFFECTS
private static final int WAIT_TICKS_BEFORE_ITEM_USE_EFFECTS- See Also:
-
TICKS_PER_ELYTRA_FREE_FALL_EVENT
private static final int TICKS_PER_ELYTRA_FREE_FALL_EVENT- See Also:
-
FREE_FALL_EVENTS_PER_ELYTRA_BREAK
private static final int FREE_FALL_EVENTS_PER_ELYTRA_BREAK- See Also:
-
USE_ITEM_INTERVAL
public static final int USE_ITEM_INTERVAL- See Also:
-
BASE_JUMP_POWER
private static final float BASE_JUMP_POWER- See Also:
-
MAX_LINE_OF_SIGHT_TEST_RANGE
private static final double MAX_LINE_OF_SIGHT_TEST_RANGE- See Also:
-
LIVING_ENTITY_FLAG_IS_USING
protected static final int LIVING_ENTITY_FLAG_IS_USING- See Also:
-
LIVING_ENTITY_FLAG_OFF_HAND
protected static final int LIVING_ENTITY_FLAG_OFF_HAND- See Also:
-
LIVING_ENTITY_FLAG_SPIN_ATTACK
protected static final int LIVING_ENTITY_FLAG_SPIN_ATTACK- See Also:
-
DATA_LIVING_ENTITY_FLAGS
-
DATA_HEALTH_ID
-
DATA_EFFECT_COLOR_ID
-
DATA_EFFECT_AMBIENCE_ID
-
DATA_ARROW_COUNT_ID
-
DATA_STINGER_COUNT_ID
-
SLEEPING_POS_ID
-
DEFAULT_EYE_HEIGHT
protected static final float DEFAULT_EYE_HEIGHT- See Also:
-
SLEEPING_DIMENSIONS
-
EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT
public static final float EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT- See Also:
-
attributes
-
combatTracker
-
activeEffects
-
lastHandItemStacks
-
lastArmorItemStacks
-
swinging
public boolean swinging -
discardFriction
private boolean discardFriction -
swingingArm
-
swingTime
public int swingTime -
removeArrowTime
public int removeArrowTime -
removeStingerTime
public int removeStingerTime -
hurtTime
public int hurtTime -
hurtDuration
public int hurtDuration -
deathTime
public int deathTime -
oAttackAnim
public float oAttackAnim -
attackAnim
public float attackAnim -
attackStrengthTicker
protected int attackStrengthTicker -
walkAnimation
-
invulnerableDuration
public final int invulnerableDuration- See Also:
-
timeOffs
public final float timeOffs -
rotA
public final float rotA -
yBodyRot
public float yBodyRot -
yBodyRotO
public float yBodyRotO -
yHeadRot
public float yHeadRot -
yHeadRotO
public float yHeadRotO -
lastHurtByPlayer
-
lastHurtByPlayerTime
protected int lastHurtByPlayerTime -
dead
protected boolean dead -
noActionTime
protected int noActionTime -
oRun
protected float oRun -
run
protected float run -
animStep
protected float animStep -
animStepO
protected float animStepO -
rotOffs
protected float rotOffs -
deathScore
protected int deathScore -
lastHurt
protected float lastHurt -
jumping
protected boolean jumping -
xxa
public float xxa -
yya
public float yya -
zza
public float zza -
lerpSteps
protected int lerpSteps -
lerpX
protected double lerpX -
lerpY
protected double lerpY -
lerpZ
protected double lerpZ -
lerpYRot
protected double lerpYRot -
lerpXRot
protected double lerpXRot -
lerpYHeadRot
protected double lerpYHeadRot -
lerpHeadSteps
protected int lerpHeadSteps -
effectsDirty
private boolean effectsDirty -
lastHurtByMob
-
lastHurtByMobTimestamp
private int lastHurtByMobTimestamp -
lastHurtMob
-
lastHurtMobTimestamp
private int lastHurtMobTimestamp -
speed
private float speed -
noJumpDelay
private int noJumpDelay -
absorptionAmount
private float absorptionAmount -
useItem
-
useItemRemaining
protected int useItemRemaining -
fallFlyTicks
protected int fallFlyTicks -
lastPos
-
lastClimbablePos
-
lastDamageSource
-
lastDamageStamp
private long lastDamageStamp -
autoSpinAttackTicks
protected int autoSpinAttackTicks -
swimAmount
private float swimAmount -
swimAmountO
private float swimAmountO -
brain
-
skipDropExperience
private boolean skipDropExperience -
handlers
-
-
Constructor Details
-
LivingEntity
-
-
Method Details
-
getBrain
-
brainProvider
-
makeBrain
-
kill
public void kill() -
canAttackType
-
defineSynchedData
protected void defineSynchedData()- Specified by:
defineSynchedData
in classEntity
-
createLivingAttributes
-
checkFallDamage
protected void checkFallDamage(double p_20990_, boolean p_20991_, BlockState p_20992_, BlockPos p_20993_) - Overrides:
checkFallDamage
in classEntity
-
canBreatheUnderwater
Deprecated. -
getSwimAmount
public float getSwimAmount(float p_20999_) -
baseTick
public void baseTick() -
canSpawnSoulSpeedParticle
public boolean canSpawnSoulSpeedParticle() -
spawnSoulSpeedParticle
protected void spawnSoulSpeedParticle() -
onSoulSpeedBlock
protected boolean onSoulSpeedBlock() -
getBlockSpeedFactor
protected float getBlockSpeedFactor()- Overrides:
getBlockSpeedFactor
in classEntity
-
shouldRemoveSoulSpeed
-
removeSoulSpeed
protected void removeSoulSpeed() -
tryAddSoulSpeed
protected void tryAddSoulSpeed() -
removeFrost
protected void removeFrost() -
tryAddFrost
protected void tryAddFrost() -
onChangedBlock
-
isBaby
public boolean isBaby() -
getScale
public float getScale() -
isAffectedByFluids
protected boolean isAffectedByFluids() -
tickDeath
protected void tickDeath() -
shouldDropExperience
public boolean shouldDropExperience() -
shouldDropLoot
protected boolean shouldDropLoot() -
decreaseAirSupply
protected int decreaseAirSupply(int p_21303_) -
increaseAirSupply
protected int increaseAirSupply(int p_21307_) -
getExperienceReward
public int getExperienceReward() -
isAlwaysExperienceDropper
protected boolean isAlwaysExperienceDropper() -
getRandom
-
getLastHurtByMob
-
getLastAttacker
- Specified by:
getLastAttacker
in interfaceAttackable
-
getLastHurtByMobTimestamp
public int getLastHurtByMobTimestamp() -
setLastHurtByPlayer
-
setLastHurtByMob
-
getLastHurtMob
-
getLastHurtMobTimestamp
public int getLastHurtMobTimestamp() -
setLastHurtMob
-
getNoActionTime
public int getNoActionTime() -
setNoActionTime
public void setNoActionTime(int p_21311_) -
shouldDiscardFriction
public boolean shouldDiscardFriction() -
setDiscardFriction
public void setDiscardFriction(boolean p_147245_) -
doesEmitEquipEvent
-
onEquipItem
-
remove
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveData
in classEntity
-
readAdditionalSaveData
- Specified by:
readAdditionalSaveData
in classEntity
-
tickEffects
protected void tickEffects() -
updateInvisibilityStatus
protected void updateInvisibilityStatus() -
updateGlowingStatus
private void updateGlowingStatus() -
getVisibilityPercent
-
canAttack
-
canAttack
-
canBeSeenAsEnemy
public boolean canBeSeenAsEnemy() -
canBeSeenByAnyone
public boolean canBeSeenByAnyone() -
areAllEffectsAmbient
-
removeEffectParticles
protected void removeEffectParticles() -
removeAllEffects
public boolean removeAllEffects() -
getActiveEffects
-
getActiveEffectsMap
-
hasEffect
-
getEffect
-
addEffect
-
addEffect
-
canBeAffected
-
forceAddEffect
-
isInvertedHealAndHarm
public boolean isInvertedHealAndHarm() -
removeEffectNoUpdate
-
removeEffect
-
onEffectAdded
-
sendEffectToPassengers
-
onEffectUpdated
protected void onEffectUpdated(MobEffectInstance p_147192_, boolean p_147193_, @Nullable Entity p_147194_) -
onEffectRemoved
-
refreshDirtyAttributes
private void refreshDirtyAttributes() -
onAttributeUpdated
-
heal
public void heal(float p_21116_) -
getHealth
public float getHealth() -
setHealth
public void setHealth(float p_21154_) -
isDeadOrDying
public boolean isDeadOrDying() -
hurt
-
blockUsingShield
-
blockedByShield
-
checkTotemDeathProtection
-
getLastDamageSource
-
playHurtSound
-
isDamageSourceBlocked
-
breakItem
-
die
-
createWitherRose
-
dropAllDeathLoot
-
dropEquipment
protected void dropEquipment() -
dropExperience
protected void dropExperience() -
dropCustomDeathLoot
-
getLootTable
-
getLootTableSeed
public long getLootTableSeed() -
dropFromLootTable
-
knockback
public void knockback(double p_147241_, double p_147242_, double p_147243_) -
indicateDamage
public void indicateDamage(double p_270514_, double p_270826_) -
getHurtSound
-
getDeathSound
-
getFallDamageSound
-
skipDropExperience
public void skipDropExperience() -
wasExperienceConsumed
public boolean wasExperienceConsumed() -
getHurtDir
public float getHurtDir() -
getHitbox
-
getFallSounds
-
getDrinkingSound
-
getEatingSound
-
getLastClimbablePos
-
onClimbable
public boolean onClimbable() -
trapdoorUsableAsLadder
-
isAlive
public boolean isAlive() -
causeFallDamage
- Overrides:
causeFallDamage
in classEntity
-
calculateFallDamage
protected int calculateFallDamage(float p_21237_, float p_21238_) -
playBlockFallSound
protected void playBlockFallSound() -
animateHurt
public void animateHurt(float p_265265_) - Overrides:
animateHurt
in classEntity
-
getArmorValue
public int getArmorValue() -
hurtArmor
-
hurtHelmet
-
hurtCurrentlyUsedShield
protected void hurtCurrentlyUsedShield(float p_21316_) -
getDamageAfterArmorAbsorb
-
getDamageAfterMagicAbsorb
-
actuallyHurt
-
getCombatTracker
-
getKillCredit
-
getMaxHealth
public final float getMaxHealth() -
getMaxAbsorption
public final float getMaxAbsorption() -
getArrowCount
public final int getArrowCount() -
setArrowCount
public final void setArrowCount(int p_21318_) -
getStingerCount
public final int getStingerCount() -
setStingerCount
public final void setStingerCount(int p_21322_) -
getCurrentSwingDuration
private int getCurrentSwingDuration() -
swing
-
swing
-
handleDamageEvent
- Overrides:
handleDamageEvent
in classEntity
-
handleEntityEvent
public void handleEntityEvent(byte p_20975_) - Overrides:
handleEntityEvent
in classEntity
-
makePoofParticles
private void makePoofParticles() -
swapHandItems
private void swapHandItems() -
onBelowWorld
protected void onBelowWorld()- Overrides:
onBelowWorld
in classEntity
-
updateSwingTime
protected void updateSwingTime() -
getAttribute
-
getAttributeValue
-
getAttributeValue
-
getAttributeBaseValue
-
getAttributeBaseValue
-
getAttributes
-
getMobType
-
getMainHandItem
-
getOffhandItem
-
isHolding
-
isHolding
-
getItemInHand
-
setItemInHand
-
hasItemInSlot
-
getArmorSlots
- Overrides:
getArmorSlots
in classEntity
-
getItemBySlot
-
setItemSlot
- Overrides:
setItemSlot
in classEntity
-
verifyEquippedItem
-
getArmorCoverPercentage
public float getArmorCoverPercentage() -
setSprinting
public void setSprinting(boolean p_21284_) - Overrides:
setSprinting
in classEntity
-
getSoundVolume
protected float getSoundVolume() -
getVoicePitch
public float getVoicePitch() -
isImmobile
protected boolean isImmobile() -
push
-
dismountVehicle
-
shouldShowName
public boolean shouldShowName()- Overrides:
shouldShowName
in classEntity
-
getJumpPower
protected float getJumpPower() -
getJumpBoostPower
public float getJumpBoostPower() -
jumpFromGround
protected void jumpFromGround() -
goDownInWater
Deprecated. -
jumpInLiquid
Deprecated. -
getWaterSlowDown
protected float getWaterSlowDown() -
canStandOnFluid
-
travel
-
travelRidden
-
tickRidden
-
getRiddenInput
-
getRiddenSpeed
-
calculateEntityAnimation
public void calculateEntityAnimation(boolean p_268129_) -
updateWalkAnimation
protected void updateWalkAnimation(float p_268283_) -
handleRelativeFrictionAndCalculateMovement
-
getFluidFallingAdjustedMovement
-
handleOnClimbable
-
getFrictionInfluencedSpeed
private float getFrictionInfluencedSpeed(float p_21331_) -
getFlyingSpeed
protected float getFlyingSpeed() -
getSpeed
public float getSpeed() -
setSpeed
public void setSpeed(float p_21320_) -
doHurtTarget
-
tick
public void tick() -
detectEquipmentUpdates
private void detectEquipmentUpdates() -
collectEquipmentChanges
-
equipmentHasChanged
-
handleHandSwap
-
handleEquipmentChanges
-
getLastArmorItem
-
setLastArmorItem
-
getLastHandItem
-
setLastHandItem
-
tickHeadTurn
protected float tickHeadTurn(float p_21260_, float p_21261_) -
getMaxHeadRotationRelativeToBody
protected float getMaxHeadRotationRelativeToBody() -
aiStep
public void aiStep() -
isSensitiveToWater
public boolean isSensitiveToWater() -
updateFallFlying
private void updateFallFlying() -
serverAiStep
protected void serverAiStep() -
pushEntities
protected void pushEntities() -
checkAutoSpinAttack
-
doPush
-
doAutoAttackOnTouch
-
isAutoSpinAttack
public boolean isAutoSpinAttack() -
stopRiding
public void stopRiding()- Overrides:
stopRiding
in classEntity
-
rideTick
public void rideTick() -
lerpTo
public void lerpTo(double p_20977_, double p_20978_, double p_20979_, float p_20980_, float p_20981_, int p_20982_) -
lerpTargetX
public double lerpTargetX()- Overrides:
lerpTargetX
in classEntity
-
lerpTargetY
public double lerpTargetY()- Overrides:
lerpTargetY
in classEntity
-
lerpTargetZ
public double lerpTargetZ()- Overrides:
lerpTargetZ
in classEntity
-
lerpTargetXRot
public float lerpTargetXRot()- Overrides:
lerpTargetXRot
in classEntity
-
lerpTargetYRot
public float lerpTargetYRot()- Overrides:
lerpTargetYRot
in classEntity
-
lerpHeadTo
public void lerpHeadTo(float p_21005_, int p_21006_) - Overrides:
lerpHeadTo
in classEntity
-
setJumping
public void setJumping(boolean p_21314_) -
onItemPickup
-
take
-
hasLineOfSight
-
getViewYRot
public float getViewYRot(float p_21286_) - Overrides:
getViewYRot
in classEntity
-
getAttackAnim
public float getAttackAnim(float p_21325_) -
isPickable
public boolean isPickable()- Overrides:
isPickable
in classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushable
in classEntity
-
getYHeadRot
public float getYHeadRot()- Overrides:
getYHeadRot
in classEntity
-
setYHeadRot
public void setYHeadRot(float p_21306_) - Overrides:
setYHeadRot
in classEntity
-
setYBodyRot
public void setYBodyRot(float p_21309_) - Overrides:
setYBodyRot
in classEntity
-
getRelativePortalPosition
protected Vec3 getRelativePortalPosition(Direction.Axis p_21085_, BlockUtil.FoundRectangle p_21086_) - Overrides:
getRelativePortalPosition
in classEntity
-
resetForwardDirectionOfRelativePortalPosition
-
getAbsorptionAmount
public float getAbsorptionAmount() -
setAbsorptionAmount
public final void setAbsorptionAmount(float p_21328_) -
internalSetAbsorptionAmount
protected void internalSetAbsorptionAmount(float p_299471_) -
onEnterCombat
public void onEnterCombat() -
onLeaveCombat
public void onLeaveCombat() -
updateEffectVisibility
protected void updateEffectVisibility() -
getMainArm
-
isUsingItem
public boolean isUsingItem() -
getUsedItemHand
-
updatingUsingItem
private void updatingUsingItem() -
updateUsingItem
-
shouldTriggerItemUseEffects
private boolean shouldTriggerItemUseEffects() -
updateSwimAmount
private void updateSwimAmount() -
setLivingEntityFlag
protected void setLivingEntityFlag(int p_21156_, boolean p_21157_) -
startUsingItem
-
onSyncedDataUpdated
- Overrides:
onSyncedDataUpdated
in classEntity
-
lookAt
-
triggerItemUseEffects
-
spawnItemParticles
-
completeUsingItem
protected void completeUsingItem() -
getUseItem
-
getUseItemRemainingTicks
public int getUseItemRemainingTicks() -
getTicksUsingItem
public int getTicksUsingItem() -
releaseUsingItem
public void releaseUsingItem() -
stopUsingItem
public void stopUsingItem() -
isBlocking
public boolean isBlocking() -
isSuppressingSlidingDownLadder
public boolean isSuppressingSlidingDownLadder() -
isFallFlying
public boolean isFallFlying() -
isVisuallySwimming
public boolean isVisuallySwimming()- Overrides:
isVisuallySwimming
in classEntity
-
getFallFlyingTicks
public int getFallFlyingTicks() -
randomTeleport
public boolean randomTeleport(double p_20985_, double p_20986_, double p_20987_, boolean p_20988_) -
isAffectedByPotions
public boolean isAffectedByPotions() -
attackable
public boolean attackable() -
setRecordPlayingNearby
-
canTakeItem
-
getDimensions
- Overrides:
getDimensions
in classEntity
-
getDismountPoses
-
getLocalBoundsForPose
-
wouldNotSuffocateAtTargetPose
-
canChangeDimensions
public boolean canChangeDimensions()- Overrides:
canChangeDimensions
in classEntity
-
getSleepingPos
-
setSleepingPos
-
clearSleepingPos
public void clearSleepingPos() -
isSleeping
public boolean isSleeping() -
startSleeping
-
setPosToBed
-
checkBedExists
private boolean checkBedExists() -
stopSleeping
public void stopSleeping() -
getBedOrientation
-
isInWall
public boolean isInWall() -
getEyeHeight
- Overrides:
getEyeHeight
in classEntity
-
getStandingEyeHeight
-
getProjectile
-
eat
-
addEatEffect
-
entityEventForEquipmentBreak
-
broadcastBreakEvent
-
broadcastBreakEvent
-
curePotionEffects
Removes all potion effects that have curativeItem as a curative item for its effect- Parameters:
curativeItem
- The itemstack we are using to cure potion effects
-
shouldRiderFaceForward
Returns true if the entity's rider (EntityPlayer) should face forward when mounted. currently only used in vanilla code by pigs.- Parameters:
player
- The player who is riding the entity.- Returns:
- If the player should orient the same direction as this entity.
-
getCapability
Description copied from interface:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapability
in interfaceICapabilityProvider
- Overrides:
getCapability
in classCapabilityProvider<Entity>
- Parameters:
capability
- The capability to checkfacing
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- Returns:
- The requested an optional holding the requested capability.
-
invalidateCaps
public void invalidateCaps()- Specified by:
invalidateCaps
in interfaceICapabilityProviderImpl<Entity>
- Overrides:
invalidateCaps
in classCapabilityProvider<Entity>
-
reviveCaps
public void reviveCaps()- Specified by:
reviveCaps
in interfaceICapabilityProviderImpl<Entity>
- Overrides:
reviveCaps
in classCapabilityProvider<Entity>
-
getBoundingBoxForCulling
- Overrides:
getBoundingBoxForCulling
in classEntity
-
getEquipmentSlotForItem
-
createEquipmentSlotAccess
private static SlotAccess createEquipmentSlotAccess(LivingEntity p_147196_, EquipmentSlot p_147197_) -
getEquipmentSlot
-
getSlot
-
canFreeze
public boolean canFreeze() -
isCurrentlyGlowing
public boolean isCurrentlyGlowing()- Overrides:
isCurrentlyGlowing
in classEntity
-
getVisualRotationYInDegrees
public float getVisualRotationYInDegrees()- Overrides:
getVisualRotationYInDegrees
in classEntity
-
recreateFromPacket
- Overrides:
recreateFromPacket
in classEntity
-
canDisableShield
public boolean canDisableShield() -
maxUpStep
public float maxUpStep() -
getPassengerRidingPosition
- Overrides:
getPassengerRidingPosition
in classEntity
-
getMyRidingOffset
- Overrides:
getMyRidingOffset
in classEntity
-
lerpHeadRotationStep
protected void lerpHeadRotationStep(int p_297258_, double p_301409_)
-