Skip to content

Client resources

Crystal Spider edited this page Nov 25, 2023 · 14 revisions

General info

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 ArmorMaterial#getName() method.

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 leatheredboots:item/leathered_boots_overlay you need to have your own dyeable overlay.

Leathered Boots can't provide dyeable texture overlay for armors (boots being worn), however if your custom boots have a texture that fits the Vanilla shape of boots being worn, you can download and reuse the same overlay used by Leathered Boots.
More about this in the Armor textures section below.

Localization

Under resources/assets/modid/lang/ add at least a en_us.json file with the following content:

{
  "item.leatheredboots.leathered_custom_armor_material_boots": "Custom Leathered Boots"
  // Do the above for all the leathered boots you add via the API
}

Item models

For each of your leathered boots added via the API, add a file called leathered_custom_armor_material_boots.json under resources/assets/leatheredboots/models/item/ with the following content:

{
  "parent": "item/generated",
  "textures": {
    "layer0": "leatheredboots:item/leathered_boots_overlay",
    "layer1": "leatheredboots:item/leathered_custom_armor_material_boots"
  }
}

Item textures

This is very easy, as you can just duplicate your already existing custom boots texture and put it under resources/assets/leatheredboots/textures/item/ as leathered_custom_armor_material_boots.png, one file for each of your leathered boots added via the API.

Armor textures

When an armor piece is being worn, 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 Vanilla layer_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 your layer_1 file and remove everything that is not related to boots (or also leave it as it is). Once copied, you need to rename it as stated above and place it under the specified folder.
    For example, Below a comparison of the layer_1 texture of diamond armor and how it has been modified for diamond leathered boots:
    diamond_layer_1Separatorleathered_diamond_layer_1_overlay
    Note: you can right-click to download the PNGs files above and inspect them more closely.

  • 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 Vanilla layer_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.