Heads up!
This page assumes you have exported the assets properly as per How to Export Your Project
How to create static (No Animations) Armor
Creating your Renderer
This renderer is responsible for how your armor is displayed in the game.
It connects the armor with the following:
- Geometry file (
geo.json
): Defines the 3D model of the armor. - Texture file (
.png
): The visual appearance of the armor (applies over the geometry).
Heads up!
See AzRendererConfigs 101 for all AzArmorRendererConfig.builder options.
public class ExampleArmorRenderer extends AzArmorRenderer {private static final ResourceLocation GEO = ResourceLocation.fromNamespaceAndPath(YOUR_MOD_ID,"geo/item/examplearmor.geo.json");private static final ResourceLocation TEX = ResourceLocation.fromNamespaceAndPath(YOUR_MOD_ID,"textures/item/examplearmor.png");public ExampleArmorRenderer() {super(AzArmorRendererConfig.builder(GEO, TEX).build());}}
Registering your Renderer
Now simply call the AzArmorRendererRegistry#register()
in your onInitializeClient
for Fabric and FMLClientSetupEvent
for Neoforge/Forge
AzArmorRendererRegistry.register(ExampleArmorRenderer::new, YourItemRegistry.YOUR_ARMOR_HELMET,YourItemRegistry.YOUR_ARMOR_CHESTPLATE,YourItemRegistry.YOUR_ARMOR_LEGGINGS,YourItemRegistry.YOUR_ARMOR_BOOTS);