(World world, int timeOfDay, float celestialAngle, float rainStrength, float thunderStrength)
| 321 | } |
| 322 | |
| 323 | public void render(World world, int timeOfDay, float celestialAngle, float rainStrength, float thunderStrength) |
| 324 | { |
| 325 | float f = this.getPositionBrightness(world); |
| 326 | float f1 = this.getWeatherBrightness(rainStrength, thunderStrength); |
| 327 | float f2 = this.getFadeBrightness(timeOfDay); |
| 328 | float f3 = f * f1 * f2; |
| 329 | f3 = Config.limit(f3, 0.0F, 1.0F); |
| 330 | |
| 331 | if (f3 >= 1.0E-4F) |
| 332 | { |
| 333 | GlStateManager.bindTexture(this.textureId); |
| 334 | Blender.setupBlend(this.blend, f3); |
| 335 | GlStateManager.pushMatrix(); |
| 336 | |
| 337 | if (this.rotate) |
| 338 | { |
| 339 | float f4 = 0.0F; |
| 340 | |
| 341 | if (this.speed != (float)Math.round(this.speed)) |
| 342 | { |
| 343 | long i = (world.getWorldTime() + 18000L) / 24000L; |
| 344 | double d0 = (double)(this.speed % 1.0F); |
| 345 | double d1 = (double)i * d0; |
| 346 | f4 = (float)(d1 % 1.0D); |
| 347 | } |
| 348 | |
| 349 | GlStateManager.rotate(360.0F * (f4 + celestialAngle * this.speed), this.axis[0], this.axis[1], this.axis[2]); |
| 350 | } |
| 351 | |
| 352 | Tessellator tessellator = Tessellator.getInstance(); |
| 353 | GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F); |
| 354 | GlStateManager.rotate(-90.0F, 0.0F, 0.0F, 1.0F); |
| 355 | this.renderSide(tessellator, 4); |
| 356 | GlStateManager.pushMatrix(); |
| 357 | GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F); |
| 358 | this.renderSide(tessellator, 1); |
| 359 | GlStateManager.popMatrix(); |
| 360 | GlStateManager.pushMatrix(); |
| 361 | GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F); |
| 362 | this.renderSide(tessellator, 0); |
| 363 | GlStateManager.popMatrix(); |
| 364 | GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F); |
| 365 | this.renderSide(tessellator, 5); |
| 366 | GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F); |
| 367 | this.renderSide(tessellator, 2); |
| 368 | GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F); |
| 369 | this.renderSide(tessellator, 3); |
| 370 | GlStateManager.popMatrix(); |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | private float getPositionBrightness(World world) |
| 375 | { |
no test coverage detected