add Registry#getAllWithID method

This commit is contained in:
dfsek 2021-12-26 20:31:09 -07:00
parent 6d844c2d3a
commit 4be63b8c65

View File

@ -97,6 +97,10 @@ public interface Registry<T> extends TypeLoader<T> {
});
}
default Collection<T> getAllWithID(String id) {
return getMatches(id).values();
}
Map<RegistryKey, T> getMatches(String id);
default Optional<T> getByID(String attempt, Function<Map<RegistryKey, T>, Optional<T>> reduction) {