Merge branch 'pull/5948' into 1.14.x

This commit is contained in:
cpw 2019-07-20 19:35:26 -04:00
commit 186d91c03f
No known key found for this signature in database
GPG Key ID: 8EB3DF749553B1B7
1 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ public final class RegistryObject<T extends ForgeRegistryEntry<? super T>>
private T value;
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);
}
@ -57,12 +57,12 @@ public final class RegistryObject<T extends ForgeRegistryEntry<? super T>>
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;
IForgeRegistry<V> registry;
try {
registry = RegistryManager.ACTIVE.getRegistry(registryType.get());
registry = RegistryManager.ACTIVE.<V>getRegistry(registryType.get());
} catch (Throwable t) {
registry = null;
}