mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 03:25:18 +00:00
[1.21.1] ModLoading cleanup and optimisations (#10052)
This commit is contained in:
1 parent
f106ff0c21
commit
9714512c31
101 files changed
+837
-841
No files matched your search
@@ -26,7 +26,7 @@ public final class RegistryObject<T> implements Supplier<T> {
|
||||
@Nullable
|
||||
private final ResourceLocation name;
|
||||
@Nullable
|
||||
private ResourceKey<T> key;
|
||||
private final ResourceKey<T> key;
|
||||
private final boolean optionalRegistry;
|
||||
@Nullable
|
||||
private T value;
|
||||
@@ -189,7 +189,8 @@ public final class RegistryObject<T> implements Supplier<T> {
|
||||
@Override
|
||||
public T get() {
|
||||
T ret = this.value;
|
||||
Objects.requireNonNull(ret, () -> "Registry Object not present: " + this.name);
|
||||
if (ret == null)
|
||||
throw new NullPointerException("Registry Object not present: " + this.name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user