@Override
	public void run() {
		// lower ThreadPriority
		Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
		// run a long while (true) this means in our case "always"
		while (true) {
			if (_TIME_OF_NEXT_TICK > System.currentTimeMillis()) {
				// too soon to repaint, wait...
				try {
					Thread.sleep(Math.abs(_TIME_OF_NEXT_TICK
							- System.currentTimeMillis()));
				} catch (final InterruptedException e) {
					e.printStackTrace();
				}
			}
			_TIME_OF_NEXT_TICK = System.currentTimeMillis()
					+ Math.round(1000f / _DESIRED_TPS);

			++_TICK;
			if (U.currentMode == GameMode.GameOn
					|| U.currentMode == GameMode.Creative) {
				Tick();
			}

			if (_TICK % _TICKS_PER_RENDER == 0) {
				++_FRAME;
				if (_FRAME % _DO_FPS_EVERY_X_FRAMES == 0) {
					_FPS = Math.round(1. / (System.currentTimeMillis() - _TIME_OF_LAST_FRAME)
									  * 1000. * _DO_FPS_EVERY_X_FRAMES);
					_TIME_OF_LAST_FRAME = System.currentTimeMillis();
				}
				repaint();
			}
			Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
		}
	}