mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 08:20:51 +01:00
1e7dd72f15
The game uses 0.95d now
23 lines
984 B
Diff
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 954d7a92d9deaf2332ddcfbb7f53f425ada822b6..be0ca9e82b88518109eec88735e628b8de9ebe72 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
@@ -499,4 +499,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
|
|
}
|