Back to mods
Armor Render Lib project artwork

Modrinth · Minecraft mod

Armor Render Lib

Small extension library to Fabric API's ArmorRenderer, with more targeted and specific implementation to dynamically change armor texture and color.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Armor Render Lib release should I use?

Updated 4 years ago
beta file 0.2.6
Game version 1.19.2
Loader Fabric

Armor Render Lib 0.2.6 targets 1.19.2 with Fabric. It must be installed on the client. Do not install it on the dedicated server. 1 required mod needs a matching file.

Where it goes

Is Armor Render Lib required on the client, server, or both?

It must be installed on the client. Do not install it on the dedicated server.

Client Required
Dedicated server Not supported
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked client-only.

What else does Armor Render Lib 0.2.6 need?

0.2.6. Change the file and its required mods may change too.

1 required mod needs a matching file

Install Fabric API first, but 1 required mod has no matching file for this setup. Do not mix loader builds to force a match.

Fabric API Needed by Armor Render Lib 0.2.6
required
No matching file

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Armor Render Lib without breaking your instance.

Built for Armor Render Lib 0.2.6. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.2.6. It targets 1.19.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fabric API first, but 1 required mod has no matching file for this setup. Do not mix loader builds to force a match.

  3. 03

    Put it on the correct side

    It must be installed on the client. Do not install it on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.2.6. It opens that exact file at the source.

About this project

What does Armor Render Lib add?

Armor Render Lib

Armor Render Lib is a lightweight extension library to Fabric API's fabric-rendering-v1 ArmorRenderer. Since the Fabric API implementation is quite abstract, a more targeted implementation is needed for some specific use cases. These use cases are present across more than one of my mods, so in the spirit of code reuse this library was created. It is robust, using only a few very targeted mixins and is fully compatible with Cosmetic Armor and GeckoLib.

Build

To include this library in your project, copy the following into your build.gradle:

repositories {
    maven {
        name = "Modrinth"
        url = "https://api.modrinth.com/maven"
        content {
            includeGroup "maven.modrinth"
        }
    }
}
dependencies {
    modImplementation "maven.modrinth:armor-render-lib:<version>"
    include "maven.modrinth:armor-render-lib:<version>"
}

Use

Armor Render Lib adds armor render layers. These are objects containing a dynamic texture location, color and glint boolean that render armor for an item (or items). They are roughly equivalent to Fabric API's ArmorRenderer#renderPart, but the texture, color and glint can be dynamically specified based on the ItemStack, LivingEntity and EquipmentSlot.

They should be registered like so:

public class ExampleMod implements ClientModInitializer {
    private static ArmorRenderProvider render(ItemStack stack, LivingEntity entity, EquipmentSlot slot) {
        // Dynamic texture path
        String texture = "examplemod:textures/model/armor/example_chestplate.png";
        
        // Dynamic color
        int color = 0xFF00FF;
        
        return data -> data.accept(texture, color, stack.hasGlint());
    }
    
    @Override
    public void onInitializeClient() {
        ArmorRenderLib.register(ExampleMod::render, Items.IRON_CHESTPLATE);
    }
}

Notes

  • An item can have multiple different armor render layers registered to it.
  • Multiple items can have the same armor render layer registered to them.
  • Registering a render layer to a vanilla item (or other armor item) overrides the default armor rendering.
    • This means that the texture, color and/or enchantment glint of vanilla armor can be modified.

Project description from Modrinth.

Pick your setup

Armor Render Lib by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

3 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Armor Render Lib versions and loaders

10 of 10 releases match

Looking for an older file? The official Modrinth project page is in Resources.