Interface ICoreClientAPI
The core api implemented by the client. The main interface for accessing the client. Contains all sub components and some miscellaneous methods.
Assembly: VintagestoryAPI.dll
Syntax
public interface ICoreClientAPI : ICoreAPI, ICoreAPICommon
Properties
|
Improve this Doc
View Source
Ambient
API Component to control the clients ambient values
Declaration
IAmbientManager Ambient { get; }
Property Value
|
Improve this Doc
View Source
BlockTextureAtlas
API for the Block Texture Atlas
Declaration
IBlockTextureAtlasAPI BlockTextureAtlas { get; }
Property Value
|
Improve this Doc
View Source
CurrentMusicTrack
Returns the currently playing music track, if any is playing
Declaration
IMusicTrack CurrentMusicTrack { get; }
Property Value
|
Improve this Doc
View Source
ElapsedMilliseconds
Amount of milliseconds ellapsed since client startup
Declaration
long ElapsedMilliseconds { get; }
Property Value
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
EntityTextureAtlas
API for the Entity Texture Atlas
Declaration
ITextureAtlasAPI EntityTextureAtlas { get; }
Property Value
|
Improve this Doc
View Source
Event
API Component for registering to various Events
Declaration
IClientEventAPI Event { get; }
Property Value
|
Improve this Doc
View Source
Forms
Platform independent ui methods and features.
Declaration
IXPlatformInterface Forms { get; }
Property Value
|
Improve this Doc
View Source
Gui
API for GUI Related methods
Declaration
Property Value
|
Improve this Doc
View Source
HideGuis
If true, the player is in gui-less mode (through the F4 key)
Declaration
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Input
API for Mouse / Keyboard input related things
Declaration
Property Value
|
Improve this Doc
View Source
InWorldEllapsedMilliseconds
Amount of milliseconds ellapsed while in a running game that is not paused
Declaration
long InWorldEllapsedMilliseconds { get; }
Property Value
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
IsGamePaused
True if the game is currently paused (only available in singleplayer)
Declaration
bool IsGamePaused { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsShuttingDown
True if the client is currently in the process of exiting
Declaration
bool IsShuttingDown { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsSinglePlayer
True if this is a singleplayer session
Declaration
bool IsSinglePlayer { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ItemTextureAtlas
API for the Item Texture Atlas
Declaration
IItemTextureAtlasAPI ItemTextureAtlas { get; }
Property Value
|
Improve this Doc
View Source
LinkProtocols
Add your own link protocol here if you want to implement a custom protocol. E.g. image://url-to-picture
Declaration
Dictionary<string, Action<LinkTextComponent>> LinkProtocols { get; }
Property Value
|
Improve this Doc
View Source
MacroManager
Api to the client side macros system
Declaration
IMacroManager MacroManager { get; }
Property Value
|
Improve this Doc
View Source
Network
API for doing sending/receiving network packets
Declaration
IClientNetworkAPI Network { get; }
Property Value
|
Improve this Doc
View Source
OpenedGuis
Declaration
IEnumerable<object> OpenedGuis { get; }
Property Value
Type |
Description |
IEnumerable<System.Object> |
|
|
Improve this Doc
View Source
PlayerReadyFired
True if all SendPlayerNowReady() was sent, signalling the player is now ready (called by the character selector upon submit)
Declaration
bool PlayerReadyFired { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Render
API for Rendering stuff onto the screen using OpenGL
Declaration
IRenderAPI Render { get; }
Property Value
|
Improve this Doc
View Source
Settings
The clients game settings as stored in the clientsettings.json
Declaration
ISettings Settings { get; }
Property Value
|
Improve this Doc
View Source
Shader
API for Rendering stuff onto the screen using OpenGL
Declaration
IShaderAPI Shader { get; }
Property Value
|
Improve this Doc
View Source
TagConverters
Add your own rich text elements here. Your will need to convert a VTML tag into a RichTextComponentBase element.
Declaration
Dictionary<string, Tag2RichTextDelegate> TagConverters { get; }
Property Value
|
Improve this Doc
View Source
Tesselator
API for Meshing in the Mainthread. Thread safe.
Declaration
ITesselatorAPI Tesselator { get; }
Property Value
|
Improve this Doc
View Source
TesselatorManager
Holds the default meshes of all blocks
Declaration
ITesselatorManager TesselatorManager { get; }
Property Value
|
Improve this Doc
View Source
World
API for accessing anything in the game world
Declaration
IClientWorldAccessor World { get; }
Property Value
Methods
|
Improve this Doc
View Source
RegisterCommand(String, String, String, ClientChatCommandDelegate)
Declaration
bool RegisterCommand(string command, string descriptionMsg, string syntaxMsg, ClientChatCommandDelegate handler)
Parameters
Type |
Name |
Description |
System.String |
command |
|
System.String |
descriptionMsg |
|
System.String |
syntaxMsg |
|
ClientChatCommandDelegate |
handler |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
RegisterCommand(ClientChatCommand)
Declaration
bool RegisterCommand(ClientChatCommand chatcommand)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
RegisterEntityRendererClass(String, Type)
Registers an entity renderer for given entity
Declaration
void RegisterEntityRendererClass(string className, Type rendererType)
Parameters
Type |
Name |
Description |
System.String |
className |
|
Type |
rendererType |
|
|
Improve this Doc
View Source
RegisterLinkProtocol(String, Action<LinkTextComponent>)
Register a link protocol handler
Declaration
void RegisterLinkProtocol(string protocolname, Action<LinkTextComponent> onLinkClicked)
Parameters
Type |
Name |
Description |
System.String |
protocolname |
|
Action<LinkTextComponent> |
onLinkClicked |
|
|
Improve this Doc
View Source
SendChatMessage(String, Int32, String)
Sends a chat message to the server
Declaration
void SendChatMessage(string message, int groupId, string data = null)
Parameters
Type |
Name |
Description |
System.String |
message |
|
System.Int32 |
groupId |
|
System.String |
data |
|
|
Improve this Doc
View Source
SendChatMessage(String, String)
Sends a chat message to the server in the players currently active channel
Declaration
void SendChatMessage(string message, string data = null)
Parameters
Type |
Name |
Description |
System.String |
message |
|
System.String |
data |
|
|
Improve this Doc
View Source
ShowChatMessage(String)
Shows a client side only chat message in the current chat channel. Uses the same code paths a server => client message takes. Does not execute client commands.
Declaration
void ShowChatMessage(string message)
Parameters
Type |
Name |
Description |
System.String |
message |
|
|
Improve this Doc
View Source
StartTrack(AssetLocation, Single, EnumSoundType, Action<ILoadedSound>)
Tells the music engine to load and immediately start given track once loaded, if the priority is higher than the currently playing track. May also be stopped while playing if another track with a higher priority is started.
If you supply an onLoaded method the track is not started immediately and you can manually start it at any given time by calling sound.Start()
Declaration
MusicTrack StartTrack(AssetLocation soundLocation, float priority, EnumSoundType soundType, Action<ILoadedSound> onLoaded = null)
Parameters
Returns
|
Improve this Doc
View Source
TriggerChatMessage(String)
Declaration
void TriggerChatMessage(string message)
Parameters
Type |
Name |
Description |
System.String |
message |
|
|
Improve this Doc
View Source
TriggerIngameDiscovery(Object, String, String)
Triggers a discovery event. HudDiscoveryMessage registers to this event and fades in/out a "discovery message" on the players screen
Declaration
void TriggerIngameDiscovery(object sender, string errorCode, string text)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.String |
errorCode |
|
System.String |
text |
|
|
Improve this Doc
View Source
TriggerIngameError(Object, String, String)
Triggers an in-game-error event. HudIngameError registers to this event and shows a vibrating red text on the players screen
Declaration
void TriggerIngameError(object sender, string errorCode, string text)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.String |
errorCode |
|
System.String |
text |
|
Extension Methods