Table of Contents

Namespace Vintagestory.API.Client

Classes

AvailableCodec

Open in GitHub

BakedCompositeTexture

An expanded, atlas-friendly version of a CompositeTexture Open in GitHub

BlendedOverlayTexture

Defines a texture to be overlayed on another texture. Open in GitHub

CairoFont

Represent a font with sizing and styling for use in rendering text Open in GitHub

CaveMusicTrack

Represent a dynamically composed track made out of individual small pieces of music mixed together defined by specific rules Requirements:

  • Start/Stop Multiple Trackpieces
  • Set their volumne dynamically
  • Decide which Trackpieces to play
  • Allow individual rules per Trackpiece Specific examples:
  • Play Thunder ambient only if thunderlevel above 10
    • Thunder ambient volume based on thunderlevel (between 0.3 and 1.1?)
  • Play Aquatic Drone only when y below 60
  • Play Deep Drone only when y below 50 Open in GitHub
ClearFloatTextComponent

Open in GitHub

CompositeTexture

Holds data about a texture. Also allows textures to be overlayed on top of one another. Open in GitHub

ConfigItem

A config item for the GUIElementConfigList. Open in GitHub

ContainedTextureSource

Helper class for implementors of ITexPositionSource Open in GitHub

CubeMeshUtil

Open in GitHub

CustomMeshDataPartByte

Holds arbitrary byte data for meshes to be used in the shader Open in GitHub

CustomMeshDataPartFloat

Holds arbitrary float data for meshes to be used in the shader Open in GitHub

CustomMeshDataPartInt

Holds arbitrary int data for meshes to be used in the shader Open in GitHub

CustomMeshDataPartShort

Holds arbitrary short data for meshes to be used in the shader Open in GitHub

CustomMeshDataPart<T>

Holds arbitrary mesh data for meshes to be used in a shader

DamagedPerceptionEffect

Open in GitHub

DefaultShaderUniforms

Open in GitHub

DialogElement

Open in GitHub

DialogRow

Open in GitHub

DrunkPerceptionEffect

Open in GitHub

DummyRenderer

Open in GitHub

ElementBounds

Box sizing model comparable to the box sizing model of cascading style sheets using "position:relative;" Each element has a position, size, padding and margin Padding is counted towards the size of the box, whereas margin is not Open in GitHub

ElementStdBounds

Just some default sizings for various ui elements Open in GitHub

EnumLodPool

Open in GitHub

EventMusicTrack

Open in GitHub

FastBitmap

Open in GitHub

FileDropEvent

Open in GitHub

FontConfig

Open in GitHub

FrameBufferRef

Open in GitHub

FramebufferAttrs

Open in GitHub

FramebufferAttrsAttachment

Open in GitHub

FreezingPerceptionEffect

Open in GitHub

FrustumCulling

Open in GitHub

GlKeyNames

Open in GitHub

GridRecipeAndUnnamedIngredients

Open in GitHub

GuiComposer

Composes a dialog which are made from a set of elements The composed dialog is cached, so to recompose you have to Recompose All elements or instantiate a new composer with doCache set to false The caching allows the dialog using the composer to not worry about performance and just call compose whenever it has to display a new composed dialog You add components by chaining the functions of the composer together for building the result. Open in GitHub

GuiComposerHelpers

Open in GitHub

GuiDialog

Open in GitHub

GuiDialog.DlgComposers

Dialogue Composer for the GUIDialogue.

GuiDialogBlockEntity

Base class for dialogs bound to block entities. Open in GitHub

GuiDialogBlockEntityInventory

A block entity inventory system for things like a campfire, or other things like that. Open in GitHub

GuiDialogCharacterBase

Open in GitHub

GuiDialogConfirm

Open in GitHub

GuiDialogGeneric

Mainly used for block entity based guis Open in GitHub

GuiElement

Open in GitHub

GuiElementCellList<T>
GuiElementChatInput

Open in GitHub

GuiElementClipHelpler

Open in GitHub

GuiElementColorListPicker

Creates a toggle button for the GUI. Open in GitHub

GuiElementCompactScrollbar

Open in GitHub

GuiElementConfigList

A configurable list of items. An example of this is the controls in the settings menu. Open in GitHub

GuiElementContainer

Open in GitHub

GuiElementControl

An element that allows input and can be disabled Open in GitHub

GuiElementCustomDraw

Open in GitHub

GuiElementCustomRender

Open in GitHub

GuiElementDialogBackground

Open in GitHub

GuiElementDialogTitleBar

A title bar for your GUI. Open in GitHub

GuiElementDropDown

Creates a drop-down list of items. Open in GitHub

GuiElementDynamicText

Text that can be changed after being composed Open in GitHub

GuiElementDynamicTextHelper

Open in GitHub

GuiElementEditableTextBase

Open in GitHub

GuiElementElementListPickerBase<T>

Creates a toggle button for the GUI.

GuiElementEmbossedText

Open in GitHub

GuiElementGameOverlay

Open in GitHub

GuiElementGameOverlyHelper

Open in GitHub

GuiElementGrayBackground

Open in GitHub

GuiElementGrayBackgroundHelpber

Open in GitHub

GuiElementHelpers

Open in GitHub

GuiElementHorizontalTabs

Open in GitHub

GuiElementHoverText

Open in GitHub

GuiElementIconListPicker

Creates a toggle button for the GUI. Open in GitHub

GuiElementImage

Open in GitHub

GuiElementImageBackgroundHelper

Open in GitHub

GuiElementInsetHelper

Open in GitHub

GuiElementItemSlotGrid

Displays the slots of an inventory in the form of a slot grid Open in GitHub

GuiElementItemSlotGridBase

A base class for the slot grid. For all your slot grid needs. Open in GitHub

GuiElementItemSlotGridExcl

Builds slot grid with exclusions to the grid. Open in GitHub

GuiElementItemstackInfo

Open in GitHub

GuiElementListMenu

Open in GitHub

GuiElementMainMenuCell

Open in GitHub

GuiElementNumberInput

A numerical input field for inputting numbers. Open in GitHub

GuiElementParent

Open in GitHub

GuiElementPassiveItemSlot

Displays a single slot from given inventory, cannot be directly interacted with. Currently used for the mouse slot Open in GitHub

GuiElementRichtext

Open in GitHub

GuiElementScrollbar

Open in GitHub

GuiElementSkillItemGrid

A slot for item skills. Open in GitHub

GuiElementSlider

Open in GitHub

GuiElementSliderOld

Open in GitHub

GuiElementStatbar

A stat bar to the GUI for keeping track of progress and numbers. Open in GitHub

GuiElementStaticText

Open in GitHub

GuiElementSwitch

Open in GitHub

GuiElementSwitchOld

Open in GitHub

GuiElementTextArea

Open in GitHub

GuiElementTextBase

Open in GitHub

GuiElementTextButton

Open in GitHub

GuiElementTextInput

Open in GitHub

GuiElementToggleButton

Creates a toggle button for the GUI. Open in GitHub

GuiElementVerticalTabs

Open in GitHub

GuiJsonDialog

This is a dialogue built from JSON files. Open in GitHub

GuiStyle

A class containing common values for elements before scaling is applied. Open in GitHub

GuiTab

Open in GitHub

HotKey

Open in GitHub

HotkeyComponent

Open in GitHub

HudElement

Base class for Hud Elements. Open in GitHub

IconComponent

Draws an icon Open in GitHub

IconUtil

Open in GitHub

ItemRenderInfo

Holds information on how a collectible should be rendered in hands, on the ground or in gui. In collectible.OnBeforeRender() the values are prefilled with the default ones. Open in GitHub

ItemstackComponentBase

Draws an itemstack Open in GitHub

ItemstackTextComponent

Draws an itemstack Open in GitHub

JsonDialogSettings

Open in GitHub

KeyCombination

Mapping of an input key combination. Note: the "key" might also be a mouse button if a hotkey has been configured to be activated by a mouse button Open in GitHub

KeyConverter

Converts key code from OpenTK 4 to GlKeys Open in GitHub

KeyEvent

Open in GitHub

LineMeshUtil

Open in GitHub

LineRectangled

Open in GitHub

LinkTextComponent

Open in GitHub

LoadedTexture

A reference to a texture that has been uploaded onto the graphics cards, if TextureId is not zero Open in GitHub

MatrixToolsd

Open in GitHub

Matrixf

Open in GitHub

MeshData

A data structure that can be used to upload mesh information onto the graphics card Please note, all arrays are used as a buffer. They do not tightly fit the data but are always sized as a multiple of 2 from the initial size. Open in GitHub

MeshDataPool

This is a modeldata pool, which can hold 400k vertices, 300k indices but not more than 900 chunks Open in GitHub

MeshDataPoolManager

Holds a collection of pools, usually for 1 render pass Open in GitHub

MeshDataPoolMasterManager

Holds all chunk mesh pools of the current running game Open in GitHub

MeshDataRecycler

This is a recycling system for MeshData objects, so that they can be re-used: helps performance by easing memory allocation pressure, at the cost of holding typically around 300-400MB of memory for these recycled objects Open in GitHub

MeshRef

A reference to a mesh that's been uploaded onto the graphics card (i.e. that has been placed in an OpenGL VAO). This reference can be used for rendering it. Open in GitHub

MeshUtil

Open in GitHub

ModelCubeUtilExt

Open in GitHub

ModelDataPoolLocation

Contains all the data for the given model pool. Open in GitHub

MouseButtonState

Open in GitHub

MouseEvent

This contains the data for what the mouse is currently doing. Open in GitHub

MouseWheelEventArgs

The event arguments for the mouse. Open in GitHub

MultiTextureMeshRef

Open in GitHub

MusicTrack

Adds a basic music track. Open in GitHub

MusicTrackPart

Open in GitHub

NormalUtil

Open in GitHub

ParticlePhysics

Open in GitHub

PerceptionEffect

Open in GitHub

PerceptionEffects

Open in GitHub

QuadMeshUtil

Utility class for simple quad meshes Open in GitHub

RainMusicTrack

Creates a track for rain related music. [Not yet implemented] Open in GitHub

RawTexture

Open in GitHub

RichTextComponent

Open in GitHub

RichTextComponentBase

Open in GitHub

SavegameCellEntry

Open in GitHub

ShapeTextureSource

Open in GitHub

SkillItem

Open in GitHub

SlideshowGridRecipeTextComponent

Draws multiple itemstacks Open in GitHub

SlideshowItemstackTextComponent

Draws multiple itemstacks Open in GitHub

SoundParams

The sound paramaters used for loading sounds on the client side Open in GitHub

StackAndWildCard

Open in GitHub

SurfaceMusicTrack

Adds a basic music track. Open in GitHub

TesselationMetaData

Open in GitHub

TextBackground

Open in GitHub

TextDrawUtil

Open in GitHub

TextFlowPath

Open in GitHub

TextLine

Open in GitHub

TextTextureUtil

Open in GitHub

TextureAtlasPosition

The position of a texture inside an atlas Open in GitHub

TextureDictionary

Open in GitHub

UBORef

Open in GitHub

WireframeModes

Open in GitHub

WorldInteraction

A world interaction for the object. This is used to prompt the player about what a certain object can do. Open in GitHub

Structs

ColorMapData
Plane

Interfaces

IAsyncParticleManager
IAviWriter
IBlockTextureAtlasAPI

Block texture Atlas

IClientEventAPI

Contains some client specific events you can hook into

IClientNetworkAPI

API Features to set up a network channel for custom server<->client data exchange. Client side.

IClientNetworkChannel

Represent a custom network channel for sending messages between client and server

IClientPlayer

A client side player

IClientWorldAccessor

The world accessor implemented by the client, offers some extra features only available on the client

IColorPresets

Facilitates the Accessibility tab wireframe colors setting. Offers three preset color options, "Default", "Preset2" and "Preset3". The selection between these three options is chosen by the ClientSettings int value "guiColorsPreset". Within these presets, individual color values are stored by string key.

ICoreClientAPI

The core api implemented by the client. The main interface for accessing the client. Contains all sub components and some miscellaneous methods.

ICustomInteractionHelpPositioning
IGuiAPI
IGuiComposerManager
IGuiElementCell
IInputAPI

This interface manages the inputs of the player and is used mostly on the client side.

IItemTextureAtlasAPI

Item texture Atlas.

ILoadedSound

Represents a loaded game sound

IMacroBase
IMacroManager
IMeshPoolSupplier
IMetaBlock
IMusicEngine
IMusicTrack
INetworkChannel
IPointLight
IRenderAPI

The main api component to assist you in rendering pretty stuff onto the screen

IRenderer

Interface to render something on to the clients screens. Used for block entitites.

ISettings

Setting interface for multiple settings.

ISettingsClass<T>

Setting interface.

IShader
IShaderAPI

API for configuring and loading GLSL Shaders

IShaderProgram
IStandardShaderProgram
ITerrainMeshPool
ITesselatorAPI

Interface that allows custom model model meshing for items, blocks and entities
Texturing crash course:

  1. Block, Item and Entity textures are loaded from json files in the form of a CompositeTexture instance
  2. After connecting to a game server, the client inserts all of these textures into their type-respective texture atlasses
  3. After insertion a "texture sub-id" is left behind in the CompositeTexture.Baked Property
  4. You can now find the position of the texture inside the atlas through the Block/Item/Entity-TextureAtlasPositions arrays (teturesubid is the array key)

    Shape Tesselation crash course:
  5. Block and Item shapes are loaded from json files in the form of a CompositeShape instance
  6. A CompositeShape instance hold some block/item specific information as well as an identifier to a Shape instance
  7. After connecting to a game server, the client loads all shapes from the shape folder then finds each blocks/items shape by its shape identifier
  8. Result is a MeshData instance that holds all vertices, UV coords, colors and etc. for each block
  9. That meshdata instance is
    a) Held as-is in memory for using during chunk tesselation (you can get a reference to it through getDefaultBlockMesh())
    b) "Compiled" to a Model for use during rendering in the gui.
    Model Compilation means all it's mesh data is uploaded onto the graphcis through a VAO and a ModelRef instance is left behind which
    can be used by the RenderAPI to render it.
ITesselatorManager

Manager interface for Tesselators.

ITexPositionSource

An interface that can supply texture atlas positions

ITextureAtlasAPI

Entity texture Atlas.

Enums

DataConversion

Open in GitHub

ElementSizing

Open in GitHub

EnumBlendMode

Open in GitHub

EnumBlockEntityPacketId

Packet IDs for block entities. Open in GitHub

EnumButtonStyle

Open in GitHub

EnumCalcBoundsResult

Open in GitHub

EnumCameraMode

Open in GitHub

EnumChannelState

The state of a network channel Open in GitHub

EnumChunkRenderPass

The various render passes available for rendering blocks Open in GitHub

EnumCollideFlags

Open in GitHub

EnumDialogArea

First word = X Alignment (left, center, right or fixed) Second word = Y Alignment (top, middle, bottom or fixed) Open in GitHub

EnumDialogElementMode

Open in GitHub

EnumDialogElementType

Open in GitHub

EnumDialogType

Open in GitHub

EnumDrawMode

Open in GitHub

EnumDrawType

Draw types for blocks. Open in GitHub

EnumFaceCullMode

Types that determine how block faces should be culled. Open in GitHub

EnumFloat

Open in GitHub

EnumFontStyle

Open in GitHub

EnumFrameBuffer

Open in GitHub

EnumFramebufferAttachment

Open in GitHub

EnumFrustumCullMode

Open in GitHub

EnumHighlightBlocksMode

Open in GitHub

EnumItemRenderTarget

The render taget for an item stack Open in GitHub

EnumItemType

Open in GitHub

EnumLinebreakBehavior

Open in GitHub

EnumRenderStage

Open in GitHub

EnumShaderProgram

Open in GitHub

EnumShaderType

Open in GitHub

EnumSoundType

Sound types, often used to determine specific volume controls. Open in GitHub

EnumTextOrientation

Open in GitHub

EnumTextureFilter

Open in GitHub

EnumTextureInternalFormat

Open in GitHub

EnumTexturePixelFormat

Open in GitHub

EnumTextureWrap

Open in GitHub

EnumVelocityState

Open in GitHub

EnumVerticalAlign

Open in GitHub

GlKeys

Internally the game uses OpenTK and their Keys are by default mapped to US QWERTY Keyboard layout which the GlKeys also do. Upon typing text in a Text input field it will produce the correct characters according to your keyboard layout.

If you need to get the character for the current Keyboard layout use GetKeyName(GlKeys) Open in GitHub

GuiDialog.EnumPosFlag
HotkeyType

Open in GitHub

ModelCubeUtilExt.EnumShadeMode

Delegates

BlockChangedDelegate

OldBlock param may be null!

CanClickSlotDelegate
ChatLineDelegate
ClientChatLineDelegate
ConfigItemClickDelegate
ContinousParticleSpawnTaskDelegate

Return false to stop spawning particles

CreateTextureDelegate
DrawDelegate
DrawDelegateWithBounds
DrawIconDelegate
DrawSkillIconDelegate
FileDropDelegate
GuiElementEditableTextBase.OnTryTextChangeDelegate
IconRendererDelegate
InfoTextDelegate
IngameDiscoveryDelegate
IngameErrorDelegate
InteractionMatcherDelegate
InteractionStacksDelegate
IsPlayerReadyDelegate
ItemRenderDelegate

A custom itemstack render handler. This method is called after Collectible.OnBeforeRender(). For render target gui, the gui shader and its uniforms are already fully prepared, you may only call RenderMesh() and ignore the modelMat, position and size values - stack sizes however, are not covered by this.

KeyEventDelegate
MeshData.MeshDataFilterDelegate
MouseEventDelegate
NetworkServerMessageHandler<T>

Handler for processing a message

OnGamePauseResume
OnHotKeyDelegate
OnRequireCell<T>
OnSettingsChanged<T>
OnValueGetDelegate
OnValueSetDelegate
PlayerEventDelegate
RenderDelegateWithBounds
RenderSkillItemDelegate
SelectionChangedDelegate
SliderTooltipDelegate
StackDisplayDelegate
StatbarValueDelegate
TexturePathUpdater
TextureSourceBuilder
VisibleTestDelegate