-
-
Notifications
You must be signed in to change notification settings - Fork 0
Client resources
Since by registering new leathered boots you are creating new items in the game, you need to create localization and texture related files for them.
Every time below you see the string custom_armor_material
, it must be replaced with the value returned by your custom ArmorMaterial
when calling:
-
ArmorMaterial.getName()
in 1.21.1 and below. -
ArmorMaterial.modelId().getPath()
in 1.21.3. -
ArmorMaterial.assetId().location().getPath()
in 1.21.4 and above.
Leathered Boots provides a dyeable texture overlay for items (boots in inventory), however it fits with Vanilla texture shape only.
If your custom boots have the same texture shape as Vanilla, you can freely use the provided overlay, otherwise everywhere below you see a reference to leathered_boots:item/leathered_boots_overlay
you need to have your own dyeable overlay.
Leathered Boots can't provide dyeable texture overlay for armors (equipped boots), however if your custom boots have a texture that fits the Vanilla shape of equipped boots, you can download and reuse the same overlay used by Leathered Boots.
More about this in the Armor textures section below.
Under resources/assets/mod_id/lang/
add at least a en_us.json
file with the following content:
{
"item.mod_id.leathered_custom_armor_material_boots": "Custom Leathered Boots"
// Do the above for all the leathered boots you add via the API
}
Since 1.21.4
For each of your leathered boots added via the API, you need to add several item related files.
First, you need the so-called "client items", located under resources/assets/mod_id/items/
.
Your client item for your leathered boots must be named leathered_custom_armor_material_boots.json
and should look like this:
Client item JSON
{
"model": {
"type": "minecraft:select",
"cases": [
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/quartz/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:quartz"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/iron/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:iron"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/netherite/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:netherite"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/redstone/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:redstone"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/copper/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:copper"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/gold/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:gold"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/emerald/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:emerald"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/diamond/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:diamond"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/lapis/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:lapis"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/amethyst/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:amethyst"
},
{
"model": {
"type": "minecraft:model",
"model": "mod_id:item/trim/resin/leathered_custom_armor_material_boots_trim",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"when": "minecraft:resin"
}
],
"fallback": {
"type": "minecraft:model",
"model": "mod_id:item/leathered_custom_armor_material_boots",
"tints": [
{
"type": "minecraft:dye",
"default": -6265536
}
]
},
"property": "minecraft:trim_material"
}
}
This tells Minecraft which model to use when rendering your item depending on the trim material variant, if any.
Next up is the actual item base model, located under resources/assets/models/item/
and called leathered_custom_armor_material_boots.json
:
Base model JSON
{
"parent": "item/generated",
"textures": {
"layer0": "leathered_boots:item/leathered_boots_overlay",
"layer1": "mod_id:item/leathered_custom_armor_material_boots"
}
}
This is the model used to render the boots item when no trim is applied.
Finally, it's time to create the models for your trimmed boots item.
You need to create one for each trim material. Luckily, with the first done, the others are just a copy-paste with minor adjustments.
From here, every time you see material
it must be replaced with the actual name of a trim material.
A generic trim model, located under resources/assets/mod_id/models/item/trim/material/
and named leathered_custom_armor_material_boots_trim.json
, looks like this:
Trim model JSON
{
"parent": "item/generated",
"textures": {
"layer0": "leathered_boots:item/leathered_boots_overlay",
"layer1": "mod_id:item/leathered_custom_armor_material_boots",
"layer2": "minecraft:trims/items/boots_trim_material"
}
}
This is the model used to render the boots item when a trim made of the specified material is applied.
In Vanilla, the available trim materials are quartz
, iron
, netherite
, redstone
, copper
, gold
, emerald
, diamond
, lapis
, amethyst
, and resin
, for a total of 11 trim materials. This means, once you're done, you must have a total of 11 trim models.
Since 1.20
For each of your leathered boots added via the API, you need to add several item models files under resources/assets/mod_id/models/item/
.
There must be a file called leathered_custom_armor_material_boots.json
with the following content:
{
"parent": "item/generated",
"textures": {
"layer0": "leathered_boots:item/leathered_boots_overlay",
"layer1": "mod_id:item/leathered_custom_armor_material_boots"
},
"overrides": [
{
"model": "mod_id:item/trim/quartz/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.1
}
},
{
"model": "mod_id:item/trim/iron/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.2
}
},
{
"model": "mod_id:item/trim/netherite/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.3
}
},
{
"model": "mod_id:item/trim/redstone/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.4
}
},
{
"model": "mod_id:item/trim/copper/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.5
}
},
{
"model": "mod_id:item/trim/gold/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.6
}
},
{
"model": "mod_id:item/trim/emerald/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.7
}
},
{
"model": "mod_id:item/trim/diamond/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.8
}
},
{
"model": "mod_id:item/trim/lapis/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 0.9
}
},
{
"model": "mod_id:item/trim/amethyst/leathered_custom_armor_material_boots_trim",
"predicate": {
"trim_type": 1.0
}
}
]
}
As it might be obvious by now, the other needed files are the ones referenced in the JSON model above.
Those files are one for each trim material and should be placed in a subfolder called trim/trim_material/
with the name of the trim material.
Each of those files should be called leathered_custom_armor_material_boots_trim.json
and have the following content:
{
"parent": "item/generated",
"textures": {
"layer0": "leathered_boots:item/leathered_boots_overlay",
"layer1": "mod_id:item/leathered_custom_armor_material_boots",
// Es. "minecraft:trims/items/boots_trim_amethyst" if the file is under the subfolder "amethyst"
"layer2": "minecraft:trims/items/boots_trim_material"
}
}
All in all, the final item models structure should resemble the following:
Before 1.20
For each of your leathered boots added via the API, add a file called leathered_custom_armor_material_boots.json
under resources/assets/mod_id/models/item/
with the following content:
{
"parent": "item/generated",
"textures": {
"layer0": "leathered_boots:item/leathered_boots_overlay",
"layer1": "mod_id:item/leathered_custom_armor_material_boots"
}
}
This is very easy, as you can just duplicate your already existing custom boots texture and put it under resources/assets/mod_id/textures/item/
as leathered_custom_armor_material_boots.png
, one file for each of your leathered boots added via the API.
The only catch is that you need to modify that texture to avoid covering the dyeable part of the texture, e.g. the leathered_boots:item/leathered_boots_overlay
. You can download the leathered_boots:item/leathered_boots_overlay
file from here and modify your texture accordingly.
If you are using your own custom dyeable part of the texture, you still need to change your base texture to not overlap with it.
Since 1.21.4
Same as for 1.21.3, but the equipment models must be located under resources/assets/mod_id/equipment/
.
Since 1.21.3
For each of your added leathered boots you need the equipment model and texture.
Equipment models must be located under resources/assets/mod_id/models/equipment/
.
The file must be called leathered_custom_armor_material.json
and should look like this:
{
"layers": {
"humanoid": [
{
"texture": "mod_id:leathered_custom_armor_material"
},
{
"texture": "leathered_boots:leathered_boots_overlay",
"dyeable": {
"color_when_undyed": -6265536
}
}
]
}
}
Equipment textures must be located under resources/assets/mod_id/textures/entity/equipment/humanoid/
.
You need at least the texture for your equipped boots, and optionally the texture for your custom dyeable overlay if the provided one does not fit your texture.
The required texture needs to be named leathered_custom_armor_material.png
and must contain the texture for the base armor, the part that's not dyeable.
Since you already have your armor set up, you can copy your humanoid
file and remove the square that is used for the bottom of the boots. Once copied, you need to rename it as stated above and place it under the specified folder.
For example, below a comparison of the humanoid
texture of diamond armor and how it would need to be modified for diamond leathered boots:
⠀
Since 1.21
Everything for 1.21 and below is still valid, however instead of placing your textures under resources/assets/minecraft/textures/models/armor/
, you need to place them under resources/assets/mod_id/textures/models/armor/
.
Before 1.21
When an armor piece is equipped, its texture always comes from resources/assets/minecraft/textures/models/armor/
, regardless whether it's modded or not.
Of course, you need to add such kind of texture for each of your leathered boots added via the API.
Since your added leathered boots will be a dyeable armor piece, they each need 2 textures:
-
leathered_custom_armor_material_layer_1_overlay.png
This file will contain the texture for the base armor, the part that's not dyeable.
The format comes from Vanillalayer_1
armor PNGs that usually contains the texture for boots, helmet, and chestplate, but here we need it for boots only. The file also needs the extra_overlay
suffix because that's required for the undyeable part of dyeable armors.
Since you already have your armor set up, you can copy yourlayer_1
file and remove the square that is used for the bottom of the boots. Once copied, you need to rename it as stated above and place it under the specified folder.
For example, below a comparison of thelayer_1
texture of diamond armor and how it would need to be modified for diamond leathered boots:⠀
-
leathered_custom_armor_material_layer_1.png
This is the actual dyeable layer, for this reason it must be in gray scale.
The format comes from Vanillalayer_1_overlay
armor PNGs that usually contains the texture for boots, helmet, and chestplate, but here we need it for boots only. The file also needs the extra_overlay
suffix removed because that's required for the dyeable part of dyeable armors.
As for the other layer, the one used by Leathered Boots is nothing more than a modified version of the Vanilla one.
If your custom armor boots texture, explained in the point before, has the same shape as the Vanilla one, then you can use one of the same file used by Leathered Boots. For example, you can download the leathered_diamond_layer_1.png and rename it as stated above and place it under the specified folder.
If instead your custom armor boots texture does not fit with the Vanilla shape, you need to create your own dyeable texture in gray scale for your leathered boots.
If you have any suggestions or questions about this wiki, please open an issue following the Documentation enhancement template.