MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / renderSky

Method renderSky

src/main/java/net/optifine/CustomSky.java:122–160  ·  view source on GitHub ↗
(World world, TextureManager re, float partialTicks)

Source from the content-addressed store, hash-verified

120 }
121
122 public static void renderSky(World world, TextureManager re, float partialTicks)
123 {
124 if (worldSkyLayers != null)
125 {
126 int i = world.provider.getDimensionId();
127
128 if (i >= 0 && i < worldSkyLayers.length)
129 {
130 CustomSkyLayer[] acustomskylayer = worldSkyLayers[i];
131
132 if (acustomskylayer != null)
133 {
134 long j = world.getWorldTime();
135 int k = (int)(j % 24000L);
136 float f = world.getCelestialAngle(partialTicks);
137 float f1 = world.getRainStrength(partialTicks);
138 float f2 = world.getThunderStrength(partialTicks);
139
140 if (f1 > 0.0F)
141 {
142 f2 /= f1;
143 }
144
145 for (int l = 0; l < acustomskylayer.length; ++l)
146 {
147 CustomSkyLayer customskylayer = acustomskylayer[l];
148
149 if (customskylayer.isActive(world, k))
150 {
151 customskylayer.render(world, k, f, f1, f2);
152 }
153 }
154
155 float f3 = 1.0F - f1;
156 Blender.clearBlend(f3);
157 }
158 }
159 }
160 }
161
162 public static boolean hasSkyLayers(World world)
163 {

Callers 1

renderSkyMethod · 0.95

Calls 8

isActiveMethod · 0.95
renderMethod · 0.95
clearBlendMethod · 0.95
getCelestialAngleMethod · 0.80
getRainStrengthMethod · 0.80
getThunderStrengthMethod · 0.80
getDimensionIdMethod · 0.45
getWorldTimeMethod · 0.45

Tested by

no test coverage detected