mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Add moon phase API
This commit is contained in:
parent
b77fd7dd24
commit
15b58660bb
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user