mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 17:26:07 +00:00
add Registry#getAllWithID method
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user