ItemModel
Index
Interfaces
IconRebuildListener
Parameters
model: ItemModel
newIcon: Bitmap
Returns void
ModelOverrideFunction
Parameters
item: ItemInstance
Returns ItemModel
Functions
getAllModels
Returns java.util.Collection<ItemModel>
A collection of all existing item models.
getEmptyMeshFromPool
Returns RenderMesh
Empty RenderMesh from the pool or creates an empty one. Used to reduce constructors/destructors calls.
getFor
getForWithFallback
getItemMeshTextureFor
Parameters
id: number
item or block numeric ID
data: number
item or block data
Returns string
Texture name for the specified item or block.
getItemRenderMeshFor
Parameters
id: number
count: number
data: number
randomize: boolean
if true, item mesh position is randomized
Returns RenderMesh
New RenderMesh generated for specified item.
newStandalone
Creates a new standalone item model that is not connected with any item or block, should be used in ItemModel.setModelOverrideCallback.
Returns ItemModel
releaseMesh
Releases RenderMesh and returns it to the pool. Used to reduce constructors/destructors calls.
Parameters
mesh: RenderMesh
Returns void
setCurrentCacheGroup
Run it at start of your mod to create new group, it will be applied to all models, created at the root of your mod (including default mod).
Parameters
mod: string
version: string
Returns void
tryReleaseModelBitmapsOnLowMemory
Releases some of the bitmaps to free up memory by run garbage cleaner.
Parameters
bytes: number
bytes count to be released
Returns void
Namespace used to change item models in player's hand and/or inventory. By default, if the block has an ICRender, it is automatically applied as item's model.
2.0.2b20