public abstract class PlayerEntity extends LivingEntity
Modifier and Type | Class and Description |
---|---|
static class |
PlayerEntity.SleepResult |
Entity.IMoveCallback
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, beeStingRemovalCooldown, brain, dead, deathTime, ENTITY_GRAVITY, hurtTime, idleTime, interpTargetHeadYaw, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, interpTicksHead, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, LIVING_FLAGS, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, moveVertical, NAMETAG_DISTANCE, newPosRotationIncrements, onGroundSpeedFactor, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, SLEEPING_SIZE, spinAttackDuration, SWIM_SPEED, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180
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
Constructor and Description |
---|
PlayerEntity(World worldIn,
com.mojang.authlib.GameProfile gameProfileIn) |
Modifier and Type | Method and Description |
---|---|
void |
addExhaustion(float exhaustion) |
void |
addExperienceLevel(int levels) |
boolean |
addItemStackToInventory(ItemStack p_191521_1_) |
void |
addMovementStat(double p_71000_1_,
double p_71000_3_,
double p_71000_5_) |
void |
addScore(int scoreIn) |
boolean |
addShoulderEntity(CompoundNBT p_192027_1_) |
void |
addStat(ResourceLocation stat) |
void |
addStat(ResourceLocation p_195067_1_,
int p_195067_2_) |
void |
addStat(Stat<?> stat) |
void |
addStat(Stat<?> stat,
int amount) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
void |
attackTargetEntityWithCurrentItem(Entity targetEntity) |
protected void |
blockUsingShield(LivingEntity entityIn) |
boolean |
canAttackPlayer(PlayerEntity other) |
boolean |
canEat(boolean ignoreHunger) |
boolean |
canHarvestBlock(BlockState state) |
boolean |
canPickUpItem(ItemStack itemstackIn) |
boolean |
canPlayerEdit(BlockPos pos,
Direction facing,
ItemStack stack) |
protected boolean |
canTriggerWalking() |
boolean |
canUseCommandBlock() |
void |
closeScreen() |
protected CooldownTracker |
createCooldownTracker() |
protected void |
damageArmor(float damage) |
protected void |
damageEntity(DamageSource damageSrc,
float damageAmount) |
protected void |
damageShield(float damage) |
protected void |
destroyVanishingCursedItems() |
void |
disableShield(boolean p_190777_1_) |
protected void |
doWaterSplashEffect() |
protected void |
dropInventory() |
ItemEntity |
dropItem(ItemStack itemStackIn,
boolean unused) |
ItemEntity |
dropItem(ItemStack droppedItem,
boolean dropAround,
boolean traceItem) |
ItemStack |
findAmmo(ItemStack shootable) |
static java.util.Optional<Vec3d> |
func_213822_a(IWorldReader p_213822_0_,
BlockPos p_213822_1_,
boolean p_213822_2_) |
boolean |
func_223729_a(World p_223729_1_,
BlockPos p_223729_2_,
GameType p_223729_3_) |
protected Vec3d |
func_225514_a_(Vec3d p_225514_1_,
MoverType p_225514_2_) |
boolean |
func_225609_n_(boolean p_225609_1_) |
void |
func_225652_a_(boolean p_225652_1_,
boolean p_225652_2_) |
void |
func_226560_a_(BlockPos p_226560_1_,
boolean p_226560_2_,
boolean p_226560_3_)
Deprecated.
|
boolean |
func_226563_dT_() |
protected boolean |
func_226564_dU_() |
protected boolean |
func_226565_dV_() |
boolean |
func_226566_ei_() |
void |
func_226567_ej_() |
void |
func_226568_ek_() |
float |
getAbsorptionAmount() |
float |
getAIMoveSpeed() |
boolean |
getAlwaysRenderNameTagForRender() |
java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
BlockPos |
getBedLocation()
Deprecated.
|
BlockPos |
getBedLocation(DimensionType dim)
A dimension aware version of getBedLocation.
|
<T> LazyOptional<T> |
getCapability(Capability<T> capability,
Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.
|
float |
getCooldownPeriod() |
CooldownTracker |
getCooldownTracker() |
float |
getCooledAttackStrength(float adjustTicks) |
protected SoundEvent |
getDeathSound() |
float |
getDigSpeed(BlockState state)
Deprecated.
|
float |
getDigSpeed(BlockState state,
BlockPos pos) |
ITextComponent |
getDisplayName() |
ITextComponent |
getDisplayNameAndUUID() |
protected int |
getExperiencePoints(PlayerEntity player) |
protected SoundEvent |
getFallSound(int heightIn) |
protected int |
getFireImmuneTicks() |
FoodStats |
getFoodStats() |
com.mojang.authlib.GameProfile |
getGameProfile() |
java.lang.Iterable<ItemStack> |
getHeldEquipment() |
protected SoundEvent |
getHighspeedSplashSound() |
protected SoundEvent |
getHurtSound(DamageSource damageSourceIn) |
EnderChestInventory |
getInventoryEnderChest() |
ItemStack |
getItemStackFromSlot(EquipmentSlotType slotIn) |
CompoundNBT |
getLeftShoulderEntity() |
float |
getLuck() |
int |
getMaxInPortalTime() |
ITextComponent |
getName() |
static java.util.UUID |
getOfflineUUID(java.lang.String username) |
int |
getPortalCooldown() |
java.util.Collection<ITextComponent> |
getPrefixes() |
HandSide |
getPrimaryHand() |
CompoundNBT |
getRightShoulderEntity() |
int |
getScore() |
java.lang.String |
getScoreboardName() |
EntitySize |
getSize(Pose poseIn) |
int |
getSleepTimer() |
SoundCategory |
getSoundCategory() |
DimensionType |
getSpawnDimension() |
protected float |
getSpeedFactor() |
protected SoundEvent |
getSplashSound() |
float |
getStandingEyeHeight(Pose poseIn,
EntitySize sizeIn) |
java.util.Collection<ITextComponent> |
getSuffixes() |
protected SoundEvent |
getSwimSound() |
static java.util.UUID |
getUUID(com.mojang.authlib.GameProfile profile) |
Scoreboard |
getWorldScoreboard() |
int |
getXPSeed() |
double |
getYOffset() |
void |
giveExperiencePoints(int p_195068_1_) |
void |
handleStatusUpdate(byte id) |
boolean |
hasReducedDebug() |
ActionResultType |
interactOn(Entity entityToInteractOn,
Hand hand) |
boolean |
isAllowEdit() |
abstract boolean |
isCreative() |
boolean |
isInvulnerableTo(DamageSource source) |
protected boolean |
isMovementBlocked() |
protected boolean |
isNormalCube(BlockPos pos) |
protected boolean |
isPlayer() |
boolean |
isPlayerFullyAsleep() |
boolean |
isPushedByWater() |
boolean |
isSpawnForced()
Deprecated.
|
boolean |
isSpawnForced(DimensionType dim)
A dimension aware version of isSpawnForced.
|
abstract boolean |
isSpectator() |
boolean |
isSwimming() |
boolean |
isUser() |
boolean |
isWearing(PlayerModelPart part) |
void |
jump() |
void |
livingTick() |
void |
onCriticalHit(Entity entityHit) |
void |
onDeath(DamageSource cause) |
void |
onEnchant(ItemStack enchantedItem,
int cost) |
void |
onEnchantmentCritical(Entity entityHit) |
ItemStack |
onFoodEaten(World p_213357_1_,
ItemStack p_213357_2_) |
void |
onKillEntity(LivingEntity entityLivingIn) |
boolean |
onLivingFall(float distance,
float damageMultiplier) |
void |
openBook(ItemStack stack,
Hand hand) |
void |
openCommandBlock(CommandBlockTileEntity commandBlock) |
java.util.OptionalInt |
openContainer(INamedContainerProvider p_213829_1_) |
void |
openHorseInventory(AbstractHorseEntity horse,
IInventory inventoryIn) |
void |
openJigsaw(JigsawTileEntity p_213826_1_) |
void |
openMerchantContainer(int containerId,
MerchantOffers offers,
int level,
int xp,
boolean p_213818_5_,
boolean p_213818_6_) |
void |
openMinecartCommandBlock(CommandBlockLogic commandBlock) |
void |
openSignEditor(SignTileEntity signTile) |
void |
openStructureBlock(StructureBlockTileEntity structure) |
void |
playSound(SoundEvent soundIn,
float volume,
float pitch) |
void |
playSound(SoundEvent p_213823_1_,
SoundCategory p_213823_2_,
float p_213823_3_,
float p_213823_4_) |
void |
preparePlayerToSpawn() |
void |
readAdditional(CompoundNBT compound) |
protected void |
registerAttributes() |
protected void |
registerData() |
void |
remove(boolean keepData) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
resetCooldown() |
int |
resetRecipes(java.util.Collection<IRecipe<?>> p_195069_1_) |
void |
respawnPlayer() |
void |
sendPlayerAbilities() |
void |
sendStatusMessage(ITextComponent chatComponent,
boolean actionBar) |
void |
setAbsorptionAmount(float amount) |
void |
setGameType(GameType gameType) |
void |
setItemStackToSlot(EquipmentSlotType slotIn,
ItemStack stack) |
protected void |
setLeftShoulderEntity(CompoundNBT tag) |
void |
setMotionMultiplier(BlockState p_213295_1_,
Vec3d p_213295_2_) |
void |
setPrimaryHand(HandSide hand) |
void |
setReducedDebug(boolean reducedDebug) |
protected void |
setRightShoulderEntity(CompoundNBT tag) |
void |
setScore(int scoreIn) |
void |
setSpawnDimenion(DimensionType dim) |
void |
setSpawnPoint(BlockPos p_226560_1_,
boolean p_226560_2_,
boolean p_226560_3_,
DimensionType dim)
A dimension aware version of setSpawnChunk.
|
boolean |
shouldHeal() |
protected void |
spawnShoulderEntities() |
void |
spawnSweepParticles() |
protected void |
spinAttack(LivingEntity p_204804_1_) |
void |
startSleeping(BlockPos p_213342_1_) |
void |
stopRiding() |
void |
takeStat(Stat<?> stat) |
void |
tick() |
void |
travel(Vec3d p_213352_1_) |
com.mojang.datafixers.util.Either<PlayerEntity.SleepResult,Unit> |
trySleep(BlockPos at) |
int |
unlockRecipes(java.util.Collection<IRecipe<?>> p_195065_1_) |
void |
unlockRecipes(ResourceLocation[] p_193102_1_) |
protected void |
updateEntityActionState() |
protected boolean |
updateEyesInWaterPlayer() |
protected void |
updatePose() |
void |
updateRidden() |
void |
updateSwimming() |
void |
wakeUp() |
void |
writeAdditional(CompoundNBT compound) |
int |
xpBarCap() |
addPotionEffect, applyArmorCalculations, applyEntityCollision, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityAsMob, attemptTeleport, baseTick, canAttack, canAttack, canAttack, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBeRiddenInWater, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, clearBedPosition, collideWithEntity, collideWithNearbyEntities, constructKnockBackVector, createBrain, createSpawnPacket, curePotionEffects, decreaseAirSupply, determineNextAir, dropLoot, dropSpecialItems, frostWalk, func_213343_cS, func_225508_e_, func_226292_a_, func_226293_b_, func_226294_cV_, func_226296_dJ_, func_226298_f_, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getArrowCountInEntity, getAttackingEntity, getAttribute, getAttributes, getBedDirection, getBedPosition, getBeeStingCount, getBlockState, getBrain, getCombatTracker, getCreatureAttribute, getDrinkSound, getEatSound, getEyeHeight, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getLootContextBuilder, getLootTableResourceLocation, getMaxHealth, getRenderScale, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwimAnimation, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getVisibilityMultiplier, getWaterSlowDown, getYaw, handleFluidJump, handleFluidSneak, hasItemInSlot, heal, isActiveItemStackBlocking, isActualySwimming, isAlive, isChild, isElytraFlying, isEntityInsideOpaqueBlock, isEntityUndead, isHandActive, isOnLadder, isPotionActive, isPotionApplicable, isServerWorld, isSleeping, isSpinAttacking, knockBack, lookAt, markPotionsDirty, markVelocityChanged, notifyDataManagerChange, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, playFallSound, playHurtSound, removeActivePotionEffect, removePotionEffect, resetActiveHand, resetPotionEffectMetadata, sendBreakAnimation, sendBreakAnimation, sendEndCombat, sendEnterCombat, setActiveHand, setAIMoveSpeed, setArrowCountInEntity, setBedPosition, setBeeStingCount, setHeadRotation, setHealth, setHeldItem, setIdleTime, setJumping, setLastAttackedEntity, setLivingFlag, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, spawnDrops, startSpinAttack, stopActiveHand, swingArm, updateArmSwingProgress, updateDistance, updateFallState, updatePotionEffects, updatePotionMetadata, updateSpinAttack
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, calculateUpVector, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, func_225513_by_, func_226265_a_, func_226266_a_, func_226276_cg_, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyePosition, getFireTimer, getFlag, getForward, getHeight, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMirroredYaw, getMotion, getMountedYOffset, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSubmergedHeight, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, 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, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isRidingOrBeingRiddenBy, isRidingSameEntity, isShiftKeyDown, isSilent, isSpectatedByPlayer, isSprinting, isSteppingCarefully, isSuppressingBounce, isVisuallySwimming, isWet, makeFlySound, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onRemovedFromWorld, onStruckByLightning, pick, playFlySound, playStepSound, playSwimSound, processInitialInteract, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setInLava, setInvisible, setInvulnerable, setLocationAndAngles, setMotion, setMotion, 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, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability
public static final java.lang.String PERSISTED_NBT_TAG
protected java.util.HashMap<ResourceLocation,BlockPos> spawnPosMap
protected java.util.HashMap<ResourceLocation,java.lang.Boolean> spawnForcedMap
public static final IAttribute REACH_DISTANCE
public static final EntitySize STANDING_SIZE
protected static final DataParameter<java.lang.Byte> PLAYER_MODEL_FLAG
protected static final DataParameter<java.lang.Byte> MAIN_HAND
protected static final DataParameter<CompoundNBT> LEFT_SHOULDER_ENTITY
protected static final DataParameter<CompoundNBT> RIGHT_SHOULDER_ENTITY
public final PlayerInventory inventory
protected EnderChestInventory enterChestInventory
public final PlayerContainer container
public Container openContainer
protected FoodStats foodStats
protected int flyToggleTimer
public float prevCameraYaw
public float cameraYaw
public int xpCooldown
public double prevChasingPosX
public double prevChasingPosY
public double prevChasingPosZ
public double chasingPosX
public double chasingPosY
public double chasingPosZ
protected boolean eyesInWaterPlayer
protected BlockPos spawnPos
protected boolean spawnForced
public final PlayerAbilities abilities
public int experienceLevel
public int experienceTotal
public float experience
protected int xpSeed
protected final float speedInAir
@Nullable public FishingBobberEntity fishingBobber
public PlayerEntity(World worldIn, com.mojang.authlib.GameProfile gameProfileIn)
public boolean func_223729_a(World p_223729_1_, BlockPos p_223729_2_, GameType p_223729_3_)
protected void registerAttributes()
registerAttributes
in class LivingEntity
protected void registerData()
registerData
in class LivingEntity
public void tick()
tick
in class LivingEntity
public boolean func_226563_dT_()
protected boolean func_226564_dU_()
protected boolean func_226565_dV_()
protected boolean updateEyesInWaterPlayer()
protected CooldownTracker createCooldownTracker()
protected void updatePose()
public int getMaxInPortalTime()
getMaxInPortalTime
in class Entity
protected SoundEvent getSwimSound()
getSwimSound
in class Entity
protected SoundEvent getSplashSound()
getSplashSound
in class Entity
protected SoundEvent getHighspeedSplashSound()
getHighspeedSplashSound
in class Entity
public int getPortalCooldown()
getPortalCooldown
in class Entity
public void playSound(SoundEvent soundIn, float volume, float pitch)
public void playSound(SoundEvent p_213823_1_, SoundCategory p_213823_2_, float p_213823_3_, float p_213823_4_)
public SoundCategory getSoundCategory()
getSoundCategory
in class Entity
protected int getFireImmuneTicks()
getFireImmuneTicks
in class Entity
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class LivingEntity
public void closeScreen()
public void updateRidden()
updateRidden
in class LivingEntity
public void preparePlayerToSpawn()
preparePlayerToSpawn
in class Entity
protected void updateEntityActionState()
updateEntityActionState
in class LivingEntity
public void livingTick()
livingTick
in class LivingEntity
public int getScore()
public void setScore(int scoreIn)
public void addScore(int scoreIn)
public void onDeath(DamageSource cause)
onDeath
in class LivingEntity
protected void dropInventory()
dropInventory
in class LivingEntity
protected void destroyVanishingCursedItems()
protected SoundEvent getHurtSound(DamageSource damageSourceIn)
getHurtSound
in class LivingEntity
protected SoundEvent getDeathSound()
getDeathSound
in class LivingEntity
public boolean func_225609_n_(boolean p_225609_1_)
@Nullable public ItemEntity dropItem(ItemStack itemStackIn, boolean unused)
@Nullable public ItemEntity dropItem(ItemStack droppedItem, boolean dropAround, boolean traceItem)
@Deprecated public float getDigSpeed(BlockState state)
public float getDigSpeed(BlockState state, @Nullable BlockPos pos)
public boolean canHarvestBlock(BlockState state)
public void readAdditional(CompoundNBT compound)
readAdditional
in class LivingEntity
public void writeAdditional(CompoundNBT compound)
writeAdditional
in class LivingEntity
public boolean isInvulnerableTo(DamageSource source)
isInvulnerableTo
in class Entity
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class LivingEntity
protected void blockUsingShield(LivingEntity entityIn)
blockUsingShield
in class LivingEntity
public boolean canAttackPlayer(PlayerEntity other)
protected void damageArmor(float damage)
damageArmor
in class LivingEntity
protected void damageShield(float damage)
damageShield
in class LivingEntity
protected void damageEntity(DamageSource damageSrc, float damageAmount)
damageEntity
in class LivingEntity
public void openSignEditor(SignTileEntity signTile)
public void openMinecartCommandBlock(CommandBlockLogic commandBlock)
public void openCommandBlock(CommandBlockTileEntity commandBlock)
public void openStructureBlock(StructureBlockTileEntity structure)
public void openJigsaw(JigsawTileEntity p_213826_1_)
public void openHorseInventory(AbstractHorseEntity horse, IInventory inventoryIn)
public java.util.OptionalInt openContainer(@Nullable INamedContainerProvider p_213829_1_)
public void openMerchantContainer(int containerId, MerchantOffers offers, int level, int xp, boolean p_213818_5_, boolean p_213818_6_)
public ActionResultType interactOn(Entity entityToInteractOn, Hand hand)
public double getYOffset()
getYOffset
in class Entity
public void stopRiding()
stopRiding
in class LivingEntity
protected boolean isMovementBlocked()
isMovementBlocked
in class LivingEntity
protected Vec3d func_225514_a_(Vec3d p_225514_1_, MoverType p_225514_2_)
func_225514_a_
in class Entity
public void attackTargetEntityWithCurrentItem(Entity targetEntity)
protected void spinAttack(LivingEntity p_204804_1_)
spinAttack
in class LivingEntity
public void disableShield(boolean p_190777_1_)
public void onCriticalHit(Entity entityHit)
public void onEnchantmentCritical(Entity entityHit)
public void spawnSweepParticles()
public void respawnPlayer()
public void remove(boolean keepData)
remove
in class LivingEntity
public boolean isUser()
public com.mojang.authlib.GameProfile getGameProfile()
public com.mojang.datafixers.util.Either<PlayerEntity.SleepResult,Unit> trySleep(BlockPos at)
public void startSleeping(BlockPos p_213342_1_)
startSleeping
in class LivingEntity
public void func_225652_a_(boolean p_225652_1_, boolean p_225652_2_)
public void wakeUp()
wakeUp
in class LivingEntity
public static java.util.Optional<Vec3d> func_213822_a(IWorldReader p_213822_0_, BlockPos p_213822_1_, boolean p_213822_2_)
public boolean isPlayerFullyAsleep()
public int getSleepTimer()
public void sendStatusMessage(ITextComponent chatComponent, boolean actionBar)
@Deprecated public BlockPos getBedLocation()
public BlockPos getBedLocation(DimensionType dim)
dim
- The dimension to get the bed spawn for@Deprecated public boolean isSpawnForced()
public boolean isSpawnForced(DimensionType dim)
dim
- The dimension to get whether to check for a bed before spawning for@Deprecated public void func_226560_a_(BlockPos p_226560_1_, boolean p_226560_2_, boolean p_226560_3_)
public void setSpawnPoint(@Nullable BlockPos p_226560_1_, boolean p_226560_2_, boolean p_226560_3_, DimensionType dim)
dim
- Which dimension to apply the player-specific respawn point topublic void addStat(ResourceLocation stat)
public void addStat(ResourceLocation p_195067_1_, int p_195067_2_)
public void addStat(Stat<?> stat)
public void addStat(Stat<?> stat, int amount)
public void takeStat(Stat<?> stat)
public int unlockRecipes(java.util.Collection<IRecipe<?>> p_195065_1_)
public void unlockRecipes(ResourceLocation[] p_193102_1_)
public int resetRecipes(java.util.Collection<IRecipe<?>> p_195069_1_)
public void jump()
jump
in class LivingEntity
public void travel(Vec3d p_213352_1_)
travel
in class LivingEntity
public void updateSwimming()
updateSwimming
in class Entity
protected boolean isNormalCube(BlockPos pos)
public float getAIMoveSpeed()
getAIMoveSpeed
in class LivingEntity
public void addMovementStat(double p_71000_1_, double p_71000_3_, double p_71000_5_)
public boolean onLivingFall(float distance, float damageMultiplier)
onLivingFall
in class LivingEntity
public boolean func_226566_ei_()
public void func_226567_ej_()
public void func_226568_ek_()
protected void doWaterSplashEffect()
doWaterSplashEffect
in class Entity
protected SoundEvent getFallSound(int heightIn)
getFallSound
in class LivingEntity
public void onKillEntity(LivingEntity entityLivingIn)
onKillEntity
in class Entity
public void setMotionMultiplier(BlockState p_213295_1_, Vec3d p_213295_2_)
setMotionMultiplier
in class Entity
public void giveExperiencePoints(int p_195068_1_)
public int getXPSeed()
public void onEnchant(ItemStack enchantedItem, int cost)
public void addExperienceLevel(int levels)
public int xpBarCap()
public void addExhaustion(float exhaustion)
public FoodStats getFoodStats()
public boolean canEat(boolean ignoreHunger)
public boolean shouldHeal()
public boolean isAllowEdit()
protected int getExperiencePoints(PlayerEntity player)
getExperiencePoints
in class LivingEntity
protected boolean isPlayer()
isPlayer
in class LivingEntity
public boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender
in class LivingEntity
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
public void sendPlayerAbilities()
public void setGameType(GameType gameType)
public ITextComponent getName()
public EnderChestInventory getInventoryEnderChest()
public ItemStack getItemStackFromSlot(EquipmentSlotType slotIn)
getItemStackFromSlot
in class LivingEntity
public void setItemStackToSlot(EquipmentSlotType slotIn, ItemStack stack)
setItemStackToSlot
in class LivingEntity
public boolean addItemStackToInventory(ItemStack p_191521_1_)
public java.lang.Iterable<ItemStack> getHeldEquipment()
getHeldEquipment
in class Entity
public java.lang.Iterable<ItemStack> getArmorInventoryList()
getArmorInventoryList
in class LivingEntity
public boolean addShoulderEntity(CompoundNBT p_192027_1_)
protected void spawnShoulderEntities()
public abstract boolean isSpectator()
isSpectator
in class Entity
public boolean isSwimming()
isSwimming
in class Entity
public abstract boolean isCreative()
public boolean isPushedByWater()
isPushedByWater
in class Entity
public Scoreboard getWorldScoreboard()
public ITextComponent getDisplayName()
getDisplayName
in interface INameable
getDisplayName
in class Entity
public ITextComponent getDisplayNameAndUUID()
public java.lang.String getScoreboardName()
getScoreboardName
in class Entity
public float getStandingEyeHeight(Pose poseIn, EntitySize sizeIn)
getStandingEyeHeight
in class LivingEntity
public void setAbsorptionAmount(float amount)
setAbsorptionAmount
in class LivingEntity
public float getAbsorptionAmount()
getAbsorptionAmount
in class LivingEntity
public static java.util.UUID getUUID(com.mojang.authlib.GameProfile profile)
public static java.util.UUID getOfflineUUID(java.lang.String username)
public boolean isWearing(PlayerModelPart part)
public boolean replaceItemInInventory(int inventorySlot, ItemStack itemStackIn)
replaceItemInInventory
in class Entity
public boolean hasReducedDebug()
public void setReducedDebug(boolean reducedDebug)
public HandSide getPrimaryHand()
getPrimaryHand
in class LivingEntity
public void setPrimaryHand(HandSide hand)
public CompoundNBT getLeftShoulderEntity()
protected void setLeftShoulderEntity(CompoundNBT tag)
public CompoundNBT getRightShoulderEntity()
protected void setRightShoulderEntity(CompoundNBT tag)
public float getCooldownPeriod()
public float getCooledAttackStrength(float adjustTicks)
public void resetCooldown()
public CooldownTracker getCooldownTracker()
protected float getSpeedFactor()
getSpeedFactor
in class Entity
public float getLuck()
public boolean canUseCommandBlock()
public boolean canPickUpItem(ItemStack itemstackIn)
canPickUpItem
in class LivingEntity
public EntitySize getSize(Pose poseIn)
getSize
in class LivingEntity
public ItemStack findAmmo(ItemStack shootable)
findAmmo
in class LivingEntity
public ItemStack onFoodEaten(World p_213357_1_, ItemStack p_213357_2_)
onFoodEaten
in class LivingEntity
public DimensionType getSpawnDimension()
public void setSpawnDimenion(DimensionType dim)
public java.util.Collection<ITextComponent> getPrefixes()
public java.util.Collection<ITextComponent> getSuffixes()
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class LivingEntity