Skip to content

Commit

Permalink
Skip first baking in ModelLoader (#3621)
Browse files Browse the repository at this point in the history
  • Loading branch information
williewillus authored and LexManos committed Jan 12, 2017
1 parent df0f1c4 commit a412886
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/net/minecraftforge/client/model/ModelLoader.java
Expand Up @@ -125,6 +125,7 @@

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();
Expand Down Expand Up @@ -176,6 +177,16 @@ public void registerSprites(TextureMap map)
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())
Expand Down

0 comments on commit a412886

Please sign in to comment.