public abstract class LivingEntity extends Entity
Entity.IMoveCallback
addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, world
DUMMY
修飾子 | コンストラクタと説明 |
---|---|
protected |
LivingEntity(EntityType<? extends LivingEntity> type,
World worldIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
addPotionEffect(EffectInstance effectInstanceIn) |
protected float |
applyArmorCalculations(DamageSource source,
float damage)
Reduces damage, depending on armor
|
void |
applyEntityCollision(Entity entityIn)
Applies a velocity to the entities, to push them away from eachother.
|
protected float |
applyPotionDamageCalculations(DamageSource source,
float damage)
Reduces damage, depending on potions
|
static boolean |
areAllPotionsAmbient(java.util.Collection<EffectInstance> potionEffects)
Returns true if all of the potion effects in the specified collection are ambient.
|
boolean |
attackable() |
boolean |
attackEntityAsMob(Entity entityIn) |
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
attemptTeleport(double p_213373_1_,
double p_213373_3_,
double p_213373_5_,
boolean p_213373_7_) |
void |
baseTick()
Gets called every tick from main Entity class
|
protected void |
blockUsingShield(LivingEntity entityIn) |
boolean |
canAttack(EntityType<?> typeIn) |
boolean |
canAttack(LivingEntity target) |
boolean |
canAttack(LivingEntity livingentityIn,
EntityPredicate predicateIn) |
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
boolean |
canBeHitWithPotion()
Returns false if the entity is an armor stand.
|
boolean |
canBePushed()
Returns true if this entity should push and be pushed by other entities when colliding.
|
boolean |
canBeRiddenInWater() |
boolean |
canBreatheUnderwater() |
protected boolean |
canDropLoot()
Entity won't drop items or experience points if this returns false
|
boolean |
canEntityBeSeen(Entity entityIn)
returns true if the entity provided in the argument can be seen.
|
boolean |
canPickUpItem(ItemStack itemstackIn) |
boolean |
clearActivePotions() |
void |
clearBedPosition() |
protected void |
collideWithEntity(Entity entityIn) |
protected void |
collideWithNearbyEntities() |
protected void |
constructKnockBackVector(LivingEntity entityIn) |
protected Brain<?> |
createBrain(com.mojang.datafixers.Dynamic<?> dynamicIn) |
IPacket<?> |
createSpawnPacket() |
boolean |
curePotionEffects(ItemStack curativeItem)
Removes all potion effects that have curativeItem as a curative item for its effect
|
protected void |
damageArmor(float damage) |
protected void |
damageEntity(DamageSource damageSrc,
float damageAmount)
Deals damage to the entity.
|
protected void |
damageShield(float damage) |
protected int |
decreaseAirSupply(int air)
Decrements the entity's air supply when underwater
|
protected int |
determineNextAir(int currentAir) |
protected void |
dropInventory() |
protected void |
dropLoot(DamageSource damageSourceIn,
boolean p_213354_2_) |
protected void |
dropSpecialItems(DamageSource source,
int looting,
boolean recentlyHitIn) |
ItemStack |
findAmmo(ItemStack shootable) |
protected void |
frostWalk(BlockPos pos) |
float |
func_213343_cS() |
protected int |
func_225508_e_(float p_225508_1_,
float p_225508_2_) |
void |
func_226292_a_(Hand p_226292_1_,
boolean p_226292_2_) |
protected void |
func_226293_b_(ItemStack p_226293_1_,
int p_226293_2_) |
protected void |
func_226294_cV_() |
boolean |
func_226296_dJ_() |
protected void |
func_226298_f_(LivingEntity p_226298_1_) |
float |
getAbsorptionAmount()
Returns the amount of health added by the Absorption effect.
|
Hand |
getActiveHand() |
ItemStack |
getActiveItemStack() |
EffectInstance |
getActivePotionEffect(Effect potionIn)
returns the PotionEffect for the supplied Potion if it is active, null otherwise.
|
java.util.Collection<EffectInstance> |
getActivePotionEffects() |
java.util.Map<Effect,EffectInstance> |
getActivePotionMap() |
float |
getAIMoveSpeed()
the movespeed used for the new AI system
|
boolean |
getAlwaysRenderNameTagForRender() |
abstract java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
int |
getArrowCountInEntity()
counts the amount of arrows stuck in the entity. getting hit by arrows increases this, used in rendering
|
LivingEntity |
getAttackingEntity() |
IAttributeInstance |
getAttribute(IAttribute attribute) |
AbstractAttributeMap |
getAttributes()
Returns this entity's attribute map (where all its attributes are stored)
|
Direction |
getBedDirection()
gets the Direction for the camera if this entity is sleeping
|
java.util.Optional<BlockPos> |
getBedPosition() |
int |
getBeeStingCount() |
BlockState |
getBlockState() |
Brain<?> |
getBrain() |
<T> LazyOptional<T> |
getCapability(Capability<T> capability,
Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.
|
CombatTracker |
getCombatTracker()
1.8.9
|
CreatureAttribute |
getCreatureAttribute() |
protected SoundEvent |
getDeathSound() |
protected SoundEvent |
getDrinkSound(ItemStack stack) |
SoundEvent |
getEatSound(ItemStack itemStackIn) |
protected int |
getExperiencePoints(PlayerEntity player)
Get the experience points the entity currently has.
|
protected float |
getEyeHeight(Pose poseIn,
EntitySize sizeIn) |
protected SoundEvent |
getFallSound(int heightIn) |
float |
getHealth() |
ItemStack |
getHeldItem(Hand hand) |
ItemStack |
getHeldItemMainhand() |
ItemStack |
getHeldItemOffhand() |
protected SoundEvent |
getHurtSound(DamageSource damageSourceIn) |
int |
getIdleTime() |
int |
getItemInUseCount() |
int |
getItemInUseMaxCount() |
abstract ItemStack |
getItemStackFromSlot(EquipmentSlotType slotIn) |
protected float |
getJumpUpwardsMotion() |
LivingEntity |
getLastAttackedEntity() |
int |
getLastAttackedEntityTime() |
DamageSource |
getLastDamageSource() |
protected LootContext.Builder |
getLootContextBuilder(boolean p_213363_1_,
DamageSource damageSourceIn) |
ResourceLocation |
getLootTableResourceLocation() |
float |
getMaxHealth()
Returns the maximum health of the entity (what it is able to regenerate up to, what it spawned with, etc)
|
abstract HandSide |
getPrimaryHand() |
float |
getRenderScale() |
LivingEntity |
getRevengeTarget() |
int |
getRevengeTimer() |
java.util.Random |
getRNG() |
float |
getRotationYawHead() |
EntitySize |
getSize(Pose poseIn) |
protected float |
getSoundPitch()
Gets the pitch of living sounds in living entities.
|
protected float |
getSoundVolume()
Returns the volume for the sounds this mob makes.
|
protected float |
getStandingEyeHeight(Pose poseIn,
EntitySize sizeIn) |
float |
getSwimAnimation(float partialTicks) |
float |
getSwingProgress(float partialTickTime)
Gets the progression of the swing animation, ranges from 0.0 to 1.0.
|
int |
getTicksElytraFlying() |
int |
getTotalArmorValue()
Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
|
double |
getVisibilityMultiplier(Entity lookingEntity) |
protected float |
getWaterSlowDown() |
float |
getYaw(float partialTicks)
Gets the current yaw of the entity
|
protected void |
handleFluidJump(Tag<Fluid> fluidTag) |
protected void |
handleFluidSneak() |
void |
handleStatusUpdate(byte id)
|
boolean |
hasItemInSlot(EquipmentSlotType slotIn) |
void |
heal(float healAmount)
Heal living entity (param: amount of half-hearts)
|
boolean |
isActiveItemStackBlocking() |
boolean |
isActualySwimming() |
boolean |
isAlive()
Returns true if the entity has not been
Entity.removed . |
boolean |
isChild()
If Animal, checks if the age timer is negative
|
boolean |
isElytraFlying() |
boolean |
isEntityInsideOpaqueBlock()
Checks if this entity is inside of an opaque block
|
boolean |
isEntityUndead()
Returns true if this entity is undead.
|
boolean |
isHandActive() |
protected boolean |
isMovementBlocked()
Dead and sleeping entities cannot move
|
boolean |
isOnLadder()
Returns true if this entity should move as if it were on a ladder (either because it's actually on a ladder, or
for AI reasons)
|
protected boolean |
isPlayer()
Only use is to identify if class is an instance of player for experience dropping
|
boolean |
isPotionActive(Effect potionIn) |
boolean |
isPotionApplicable(EffectInstance potioneffectIn) |
boolean |
isServerWorld()
Returns whether the entity is in a server world
|
boolean |
isSleeping()
Returns whether player is sleeping or not
|
boolean |
isSpinAttacking() |
protected void |
jump()
Causes this entity to do an upwards motion (jumping).
|
void |
knockBack(Entity entityIn,
float strength,
double xRatio,
double zRatio)
Constructs a knockback vector from the given direction ratio and magnitude and adds it to the entity's velocity.
|
void |
livingTick()
Called frequently so the entity can update its state every tick as required.
|
void |
lookAt(EntityAnchorArgument.Type p_200602_1_,
Vec3d p_200602_2_) |
protected void |
markPotionsDirty() |
protected void |
markVelocityChanged()
Marks this entity's velocity as changed, so that it can be re-synced with the client later
|
void |
notifyDataManagerChange(DataParameter<?> key) |
protected void |
onChangedPotionEffect(EffectInstance id,
boolean reapply) |
void |
onDeath(DamageSource cause)
Called when the mob's health reaches 0.
|
protected void |
onDeathUpdate()
handles entity death timer, experience orb and particle creation
|
protected void |
onFinishedPotionEffect(EffectInstance effect) |
ItemStack |
onFoodEaten(World p_213357_1_,
ItemStack p_213357_2_) |
void |
onItemPickup(Entity entityIn,
int quantity)
Called when the entity picks up an item.
|
protected void |
onItemUseFinish()
Used for when item use count runs out, ie: eating completed
|
void |
onKillCommand()
Called by the /kill command.
|
boolean |
onLivingFall(float distance,
float damageMultiplier) |
protected void |
onNewPotionEffect(EffectInstance id) |
protected void |
outOfWorld()
sets the dead flag.
|
void |
performHurtAnimation()
Setups the entity to do the hurt animation.
|
protected void |
playEquipSound(ItemStack stack) |
protected void |
playFallSound()
Plays the fall sound for the block landed on
|
protected void |
playHurtSound(DamageSource source) |
void |
readAdditional(CompoundNBT compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
protected void |
registerAttributes() |
protected void |
registerData() |
void |
remove(boolean keepData) |
EffectInstance |
removeActivePotionEffect(Effect potioneffectin)
Removes the given potion effect from the active potion map and returns it.
|
boolean |
removePotionEffect(Effect effectIn) |
void |
resetActiveHand() |
protected void |
resetPotionEffectMetadata()
Resets the potion effect color and ambience metadata values
|
void |
sendBreakAnimation(EquipmentSlotType p_213361_1_) |
void |
sendBreakAnimation(Hand p_213334_1_) |
void |
sendEndCombat()
Sends an END_COMBAT packet to the client
|
void |
sendEnterCombat()
Sends an ENTER_COMBAT packet to the client
|
void |
setAbsorptionAmount(float amount) |
void |
setActiveHand(Hand hand) |
void |
setAIMoveSpeed(float speedIn)
set the movespeed used for the new AI system
|
void |
setArrowCountInEntity(int count)
sets the amount of arrows stuck in the entity. used for rendering those
|
void |
setBedPosition(BlockPos p_213369_1_) |
void |
setBeeStingCount(int p_226300_1_) |
void |
setHeadRotation(float yaw,
int pitch) |
void |
setHealth(float health) |
void |
setHeldItem(Hand hand,
ItemStack stack) |
void |
setIdleTime(int idleTimeIn) |
abstract void |
setItemStackToSlot(EquipmentSlotType slotIn,
ItemStack stack) |
void |
setJumping(boolean jumping) |
void |
setLastAttackedEntity(Entity entityIn) |
protected void |
setLivingFlag(int key,
boolean value) |
void |
setPartying(BlockPos pos,
boolean isPartying)
Called when a record starts or stops playing.
|
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
Sets a target for the client to interpolate towards over the next few ticks
|
void |
setRenderYawOffset(float offset)
Set the render yaw offset
|
void |
setRevengeTarget(LivingEntity livingBase)
Hint to AI tasks that we were attacked by the passed EntityLivingBase and should retaliate.
|
void |
setRotationYawHead(float rotation)
Sets the head's yaw rotation of the entity.
|
void |
setSprinting(boolean sprinting)
Set sprinting switch for Entity.
|
boolean |
shouldRiderFaceForward(PlayerEntity player)
Returns true if the entity's rider (EntityPlayer) should face forward when mounted.
|
protected void |
spawnDrops(DamageSource damageSourceIn) |
protected void |
spinAttack(LivingEntity p_204804_1_) |
void |
startSleeping(BlockPos p_213342_1_) |
void |
startSpinAttack(int p_204803_1_) |
void |
stopActiveHand() |
void |
stopRiding()
Dismounts this entity from the entity it is riding.
|
void |
swingArm(Hand hand) |
void |
tick()
Called to update the entity's position/logic.
|
void |
travel(Vec3d p_213352_1_) |
protected void |
updateArmSwingProgress()
Updates the arm swing progress counters and animation progress
|
protected float |
updateDistance(float p_110146_1_,
float p_110146_2_) |
protected void |
updateEntityActionState() |
protected void |
updateFallState(double y,
boolean onGroundIn,
BlockState state,
BlockPos pos) |
protected void |
updatePotionEffects() |
protected void |
updatePotionMetadata()
Clears potion metadata values if the entity has no potion effects.
|
void |
updateRidden()
Handles updating while riding another entity
|
protected void |
updateSpinAttack(AxisAlignedBB p_204801_1_,
AxisAlignedBB p_204801_2_) |
void |
wakeUp() |
void |
writeAdditional(CompoundNBT compound) |
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, calculateUpVector, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, func_225513_by_, func_225514_a_, func_226265_a_, func_226266_a_, func_226276_cg_, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMotion, getMountedYOffset, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getScoreboardName, getServer, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYOffset, handleFluidAcceleration, handlePistonMovement, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, horizontalMag, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEntityEqual, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isShiftKeyDown, isSilent, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, makeFlySound, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillEntity, onRemovedFromWorld, onStruckByLightning, pick, playFlySound, playSound, playStepSound, playSwimSound, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setInLava, setInvisible, setInvulnerable, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, teleportKeepLoaded, toString, updatePassenger, updatePortal, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability
public static final IAttribute SWIM_SPEED
public static final IAttribute NAMETAG_DISTANCE
public static final IAttribute ENTITY_GRAVITY
protected static final DataParameter<java.lang.Byte> LIVING_FLAGS
protected static final EntitySize SLEEPING_SIZE
public boolean isSwingInProgress
public Hand swingingHand
public int swingProgressInt
public int arrowHitTimer
public int beeStingRemovalCooldown
public int hurtTime
public int maxHurtTime
public float attackedAtYaw
public int deathTime
public float prevSwingProgress
public float swingProgress
protected int ticksSinceLastSwing
public float prevLimbSwingAmount
public float limbSwingAmount
public float limbSwing
public final int maxHurtResistantTime
public final float randomUnused2
public final float randomUnused1
public float renderYawOffset
public float prevRenderYawOffset
public float rotationYawHead
public float prevRotationYawHead
public float jumpMovementFactor
protected PlayerEntity attackingPlayer
protected int recentlyHit
protected boolean dead
protected int idleTime
protected float prevOnGroundSpeedFactor
protected float onGroundSpeedFactor
protected float movedDistance
protected float prevMovedDistance
protected float unused180
protected int scoreValue
protected float lastDamage
protected boolean isJumping
public float moveStrafing
public float moveVertical
public float moveForward
protected int newPosRotationIncrements
protected double interpTargetX
protected double interpTargetY
protected double interpTargetZ
protected double interpTargetYaw
protected double interpTargetPitch
protected double interpTargetHeadYaw
protected int interpTicksHead
protected ItemStack activeItemStack
protected int activeItemStackUseCount
protected int ticksElytraFlying
protected int spinAttackDuration
protected Brain<?> brain
protected LivingEntity(EntityType<? extends LivingEntity> type, World worldIn)
public Brain<?> getBrain()
protected Brain<?> createBrain(com.mojang.datafixers.Dynamic<?> dynamicIn)
public void onKillCommand()
onKillCommand
クラス内 Entity
public boolean canAttack(EntityType<?> typeIn)
protected void registerData()
registerData
クラス内 Entity
protected void registerAttributes()
protected void updateFallState(double y, boolean onGroundIn, BlockState state, BlockPos pos)
updateFallState
クラス内 Entity
public boolean canBreatheUnderwater()
public float getSwimAnimation(float partialTicks)
public void baseTick()
protected void frostWalk(BlockPos pos)
public boolean isChild()
public float getRenderScale()
public boolean canBeRiddenInWater()
canBeRiddenInWater
クラス内 Entity
protected void onDeathUpdate()
protected boolean canDropLoot()
protected int decreaseAirSupply(int air)
protected int determineNextAir(int currentAir)
protected int getExperiencePoints(PlayerEntity player)
protected boolean isPlayer()
public java.util.Random getRNG()
@Nullable public LivingEntity getRevengeTarget()
public int getRevengeTimer()
public void setRevengeTarget(@Nullable LivingEntity livingBase)
@Nullable public LivingEntity getLastAttackedEntity()
public int getLastAttackedEntityTime()
public void setLastAttackedEntity(Entity entityIn)
public int getIdleTime()
public void setIdleTime(int idleTimeIn)
protected void playEquipSound(ItemStack stack)
public void writeAdditional(CompoundNBT compound)
writeAdditional
クラス内 Entity
public void readAdditional(CompoundNBT compound)
readAdditional
クラス内 Entity
protected void updatePotionEffects()
protected void updatePotionMetadata()
public double getVisibilityMultiplier(@Nullable Entity lookingEntity)
public boolean canAttack(LivingEntity target)
public boolean canAttack(LivingEntity livingentityIn, EntityPredicate predicateIn)
public static boolean areAllPotionsAmbient(java.util.Collection<EffectInstance> potionEffects)
protected void resetPotionEffectMetadata()
public boolean clearActivePotions()
public java.util.Collection<EffectInstance> getActivePotionEffects()
public java.util.Map<Effect,EffectInstance> getActivePotionMap()
public boolean isPotionActive(Effect potionIn)
@Nullable public EffectInstance getActivePotionEffect(Effect potionIn)
public boolean addPotionEffect(EffectInstance effectInstanceIn)
public boolean isPotionApplicable(EffectInstance potioneffectIn)
public boolean isEntityUndead()
@Nullable public EffectInstance removeActivePotionEffect(@Nullable Effect potioneffectin)
public boolean removePotionEffect(Effect effectIn)
protected void onNewPotionEffect(EffectInstance id)
protected void onChangedPotionEffect(EffectInstance id, boolean reapply)
protected void onFinishedPotionEffect(EffectInstance effect)
public void heal(float healAmount)
public float getHealth()
public void setHealth(float health)
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
クラス内 Entity
protected void blockUsingShield(LivingEntity entityIn)
protected void constructKnockBackVector(LivingEntity entityIn)
@Nullable public DamageSource getLastDamageSource()
protected void playHurtSound(DamageSource source)
public void onDeath(DamageSource cause)
protected void func_226298_f_(@Nullable LivingEntity p_226298_1_)
protected void spawnDrops(DamageSource damageSourceIn)
protected void dropInventory()
protected void func_226294_cV_()
protected void dropSpecialItems(DamageSource source, int looting, boolean recentlyHitIn)
public ResourceLocation getLootTableResourceLocation()
protected void dropLoot(DamageSource damageSourceIn, boolean p_213354_2_)
protected LootContext.Builder getLootContextBuilder(boolean p_213363_1_, DamageSource damageSourceIn)
public void knockBack(Entity entityIn, float strength, double xRatio, double zRatio)
this.onGround
), the Y-velocity is increased as well, clamping it to .4
.
The entity's existing horizontal velocity is halved, and if the entity is on the ground the Y-velocity is too.@Nullable protected SoundEvent getHurtSound(DamageSource damageSourceIn)
@Nullable protected SoundEvent getDeathSound()
protected SoundEvent getFallSound(int heightIn)
protected SoundEvent getDrinkSound(ItemStack stack)
public SoundEvent getEatSound(ItemStack itemStackIn)
public boolean isOnLadder()
public BlockState getBlockState()
public boolean isAlive()
Entity.removed
.public boolean onLivingFall(float distance, float damageMultiplier)
onLivingFall
クラス内 Entity
protected int func_225508_e_(float p_225508_1_, float p_225508_2_)
protected void playFallSound()
public void performHurtAnimation()
performHurtAnimation
クラス内 Entity
public int getTotalArmorValue()
protected void damageArmor(float damage)
protected void damageShield(float damage)
protected float applyArmorCalculations(DamageSource source, float damage)
protected float applyPotionDamageCalculations(DamageSource source, float damage)
protected void damageEntity(DamageSource damageSrc, float damageAmount)
public CombatTracker getCombatTracker()
@Nullable public LivingEntity getAttackingEntity()
public final float getMaxHealth()
public final int getArrowCountInEntity()
public final void setArrowCountInEntity(int count)
public final int getBeeStingCount()
public final void setBeeStingCount(int p_226300_1_)
public void swingArm(Hand hand)
public void func_226292_a_(Hand p_226292_1_, boolean p_226292_2_)
public void handleStatusUpdate(byte id)
handleStatusUpdate
クラス内 Entity
protected void outOfWorld()
outOfWorld
クラス内 Entity
protected void updateArmSwingProgress()
public IAttributeInstance getAttribute(IAttribute attribute)
public AbstractAttributeMap getAttributes()
public CreatureAttribute getCreatureAttribute()
public ItemStack getHeldItemMainhand()
public ItemStack getHeldItemOffhand()
public boolean hasItemInSlot(EquipmentSlotType slotIn)
public abstract java.lang.Iterable<ItemStack> getArmorInventoryList()
getArmorInventoryList
クラス内 Entity
public abstract ItemStack getItemStackFromSlot(EquipmentSlotType slotIn)
public abstract void setItemStackToSlot(EquipmentSlotType slotIn, ItemStack stack)
setItemStackToSlot
クラス内 Entity
public float func_213343_cS()
public void setSprinting(boolean sprinting)
setSprinting
クラス内 Entity
protected float getSoundVolume()
protected float getSoundPitch()
protected boolean isMovementBlocked()
public void applyEntityCollision(Entity entityIn)
applyEntityCollision
クラス内 Entity
public boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender
クラス内 Entity
protected float getJumpUpwardsMotion()
protected void jump()
protected void handleFluidSneak()
protected float getWaterSlowDown()
public void travel(Vec3d p_213352_1_)
public float getAIMoveSpeed()
public void setAIMoveSpeed(float speedIn)
public boolean attackEntityAsMob(Entity entityIn)
protected float updateDistance(float p_110146_1_, float p_110146_2_)
public void livingTick()
protected void updateEntityActionState()
protected void collideWithNearbyEntities()
protected void updateSpinAttack(AxisAlignedBB p_204801_1_, AxisAlignedBB p_204801_2_)
protected void collideWithEntity(Entity entityIn)
protected void spinAttack(LivingEntity p_204804_1_)
public void startSpinAttack(int p_204803_1_)
public boolean isSpinAttacking()
public void stopRiding()
stopRiding
クラス内 Entity
public void updateRidden()
updateRidden
クラス内 Entity
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
setPositionAndRotationDirect
クラス内 Entity
public void setHeadRotation(float yaw, int pitch)
setHeadRotation
クラス内 Entity
public void setJumping(boolean jumping)
public void onItemPickup(Entity entityIn, int quantity)
public boolean canEntityBeSeen(Entity entityIn)
public float getYaw(float partialTicks)
public float getSwingProgress(float partialTickTime)
public boolean isServerWorld()
public boolean canBeCollidedWith()
canBeCollidedWith
クラス内 Entity
public boolean canBePushed()
canBePushed
クラス内 Entity
protected void markVelocityChanged()
markVelocityChanged
クラス内 Entity
public float getRotationYawHead()
getRotationYawHead
クラス内 Entity
public void setRotationYawHead(float rotation)
setRotationYawHead
クラス内 Entity
public void setRenderYawOffset(float offset)
setRenderYawOffset
クラス内 Entity
public float getAbsorptionAmount()
public void setAbsorptionAmount(float amount)
public void sendEnterCombat()
public void sendEndCombat()
protected void markPotionsDirty()
public abstract HandSide getPrimaryHand()
public boolean isHandActive()
public Hand getActiveHand()
protected void setLivingFlag(int key, boolean value)
public void setActiveHand(Hand hand)
public void notifyDataManagerChange(DataParameter<?> key)
notifyDataManagerChange
クラス内 Entity
public void lookAt(EntityAnchorArgument.Type p_200602_1_, Vec3d p_200602_2_)
protected void func_226293_b_(ItemStack p_226293_1_, int p_226293_2_)
protected void onItemUseFinish()
public ItemStack getActiveItemStack()
public int getItemInUseCount()
public int getItemInUseMaxCount()
public void stopActiveHand()
public void resetActiveHand()
public boolean isActiveItemStackBlocking()
public boolean func_226296_dJ_()
public boolean isElytraFlying()
public boolean isActualySwimming()
isActualySwimming
クラス内 Entity
public int getTicksElytraFlying()
public boolean attemptTeleport(double p_213373_1_, double p_213373_3_, double p_213373_5_, boolean p_213373_7_)
public boolean canBeHitWithPotion()
public boolean attackable()
public void setPartying(BlockPos pos, boolean isPartying)
public boolean canPickUpItem(ItemStack itemstackIn)
public IPacket<?> createSpawnPacket()
createSpawnPacket
クラス内 Entity
public EntitySize getSize(Pose poseIn)
public java.util.Optional<BlockPos> getBedPosition()
public void setBedPosition(BlockPos p_213369_1_)
public void clearBedPosition()
public boolean isSleeping()
public void startSleeping(BlockPos p_213342_1_)
public void wakeUp()
@Nullable public Direction getBedDirection()
public boolean isEntityInsideOpaqueBlock()
isEntityInsideOpaqueBlock
クラス内 Entity
protected final float getEyeHeight(Pose poseIn, EntitySize sizeIn)
getEyeHeight
クラス内 Entity
protected float getStandingEyeHeight(Pose poseIn, EntitySize sizeIn)
public void sendBreakAnimation(EquipmentSlotType p_213361_1_)
public void sendBreakAnimation(Hand p_213334_1_)
public boolean curePotionEffects(ItemStack curativeItem)
curativeItem
- The itemstack we are using to cure potion effectspublic boolean shouldRiderFaceForward(PlayerEntity player)
player
- The player who is riding the entity.public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvider
getCapability
インタフェース内 ICapabilityProvider
getCapability
クラス内 CapabilityProvider<Entity>