diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-01-20 16:45:39 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-01-20 16:45:39 +0800 |
| commit | 4fb3225ee70247e61b221f44bcc6efadaa1901b3 (patch) | |
| tree | 735a4001057c5dba27c3c89958ba3e69dc6f1d6e /src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java | |
| parent | e6b53189fc8c868c588fc08053e0385134ff94e1 (diff) | |
| download | RoughlyEnoughItems-4fb3225ee70247e61b221f44bcc6efadaa1901b3.tar.gz RoughlyEnoughItems-4fb3225ee70247e61b221f44bcc6efadaa1901b3.tar.bz2 RoughlyEnoughItems-4fb3225ee70247e61b221f44bcc6efadaa1901b3.zip | |
Cheating on servers
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java | 14 |
1 files changed, 9 insertions, 5 deletions
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) { |
