From 9f5a9eae9a7863412cc5eb433bf15e5ee71da616 Mon Sep 17 00:00:00 2001 From: Danielshe Date: Sun, 3 Nov 2019 14:44:52 +0800 Subject: 3.2.1 --- .../java/me/shedaniel/rei/api/ClientHelper.java | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/api/ClientHelper.java') diff --git a/src/main/java/me/shedaniel/rei/api/ClientHelper.java b/src/main/java/me/shedaniel/rei/api/ClientHelper.java index 458379457..b72e86ea0 100644 --- a/src/main/java/me/shedaniel/rei/api/ClientHelper.java +++ b/src/main/java/me/shedaniel/rei/api/ClientHelper.java @@ -55,28 +55,40 @@ public interface ClientHelper { void registerFabricKeyBinds(); /** - * Tries to cheat items using either packets or commands. + * Tries to cheat stack using either packets or commands. * * @param stack the stack to cheat in * @return whether it failed */ - boolean tryCheatingStack(ItemStack stack); + boolean tryCheatingEntry(EntryStack stack); + + default boolean tryCheatingStack(ItemStack stack) { + return tryCheatingEntry(EntryStack.create(stack)); + } /** - * Finds recipe for the item and opens the recipe screen. + * Finds recipe for the stack and opens the recipe screen. * * @param stack the stack to find recipe for * @return whether the stack has any recipes to show */ - boolean executeRecipeKeyBind(ItemStack stack); + boolean executeRecipeKeyBind(EntryStack stack); + + default boolean executeRecipeKeyBind(ItemStack stack) { + return executeRecipeKeyBind(EntryStack.create(stack)); + } /** - * Finds usage for the item and opens the recipe screen. + * Finds usage for the stack and opens the recipe screen. * * @param stack the stack to find usage for * @return whether the stack has any usages to show */ - boolean executeUsageKeyBind(ItemStack stack); + boolean executeUsageKeyBind(EntryStack stack); + + default boolean executeUsageKeyBind(ItemStack stack) { + return executeUsageKeyBind(EntryStack.create(stack)); + } FabricKeyBinding getFocusSearchFieldKeyBinding(); -- cgit