Fix JEI mixins

This commit is contained in:
embeddedt 2023-02-15 18:10:42 -05:00
parent 1d3bf947b6
commit 381f6a5f1e
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(IngredientListElementFactory.class)
public class IngredientListElementFactoryMixin {
private static int ingredientNum = 0;
@Inject(method = "addToBaseList", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/NonNullList;add(Ljava/lang/Object;)Z"), remap = false)
@Inject(method = "addToBaseList", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/NonNullList;add(Ljava/lang/Object;)Z"), remap = false)
private static void checkForInterrupt(NonNullList<IIngredientListElement<?>> baseList, IIngredientManager ingredientManager, IIngredientType ingredientType, CallbackInfo ci) {
if((ingredientNum++ % 100) == 0)
IAsyncJeiStarter.checkForLoadInterruption();

View File

@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(RecipeManagerInternal.class)
public class RecipeManagerInternalMixin {
@Inject(method = "addRecipes", at = @At(value = "INVOKE", target = "Lmezz/jei/recipes/RecipeManagerInternal;addRecipeTyped(Ljava/lang/Object;Lnet/minecraft/util/ResourceLocation;)V"), remap = false)
@Inject(method = "addRecipes", at = @At(value = "INVOKE", target = "Lmezz/jei/recipes/RecipeManagerInternal;addRecipeTyped(Ljava/lang/Object;Lnet/minecraft/resources/ResourceLocation;)V"), remap = false)
private void checkForInterrupt(ImmutableListMultimap<ResourceLocation, Object> recipes, CallbackInfo ci) {
IAsyncJeiStarter.checkForLoadInterruption();
}