mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-08-29 13:20:32 +00:00
add Registry#getRawType
This commit is contained in:
@@ -79,6 +79,10 @@ public interface Registry<T> extends TypeLoader<T> {
|
|||||||
|
|
||||||
TypeKey<T> getType();
|
TypeKey<T> getType();
|
||||||
|
|
||||||
|
default Class<? super T> getRawType() {
|
||||||
|
return getType().getRawType();
|
||||||
|
}
|
||||||
|
|
||||||
default Optional<T> getByID(String id) {
|
default Optional<T> getByID(String id) {
|
||||||
return getByID(id, map -> {
|
return getByID(id, map -> {
|
||||||
if(map.isEmpty()) return Optional.empty();
|
if(map.isEmpty()) return Optional.empty();
|
||||||
|
|||||||
Reference in New Issue
Block a user