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

Method isActive

src/main/java/net/optifine/CustomSkyLayer.java:487–522  ·  view source on GitHub ↗
(World world, int timeOfDay)

Source from the content-addressed store, hash-verified

485 }
486
487 public boolean isActive(World world, int timeOfDay)
488 {
489 if (world != this.lastWorld)
490 {
491 this.lastWorld = world;
492 this.smoothPositionBrightness = null;
493 }
494
495 if (this.timeBetween(timeOfDay, this.endFadeOut, this.startFadeIn))
496 {
497 return false;
498 }
499 else
500 {
501 if (this.days != null)
502 {
503 long i = world.getWorldTime();
504 long j;
505
506 for (j = i - (long)this.startFadeIn; j < 0L; j += (long)(24000 * this.daysLoop))
507 {
508 ;
509 }
510
511 int k = (int)(j / 24000L);
512 int l = k % this.daysLoop;
513
514 if (!this.days.isInRange(l))
515 {
516 return false;
517 }
518 }
519
520 return true;
521 }
522 }
523
524 private boolean timeBetween(int timeOfDay, int timeStart, int timeEnd)
525 {

Callers 1

renderSkyMethod · 0.95

Calls 3

timeBetweenMethod · 0.95
getWorldTimeMethod · 0.45
isInRangeMethod · 0.45

Tested by

no test coverage detected