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,EntityAccess,Nameable,ICapabilityProvider,ICapabilitySerializable<CompoundTag>,IForgeEntity,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
ArmorStand,EntityRendererEventsTest.MyEntity,Mob,Player
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate Map<MobEffect,MobEffectInstance>floatfloatfloatprotected floatprotected floatstatic intstatic intfloatprotected intprivate AttributeMapprotected intprotected Brain<?>private CombatTrackerprivate static intprivate static EntityDataAccessor<Integer>private static EntityDataAccessor<Boolean>private static EntityDataAccessor<Integer>private static EntityDataAccessor<Float>protected static EntityDataAccessor<Byte>private static EntityDataAccessor<Integer>protected booleanstatic intprotected intintstatic doubleprotected static floatprivate booleanprivate booleanstatic intstatic floatprotected intfloatprivate static intstatic intprivate LazyOptional<?>[]floatintintintprotected booleanprivate NonNullList<ItemStack>private DamageSourceprivate longprivate NonNullList<ItemStack>protected floatprivate LivingEntityprivate intprotected Playerprotected intprivate LivingEntityprivate intprivate BlockPosprotected intprotected intprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected static intprotected static intprotected static intprotected doubleprivate static doublestatic doubleprotected intprivate intfloatprotected floatstatic intintintfloatprotected floatprotected floatprotected static EntityDimensionsprivate static EntityDataAccessor<Optional<BlockPos>>private static AttributeModifierprivate static UUIDprivate floatprivate static UUIDprivate static UUIDprivate static AttributeModifierprivate static UUIDprivate floatprivate floatstatic intbooleanintprivate static intfloatstatic intprotected ItemStackprotected intprivate static intfloatfloatfloatfloatfloatfloatfloatFields 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, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, fluidOnEyes, flyDist, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, level, LOGGER, MAX_ENTITY_TAG_COUNT, maxUpStep, moveDist, noCulling, noPhysics, onGround, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOldFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLivingEntity(EntityType<? extends LivingEntity> p_20966_, Level p_20967_) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactuallyHurt(DamageSource p_21240_, float p_21241_)voidaddAdditionalSaveData(CompoundTag p_21145_)private voidaddEatEffect(ItemStack p_21064_, Level p_21065_, LivingEntity p_21066_)booleanaddEffect(MobEffectInstance p_21165_)booleanaddEffect(MobEffectInstance p_147208_, Entity p_147209_)voidaiStep()voidstatic booleanareAllEffectsAmbient(Collection<MobEffectInstance> p_21180_)booleanvoidbaseTick()protected voidblockedByShield(LivingEntity p_21246_)protected voidblockUsingShield(LivingEntity p_21200_)protected Brain.Provider<?>private voidvoidbroadcastBreakEvent(EquipmentSlot p_21167_)voidbroadcastBreakEvent(InteractionHand p_21191_)voidcalculateEntityAnimation(LivingEntity p_21044_, boolean p_21045_)protected intcalculateFallDamage(float p_21237_, float p_21238_)booleancanAttack(LivingEntity p_21171_)booleancanAttack(LivingEntity p_21041_, TargetingConditions p_21042_)booleancanAttackType(EntityType<?> p_21032_)booleancanBeAffected(MobEffectInstance p_21197_)booleanbooleanbooleanbooleanbooleanbooleancanStandOnFluid(Fluid p_21070_)booleancanTakeItem(ItemStack p_21249_)booleancauseFallDamage(float p_147187_, float p_147188_, DamageSource p_147189_)protected voidcheckAutoSpinAttack(AABB p_21072_, AABB p_21073_)private booleanprotected voidcheckFallDamage(double p_20990_, boolean p_20991_, BlockState p_20992_, BlockPos p_20993_)private booleancheckTotemDeathProtection(DamageSource p_21263_)voidprivate Map<EquipmentSlot,ItemStack>protected voidprivate static SlotAccesscreateEquipmentSlotAccess(LivingEntity p_147196_, EquipmentSlot p_147197_)static AttributeSupplier.Builderprotected LootContext.BuildercreateLootContext(boolean p_21105_, DamageSource p_21106_)protected voidcreateWitherRose(LivingEntity p_21269_)booleancurePotionEffects(ItemStack curativeItem)Removes all potion effects that have curativeItem as a curative item for its effectprotected intdecreaseAirSupply(int p_21303_)protected voidprivate voidvoiddie(DamageSource p_21014_)private voiddismountVehicle(Entity p_21029_)protected voiddoAutoAttackOnTouch(LivingEntity p_21277_)booleandoHurtTarget(Entity p_20970_)protected voidprotected voiddropAllDeathLoot(DamageSource p_21192_)protected voiddropCustomDeathLoot(DamageSource p_21018_, int p_21019_, boolean p_21020_)protected voidprotected voidprotected voiddropFromLootTable(DamageSource p_21021_, boolean p_21022_)private static byteentityEventForEquipmentBreak(EquipmentSlot p_21267_)protected voidequipEventAndSound(ItemStack p_147219_)voidforceAddEffect(MobEffectInstance p_147216_, Entity p_147217_)floatPacket<?>floatintintfloatgetAttackAnim(float p_21325_)getAttribute(Attribute p_21052_)doublegetAttributeBaseValue(Attribute p_21173_)doublegetAttributeValue(Attribute p_21134_)protected floatBrain<?>getBrain()<T> LazyOptional<T>getCapability(Capability<T> capability, Direction facing)Retrieves the Optional handler for the capability requested on the specific side.private intprotected floatgetDamageAfterArmorAbsorb(DamageSource p_21162_, float p_21163_)protected floatgetDamageAfterMagicAbsorb(DamageSource p_21193_, float p_21194_)protected SoundEventgetDimensions(Pose p_21047_)com.google.common.collect.ImmutableList<Pose>protected SoundEventgetDrinkingSound(ItemStack p_21174_)getEatingSound(ItemStack p_21202_)private static EquipmentSlotgetEquipmentSlot(int p_147212_)static EquipmentSlotgetEquipmentSlotForItem(ItemStack p_147234_)protected intgetExperienceReward(Player p_21201_)protected floatgetEyeHeight(Pose p_21049_, EntityDimensions p_21050_)protected SoundEventgetFallDamageSound(int p_21313_)intgetFluidFallingAdjustedMovement(double p_20995_, boolean p_20996_, Vec3 p_20997_)private floatgetFrictionInfluencedSpeed(float p_21331_)floatprotected SoundEventgetHurtSound(DamageSource p_21239_)abstract ItemStackgetItemBySlot(EquipmentSlot p_21127_)getItemInHand(InteractionHand p_21121_)doubleprotected floatprivate ItemStackgetLastArmorItem(EquipmentSlot p_21199_)private ItemStackgetLastHandItem(EquipmentSlot p_21245_)intintgetLocalBoundsForPose(Pose p_21271_)abstract HumanoidArmfloatintgetProjectile(ItemStack p_21272_)protected Vec3getRelativePortalPosition(Direction.Axis p_21085_, BlockUtil.FoundRectangle p_21086_)floatgetScale()getSlot(int p_147238_)protected floatfloatgetSpeed()protected floatgetStandingEyeHeight(Pose p_21131_, EntityDimensions p_21132_)intfloatgetSwimAmount(float p_20999_)intintfloatgetViewYRot(float p_21286_)doublegetVisibilityPercent(Entity p_20969_)floatprotected floatfloatprotected voidvoidhandleEntityEvent(byte p_20975_)private voidhandleEquipmentChanges(Map<EquipmentSlot,ItemStack> p_21143_)private voidhandleHandSwap(Map<EquipmentSlot,ItemStack> p_21092_)private Vec3handleOnClimbable(Vec3 p_21298_)handleRelativeFrictionAndCalculateMovement(Vec3 p_21075_, float p_21076_)booleanbooleanhasItemInSlot(EquipmentSlot p_21034_)booleanhasLineOfSight(Entity p_147185_)voidheal(float p_21116_)booleanhurt(DamageSource p_21016_, float p_21017_)protected voidhurtArmor(DamageSource p_21122_, float p_21123_)protected voidhurtCurrentlyUsedShield(float p_21316_)protected voidhurtHelmet(DamageSource p_147213_, float p_147214_)protected intincreaseAirSupply(int p_21307_)voidprotected booleanbooleanbooleanisAlive()protected booleanbooleanbooleanisBaby()booleanbooleanbooleanisDamageSourceBlocked(DamageSource p_21276_)booleanbooleanbooleanbooleanbooleanprotected booleanbooleanbooleanisInWall()booleanbooleanbooleanbooleanbooleanbooleanbooleanprotected voidprotected voidjumpInLiquid(Tag<Fluid> p_21158_)voidkill()voidknockback(double p_147241_, double p_147242_, double p_147243_)voidlerpHeadTo(float p_21005_, int p_21006_)voidlerpTo(double p_20977_, double p_20978_, double p_20979_, float p_20980_, float p_20981_, int p_20982_, boolean p_20983_)voidlookAt(EntityAnchorArgument.Anchor p_21078_, Vec3 p_21079_)protected Brain<?>makeBrain(com.mojang.serialization.Dynamic<?> p_21069_)private voidprotected voidmarkHurt()protected voidonChangedBlock(BlockPos p_21175_)booleanprotected voidonEffectAdded(MobEffectInstance p_147190_, Entity p_147191_)protected voidonEffectRemoved(MobEffectInstance p_21126_)protected voidonEffectUpdated(MobEffectInstance p_147192_, boolean p_147193_, Entity p_147194_)voidvoidonItemPickup(ItemEntity p_21054_)voidprotected booleanvoidonSyncedDataUpdated(EntityDataAccessor<?> p_21104_)protected voidprotected voidprotected voidplayHurtSound(DamageSource p_21160_)voidprotected voidbooleanrandomTeleport(double p_20985_, double p_20986_, double p_20987_, boolean p_20988_)voidreadAdditionalSaveData(CompoundTag p_21096_)voidrecreateFromPacket(ClientboundAddMobPacket p_147206_)voidbooleanbooleanremoveEffect(MobEffect p_21196_)removeEffectNoUpdate(MobEffect p_21164_)protected voidprotected voidprotected voidstatic Vec3voidbooleanvoidrideTick()protected voidvoidsetAbsorptionAmount(float p_21328_)voidsetArrowCount(int p_21318_)voidsetDiscardFriction(boolean p_147245_)voidsetHealth(float p_21154_)voidsetItemInHand(InteractionHand p_21009_, ItemStack p_21010_)abstract voidsetItemSlot(EquipmentSlot p_21036_, ItemStack p_21037_)voidsetJumping(boolean p_21314_)private voidsetLastArmorItem(EquipmentSlot p_21129_, ItemStack p_21130_)private voidsetLastHandItem(EquipmentSlot p_21169_, ItemStack p_21170_)voidsetLastHurtByMob(LivingEntity p_21039_)voidsetLastHurtByPlayer(Player p_21248_)voidsetLastHurtMob(Entity p_21336_)protected voidsetLivingEntityFlag(int p_21156_, boolean p_21157_)voidsetNoActionTime(int p_21311_)voidsetOnGround(boolean p_21182_)private voidsetPosToBed(BlockPos p_21081_)voidsetRecordPlayingNearby(BlockPos p_21082_, boolean p_21083_)voidsetSleepingPos(BlockPos p_21251_)voidsetSpeed(float p_21320_)voidsetSprinting(boolean p_21284_)voidsetStingerCount(int p_21322_)voidsetYBodyRot(float p_21309_)voidsetYHeadRot(float p_21306_)booleanprotected booleanprotected booleanprotected booleanshouldRemoveSoulSpeed(BlockState p_21140_)booleanshouldRiderFaceForward(Player player)Returns true if the entity's rider (EntityPlayer) should face forward when mounted.booleanprivate booleanprivate voidspawnItemParticles(ItemStack p_21061_, int p_21062_)protected voidvoidstartAutoSpinAttack(int p_21327_)voidstartSleeping(BlockPos p_21141_)voidstartUsingItem(InteractionHand p_21159_)voidvoidvoidprivate voidvoidswing(InteractionHand p_21007_)voidswing(InteractionHand p_21012_, boolean p_21013_)voidvoidtick()protected voidprotected voidprotected floattickHeadTurn(float p_21260_, float p_21261_)private booleantrapdoorUsableAsLadder(BlockPos p_21177_, BlockState p_21178_)voidprotected voidtriggerItemUseEffects(ItemStack p_21138_, int p_21139_)protected voidprotected voidprotected voidprivate voidprivate voidprotected voidprivate voidprotected voidprotected voidupdateUsingItem(ItemStack p_147201_)private voidprotected voidverifyEquippedItem(ItemStack p_181123_)Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, checkInsideBlocks, checkOutOfWorld, chunkPosition, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, discard, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, eyeBlockPosition, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, gameEvent, gameEvent, gameEvent, gameEvent, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getForward, getGameEventListenerRegistrar, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMovementEmission, getMyRidingOffset, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersAndSelf, getPassengersRidingOffset, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, 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, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFullyFrozen, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killed, lavaHurt, lerpMotion, limitPistonMovement, load, makeBoundingBox, makeStuckInBlock, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, occludesVibrations, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, pick, playEntityOnFireExtinguishedSound, playerTouch, playSound, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, recreateFromPacket, refreshDimensions, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevelCallback, setNoGravity, setOldPosAndRot, setPacketCoordinates, setPacketCoordinates, 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, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateInWaterStateAndDoWaterCurrentPushing, updateSwimmingMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
Field Details
-
SPEED_MODIFIER_SPRINTING_UUID
-
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:
- Constant Field Values
-
ARMOR_SLOTS
public static final int ARMOR_SLOTS- See Also:
- Constant Field Values
-
EQUIPMENT_SLOT_OFFSET
public static final int EQUIPMENT_SLOT_OFFSET- See Also:
- Constant Field Values
-
ARMOR_SLOT_OFFSET
public static final int ARMOR_SLOT_OFFSET- See Also:
- Constant Field Values
-
SWING_DURATION
public static final int SWING_DURATION- See Also:
- Constant Field Values
-
PLAYER_HURT_EXPERIENCE_TIME
public static final int PLAYER_HURT_EXPERIENCE_TIME- See Also:
- Constant Field Values
-
DAMAGE_SOURCE_TIMEOUT
private static final int DAMAGE_SOURCE_TIMEOUT- See Also:
- Constant Field Values
-
MIN_MOVEMENT_DISTANCE
public static final double MIN_MOVEMENT_DISTANCE- See Also:
- Constant Field Values
-
DEFAULT_BASE_GRAVITY
public static final double DEFAULT_BASE_GRAVITY- See Also:
- Constant Field Values
-
DEATH_DURATION
public static final int DEATH_DURATION- See Also:
- Constant Field Values
-
WAIT_TICKS_BEFORE_ITEM_USE_EFFECTS
private static final int WAIT_TICKS_BEFORE_ITEM_USE_EFFECTS- See Also:
- Constant Field Values
-
TICKS_PER_ELYTRA_FREE_FALL_EVENT
private static final int TICKS_PER_ELYTRA_FREE_FALL_EVENT- See Also:
- Constant Field Values
-
FREE_FALL_EVENTS_PER_ELYTRA_BREAK
private static final int FREE_FALL_EVENTS_PER_ELYTRA_BREAK- See Also:
- Constant Field Values
-
USE_ITEM_INTERVAL
public static final int USE_ITEM_INTERVAL- See Also:
- Constant Field Values
-
MAX_LINE_OF_SIGHT_TEST_RANGE
private static final double MAX_LINE_OF_SIGHT_TEST_RANGE- See Also:
- Constant Field Values
-
LIVING_ENTITY_FLAG_IS_USING
protected static final int LIVING_ENTITY_FLAG_IS_USING- See Also:
- Constant Field Values
-
LIVING_ENTITY_FLAG_OFF_HAND
protected static final int LIVING_ENTITY_FLAG_OFF_HAND- See Also:
- Constant Field Values
-
LIVING_ENTITY_FLAG_SPIN_ATTACK
protected static final int LIVING_ENTITY_FLAG_SPIN_ATTACK- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
SLEEPING_DIMENSIONS
-
EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT
public static final float EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT- See Also:
- Constant Field Values
-
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 -
hurtDir
public float hurtDir -
deathTime
public int deathTime -
oAttackAnim
public float oAttackAnim -
attackAnim
public float attackAnim -
attackStrengthTicker
protected int attackStrengthTicker -
animationSpeedOld
public float animationSpeedOld -
animationSpeed
public float animationSpeed -
animationPosition
public float animationPosition -
invulnerableDuration
public final int invulnerableDuration- See Also:
- Constant Field Values
-
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 -
flyingSpeed
public float flyingSpeed -
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 -
lyHeadRot
protected double lyHeadRot -
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
-
handlers
-
-
Constructor Details
-
LivingEntity
-
-
Method Details
-
getBrain
-
brainProvider
-
makeBrain
-
kill
public void kill() -
canAttackType
-
defineSynchedData
protected void defineSynchedData()- Specified by:
defineSynchedDatain classEntity
-
createLivingAttributes
-
checkFallDamage
protected void checkFallDamage(double p_20990_, boolean p_20991_, BlockState p_20992_, BlockPos p_20993_)- Overrides:
checkFallDamagein classEntity
-
canBreatheUnderwater
public boolean canBreatheUnderwater() -
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:
getBlockSpeedFactorin 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() -
rideableUnderWater
public boolean rideableUnderWater()- Overrides:
rideableUnderWaterin classEntity
-
tickDeath
protected void tickDeath() -
shouldDropExperience
protected boolean shouldDropExperience() -
shouldDropLoot
protected boolean shouldDropLoot() -
decreaseAirSupply
protected int decreaseAirSupply(int p_21303_) -
increaseAirSupply
protected int increaseAirSupply(int p_21307_) -
getExperienceReward
-
isAlwaysExperienceDropper
protected boolean isAlwaysExperienceDropper() -
getRandom
-
getLastHurtByMob
-
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_) -
equipEventAndSound
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveDatain classEntity
-
readAdditionalSaveData
- Specified by:
readAdditionalSaveDatain 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
-
onEffectUpdated
protected void onEffectUpdated(MobEffectInstance p_147192_, boolean p_147193_, @Nullable Entity p_147194_) -
onEffectRemoved
-
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
-
dropFromLootTable
-
createLootContext
-
knockback
public void knockback(double p_147241_, double p_147242_, double p_147243_) -
getHurtSound
-
getDeathSound
-
getFallDamageSound
-
getDrinkingSound
-
getEatingSound
-
setOnGround
public void setOnGround(boolean p_21182_)- Overrides:
setOnGroundin classEntity
-
getLastClimbablePos
-
onClimbable
public boolean onClimbable() -
trapdoorUsableAsLadder
-
isAlive
public boolean isAlive() -
causeFallDamage
- Overrides:
causeFallDamagein classEntity
-
calculateFallDamage
protected int calculateFallDamage(float p_21237_, float p_21238_) -
playBlockFallSound
protected void playBlockFallSound() -
animateHurt
public void animateHurt()- Overrides:
animateHurtin classEntity
-
getArmorValue
public int getArmorValue() -
hurtArmor
-
hurtHelmet
-
hurtCurrentlyUsedShield
protected void hurtCurrentlyUsedShield(float p_21316_) -
getDamageAfterArmorAbsorb
-
getDamageAfterMagicAbsorb
-
actuallyHurt
-
getCombatTracker
-
getKillCredit
-
getMaxHealth
public final float getMaxHealth() -
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
-
handleEntityEvent
public void handleEntityEvent(byte p_20975_)- Overrides:
handleEntityEventin classEntity
-
makePoofParticles
private void makePoofParticles() -
swapHandItems
private void swapHandItems() -
outOfWorld
protected void outOfWorld()- Overrides:
outOfWorldin classEntity
-
updateSwingTime
protected void updateSwingTime() -
getAttribute
-
getAttributeValue
-
getAttributeBaseValue
-
getAttributes
-
getMobType
-
getMainHandItem
-
getOffhandItem
-
isHolding
-
isHolding
-
getItemInHand
-
setItemInHand
-
hasItemInSlot
-
getArmorSlots
- Overrides:
getArmorSlotsin classEntity
-
getItemBySlot
-
setItemSlot
- Overrides:
setItemSlotin classEntity
-
verifyEquippedItem
-
getArmorCoverPercentage
public float getArmorCoverPercentage() -
setSprinting
public void setSprinting(boolean p_21284_)- Overrides:
setSprintingin classEntity
-
getSoundVolume
protected float getSoundVolume() -
getVoicePitch
public float getVoicePitch() -
isImmobile
protected boolean isImmobile() -
push
-
dismountVehicle
-
shouldShowName
public boolean shouldShowName()- Overrides:
shouldShowNamein classEntity
-
getJumpPower
protected float getJumpPower() -
getJumpBoostPower
public double getJumpBoostPower() -
jumpFromGround
protected void jumpFromGround() -
goDownInWater
protected void goDownInWater() -
jumpInLiquid
-
getWaterSlowDown
protected float getWaterSlowDown() -
canStandOnFluid
-
travel
-
calculateEntityAnimation
-
handleRelativeFrictionAndCalculateMovement
-
getFluidFallingAdjustedMovement
-
handleOnClimbable
-
getFrictionInfluencedSpeed
private float getFrictionInfluencedSpeed(float p_21331_) -
getSpeed
public float getSpeed() -
setSpeed
public void setSpeed(float p_21320_) -
doHurtTarget
-
tick
public void tick() -
detectEquipmentUpdates
private void detectEquipmentUpdates() -
collectEquipmentChanges
-
handleHandSwap
-
handleEquipmentChanges
-
getLastArmorItem
-
setLastArmorItem
-
getLastHandItem
-
setLastHandItem
-
tickHeadTurn
protected float tickHeadTurn(float p_21260_, float p_21261_) -
aiStep
public void aiStep() -
isSensitiveToWater
public boolean isSensitiveToWater() -
updateFallFlying
private void updateFallFlying() -
serverAiStep
protected void serverAiStep() -
pushEntities
protected void pushEntities() -
checkAutoSpinAttack
-
doPush
-
doAutoAttackOnTouch
-
startAutoSpinAttack
public void startAutoSpinAttack(int p_21327_) -
isAutoSpinAttack
public boolean isAutoSpinAttack() -
stopRiding
public void stopRiding()- Overrides:
stopRidingin 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_, boolean p_20983_) -
lerpHeadTo
public void lerpHeadTo(float p_21005_, int p_21006_)- Overrides:
lerpHeadToin classEntity
-
setJumping
public void setJumping(boolean p_21314_) -
onItemPickup
-
take
-
hasLineOfSight
-
getViewYRot
public float getViewYRot(float p_21286_)- Overrides:
getViewYRotin classEntity
-
getAttackAnim
public float getAttackAnim(float p_21325_) -
isEffectiveAi
public boolean isEffectiveAi() -
isPickable
public boolean isPickable()- Overrides:
isPickablein classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushablein classEntity
-
markHurt
protected void markHurt() -
getYHeadRot
public float getYHeadRot()- Overrides:
getYHeadRotin classEntity
-
setYHeadRot
public void setYHeadRot(float p_21306_)- Overrides:
setYHeadRotin classEntity
-
setYBodyRot
public void setYBodyRot(float p_21309_)- Overrides:
setYBodyRotin classEntity
-
getRelativePortalPosition
protected Vec3 getRelativePortalPosition(Direction.Axis p_21085_, BlockUtil.FoundRectangle p_21086_)- Overrides:
getRelativePortalPositionin classEntity
-
resetForwardDirectionOfRelativePortalPosition
-
getAbsorptionAmount
public float getAbsorptionAmount() -
setAbsorptionAmount
public void setAbsorptionAmount(float p_21328_) -
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:
onSyncedDataUpdatedin 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:
isVisuallySwimmingin 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
-
getAddEntityPacket
- Specified by:
getAddEntityPacketin classEntity
-
getDimensions
- Overrides:
getDimensionsin classEntity
-
getDismountPoses
-
getLocalBoundsForPose
-
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:
getEyeHeightin 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:ICapabilityProviderRetrieves 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:
getCapabilityin interfaceICapabilityProvider- Overrides:
getCapabilityin 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()- Overrides:
invalidateCapsin classCapabilityProvider<Entity>
-
reviveCaps
public void reviveCaps()- Overrides:
reviveCapsin classCapabilityProvider<Entity>
-
getBoundingBoxForCulling
- Overrides:
getBoundingBoxForCullingin classEntity
-
getEquipmentSlotForItem
-
createEquipmentSlotAccess
private static SlotAccess createEquipmentSlotAccess(LivingEntity p_147196_, EquipmentSlot p_147197_) -
getEquipmentSlot
-
getSlot
-
canFreeze
public boolean canFreeze() -
isCurrentlyGlowing
public boolean isCurrentlyGlowing()- Overrides:
isCurrentlyGlowingin classEntity
-
recreateFromPacket
-