Skip to content

Commit

Permalink
Fix goofy fluid rendering in smeltery gui
Browse files Browse the repository at this point in the history
Unmerged 164accessory commits #932
  • Loading branch information
bonii-xx committed Aug 28, 2014
1 parent cada291 commit e488814
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/java/tconstruct/smeltery/gui/SmelteryGui.java
Expand Up @@ -433,14 +433,18 @@ protected void drawToolTip (List par1List, int par2, int par3)
}
}

public void drawLiquidRect (int startU, int startV, IIcon par3Icon, int endU, int endV)
public void drawLiquidRect (int startU, int startV, IIcon icon, int endU, int endV)
{
float top = icon.getInterpolatedV(16 - endV);
float bottom = icon.getMaxV();
float left = icon.getMinU();
float right = icon.getInterpolatedU(endU);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());// Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());// Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());// Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); // Top left
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, left, bottom);//Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, right, bottom);//Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, right, top);//Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, left, top); //Top left
tessellator.draw();
}

Expand Down

0 comments on commit e488814

Please sign in to comment.