Change cancellation strategy for bakeModels, fixes Balm issues

This commit is contained in:
embeddedt 2023-06-14 22:13:59 -04:00
parent c3a5964f17
commit f7037e3ecb
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -144,10 +144,14 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
private BiFunction<ResourceLocation, Material, TextureAtlasSprite> textureGetter;
@Inject(method = "bakeModels", at = @At("HEAD"), cancellable = true)
private void skipBake(BiFunction<ResourceLocation, Material, TextureAtlasSprite> getter, CallbackInfo ci) {
@Inject(method = "bakeModels", at = @At("HEAD"))
private void storeTextureGetter(BiFunction<ResourceLocation, Material, TextureAtlasSprite> getter, CallbackInfo ci) {
textureGetter = getter;
ci.cancel();
}
@Redirect(method = "bakeModels", at = @At(value = "INVOKE", target = "Ljava/util/Map;keySet()Ljava/util/Set;"))
private Set skipBakingModels(Map map) {
return Collections.emptySet();
}
/**