use of org.spongepowered.common.inventory.lens.impl.slot.EquipmentSlotLens in project SpongeCommon by SpongePowered.
the class EquipmentInventoryLens method init.
private void init(Map<EquipmentType, SlotLens> lenses) {
for (EquipmentSlot slot : EquipmentSlot.values()) {
final EquipmentType type = (EquipmentType) (Object) slot;
final SlotLens lensAtSlot = lenses.get(slot);
if (lensAtSlot != null) {
final EquipmentSlotLens equipmentSlotLens = new EquipmentSlotLens(this, lensAtSlot, type);
this.addSpanningChild(equipmentSlotLens, KeyValuePair.of(Keys.EQUIPMENT_TYPE, type));
this.lenses.put(type, equipmentSlotLens);
}
}
}
Aggregations