ArmorRenderLib: Directors Cut
Armor Render Lib: Directors Cut is an updated 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.
介绍

Armor Render Lib: Directors Cut, a port of 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.

Use code "BAREMINIMUM" to get 15% off your first month!
常见问题
ArmorRenderLib: Directors Cut 支持哪些 Minecraft 版本?
ArmorRenderLib: Directors Cut 支持 Minecraft Java 版 1.20.1,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
ArmorRenderLib: Directors Cut 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。
clevernucleus 的其他作品
查看全部 →PlayerEx
添加属性、等级和技能点,融入 RPG 风格。
Data Attributes
Overhauls the entity attribute system and exposes it with datapacks.
RelicEx
Adds compatible Trinket items for PlayerEx attributes.
Ex HUD
A standalone fabric mod adding the HUD from legacy releases of PlayerEx.
评论
登录后评论和评分