Table of Contents

Interface IMountable

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public interface IMountable

Properties

AngleMode

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

Controls

EntityControls Controls { get; }

Property Value

EntityControls

LocalEyePos

Vec3f LocalEyePos { get; }

Property Value

Vec3f

MountPosition

EntityPos MountPosition { get; }

Property Value

EntityPos

MountSupplier

Return null if you don't have a mountable supplier implementation

IMountableSupplier MountSupplier { get; }

Property Value

IMountableSupplier

MountedBy

Entity MountedBy { get; }

Property Value

Entity

SuggestedAnimation

string SuggestedAnimation { get; }

Property Value

string

Methods

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