new Vector3f(sizeHalf + posX, sizeHalf + posY, sizeHalf + posZ),
new Vector3f(sizeHalf + posX, sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(-sizeHalf + posX, sizeHalf + posY, -sizeHalf + posZ)
},
new Vector2f[]{
new Vector2f(texOffsets[0].x, texOffsets[0].y),
new Vector2f(texOffsets[0].x + texSizes[0].x, texOffsets[0].y),
new Vector2f(texOffsets[0].x + texSizes[0].x, texOffsets[0].y + texSizes[0].y),
new Vector2f(texOffsets[0].x, texOffsets[0].y + texSizes[0].y)
});
tessellator.setNormal(new Vector3f(-1, 0, 0));
tessellator.addPoly(
new Vector3f[]{
new Vector3f(-sizeHalf + posX, -sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(-sizeHalf + posX, -sizeHalf + posY, sizeHalf + posZ),
new Vector3f(-sizeHalf + posX, sizeHalf + posY, sizeHalf + posZ),
new Vector3f(-sizeHalf + posX, sizeHalf + posY, -sizeHalf + posZ)
},
new Vector2f[]{
new Vector2f(texOffsets[1].x, texOffsets[1].y + texSizes[1].y),
new Vector2f(texOffsets[1].x + texSizes[1].x, texOffsets[1].y + texSizes[1].y),
new Vector2f(texOffsets[1].x + texSizes[1].x, texOffsets[1].y),
new Vector2f(texOffsets[1].x, texOffsets[1].y)
});
tessellator.setNormal(new Vector3f(1, 0, 0));
tessellator.addPoly(
new Vector3f[]{
new Vector3f(sizeHalf + posX, sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(sizeHalf + posX, sizeHalf + posY, sizeHalf + posZ),
new Vector3f(sizeHalf + posX, -sizeHalf + posY, sizeHalf + posZ),
new Vector3f(sizeHalf + posX, -sizeHalf + posY, -sizeHalf + posZ)
},
new Vector2f[]{
new Vector2f(texOffsets[2].x, texOffsets[2].y),
new Vector2f(texOffsets[2].x + texSizes[2].x, texOffsets[2].y),
new Vector2f(texOffsets[2].x + texSizes[2].x, texOffsets[2].y + texSizes[2].y),
new Vector2f(texOffsets[2].x, texOffsets[2].y + texSizes[2].y)
});
tessellator.setColor(new Vector4f(light2 * color.x, light2 * color.y, light2 * color.z, color.w));
tessellator.setNormal(new Vector3f(0, 0, -1));
tessellator.addPoly(
new Vector3f[]{
new Vector3f(-sizeHalf + posX, sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(sizeHalf + posX, sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(sizeHalf + posX, -sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(-sizeHalf + posX, -sizeHalf + posY, -sizeHalf + posZ)
},
new Vector2f[]{
new Vector2f(texOffsets[3].x, texOffsets[3].y),
new Vector2f(texOffsets[3].x + texSizes[3].x, texOffsets[3].y),
new Vector2f(texOffsets[3].x + texSizes[3].x, texOffsets[3].y + texSizes[3].y),
new Vector2f(texOffsets[3].x, texOffsets[3].y + texSizes[3].y)
});
tessellator.setNormal(new Vector3f(0, 0, 1));
tessellator.addPoly(
new Vector3f[]{
new Vector3f(-sizeHalf + posX, -sizeHalf + posY, sizeHalf + posZ),
new Vector3f(sizeHalf + posX, -sizeHalf + posY, sizeHalf + posZ),
new Vector3f(sizeHalf + posX, sizeHalf + posY, sizeHalf + posZ),
new Vector3f(-sizeHalf + posX, sizeHalf + posY, sizeHalf + posZ)
},
new Vector2f[]{
new Vector2f(texOffsets[4].x, texOffsets[4].y + texSizes[4].y),
new Vector2f(texOffsets[4].x + texSizes[4].x, texOffsets[4].y + texSizes[4].y),
new Vector2f(texOffsets[4].x + texSizes[4].x, texOffsets[4].y),
new Vector2f(texOffsets[4].x, texOffsets[4].y)
});
tessellator.setNormal(new Vector3f(0, -1, 0));
tessellator.addPoly(
new Vector3f[]{
new Vector3f(-sizeHalf + posX, -sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(sizeHalf + posX, -sizeHalf + posY, -sizeHalf + posZ),
new Vector3f(sizeHalf + posX, -sizeHalf + posY, sizeHalf + posZ),
new Vector3f(-sizeHalf + posX, -sizeHalf + posY, sizeHalf + posZ)
},
new Vector2f[]{
new Vector2f(texOffsets[5].x, texOffsets[5].y),
new Vector2f(texOffsets[5].x + texSizes[5].x, texOffsets[5].y),
new Vector2f(texOffsets[5].x + texSizes[5].x, texOffsets[5].y + texSizes[5].y),
new Vector2f(texOffsets[5].x, texOffsets[5].y + texSizes[5].y)
});
}