Avoid iterating over a set being modified

Fixes #19
This commit is contained in:
embeddedt 2023-02-14 09:41:48 -05:00
parent 7742a9507f
commit 1cdd9fdaaa

View File

@ -105,7 +105,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
.addAll(modsListening)
.build();
/* First, bake any incompatible models ahead of time (for mods that have custom models) */
this.unbakedCache.keySet().forEach(location -> {
new ArrayList<>(this.unbakedCache.keySet()).forEach(location -> {
if(incompatibleLazyBakedModels.contains(location.getNamespace())) {
this.bakeIfPossible(location);
}