Hello, I was wondering how I would go about using the VS2 api to say, assemble a ship and apply impulses to it. I am confused as in the api there is PhysShip, Ship, ServerShip, ClientShip, and a bunch of others, and there is no proper documentation on this; it is overall very confusing. Could somebody help? btw im using fabric 1.21.1 yarn
2.5 is supposed to get javadoc? i dont have any sources for that though
how do i download that documentation bc when i hover over the type servership i dont see any button to download sources
for other stuff like the minecraft classes i can just hover over them and click ‘download sources’
i dont know if you have to edit the gradle but ./gradlew intellij should work?
well i lowkey dont know the difference bw impulse and force but there is applyInvariantForce
import org.jetbrains.annotations.ApiStatus.Experimental
import org.valkyrienskies.core.api.ships.properties.ShipInertiaData
import org.valkyrienskies.core.api.ships.properties.ShipTransform
interface ServerShip : Ship {
// Slug is modifiable on server-side
override var slug: String?
var isStatic: Boolean
val inertiaData: ShipInertiaData
var enableKinematicVelocity: Boolean
var transformProvider: ServerShipTransformProvider?
@Experimental
fun unsafeSetTransform(transform: ShipTransform)
/**
* Sets data in the persistent storage
*
* @param T
* @param clazz of T
* @param value the data that will be stored, if null will be removed
*/
@Experimental
fun <T> saveAttachment(clazz: Class<T>, value: T?)
/**
* Gets from the ship storage the specified class
* it tries it first from the non-persistent storage
* and afterwards from the persistent storage
* @param T
* @param clazz of T
* @return the data stored inside the ship
*/
@Experimental
fun <T> getAttachment(clazz: Class<T>): T?
}
@Experimental
inline fun <reified T> ServerShip.saveAttachment(value: T?) = saveAttachment(T::class.java, value)
@Experimental
inline fun <reified T> ServerShip.getAttachment() = getAttachment(T::class.java)
fun applyInvariantForce(force: Vector3dc)
fun applyInvariantForceToPos(force: Vector3dc, pos: Vector3dc)
fun applyRotDependentTorque(torque: Vector3dc)
fun applyInvariantTorque(torque: Vector3dc)```
This conversation is on Discord · Reply there
Screenshot_2025-07-30_at_9.35.00_AM.png
Screenshot_2025-07-30_at_9.35.07_AM.png