Called repeatedly from run()
()
| 1050 | * Called repeatedly from run() |
| 1051 | */ |
| 1052 | private void runGameLoop() throws IOException |
| 1053 | { |
| 1054 | long i = System.nanoTime(); |
| 1055 | this.mcProfiler.startSection("root"); |
| 1056 | |
| 1057 | if (Display.isCreated() && Display.isCloseRequested()) |
| 1058 | { |
| 1059 | this.shutdown(); |
| 1060 | } |
| 1061 | |
| 1062 | if (this.isGamePaused && this.theWorld != null) |
| 1063 | { |
| 1064 | float f = this.timer.renderPartialTicks; |
| 1065 | this.timer.updateTimer(); |
| 1066 | this.timer.renderPartialTicks = f; |
| 1067 | } |
| 1068 | else |
| 1069 | { |
| 1070 | this.timer.updateTimer(); |
| 1071 | } |
| 1072 | |
| 1073 | this.mcProfiler.startSection("scheduledExecutables"); |
| 1074 | |
| 1075 | synchronized (this.scheduledTasks) |
| 1076 | { |
| 1077 | while (!this.scheduledTasks.isEmpty()) |
| 1078 | { |
| 1079 | try { |
| 1080 | Util.func_181617_a((FutureTask) this.scheduledTasks.poll(), logger); |
| 1081 | } catch (Exception ignored) { |
| 1082 | |
| 1083 | } |
| 1084 | } |
| 1085 | } |
| 1086 | |
| 1087 | this.mcProfiler.endSection(); |
| 1088 | long l = System.nanoTime(); |
| 1089 | this.mcProfiler.startSection("tick"); |
| 1090 | |
| 1091 | for (int j = 0; j < this.timer.elapsedTicks; ++j) |
| 1092 | { |
| 1093 | this.runTick(); |
| 1094 | } |
| 1095 | |
| 1096 | this.mcProfiler.endStartSection("preRenderErrors"); |
| 1097 | long i1 = System.nanoTime() - l; |
| 1098 | this.checkGLError("Pre render"); |
| 1099 | this.mcProfiler.endStartSection("sound"); |
| 1100 | this.mcSoundHandler.setListener(this.thePlayer, this.timer.renderPartialTicks); |
| 1101 | this.mcProfiler.endSection(); |
| 1102 | this.mcProfiler.startSection("render"); |
| 1103 | GlStateManager.pushMatrix(); |
| 1104 | GlStateManager.clear(16640); |
| 1105 | this.framebufferMc.bindFramebuffer(true); |
| 1106 | this.mcProfiler.startSection("display"); |
| 1107 | GlStateManager.enableTexture2D(); |
| 1108 | |
| 1109 | if (this.thePlayer != null && this.thePlayer.isEntityInsideOpaqueBlock()) |
no test coverage detected