Namespace Vintagestory.API.Client
Classes
- 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
- 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
- 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
- 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
- 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
- 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
- GuiDialogGeneric
Mainly used for block entity based guis Open in GitHub
- GuiElementColorListPicker
Creates a toggle button for the GUI. Open in GitHub
- GuiElementConfigList
A configurable list of items. An example of this is the controls in the settings menu. Open in GitHub
- GuiElementControl
An element that allows input and can be disabled 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
- GuiElementElementListPickerBase<T>
Creates a toggle button for the GUI.
- GuiElementIconListPicker
Creates a toggle button for the GUI. 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
- GuiElementNumberInput
A numerical input field for inputting numbers. 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
- GuiElementSkillItemGrid
A slot for item skills. Open in GitHub
- GuiElementStatbar
A stat bar to the GUI for keeping track of progress and numbers. Open in GitHub
- GuiElementToggleButton
Creates a toggle button for the GUI. 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
- HudElement
Base class for Hud Elements. Open in GitHub
- IconComponent
Draws an icon 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
- 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
- LoadedTexture
A reference to a texture that has been uploaded onto the graphics cards, if TextureId is not zero 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
- ModelDataPoolLocation
Contains all the data for the given model pool. 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
- MusicTrack
Adds a basic music track. 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
- 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
- SurfaceMusicTrack
Adds a basic music track. Open in GitHub
- TextureAtlasPosition
The position of a texture inside an atlas 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
Interfaces
- 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.
- 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
- 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.
- IShaderAPI
API for configuring and loading GLSL Shaders
- ITesselatorAPI
Interface that allows custom model model meshing for items, blocks and entities
Texturing crash course:- Block, Item and Entity textures are loaded from json files in the form of a CompositeTexture instance
- After connecting to a game server, the client inserts all of these textures into their type-respective texture atlasses
- After insertion a "texture sub-id" is left behind in the CompositeTexture.Baked Property
- 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: - Block and Item shapes are loaded from json files in the form of a CompositeShape instance
- A CompositeShape instance hold some block/item specific information as well as an identifier to a Shape instance
- 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
- Result is a MeshData instance that holds all vertices, UV coords, colors and etc. for each block
- 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.
- Block, Item and Entity textures are loaded from json files in the form of a CompositeTexture instance
- ITesselatorManager
Manager interface for Tesselators.
- ITexPositionSource
An interface that can supply texture atlas positions
- ITextureAtlasAPI
Entity texture Atlas.
Enums
- EnumBlockEntityPacketId
Packet IDs for block entities. 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
- EnumDialogArea
First word = X Alignment (left, center, right or fixed) Second word = Y Alignment (top, middle, bottom or fixed) Open in GitHub
- EnumDrawType
Draw types for blocks. Open in GitHub
- EnumFaceCullMode
Types that determine how block faces should be culled. Open in GitHub
- EnumItemRenderTarget
The render taget for an item stack Open in GitHub
- EnumSoundType
Sound types, often used to determine specific volume controls. 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
Delegates
- BlockChangedDelegate
OldBlock param may be null!
- ContinousParticleSpawnTaskDelegate
Return false to stop spawning particles
- 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.
- NetworkServerMessageHandler<T>
Handler for processing a message