Skip first baking in ModelLoader (#3621)
This commit is contained in:
parent
df0f1c4e75
commit
a41288644d
1 changed files with 11 additions and 0 deletions
|
@ -125,6 +125,7 @@ import javax.annotation.Nonnull;
|
|||
|
||||
public final class ModelLoader extends ModelBakery
|
||||
{
|
||||
private static boolean firstLoad = Boolean.parseBoolean(System.getProperty("fml.skipFirstModelBake", "true"));
|
||||
private final Map<ModelResourceLocation, IModel> stateModels = Maps.newHashMap();
|
||||
private final Set<ModelResourceLocation> missingVariants = Sets.newHashSet();
|
||||
private final Map<ResourceLocation, Exception> loadingExceptions = Maps.newHashMap();
|
||||
|
@ -176,6 +177,16 @@ public final class ModelLoader extends ModelBakery
|
|||
HashMultimap<IModel, ModelResourceLocation> models = HashMultimap.create();
|
||||
Multimaps.invertFrom(Multimaps.forMap(stateModels), models);
|
||||
|
||||
if (firstLoad)
|
||||
{
|
||||
firstLoad = false;
|
||||
for (ModelResourceLocation mrl : stateModels.keySet())
|
||||
{
|
||||
bakedRegistry.putObject(mrl, missingBaked);
|
||||
}
|
||||
return bakedRegistry;
|
||||
}
|
||||
|
||||
ProgressBar bakeBar = ProgressManager.push("ModelLoader: baking", models.keySet().size());
|
||||
|
||||
for(IModel model : models.keySet())
|
||||
|
|
Loading…
Reference in a new issue