Namespace Vintagestory.API.Client
Classes
- BakedCompositeTexture
An expanded, atlas-friendly version of a CompositeTexture
- BlendedOverlayTexture
Defines a texture to be overlayed on another texture.
- 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
- CompositeTexture
Holds data about a texture. Also allows textures to be overlayed on top of one another.
- ConfigItem
A config item for the GUIElementConfigList.
- ContainedTextureSource
Helper class for implementors of ITexPositionSource
- 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
- 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
- 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.
- 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.
- GuiDialogGeneric
Mainly used for block entity based guis
- GuiElementColorListPicker
Creates a toggle button for the GUI.
- GuiElementConfigList
A configurable list of items. An example of this is the controls in the settings menu.
- GuiElementControl
An element that allows input and can be disabled
- GuiElementDialogTitleBar
A title bar for your GUI.
- GuiElementDropDown
Creates a drop-down list of items.
- GuiElementDynamicText
Text that can be changed after being composed
- GuiElementElementListPickerBase<T>
Creates a toggle button for the GUI.
- GuiElementIconListPicker
Creates a toggle button for the GUI.
- 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.
- GuiElementNumberInput
A numerical input field for inputting numbers.
- GuiElementPassiveItemSlot
Displays a single slot from given inventory, cannot be directly interacted with. Currently used for the mouse slot
- GuiElementSkillItemGrid
A slot for item skills.
- GuiElementStatbar
A stat bar to the GUI for keeping track of progress and numbers.
- GuiElementToggleButton
Creates a toggle button for the GUI.
- GuiJsonDialog
This is a dialogue built from JSON files.
- GuiStyle
A class containing common values for elements before scaling is applied.
- HudElement
Base class for Hud Elements.
- IconComponent
Draws an icon
- 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
- 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
- LoadedTexture
A reference to a texture that has been uploaded onto the graphics cards, if TextureId is not zero
- 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.
- ModelDataPoolLocation
Contains all the data for the given model pool.
- MouseEvent
This contains the data for what the mouse is currently doing.
- MouseWheelEventArgs
The event arguments for the mouse.
- MusicTrack
Adds a basic music track.
- QuadMeshUtil
Utility class for simple quad meshes
- RainMusicTrack
Creates a track for rain related music. [Not yet implemented]
- SlideshowGridRecipeTextComponent
Draws multiple itemstacks
- SlideshowItemstackTextComponent
Draws multiple itemstacks
- SoundParams
The sound paramaters used for loading sounds on the client side
- SurfaceMusicTrack
Adds a basic music track.
- TextureAtlasPosition
The position of a texture inside an atlas
- WorldInteraction
A world interaction for the object. This is used to prompt the player about what a certain object can do.
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.
- EnumChannelState
The state of a network channel
- EnumChunkRenderPass
The various render passes available for rendering blocks
- EnumDialogArea
First word = X Alignment (left, center, right or fixed) Second word = Y Alignment (top, middle, bottom or fixed)
- EnumDrawType
Draw types for blocks.
- EnumFaceCullMode
Types that determine how block faces should be culled.
- EnumItemRenderTarget
The render taget for an item stack
- EnumSoundType
Sound types, often used to determine specific volume controls.
- 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)
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