public void addVertex(double d, double d1, double d2) {
        if (!this.renderingChunk) {
            GL11.glVertex3f((float) (d + this.xOffset), (float) (d1 + this.yOffset), (float) (d2 + this.zOffset));
        } else {
            ++this.addedVertices;
            if (this.drawMode == 7 && Tessellator.convertQuadsToTriangles && this.addedVertices % 4 == 0) {
                for (int i = 0; i < 2; ++i) {
                    int j = 8 * (3 - i);

                    this.intBuffer.put(this.intBuffer.get(this.rawBufferIndex - j + 0));
                    this.intBuffer.put(this.intBuffer.get(this.rawBufferIndex - j + 1));
                    this.intBuffer.put(this.intBuffer.get(this.rawBufferIndex - j + 2));
                    this.intBuffer.put(this.intBuffer.get(this.rawBufferIndex - j + 3));
                    this.intBuffer.put(this.intBuffer.get(this.rawBufferIndex - j + 4));
                    this.intBuffer.put(this.intBuffer.get(this.rawBufferIndex - j + 5));
                    this.intBuffer.put(0);
                    this.intBuffer.put(0);
                    ++this.vertexCount;
                    this.rawBufferIndex += 8;
                }
            }

            this.intBuffer.put(Float.floatToRawIntBits((float) (d + this.xOffset)));
            this.intBuffer.put(Float.floatToRawIntBits((float) (d1 + this.yOffset)));
            this.intBuffer.put(Float.floatToRawIntBits((float) (d2 + this.zOffset)));
            this.intBuffer.put(Float.floatToRawIntBits((float) this.textureU));
            this.intBuffer.put(Float.floatToRawIntBits((float) this.textureV));
            this.intBuffer.put(this.color);
            this.intBuffer.put(0);
            this.intBuffer.put(0);
            this.rawBufferIndex += 8;
            ++this.vertexCount;
            if (this.renderingChunk && this.addedVertices % 4 == 0 && this.rawBufferIndex >= this.bufferSize - 32) {
                this.draw();
                this.isDrawing = true;
            }

        }
    }