Class CustomEntity.MountBone

java.lang.Object
dev.lone.itemsadder.api.CustomEntity.Bone
dev.lone.itemsadder.api.CustomEntity.MountBone
Enclosing class:
CustomEntity

public static class CustomEntity.MountBone extends CustomEntity.Bone
Wrapper for a mount bone of a custom entity.
  • Method Details

    • getPassenger

      @Nullable public @Nullable LivingEntity getPassenger()
      Returns:
      May be null if the bone is not occupied
    • setPassenger

      public boolean setPassenger(LivingEntity entity)
      Sets or replaces the passenger of the mount bone
      Parameters:
      entity - passenger to set
    • removePassenger

      public void removePassenger()
      Removes the passenger currently mounted on this bone.
    • setLocked

      public void setLocked(boolean locked)
      Sets whether this mount bone is locked.
      Parameters:
      locked - true to lock the mount bone.
    • isLocked

      public boolean isLocked()
      Checks if this mount bone is locked.
      Returns:
      true if the mount bone is locked.
    • setCanControl

      public void setCanControl(boolean canControl)
      Sets whether the passenger can control this mount.
      Parameters:
      canControl - true to allow passenger control.
    • canControl

      public boolean canControl()
      Checks if the passenger can control this mount.
      Returns:
      true if passenger control is enabled.