Progress for matter fabricator finally works. Closes #1630
This commit is contained in:
parent
c7db26c21e
commit
941629e790
1 changed files with 18 additions and 19 deletions
|
@ -117,29 +117,28 @@ public class TRBuilder extends GuiBuilder {
|
||||||
|
|
||||||
gui.mc.getTextureManager().bindTexture(GUI_SHEET);
|
gui.mc.getTextureManager().bindTexture(GUI_SHEET);
|
||||||
gui.drawTexturedModalRect(x, y, direction.x, direction.y, direction.width, direction.height);
|
gui.drawTexturedModalRect(x, y, direction.x, direction.y, direction.width, direction.height);
|
||||||
|
|
||||||
if (direction.equals(ProgressDirection.RIGHT)) {
|
|
||||||
int j = (int) ((double) progress / (double) maxProgress * 16);
|
int j = (int) ((double) progress / (double) maxProgress * 16);
|
||||||
if (j < 0)
|
if (j < 0) {
|
||||||
j = 0;
|
j = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (direction) {
|
||||||
|
case RIGHT:
|
||||||
gui.drawTexturedModalRect(x, y, direction.xActive, direction.yActive, j, 10);
|
gui.drawTexturedModalRect(x, y, direction.xActive, direction.yActive, j, 10);
|
||||||
}
|
break;
|
||||||
|
case LEFT:
|
||||||
if (direction.equals(ProgressDirection.LEFT)) {
|
|
||||||
int j = (int) ((double) progress / (double) maxProgress * 16);
|
|
||||||
if (j < 0)
|
|
||||||
j = 0;
|
|
||||||
gui.drawTexturedModalRect(x + 16 - j, y, direction.xActive + 16 - j, direction.yActive, j, 10);
|
gui.drawTexturedModalRect(x + 16 - j, y, direction.xActive + 16 - j, direction.yActive, j, 10);
|
||||||
}
|
break;
|
||||||
|
case UP:
|
||||||
if (direction.equals(ProgressDirection.UP)) {
|
|
||||||
int j = (int) ((double) progress / (double) maxProgress * 16);
|
|
||||||
if (j < 0)
|
|
||||||
j = 0;
|
|
||||||
gui.drawTexturedModalRect(x, y + 16 - j, direction.xActive, direction.yActive + 16 - j, 10, j);
|
gui.drawTexturedModalRect(x, y + 16 - j, direction.xActive, direction.yActive + 16 - j, 10, j);
|
||||||
|
break;
|
||||||
|
case DOWN:
|
||||||
|
gui.drawTexturedModalRect(x, y, direction.xActive, direction.yActive, 10, j);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isInRect(x, y, direction.width, direction.height, mouseX, mouseY)) {
|
if (isInRect(x, y, direction.width, direction.height, mouseX, mouseY)) {
|
||||||
int percentage = percentage(maxProgress, progress);
|
int percentage = percentage(maxProgress, progress);
|
||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue