From 97f60d5e119464800c610d3375888f3203c6cdb2 Mon Sep 17 00:00:00 2001 From: Artemis System Date: Wed, 28 Aug 2024 13:17:01 +0200 Subject: [PATCH] Remove accessors for overloaded method, they dont work (ref https://github.com/SpongePowered/Mixin/issues/522) --- .../botania/data/recipes/CraftingRecipeProvider.java | 4 ++-- .../vazkii/botania/mixin/RecipeProviderAccessor.java | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Xplat/src/main/java/vazkii/botania/data/recipes/CraftingRecipeProvider.java b/Xplat/src/main/java/vazkii/botania/data/recipes/CraftingRecipeProvider.java index 141ddb1eec..8a68df2974 100644 --- a/Xplat/src/main/java/vazkii/botania/data/recipes/CraftingRecipeProvider.java +++ b/Xplat/src/main/java/vazkii/botania/data/recipes/CraftingRecipeProvider.java @@ -85,7 +85,7 @@ public void buildRecipes(RecipeOutput recipeOutput) { } public static Criterion conditionsFromItem(ItemLike item) { - return RecipeProviderAccessor.botania_has(item); + return RecipeProviderAccessor.botania_inventoryTrigger(ItemPredicate.Builder.item().of(item)); } private static Criterion conditionsFromItems(ItemLike... items) { @@ -98,7 +98,7 @@ private static Criterion conditionsFromI } public static Criterion conditionsFromTag(TagKey tag) { - return RecipeProviderAccessor.botania_has(tag); + return RecipeProviderAccessor.botania_inventoryTrigger(ItemPredicate.Builder.item().of(tag)); } /** Addons: override this to return your modid */ diff --git a/Xplat/src/main/java/vazkii/botania/mixin/RecipeProviderAccessor.java b/Xplat/src/main/java/vazkii/botania/mixin/RecipeProviderAccessor.java index e3fa9ee191..015fcf9ebe 100644 --- a/Xplat/src/main/java/vazkii/botania/mixin/RecipeProviderAccessor.java +++ b/Xplat/src/main/java/vazkii/botania/mixin/RecipeProviderAccessor.java @@ -21,16 +21,6 @@ @Mixin(RecipeProvider.class) public interface RecipeProviderAccessor { - @Invoker("has") - static Criterion botania_has(ItemLike itemLike) { - throw new IllegalStateException("Direct call to invoker method"); - } - - @Invoker("has") - static Criterion botania_has(TagKey tag) { - throw new IllegalStateException("Direct call to invoker method"); - } - @Invoker("inventoryTrigger") static Criterion botania_inventoryTrigger(ItemPredicate.Builder... $$0) { throw new IllegalStateException("Direct call to invoker method");