Icons
Across various features of Palladium you'll come across "icons". They are a generalized way to define a 16x16 texture
that can be used anywhere (e.g. powers, abilities, etc.).
To define one, you have multiple easy ways to do so.
Inline Definitions
The most common types of icons can be defined in a single line for easy usage.
Item
To display an item you simply specify its ID:
"icon": "minecraft:apple"
Texture
To render a texture you need to specify the path to it, including the .png suffix:
"icon": "example:textures/icon/my_cool_icon.png"
Alternatively, if you have a dynamic texture set up, you can specify it's ID too using a #:
"icon": "#example:my_dynamic_texture"
Sprites
Sprites are a more performant way of rendering textures, as they are all stitched together into one big texture file
when the game reloads. They are placed in assets/<namespace>/textures/gui/sprites/<filename>.png.
So to use one as an icon, you need to specify its ID which results from its path. As an example, a sprite texture file
located at assets/example/textures/gui/sprites/icon/my_cool_icon.png would be example:icon/my_cool_icon:
"icon": "example:icon/my_cool_icon"
Specific Definitions
To access more icon types you have to write out their definitions specifically, by declaring them by type. Below
is a list of available types added by Palladium. In your palladium/documentation/palladium folder you can find a
similiar that's auto-generated by the mod which can include icons that are added by other mods.
Compound
palladium:compound- Settings
- Example
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
icons | Icon definition array | Array of icons that will be displayed | / |
{
"type": "palladium:compound",
"icons": [
{
"item": {
"id": "minecraft:apple",
"count": 1
},
"type": "palladium:item"
},
{
"sprite": "example:sprite",
"type": "palladium:sprite"
}
]
}
Experience
palladium:experience- Settings
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
amount | Integer (>= 0) | Amount of xp points or levels | / | |
level | Boolean | Whether or not this will be displayed as xp points or levels | true |
Ingredient
palladium:ingredient- Settings
- Example 1
- Example 2
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
ingredient | Ingredient / Item | The ingredient (check vanilla recipes for how to define ingredients) | / |
{
"type": "palladium:ingredient",
"ingredient": [
"minecraft:apple",
"minecraft:bread"
]
}
{
"type": "palladium:ingredient",
"ingredient": "#minecraft:planks"
}
Item
palladium:item- Settings
- Example
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
item | Item / ItemStack | The item that will be displayed | / |
{
"type": "palladium:item",
"item": {
"id": "minecraft:apple",
"count": 1
}
}
Item in Slot
palladium:item_in_slot- Settings
- Example
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
slot | mainhandoffhandheadchestlegsfeetbodyaccessories:headaccessories:necklace | The slot that will be have its item displayed | / |
{
"type": "palladium:item_in_slot",
"slot": "chest"
}
Sprite
palladium:sprite- Settings
- Example
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
sprite | Identifier | The ID of the sprite that will be rendered | / |
{
"type": "palladium:sprite",
"sprite": "example:my_cool_icon"
}
Textured
palladium:texture- Settings
- Example 1
- Example 2
- Example 3
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
texture | Texture Reference | Path to the texture, or a dynamic texture ID | / | |
tint | Color | A tint that will be given to rendered texture | / |
{
"type": "palladium:texture",
"texture": "example:textures/icon/my_cool_icon.png"
}
{
"type": "palladium:texture",
"texture": "example:textures/icon/my_cool_icon.png",
"tint": "#ff0000"
}
{
"type": "palladium:texture",
"texture": "#example:my_dynamic_texture"
}