public abstract class EntityPlayer extends EntityLivingBase
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityPlayer.EnumChatVisibility |
static class |
EntityPlayer.SleepResult |
| Modifier and Type | Field and Description |
|---|---|
BlockPos |
bedLocation
The location of the bed the player is sleeping in, or
null if they are not sleeping |
float |
cameraYaw |
PlayerCapabilities |
capabilities
The player's capabilities.
|
double |
chasingPosX
Current X position of the player's cape
|
double |
chasingPosY
Current Y position of the player's cape
|
double |
chasingPosZ
Current Z position of the player's cape
|
protected InventoryEnderChest |
enderChest |
float |
experience
The current amount of experience the player has within their Experience Bar.
|
int |
experienceLevel
The current experience level the player is on.
|
int |
experienceTotal
The total amount of experience the player has.
|
float |
eyeHeight |
EntityFishHook |
fishEntity
An instance of a fishing rod's hook.
|
protected int |
flyToggleTimer
Used to tell if the player pressed jump twice.
|
protected FoodStats |
foodStats
The food object of the player, the general hunger logic.
|
InventoryPlayer |
inventory
Inventory of the player
|
Container |
inventoryContainer
The Container for the player's inventory (which opens when they press E)
|
protected static DataParameter<NBTTagCompound> |
LEFT_SHOULDER_ENTITY |
protected static DataParameter<java.lang.Byte> |
MAIN_HAND |
Container |
openContainer
The Container the player has open.
|
static java.lang.String |
PERSISTED_NBT_TAG |
protected static DataParameter<java.lang.Byte> |
PLAYER_MODEL_FLAG |
float |
prevCameraYaw |
double |
prevChasingPosX
Previous X position of the player's cape
|
double |
prevChasingPosY
Previous Y position of the player's cape
|
double |
prevChasingPosZ
Previous Z position of the player's cape
|
static IAttribute |
REACH_DISTANCE |
float |
renderOffsetX
Offset in the X axis used for rendering.
|
float |
renderOffsetY
Offset in the Y axis used for rendering.
|
float |
renderOffsetZ
Offset in the Z axis used for rendering.
|
protected static DataParameter<NBTTagCompound> |
RIGHT_SHOULDER_ENTITY |
protected boolean |
sleeping
Boolean value indicating weather a player is sleeping or not
|
protected java.util.HashMap<java.lang.Integer,BlockPos> |
spawnChunkMap |
protected boolean |
spawnForced
Whether this player's spawn point is forced, preventing execution of bed checks.
|
protected java.util.HashMap<java.lang.Integer,java.lang.Boolean> |
spawnForcedMap |
protected BlockPos |
spawnPos
holds the spawn chunk of the player
|
protected float |
speedInAir |
int |
xpCooldown
Used by EntityPlayer to prevent too many xp orbs from getting absorbed at once.
|
protected int |
xpSeed |
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, HAND_STATES, hurtTime, idleTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, moveVertical, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, SWIM_SPEED, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, updateBlocked, velocityChanged, width, world| Constructor and Description |
|---|
EntityPlayer(World worldIn,
GameProfile gameProfileIn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExhaustion(float exhaustion)
increases exhaustion level by supplied amount
|
void |
addExperience(int amount)
Add experience points to player.
|
void |
addExperienceLevel(int levels)
Add experience levels to this player.
|
boolean |
addItemStackToInventory(ItemStack p_191521_1_) |
void |
addMovementStat(double p_71000_1_,
double p_71000_3_,
double p_71000_5_)
Adds a value to a movement statistic field - like run, walk, swin or climb.
|
void |
addPrefix(ITextComponent prefix)
Add a prefix to the player's username in chat
|
void |
addScore(int scoreIn)
Add to player's score
|
boolean |
addShoulderEntity(NBTTagCompound p_192027_1_) |
void |
addStat(StatBase stat)
Add a stat once
|
void |
addStat(StatBase stat,
int amount)
Adds a value to a statistic field.
|
void |
addSuffix(ITextComponent suffix)
Add a suffix to the player's username in chat
|
protected void |
applyEntityAttributes() |
void |
applyEntityCollision(Entity entityIn)
Applies a velocity to the entities, to push them away from eachother.
|
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
void |
attackTargetEntityWithCurrentItem(Entity targetEntity)
Attacks for the player the targeted entity with the currently equipped item.
|
protected void |
blockUsingShield(EntityLivingBase p_190629_1_) |
boolean |
canAttackPlayer(EntityPlayer other) |
boolean |
canEat(boolean ignoreHunger) |
boolean |
canHarvestBlock(IBlockState state) |
boolean |
canOpen(LockCode code)
Check whether this player can open an inventory locked with the given LockCode.
|
boolean |
canPlayerEdit(BlockPos pos,
EnumFacing facing,
ItemStack stack)
Returns whether this player can modify the block at a certain location with the given stack.
|
protected boolean |
canTriggerWalking()
returns if this entity triggers Block.onEntityWalking on the blocks they walk on.
|
boolean |
canUseCommandBlock()
Can the player use command blocks.
|
void |
closeScreen()
set current crafting inventory back to the 2x2 square
|
protected CooldownTracker |
createCooldownTracker() |
protected void |
damageArmor(float damage) |
protected void |
damageEntity(DamageSource damageSrc,
float damageAmount)
Deals damage to the entity.
|
protected void |
damageShield(float damage) |
protected void |
destroyVanishingCursedItems() |
void |
disableShield(boolean p_190777_1_) |
void |
dismountRidingEntity()
Dismounts this entity from the entity it is riding.
|
void |
displayGui(IInteractionObject guiOwner) |
void |
displayGUIChest(IInventory chestInventory)
Displays the GUI for interacting with a chest inventory.
|
void |
displayGuiCommandBlock(TileEntityCommandBlock commandBlock) |
void |
displayGuiEditCommandCart(CommandBlockBaseLogic commandBlock) |
void |
displayVillagerTradeGui(IMerchant villager) |
protected void |
doWaterSplashEffect()
|
EntityItem |
dropItem(boolean dropAll)
Drop one item out of the currently selected stack if
dropAll is false. |
EntityItem |
dropItem(ItemStack itemStackIn,
boolean unused)
Drops an item into the world.
|
EntityItem |
dropItem(ItemStack droppedItem,
boolean dropAround,
boolean traceItem) |
ItemStack |
dropItemAndGetStack(EntityItem p_184816_1_) |
protected void |
entityInit() |
void |
fall(float distance,
float damageMultiplier) |
float |
getAbsorptionAmount()
Returns the amount of health added by the Absorption effect.
|
float |
getAIMoveSpeed()
the movespeed used for the new AI system
|
boolean |
getAlwaysRenderNameTagForRender() |
java.lang.Iterable<ItemStack> |
getArmorInventoryList() |
float |
getArmorVisibility()
When searching for vulnerable players, if a player is invisible, the return value of this is the chance of seeing
them anyway.
|
BlockPos |
getBedLocation() |
BlockPos |
getBedLocation(int dimension)
A dimension aware version of getBedLocation.
|
float |
getBedOrientationInDegrees()
Returns the orientation of the bed in degrees.
|
static BlockPos |
getBedSpawnLocation(World worldIn,
BlockPos bedLocation,
boolean forceSpawn)
Return null if bed is invalid
|
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
float |
getCooldownPeriod() |
CooldownTracker |
getCooldownTracker() |
float |
getCooledAttackStrength(float adjustTicks)
Returns the percentage of attack power available based on the cooldown (zero to one).
|
protected SoundEvent |
getDeathSound() |
float |
getDefaultEyeHeight()
Returns the default eye height of the player
|
float |
getDigSpeed(IBlockState state)
Deprecated.
|
float |
getDigSpeed(IBlockState state,
BlockPos pos) |
ITextComponent |
getDisplayName()
Get the formatted ChatComponent that will be used for the sender's username in chat
|
java.lang.String |
getDisplayNameString()
Get the currently computed display name, cached for efficiency.
|
protected int |
getExperiencePoints(EntityPlayer player)
Get the experience points the entity currently has.
|
float |
getEyeHeight() |
protected SoundEvent |
getFallSound(int heightIn) |
protected int |
getFireImmuneTicks() |
FoodStats |
getFoodStats()
Returns the player's FoodStats object.
|
GameProfile |
getGameProfile()
Returns the GameProfile for this player
|
java.lang.Iterable<ItemStack> |
getHeldEquipment() |
protected SoundEvent |
getHurtSound(DamageSource damageSourceIn) |
InventoryEnderChest |
getInventoryEnderChest()
Returns the InventoryEnderChest of this player.
|
ItemStack |
getItemStackFromSlot(EntityEquipmentSlot slotIn) |
NBTTagCompound |
getLeftShoulderEntity() |
float |
getLuck() |
int |
getMaxInPortalTime()
Return the amount of time this entity should stay in a portal before being transported.
|
java.lang.String |
getName()
Get the name of this object.
|
static java.util.UUID |
getOfflineUUID(java.lang.String username) |
int |
getPortalCooldown()
Return the amount of cooldown before this entity can use a portal again.
|
java.util.Collection<ITextComponent> |
getPrefixes() |
EnumHandSide |
getPrimaryHand() |
NBTTagCompound |
getRightShoulderEntity() |
int |
getScore() |
int |
getSleepTimer() |
SoundCategory |
getSoundCategory() |
int |
getSpawnDimension() |
protected SoundEvent |
getSplashSound() |
java.util.Collection<ITextComponent> |
getSuffixes() |
protected SoundEvent |
getSwimSound() |
Team |
getTeam() |
static java.util.UUID |
getUUID(GameProfile profile)
Gets a players UUID given their GameProfie
|
Scoreboard |
getWorldScoreboard() |
int |
getXPSeed() |
double |
getYOffset()
Returns the Y Offset of this entity.
|
void |
handleStatusUpdate(byte id)
|
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
boolean |
hasReducedDebug()
Whether the "reducedDebugInfo" option is active for this player.
|
boolean |
hasSpawnDimension() |
EnumActionResult |
interactOn(Entity p_190775_1_,
EnumHand p_190775_2_) |
boolean |
isAllowEdit() |
abstract boolean |
isCreative() |
boolean |
isEntityInsideOpaqueBlock()
Checks if this entity is inside of an opaque block
|
boolean |
isInvisibleToPlayer(EntityPlayer player)
Only used by renderer in EntityLivingBase subclasses.
|
protected boolean |
isMovementBlocked()
Dead and sleeping entities cannot move
|
protected boolean |
isPlayer()
Only use is to identify if class is an instance of player for experience dropping
|
boolean |
isPlayerFullyAsleep()
Returns whether or not the player is asleep and the screen has fully faded.
|
boolean |
isPlayerSleeping()
Returns whether player is sleeping or not
|
boolean |
isPushedByWater() |
boolean |
isSpawnForced()
Deprecated.
|
boolean |
isSpawnForced(int dimension)
A dimension aware version of isSpawnForced.
|
abstract boolean |
isSpectator()
Returns true if the player is in spectator mode.
|
boolean |
isUser()
returns true if this is an EntityPlayerSP, or the logged in player.
|
boolean |
isWearing(EnumPlayerModelParts part) |
void |
jump()
Causes this entity to do an upwards motion (jumping).
|
void |
onCriticalHit(Entity entityHit)
Called when the entity is dealt a critical hit.
|
void |
onDeath(DamageSource cause)
Called when the mob's health reaches 0.
|
void |
onEnchant(ItemStack enchantedItem,
int cost) |
void |
onEnchantmentCritical(Entity entityHit) |
void |
onKillEntity(EntityLivingBase entityLivingIn)
This method gets called when the entity kills another one.
|
void |
onLivingUpdate()
Called frequently so the entity can update its state every tick as required.
|
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
openBook(ItemStack stack,
EnumHand hand) |
void |
openEditSign(TileEntitySign signTile) |
void |
openEditStructure(TileEntityStructure structure) |
void |
openGui(java.lang.Object mod,
int modGuiId,
World world,
int x,
int y,
int z)
Opens a GUI with this player, uses FML's IGuiHandler system.
|
void |
openGuiHorseInventory(AbstractHorse horse,
IInventory inventoryIn) |
void |
playSound(SoundEvent soundIn,
float volume,
float pitch) |
void |
preparePlayerToSpawn()
Keeps moving the entity up so it isn't colliding with blocks and other requirements for this entity to be spawned
(only actually used on players though its also on Entity)
|
void |
readEntityFromNBT(NBTTagCompound compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
refreshDisplayName()
Force the displayed name to refresh
|
static void |
registerFixesPlayer(DataFixer fixer) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
resetCooldown() |
void |
resetRecipes(java.util.List<IRecipe> p_192022_1_) |
void |
respawnPlayer() |
boolean |
sendCommandFeedback()
Returns true if the command sender should be sent feedback about executed commands
|
void |
sendPlayerAbilities()
Sends the player's abilities to the server (if there is one).
|
void |
sendStatusMessage(ITextComponent chatComponent,
boolean actionBar) |
void |
setAbsorptionAmount(float amount) |
void |
setDead()
Will get destroyed next tick.
|
void |
setGameType(GameType gameType)
Sets the player's game mode and sends it to them.
|
void |
setInWeb()
Sets the Entity inside a web block.
|
void |
setItemStackToSlot(EntityEquipmentSlot slotIn,
ItemStack stack) |
protected void |
setLeftShoulderEntity(NBTTagCompound tag) |
void |
setPrimaryHand(EnumHandSide hand) |
void |
setReducedDebug(boolean reducedDebug) |
protected void |
setRightShoulderEntity(NBTTagCompound tag) |
void |
setScore(int scoreIn)
Set player's score
|
void |
setSpawnChunk(BlockPos pos,
boolean forced,
int dimension)
A dimension aware version of setSpawnChunk.
|
void |
setSpawnDimension(java.lang.Integer dimension) |
void |
setSpawnPoint(BlockPos pos,
boolean forced) |
boolean |
shouldHeal()
Checks if the player's health is not full and not zero.
|
protected void |
spawnShoulderEntities() |
void |
spawnSweepParticles() |
void |
takeStat(StatBase stat) |
void |
travel(float strafe,
float vertical,
float forward) |
EntityPlayer.SleepResult |
trySleep(BlockPos bedLocation) |
void |
unlockRecipes(java.util.List<IRecipe> p_192021_1_) |
void |
unlockRecipes(ResourceLocation[] p_193102_1_) |
protected void |
updateEntityActionState() |
void |
updateRidden()
Handles updating while riding another entity
|
protected void |
updateSize() |
void |
wakeUpPlayer(boolean immediately,
boolean updateWorldFlag,
boolean setSpawn)
Wake up the player if they're sleeping.
|
void |
writeEntityToNBT(NBTTagCompound compound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
int |
xpBarCap()
This method returns the cap amount of experience that the experience bar can hold.
|
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityAsMob, attemptTeleport, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, decreaseAirSupply, dismountEntity, dropEquipment, dropFewItems, dropLoot, frostWalk, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getArrowCountInEntity, getAttackingEntity, getAttributeMap, getCombatTracker, getCreatureAttribute, getEntityAttribute, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getLook, getMaxHealth, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getWaterSlowDown, handleJumpLava, handleJumpWater, hasItemInSlot, heal, isActiveItemStackBlocking, isChild, isElytraFlying, isEntityAlive, isEntityUndead, isHandActive, isOnLadder, isPotionActive, isPotionApplicable, isServerWorld, knockBack, markPotionsDirty, markVelocityChanged, moveRelative, notifyDataManagerChange, onChangedPotionEffect, onDeathUpdate, onEntityUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, playHurtSound, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setActiveHand, setAIMoveSpeed, setArrowCountInEntity, setHealth, setHeldItem, setJumping, setLastAttackedEntity, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateDistance, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadataaddEntityCrashInfo, addPassenger, addTag, addTrackingPlayer, addVelocity, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, awardKillScore, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canUseCommand, changeDimension, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDistance, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getFlag, getForward, getHorizontalFacing, getHoverEvent, getIsInvulnerable, getLastPortalVec, getLookVec, getLowestRidingEntity, getMaxFallHeight, getMirroredYaw, getMountedYOffset, getParts, getPassengers, getPersistentID, getPickedResult, getPitchYaw, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getTags, getTeleportDirection, getUniqueID, getVectorForRotation, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hitByEntity, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isOverWater, isPassenger, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, makeFlySound, move, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onInsideBlock, onRemovedFromWorld, onStruckByLightning, playFlySound, playStepSound, processInitialInteract, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetEntityId, resetPositionToBB, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setCommandStat, setCommandStats, setCustomNameTag, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setLocationAndAngles, setNoGravity, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSize, setSneaking, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, toString, turn, updatePassenger, writeToNBT, writeToNBTAtomically, writeToNBTOptionalpublic static final java.lang.String PERSISTED_NBT_TAG
protected java.util.HashMap<java.lang.Integer,BlockPos> spawnChunkMap
protected java.util.HashMap<java.lang.Integer,java.lang.Boolean> spawnForcedMap
public float eyeHeight
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
null if they are not sleepingpublic float renderOffsetX
public float renderOffsetY
EntityOtherPlayerMP.onUpdate()).public float renderOffsetZ
protected BlockPos spawnPos
protected boolean spawnForced
public PlayerCapabilities capabilities
public int experienceLevel
public int experienceTotal
public float experience
protected int xpSeed
protected float speedInAir
public EntityFishHook fishEntity
public EntityPlayer(World worldIn, GameProfile gameProfileIn)
protected CooldownTracker createCooldownTracker()
protected void applyEntityAttributes()
applyEntityAttributes in class EntityLivingBaseprotected void entityInit()
entityInit in class EntityLivingBasepublic void onUpdate()
onUpdate in class EntityLivingBaseprotected void updateSize()
public int getMaxInPortalTime()
getMaxInPortalTime in class Entityprotected SoundEvent getSwimSound()
getSwimSound in class Entityprotected SoundEvent getSplashSound()
getSplashSound in class Entitypublic int getPortalCooldown()
getPortalCooldown in class Entitypublic void playSound(SoundEvent soundIn, float volume, float pitch)
public SoundCategory getSoundCategory()
getSoundCategory in class Entityprotected int getFireImmuneTicks()
getFireImmuneTicks in class Entitypublic void handleStatusUpdate(byte id)
handleStatusUpdate in class EntityLivingBaseprotected boolean isMovementBlocked()
isMovementBlocked in class EntityLivingBasepublic void closeScreen()
public void updateRidden()
updateRidden in class EntityLivingBasepublic void preparePlayerToSpawn()
preparePlayerToSpawn in class Entityprotected void updateEntityActionState()
updateEntityActionState in class EntityLivingBasepublic void onLivingUpdate()
onLivingUpdate in class EntityLivingBasepublic int getScore()
public void setScore(int scoreIn)
public void addScore(int scoreIn)
public void onDeath(DamageSource cause)
onDeath in class EntityLivingBaseprotected void destroyVanishingCursedItems()
protected SoundEvent getHurtSound(DamageSource damageSourceIn)
getHurtSound in class EntityLivingBaseprotected SoundEvent getDeathSound()
getDeathSound in class EntityLivingBasepublic EntityItem dropItem(boolean dropAll)
dropAll is false. If dropItem is true the
entire stack is dropped.public EntityItem dropItem(ItemStack itemStackIn, boolean unused)
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, BlockPos pos)
public boolean canHarvestBlock(IBlockState state)
public static void registerFixesPlayer(DataFixer fixer)
public void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT in class EntityLivingBasepublic void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT in class EntityLivingBasepublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom in class EntityLivingBaseprotected void blockUsingShield(EntityLivingBase p_190629_1_)
blockUsingShield in class EntityLivingBasepublic boolean canAttackPlayer(EntityPlayer other)
protected void damageArmor(float damage)
damageArmor in class EntityLivingBaseprotected void damageShield(float damage)
damageShield in class EntityLivingBasepublic float getArmorVisibility()
protected void damageEntity(DamageSource damageSrc, float damageAmount)
damageEntity in class EntityLivingBasepublic void openEditSign(TileEntitySign signTile)
public void displayGuiEditCommandCart(CommandBlockBaseLogic commandBlock)
public void displayGuiCommandBlock(TileEntityCommandBlock commandBlock)
public void openEditStructure(TileEntityStructure structure)
public void displayVillagerTradeGui(IMerchant villager)
public void displayGUIChest(IInventory chestInventory)
public void openGuiHorseInventory(AbstractHorse horse, IInventory inventoryIn)
public void displayGui(IInteractionObject guiOwner)
public EnumActionResult interactOn(Entity p_190775_1_, EnumHand p_190775_2_)
public double getYOffset()
getYOffset in class Entitypublic void dismountRidingEntity()
dismountRidingEntity in class EntityLivingBasepublic void attackTargetEntityWithCurrentItem(Entity targetEntity)
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 Entitypublic boolean isUser()
public GameProfile getGameProfile()
public EntityPlayer.SleepResult trySleep(BlockPos bedLocation)
public void wakeUpPlayer(boolean immediately,
boolean updateWorldFlag,
boolean setSpawn)
public static BlockPos getBedSpawnLocation(World worldIn, BlockPos bedLocation, boolean forceSpawn)
public float getBedOrientationInDegrees()
public boolean isPlayerSleeping()
isPlayerSleeping in class EntityLivingBasepublic boolean isPlayerFullyAsleep()
public int getSleepTimer()
public void sendStatusMessage(ITextComponent chatComponent, boolean actionBar)
public BlockPos getBedLocation()
@Deprecated public boolean isSpawnForced()
public void setSpawnPoint(BlockPos pos, boolean forced)
public void addStat(StatBase stat)
public void addStat(StatBase stat, int amount)
public void takeStat(StatBase stat)
public void unlockRecipes(java.util.List<IRecipe> p_192021_1_)
public void unlockRecipes(ResourceLocation[] p_193102_1_)
public void resetRecipes(java.util.List<IRecipe> p_192022_1_)
public void jump()
jump in class EntityLivingBasepublic void travel(float strafe,
float vertical,
float forward)
travel in class EntityLivingBasepublic float getAIMoveSpeed()
getAIMoveSpeed in class EntityLivingBasepublic void addMovementStat(double p_71000_1_,
double p_71000_3_,
double p_71000_5_)
public void fall(float distance,
float damageMultiplier)
fall in class EntityLivingBaseprotected void doWaterSplashEffect()
doWaterSplashEffect in class Entityprotected SoundEvent getFallSound(int heightIn)
getFallSound in class EntityLivingBasepublic void onKillEntity(EntityLivingBase entityLivingIn)
onKillEntity in class Entitypublic void setInWeb()
public void addExperience(int amount)
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)
The position being queried is pos.offset(facing.getOpposite())).
pos - a position adjacent to the queried positionfacing - the direction from the queried location to (that is, pointing away from the location queried)
posstack - the ItemStack that would be used to edit the worldItemStack.canPlaceOn(Block),
ItemStack.canEditBlocks(),
PlayerCapabilities.allowEditprotected int getExperiencePoints(EntityPlayer player)
getExperiencePoints in class EntityLivingBaseprotected boolean isPlayer()
isPlayer in class EntityLivingBasepublic boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender in class EntityLivingBaseprotected boolean canTriggerWalking()
canTriggerWalking in class Entitypublic void sendPlayerAbilities()
public void setGameType(GameType gameType)
public java.lang.String getName()
getName in interface ICommandSendergetName in class Entitypublic InventoryEnderChest getInventoryEnderChest()
public ItemStack getItemStackFromSlot(EntityEquipmentSlot slotIn)
getItemStackFromSlot in class EntityLivingBasepublic void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack)
setItemStackToSlot in class EntityLivingBasepublic boolean addItemStackToInventory(ItemStack p_191521_1_)
public java.lang.Iterable<ItemStack> getHeldEquipment()
getHeldEquipment in class Entitypublic java.lang.Iterable<ItemStack> getArmorInventoryList()
getArmorInventoryList in class EntityLivingBasepublic boolean addShoulderEntity(NBTTagCompound p_192027_1_)
protected void spawnShoulderEntities()
public boolean isInvisibleToPlayer(EntityPlayer player)
isInvisibleToPlayer in class Entitypublic abstract boolean isSpectator()
public abstract boolean isCreative()
public boolean isPushedByWater()
isPushedByWater in class Entitypublic Scoreboard getWorldScoreboard()
public ITextComponent getDisplayName()
getDisplayName in interface ICommandSendergetDisplayName in class Entitypublic float getEyeHeight()
getEyeHeight in class Entitypublic void setAbsorptionAmount(float amount)
setAbsorptionAmount in class EntityLivingBasepublic float getAbsorptionAmount()
getAbsorptionAmount in class EntityLivingBasepublic static java.util.UUID getUUID(GameProfile profile)
public static java.util.UUID getOfflineUUID(java.lang.String username)
public boolean canOpen(LockCode code)
public boolean isWearing(EnumPlayerModelParts part)
public boolean sendCommandFeedback()
sendCommandFeedback in interface ICommandSendersendCommandFeedback in class Entitypublic boolean replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn)
replaceItemInInventory in class Entitypublic boolean hasReducedDebug()
public void setReducedDebug(boolean reducedDebug)
public EnumHandSide getPrimaryHand()
getPrimaryHand in class EntityLivingBasepublic 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 Entitypublic float getLuck()
public boolean canUseCommandBlock()
public void openGui(java.lang.Object mod,
int modGuiId,
World world,
int x,
int y,
int z)
mod - The mod trying to open a GUImodGuiId - GUI IDworld - Current Worldx - Passed directly to IGuiHandler, data meaningless Typically world X positiony - Passed directly to IGuiHandler, data meaningless Typically world Y positionz - Passed directly to IGuiHandler, data meaningless Typically world Z positionpublic BlockPos getBedLocation(int dimension)
dimension - The dimension to get the bed spawn forpublic boolean isSpawnForced(int dimension)
dimension - The dimension to get whether to check for a bed before spawning forpublic void setSpawnChunk(BlockPos pos, boolean forced, int dimension)
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)dimension - Which dimension to apply the player-specific respawn point topublic float getDefaultEyeHeight()
public java.lang.String getDisplayNameString()
public void refreshDisplayName()
public void addPrefix(ITextComponent prefix)
prefix - The prefixpublic void addSuffix(ITextComponent suffix)
suffix - The suffixpublic java.util.Collection<ITextComponent> getPrefixes()
public java.util.Collection<ITextComponent> getSuffixes()
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvider
Basically, this method functions analogously to Map.get(Object).
getCapability in interface ICapabilityProvidergetCapability in class EntityLivingBasecapability - The capability to checkfacing - The Side to check from,
CAN BE NULL. Null is defined to represent 'internal' or 'self'ICapabilityProvider.hasCapability(Capability, EnumFacing)
would return true.public boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProviderICapabilityProvider.getCapability(Capability, EnumFacing).
Basically, this method functions analogously to Map.containsKey(Object).
Example: A Pipe getting a cover placed on one side causing it lose the Inventory attachment function for that side.
This is a light weight version of getCapability, intended for metadata uses.
hasCapability in interface ICapabilityProviderhasCapability in class EntityLivingBasecapability - The capability to checkfacing - The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'ICapabilityProvider.getCapability(Capability, EnumFacing)
must not return null.public boolean hasSpawnDimension()
public int getSpawnDimension()
public void setSpawnDimension(java.lang.Integer dimension)