Interface IEntityLiving<T extends net.minecraft.entity.EntityLiving>

  • Type Parameters:
    T - The underlying Minecraft EntityLiving type.
    All Superinterfaces:
    IEntity<T>, IEntityLivingBase<T>
    All Known Subinterfaces:
    IAnimal<T>, ICustomNpc<T>, IMonster<T>, IPixelmon<T>, IVillager<T>

    public interface IEntityLiving<T extends net.minecraft.entity.EntityLiving>
    extends IEntityLivingBase<T>
    Represents a living entity (mob, NPC, etc.) that extends the base living functionality. Provides additional methods for navigation, sound, custom name, leashing, and more.
    • Method Detail

      • isNavigating

        boolean isNavigating()
        Checks if the entity is currently navigating (pathfinding).
        Returns:
        true if navigating; false otherwise.
      • clearNavigation

        void clearNavigation()
        Clears the current navigation path.
      • navigateTo

        void navigateTo​(double x,
                        double y,
                        double z,
                        double speed)
        Commands the entity to navigate toward the specified destination.
        Parameters:
        x - Destination x coordinate.
        y - Destination y coordinate.
        z - Destination z coordinate.
        speed - Movement speed (0.7 is default).
      • getMCEntity

        T getMCEntity()
        Returns the underlying Minecraft entity.
        Specified by:
        getMCEntity in interface IEntity<T extends net.minecraft.entity.EntityLiving>
        Specified by:
        getMCEntity in interface IEntityLivingBase<T extends net.minecraft.entity.EntityLiving>
        Returns:
        the Minecraft entity.
      • playLivingSound

        void playLivingSound()
        Plays the entity's living sound.
      • spawnExplosionParticle

        void spawnExplosionParticle()
        Spawns explosion particles for this entity.
      • setMoveForward

        void setMoveForward​(float speed)
        Sets the forward movement speed for the entity.
        Parameters:
        speed - the forward speed.
      • faceEntity

        void faceEntity​(IEntity entity,
                        float pitch,
                        float yaw)
        Rotates the entity to face the given entity.
        Parameters:
        entity - the target entity.
        pitch - the pitch angle.
        yaw - the yaw angle.
      • canPickUpLoot

        boolean canPickUpLoot()
        Returns:
        Whether the entity can pick up loot.
      • setCanPickUpLoot

        void setCanPickUpLoot​(boolean pickUp)
        Sets whether the entity can pick up loot.
        Parameters:
        pickUp - true to allow picking up loot.
      • isPersistent

        boolean isPersistent()
        Returns:
        Whether the entity is persistent (won't despawn).
      • enablePersistence

        void enablePersistence()
        Enables persistence so that the entity does not despawn.
      • setCustomNameTag

        void setCustomNameTag​(java.lang.String text)
        Sets a custom name tag for the entity.
        Parameters:
        text - the custom name.
      • getCustomNameTag

        java.lang.String getCustomNameTag()
        Returns the entity's custom name tag.
        Returns:
        the custom name.
      • hasCustomNameTag

        boolean hasCustomNameTag()
        Returns:
        Whether the entity has a custom name tag.
      • setAlwaysRenderNameTag

        void setAlwaysRenderNameTag​(boolean alwaysRender)
        Sets whether the entity's name tag is always rendered.
        Parameters:
        alwaysRender - true to always render the name tag.
      • getAlwaysRenderNameTag

        boolean getAlwaysRenderNameTag()
        Returns:
        Whether the name tag is always rendered.
      • clearLeashed

        void clearLeashed​(boolean sendPacket,
                          boolean dropLeash)
        Clears the entity's leash.
        Parameters:
        sendPacket - whether to send a packet update.
        dropLeash - whether to drop the leash item.
      • allowLeashing

        boolean allowLeashing()
        Returns:
        Whether the entity allows leashing.
      • getLeashed

        boolean getLeashed()
        Returns:
        Whether the entity is currently leashed.
      • getLeashedTo

        IEntity getLeashedTo()
        Returns:
        The entity to which this entity is leashed.
      • setLeashedTo

        void setLeashedTo​(IEntity entity,
                          boolean sendPacket)
        Leashes this entity to the specified entity.
        Parameters:
        entity - the entity to leash to.
        sendPacket - whether to send a packet update.
      • canBeSteered

        boolean canBeSteered()
        Returns:
        Whether the entity can be steered.