setupVertices(bb, xForm);
float minU;
float maxU;
float minV;
float maxV;
IIcon tex;
Tessellator tessellator = Tessellator.instance;
tessellator.setNormal(0, 0, -1);
if(brightnessPerSide != null) {
float cm = brightnessPerSide[ForgeDirection.NORTH.ordinal()];
tessellator.setColorOpaque_F(cm, cm, cm);
}
tex = faceTextures[ForgeDirection.NORTH.ordinal()];
minU = tex.getMinU();
maxU = tex.getMaxU();
minV = tex.getMinV();
maxV = tex.getMaxV();
addVecWithUV(verts[1], minU, maxV);
addVecWithUV(verts[0], maxU, maxV);
addVecWithUV(verts[3], maxU, minV);
addVecWithUV(verts[2], minU, minV);
tessellator.setNormal(0, 0, 1);
if(brightnessPerSide != null) {
float cm = brightnessPerSide[ForgeDirection.SOUTH.ordinal()];
tessellator.setColorOpaque_F(cm, cm, cm);
}
tex = faceTextures[ForgeDirection.SOUTH.ordinal()];
minU = tex.getMinU();
maxU = tex.getMaxU();
minV = tex.getMinV();
maxV = tex.getMaxV();
addVecWithUV(verts[4], minU, maxV);
addVecWithUV(verts[5], maxU, maxV);
addVecWithUV(verts[6], maxU, minV);
addVecWithUV(verts[7], minU, minV);
tessellator.setNormal(0, 1, 0);
if(brightnessPerSide != null) {
float cm = brightnessPerSide[ForgeDirection.UP.ordinal()];
tessellator.setColorOpaque_F(cm, cm, cm);
}
tex = faceTextures[ForgeDirection.UP.ordinal()];
minU = tex.getMinU();
maxU = tex.getMaxU();
minV = tex.getMinV();
maxV = tex.getMaxV();
addVecWithUV(verts[6], minU, minV);
addVecWithUV(verts[2], minU, maxV);
addVecWithUV(verts[3], maxU, maxV);
addVecWithUV(verts[7], maxU, minV);
tessellator.setNormal(0, -1, 0);
if(brightnessPerSide != null) {
float cm = brightnessPerSide[ForgeDirection.DOWN.ordinal()];
tessellator.setColorOpaque_F(cm, cm, cm);
}
tex = faceTextures[ForgeDirection.DOWN.ordinal()];
minU = tex.getMinU();
maxU = tex.getMaxU();
minV = tex.getMinV();
maxV = tex.getMaxV();
addVecWithUV(verts[0], maxU, maxV);
addVecWithUV(verts[1], minU, maxV);
addVecWithUV(verts[5], minU, minV);
addVecWithUV(verts[4], maxU, minV);
tessellator.setNormal(1, 0, 0);
if(brightnessPerSide != null) {
float cm = brightnessPerSide[ForgeDirection.EAST.ordinal()];
tessellator.setColorOpaque_F(cm, cm, cm);
}
tex = faceTextures[ForgeDirection.EAST.ordinal()];
minU = tex.getMinU();
maxU = tex.getMaxU();
minV = tex.getMinV();
maxV = tex.getMaxV();
addVecWithUV(verts[2], minU, minV);
addVecWithUV(verts[6], maxU, minV);
addVecWithUV(verts[5], maxU, maxV);
addVecWithUV(verts[1], minU, maxV);
tessellator.setNormal(-1, 0, 0);
if(brightnessPerSide != null) {
float cm = brightnessPerSide[ForgeDirection.WEST.ordinal()];
tessellator.setColorOpaque_F(cm, cm, cm);
}
tex = faceTextures[ForgeDirection.WEST.ordinal()];
minU = tex.getMinU();
maxU = tex.getMaxU();
minV = tex.getMinV();
maxV = tex.getMaxV();
addVecWithUV(verts[0], minU, maxV);
addVecWithUV(verts[4], maxU, maxV);
addVecWithUV(verts[7], maxU, minV);
addVecWithUV(verts[3], minU, minV);
}