Show / Hide Table of Contents

Class ModSystem

Base of a system, which is part of a code mod. Takes care of setting up, registering and handling all sorts of things. You may choose to split up a mod into multiple distinct systems if you so choose, but there may also be just one.

Inheritance
System.Object
ModSystem
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Vintagestory.API.Common
Assembly: VintagestoryAPI.dll
Syntax
public abstract class ModSystem

Properties

AllowRuntimeReload

When the server reloads mods at runtime, should this mod also be reloaded. Return false e.g. for any mod that adds blocks.

Declaration
public virtual bool AllowRuntimeReload { get; }
Property Value
Type Description
System.Boolean

Mod

Gets the Mod this mod system is part of.

Declaration
public Mod Mod { get; }
Property Value
Type Description
Mod

Methods

Dispose()

If this mod allows runtime reloading, you must implement this method to unregister any listeners / handlers

Declaration
public virtual void Dispose()

ExecuteOrder()

Declaration
public virtual double ExecuteOrder()
Returns
Type Description
System.Double

ShouldLoad(EnumAppSide)

Returns if this mod should be loaded for the given app side.

Declaration
public virtual bool ShouldLoad(EnumAppSide forSide)
Parameters
Type Name Description
EnumAppSide forSide
Returns
Type Description
System.Boolean

Start(ICoreAPI)

Side agnostic Start method, called after all mods received a call to StartPre().

Declaration
public virtual void Start(ICoreAPI api)
Parameters
Type Name Description
ICoreAPI api

StartClientSide(ICoreClientAPI)

Minor convenience method to save yourself the check for/cast to ICoreClientAPI in Start()

Declaration
public virtual void StartClientSide(ICoreClientAPI api)
Parameters
Type Name Description
ICoreClientAPI api

StartPre(ICoreAPI)

Called during intial mod loading, called before any mod receives the call to Start()

Declaration
public virtual void StartPre(ICoreAPI api)
Parameters
Type Name Description
ICoreAPI api

StartServerSide(ICoreServerAPI)

Minor convenience method to save yourself the check for/cast to ICoreServerAPI in Start()

Declaration
public virtual void StartServerSide(ICoreServerAPI api)
Parameters
Type Name Description
ICoreServerAPI api
In This Article
Back to top Generated by DocFX