Move some methods to RegionAccessor (#7635)
This commit is contained in:
parent
5befb5586e
commit
b3deb2589e
23 changed files with 135 additions and 95 deletions
|
@ -46,20 +46,20 @@ index 0000000000000000000000000000000000000000..df05153397b42930cd53d37b30824c7e
|
|||
+ return BY_DAY.get(day % 8L);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index fe2b9b88ad854f29e9162a316ca952b9f0b38121..85c1f5b33e933b23946cad3c5ad37cc350ee5d3c 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -70,6 +70,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @return The amount of Players in this world
|
||||
diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
index e55f6e2baf35dbd91c433ab9e62713eaac85435b..2fa3de66107162ccaa158b369e2c4a926ecaff92 100644
|
||||
--- a/src/main/java/org/bukkit/RegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
@@ -376,4 +376,12 @@ public interface RegionAccessor {
|
||||
*/
|
||||
int getPlayerCount();
|
||||
@NotNull
|
||||
public <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, boolean randomizeData, @Nullable Consumer<T> function) throws IllegalArgumentException;
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * @return the current moon phase at the current time in the world
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ io.papermc.paper.world.MoonPhase getMoonPhase();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue