Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void drawRectangleStretched(int x, int y, float u, float v, int width, int height, float uMax, float vMax, int zLevel)
- {
- float scaleU = 0.00390625F;
- float scaleV = 0.00390625F;
- if (u % 1 != 0 || uMax % 1 != 0) scaleU = 1;
- if (v % 1 != 0 || vMax % 1 != 0) scaleV = 1;
- Tessellator tessellator = Tessellator.instance;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV(x, y + height, zLevel, u * scaleU, vMax * scaleV);
- tessellator.addVertexWithUV(x + width, y + height, zLevel, uMax * scaleU, vMax * scaleV);
- tessellator.addVertexWithUV(x + width, y, zLevel, uMax * scaleU, v * scaleV);
- tessellator.addVertexWithUV(x, y, zLevel, u * scaleU, v * scaleV);
- tessellator.draw();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement