(World world, int timeOfDay)
| 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 | { |
no test coverage detected