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
CanControl
If this "mountable seat" is the one that controls the mountable entity/block
bool CanControl { get; }
Property Value
Config
SeatConfig Config { get; set; }
Property Value
Controls
The control scheme of this seat
EntityControls Controls { get; }
Property Value
Entity
The entity behind this mountable supplier, if any
Entity Entity { get; }
Property Value
FpHandPitchFollow
float FpHandPitchFollow { get; }
Property Value
LocalEyePos
Where to place the first person camera
Vec3f LocalEyePos { get; }
Property Value
MountSupplier
The supplier of this mount provider. e.g. the raft entity for the 2 raft seats
IMountable MountSupplier { get; }
Property Value
Passenger
The entity sitting on this seat
Entity Passenger { get; }
Property Value
PassengerEntityIdForInit
long PassengerEntityIdForInit { get; set; }
Property Value
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
SeatId
string SeatId { get; set; }
Property Value
SeatPosition
Exact position of this seat
EntityPos SeatPosition { get; }
Property Value
SkipIdleAnimation
Whether or not the mount should play the idle anim
bool SkipIdleAnimation { get; }
Property Value
SuggestedAnimation
What animation the mounted entity should play
AnimationMetaData SuggestedAnimation { get; }
Property Value
Methods
CanMount(EntityAgent)
bool CanMount(EntityAgent entityAgent)
Parameters
entityAgent
EntityAgent
Returns
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
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