* @param xxx
	 * @param yyy
	 * @param zzz
	 * @param attached Are we attached to the piston body?
	 * @param override_sticky If attached, are we a sticky piston or a regular piston?
	 */
	public void renderPistonHead(int textureId, int xxx, int yyy, int zzz, BlockType block, int tex_offset, boolean attached, boolean override_sticky) {
		float x = xxx + this.x*16;
		float z = zzz + this.z*16;
		float y = yyy;
		byte data = getData(xxx, yyy, zzz);
		boolean sticky = ((data & 0x8) == 0x8);
		int direction = (data & 0x7);

		float side_tex_x = precalcSpriteSheetToTextureX[block.texture_extra_map.get("body")+tex_offset];
		float side_tex_y = precalcSpriteSheetToTextureY[block.texture_extra_map.get("body")+tex_offset];

		// Matrix stuff
		GL11.glPushMatrix();
		GL11.glTranslatef(x, y, z);

		// This routine draws the piston facing south, which is direction value 3
		if (direction == 1)
		{
			// Up
			GL11.glRotatef(-90f, 1f, 0f, 0f);
		}
		else if (direction == 2)
		{
			// North
			GL11.glRotatef(180f, 0f, 1f, 0f);
		}
		else if (direction == 4)
		{
			// West
			GL11.glRotatef(-90f, 0f, 1f, 0f);
		}
		else if (direction == 5)
		{
			// East
			GL11.glRotatef(90f, 0f, 1f, 0f);
		}

		// Outside edges
		renderNonstandardHorizontalTexRotate(side_tex_x, side_tex_y, TEX16, TEX128, -.49f, .25f, .49f, .49f, .49f);
		renderNonstandardHorizontalTexRotate(side_tex_x, side_tex_y, TEX16, TEX128, -.49f, .25f, .49f, .49f, -.49f);
		renderNonstandardVerticalTexRotate(side_tex_x, side_tex_y, TEX16, TEX128, -.49f, .49f, .25f, -.49f, -.49f, .49f);
		renderNonstandardVerticalTexRotate(side_tex_x, side_tex_y, TEX16, TEX128, .49f, .49f, .25f, .49f, -.49f, .49f);

		// Back face and post, if we're not attached
		if (!attached)
		{
			// Back face first
			renderVertical(textureId, -.49f, .25f, .49f, .25f, -.49f, .98f);

			// Now the post
			renderNonstandardHorizontal(side_tex_x, side_tex_y, TEX16, TEX128, -.125f, .25f, .125f, -.75f, .125f);
			renderNonstandardHorizontal(side_tex_x, side_tex_y, TEX16, TEX128, -.125f, .25f, .125f, -.75f, -.125f);
			renderNonstandardVertical(side_tex_x, side_tex_y, TEX16, TEX128, -.125f, .125f, .25f, -.125f, -.125f, -.75f);
			renderNonstandardVertical(side_tex_x, side_tex_y, TEX16, TEX128, .125f, .125f, .25f, .125f, -.125f, -.75f);
		}

		// Front face
		if (attached)
		{
			if (override_sticky)
			{
				textureId = block.texture_extra_map.get("head_sticky")+tex_offset;
			}
		}
		else
		{
			if (sticky)
			{
				textureId = block.texture_extra_map.get("head_sticky")+tex_offset;
			}
		}
		renderVertical(textureId, -.49f, .49f, .49f, .49f, -.49f, .98f);

		// Pop the matrix
		GL11.glPopMatrix();
	}