public final void setCurrentScreen(GuiScreen var1) {
		if(!(this.currentScreen instanceof ErrorScreen)) {
			if(this.currentScreen != null) {
				this.currentScreen.onClose();
			}

			if(var1 == null && this.player.health <= 0) {
				var1 = new GameOverScreen();
			}

			this.currentScreen = (GuiScreen)var1;
			if(var1 != null) {
				if(this.hasMouse) {
					this.player.releaseAllKeys();
					this.hasMouse = false;
					if(this.levelLoaded) {
						try {
							Mouse.setNativeCursor((Cursor)null);
						} catch (LWJGLException var4) {
							var4.printStackTrace();
						}
					} else {
						Mouse.setGrabbed(false);
					}
				}

				int var2 = this.width * 240 / this.height;
				int var3 = this.height * 240 / this.height;
				((GuiScreen)var1).open(this, var2, var3);
				this.online = false;
			} else {
				this.grabMouse();
			}
		}
	}