diff --git a/src/main/java/codechicken/nei/NEIClientConfig.java b/src/main/java/codechicken/nei/NEIClientConfig.java index 13a0fceb..1d48960c 100644 --- a/src/main/java/codechicken/nei/NEIClientConfig.java +++ b/src/main/java/codechicken/nei/NEIClientConfig.java @@ -267,6 +267,11 @@ public class NEIClientConfig { .getBooleanValue(true); API.addOption(new OptionToggleButton("inventory.guirecipe.scrollPages", true)); + tag.getTag("inventory.guirecipe.freezeCycleOnHover") + .setComment("Stop cycling the recipe while hovering over an ingredient or a button") + .getBooleanValue(false); + API.addOption(new OptionToggleButton("inventory.guirecipe.freezeCycleOnHover", true)); + tag.getTag("inventory.guirecipe.profile").getBooleanValue(false); API.addOption(new OptionToggleButton("inventory.guirecipe.profile", true)); @@ -1166,6 +1171,10 @@ public class NEIClientConfig { return getBooleanSetting("inventory.guirecipe.cycledIngredientsTooltip"); } + public static boolean freezeCycleOnHover() { + return getBooleanSetting("inventory.guirecipe.freezeCycleOnHover"); + } + public static boolean requireShiftForOverlayRecipe() { return getBooleanSetting("inventory.guirecipe.shiftOverlayRecipe"); } diff --git a/src/main/java/codechicken/nei/recipe/widget/RecipeWidget.java b/src/main/java/codechicken/nei/recipe/widget/RecipeWidget.java index aaac733c..f585c6b8 100644 --- a/src/main/java/codechicken/nei/recipe/widget/RecipeWidget.java +++ b/src/main/java/codechicken/nei/recipe/widget/RecipeWidget.java @@ -745,7 +745,8 @@ public class RecipeWidget extends Widget { return true; } - return !this.showAsWidget && contains(mouseX, mouseY) + return NEIClientConfig.freezeCycleOnHover() && !this.showAsWidget + && contains(mouseX, mouseY) && (getPositionedStackMouseOver(mouseX, mouseY) != null || forEachButtons(button -> button.contains(mouseX, mouseY) ? true : null, false)); } diff --git a/src/main/resources/assets/nei/lang/en_US.lang b/src/main/resources/assets/nei/lang/en_US.lang index d9a176c6..6c402737 100644 --- a/src/main/resources/assets/nei/lang/en_US.lang +++ b/src/main/resources/assets/nei/lang/en_US.lang @@ -427,6 +427,9 @@ nei.options.inventory.autocrafting.false=Disabled nei.options.inventory.guirecipe.shiftOverlayRecipe=Require holding shift to move items when overlaying recipe nei.options.inventory.guirecipe.shiftOverlayRecipe.true=Yes nei.options.inventory.guirecipe.shiftOverlayRecipe.false=No +nei.options.inventory.guirecipe.freezeCycleOnHover=Stop cycling the recipe while hovering over an ingredient or a button +nei.options.inventory.guirecipe.freezeCycleOnHover.true=Yes +nei.options.inventory.guirecipe.freezeCycleOnHover.false=No nei.options.inventory.widgetsenabled.true=NEI Enabled nei.options.inventory.widgetsenabled.false=NEI Disabled nei.options.inventory.cheatmode.0=Recipe Mode diff --git a/src/main/resources/assets/nei/lang/ru_RU.lang b/src/main/resources/assets/nei/lang/ru_RU.lang index 076ec044..6e2add71 100644 --- a/src/main/resources/assets/nei/lang/ru_RU.lang +++ b/src/main/resources/assets/nei/lang/ru_RU.lang @@ -265,6 +265,9 @@ nei.options.inventory.optimize_gui_overlap_computation.false=Нет nei.options.inventory.guirecipe.shiftOverlayRecipe=Требовать удержание Shift для перемещения предметов при отображении рецепта nei.options.inventory.guirecipe.shiftOverlayRecipe.true=Да nei.options.inventory.guirecipe.shiftOverlayRecipe.false=Нет +nei.options.inventory.guirecipe.freezeCycleOnHover=Останавливать перелистывание рецепта при наведении на предмет или кнопку +nei.options.inventory.guirecipe.freezeCycleOnHover.true=Да +nei.options.inventory.guirecipe.freezeCycleOnHover.false=Нет nei.options.inventory.widgetsenabled.true=NEI включен nei.options.inventory.widgetsenabled.false=NEI выключен nei.options.inventory.cheatmode.0=Режим рецептов