Guest User

RenderHelper

a guest
Jun 28th, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. public static void drawTextureCustomSize(double posX, double posY, double startPixX, double startPixY, double pieceSizeX, double pieceSizeY, float sizeTextureX, float sizeTextureY)
  2.     {
  3.         float f4 = 1.0F / sizeTextureX;
  4.         float f5 = 1.0F / sizeTextureY;
  5.         Tessellator tessellator = Tessellator.instance;
  6.         tessellator.startDrawingQuads();
  7.         tessellator.addVertexWithUV((double)posX, (double)(posY + pieceSizeY), 0.0D, (double)(startPixX * f4), (double)((startPixY + (float)pieceSizeY) * f5));
  8.         tessellator.addVertexWithUV((double)(posX + pieceSizeX), (double)(posY + pieceSizeY), 0.0D, (double)((startPixX + (float)pieceSizeX) * f4), (double)((startPixY + (float)pieceSizeY) * f5));
  9.         tessellator.addVertexWithUV((double)(posX + pieceSizeX), (double)posY, 0.0D, (double)((startPixX + (float)pieceSizeX) * f4), (double)(startPixY * f5));
  10.         tessellator.addVertexWithUV((double)posX, (double)posY, 0.0D, (double)(startPixX * f4), (double)(startPixY * f5));
  11.         tessellator.draw();
  12.     }
Add Comment
Please, Sign In to add comment