@@ -35,6 +35,7 @@ public class TMBRenderer {
3535 public static int currentPage = 0 ;
3636 public static int pages = 0 ;
3737 public static boolean show = true ;
38+ public static boolean enabledRecipes = true ;
3839 protected static boolean initialized ;
3940 protected static final ButtonElement leftButton = new ButtonElement (0 , 0 , 0 , 16 , 16 , "<" );
4041 protected static final ButtonElement rightButton = new ButtonElement (1 , 0 , 0 , 16 , 16 , ">" );
@@ -47,6 +48,7 @@ public static void init(Minecraft mc) {
4748 tooltip = new TooltipElement (mc );
4849 search = new TextFieldElement (null , Minecraft .getMinecraft ().font , 0 , 0 , 120 , 20 , ((IKeybinds ) Minecraft .getMinecraft ().gameSettings ).toomanyblocks$getLastTMBSearch ().value , "Search..." );
4950 show = !((IKeybinds ) Minecraft .getMinecraft ().gameSettings ).toomanyblocks$getIsTMBHidden ().value ;
51+ enabledRecipes = ((IKeybinds ) Minecraft .getMinecraft ().gameSettings ).toomanyblocks$getIsRecipeViewEnabled ().value ;
5052 }
5153
5254 public static void renderHeader (int mouseX , int mouseY , int width , int height , Minecraft mc , float pt , @ Nullable IGuiProperties properties ) {
@@ -188,10 +190,12 @@ public static void renderItems(int mouseX, int mouseY, int width, int height, Mi
188190 GL11 .glPopMatrix ();
189191 }
190192
191- if (mc .gameSettings .keyShowRecipe .isPressed ()) {
192- runtime .showRecipe (hoveredItem , RecipeIngredientRole .OUTPUT );
193- } else if (mc .gameSettings .keyShowUsage .isPressed ()) {
194- runtime .showRecipe (hoveredItem , RecipeIngredientRole .INPUT );
193+ if (enabledRecipes ) {
194+ if (mc .gameSettings .keyShowRecipe .isPressed ()) {
195+ runtime .showRecipe (hoveredItem , RecipeIngredientRole .OUTPUT );
196+ } else if (mc .gameSettings .keyShowUsage .isPressed ()) {
197+ runtime .showRecipe (hoveredItem , RecipeIngredientRole .INPUT );
198+ }
195199 }
196200 }
197201 }
0 commit comments