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
inSlotItemSlotThe slot in which the itemstack resides in
renderInfoItemRenderInfoThe render info for this stack, you can choose to ignore these values
modelMatMatrixfThe model transformation matrix with position and size already preapplied, you can choose to ignore this value
posXdoubleThe center x-position where the stack has to be rendered
posYdoubleThe center y-position where the stack has to be rendered
posZdoubleThe depth position. Higher values might be required for very large models, which can cause them to poke through dialogs in front of them, however
sizefloatThe size of the stack that has to be rendered
colorintThe requested color, usually always white
rotateboolWhether or not to rotate it (some parts of the game have this on or off)
showStackSizeboolWhether or not to show the stack size (some parts of the game have this on or off)
- Extension Methods