Table of Contents

Namespace Vintagestory.API.Client

Classes

AvailableCodec
BakedCompositeTexture

An expanded, atlas-friendly version of a CompositeTexture

BlendedOverlayTexture
CairoFont

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

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
ClearFloatTextComponent
CompositeTexture

A single block texture

ConfigItem

A config item for the GUIElementConfigList.

ContainedTextureSource

Helper class for implementors of ITexPositionSource

CubeMeshUtil
CustomMeshDataPartByte

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

CustomMeshDataPartFloat

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

CustomMeshDataPartInt

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

CustomMeshDataPartShort

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

CustomMeshDataPart<T>

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

DamagedPerceptionEffect
DefaultShaderUniforms
DialogElement
DialogRow
DrunkPerceptionEffect
DummyRenderer
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

ElementStdBounds

Just some default sizings for various ui elements

EnumLodPool
EventMusicTrack
FastBitmap
FileDropEvent
FontConfig
FrameBufferRef
FramebufferAttrs
FramebufferAttrsAttachment
FreezingPerceptionEffect
FrustumCulling
GlKeyNames
GridRecipeAndUnnamedIngredients
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.

GuiComposerHelpers
GuiDialog
GuiDialog.DlgComposers

Dialogue Composer for the GUIDialogue.

GuiDialogBlockEntity

Base class for dialogs bound to block entities.

GuiDialogBlockEntityInventory

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

GuiDialogCharacterBase
GuiDialogConfirm
GuiDialogGeneric

Mainly used for block entity based guis

GuiElement
GuiElementCellList<T>
GuiElementChatInput
GuiElementClipHelpler
GuiElementColorListPicker

Creates a toggle button for the GUI.

GuiElementCompactScrollbar
GuiElementConfigList

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

GuiElementContainer
GuiElementControl

An element that allows input and can be disabled

GuiElementCustomDraw
GuiElementCustomRender
GuiElementDialogBackground
GuiElementDialogTitleBar

A title bar for your GUI.

GuiElementDropDown

Creates a drop-down list of items.

GuiElementDynamicText

Text that can be changed after being composed

GuiElementDynamicTextHelper
GuiElementEditableTextBase
GuiElementElementListPickerBase<T>

Creates a toggle button for the GUI.

GuiElementEmbossedText
GuiElementGameOverlay
GuiElementGameOverlyHelper
GuiElementGrayBackground
GuiElementGrayBackgroundHelpber
GuiElementHelpers
GuiElementHorizontalTabs
GuiElementHoverText
GuiElementIconListPicker

Creates a toggle button for the GUI.

GuiElementImage
GuiElementImageBackgroundHelper
GuiElementInsetHelper
GuiElementItemSlotGrid

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

GuiElementItemSlotGridBase

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

GuiElementItemSlotGridExcl

Builds slot grid with exclusions to the grid.

GuiElementItemstackInfo
GuiElementListMenu
GuiElementMainMenuCell
GuiElementNumberInput

A numerical input field for inputting numbers.

GuiElementParent
GuiElementPassiveItemSlot

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

GuiElementRichtext
GuiElementScrollbar
GuiElementSkillItemGrid

A slot for item skills.

GuiElementSlider
GuiElementSliderOld
GuiElementStatbar

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

GuiElementStaticText
GuiElementSwitch
GuiElementSwitchOld
GuiElementTextArea
GuiElementTextBase
GuiElementTextButton
GuiElementTextInput
GuiElementToggleButton

Creates a toggle button for the GUI.

GuiElementVerticalTabs
GuiJsonDialog

This is a dialogue built from JSON files.

GuiStyle

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

GuiTab
HotKey
HotkeyComponent
HudElement

Base class for Hud Elements.

IconComponent

Draws an icon

IconUtil
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.

ItemstackComponentBase

Draws an itemstack

ItemstackTextComponent

Draws an itemstack

JsonDialogSettings
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

KeyConverter

Converts key code from OpenTK 4 to GlKeys

KeyEvent
LineMeshUtil
LineRectangled
LinkTextComponent
LoadedTexture

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

MatrixToolsd
Matrixf
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.

MeshDataPool

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

MeshDataPoolManager

Holds a collection of pools, usually for 1 render pass

MeshDataPoolMasterManager

Holds all chunk mesh pools of the current running game

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

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.

MeshUtil
ModelCubeUtilExt
ModelDataPoolLocation

Contains all the data for the given model pool.

MouseButtonState
MouseEvent

This contains the data for what the mouse is currently doing.

MouseWheelEventArgs

The event arguments for the mouse.

MultiTextureMeshRef
MusicTrack

Adds a basic music track.

MusicTrackPart
NormalUtil
ParticlePhysics
PerceptionEffect
PerceptionEffects
QuadMeshUtil

Utility class for simple quad meshes

RainMusicTrack

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

RawTexture
RichTextComponent
RichTextComponentBase
SavegameCellEntry
SkillItem
SlideshowGridRecipeTextComponent

Draws multiple itemstacks

SlideshowItemstackTextComponent

Draws multiple itemstacks

SoundParams

The sound paramaters used for loading sounds on the client side

StackAndWildCard
SurfaceMusicTrack

Adds a basic music track.

TesselationMetaData
TextBackground
TextDrawUtil
TextFlowPath
TextLine
TextTextureUtil
TextureAtlasPosition

The position of a texture inside an atlas

TextureDictionary
WorldInteraction

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.

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
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
ElementSizing
EnumBlendMode
EnumBlockEntityPacketId

Packet IDs for block entities.

EnumButtonStyle
EnumCalcBoundsResult
EnumCameraMode
EnumChannelState

The state of a network channel

EnumChunkRenderPass

The various render passes available for rendering blocks

EnumCollideFlags
EnumDialogArea

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

EnumDialogElementMode
EnumDialogElementType
EnumDialogType
EnumDrawMode
EnumDrawType
EnumFaceCullMode
EnumFloat
EnumFontStyle
EnumFrameBuffer
EnumFramebufferAttachment
EnumFrustumCullMode
EnumHighlightBlocksMode
EnumItemRenderTarget

The render taget for an item stack

EnumItemType
EnumLinebreakBehavior
EnumRenderStage
EnumShaderProgram
EnumShaderType
EnumSoundType
EnumTextOrientation
EnumTextureFilter
EnumTextureInternalFormat
EnumTexturePixelFormat
EnumTextureWrap
EnumVelocityState
EnumVerticalAlign
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)

GuiDialogBlockEntity.EnumPosFlag
HotkeyType
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
VisibleTestDelegate