Support earlyy baking models on Forge as well

Fixes FFAPI model provider hooks not running
This commit is contained in:
embeddedt 2023-10-28 20:12:14 -04:00
parent f4f3eff242
commit 81baeea35b
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -183,8 +183,11 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
}
@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;
}
/**