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_) |
private void |
addMountedMovementStat(double p_71015_1_,
double p_71015_3_,
double p_71015_5_) |
void |
addMovementStat(double p_71000_1_,
double p_71000_3_,
double p_71000_5_) |
private void |
addParticlesAroundSelf(IParticleData p_213824_1_) |
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) |
private ITextComponent |
addTellEvent(ITextComponent p_208016_1_) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
void |
attackTargetEntityWithCurrentItem(Entity targetEntity) |
private boolean |
bedBlocked(BlockPos p_213828_1_,
Direction p_213828_2_) |
private boolean |
bedInRange(BlockPos p_190774_1_,
Direction p_190774_2_) |
boolean |
blockActionRestricted(World worldIn,
BlockPos pos,
GameType gameMode) |
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() |
static java.util.Optional<Vec3d> |
checkBedValidRespawnPosition(IWorldReader p_213822_0_,
BlockPos p_213822_1_,
boolean p_213822_2_) |
void |
closeScreen() |
private void |
collideWithPlayer(Entity entityIn) |
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() |
boolean |
drop(boolean p_225609_1_) |
protected void |
dropInventory() |
ItemEntity |
dropItem(ItemStack itemStackIn,
boolean unused) |
ItemEntity |
dropItem(ItemStack droppedItem,
boolean dropAround,
boolean traceItem) |
ItemStack |
findAmmo(ItemStack shootable) |
private boolean |
func_230126_g_(BlockPos p_230126_1_) |
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 |
isSecondaryUseActive() |
boolean |
isSpawnForced()
Deprecated.
|
boolean |
isSpawnForced(DimensionType dim)
A dimension aware version of isSpawnForced.
|
abstract boolean |
isSpectator() |
protected boolean |
isStayingOnGroundSurface() |
boolean |
isSwimming() |
boolean |
isUser() |
boolean |
isWearing(PlayerModelPart part) |
void |
jump() |
void |
livingTick() |
protected Vec3d |
maybeBackOffFromEdge(Vec3d p_225514_1_,
MoverType p_225514_2_) |
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) |
private void |
playShoulderEntityAmbientSound(CompoundNBT p_192028_1_) |
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) |
void |
refreshDisplayName()
Force the displayed name to refresh, by firing
PlayerEvent.NameFormat , using the real player name as event parameter. |
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 state,
Vec3d motionMultiplierIn) |
void |
setPrimaryHand(HandSide hand) |
void |
setReducedDebug(boolean reducedDebug) |
void |
setRespawnPosition(BlockPos p_226560_1_,
boolean p_226560_2_,
boolean p_226560_3_)
Deprecated.
|
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() |
private void |
spawnShoulderEntity(CompoundNBT p_192026_1_) |
void |
spawnSweepParticles() |
protected void |
spinAttack(LivingEntity p_204804_1_) |
void |
startFallFlying() |
void |
startSleeping(BlockPos pos) |
void |
stopFallFlying() |
void |
stopRiding() |
void |
stopSleepInBed(boolean p_225652_1_,
boolean p_225652_2_) |
void |
takeStat(Stat<?> stat) |
void |
tick() |
void |
travel(Vec3d p_213352_1_) |
com.mojang.datafixers.util.Either<PlayerEntity.SleepResult,Unit> |
trySleep(BlockPos at) |
boolean |
tryToStartFallFlying() |
int |
unlockRecipes(java.util.Collection<IRecipe<?>> p_195065_1_) |
void |
unlockRecipes(ResourceLocation[] p_193102_1_) |
private void |
updateCape() |
protected void |
updateEntityActionState() |
protected boolean |
updateEyesInWaterPlayer() |
protected void |
updatePose() |
void |
updateRidden() |
void |
updateSwimming() |
private void |
updateTurtleHelmet() |
void |
wakeUp() |
protected boolean |
wantsToStopRiding() |
void |
writeAdditional(CompoundNBT compound) |
int |
xpBarCap() |
addPotionEffect, applyArmorCalculations, applyEntityCollision, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityAsMob, attemptTeleport, baseTick, calculateFallDamage, canAttack, canAttack, canAttack, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBeRiddenInWater, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, clearBedPosition, collideWithEntity, collideWithNearbyEntities, constructKnockBackVector, createBrain, createSpawnPacket, createWitherRose, curePotionEffects, decreaseAirSupply, determineNextAir, dropExperience, dropLoot, dropSpecialItems, frostWalk, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getArmorCoverPercentage, 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, isSuppressingSlidingDownLadder, 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, swing, swingArm, triggerItemUseEffects, 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, 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, getProfessionName, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getSelfAndPassengers, 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, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isSteppingCarefully, isSuppressingBounce, isVisuallySwimming, isWet, makeFlySound, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onRemovedFromWorld, onStruckByLightning, pick, playFlySound, playStepSound, playSwimSound, positionRider, processInitialInteract, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, repositionDirectPassengers, 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
private static final java.util.Map<Pose,EntitySize> SIZE_BY_POSE
private static final DataParameter<java.lang.Float> ABSORPTION
private static final DataParameter<java.lang.Integer> PLAYER_SCORE
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
private long timeEntitySatOnShoulder
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
private int sleepTimer
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
private int lastXPSound
private final com.mojang.authlib.GameProfile gameProfile
private boolean hasReducedDebug
private ItemStack itemStackMainHand
private final CooldownTracker cooldownTracker
@Nullable public FishingBobberEntity fishingBobber
private DimensionType spawnDimension
private final java.util.Collection<ITextComponent> prefixes
private final java.util.Collection<ITextComponent> suffixes
private ITextComponent displayname
private final LazyOptional<IItemHandler> playerMainHandler
private final LazyOptional<IItemHandler> playerEquipmentHandler
private final LazyOptional<IItemHandler> playerJoinedHandler
public PlayerEntity(World worldIn, com.mojang.authlib.GameProfile gameProfileIn)
public boolean blockActionRestricted(World worldIn, BlockPos pos, GameType gameMode)
protected void registerAttributes()
registerAttributes
in class LivingEntity
protected void registerData()
registerData
in class LivingEntity
public void tick()
tick
in class LivingEntity
public boolean isSecondaryUseActive()
protected boolean wantsToStopRiding()
protected boolean isStayingOnGroundSurface()
protected boolean updateEyesInWaterPlayer()
private void updateTurtleHelmet()
protected CooldownTracker createCooldownTracker()
private void updateCape()
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
private void addParticlesAroundSelf(IParticleData p_213824_1_)
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
private void playShoulderEntityAmbientSound(@Nullable CompoundNBT p_192028_1_)
private void collideWithPlayer(Entity entityIn)
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 drop(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 maybeBackOffFromEdge(Vec3d p_225514_1_, MoverType p_225514_2_)
maybeBackOffFromEdge
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 pos)
startSleeping
in class LivingEntity
private boolean func_230126_g_(BlockPos p_230126_1_)
public void stopSleepInBed(boolean p_225652_1_, boolean p_225652_2_)
public void wakeUp()
wakeUp
in class LivingEntity
public static java.util.Optional<Vec3d> checkBedValidRespawnPosition(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 setRespawnPosition(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)
pos
- The spawn point to set as the player-specific spawn point for the dimensionforced
- Whether or not the respawn code should check for a bed at this location (true means it won't check for a bed)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_)
private void addMountedMovementStat(double p_71015_1_, double p_71015_3_, double p_71015_5_)
public boolean onLivingFall(float distance, float damageMultiplier)
onLivingFall
in class LivingEntity
public boolean tryToStartFallFlying()
public void startFallFlying()
public void stopFallFlying()
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 state, Vec3d motionMultiplierIn)
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()
private void spawnShoulderEntity(CompoundNBT p_192026_1_)
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()
private ITextComponent addTellEvent(ITextComponent p_208016_1_)
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 void refreshDisplayName()
PlayerEvent.NameFormat
, using the real player name as event parameter.public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class LivingEntity