(Minecraft minecraft, float partialTicks, long finishTimeNano)
| 3965 | } |
| 3966 | |
| 3967 | public static void beginRender(Minecraft minecraft, float partialTicks, long finishTimeNano) |
| 3968 | { |
| 3969 | checkGLError("pre beginRender"); |
| 3970 | checkWorldChanged(mc.theWorld); |
| 3971 | mc = minecraft; |
| 3972 | mc.mcProfiler.startSection("init"); |
| 3973 | entityRenderer = mc.entityRenderer; |
| 3974 | |
| 3975 | if (!isShaderPackInitialized) |
| 3976 | { |
| 3977 | try |
| 3978 | { |
| 3979 | init(); |
| 3980 | } |
| 3981 | catch (IllegalStateException illegalstateexception) |
| 3982 | { |
| 3983 | if (Config.normalize(illegalstateexception.getMessage()).equals("Function is not supported")) |
| 3984 | { |
| 3985 | printChatAndLogError("[Shaders] Error: " + illegalstateexception.getMessage()); |
| 3986 | illegalstateexception.printStackTrace(); |
| 3987 | setShaderPack("OFF"); |
| 3988 | return; |
| 3989 | } |
| 3990 | } |
| 3991 | } |
| 3992 | |
| 3993 | if (mc.displayWidth != renderDisplayWidth || mc.displayHeight != renderDisplayHeight) |
| 3994 | { |
| 3995 | resize(); |
| 3996 | } |
| 3997 | |
| 3998 | if (needResizeShadow) |
| 3999 | { |
| 4000 | resizeShadow(); |
| 4001 | } |
| 4002 | |
| 4003 | worldTime = mc.theWorld.getWorldTime(); |
| 4004 | diffWorldTime = (worldTime - lastWorldTime) % 24000L; |
| 4005 | |
| 4006 | if (diffWorldTime < 0L) |
| 4007 | { |
| 4008 | diffWorldTime += 24000L; |
| 4009 | } |
| 4010 | |
| 4011 | lastWorldTime = worldTime; |
| 4012 | moonPhase = mc.theWorld.getMoonPhase(); |
| 4013 | ++frameCounter; |
| 4014 | |
| 4015 | if (frameCounter >= 720720) |
| 4016 | { |
| 4017 | frameCounter = 0; |
| 4018 | } |
| 4019 | |
| 4020 | systemTime = System.currentTimeMillis(); |
| 4021 | |
| 4022 | if (lastSystemTime == 0L) |
| 4023 | { |
| 4024 | lastSystemTime = systemTime; |
no test coverage detected