public abstract class EntityPlayer extends EntityLivingBase
Modifier and Type | Class and Description |
---|---|
static class |
EntityPlayer.EnumChatVisibility |
static class |
EntityPlayer.SleepResult |
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, field_208001_bq, field_208002_br, hurtTime, idleTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, LIVING_FLAGS, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, moveVertical, NAMETAG_DISTANCE, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, 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, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, world
Constructor and Description |
---|
EntityPlayer(World worldIn,
com.mojang.authlib.GameProfile gameProfileIn) |
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityAsMob, attemptTeleport, baseTick, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBeRiddenInWater, canBreatheUnderwater, canDropLoot, canEntityBeSeen, collideWithEntity, collideWithNearbyEntities, curePotionEffects, decreaseAirSupply, determineNextAir, dismountEntity, dropEquipment, dropFewItems, dropLoot, frostWalk, func_195061_cb, func_203010_cG, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getArrowCountInEntity, getAttackingEntity, getAttribute, getAttributeMap, getCombatTracker, getCreatureAttribute, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getMaxHealth, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwimAnimation, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getWaterSlowDown, getYaw, handleFluidJump, hasItemInSlot, heal, isActiveItemStackBlocking, isAlive, isChild, isElytraFlying, isEntityUndead, isHandActive, isOnLadder, isPotionActive, isPotionApplicable, isServerWorld, isSpinAttacking, knockBack, lerp, lookAt, markPotionsDirty, markVelocityChanged, moveRelative, notifyDataManagerChange, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, playHurtSound, remove, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setActiveHand, setAIMoveSpeed, setArrowCountInEntity, setHeadRotation, setHealth, setHeldItem, setJumping, setLastAttackedEntity, setLivingFlag, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, startSpinAttack, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateDistance, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateSpinAttack
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, awardKillScore, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, func_212321_a, getAdjustedHorizontalFacing, getAir, getBoundingBox, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDistance, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyePosition, getFlag, getForward, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMirroredYaw, getMountedYOffset, getParts, getPassengers, getPermissionLevel, getPitch, getPitchYaw, getPosition, getPositionVector, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSubmergedHeight, getTags, getTeam, getTeleportDirection, getType, getUniqueID, getVectorForRotation, handleFluidAcceleration, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCustomNameVisible, isEntityEqual, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPassenger, isPassenger, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, makeFlySound, move, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onRemovedFromWorld, onStruckByLightning, playFlySound, playStepSound, playSwimSound, processInitialInteract, pushOutOfBlocks, rayTrace, read, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setDropItemsWhenDead, setEntityId, setFire, setFlag, setGlowing, setInvisible, setInvulnerable, setLocationAndAngles, setNoGravity, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSize, setSneaking, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, toString, updatePassenger, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRiddenInWater, canRiderInteract, deserializeNBT, getEntity, getPickedResult, isCreatureType, serializeNBT, shouldRenderInPass, 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
protected static final DataParameter<java.lang.Byte> PLAYER_MODEL_FLAG
protected static final DataParameter<java.lang.Byte> MAIN_HAND
protected static final DataParameter<NBTTagCompound> LEFT_SHOULDER_ENTITY
protected static final DataParameter<NBTTagCompound> RIGHT_SHOULDER_ENTITY
public InventoryPlayer inventory
protected InventoryEnderChest enderChest
public Container inventoryContainer
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 sleeping
public BlockPos bedLocation
public float renderOffsetX
public float renderOffsetY
public float renderOffsetZ
protected boolean eyesInWaterPlayer
protected BlockPos spawnPos
protected boolean spawnForced
public PlayerCapabilities abilities
public int experienceLevel
public int experienceTotal
public float experience
protected int xpSeed
protected float speedInAir
@Nullable public EntityFishHook fishEntity
public EntityPlayer(World worldIn, com.mojang.authlib.GameProfile gameProfileIn)
protected void registerAttributes()
registerAttributes
in class EntityLivingBase
protected void registerData()
registerData
in class EntityLivingBase
public void tick()
tick
in class EntityLivingBase
protected boolean updateEyesInWaterPlayer()
protected CooldownTracker createCooldownTracker()
protected void updateSize()
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 SoundCategory getSoundCategory()
getSoundCategory
in class Entity
protected int getFireImmuneTicks()
getFireImmuneTicks
in class Entity
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class EntityLivingBase
protected boolean isMovementBlocked()
isMovementBlocked
in class EntityLivingBase
public void closeScreen()
public void updateRidden()
updateRidden
in class EntityLivingBase
public void preparePlayerToSpawn()
preparePlayerToSpawn
in class Entity
protected void updateEntityActionState()
updateEntityActionState
in class EntityLivingBase
public void livingTick()
livingTick
in class EntityLivingBase
public int getScore()
public void setScore(int scoreIn)
public void addScore(int scoreIn)
public void onDeath(DamageSource cause)
onDeath
in class EntityLivingBase
protected void destroyVanishingCursedItems()
protected SoundEvent getHurtSound(DamageSource damageSourceIn)
getHurtSound
in class EntityLivingBase
protected SoundEvent getDeathSound()
getDeathSound
in class EntityLivingBase
@Nullable public EntityItem dropItem(boolean dropAll)
@Nullable public EntityItem dropItem(ItemStack itemStackIn, boolean unused)
@Nullable public EntityItem dropItem(ItemStack droppedItem, boolean dropAround, boolean traceItem)
public ItemStack dropItemAndGetStack(EntityItem p_184816_1_)
@Deprecated public float getDigSpeed(IBlockState state)
public float getDigSpeed(IBlockState state, @Nullable BlockPos pos)
public boolean canHarvestBlock(IBlockState state)
public void readAdditional(NBTTagCompound compound)
readAdditional
in class EntityLivingBase
public void writeAdditional(NBTTagCompound compound)
writeAdditional
in class EntityLivingBase
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class EntityLivingBase
protected void blockUsingShield(EntityLivingBase p_190629_1_)
blockUsingShield
in class EntityLivingBase
public boolean canAttackPlayer(EntityPlayer other)
protected void damageArmor(float damage)
damageArmor
in class EntityLivingBase
protected void damageShield(float damage)
damageShield
in class EntityLivingBase
public float getArmorVisibility()
protected void damageEntity(DamageSource damageSrc, float damageAmount)
damageEntity
in class EntityLivingBase
public void openSignEditor(TileEntitySign signTile)
public void openMinecartCommandBlock(CommandBlockBaseLogic commandBlock)
public void openCommandBlock(TileEntityCommandBlock commandBlock)
public void openStructureBlock(TileEntityStructure structure)
public void displayVillagerTradeGui(IMerchant villager)
public void displayGUIChest(IInventory chestInventory)
public void openHorseInventory(AbstractHorse horse, IInventory inventoryIn)
public void displayGui(IInteractionObject guiOwner)
public EnumActionResult interactOn(Entity entityToInteractOn, EnumHand hand)
public double getYOffset()
getYOffset
in class Entity
public void stopRiding()
stopRiding
in class EntityLivingBase
public void attackTargetEntityWithCurrentItem(Entity targetEntity)
protected void spinAttack(EntityLivingBase p_204804_1_)
spinAttack
in class EntityLivingBase
public void disableShield(boolean p_190777_1_)
public void onCriticalHit(Entity entityHit)
public void onEnchantmentCritical(Entity entityHit)
public void spawnSweepParticles()
public void respawnPlayer()
public boolean isEntityInsideOpaqueBlock()
isEntityInsideOpaqueBlock
in class Entity
public boolean isUser()
public com.mojang.authlib.GameProfile getGameProfile()
public EntityPlayer.SleepResult trySleep(BlockPos bedLocation)
public void wakeUpPlayer(boolean immediately, boolean updateWorldFlag, boolean setSpawn)
@Nullable public static BlockPos getBedSpawnLocation(IBlockReader worldIn, BlockPos bedLocation, boolean forceSpawn)
public float getBedOrientationInDegrees()
public boolean isPlayerSleeping()
isPlayerSleeping
in class EntityLivingBase
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 setSpawnPoint(BlockPos pos, boolean forced)
public void setSpawnPoint(@Nullable BlockPos pos, boolean forced, 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 EntityLivingBase
public void travel(float strafe, float vertical, float forward)
travel
in class EntityLivingBase
public void updateSwimming()
updateSwimming
in class Entity
protected boolean func_207402_f(BlockPos p_207402_1_)
protected boolean isNormalCube(BlockPos pos)
public float getAIMoveSpeed()
getAIMoveSpeed
in class EntityLivingBase
public void addMovementStat(double p_71000_1_, double p_71000_3_, double p_71000_5_)
public void fall(float distance, float damageMultiplier)
fall
in class EntityLivingBase
protected void doWaterSplashEffect()
doWaterSplashEffect
in class Entity
protected SoundEvent getFallSound(int heightIn)
getFallSound
in class EntityLivingBase
public void onKillEntity(EntityLivingBase entityLivingIn)
onKillEntity
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()
public boolean canPlayerEdit(BlockPos pos, EnumFacing facing, ItemStack stack)
protected int getExperiencePoints(EntityPlayer player)
getExperiencePoints
in class EntityLivingBase
protected boolean isPlayer()
isPlayer
in class EntityLivingBase
public boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender
in class EntityLivingBase
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
public void sendPlayerAbilities()
public void setGameType(GameType gameType)
public ITextComponent getName()
public InventoryEnderChest getInventoryEnderChest()
public ItemStack getItemStackFromSlot(EntityEquipmentSlot slotIn)
getItemStackFromSlot
in class EntityLivingBase
public void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack)
setItemStackToSlot
in class EntityLivingBase
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 EntityLivingBase
public boolean addShoulderEntity(NBTTagCompound p_192027_1_)
protected void spawnShoulderEntities()
public boolean isInvisibleToPlayer(EntityPlayer player)
isInvisibleToPlayer
in class Entity
public abstract boolean isSpectator()
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 func_208017_dF()
public java.lang.String getScoreboardName()
getScoreboardName
in class Entity
public float getEyeHeight()
getEyeHeight
in class Entity
public void setAbsorptionAmount(float amount)
setAbsorptionAmount
in class EntityLivingBase
public float getAbsorptionAmount()
getAbsorptionAmount
in class EntityLivingBase
public static java.util.UUID getUUID(com.mojang.authlib.GameProfile profile)
public static java.util.UUID getOfflineUUID(java.lang.String username)
public boolean canOpen(LockCode code)
public boolean isWearing(EnumPlayerModelParts part)
public boolean replaceItemInInventory(int inventorySlot, ItemStack itemStackIn)
replaceItemInInventory
in class Entity
public boolean hasReducedDebug()
public void setReducedDebug(boolean reducedDebug)
public EnumHandSide getPrimaryHand()
getPrimaryHand
in class EntityLivingBase
public void setPrimaryHand(EnumHandSide hand)
public NBTTagCompound getLeftShoulderEntity()
protected void setLeftShoulderEntity(NBTTagCompound tag)
public NBTTagCompound getRightShoulderEntity()
protected void setRightShoulderEntity(NBTTagCompound tag)
public float getCooldownPeriod()
public float getCooledAttackStrength(float adjustTicks)
public void resetCooldown()
public CooldownTracker getCooldownTracker()
public void applyEntityCollision(Entity entityIn)
applyEntityCollision
in class Entity
public float getLuck()
public boolean canUseCommandBlock()
public float getDefaultEyeHeight()
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 EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class EntityLivingBase