[Fixes] RegistryDataProvider lock was not aquired soon enough.
This commit is contained in:
parent
cd65bcf4e8
commit
3706670849
1 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,11 @@ public abstract class RegistrySupplier {
|
||||||
) {
|
) {
|
||||||
this.defaultModIDs = defaultModIDs;
|
this.defaultModIDs = defaultModIDs;
|
||||||
this.allRegistries = initializeRegistryList(defaultModIDs);
|
this.allRegistries = initializeRegistryList(defaultModIDs);
|
||||||
|
try {
|
||||||
|
BOOTSTRAP_LOCK.acquire();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract List<RegistrySupplier.RegistryInfo<?>> initializeRegistryList(@Nullable List<String> modIDs);
|
protected abstract List<RegistrySupplier.RegistryInfo<?>> initializeRegistryList(@Nullable List<String> modIDs);
|
||||||
|
@ -37,6 +42,7 @@ public abstract class RegistrySupplier {
|
||||||
nfo.add(registryBuilder, BOOTSTRAP_LOCK);
|
nfo.add(registryBuilder, BOOTSTRAP_LOCK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BOOTSTRAP_LOCK.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void acquireLock() {
|
void acquireLock() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue