mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-08-30 05:40:34 +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);
|
Map<RegistryKey, T> getMatches(String id);
|
||||||
|
|
||||||
default Optional<T> getByID(String attempt, Function<Map<RegistryKey, T>, Optional<T>> reduction) {
|
default Optional<T> getByID(String attempt, Function<Map<RegistryKey, T>, Optional<T>> reduction) {
|
||||||
|
|||||||
Reference in New Issue
Block a user