Fix JEI mixins
This commit is contained in:
parent
1d3bf947b6
commit
381f6a5f1e
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user