use of net.minecraft.client.renderer.WorldRenderer in project CodeChickenLib by Chicken-Bones.
the class RenderUtils method drawCuboidOutline.
public static void drawCuboidOutline(Cuboid6 c) {
WorldRenderer r = CCRenderState.startDrawing(3, DefaultVertexFormats.POSITION);
r.pos(c.min.x, c.min.y, c.min.z).endVertex();
r.pos(c.max.x, c.min.y, c.min.z).endVertex();
r.pos(c.max.x, c.min.y, c.max.z).endVertex();
r.pos(c.min.x, c.min.y, c.max.z).endVertex();
r.pos(c.min.x, c.min.y, c.min.z).endVertex();
CCRenderState.draw();
CCRenderState.startDrawing(3, DefaultVertexFormats.POSITION);
r.pos(c.min.x, c.max.y, c.min.z).endVertex();
r.pos(c.max.x, c.max.y, c.min.z).endVertex();
r.pos(c.max.x, c.max.y, c.max.z).endVertex();
r.pos(c.min.x, c.max.y, c.max.z).endVertex();
r.pos(c.min.x, c.max.y, c.min.z).endVertex();
CCRenderState.draw();
CCRenderState.startDrawing(1, DefaultVertexFormats.POSITION);
r.pos(c.min.x, c.min.y, c.min.z).endVertex();
r.pos(c.min.x, c.max.y, c.min.z).endVertex();
r.pos(c.max.x, c.min.y, c.min.z).endVertex();
r.pos(c.max.x, c.max.y, c.min.z).endVertex();
r.pos(c.max.x, c.min.y, c.max.z).endVertex();
r.pos(c.max.x, c.max.y, c.max.z).endVertex();
r.pos(c.min.x, c.min.y, c.max.z).endVertex();
r.pos(c.min.x, c.max.y, c.max.z).endVertex();
CCRenderState.draw();
}
use of net.minecraft.client.renderer.WorldRenderer in project SecurityCraft by Geforce132.
the class SCEventHandler method drawNonStandardTexturedRect.
private void drawNonStandardTexturedRect(int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight) {
double z = 200;
double f = 1F / (double) textureWidth;
double f1 = 1F / (double) textureHeight;
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.startDrawingQuads();
worldrenderer.addVertexWithUV(x, y + height, z, u * f, (v + height) * f1);
worldrenderer.addVertexWithUV(x + width, y + height, z, (u + width) * f, (v + height) * f1);
worldrenderer.addVertexWithUV(x + width, y, z, (u + width) * f, v * f1);
worldrenderer.addVertexWithUV(x, y, z, u * f, v * f1);
tessellator.draw();
}
Aggregations