Interface IMountable
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public interface IMountable
Properties
AngleMode
EnumMountAngleMode AngleMode { get; }
Property Value
CanControl
If this "mountable seat" is the one that controls the mountable entity/block
bool CanControl { get; }
Property Value
Controls
EntityControls Controls { get; }
Property Value
LocalEyePos
Vec3f LocalEyePos { get; }
Property Value
MountPosition
EntityPos MountPosition { get; }
Property Value
MountSupplier
Return null if you don't have a mountable supplier implementation
IMountableSupplier MountSupplier { get; }
Property Value
MountedBy
Entity MountedBy { get; }
Property Value
SuggestedAnimation
string SuggestedAnimation { get; }
Property Value
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