Delegate ItemRenderDelegate
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
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.
public delegate void ItemRenderDelegate(ItemSlot inSlot, ItemRenderInfo renderInfo, Matrixf modelMat, double posX, double posY, double posZ, float size, int color, bool rotate = false, bool showStackSize = true)
Parameters
inSlot
ItemSlotThe slot in which the itemstack resides in
renderInfo
ItemRenderInfoThe render info for this stack, you can choose to ignore these values
modelMat
MatrixfThe model transformation matrix with position and size already preapplied, you can choose to ignore this value
posX
doubleThe center x-position where the stack has to be rendered
posY
doubleThe center y-position where the stack has to be rendered
posZ
doubleThe depth position. Higher values might be required for very large models, which can cause them to poke through dialogs in front of them, however
size
floatThe size of the stack that has to be rendered
color
intThe requested color, usually always white
rotate
boolWhether or not to rotate it (some parts of the game have this on or off)
showStackSize
boolWhether or not to show the stack size (some parts of the game have this on or off)
- Extension Methods