Class EntityPlayerSP

  • All Implemented Interfaces:
    ICommandSender, org.teavm.jso.JSObject

    public class EntityPlayerSP
    extends AbstractClientPlayer
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Field Detail

      • sprintingTicksLeft

        public int sprintingTicksLeft
      • renderArmYaw

        public float renderArmYaw
      • renderArmPitch

        public float renderArmPitch
      • prevRenderArmYaw

        public float prevRenderArmYaw
      • prevRenderArmPitch

        public float prevRenderArmPitch
      • timeInPortal

        public float timeInPortal
      • prevTimeInPortal

        public float prevTimeInPortal
    • Method Detail

      • heal

        public void heal​(float healAmount)
        + Heal living entity (param: amount of half-hearts)
        Overrides:
        heal in class EntityLivingBase
      • mountEntity

        public void mountEntity​(Entity entityIn)
        + Called when a player mounts an entity. e.g. mounts a pig, mounts a boat.
        Overrides:
        mountEntity in class EntityLivingBase
      • onUpdate

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

        public void onUpdateWalkingPlayer()
        + called every tick when the player is on foot. Performs all the things that normally happen during movement.
      • sendChatMessage

        public void sendChatMessage​(java.lang.String message)
        + Sends a chat message from the player. Args: chatMessage
      • swingItem

        public void swingItem()
        + Swings the item the player is holding.
        Overrides:
        swingItem in class EntityLivingBase
      • damageEntity

        protected void damageEntity​(DamageSource damageSrc,
                                    float damageAmount)
        + 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 EntityPlayer
      • closeScreen

        public void closeScreen()
        + set current crafting inventory back to the 2x2 square
        Overrides:
        closeScreen in class EntityPlayer
      • closeScreenAndDropStack

        public void closeScreenAndDropStack()
      • setPlayerSPHealth

        public void setPlayerSPHealth​(float health)
        + Updates health locally.
      • addStat

        public void addStat​(StatBase stat,
                            int amount)
        + Adds a value to a statistic field.
        Overrides:
        addStat in class EntityPlayer
      • sendPlayerAbilities

        public void sendPlayerAbilities()
        + Sends the player's abilities to the server (if there is one).
        Overrides:
        sendPlayerAbilities in class EntityPlayer
      • isUser

        public boolean isUser()
        + returns true if this is an EntityPlayerSP, or the logged in player.
        Overrides:
        isUser in class EntityPlayer
      • sendHorseJump

        protected void sendHorseJump()
      • sendHorseInventory

        public void sendHorseInventory()
      • setClientBrand

        public void setClientBrand​(java.lang.String brand)
      • getClientBrand

        public java.lang.String getClientBrand()
      • pushOutOfBlocks

        protected boolean pushOutOfBlocks​(double x,
                                          double y,
                                          double z)
        Overrides:
        pushOutOfBlocks in class Entity
      • setSprinting

        public void setSprinting​(boolean sprinting)
        + Set sprinting switch for Entity.
        Overrides:
        setSprinting in class EntityLivingBase
      • setXPStats

        public void setXPStats​(float currentXP,
                               int maxXP,
                               int level)
        + Sets the current XP, total XP, and level number.
      • getPosition

        public BlockPos getPosition()
        + Get the position in the world. null is not allowed! If you are not an entity in the world, return the coordinates 0, 0, 0
        Specified by:
        getPosition in interface ICommandSender
        Overrides:
        getPosition in class Entity
      • playSound

        public void playSound​(java.lang.String name,
                              float volume,
                              float pitch)
        Overrides:
        playSound in class EntityPlayer
      • isServerWorld

        public boolean isServerWorld()
        + Returns whether the entity is in a server world
        Overrides:
        isServerWorld in class EntityLivingBase
      • isRidingHorse

        public boolean isRidingHorse()
      • getHorseJumpPower

        public float getHorseJumpPower()
      • displayGUIChest

        public void displayGUIChest​(IInventory chestInventory)
        + Displays the GUI for interacting with a chest inventory. Args: chestInventory
        Overrides:
        displayGUIChest in class EntityPlayer
      • onCriticalHit

        public void onCriticalHit​(Entity entityHit)
        + Called when the player performs a critical hit on the Entity. Args: entity that was hit critically
        Overrides:
        onCriticalHit in class EntityPlayer
      • isSneaking

        public boolean isSneaking()
        + Returns if this entity is sneaking.
        Overrides:
        isSneaking in class Entity
      • isCurrentViewEntity

        public boolean isCurrentViewEntity()
      • 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 EntityPlayer