Table of Contents

Interface IMountableSeat

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Represents a seat of a mountable object.

public interface IMountableSeat
Extension Methods

Properties

AngleMode

How the mounted entity should rotate

EnumMountAngleMode AngleMode { get; }

Property Value

EnumMountAngleMode

CanControl

If this "mountable seat" is the one that controls the mountable entity/block

bool CanControl { get; }

Property Value

bool

Config

SeatConfig Config { get; set; }

Property Value

SeatConfig

Controls

The control scheme of this seat

EntityControls Controls { get; }

Property Value

EntityControls

Entity

The entity behind this mountable supplier, if any

Entity Entity { get; }

Property Value

Entity

FpHandPitchFollow

float FpHandPitchFollow { get; }

Property Value

float

LocalEyePos

Where to place the first person camera

Vec3f LocalEyePos { get; }

Property Value

Vec3f

MountSupplier

The supplier of this mount provider. e.g. the raft entity for the 2 raft seats

IMountable MountSupplier { get; }

Property Value

IMountable

Passenger

The entity sitting on this seat

Entity Passenger { get; }

Property Value

Entity

PassengerEntityIdForInit

long PassengerEntityIdForInit { get; set; }

Property Value

long

RenderTransform

Transformation matrix that can be used to render the mounted entity at the right position. The transform is relative to the SeatPosition. May be null.

Matrixf RenderTransform { get; }

Property Value

Matrixf

SeatId

string SeatId { get; set; }

Property Value

string

SeatPosition

Exact position of this seat

EntityPos SeatPosition { get; }

Property Value

EntityPos

SkipIdleAnimation

Whether or not the mount should play the idle anim

bool SkipIdleAnimation { get; }

Property Value

bool

SuggestedAnimation

What animation the mounted entity should play

AnimationMetaData SuggestedAnimation { get; }

Property Value

AnimationMetaData

Methods

CanMount(EntityAgent)

bool CanMount(EntityAgent entityAgent)

Parameters

entityAgent EntityAgent

Returns

bool

CanUnmount(EntityAgent)

Return true if the currently mounted entity can unmount (or if not mounted in the first place)

bool CanUnmount(EntityAgent entityAgent)

Parameters

entityAgent EntityAgent

Returns

bool

DidMount(EntityAgent)

Called when the entity mounted himself

void DidMount(EntityAgent entityAgent)

Parameters

entityAgent EntityAgent

DidUnmount(EntityAgent)

Called when the entity unmounted himself

void DidUnmount(EntityAgent entityAgent)

Parameters

entityAgent EntityAgent

MountableToTreeAttributes(TreeAttribute)

When the entity unloads you should write whatever you need in here to reconstruct the IMountable after it's loaded again Reconstruct it by registering a mountable instancer through api.RegisterMountable(string className, GetMountableDelegate mountableInstancer) You must also set a string with key className, that is the same string that you used for RegisterMountable()

void MountableToTreeAttributes(TreeAttribute tree)

Parameters

tree TreeAttribute