Paper/patches/server/0464-Add-moon-phase-API.patch
Nassim Jahnke d5f1ffc2e6
Remove somewhat broken patch
With the new chunk system it doesn't hurt too much to (temporarily) remove this until implemented in a safer manner
2022-12-19 11:46:55 +01:00

23 lines
984 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/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 100d59c37cf699bd33bdf0c3fc085dfe0065b93a..3e4ac4020c9f51e634eadd43243d34267bea4b22 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -938,4 +938,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
}