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 |
double |
chasingPosY |
double |
chasingPosZ |
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<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 |
double |
prevChasingPosY |
double |
prevChasingPosZ |
float |
renderOffsetX |
float |
renderOffsetY |
float |
renderOffsetZ |
protected boolean |
sleeping
Boolean value indicating weather a player is sleeping or not
|
protected float |
speedInAir |
protected float |
speedOnGround |
int |
xpCooldown
Used by EntityPlayer to prevent too many xp orbs from getting absorbed at once.
|
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, HAND_STATES, hurtTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, 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.
|
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
|
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
|
void |
addToPlayerScore(Entity entityIn,
int amount)
Adds to the players score.
|
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) |
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 |
clonePlayer(EntityPlayer oldPlayer,
boolean respawnFromEnd)
Copies the values from the given player into this player if boolean par2 is true.
|
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() |
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) |
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) |
boolean |
func_191521_c(ItemStack p_191521_1_) |
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() |
InventoryEnderChest |
getInventoryEnderChest()
Returns the InventoryEnderChest of this player.
|
ItemStack |
getItemStackFromSlot(EntityEquipmentSlot slotIn) |
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() |
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 |
hasAchievement(Achievement achievementIn) |
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 |
moveEntityWithHeading(float strafe,
float forward)
Moves the entity based on the specified heading.
|
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 |
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) |
void |
removeExperienceLevel(int levels) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
resetCooldown() |
protected void |
resetHeight()
sets the players height back to normal after doing things like sleeping and dieing
|
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) |
void |
setPrimaryHand(EnumHandSide hand) |
void |
setReducedDebug(boolean reducedDebug) |
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.
|
void |
spawnSweepParticles() |
void |
takeStat(StatBase stat) |
EntityPlayer.SleepResult |
trySleep(BlockPos bedLocation) |
protected void |
updateEntityActionState() |
void |
updateRidden()
Handles updating while being ridden by an 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, getAge, getAITarget, getArrowCountInEntity, getAttackingEntity, getAttributeMap, getCombatTracker, getCreatureAttribute, getEntityAttribute, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLastDamageSource, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getWaterSlowDown, handleJumpLava, handleJumpWater, hasItemInSlot, heal, isActiveItemStackBlocking, isChild, isElytraFlying, isEntityAlive, isEntityUndead, isHandActive, isOnLadder, isPotionActive, isPotionApplicable, isServerWorld, kill, knockBack, markPotionsDirty, notifyDataManagerChange, onChangedPotionEffect, onDeathUpdate, onEntityUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, performHurtAnimation, playEquipSound, playHurtSound, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setActiveHand, setAIMoveSpeed, setArrowCountInEntity, setBeenAttacked, setHealth, setHeldItem, setJumping, setLastAttacker, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateDistance, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadataaddEntityCrashInfo, addPassenger, addTag, addTrackingPlayer, addVelocity, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, canBeAttackedWithItem, canBeRidden, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canUseCommand, 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, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getFlag, getForward, getHorizontalFacing, getHoverEvent, getIsInvulnerable, getLastPortalVec, 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, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onCollideWithPlayer, onStruckByLightning, 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, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptionalpublic static final java.lang.String PERSISTED_NBT_TAG
public float eyeHeight
protected static final DataParameter<java.lang.Byte> PLAYER_MODEL_FLAG
protected static final DataParameter<java.lang.Byte> MAIN_HAND
public InventoryPlayer inventory
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
public float renderOffsetZ
public PlayerCapabilities capabilities
public int experienceLevel
public int experienceTotal
public float experience
protected float speedOnGround
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()
getHurtSound in class EntityLivingBaseprotected SoundEvent getDeathSound()
getDeathSound in class EntityLivingBasepublic void addToPlayerScore(Entity entityIn, int amount)
addToPlayerScore in class Entitypublic 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 boolean hasAchievement(Achievement achievementIn)
public void addStat(StatBase stat)
public void addStat(StatBase stat, int amount)
public void takeStat(StatBase stat)
public void jump()
jump in class EntityLivingBasepublic void moveEntityWithHeading(float strafe,
float forward)
moveEntityWithHeading 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 resetHeight()
resetHeight 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 removeExperienceLevel(int levels)
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 EntityLivingBaseprotected boolean isPlayer()
isPlayer in class EntityLivingBasepublic boolean getAlwaysRenderNameTagForRender()
getAlwaysRenderNameTagForRender in class EntityLivingBasepublic void clonePlayer(EntityPlayer oldPlayer, boolean respawnFromEnd)
protected 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 func_191521_c(ItemStack p_191521_1_)
public java.lang.Iterable<ItemStack> getHeldEquipment()
getHeldEquipment in class Entitypublic java.lang.Iterable<ItemStack> getArmorInventoryList()
getArmorInventoryList in class EntityLivingBasepublic 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 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)
ICapabilityProvidergetCapability 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 false.public boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProviderhasCapability 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'public boolean hasSpawnDimension()
public int getSpawnDimension()
public void setSpawnDimension(java.lang.Integer dimension)