diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-01-04 21:49:59 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-01-04 21:49:59 +0800 |
| commit | 5d5c0b9729283f758003c89e92c879022a78eae9 (patch) | |
| tree | 67bdc95164a8723a6cad95bd5c87627212a7d618 /src/main/java/me/shedaniel/gui/REIRenderHelper.java | |
| parent | 33cd995b1f884b3275d6e6da1674a2e3b8fc3c63 (diff) | |
| parent | e64108cf1b6cd147bece207453ad0ede8c4b5bd7 (diff) | |
| download | RoughlyEnoughItems-5d5c0b9729283f758003c89e92c879022a78eae9.tar.gz RoughlyEnoughItems-5d5c0b9729283f758003c89e92c879022a78eae9.tar.bz2 RoughlyEnoughItems-5d5c0b9729283f758003c89e92c879022a78eae9.zip | |
Merge branch '1.14' into 1.14-dev
Diffstat (limited to 'src/main/java/me/shedaniel/gui/REIRenderHelper.java')
| -rwxr-xr-x | src/main/java/me/shedaniel/gui/REIRenderHelper.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/main/java/me/shedaniel/gui/REIRenderHelper.java b/src/main/java/me/shedaniel/gui/REIRenderHelper.java index cd68534f3..985eb721f 100755 --- a/src/main/java/me/shedaniel/gui/REIRenderHelper.java +++ b/src/main/java/me/shedaniel/gui/REIRenderHelper.java @@ -238,41 +238,45 @@ public class REIRenderHelper { reiGui.tick(); } - public static void recipeKeybind() { + public static boolean recipeKeyBind() { if (!(MinecraftClient.getInstance().currentGui instanceof ContainerGui)) - return; + return false; Control control = reiGui.getLastHovered(); if (control != null && control.isHighlighted() && control instanceof REISlot) { REISlot slot = (REISlot) control; REIRecipeManager.instance().displayRecipesFor(slot.getStack()); - return; + return true; } if (((IMixinContainerGui) overlayedGui).getHoveredSlot() != null) { ItemStack stack = ((IMixinContainerGui) overlayedGui).getHoveredSlot().getStack(); REIRecipeManager.instance().displayRecipesFor(stack); + return true; } - + return false; } - public static void useKeybind() { + public static boolean useKeyBind() { if (!(MinecraftClient.getInstance().currentGui instanceof ContainerGui)) - return; + return false; Control control = reiGui.getLastHovered(); if (control != null && control.isHighlighted() && control instanceof REISlot) { REISlot slot = (REISlot) control; REIRecipeManager.instance().displayUsesFor(slot.getStack()); - return; + return true; } if (((IMixinContainerGui) overlayedGui).getHoveredSlot() != null) { ItemStack stack = ((IMixinContainerGui) overlayedGui).getHoveredSlot().getStack(); REIRecipeManager.instance().displayUsesFor(stack); + return true; } - + return false; } - public static void hideKeybind() { + public static boolean hideKeyBind() { if (MinecraftClient.getInstance().currentGui == overlayedGui && reiGui != null) { reiGui.visible = !reiGui.visible; + return true; } + return false; } } |
