diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-03-29 00:26:28 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-03-29 00:26:28 +0800 |
| commit | d5b270a829f5488ba6ab72778745da1f64769ff8 (patch) | |
| tree | d9a54849b1c1d2e55ad38baa5d8055a5fcdf9617 /src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java | |
| parent | ef6b2038f1aae2659e98e503324fb2aee85c1d2b (diff) | |
| download | RoughlyEnoughItems-d5b270a829f5488ba6ab72778745da1f64769ff8.tar.gz RoughlyEnoughItems-d5b270a829f5488ba6ab72778745da1f64769ff8.tar.bz2 RoughlyEnoughItems-d5b270a829f5488ba6ab72778745da1f64769ff8.zip | |
Update to 19w13a
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java index 8a588b5ab..72b042f63 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java @@ -2,7 +2,6 @@ package me.shedaniel.rei.gui.widget; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.DrawableHelper; import net.minecraft.client.render.GuiLighting; import net.minecraft.util.Identifier; import net.minecraft.util.math.MathHelper; @@ -28,7 +27,7 @@ public class RecipeBaseWidget extends HighlightableWidget { } @Override - public List<Widget> getInputListeners() { + public List<Widget> children() { return Collections.emptyList(); } @@ -41,24 +40,24 @@ public class RecipeBaseWidget extends HighlightableWidget { GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE); - drawTexturedRect(bounds.x, bounds.y, 106, 190, bounds.width / 2, bounds.height / 2); - drawTexturedRect(bounds.x + bounds.width / 2, bounds.y, 256 - bounds.width / 2, 190, bounds.width / 2, bounds.height / 2); - drawTexturedRect(bounds.x, bounds.y + bounds.height / 2, 106, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2); - drawTexturedRect(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2, 256 - bounds.width / 2, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2); + blit(bounds.x, bounds.y, 106, 190, bounds.width / 2, bounds.height / 2); + blit(bounds.x + bounds.width / 2, bounds.y, 256 - bounds.width / 2, 190, bounds.width / 2, bounds.height / 2); + blit(bounds.x, bounds.y + bounds.height / 2, 106, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2); + blit(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2, 256 - bounds.width / 2, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2); if (bounds.height > 40) for(int i = 20; i < bounds.height - 20; i += MathHelper.clamp(20, 0, bounds.height - 20 - i)) { int height = MathHelper.clamp(20, 0, bounds.height - 20 - i); - drawTexturedRect(bounds.x, bounds.y + i, 106, 230, bounds.width / 2, height); - drawTexturedRect(bounds.x + bounds.width / 2, bounds.y + i, 256 - bounds.width / 2, 210, bounds.width / 2, height); + blit(bounds.x, bounds.y + i, 106, 230, bounds.width / 2, height); + blit(bounds.x + bounds.width / 2, bounds.y + i, 256 - bounds.width / 2, 210, bounds.width / 2, height); } if (bounds.width > 40) for(int i = 20; i < bounds.width - 20; i += MathHelper.clamp(40, 0, bounds.width - 20 - i)) { int width = MathHelper.clamp(40, 0, bounds.width - 20 - i); GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); - drawTexturedRect(bounds.x + i, bounds.y, 113, 190, width, MathHelper.clamp(4, 0, bounds.height / 2)); - drawTexturedRect(bounds.x + i, bounds.y + bounds.height - 4, 113, 252, width, MathHelper.clamp(4, 0, bounds.height / 2)); - DrawableHelper.drawRect(bounds.x + i, bounds.y + 4, bounds.x + i + width, bounds.y + bounds.height - 4, INNER_COLOR.getRGB()); + blit(bounds.x + i, bounds.y, 113, 190, width, MathHelper.clamp(4, 0, bounds.height / 2)); + blit(bounds.x + i, bounds.y + bounds.height - 4, 113, 252, width, MathHelper.clamp(4, 0, bounds.height / 2)); + fill(bounds.x + i, bounds.y + 4, bounds.x + i + width, bounds.y + bounds.height - 4, INNER_COLOR.getRGB()); } } |
