diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-03-19 04:30:52 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-03-19 04:30:52 +0800 |
| commit | 1f6fc41eaebc3c565bef12606ff98a076fc32e89 (patch) | |
| tree | 33a5c1cd135f6c5ecd8b85fd602bd8c290cf9fb7 /src/main/java/me/shedaniel/rei/impl/widgets | |
| parent | 1764648e4f536b2e6ac1b7d1cb3c3fb60e206b29 (diff) | |
| download | RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.tar.gz RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.tar.bz2 RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.zip | |
20w12a
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/widgets')
4 files changed, 22 insertions, 22 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java index afb8576e3..0404bce40 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java @@ -65,10 +65,10 @@ public final class ArrowWidget extends Arrow { @Override public void render(int mouseX, int mouseY, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(DefaultPlugin.getDisplayTexture()); - blit(getX(), getY(), 106, 91, 24, 17); + drawTexture(getX(), getY(), 106, 91, 24, 17); if (getAnimationDuration() > 0) { int width = MathHelper.ceil((System.currentTimeMillis() / (animationDuration / 24) % 24d) / 1f); - blit(getX(), getY(), 82, 91, width, 17); + drawTexture(getX(), getY(), 82, 91, width, 17); } } diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java index 238162a56..d7bdb93bb 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java @@ -65,10 +65,10 @@ public final class BurningFireWidget extends BurningFire { @Override public void render(int mouseX, int mouseY, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(DefaultPlugin.getDisplayTexture()); - blit(getX(), getY(), 1, 74, 14, 14); + drawTexture(getX(), getY(), 1, 74, 14, 14); if (getAnimationDuration() > 0) { int height = 14 - MathHelper.ceil((System.currentTimeMillis() / (animationDuration / 14) % 14d) / 1f); - blit(getX(), getY() + 14 - height, 82, 77 + (14 - height), 14, height); + drawTexture(getX(), getY() + 14 - height, 82, 77 + (14 - height), 14, height); } } diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java index 8979b52b0..db3cc7d8b 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java @@ -289,19 +289,19 @@ public class ButtonWidget extends Button { RenderSystem.blendFuncSeparate(770, 771, 1, 0); RenderSystem.blendFunc(770, 771); //Four Corners - blit(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); - blit(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); - blit(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); - blit(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); //Sides - blit(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); for (int i = y + 4; i < y + height - 4; i += 76) { - blit(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); - blit(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); } } } diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java index cb2047004..7599a0c0a 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java @@ -137,21 +137,21 @@ public final class PanelWidget extends Panel { int yTextureOffset = getYTextureOffset(); //Four Corners - this.blit(x, y, 106 + xTextureOffset, 124 + yTextureOffset, 4, 4); - this.blit(x + width - 4, y, 252 + xTextureOffset, 124 + yTextureOffset, 4, 4); - this.blit(x, y + height - 4, 106 + xTextureOffset, 186 + yTextureOffset, 4, 4); - this.blit(x + width - 4, y + height - 4, 252 + xTextureOffset, 186 + yTextureOffset, 4, 4); + this.drawTexture(x, y, 106 + xTextureOffset, 124 + yTextureOffset, 4, 4); + this.drawTexture(x + width - 4, y, 252 + xTextureOffset, 124 + yTextureOffset, 4, 4); + this.drawTexture(x, y + height - 4, 106 + xTextureOffset, 186 + yTextureOffset, 4, 4); + this.drawTexture(x + width - 4, y + height - 4, 252 + xTextureOffset, 186 + yTextureOffset, 4, 4); //Sides for (int xx = 4; xx < width - 4; xx += 128) { int thisWidth = Math.min(128, width - 4 - xx); - this.blit(x + xx, y, 110 + xTextureOffset, 124 + yTextureOffset, thisWidth, 4); - this.blit(x + xx, y + height - 4, 110 + xTextureOffset, 186 + yTextureOffset, thisWidth, 4); + this.drawTexture(x + xx, y, 110 + xTextureOffset, 124 + yTextureOffset, thisWidth, 4); + this.drawTexture(x + xx, y + height - 4, 110 + xTextureOffset, 186 + yTextureOffset, thisWidth, 4); } for (int yy = 4; yy < height - 4; yy += 50) { int thisHeight = Math.min(50, height - 4 - yy); - this.blit(x, y + yy, 106 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); - this.blit(x + width - 4, y + yy, 252 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); + this.drawTexture(x, y + yy, 106 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); + this.drawTexture(x + width - 4, y + yy, 252 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); } fillGradient(x + 4, y + 4, x + width - 4, y + height - 4, getInnerColor(), getInnerColor()); } |
