Skip to content

Commit

Permalink
Remove accessors for overloaded method, they dont work
Browse files Browse the repository at this point in the history
  • Loading branch information
artemisSystem committed Aug 28, 2024
1 parent 963ba20 commit 97f60d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void buildRecipes(RecipeOutput recipeOutput) {
}

public static Criterion<InventoryChangeTrigger.TriggerInstance> conditionsFromItem(ItemLike item) {
return RecipeProviderAccessor.botania_has(item);
return RecipeProviderAccessor.botania_inventoryTrigger(ItemPredicate.Builder.item().of(item));
}

private static Criterion<InventoryChangeTrigger.TriggerInstance> conditionsFromItems(ItemLike... items) {
Expand All @@ -98,7 +98,7 @@ private static Criterion<InventoryChangeTrigger.TriggerInstance> conditionsFromI
}

public static Criterion<InventoryChangeTrigger.TriggerInstance> conditionsFromTag(TagKey<Item> tag) {
return RecipeProviderAccessor.botania_has(tag);
return RecipeProviderAccessor.botania_inventoryTrigger(ItemPredicate.Builder.item().of(tag));
}

/** Addons: override this to return your modid */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@

@Mixin(RecipeProvider.class)
public interface RecipeProviderAccessor {
@Invoker("has")
static Criterion<InventoryChangeTrigger.TriggerInstance> botania_has(ItemLike itemLike) {
throw new IllegalStateException("Direct call to invoker method");
}

@Invoker("has")
static Criterion<InventoryChangeTrigger.TriggerInstance> botania_has(TagKey<Item> tag) {
throw new IllegalStateException("Direct call to invoker method");
}

@Invoker("inventoryTrigger")
static Criterion<InventoryChangeTrigger.TriggerInstance> botania_inventoryTrigger(ItemPredicate.Builder... $$0) {
throw new IllegalStateException("Direct call to invoker method");
Expand Down

0 comments on commit 97f60d5

Please sign in to comment.