2021-06-11 12:02:28 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2022-06-05 20:51:44 +00:00
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
|
|
index 9d247664e5867a31376b3681b7ed0c3404ea46d8..89f75b79e8501097d2411b12ae79bb073cadba7a 100644
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
|
|
@@ -907,4 +907,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
|
|
|
|
|
|
|
throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName());
|
2021-06-11 12:02:28 +00:00
|
|
|
}
|
|
|
|
+
|
2022-06-05 20:51:44 +00:00
|
|
|
+ // Paper start
|
2021-06-11 12:02:28 +00:00
|
|
|
+ @Override
|
|
|
|
+ public io.papermc.paper.world.MoonPhase getMoonPhase() {
|
2022-06-05 20:51:44 +00:00
|
|
|
+ return io.papermc.paper.world.MoonPhase.getPhase(this.getHandle().dayTime() / 24000L);
|
2021-06-11 12:02:28 +00:00
|
|
|
+ }
|
2022-06-05 20:51:44 +00:00
|
|
|
+ // Paper end
|
|
|
|
}
|