Add moon phase API

This commit is contained in:
BillyGalbreath 2020-08-23 16:32:11 +02:00
parent b77fd7dd24
commit 15b58660bb

View file

@ -515,4 +515,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName());
}
// Paper start
@Override
public io.papermc.paper.world.MoonPhase getMoonPhase() {
return io.papermc.paper.world.MoonPhase.getPhase(this.getHandle().dayTime() / 24000L);
}
// Paper end
}