Skip to content

Commit

Permalink
Support earlyy baking models on Forge as well
Browse files Browse the repository at this point in the history
Fixes FFAPI model provider hooks not running
  • Loading branch information
embeddedt committed Oct 29, 2023
1 parent f4f3eff commit 81baeea
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ private void storeTextureGetter(BiFunction<ResourceLocation, Material, TextureAt
}

@Redirect(method = "bakeModels", at = @At(value = "INVOKE", target = "Ljava/util/Map;keySet()Ljava/util/Set;"))
private Set skipBakingModels(Map map) {
return Collections.emptySet();
private Set skipBakingModels(Map instance) {
Set<ResourceLocation> modelSet = new HashSet<>(instance.keySet());
if(modelSet.size() > 0)
ModernFix.LOGGER.info("Early baking {} models", modelSet.size());
return modelSet;
}

/**
Expand Down

2 comments on commit 81baeea

@P3rf3ctXZer0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in changelog commit ... says earlyy

@embeddedt
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, noticed it too but commit titles can't be changed after pushing. I could edit the changelog but I would have to do it 10 times.. not worth it.

Please sign in to comment.