Fix isFullMoon (#1071)

## Fixes
* Fixes isFullMoon being off by 1
This commit is contained in:
Vahagn Tovmasian 2020-07-19 22:26:57 -07:00 committed by GitHub
parent fa9f454978
commit f42f8bf2c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,10 +91,8 @@ public abstract class ElementalAbility extends CoreAbility {
}
public static boolean isFullMoon(final World world) {
final double days = Math.ceil(world.getFullTime() / 24000) + 1;
final double phase = days % 8;
return phase == 0;
return (world.getFullTime() / 24000) % 8 == 0;
}
public static boolean isIce(final Block block) {