Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void drawTextureCustomSize(double posX, double posY, double startPixX, double startPixY, double pieceSizeX, double pieceSizeY, float sizeTextureX, float sizeTextureY)
- {
- float f4 = 1.0F / sizeTextureX;
- float f5 = 1.0F / sizeTextureY;
- Tessellator tessellator = Tessellator.instance;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)posX, (double)(posY + pieceSizeY), 0.0D, (double)(startPixX * f4), (double)((startPixY + (float)pieceSizeY) * f5));
- tessellator.addVertexWithUV((double)(posX + pieceSizeX), (double)(posY + pieceSizeY), 0.0D, (double)((startPixX + (float)pieceSizeX) * f4), (double)((startPixY + (float)pieceSizeY) * f5));
- tessellator.addVertexWithUV((double)(posX + pieceSizeX), (double)posY, 0.0D, (double)((startPixX + (float)pieceSizeX) * f4), (double)(startPixY * f5));
- tessellator.addVertexWithUV((double)posX, (double)posY, 0.0D, (double)(startPixX * f4), (double)(startPixY * f5));
- tessellator.draw();
- }
Add Comment
Please, Sign In to add comment