Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
afbaa18bf6
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: c9b35cdb PR-684: Make PotionEffectType implement Keyed CraftBukkit Changes: c86a3f7a PR-959: Fix World#refreshChunk af8a8b70 PR-962: Make PotionEffectType implement Keyed Spigot Changes: 7514aa37 SPIGOT-6806: Add setting to disable new chunks generation under existing chunks
23 Zeilen
948 B
Diff
23 Zeilen
948 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 81756e78acb1b9ea2a7e9b75ffe55a936cc79dce..f850aefb042660e6df423a19907a096a3a7c1d77 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -185,6 +185,11 @@ public class CraftWorld extends CraftRegionAccessor 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();
|