mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Try to fix #256 again
This commit is contained in:
@@ -171,12 +171,12 @@ public class RegistriesImpl {
|
||||
if (registry == null) {
|
||||
Registry<T> ts = (Registry<T>) Registry.REGISTRY.get(registryKey.location());
|
||||
if (ts == null) ts = (Registry<T>) BuiltinRegistries.REGISTRY.get(registryKey.location());
|
||||
if (ts == null) ts = (Registry<T>) RegistryProviderImpl.CUSTOM_REGS.get(registryKey);
|
||||
if (ts == null) {
|
||||
throw new IllegalArgumentException("Registry " + registryKey + " does not exist!");
|
||||
} else {
|
||||
if (ts != null) {
|
||||
return get(ts);
|
||||
}
|
||||
Registrar<?> customReg = RegistryProviderImpl.CUSTOM_REGS.get(registryKey);
|
||||
if (customReg != null) return (Registrar<T>) customReg;
|
||||
throw new IllegalArgumentException("Registry " + registryKey + " does not exist!");
|
||||
}
|
||||
return get(registry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user