Interface IEntity<T extends net.minecraft.entity.Entity>

    • Method Detail

      • spawnParticle

        void spawnParticle​(IParticle entityParticle)
      • getEntityId

        int getEntityId()
      • getUniqueID

        java.lang.String getUniqueID()
      • getYOffset

        double getYOffset()
      • getWidth

        double getWidth()
        Returns:
        The entities width
      • getHeight

        double getHeight()
        Returns:
        The entities height
      • getX

        double getX()
        Returns:
        The entities x position
      • setX

        void setX​(double x)
        Parameters:
        x - The entities x position
      • getY

        double getY()
        Returns:
        The entities y position
      • setY

        void setY​(double y)
        Parameters:
        y - The entities y position
      • getZ

        double getZ()
        Returns:
        The entities x position
      • setZ

        void setZ​(double z)
        Parameters:
        z - The entities x position
      • getMotionX

        double getMotionX()
        Returns:
        The entities z motion
      • setMotionX

        void setMotionX​(double x)
        Parameters:
        x - The entities x motion
      • getMotionY

        double getMotionY()
        Returns:
        The entities x motion
      • setMotionY

        void setMotionY​(double y)
        Parameters:
        y - The entities y motion
      • getMotionZ

        double getMotionZ()
        Returns:
        The entities y motion
      • setMotionZ

        void setMotionZ​(double z)
        Parameters:
        z - The entities z motion
      • setMotion

        void setMotion​(double x,
                       double y,
                       double z)
      • setMotion

        void setMotion​(IPos pos)
      • getMotion

        IPos getMotion()
      • isAirborne

        boolean isAirborne()
      • getBlockX

        int getBlockX()
        Returns:
        The block x position
      • getBlockY

        int getBlockY()
        Returns:
        The block y position
      • getBlockZ

        int getBlockZ()
        Returns:
        The block z position
      • setPosition

        void setPosition​(double x,
                         double y,
                         double z)
        Parameters:
        x - The x position
        y - The y position
        z - The z position
      • setPosition

        void setPosition​(IPos pos)
      • getPosition

        IPos getPosition()
      • getDimension

        int getDimension()
      • setDimension

        void setDimension​(int dimensionId)
      • getSurroundingEntities

        IEntity[] getSurroundingEntities​(int range)
        Parameters:
        range - The search range for entities around this entity
        Returns:
        Array of entities within range
      • getSurroundingEntities

        IEntity[] getSurroundingEntities​(int range,
                                         int type)
        Parameters:
        range - The search range for entities around this entity
        type - The EntityType you want to find
        Returns:
        Array of entities within range
      • isAlive

        boolean isAlive()
        Returns:
        Whether the entity is alive or not
      • getTempData

        java.lang.Object getTempData​(java.lang.String key)
        Parameters:
        key - Get temp data for this key
        Returns:
        Returns the stored temp data
      • setTempData

        void setTempData​(java.lang.String key,
                         java.lang.Object value)
        Tempdata gets cleared when the entity gets unloaded or the world restarts
        Parameters:
        key - The key for the data stored
        value - The data stored
      • hasTempData

        boolean hasTempData​(java.lang.String key)
        Parameters:
        key - The key thats going to be tested against the temp data
        Returns:
        Whether or not temp data containes the key
      • removeTempData

        void removeTempData​(java.lang.String key)
        Parameters:
        key - The key for the temp data to be removed
      • clearTempData

        void clearTempData()
        Remove all tempdata
      • getTempDataKeys

        java.lang.String[] getTempDataKeys()
      • getStoredData

        java.lang.Object getStoredData​(java.lang.String key)
        Parameters:
        key - The key of the data to be returned
        Returns:
        Returns the stored data
      • setStoredData

        void setStoredData​(java.lang.String key,
                           java.lang.Object value)
        Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved
        Parameters:
        key - The key for the data stored
        value - The data stored. This data can be either a Number or a String. Other data is not stored
      • hasStoredData

        boolean hasStoredData​(java.lang.String key)
        Parameters:
        key - The key of the data to be checked
        Returns:
        Returns whether or not the stored data contains the key
      • removeStoredData

        void removeStoredData​(java.lang.String key)
        Parameters:
        key - The key of the data to be removed
      • clearStoredData

        void clearStoredData()
        Remove all stored data
      • getStoredDataKeys

        java.lang.String[] getStoredDataKeys()
      • getAge

        long getAge()
        Returns:
        The age of this entity in ticks
      • despawn

        void despawn()
        Despawns this entity. Removes it permanently
      • inWater

        boolean inWater()
        Returns:
        Return whether or not this entity is standing in water
      • inLava

        boolean inLava()
        Returns:
        Return whether or not this entity is standing in lava
      • inFire

        boolean inFire()
        Returns:
        Return whether or not this entity is standing in fire
      • isBurning

        boolean isBurning()
        Returns:
        Return whether or not this entity is on fire
      • setBurning

        void setBurning​(int ticks)
        Parameters:
        ticks - Amount of world ticks this entity will burn. 20 ticks equals 1 second
      • extinguish

        void extinguish()
        Removes fire from this entity
      • getTypeName

        java.lang.String getTypeName()
        Returns:
        Name as which it's registered in minecraft
      • dropItem

        void dropItem​(IItemStack item)
        Parameters:
        item - Item to be dropped
      • getRider

        IEntity getRider()
        Returns:
        Return the rider
      • setRider

        void setRider​(IEntity entity)
        Parameters:
        entity - The entity to ride this entity
      • getMount

        IEntity getMount()
        Returns:
        Return the entity, this entity is riding
      • setMount

        void setMount​(IEntity entity)
        Parameters:
        entity - The entity this entity will mount
      • getType

        int getType()
        Returns:
        Returns the EntityType of this entity
        See Also:
        EntityType
      • typeOf

        boolean typeOf​(int type)
        Parameters:
        type -
        Returns:
        Returns whether the entity is type of the given @EntityType
        Since:
        1.7.10c
      • setRotation

        void setRotation​(float rotation)
        Parameters:
        rotation - The rotation to be set (0-360)
      • setRotation

        void setRotation​(float rotationYaw,
                         float rotationPitch)
      • getRotation

        float getRotation()
        Returns:
        Current rotation of the npc
      • setPitch

        void setPitch​(float pitch)
      • getPitch

        float getPitch()
      • knockback

        void knockback​(int power,
                       float direction)
        Parameters:
        power - How strong the knockback is
        direction - The direction in which he flies back (0-360). Usually based on getRotation()
      • knockback

        void knockback​(double xpower,
                       double ypower,
                       double zpower,
                       float direction)
      • knockback

        void knockback​(IPos pos,
                       float direction)
      • setImmune

        void setImmune​(int ticks)
      • setInvisible

        void setInvisible​(boolean invisible)
      • setSneaking

        void setSneaking​(boolean sneaking)
      • setSprinting

        void setSprinting​(boolean sprinting)
      • hasCollided

        boolean hasCollided()
      • hasCollidedVertically

        boolean hasCollidedVertically()
      • hasCollidedHorizontally

        boolean hasCollidedHorizontally()
      • capturesDrops

        boolean capturesDrops()
      • setCapturesDrops

        void setCapturesDrops​(boolean capture)
      • setCapturedDrops

        void setCapturedDrops​(IEntity<?>[] capturedDrops)
      • getCapturedDrops

        IEntity<?>[] getCapturedDrops()
      • isSneaking

        boolean isSneaking()
        Returns:
        Returns whether or not this entity is sneaking
        Since:
        1.7.10c
      • isSprinting

        boolean isSprinting()
        Returns:
        Returns whether or not this entity is sprinting
        Since:
        1.7.10c
      • getMCEntity

        T getMCEntity()
        Returns:
        Returns minecrafts entity
        Since:
        1.7.10c Expert users only
      • getNbt

        INbt getNbt()
      • getAllNbt

        INbt getAllNbt()
      • setNbt

        void setNbt​(INbt nbt)
      • getNbtOptional

        INbt getNbtOptional()
      • storeAsClone

        void storeAsClone​(int tab,
                          java.lang.String name)
      • updateEntity

        void updateEntity()