mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-02 16:05:29 +00:00
add Registry#getAllWithID method
This commit is contained in:
parent
6d844c2d3a
commit
4be63b8c65
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user