From 4fb3225ee70247e61b221f44bcc6efadaa1901b3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 20 Jan 2019 16:45:39 +0800 Subject: Cheating on servers --- .../me/shedaniel/rei/gui/widget/RecipeViewingWidget.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java') diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java index 4645524dc..59708ad4b 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java @@ -30,7 +30,7 @@ import java.util.Map; public class RecipeViewingWidget extends Gui { private static final Identifier CREATIVE_INVENTORY_TABS = new Identifier("textures/gui/container/creative_inventory/tabs.png"); - private static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); + public static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); public final int guiWidth = 176; public final int guiHeight = 186; @@ -272,10 +272,14 @@ public class RecipeViewingWidget extends Gui { @Override public void drawBackground() { drawBackground(0); - GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); - GuiLighting.disable(); - this.client.getTextureManager().bindTexture(CHEST_GUI_TEXTURE); - this.drawTexturedRect((int) bounds.getX(), (int) bounds.getY(), 0, 0, (int) bounds.getWidth(), (int) bounds.getHeight()); + if (selectedCategory != null) + selectedCategory.drawCategoryBackground(bounds); + else { + GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiLighting.disable(); + this.client.getTextureManager().bindTexture(CHEST_GUI_TEXTURE); + this.drawTexturedRect((int) bounds.getX(), (int) bounds.getY(), 0, 0, (int) bounds.getWidth(), (int) bounds.getHeight()); + } } public int getTotalPages(IRecipeCategory category) { -- cgit