Guard against mods that don't support concurrency on resource packs
Should fix #22
This commit is contained in:
parent
74a727d335
commit
1f1bf4a442
|
|
@ -54,7 +54,10 @@ public abstract class ModelBakeryMixin {
|
|||
ResourceLocation blockStateJSON = new ResourceLocation(blockLocation.getNamespace(), "blockstates/" + blockLocation.getPath() + ".json");
|
||||
List<Resource> blockStates;
|
||||
try {
|
||||
blockStates = this.resourceManager.getResources(blockStateJSON);
|
||||
/* Some mods' custom resource pack implementations don't seem to like concurrency here */
|
||||
synchronized(this.resourceManager) {
|
||||
blockStates = this.resourceManager.getResources(blockStateJSON);
|
||||
}
|
||||
} catch(IOException e) {
|
||||
ModernFix.LOGGER.warn("Exception loading blockstate definition: {}: {}", blockLocation, e);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user