use of org.lanternpowered.server.extra.accessory.Accessory in project LanternServer by LanternPowered.
the class AccessoryRegistryModule method getCatalogMappings.
@Override
public List<CatalogMappingData> getCatalogMappings() {
final ImmutableList.Builder<CatalogMappingData> mappingData = ImmutableList.builder();
mappingData.addAll(super.getCatalogMappings());
final ImmutableMap.Builder<String, Accessory> topHatMappings = ImmutableMap.builder();
getAll().stream().filter(accessory -> accessory instanceof TopHat).forEach(accessory -> topHatMappings.put(accessory.getName().replace("_top_hat", ""), accessory));
mappingData.add(new CatalogMappingData(TopHats.class, topHatMappings.build()));
return mappingData.build();
}
Aggregations