Class CustomEntity.MountBone
java.lang.Object
dev.lone.itemsadder.api.CustomEntity.Bone
dev.lone.itemsadder.api.CustomEntity.MountBone
- Enclosing class:
CustomEntity
Wrapper for a mount bone of a custom entity.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the passenger can control this mount.@Nullable LivingEntitybooleanisLocked()Checks if this mount bone is locked.voidRemoves the passenger currently mounted on this bone.voidsetCanControl(boolean canControl) Sets whether the passenger can control this mount.voidsetLocked(boolean locked) Sets whether this mount bone is locked.booleansetPassenger(LivingEntity entity) Sets or replaces the passenger of the mount boneMethods inherited from class CustomEntity.Bone
getColor, getEnchanted, getId, getLocation, getName, getOrdinal, setColor, setEnchanted
-
Method Details
-
getPassenger
- Returns:
- May be null if the bone is not occupied
-
setPassenger
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.
-