[Fabric] 26.2-6.4.0
Curse Maven Snippet
What's new
26.2 - 6.4.0
New Features
- Added
trims/TrimMaterialConfig,trims/TrimMaterialRegistryHelper, andtrims/ArmorTrimAtlasProvider— a loader-agnostic datagen layer for custom armor trim materials.TrimMaterialRegistryHelper.bootstrapregisters a mod'sTrimMaterialConfiglist into thetrim_materialdynamic registry (usable from both Fabric'sbuildRegistryand NeoForge'sRegistrySetBuilder);ArmorTrimAtlasProvidergenerates the mod'sassets/minecraft/atlases/armor_trims.json/items.jsonoverrides from that same list, so a consuming mod only has to hand-author the palette texture and its own material definitions instead of restating vanilla's full trim-pattern texture list per material. - Added
fabric/trims/TrimmedArmorItemModelandfabric/trims/TrimmedArmorModelLoadingPlugin— a Fabric port of NeoForge's ownneoforge:trimmed_armoritem model type, fixing a Fabric-only gap: vanilla's armor item icon only recognizes its own hardcoded trim materials, so a modded material renders correctly on the worn 3D layer (which reads theArmorTrimcomponent directly) but falls back to the untrimmed 2D inventory icon.TrimmedArmorModelLoadingPluginregisters a Fabric Model Loading APImodifyItemModelBeforeBakehook that wraps every item's model withTrimmedArmorItemModel, which no-ops unless the live stack actually carries both anArmorTrimand an armor-slotEquippablecomponent, then resolves the trim overlay sprite from whateverTrimMaterialis on the stack — the same source vanilla's own entity layer reads — instead of a fixed list of cases baked into a model JSON. (The wrap has to be unconditional and the check deferred to render time: MC 26.2 doesn't bind items' default components until aReloadableServerResourcesreload, which hasn't happened yet during the client's very first resource/model reload, so checking a default component at bake time throwsNullPointerException: Components not bound yet— seedocs/MC-26.2-NOTES.md.) Reaching the two private vanilla classes needed to bake a flat icon layer (CuboidItemModelWrapper,ItemModelGenerator.ItemLayerKey) is done via reflection, not an access widener — widening a private constructor on a private nested class compiled fine but still threwIllegalAccessErrorat actual game runtime. This needs no resource pack override, runs automatically for any mod's armor and any mod's trim materials (not just chimeric-lib's), and is wired into chimeric-lib's own Fabric client init, so a consuming mod doesn't need to call anything — registering trim materials throughTrimMaterialRegistryHelperis enough for their icons to render correctly on both loaders.
This mod has no additional files