public void drawShakingText(String text, int x, int y, int colour,
			int elapsed, int tick) {
		if (text == null)
			return;
		
		/*
		 * Calculate the current amplitude of the
		 * shake based on how long the text has been
		 * shaking for.
		 */
		double amplitude = 7D - elapsed / 8D;
		if (amplitude < 0.0D)
			amplitude = 0.0D;
		
		/*
		 * Place half the text to the left of the
		 * anchor point and half the text to the
		 * right. This centres the text horizontally.
		 */
		x -= getTextWidth(text) / 2;
		
		/*
		 * Draw text from the top-left instead of
		 * the bottom.
		 */
		y -= fontHeight;
		
		/*
		 * Iterate through the characters in the text.
		 */
		for (int c = 0; c < text.length(); c++) {
			char character = text.charAt(c);
			
			/*
			 * If the character is a space we do not draw it,
			 * but we still move the x position by the width
			 * of the space.
			 */
			if (character != ' ') {
				/*
				 * The vertical position of the text is decided based
				 * on a sine wave, taking into account the current
				 * time and the amount of time the text has been
				 * shaking for.
				 */
				drawGlyph(
						glyphPixels[character],
						x + horizontalKerning[character],
						y + verticalKerning[character]
							+ (int) (Math.sin(c / 1.5D + tick) * amplitude),
						glyphWidth[character], glyphHeight[character], colour);
			}
			x += glyphDisplayWidth[character];
		}
	}