EquipmentSlotMapper

public final class EquipmentSlotMapper

Infers an armor slot from an equipment file's layers keys plus filename hints, then maps slot → list of vanilla base armor item identifiers.

Per the Minecraft Wiki Equipment page, equipment JSON contains layers but no slot field. The Option J plan's algorithm is therefore best-effort:

  • humanoid_leggings → legs
  • wings → chest (elytra-bearing)
  • humanoid alone → ambiguous (head/chest/feet); combine with filename hint
  • humanoid_baby → all four slots (rare)

Types

Link copied to clipboard
public enum Slot

Functions

Link copied to clipboard
public static List<String> baseItemsFor(EquipmentSlotMapper.Slot slot)
Link copied to clipboard
public static Optional<EquipmentSlotMapper.Slot> inferSlot(JsonObject equipmentJson, String filenameStem)
Given a parsed equipment JSON and a filename stem, infer the most likely slot.