fix leggings

This commit is contained in:
Darto KLoning
2026-09-08 19:45:11 +07:00
parent fe53871e8e
commit d406a6ffd8
6 changed files with 258 additions and 20 deletions
@@ -43,7 +43,20 @@ public final class ArmorDisplayPolicy {
}
Map<String, Integer> slots = CACHE.computeIfAbsent(armor.suitId(), ArmorDisplayPolicy::loadSuit);
return slots.getOrDefault(slotName(expectedType), 0);
int configuredMask = slots.getOrDefault(slotName(expectedType), 0);
// Every LesRaisinsArmor leggings model replaces the vanilla player legs visually.
// Some upstream armor_display JSON files omitted a leggings section, which leaves
// the skin/pants visible through the GeckoLib model. Always hide both vanilla
// leg layers while LR leggings are equipped; suit JSON can still add other parts.
if (expectedType == ArmorType.LEGGINGS) {
configuredMask |= ArmorDisplayMask.LEFT_LEG
| ArmorDisplayMask.LEFT_PANTS
| ArmorDisplayMask.RIGHT_LEG
| ArmorDisplayMask.RIGHT_PANTS;
}
return configuredMask;
}
private static String slotName(ArmorType type) {
+2 -2
View File
@@ -24,12 +24,12 @@
"fabric-api": "*",
"geckolib": ">=5.5.4"
},
"icon": "assets/lrarmor/icon.png",
"mixins": [
"lrarmor.mixins.json",
{
"config": "lrarmor.client.mixins.json",
"environment": "client"
}
]
],
"icon": "assets/lrarmor/icon.png"
}