diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-01-21 22:16:38 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-01-21 22:16:38 +0800 |
| commit | bbb92072372d8ceab79bb86186637af02cae6779 (patch) | |
| tree | 9a50fce070b6fb9506ef904e82d8772247ab84ac /src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java | |
| parent | 855f72d9f730ce54be6167259f33bf1785b140fb (diff) | |
| download | RoughlyEnoughItems-2.1.0.12.tar.gz RoughlyEnoughItems-2.1.0.12.tar.bz2 RoughlyEnoughItems-2.1.0.12.zip | |
v2.1.0.12v2.1.0.12
- Cheating in servers / realms
- New Plugin loader
- Better language files
- Resizable Recipe Base
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 | 12 |
1 files changed, 11 insertions, 1 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 6b480e8c2..604603bfe 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java @@ -5,6 +5,7 @@ import net.minecraft.client.gui.Gui; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.MathHelper; import java.awt.*; import java.util.ArrayList; @@ -30,7 +31,16 @@ public class RecipeBaseWidget extends Gui implements IWidget { GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderHelper.disableStandardItemLighting(); Minecraft.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE); - drawTexturedModalRect(bounds.x, bounds.y, 106, 190, bounds.width, bounds.height); + drawTexturedModalRect(bounds.x, bounds.y, 106, 190, bounds.width / 2, bounds.height / 2); + drawTexturedModalRect(bounds.x + bounds.width / 2, bounds.y, 256 - bounds.width / 2, 190, bounds.width / 2, bounds.height / 2); + drawTexturedModalRect(bounds.x, bounds.y + bounds.height / 2, 106, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2); + drawTexturedModalRect(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); + drawTexturedModalRect(bounds.x, bounds.y + i, 106, 230, bounds.width / 2, height); + drawTexturedModalRect(bounds.x + bounds.width / 2, bounds.y + i, 256 - bounds.width / 2, 210, bounds.width / 2, height); + } } } |
