@Override
 public List<BlockFamily> deserializeCollection(EntityData.Value value) {
   List<BlockFamily> result = Lists.newArrayListWithCapacity(value.getStringCount());
   for (String item : value.getStringList()) {
     result.add(blockManager.getBlockFamily(item));
   }
   return result;
 }
示例#2
0
 @Override
 public List<T> deserializeCollection(EntityData.Value value) {
   List<T> result = Lists.newArrayListWithCapacity(value.getStringCount());
   for (String item : value.getStringList()) {
     Asset asset = Assets.resolve(type, item);
     if (asset != null && assetClass.isAssignableFrom(asset.getClass())) {
       result.add(assetClass.cast(asset));
     }
   }
   return result;
 }