Class EntityPlayer

All Implemented Interfaces:
ICommandSender
Direct Known Subclasses:
AbstractClientPlayer, EntityPlayerMP

public abstract class EntityPlayer extends EntityLivingBase implements ICommandSender
  • Field Details

    • inventory

      public InventoryPlayer inventory
      Inventory of the player
    • inventoryContainer

      public Container inventoryContainer
      The Container for the player's inventory (which opens when they press E)
    • openContainer

      public Container openContainer
      The Container the player has open.
    • foodStats

      public FoodStats foodStats
      The player's food stats. (See class FoodStats)
    • flyToggleTimer

      protected int flyToggleTimer
      Used to tell if the player pressed jump twice. If this is at 0 and it's pressed (And they are allowed to fly, as defined in the player's movementInput) it sets this to 7. If it's pressed and it's greater than 0 enable fly.
    • prevCameraYaw

      public float prevCameraYaw
    • cameraYaw

      public float cameraYaw
    • username

      public final String username
    • xpCooldown

      public int xpCooldown
      Used by EntityPlayer to prevent too many xp orbs from getting absorbed at once.
    • field_71091_bM

      public double field_71091_bM
    • field_71096_bN

      public double field_71096_bN
    • field_71097_bO

      public double field_71097_bO
    • field_71094_bP

      public double field_71094_bP
    • field_71095_bQ

      public double field_71095_bQ
    • field_71085_bR

      public double field_71085_bR
    • sleeping

      protected boolean sleeping
      Boolean value indicating weather a player is sleeping or not Note: Indicates whether the player is in a bed, not whether they are actually sleeping.
    • playerLocation

      public ChunkCoordinates playerLocation
      The chunk coordinates of the bed the player is in (null if player isn't in a bed).
    • field_71079_bU

      public float field_71079_bU
    • field_71082_cx

      public float field_71082_cx
    • field_71089_bV

      public float field_71089_bV
    • lastDeathLocationX

      public int lastDeathLocationX
    • lastDeathLocationY

      public int lastDeathLocationY
    • lastDeathLocationZ

      public int lastDeathLocationZ
    • lastDeathDimension

      public int lastDeathDimension
    • capabilities

      public PlayerCapabilities capabilities
      The player's capabilities. (See class PlayerCapabilities)
    • experienceLevel

      public int experienceLevel
      The current experience level the player is on.
    • experienceTotal

      public int experienceTotal
      The total amount of experience the player has. This also includes the amount of experience within their Experience Bar.
    • experience

      public float experience
      The current amount of experience the player has within their Experience Bar.
    • speedOnGround

      protected float speedOnGround
    • speedInAir

      protected float speedInAir
    • fishEntity

      public EntityFishHook fishEntity
      An instance of a fishing rod's hook. If this isn't null, the icon image of the fishing rod is slightly different
    • timerSpeedModifier

      protected float timerSpeedModifier
    • hardcoreSpawnChunk

      public ChunkCoordinates hardcoreSpawnChunk
    • timeOfLastSpawnAssignment

      protected long timeOfLastSpawnAssignment
    • timeOfLastDimensionSwitch

      public long timeOfLastDimensionSwitch
    • respawnAssignmentCooldownTimer

      public long respawnAssignmentCooldownTimer
    • spawnDimension

      public int spawnDimension
    • timesCraftedThisTick

      public int timesCraftedThisTick
    • inGloomCounter

      public int inGloomCounter
    • airRecoveryCountdown

      public int airRecoveryCountdown
    • ticksSinceEmoteSound

      public int ticksSinceEmoteSound
    • currentMiningSpeedModifier

      protected float currentMiningSpeedModifier
    • deathCount

      public int deathCount
    • GLOOM_COUNTER_BETWEEN_STATE_CHANGES

      public static final int GLOOM_COUNTER_BETWEEN_STATE_CHANGES
      See Also:
    • EXHAUSTION_JUMPING

      public static final float EXHAUSTION_JUMPING
      See Also:
    • EXHAUSTION_JUMPING_SPRINTING

      public static final float EXHAUSTION_JUMPING_SPRINTING
      See Also:
  • Constructor Details

    • EntityPlayer

      public EntityPlayer(World par1World, String par2Str)
  • Method Details

    • applyEntityAttributes

      protected void applyEntityAttributes()
      Overrides:
      applyEntityAttributes in class EntityLivingBase
    • entityInit

      protected void entityInit()
      Overrides:
      entityInit in class EntityLivingBase
    • getItemInUse

      public ItemStack getItemInUse()
      returns the ItemStack containing the itemInUse
    • getItemInUseCount

      public int getItemInUseCount()
      Returns the item in use count
    • isUsingItem

      public boolean isUsingItem()
      Checks if the entity is currently using an item (e.g., bow, food, sword) by holding down the useItemButton
    • getItemInUseDuration

      public int getItemInUseDuration()
      gets the duration for how long the current itemInUse has been in use
    • stopUsingItem

      public void stopUsingItem()
    • clearItemInUse

      public void clearItemInUse()
    • isBlocking

      public boolean isBlocking()
    • onUpdate

      public void onUpdate()
      Called to update the entity's position/logic.
      Overrides:
      onUpdate in class EntityLivingBase
    • getMaxInPortalTime

      public int getMaxInPortalTime()
      Return the amount of time this entity should stay in a portal before being transported.
      Overrides:
      getMaxInPortalTime in class Entity
    • getPortalCooldown

      public int getPortalCooldown()
      Return the amount of cooldown before this entity can use a portal again.
      Overrides:
      getPortalCooldown in class Entity
    • playSound

      public void playSound(String par1Str, float par2, float par3)
      /* the playSound function both plays the sound locally on the client, and plays it remotely on the server without it being sent again to the same player
      Overrides:
      playSound in class Entity
    • updateItemUse

      protected void updateItemUse(ItemStack par1ItemStack, int par2)
      Plays sounds and makes particles for item in use state
    • onItemUseFinish

      protected void onItemUseFinish()
      Used for when item use count runs out, ie: eating completed
    • handleHealthUpdate

      public void handleHealthUpdate(byte par1)
      Overrides:
      handleHealthUpdate in class EntityLivingBase
    • isMovementBlocked

      protected boolean isMovementBlocked()
      Dead and sleeping entities cannot move
      Overrides:
      isMovementBlocked in class EntityLivingBase
    • closeScreen

      protected void closeScreen()
      sets current screen to null (used on escape buttons of GUIs)
    • mountEntity

      public void mountEntity(Entity par1Entity)
      Called when a player mounts an entity. e.g. mounts a pig, mounts a boat.
      Overrides:
      mountEntity in class Entity
    • updateRidden

      public void updateRidden()
      Handles updating while being ridden by an entity
      Overrides:
      updateRidden in class EntityLivingBase
    • preparePlayerToSpawn

      public 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)
      Overrides:
      preparePlayerToSpawn in class Entity
    • updateEntityActionState

      protected void updateEntityActionState()
      Overrides:
      updateEntityActionState in class EntityLivingBase
    • onLivingUpdate

      public void onLivingUpdate()
      Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn.
      Overrides:
      onLivingUpdate in class EntityLivingBase
    • getScore

      public int getScore()
    • setScore

      public void setScore(int par1)
      Set player's score
    • addScore

      public void addScore(int par1)
      Add to player's score
    • onDeath

      public void onDeath(DamageSource par1DamageSource)
      Called when the mob's health reaches 0.
      Overrides:
      onDeath in class EntityLivingBase
    • addToPlayerScore

      public void addToPlayerScore(Entity par1Entity, int par2)
      Adds a value to the player score. Currently not actually used and the entity passed in does nothing. Args: entity, scoreToAdd
      Overrides:
      addToPlayerScore in class Entity
    • dropOneItem

      public EntityItem dropOneItem(boolean par1)
      Called when player presses the drop item key
    • dropPlayerItem

      public EntityItem dropPlayerItem(ItemStack par1ItemStack)
      Args: itemstack - called when player drops an item stack that's not in his inventory (like items still placed in a workbench while the workbench'es GUI gets closed)
    • dropPlayerItemWithRandomChoice

      public EntityItem dropPlayerItemWithRandomChoice(ItemStack par1ItemStack, boolean par2)
      Args: itemstack, flag
    • joinEntityItemWithWorld

      protected void joinEntityItemWithWorld(EntityItem par1EntityItem)
      Joins the passed in entity item with the world. Args: entityItem
    • getCurrentPlayerStrVsBlock

      public float getCurrentPlayerStrVsBlock(Block par1Block, int i, int j, int k)
      Returns how strong the player is against the specified block at this moment
    • readEntityFromNBT

      public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      // +++START EDIT+++ // ---END EDIT--- (abstract) Protected helper method to read subclass entity data from NBT.
      Overrides:
      readEntityFromNBT in class EntityLivingBase
    • writeEntityToNBT

      public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to write subclass entity data to NBT.
      Overrides:
      writeEntityToNBT in class EntityLivingBase
    • displayGUIChest

      public void displayGUIChest(IInventory par1IInventory)
      Displays the GUI for interacting with a chest inventory. Args: chestInventory
    • displayGUIHopper

      public void displayGUIHopper(TileEntityHopper par1TileEntityHopper)
    • displayGUIHopperMinecart

      public void displayGUIHopperMinecart(EntityMinecartHopper par1EntityMinecartHopper)
    • displayGUIHorse

      public void displayGUIHorse(EntityHorse par1EntityHorse, IInventory par2IInventory)
    • displayGUIEnchantment

      public void displayGUIEnchantment(int par1, int par2, int par3, String par4Str)
    • displayGUIAnvil

      public void displayGUIAnvil(int par1, int par2, int par3)
      Displays the GUI for interacting with an anvil.
    • displayGUIWorkbench

      public void displayGUIWorkbench(int par1, int par2, int par3)
      Displays the crafting GUI for a workbench.
    • getEyeHeight

      public float getEyeHeight()
      Overrides:
      getEyeHeight in class EntityLivingBase
    • resetHeight

      protected void resetHeight()
      sets the players height back to normal after doing things like sleeping and dieing
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class EntityLivingBase
    • canAttackPlayer

      public boolean canAttackPlayer(EntityPlayer par1EntityPlayer)
    • damageArmor

      protected void damageArmor(float par1)
      Overrides:
      damageArmor in class EntityLivingBase
    • getArmorVisibility

      public float getArmorVisibility()
      When searching for vulnerable players, if a player is invisible, the return value of this is the chance of seeing them anyway.
    • damageEntity

      protected void damageEntity(DamageSource par1DamageSource, float par2)
      Deals damage to the entity. If its a EntityPlayer then will take damage from the armor first and then health second with the reduced value. Args: damageAmount
      Overrides:
      damageEntity in class EntityLivingBase
    • displayGUIFurnace

      public void displayGUIFurnace(TileEntityFurnace par1TileEntityFurnace)
      Displays the furnace GUI for the passed in furnace entity. Args: tileEntityFurnace
    • displayGUIDispenser

      public void displayGUIDispenser(TileEntityDispenser par1TileEntityDispenser)
      Displays the dipsenser GUI for the passed in dispenser entity. Args: TileEntityDispenser
    • displayGUIEditSign

      public void displayGUIEditSign(TileEntity par1TileEntity)
      Displays the GUI for editing a sign. Args: tileEntitySign
    • displayGUIBrewingStand

      public void displayGUIBrewingStand(TileEntityBrewingStand par1TileEntityBrewingStand)
      Displays the GUI for interacting with a brewing stand.
    • displayGUIBeacon

      public void displayGUIBeacon(TileEntityBeacon par1TileEntityBeacon)
      Displays the GUI for interacting with a beacon.
    • displayGUIMerchant

      public void displayGUIMerchant(IMerchant par1IMerchant, String par2Str)
    • displayGUIBook

      public void displayGUIBook(ItemStack par1ItemStack)
      Displays the GUI for interacting with a book.
    • interactWith

      public boolean interactWith(Entity par1Entity)
    • getCurrentEquippedItem

      public ItemStack getCurrentEquippedItem()
      Returns the currently being used item by the player.
    • destroyCurrentEquippedItem

      public void destroyCurrentEquippedItem()
      Destroys the currently equipped item from the player's inventory.
    • getYOffset

      public double getYOffset()
      Returns the Y Offset of this entity.
      Overrides:
      getYOffset in class Entity
    • attackTargetEntityWithCurrentItem

      public void attackTargetEntityWithCurrentItem(Entity par1Entity)
      Attacks for the player the targeted entity with the currently equipped item. The equipped item has hitEntity called on it. Args: targetEntity
    • onCriticalHit

      public void onCriticalHit(Entity par1Entity)
      Called when the player performs a critical hit on the Entity. Args: entity that was hit critically
    • onEnchantmentCritical

      public void onEnchantmentCritical(Entity par1Entity)
    • respawnPlayer

      public void respawnPlayer()
    • setDead

      public void setDead()
      Will get destroyed next tick.
      Overrides:
      setDead in class Entity
    • isEntityInsideOpaqueBlock

      public boolean isEntityInsideOpaqueBlock()
      Checks if this entity is inside of an opaque block
      Overrides:
      isEntityInsideOpaqueBlock in class Entity
    • sleepInBedAt

      public EnumStatus sleepInBedAt(int par1, int par2, int par3)
      Attempts to have the player sleep in a bed at the specified location.
    • wakeUpPlayer

      public void wakeUpPlayer(boolean par1, boolean par2, boolean par3)
      Wake up the player if they're sleeping.
    • verifyRespawnCoordinates

      public static ChunkCoordinates verifyRespawnCoordinates(World par0World, ChunkCoordinates par1ChunkCoordinates, boolean par2)
      Ensure that a block enabling respawning exists at the specified coordinates and find an empty space nearby to spawn.
    • getBedOrientationInDegrees

      public float getBedOrientationInDegrees()
      Returns the orientation of the bed in degrees.
    • isPlayerSleeping

      public boolean isPlayerSleeping()
      Returns whether player is sleeping or not
      Overrides:
      isPlayerSleeping in class EntityLivingBase
    • isPlayerFullyAsleep

      public boolean isPlayerFullyAsleep()
      Returns whether or not the player is asleep and the screen has fully faded.
    • getSleepTimer

      public int getSleepTimer()
    • getHideCape

      protected boolean getHideCape(int par1)
    • setHideCape

      protected void setHideCape(int par1, boolean par2)
    • addChatMessage

      public void addChatMessage(String par1Str)
      Add a chat message to the player
    • getBedLocation

      public ChunkCoordinates getBedLocation()
      Returns the location of the bed the player will respawn at, or null if the player has not slept in a bed.
    • isSpawnForced

      public boolean isSpawnForced()
    • setSpawnChunk

      public void setSpawnChunk(ChunkCoordinates par1ChunkCoordinates, boolean par2)
      Defines a spawn coordinate to player spawn. Used by bed after the player sleep on it.
    • triggerAchievement

      public void triggerAchievement(StatBase par1StatBase)
      Will trigger the specified trigger.
    • addStat

      public void addStat(StatBase par1StatBase, int par2)
      Adds a value to a statistic field.
    • jump

      public void jump()
      Causes this entity to do an upwards motion (jumping).
      Overrides:
      jump in class EntityLivingBase
    • getAIMoveSpeed

      public float getAIMoveSpeed()
      the movespeed used for the new AI system
      Overrides:
      getAIMoveSpeed in class EntityLivingBase
    • moveEntityWithHeading

      public void moveEntityWithHeading(float par1, float par2)
      Moves the entity based on the specified heading. Args: strafe, forward
      Overrides:
      moveEntityWithHeading in class EntityLivingBase
    • addMovementStat

      public void addMovementStat(double par1, double par3, double par5)
      Adds a value to a movement statistic field - like run, walk, swin or climb.
    • fall

      protected void fall(float par1)
      Called when the mob is falling. Calculates and applies fall damage.
      Overrides:
      fall in class EntityLivingBase
    • onKillEntity

      public void onKillEntity(EntityLivingBase par1EntityLivingBase)
      This method gets called when the entity kills another one.
      Overrides:
      onKillEntity in class Entity
    • setInWeb

      public void setInWeb()
      Sets the Entity inside a web block.
      Overrides:
      setInWeb in class Entity
    • getItemIcon

      @Environment(CLIENT) public Icon getItemIcon(ItemStack itemStack, int index)
      Gets the Icon Index of the item currently held
      Overrides:
      getItemIcon in class EntityLivingBase
    • getCurrentArmor

      public ItemStack getCurrentArmor(int par1)
    • addExperience

      public void addExperience(int par1)
      This method increases the player's current amount of experience.
    • addExperienceLevel

      public void addExperienceLevel(int par1)
      Add experience levels to this player.
    • xpBarCap

      public int xpBarCap()
      This method returns the cap amount of experience that the experience bar can hold. With each level, the experience cap on the player's experience bar is raised by 10.
    • addExhaustion

      public void addExhaustion(float par1)
      increases exhaustion level by supplied amount
    • getFoodStats

      public FoodStats getFoodStats()
      Returns the player's FoodStats object.
    • canEat

      public boolean canEat(boolean par1)
    • shouldHeal

      public boolean shouldHeal()
      Checks if the player's health is not full and not zero.
    • setItemInUse

      public void setItemInUse(ItemStack par1ItemStack, int par2)
      sets the itemInUse when the use item button is clicked. Args: itemstack, int maxItemUseDuration
    • isCurrentToolAdventureModeExempt

      public boolean isCurrentToolAdventureModeExempt(int par1, int par2, int par3)
      Returns true if the given block can be mined with the current tool in adventure mode.
    • canPlayerEdit

      public boolean canPlayerEdit(int par1, int par2, int par3, int par4, ItemStack par5ItemStack)
    • getExperiencePoints

      protected int getExperiencePoints(EntityPlayer par1EntityPlayer)
      Get the experience points the entity currently has.
      Overrides:
      getExperiencePoints in class EntityLivingBase
    • isPlayer

      protected boolean isPlayer()
      Only use is to identify if class is an instance of player for experience dropping
      Overrides:
      isPlayer in class EntityLivingBase
    • getEntityName

      public String getEntityName()
      Gets the username of the entity.
      Overrides:
      getEntityName in class Entity
    • getAlwaysRenderNameTagForRender

      public boolean getAlwaysRenderNameTagForRender()
      Overrides:
      getAlwaysRenderNameTagForRender in class EntityLivingBase
    • clonePlayer

      public void clonePlayer(EntityPlayer par1EntityPlayer, boolean playerLeavingTheEnd)
      // +++START EDIT+++ Copies the values from the given player into this player if boolean playerLeavingTheEnd is true. Always clones Ender Chest // ---END EDIT--- Inventory.
    • canTriggerWalking

      protected boolean canTriggerWalking()
      returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling crops
      Overrides:
      canTriggerWalking in class Entity
    • sendPlayerAbilities

      public void sendPlayerAbilities()
      Sends the player's abilities to the server (if there is one).
    • setGameType

      public void setGameType(EnumGameType par1EnumGameType)
      Sets the player's game mode and sends it to them.
    • getEntityWorld

      public World getEntityWorld()
      Specified by:
      getEntityWorld in interface ICommandSender
    • getCommandSenderName

      public String getCommandSenderName()
      Gets the name of this command sender (usually username, but possibly "Rcon")
      Specified by:
      getCommandSenderName in interface ICommandSender
    • getInventoryEnderChest

      public InventoryEnderChest getInventoryEnderChest()
      Returns the InventoryEnderChest of this player.
    • isInvisibleToPlayer

      public boolean isInvisibleToPlayer(EntityPlayer par1EntityPlayer)
      Only used by renderer in EntityLivingBase subclasses.\nDetermines if an entity is visible or not to a specfic player, if the entity is normally invisible.\nFor EntityLivingBase subclasses, returning false when invisible will render the entity semitransparent.
      Overrides:
      isInvisibleToPlayer in class Entity
    • getCurrentItemOrArmor

      public ItemStack getCurrentItemOrArmor(int par1)
      0 = item, 1-n is armor
      Specified by:
      getCurrentItemOrArmor in class EntityLivingBase
    • getHeldItem

      public ItemStack getHeldItem()
      Returns the item that this EntityLiving is holding, if any.
      Specified by:
      getHeldItem in class EntityLivingBase
    • setCurrentItemOrArmor

      public void setCurrentItemOrArmor(int slot, ItemStack itemStack)
      Sets the held item, or an armor slot. Slot 0 is held item. Slot 1-4 is armor. Params: Item, slot
      Specified by:
      setCurrentItemOrArmor in class EntityLivingBase
    • getLastActiveItems

      public ItemStack[] getLastActiveItems()
      Specified by:
      getLastActiveItems in class EntityLivingBase
    • getHideCape

      public boolean getHideCape()
    • isPushedByWater

      public boolean isPushedByWater()
      Overrides:
      isPushedByWater in class Entity
    • getWorldScoreboard

      public Scoreboard getWorldScoreboard()
    • getTeam

      public Team getTeam()
      Overrides:
      getTeam in class EntityLivingBase
    • getTranslatedEntityName

      public String getTranslatedEntityName()
      Returns the translated name of the entity.
      Overrides:
      getTranslatedEntityName in class Entity
    • isUsingSpecialKey

      public boolean isUsingSpecialKey()
      Overrides:
      isUsingSpecialKey in class Entity
    • setUsingSpecialKey

      public void setUsingSpecialKey(boolean usingSpecialKey)
    • readModDataFromNBT

      protected void readModDataFromNBT(NBTTagCompound tag)
    • writeModDataToNBT

      protected void writeModDataToNBT(NBTTagCompound tag)
    • decreaseAirSupply

      protected int decreaseAirSupply(int iAirSupply)
      Description copied from class: EntityLivingBase
      Decrements the entity's air supply when underwater
      Overrides:
      decreaseAirSupply in class EntityLivingBase
    • recoverAirSupply

      protected void recoverAirSupply()
      Overrides:
      recoverAirSupply in class EntityLivingBase
    • isOnLadder

      public boolean isOnLadder()
      Description copied from class: EntityLivingBase
      returns true if this entity is by a ladder, false otherwise
      Overrides:
      isOnLadder in class EntityLivingBase
    • canJump

      public boolean canJump()
      Overrides:
      canJump in class EntityLivingBase
    • canSwim

      public boolean canSwim()
      Overrides:
      canSwim in class EntityLivingBase
    • getArmorExhaustionModifier

      public float getArmorExhaustionModifier()
    • isWearingFullSuitSoulforgedArmor

      public boolean isWearingFullSuitSoulforgedArmor()
    • isWearingSoulforgedHelm

      public boolean isWearingSoulforgedHelm()
    • isWearingSoulforgedBoots

      public boolean isWearingSoulforgedBoots()
    • isWearingEnderSpectacles

      public boolean isWearingEnderSpectacles()
    • playStepSound

      protected void playStepSound(int i, int j, int k, int iBlockID)
      Description copied from class: Entity
      Plays step sound at given x, y, z for the entity
      Overrides:
      playStepSound in class Entity
    • getSwimmingHorizontalModifier

      protected float getSwimmingHorizontalModifier()
      Overrides:
      getSwimmingHorizontalModifier in class EntityLivingBase
    • getLandMovementModifier

      protected float getLandMovementModifier()
      Overrides:
      getLandMovementModifier in class EntityLivingBase
    • getLadderVerticalMovementModifier

      protected float getLadderVerticalMovementModifier()
      Overrides:
      getLadderVerticalMovementModifier in class EntityLivingBase
    • getJumpingHorizontalMovementModifier

      protected float getJumpingHorizontalMovementModifier()
    • setMiningSpeedModifier

      protected void setMiningSpeedModifier(float modifier)
    • getMiningSpeedModifier

      protected float getMiningSpeedModifier()
    • updateMiningSpeedModifier

      protected float updateMiningSpeedModifier()
    • getMeleeDamageModifier

      protected float getMeleeDamageModifier()
    • getBowPullStrengthModifier

      public float getBowPullStrengthModifier()
    • doesStatusPreventSprinting

      public boolean doesStatusPreventSprinting()
    • isCarryingBlastingOil

      protected boolean isCarryingBlastingOil()
    • detonateCarriedBlastingOil

      protected void detonateCarriedBlastingOil()
    • dropHead

      protected void dropHead()
      Overrides:
      dropHead in class EntityLivingBase
    • hasValidMagneticPointForLocation

      public boolean hasValidMagneticPointForLocation()
    • getStongestMagneticPointForLocationI

      public int getStongestMagneticPointForLocationI()
    • getStongestMagneticPointForLocationK

      public int getStongestMagneticPointForLocationK()
    • setHasValidMagneticPointForLocation

      public void setHasValidMagneticPointForLocation(boolean bValid)
    • setStrongestMagneticPointForLocationI

      public void setStrongestMagneticPointForLocationI(int iLocationI)
    • setStrongestMagneticPointForLocationK

      public void setStrongestMagneticPointForLocationK(int iLocationK)
    • getGloomLevel

      public int getGloomLevel()
    • setGloomLevel

      public void setGloomLevel(int iGloomLevel)
    • getStatusForCategory

      public Optional<StatusEffect> getStatusForCategory(StatusCategory category)
    • getAllActiveStatusEffects

      public ArrayList<StatusEffect> getAllActiveStatusEffects()
    • getMovementSpeedModifierFromEffects

      public float getMovementSpeedModifierFromEffects()
    • getMiningSpeedModifierFromEffects

      public float getMiningSpeedModifierFromEffects()
    • getAttackDamageModifierFromEffects

      public float getAttackDamageModifierFromEffects()
    • getSpawnChunksVisualizationLocationI

      public int getSpawnChunksVisualizationLocationI()
    • getSpawnChunksVisualizationLocationJ

      public int getSpawnChunksVisualizationLocationJ()
    • getSpawnChunksVisualizationLocationK

      public int getSpawnChunksVisualizationLocationK()
    • setSpawnChunksVisualization

      public void setSpawnChunksVisualization(int iLocationI, int iLocationJ, int iLocationK)
    • hasRespawnCoordinates

      public boolean hasRespawnCoordinates()
    • getValidatedRespawnCoordinates

      public int getValidatedRespawnCoordinates(World newWorld, ChunkCoordinates respawnLocation)
      returns zero if a valid spawn location is found 1 = invalid forced spawn location 2 = missing beacon 3 = Beacon is out of range 4 = Area around beacon is obstructed
    • validateBoundRespawnBeacon

      public BeaconRespawnValidationResult validateBoundRespawnBeacon(World world, int oldDimension, int newDimension)
    • setSpawnChunk

      public void setSpawnChunk(ChunkCoordinates coords, boolean bForced, int iDimension)
    • addRawChatMessage

      public void addRawChatMessage(String message)
    • canHarvestBlock

      public boolean canHarvestBlock(Block par1Block, int i, int j, int k)
    • addStackToCurrentHeldStackIfEmpty

      public boolean addStackToCurrentHeldStackIfEmpty(ItemStack stack)
    • updateGloomState

      protected void updateGloomState()
    • onBlockedDamage

      protected void onBlockedDamage(DamageSource source, int iDamage)
    • getMountedYOffset

      public double getMountedYOffset()
      Description copied from class: Entity
      Returns the Y offset from the entity's position for any entity riding this one.
      Overrides:
      getMountedYOffset in class Entity
    • addExhaustionWithoutVisualFeedback

      public void addExhaustionWithoutVisualFeedback(float fAmount)
    • addHarvestBlockExhaustion

      public void addHarvestBlockExhaustion(int iBlockID, int iBlockI, int iBlockJ, int iBlockK, int iBlockMetadata)
    • onZeroDamageAttack

      protected void onZeroDamageAttack()
    • isPlayerHoldingSail

      protected boolean isPlayerHoldingSail()
    • appliesConstantForceWhenRidingBoat

      public boolean appliesConstantForceWhenRidingBoat()
      Overrides:
      appliesConstantForceWhenRidingBoat in class Entity
    • movementModifierWhenRidingBoat

      public double movementModifierWhenRidingBoat()
      Overrides:
      movementModifierWhenRidingBoat in class Entity
    • dismountEntity

      public void dismountEntity(Entity riddenEntity)
      Description copied from class: EntityLivingBase
      Moves the entity to a position out of the way of its mount.
      Overrides:
      dismountEntity in class EntityLivingBase
    • addExhaustionForJump

      public void addExhaustionForJump()
    • setItemInUseCount

      public void setItemInUseCount(int iCount)
    • getCanBeHeadCrabbed

      public boolean getCanBeHeadCrabbed(boolean bSquidInWater)
      Overrides:
      getCanBeHeadCrabbed in class Entity
    • isValidOngoingAttackTargetForSquid

      public boolean isValidOngoingAttackTargetForSquid()
      Overrides:
      isValidOngoingAttackTargetForSquid in class Entity
    • isImmuneToHeadCrabDamage

      public boolean isImmuneToHeadCrabDamage()
      Overrides:
      isImmuneToHeadCrabDamage in class Entity
    • isLocalPlayerAndHittingBlock

      public boolean isLocalPlayerAndHittingBlock()
    • mountEntityRemote

      public void mountEntityRemote(Entity entityToMount)
      Description copied from class: Entity
      Called when clients receive a packed from the server indicating that they should mount an entity as part of fix for MC-1291.
      Overrides:
      mountEntityRemote in class Entity
    • canDrink

      public boolean canDrink()
    • onCantConsume

      public void onCantConsume()
    • getAnimalKickMovementMultiplier

      protected double getAnimalKickMovementMultiplier()
      Overrides:
      getAnimalKickMovementMultiplier in class Entity
    • installationIntegrityTestPlayer

      public static boolean installationIntegrityTestPlayer()
    • setAbsorptionAmount

      public void setAbsorptionAmount(float par1)
      Overrides:
      setAbsorptionAmount in class EntityLivingBase
    • getAbsorptionAmount

      public float getAbsorptionAmount()
      Overrides:
      getAbsorptionAmount in class EntityLivingBase
    • getTimerSpeedModifier

      public float getTimerSpeedModifier()
    • setTimerSpeedModifier

      public void setTimerSpeedModifier(float timerSpeedModifier)
    • resetTimerSpeedModifier

      public void resetTimerSpeedModifier()
    • getTimeOfLastSpawnAssignment

      public long getTimeOfLastSpawnAssignment()
    • setTimeOfLastSpawnAssignment

      public void setTimeOfLastSpawnAssignment(long timeOfLastSpawnAssignment)
    • getData

      public abstract <T> T getData(DataEntry.PlayerDataEntry<T> entry)
    • setData

      public abstract <T> void setData(DataEntry.PlayerDataEntry<T> entry, T value)