mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@64a5bf3f add option to let copper golems open shulkers PurpurMC/Purpur@4b463648 Updated Upstream (Paper)
60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Tue, 28 Oct 2025 16:26:54 +0300
|
|
Subject: [PATCH] SparklyPaper: Parallel world ticking
|
|
|
|
Original license: MIT
|
|
Original project (API): https://github.com/Biquaternions/Fish
|
|
Original project: https://github.com/SparklyPower/SparklyPaper
|
|
|
|
This patch provides an API for performance monitoring plugins.
|
|
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index a17790d2da3008927b79814629e073b2091ce421..01feb47feaa977647d1b6cbf0e10589148f61414 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -2894,4 +2894,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
@Deprecated
|
|
void clearBlockHighlights();
|
|
// Purpur end - Debug Marker API
|
|
+
|
|
+ // DivineMC start - Parallel world ticking
|
|
+ /**
|
|
+ * Returns whether the software has the Parallel World Ticking feature enabled
|
|
+ *
|
|
+ * @return If the Parallel World Ticking feature is enabled
|
|
+ */
|
|
+ public default boolean isParallelWorldTickingEnabled() {
|
|
+ return false;
|
|
+ }
|
|
+ // DivineMC end - Parallel world ticking
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
|
index 07390a45222a593768d1338b4739131e915869a5..84afc14168351cf8f5c9ca3b32f7885b3c2a2522 100644
|
|
--- a/src/main/java/org/bukkit/World.java
|
|
+++ b/src/main/java/org/bukkit/World.java
|
|
@@ -4739,4 +4739,23 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ // DivineMC start - Parallel world ticking
|
|
+ /**
|
|
+ * Get a sample of the world last tick times (in nanos)
|
|
+ *
|
|
+ * @return A sample of the world last tick times (in nanos)
|
|
+ */
|
|
+ public default long @NotNull [] getTickTimes() {
|
|
+ return new long[0];
|
|
+ }
|
|
+ /**
|
|
+ * Get the world's average tick time (in millis)
|
|
+ *
|
|
+ * @return World's local average tick time (in millis)
|
|
+ */
|
|
+ public default double getAverageTickTime () {
|
|
+ return 0.0;
|
|
+ }
|
|
+ // DivineMC end - Parallel world ticking
|
|
}
|