Skip to content

Reference ItemModel

A Reference, or Model, ItemModel is the simplest form of ItemModel.
All it does is reference the path to a Model1 file to use.

If we want to use this in an example here;

NexoItem Example with pre-made Model file
myitem:
  ItemModel:
    type: model
    model: namespace:mymodel #References assest/namespace/models/mymodel.json
NexoItem Example for a 2D NexoItem with just a Texture provided
myitem:
  Pack:
    texture: namespace:mytexture #References assest/namespace/textures/mytexture.png
  ItemModel:
    type: model
    model: myitem # When only a texture is provided, Nexo generates the Model for <itemid>

Warning

Should be noted that this example is not needed if you just want a basic Item like shown above.
When using prefer_item_models ( ItemModels vs. CustomModelData ), this is done automatically.
If normally relying on CustomModelData, you can also just set the ItemModel-Component

myitem:
  Pack:
    texture: namespace:mytexture
  Components:
    item_model: namespace:myitem

  1. Models are what control the visual aspects of Items & Blocks. These files are found in assets/<namespace>/models/... ↩