Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
4104545b11
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
23 Zeilen
920 B
Diff
23 Zeilen
920 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sun, 23 Aug 2020 16:32:11 +0200
|
|
Subject: [PATCH] Add moon phase API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index 8c8627f70f29834e19093b6298127008e75b7d74..82964cfbe172e22e19203d37addf9fedbe8edaa5 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -325,6 +325,11 @@ public class CraftWorld implements World {
|
|
public int getPlayerCount() {
|
|
return world.players().size();
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public io.papermc.paper.world.MoonPhase getMoonPhase() {
|
|
+ return io.papermc.paper.world.MoonPhase.getPhase(getFullTime() / 24000L);
|
|
+ }
|
|
// Paper end
|
|
|
|
private static final Random rand = new Random();
|