🖼
Resource
Properties that allows customization of item graphics
Make sure you're not using UPPERCASE or special characters in items names, namespaces, texture files (png) and model files (json)

# Automatic generation

In order to tell ItemsAdder which texture/model use for an item you have to add the resource attribute. This is an example:
1
resource:
2
material: DIAMOND_SWORD
3
generate: true
4
textures:
5
- item/example_item.png
Copied!
material is the vanilla material this item will use as base.
generate tells to IA if it needs to generate the item model automatically based on textures you listed
textures is the list of textures IA will use to generate the model automatically.

## Where do I put textures?

Textures you listed in the textures attribute must be placed in the right folder. So if you set textures like in the example and your namespace (is for example) myitems you will have to put example_item.png file inside this folder: plugins\ItemsAdder\data\resource_pack\assets\myitems\textures\item
If the path doesn't exists create all the folders needed.
You can avoid setting .png in the textures attribute, IA will recognize the file automatically

# Use your own 3D custom model (.json file)

If you have a custom modelled sword or item you can tell IA not to generate the model automatically. This is an example:
1
resource:
2
material: DIAMOND_SWORD
3
generate: false
4
model_path: item/floating_sword
5
Copied!

## Where do I put my model?

Model you set in the model_pathattribute must be placed in the right folder. So if you set model_path like in the example and your namespace (is for example) myitems you will have to put floating_sword.json file inside this folder: plugins\ItemsAdder\data\resource_pack\assets\myitems\models\item
If the path doesn't exists create all the folders needed.

## My textures are not working!

If your custom model textures are not showing you have to open your model file and fix the textures path. For example if you had this:
1
{
2
"textures": {
3
"4": "item/alchemy_candles/white_candle",
4
"6": "item/alchemy_candles/candle_top",
5
"7": "item/alchemy_candles/red_candle",
6
"8": "item/alchemy_candles/fire"
7
},
Copied!
You have to change it to this (your_namespace is your namespace folder):
1
{
2
"textures": {
3
"4": "your_namespace:item/alchemy_candles/white_candle",
4
"6": "your_namespace:item/alchemy_candles/candle_top",
5
"7": "your_namespace:item/alchemy_candles/red_candle",
6
"8": "your_namespace:item/alchemy_candles/fire"
7
},
Copied!

# Manually specify custom_model_data

If you want to force the usage of a defined custom_model_data (CustomModelData) you can:
1
resource:
2
material: CLOCK
3
model_id: 4000
4
generate: false
5
model_path: "item/multimeter"
Copied!
You also have to create the model file named "multimeter" (in this example) inside this folder: assets\YOUR_NAMESPACE\models\item
You can also tell IA to automatically generate the model based on the texture:
1
info:
2
namespace: slimefun
3
items:
4
5
resource:
6
7
generate: true
8
model_id: 4000
9
textures:
10
If you previously created this item and already used /iazip command and now you change the model_id: it's very important to run the command /iacleancache items to remove unused IDs and update the changed ID.