use of org.valkyrienskies.mod.common.entity.EntityMountable in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class ValkyrienUtils method getMountedShipAndPos.
public EntityShipMountData getMountedShipAndPos(Entity entity) {
Entity ridingEntity = entity.ridingEntity;
if (ridingEntity instanceof EntityMountable) {
EntityMountable mountable = (EntityMountable) ridingEntity;
Optional<PhysicsObject> mountedShip = mountable.getMountedShip();
if (mountedShip.isPresent()) {
return new EntityShipMountData(mountedShip.get(), mountable.getMountPos());
}
}
return new EntityShipMountData();
}
Aggregations