Merge branch 'pull/5948' into 1.14.x
This commit is contained in:
commit
186d91c03f
|
@ -39,7 +39,7 @@ public final class RegistryObject<T extends ForgeRegistryEntry<? super T>>
|
||||||
private T value;
|
private T value;
|
||||||
private boolean searched;
|
private boolean searched;
|
||||||
|
|
||||||
public static <T extends ForgeRegistryEntry<T>, U extends T> RegistryObject<U> of(final String name, Supplier<Class<T>> registryType) {
|
public static <T extends ForgeRegistryEntry<T>, U extends T> RegistryObject<U> of(final String name, Supplier<Class<? super T>> registryType) {
|
||||||
return new RegistryObject<>(name, registryType);
|
return new RegistryObject<>(name, registryType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,12 +57,12 @@ public final class RegistryObject<T extends ForgeRegistryEntry<? super T>>
|
||||||
this.owningRegistry = null;
|
this.owningRegistry = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private <V extends ForgeRegistryEntry<V>> RegistryObject(String name, Supplier<Class<V>> registryType)
|
private <V extends ForgeRegistryEntry<V>> RegistryObject(String name, Supplier<Class<? super V>> registryType)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
IForgeRegistry<V> registry;
|
IForgeRegistry<V> registry;
|
||||||
try {
|
try {
|
||||||
registry = RegistryManager.ACTIVE.getRegistry(registryType.get());
|
registry = RegistryManager.ACTIVE.<V>getRegistry(registryType.get());
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
registry = null;
|
registry = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue