fix leggings
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user