mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 16:29:26 +00:00
Updated Upstream (Paper)
This commit is contained in:
@@ -2,7 +2,7 @@ group=org.galemc.gale
|
||||
version=1.21-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.21
|
||||
paperRef=a7f66333625febf891e5126bbd432707d38d1b1c
|
||||
paperRef=8b1d26df0b082ab830b00870894c8d5849c96a31
|
||||
|
||||
updatingMinecraft=true
|
||||
|
||||
|
||||
@@ -463,6 +463,25 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..2596e0ee4df5b96f181e28a742ef3459
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 68f60e77e0bfd42b6419491c1d59b6432974216b..1591b251f082eeeef6c86e3164570206ef82f6a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -966,7 +966,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
if (!isSameThread()) {
|
||||
- MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER)");
|
||||
+ // Gale start - branding changes
|
||||
+ /*
|
||||
+ We do not want people to report thread issues to Paper,
|
||||
+ but we do want people to report thread issues to Gale.
|
||||
+ */
|
||||
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER - If you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues)");
|
||||
+ // Gale end - branding changes
|
||||
while (this.getRunningThread().isAlive()) {
|
||||
this.getRunningThread().stop();
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
index bb1a60180e58c1333e7bb33e8acf1b0225eda8a8..4d037e899e0b5548be406ad55acd2062603b7da1 100644
|
||||
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
@@ -476,6 +495,25 @@ index bb1a60180e58c1333e7bb33e8acf1b0225eda8a8..4d037e899e0b5548be406ad55acd2062
|
||||
}
|
||||
DamageSource damageSource = this.cloneInstance();
|
||||
damageSource.customEventDamager = entity;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index 0615fd82b71efb9a397de01615050e6d906c2844..b797ca4b68d110bbf64eac4ae422a7bc8bce145a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -146,7 +146,13 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
// Paper start
|
||||
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
||||
- org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
|
||||
+ // Gale start - branding changes
|
||||
+ /*
|
||||
+ We do not want people to report thread issues to Paper,
|
||||
+ but we do want people to report thread issues to Gale.
|
||||
+ */
|
||||
+ org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER OR GALE - You may ask for help on Discord, but do not file an issue. These error messages can not be removed. - If you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues)");
|
||||
+ // Gale end - branding changes
|
||||
}
|
||||
|
||||
private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index e85b9bb3f9c225d289a4959921970b9963881199..79192e3a0f27d48f35c0378b58e587212ed2c305 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -490,7 +528,7 @@ index e85b9bb3f9c225d289a4959921970b9963881199..79192e3a0f27d48f35c0378b58e58721
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 5a04134973dd1db7f778a57ec5f185feec370990..84b7717bff0d8644a924955cfe5a82285109dff5 100644
|
||||
index d70c5546c8bd6f364fad9b24880b6867efdab644..4250752a95301271f09590f0140f821a0090811a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -504,7 +504,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -693,10 +731,10 @@ index 0000000000000000000000000000000000000000..3d674eca7d20202d8f811c5c3e3946a1
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index c68256c0c8e131497108f677c6b254c589ce67e2..8da63e1ff46ef2ec87080612510e43c10e5b372a 100644
|
||||
index e5e41dc2d4f7a8c3fea704212507ca0b951664db..ddfdd4db7643fddbc626a525923707d2be980005 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -80,14 +80,20 @@ public class WatchdogThread extends Thread
|
||||
@@ -83,14 +83,20 @@ public class WatchdogThread extends Thread
|
||||
if (isLongTimeout) {
|
||||
// Paper end
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
@@ -720,7 +758,7 @@ index c68256c0c8e131497108f677c6b254c589ce67e2..8da63e1ff46ef2ec87080612510e43c1
|
||||
//
|
||||
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
||||
{
|
||||
@@ -109,12 +115,18 @@ public class WatchdogThread extends Thread
|
||||
@@ -112,12 +118,18 @@ public class WatchdogThread extends Thread
|
||||
// Paper end
|
||||
} else
|
||||
{
|
||||
@@ -738,10 +776,10 @@ index c68256c0c8e131497108f677c6b254c589ce67e2..8da63e1ff46ef2ec87080612510e43c1
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
|
||||
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Gale!):" ); // Paper // Gale - branding changes
|
||||
ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper - rewrite chunk system
|
||||
ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(MinecraftServer.getServer(), isLongTimeout); // Paper - rewrite chunk system
|
||||
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
@@ -129,7 +141,13 @@ public class WatchdogThread extends Thread
|
||||
@@ -132,7 +144,13 @@ public class WatchdogThread extends Thread
|
||||
WatchdogThread.dumpThread( thread, log );
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -7,12 +7,12 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
|
||||
index f52e104b3e07825caf0d6d1bda2e45c8437d6e20..df73ba5fad91eada64cdb2425c0f788dbbd953b8 100644
|
||||
index c1c119e2e788d5963de3a74a6b9724c71a168a8a..08eda5032c8a822037ca3c68206a5a94cff5e352 100644
|
||||
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
|
||||
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
|
||||
@@ -52,7 +52,7 @@ public final class ChunkTaskScheduler {
|
||||
@@ -64,7 +64,7 @@ public final class ChunkTaskScheduler {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ChunkTaskScheduler.class);
|
||||
private static final Logger LOGGER = LogUtils.getClassLogger();
|
||||
|
||||
- static int newChunkSystemIOThreads;
|
||||
+ public static int newChunkSystemIOThreads; // Gale - metrics - chunk system IO threads - package-private -> public
|
||||
@@ -20,10 +20,10 @@ index f52e104b3e07825caf0d6d1bda2e45c8437d6e20..df73ba5fad91eada64cdb2425c0f788d
|
||||
static int newChunkSystemGenPopulationParallelism;
|
||||
static int newChunkSystemLoadParallelism;
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 6aaed8e8bf8c721fc834da5c76ac72a4c3e92458..2d5688979f269fa887448fe910ea87a87d93d1dd 100644
|
||||
index 4b002e8b75d117b726b0de274a76d3596fce015b..7e1405d5e2b847b28b07cb94fcbf5dec78706e34 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -588,7 +588,7 @@ public class Metrics {
|
||||
@@ -593,7 +593,7 @@ public class Metrics {
|
||||
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
||||
// Only start Metrics, if it's enabled in the config
|
||||
if (config.getBoolean("enabled", true)) {
|
||||
@@ -32,7 +32,7 @@ index 6aaed8e8bf8c721fc834da5c76ac72a4c3e92458..2d5688979f269fa887448fe910ea87a8
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
||||
String minecraftVersion = Bukkit.getVersion();
|
||||
@@ -598,20 +598,20 @@ public class Metrics {
|
||||
@@ -603,20 +603,20 @@ public class Metrics {
|
||||
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : "offline"));
|
||||
@@ -59,7 +59,7 @@ index 6aaed8e8bf8c721fc834da5c76ac72a4c3e92458..2d5688979f269fa887448fe910ea87a8
|
||||
entry.put(javaVersion, 1);
|
||||
|
||||
// http://openjdk.java.net/jeps/223
|
||||
@@ -640,7 +640,7 @@ public class Metrics {
|
||||
@@ -645,7 +645,7 @@ public class Metrics {
|
||||
}));
|
||||
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
@@ -68,7 +68,7 @@ index 6aaed8e8bf8c721fc834da5c76ac72a4c3e92458..2d5688979f269fa887448fe910ea87a8
|
||||
|
||||
// count legacy plugins
|
||||
int legacy = 0;
|
||||
@@ -651,7 +651,7 @@ public class Metrics {
|
||||
@@ -656,7 +656,7 @@ public class Metrics {
|
||||
}
|
||||
|
||||
// insert real value as lower dimension
|
||||
@@ -77,7 +77,7 @@ index 6aaed8e8bf8c721fc834da5c76ac72a4c3e92458..2d5688979f269fa887448fe910ea87a8
|
||||
entry.put(String.valueOf(legacy), 1);
|
||||
|
||||
// create buckets as higher dimension
|
||||
@@ -671,6 +671,253 @@ public class Metrics {
|
||||
@@ -676,6 +676,253 @@ public class Metrics {
|
||||
|
||||
return map;
|
||||
}));
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 2d5688979f269fa887448fe910ea87a87d93d1dd..16ecdf3c56809100032ca627a1769e4e8c452f08 100644
|
||||
index 7e1405d5e2b847b28b07cb94fcbf5dec78706e34..66477f772ffb9271cf647dfb7567d75c3d5145fb 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -918,6 +918,16 @@ public class Metrics {
|
||||
@@ -923,6 +923,16 @@ public class Metrics {
|
||||
}));
|
||||
// Gale end - metrics - runtime max memory
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ index 8f23276796037d048eb114952891a01a40971b3e..ac9ceb54b894119cb30a22d37e035e2c
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7e32eecacf6f5e832dbfd0455e4bab1302a33d46..c7bb2416529a96614cdaf8e86e0c37690e69102e 100644
|
||||
index 1591b251f082eeeef6c86e3164570206ef82f6a8..d62cb22bbc061f37a5d798c8e3a48e747971a6dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3,9 +3,6 @@ package net.minecraft.server;
|
||||
@@ -220,7 +220,7 @@ index 7e32eecacf6f5e832dbfd0455e4bab1302a33d46..c7bb2416529a96614cdaf8e86e0c3769
|
||||
public static long currentTickLong = 0L; // Paper - track current tick as a long
|
||||
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
@@ -430,6 +431,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -433,6 +434,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
// CraftBukkit end
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
|
||||
@@ -274,7 +274,7 @@ index 33e3815a0c979609d4c7ab83ad91e87ac07a556d..67d4a82f371a4772128cc2218fd0a18c
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 0761d5bc5f2813bb4a9f664ac7a05b9744d0a778..87ec971241047314e7d505fb6b35be4a456727de 100644
|
||||
index 7d82cc6b847124cf4225428ba310309544928148..ac703c9ef504779dffbd8d7e676dbb51fb94dd29 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -226,6 +226,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -289,7 +289,7 @@ index 0761d5bc5f2813bb4a9f664ac7a05b9744d0a778..87ec971241047314e7d505fb6b35be4a
|
||||
if (this.convertOldUsers()) {
|
||||
this.getProfileCache().save(false); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b81ac6db8ba1ee0722e9e85f8de8ef91169a3198..ba1cecad79de47c29f42cb786647668bae189f22 100644
|
||||
index 798016774df02c3f7ebf909c9cc125f8427a39be..11f0017a8557f7528e379285bbb55e37c533463f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -502,7 +502,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -302,7 +302,7 @@ index b81ac6db8ba1ee0722e9e85f8de8ef91169a3198..ba1cecad79de47c29f42cb786647668b
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 96ad3868a93964247790134fa5f4b18e5c07aea8..7d53bcbb62ed87d39dd1e47136343541cca2d547 100644
|
||||
index fee155c81df385faa474e3aec777a30375ecb07d..676969f0a0fe21dae1c30d63a8bb4b0e9b33d057 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -12,7 +12,6 @@ import java.util.function.Supplier;
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c7bb2416529a96614cdaf8e86e0c37690e69102e..fccf9d434f541ce07da19afed527e2fb6fa97c4d 100644
|
||||
index d62cb22bbc061f37a5d798c8e3a48e747971a6dd..d0f72610b6a9e3e308f83f64d3468e48c6efd641 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1471,7 +1471,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1529,7 +1529,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -19,7 +19,7 @@ index c7bb2416529a96614cdaf8e86e0c37690e69102e..fccf9d434f541ce07da19afed527e2fb
|
||||
long i = Util.getNanos();
|
||||
|
||||
// Paper start - move oversleep into full server tick
|
||||
@@ -1529,7 +1529,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1587,7 +1587,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.logTickMethodTime(i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
|
||||
@@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index eb488f598de412849ad6fd83161cfaebe043be14..d0327f3e230c6e79f74e51c926f089e55a01bf59 100644
|
||||
index 3e454515360c22a26c9329e4032d525579110d7e..05745c9d55cb36fb09eb06f9412bf935f59fc3d0 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -55,7 +55,6 @@ import net.minecraft.server.commands.CloneCommands;
|
||||
@@ -164,7 +164,7 @@ index e9775b4506909bee65a74964f0d5391a0513de1d..1c4dd8acdcd571aceffe4b78599ca2c7
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850f49633ca 100644
|
||||
index d0f72610b6a9e3e308f83f64d3468e48c6efd641..4307145528278b10efdc19d50b4814bc5218b4ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -103,18 +103,9 @@ import net.minecraft.util.datafix.DataFixers;
|
||||
@@ -201,7 +201,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
private ServerConnectionListener connection;
|
||||
public final ChunkProgressListenerFactory progressListenerFactory;
|
||||
@Nullable
|
||||
@@ -354,13 +337,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -357,13 +340,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
super("Server");
|
||||
SERVER = this; // Paper - better singleton
|
||||
@@ -215,9 +215,9 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
this.random = RandomSource.create();
|
||||
this.port = -1;
|
||||
this.levels = Maps.newLinkedHashMap();
|
||||
@@ -961,9 +937,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -984,9 +960,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
- if (this.metricsRecorder.isRecording()) {
|
||||
- this.cancelRecordingMetrics();
|
||||
@@ -225,7 +225,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -1195,16 +1168,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1241,16 +1214,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
boolean flag = i == 0L;
|
||||
|
||||
@@ -242,7 +242,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
this.tickServer(flag ? () -> {
|
||||
return false;
|
||||
} : this::haveTime);
|
||||
@@ -1215,7 +1181,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1261,7 +1227,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new RuntimeException("Chunk system crash propagated to tick()", crash);
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -250,7 +250,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
||||
this.startMeasuringTaskExecutionTime();
|
||||
@@ -1225,9 +1190,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1271,9 +1236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickRateManager.endTickWork();
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
this.isReady = true;
|
||||
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
||||
}
|
||||
@@ -1424,7 +1387,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1482,7 +1445,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
||||
@@ -268,7 +268,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
super.doRunTask(ticktask);
|
||||
}
|
||||
|
||||
@@ -1497,9 +1459,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1555,9 +1517,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.ticksUntilAutosave = this.autosavePeriod;
|
||||
// CraftBukkit end
|
||||
MinecraftServer.LOGGER.debug("Autosave started");
|
||||
@@ -278,7 +278,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
MinecraftServer.LOGGER.debug("Autosave finished");
|
||||
}
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
@@ -1513,7 +1473,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1571,7 +1531,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||
// Paper end - Server Tick Events
|
||||
@@ -286,7 +286,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
long j = Util.getNanos() - i;
|
||||
int k = this.tickCount % 100;
|
||||
|
||||
@@ -1527,7 +1486,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1585,7 +1544,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickTimes60s.add(this.tickCount, j);
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickMethodTime(i);
|
||||
@@ -294,7 +294,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTimingFullServerTick(); // Paper // Gale - final timings calls
|
||||
}
|
||||
@@ -1618,11 +1576,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1676,11 +1634,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
@@ -306,7 +306,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1663,21 +1619,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1721,21 +1677,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
|
||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
|
||||
|
||||
@@ -328,7 +328,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
try {
|
||||
worldserver.timings.doTick.startTiming(); // Spigot
|
||||
worldserver.tick(shouldKeepTicking);
|
||||
@@ -1694,17 +1641,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1747,17 +1694,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
||||
this.playerList.tick();
|
||||
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
||||
@@ -1712,15 +1655,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1765,15 +1708,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
GameTestTicker.SINGLETON.tick();
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1730,7 +1670,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1783,7 +1723,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.resumeFlushing();
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel world) {
|
||||
@@ -1738,7 +1677,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1791,7 +1730,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void forceTimeSynchronization() {
|
||||
@@ -378,7 +378,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1746,8 +1684,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1799,8 +1737,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.synchronizeTime(worldserver);
|
||||
}
|
||||
@@ -387,7 +387,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
}
|
||||
|
||||
public boolean isLevelEnabled(Level world) {
|
||||
@@ -2451,7 +2387,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2512,7 +2448,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -396,7 +396,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
}
|
||||
|
||||
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
||||
@@ -2689,53 +2625,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2757,53 +2693,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -450,7 +450,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
return this.storageSource.getLevelPath(worldSavePath);
|
||||
}
|
||||
@@ -2785,25 +2674,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2853,25 +2742,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.isSaving;
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ index fccf9d434f541ce07da19afed527e2fb6fa97c4d..d91e6fc1949778ddda073afeee9d1850
|
||||
public int getMaxChainedNeighborUpdates() {
|
||||
return 1000000;
|
||||
}
|
||||
@@ -2902,56 +2772,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2970,56 +2840,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@@ -597,10 +597,10 @@ index 9cd4f7c6910727c849ac7f5d675dc6105c4bbba2..f9f893a286147c9a8e49f78891381227
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index f5510ec3ecdb51ca33b4e91ffd164d62b4f7c5dd..d42d6237831d500d0686b58abc4750896a1985c8 100644
|
||||
index 831aaddd6d611a02d7066f002d0f1c8a46caffe6..e510366a69f44ea1772f5bbd1cf799d335b7b0da 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -862,12 +862,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -889,12 +889,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
return this.settings.getProperties().serverResourcePackInfo;
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ index f5510ec3ecdb51ca33b4e91ffd164d62b4f7c5dd..d42d6237831d500d0686b58abc475089
|
||||
public SampleLogger getTickTimeLogger() {
|
||||
return this.tickTimeLogger;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index df00ea382915480be1279a5347872cf7a1417341..a7142d9c7a1b739ada45f4d393fb970b1e21214f 100644
|
||||
index c96740a82eac9101f74edeb44edf4b64d1d633e0..57d46c0a1e85d82361e4694f50dfc02e6e687166 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -65,7 +65,6 @@ import net.minecraft.server.network.ServerPlayerConnection;
|
||||
@@ -625,7 +625,7 @@ index df00ea382915480be1279a5347872cf7a1417341..a7142d9c7a1b739ada45f4d393fb970b
|
||||
import net.minecraft.util.thread.BlockableEventLoop;
|
||||
import net.minecraft.util.thread.ProcessorHandle;
|
||||
import net.minecraft.util.thread.ProcessorMailbox;
|
||||
@@ -452,16 +451,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -425,16 +424,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
protected void tick(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -643,7 +643,7 @@ index df00ea382915480be1279a5347872cf7a1417341..a7142d9c7a1b739ada45f4d393fb970b
|
||||
|
||||
public boolean hasWork() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98d007df70 100644
|
||||
index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..de485dd53a200bb53f3ba697c4eca3a164452bfd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -22,7 +22,6 @@ import net.minecraft.network.protocol.Packet;
|
||||
@@ -654,7 +654,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
import net.minecraft.util.thread.BlockableEventLoop;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.ai.village.poi.PoiManager;
|
||||
@@ -453,19 +452,15 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -374,19 +373,15 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
// CraftBukkit start - modelled on below
|
||||
public void purgeUnload() {
|
||||
@@ -674,7 +674,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
this.level.timings.doChunkMap.startTiming(); // Spigot
|
||||
if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
|
||||
this.distanceManager.purgeStaleTickets();
|
||||
@@ -473,7 +468,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -394,7 +389,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
this.runDistanceManagerUpdates();
|
||||
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
||||
@@ -682,7 +682,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
if (tickChunks) {
|
||||
this.level.timings.chunks.startTiming(); // Paper - timings
|
||||
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
|
||||
@@ -483,10 +477,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -404,10 +398,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
|
||||
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
||||
@@ -693,7 +693,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
this.clearCache();
|
||||
}
|
||||
|
||||
@@ -496,10 +488,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -417,10 +409,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
this.lastInhabitedUpdate = i;
|
||||
if (!this.level.isDebug()) {
|
||||
@@ -704,7 +704,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
|
||||
Iterator iterator = this.chunkMap.getChunks().iterator();
|
||||
if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper
|
||||
@@ -514,7 +502,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -435,7 +423,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
|
||||
if (this.level.tickRateManager().runsNormally()) {
|
||||
@@ -712,7 +712,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
||||
// Paper start - Optional per player mob spawns
|
||||
@@ -543,7 +530,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -464,7 +451,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
|
||||
this.lastSpawnState = spawnercreature_d;
|
||||
@@ -720,7 +720,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
Util.shuffle(list, this.level.random);
|
||||
@@ -578,7 +564,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -499,7 +485,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
this.level.timings.chunkTicks.stopTiming(); // Paper
|
||||
|
||||
@@ -728,7 +728,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
if (flag) {
|
||||
try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings
|
||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||
@@ -586,14 +571,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -507,14 +492,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
}
|
||||
|
||||
@@ -743,7 +743,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
}
|
||||
}
|
||||
|
||||
@@ -774,7 +756,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -695,7 +677,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
@Override
|
||||
protected void doRunTask(Runnable task) {
|
||||
@@ -752,7 +752,7 @@ index 681fdab250d924a29ca160acffbcbf7f8a3ca78a..b5c302abb343a34f8f160454eacd8c98
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ba1cecad79de47c29f42cb786647668bae189f22..5b29319f59f07c422f9df09af347e57d65c3fba0 100644
|
||||
index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c869fc0fa90 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -80,7 +80,6 @@ import net.minecraft.util.ProgressListener;
|
||||
@@ -1128,7 +1128,7 @@ index 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..6b3c57fc1231cd37e17a58137bb78411
|
||||
|
||||
protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 437956b18d5bffd93c46e0be34cf413e9c704e5a..ae2dac2ba1732164b4e1f41c5b60f42a1b13de3e 100644
|
||||
index 437956b18d5bffd93c46e0be34cf413e9c704e5a..314935f9021e1471726728b31039a60b2369c051 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -837,7 +837,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1156,7 +1156,15 @@ index 437956b18d5bffd93c46e0be34cf413e9c704e5a..ae2dac2ba1732164b4e1f41c5b60f42a
|
||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
||||
movement = movement.multiply(this.stuckSpeedMultiplier);
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
@@ -1110,8 +1106,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1089,7 +1085,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Paper start - ignore movement changes while inactive.
|
||||
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||
setDeltaMovement(Vec3.ZERO);
|
||||
- this.level.getProfiler().pop();
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -1110,8 +1105,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
||||
}
|
||||
|
||||
@@ -1165,7 +1173,7 @@ index 437956b18d5bffd93c46e0be34cf413e9c704e5a..ae2dac2ba1732164b4e1f41c5b60f42a
|
||||
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
||||
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
||||
|
||||
@@ -1129,9 +1123,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1129,9 +1122,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
BlockState iblockdata = this.level().getBlockState(blockposition);
|
||||
|
||||
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
|
||||
@@ -1176,7 +1184,7 @@ index 437956b18d5bffd93c46e0be34cf413e9c704e5a..ae2dac2ba1732164b4e1f41c5b60f42a
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
|
||||
@@ -1232,8 +1224,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1232,8 +1223,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (this.isOnFire() && (this.isInPowderSnow || this.isInWaterRainOrBubble())) {
|
||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||
}
|
||||
@@ -1185,6 +1193,38 @@ index 437956b18d5bffd93c46e0be34cf413e9c704e5a..ae2dac2ba1732164b4e1f41c5b60f42a
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3102,7 +3091,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.processPortalCooldown();
|
||||
if (this.portalProcess != null) {
|
||||
if (this.portalProcess.processPortalTeleportation(worldserver, this, this.canUsePortal(false))) {
|
||||
- worldserver.getProfiler().push("portal");
|
||||
this.setPortalCooldown();
|
||||
DimensionTransition dimensiontransition = this.portalProcess.getPortalDestination(worldserver, this);
|
||||
|
||||
@@ -3114,7 +3102,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
- worldserver.getProfiler().pop();
|
||||
} else if (this.portalProcess.hasExpired()) {
|
||||
this.portalProcess = null;
|
||||
}
|
||||
@@ -3615,7 +3602,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
- worldserver.getProfiler().push("changeDimension");
|
||||
Entity entity2 = worldserver1.dimension() == worldserver.dimension() ? this : this.getType().create(worldserver1);
|
||||
|
||||
if (entity2 != null) {
|
||||
@@ -3651,7 +3637,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
teleportTarget.postDimensionTransition().onTransition(entity2);
|
||||
}
|
||||
|
||||
- worldserver.getProfiler().pop();
|
||||
return entity2;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6d0379662 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1737,7 +1777,7 @@ index bff83fe413c7baef4ba56a3270ea4463a58c792f..807964a19ac15717715c9a92aeefadbe
|
||||
|
||||
if (this.fire) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 7d53bcbb62ed87d39dd1e47136343541cca2d547..d7a638680fa349caba43f07ab9e6e4fa7303fb48 100644
|
||||
index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157a4cc8cbf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -132,7 +132,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1781,7 +1821,7 @@ index 7d53bcbb62ed87d39dd1e47136343541cca2d547..d7a638680fa349caba43f07ab9e6e4fa
|
||||
this.levelData = worlddatamutable;
|
||||
this.dimensionTypeRegistration = holder;
|
||||
final DimensionType dimensionmanager = (DimensionType) holder.value();
|
||||
@@ -943,9 +939,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -941,9 +937,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
}
|
||||
|
||||
protected void tickBlockEntities() {
|
||||
@@ -1791,7 +1831,7 @@ index 7d53bcbb62ed87d39dd1e47136343541cca2d547..d7a638680fa349caba43f07ab9e6e4fa
|
||||
this.timings.tileEntityPending.startTiming(); // Spigot
|
||||
this.tickingBlockEntities = true;
|
||||
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
||||
@@ -981,7 +974,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -979,7 +972,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
this.timings.tileEntityTick.stopTiming(); // Spigot
|
||||
this.tickingBlockEntities = false;
|
||||
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
|
||||
@@ -1799,7 +1839,7 @@ index 7d53bcbb62ed87d39dd1e47136343541cca2d547..d7a638680fa349caba43f07ab9e6e4fa
|
||||
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||
}
|
||||
|
||||
@@ -1184,7 +1176,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1183,7 +1175,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||
@@ -1807,7 +1847,7 @@ index 7d53bcbb62ed87d39dd1e47136343541cca2d547..d7a638680fa349caba43f07ab9e6e4fa
|
||||
// Paper start - rewrite chunk system
|
||||
final List<Entity> ret = new java.util.ArrayList<>();
|
||||
|
||||
@@ -1210,8 +1201,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1209,8 +1200,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest,
|
||||
final AABB boundingBox, final Predicate<? super T> predicate,
|
||||
final List<? super T> into, final int maxCount) {
|
||||
@@ -1816,7 +1856,7 @@ index 7d53bcbb62ed87d39dd1e47136343541cca2d547..d7a638680fa349caba43f07ab9e6e4fa
|
||||
if (entityTypeTest instanceof net.minecraft.world.entity.EntityType<T> byType) {
|
||||
if (maxCount != Integer.MAX_VALUE) {
|
||||
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getEntities(byType, boundingBox, into, predicate, maxCount);
|
||||
@@ -1505,11 +1494,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1504,11 +1493,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -1872,7 +1912,7 @@ index c5454b92ca2565461c799d7340160f9fb72c1b0f..a1a4b99167919bedb8a45c3b81889f58
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index d869607853ad27032df072c1f1d74a74e4911baf..715a39cf1d075e0ef7f32c9066714a21b46f64b0 100644
|
||||
index d388fbcbff63928f0e9140c02400a63ba8f19d9c..5752576087e5ff411ff8c89fde7a761083945c23 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -25,7 +25,6 @@ import net.minecraft.network.FriendlyByteBuf;
|
||||
@@ -1883,7 +1923,7 @@ index d869607853ad27032df072c1f1d74a74e4911baf..715a39cf1d075e0ef7f32c9066714a21
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -447,13 +446,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -348,13 +347,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
}
|
||||
|
||||
if (LightEngine.hasDifferentLightProperties(this, blockposition, iblockdata1, iblockdata)) {
|
||||
@@ -1897,7 +1937,7 @@ index d869607853ad27032df072c1f1d74a74e4911baf..715a39cf1d075e0ef7f32c9066714a21
|
||||
}
|
||||
|
||||
boolean flag3 = iblockdata1.hasBlockEntity();
|
||||
@@ -1106,9 +1100,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -985,9 +979,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
|
||||
if (LevelChunk.this.isTicking(blockposition)) {
|
||||
try {
|
||||
@@ -1907,15 +1947,15 @@ index d869607853ad27032df072c1f1d74a74e4911baf..715a39cf1d075e0ef7f32c9066714a21
|
||||
this.blockEntity.tickTimer.startTiming(); // Spigot
|
||||
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
||||
|
||||
@@ -1124,8 +1115,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -1003,8 +994,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
}
|
||||
// Paper end - Remove the Block Entity if it's invalid
|
||||
}
|
||||
-
|
||||
- gameprofilerfiller.pop();
|
||||
} catch (Throwable throwable) {
|
||||
if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||
// Paper start - Prevent block entity and entity crashes
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
index 18bbb3f8f99849333ff4bc020c8ce758a69312a5..f890c27c960b6511b7961f380b23e9ca8f86ba0e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index a7142d9c7a1b739ada45f4d393fb970b1e21214f..aa6927ad7ea10b64693a069202366a051183e878 100644
|
||||
index 57d46c0a1e85d82361e4694f50dfc02e6e687166..5906faeaf30dddaeb96b8f71662d3e0f6c49194b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1221,8 +1221,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1194,8 +1194,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return ChunkMap.this.level.getServer().getScaledTrackingDistance(initialDistance);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ index a7142d9c7a1b739ada45f4d393fb970b1e21214f..aa6927ad7ea10b64693a069202366a05
|
||||
Iterator iterator = this.entity.getIndirectPassengers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1234,6 +1256,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1207,6 +1229,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
i = j;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 07a3f5bc00fdb932831b579f4a189eddefe328f8..6fd31b9566d6583ed30a73a6a36bf19b7fa64a60 100644
|
||||
index a69ee192c5cc3fa8b6cea567a956f919007dbd98..6b26fee2ad64bb9d500df8f53ab3d53037a7f779 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4275,16 +4275,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4270,16 +4270,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||
@@ -60,7 +60,7 @@ index 07a3f5bc00fdb932831b579f4a189eddefe328f8..6fd31b9566d6583ed30a73a6a36bf19b
|
||||
double d1 = 0.0D;
|
||||
boolean flag = this.isPushedByFluid();
|
||||
boolean flag1 = false;
|
||||
@@ -4292,14 +4294,61 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4287,14 +4289,61 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
int k1 = 0;
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
|
||||
@@ -128,7 +128,7 @@ index 07a3f5bc00fdb932831b579f4a189eddefe328f8..6fd31b9566d6583ed30a73a6a36bf19b
|
||||
|
||||
if (d2 >= axisalignedbb.minY) {
|
||||
flag1 = true;
|
||||
@@ -4321,9 +4370,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4316,9 +4365,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ index 8f97350aac2f19a0d19e35630261dacc7b46ce52..13d1908b378e5311d8bb7f9317b4b1c2
|
||||
doFirst {
|
||||
workingDir.mkdirs()
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 16ecdf3c56809100032ca627a1769e4e8c452f08..f921771c0aeba72f3f208703dbf300e8748ded17 100644
|
||||
index 66477f772ffb9271cf647dfb7567d75c3d5145fb..13a51c939b8bd17584a474217823150688af809f 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -928,6 +928,46 @@ public class Metrics {
|
||||
@@ -933,6 +933,46 @@ public class Metrics {
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("gale_semantic_version", () -> semanticVersionMap));
|
||||
// Gale end - semantic version - include in metrics
|
||||
|
||||
@@ -84,7 +84,7 @@ index 16ecdf3c56809100032ca627a1769e4e8c452f08..f921771c0aeba72f3f208703dbf300e8
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index d42d6237831d500d0686b58abc4750896a1985c8..4fbdd8b1ead384762164c2d13180bfa230c40262 100644
|
||||
index e510366a69f44ea1772f5bbd1cf799d335b7b0da..91105ac1d3cbc8c0169540996edebd5e6e72bc82 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -20,6 +20,8 @@ import java.util.Locale;
|
||||
|
||||
@@ -19,10 +19,10 @@ the displayed hunger bar never goes down. Hunger (or any related value, includin
|
||||
should not go down on peaceful. See https://bugs.mojang.com/browse/MC-31819.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 0526f4c701b4d945f26c5f382e9efac86cc568fa..e513e17f460927fcffd029bb3b3357ca85aa514d 100644
|
||||
index 3f397423f023deaf4d8545201088b23ee3cc1cdd..839f0b57db88ab7a6d6882f1fbedc1007bc95a63 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1908,6 +1908,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1907,6 +1907,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 251ff6f9a347cba08f06f37e2680551d420bb08d..ba0e7bc1dd98ea632ab80091acb900b862186dad 100644
|
||||
index c49e50a2ba51159c0f4651b0368c52200d144e47..a82b5ad8031becc63316288b840caf857201c554 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -314,7 +314,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -25,7 +25,7 @@ index 251ff6f9a347cba08f06f37e2680551d420bb08d..ba0e7bc1dd98ea632ab80091acb900b8
|
||||
public BlockPos blockPosition; // Gale - Pufferfish - optimize entity coordinate key - private -> public
|
||||
private ChunkPos chunkPosition;
|
||||
private Vec3 deltaMovement;
|
||||
@@ -1958,9 +1958,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1957,9 +1957,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 215a193baf6a54b307c94c9ffa912430db6a2cf5..95e06a768d264701e5522d389a8c8fa20c68fa63 100644
|
||||
index a82b5ad8031becc63316288b840caf857201c554..243d52e75cb4f1bd5a11382f8c79db29b145dfbf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -323,6 +323,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -36,7 +36,7 @@ index 215a193baf6a54b307c94c9ffa912430db6a2cf5..95e06a768d264701e5522d389a8c8fa2
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
@@ -3974,6 +3980,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3969,6 +3975,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB boundingBox) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index aa6927ad7ea10b64693a069202366a051183e878..b8bcba9380cbcc08ac7ebed170c58b091691777e 100644
|
||||
index 5906faeaf30dddaeb96b8f71662d3e0f6c49194b..79057c2db0e6163f2d5466f50716a4ce230bfdf2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -228,7 +228,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -203,7 +203,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.toDrop = new LongOpenHashSet();
|
||||
this.tickingGenerated = new AtomicInteger();
|
||||
this.playerMap = new PlayerMap();
|
||||
|
||||
@@ -37,13 +37,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index d0327f3e230c6e79f74e51c926f089e55a01bf59..7b9ee0e0316279a74ef15317450446550e0a50a4 100644
|
||||
index 05745c9d55cb36fb09eb06f9412bf935f59fc3d0..fd621d311c5ac438e63a6f1d58073a53f9710e11 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -511,6 +511,7 @@ public class Commands {
|
||||
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
|
||||
// Paper end - Perf: Async command map building
|
||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper - Brigadier API
|
||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, true).callEvent(); // Paper - Brigadier API
|
||||
+ if (PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Gale - Purpur - skip PlayerCommandSendEvent if there are no listeners
|
||||
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a315310adcb46dd9daa7dfbeefb766099ad50d74..1c28613061146757f07f84f7df37e4cdf3583f4e 100644
|
||||
index 37f4f80003e2355226231265b6b7b82f7ce4d27e..ae75ebbfaede1c6022c9abe2887706501b22b6f8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3849,7 +3849,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3844,7 +3844,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
if (entity == null) {
|
||||
return false;
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1c28613061146757f07f84f7df37e4cdf3583f4e..2f11a6e09fa42470d2b4c995b5282bb306a3ba87 100644
|
||||
index ae75ebbfaede1c6022c9abe2887706501b22b6f8..ec4ff1b6fe1f73cf3fe2c19aba7500c6b6a2e97c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4497,6 +4497,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4492,6 +4492,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.inBlockState;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index b5c302abb343a34f8f160454eacd8c98d007df70..d619e2230ec6334eaf86e55cb4bf630961369e13 100644
|
||||
index de485dd53a200bb53f3ba697c4eca3a164452bfd..8367edebdfa2f022bcda1ec2b0e7881285d8bb9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -502,11 +502,16 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -423,11 +423,16 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
|
||||
if (this.level.tickRateManager().runsNormally()) {
|
||||
@@ -34,7 +34,7 @@ index b5c302abb343a34f8f160454eacd8c98d007df70..d619e2230ec6334eaf86e55cb4bf6309
|
||||
if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled
|
||||
// re-set mob counts
|
||||
for (ServerPlayer player : this.level.players) {
|
||||
@@ -530,7 +535,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -451,7 +456,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
|
||||
this.lastSpawnState = spawnercreature_d;
|
||||
@@ -47,7 +47,7 @@ index b5c302abb343a34f8f160454eacd8c98d007df70..d619e2230ec6334eaf86e55cb4bf6309
|
||||
|
||||
Util.shuffle(list, this.level.random);
|
||||
// Paper start - PlayerNaturallySpawnCreaturesEvent
|
||||
@@ -553,7 +562,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -474,7 +483,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
if (this.level.isNaturalSpawningAllowed(chunkcoordintpair) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair)) {
|
||||
chunk1.incrementInhabitedTime(j);
|
||||
@@ -56,7 +56,7 @@ index b5c302abb343a34f8f160454eacd8c98d007df70..d619e2230ec6334eaf86e55cb4bf6309
|
||||
NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1);
|
||||
}
|
||||
|
||||
@@ -579,6 +588,20 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -500,6 +509,20 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@ index 039a86034928a5eb7aaa2d7ca76a7bddcca346bd..7c32c60100cf2bd109eb8762efa856c1
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d91e6fc1949778ddda073afeee9d1850f49633ca..5415cc96c9acba64b1f26b76726226fb2756c908 100644
|
||||
index 4307145528278b10efdc19d50b4814bc5218b4ff..f8909886e6c1e4c64fd674b8a19b0cc6242160cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1052,6 +1052,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1085,6 +1085,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
||||
private long lastTick = 0;
|
||||
private long catchupTime = 0;
|
||||
@@ -70,7 +70,7 @@ index d91e6fc1949778ddda073afeee9d1850f49633ca..5415cc96c9acba64b1f26b76726226fb
|
||||
public final RollingAverage tps1 = new RollingAverage(60);
|
||||
public final RollingAverage tps5 = new RollingAverage(60 * 5);
|
||||
public final RollingAverage tps15 = new RollingAverage(60 * 15);
|
||||
@@ -1153,6 +1154,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1199,6 +1200,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
|
||||
final long diff = currentTime - tickSection;
|
||||
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
||||
|
||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5415cc96c9acba64b1f26b76726226fb2756c908..0a2100378080d6ec76522428b354b4fa47cdff7a 100644
|
||||
index f8909886e6c1e4c64fd674b8a19b0cc6242160cb..5b2f18705b1b1da5c431b9061d5e5da5deab1589 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1100,6 +1100,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1133,6 +1133,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end
|
||||
// Spigot End
|
||||
|
||||
@@ -37,8 +37,8 @@ index 5415cc96c9acba64b1f26b76726226fb2756c908..0a2100378080d6ec76522428b354b4fa
|
||||
+
|
||||
protected void runServer() {
|
||||
try {
|
||||
if (!this.initServer()) {
|
||||
@@ -1173,9 +1178,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long serverStartTime = Util.getNanos(); // Paper
|
||||
@@ -1219,9 +1224,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||
lastTick = currentTime;
|
||||
this.nextTickTimeNanos += i;
|
||||
@@ -50,7 +50,7 @@ index 5415cc96c9acba64b1f26b76726226fb2756c908..0a2100378080d6ec76522428b354b4fa
|
||||
// Paper start - rewrite chunk system
|
||||
final Throwable crash = this.chunkSystemCrash;
|
||||
if (crash != null) {
|
||||
@@ -1333,9 +1340,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1385,9 +1392,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
protected void waitUntilNextTick() {
|
||||
//this.executeAll(); // Paper - move this into the tick method for timings
|
||||
|
||||
@@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 36190c0b1417c943e9763db96d3a7c72f02dd149..9190b26c81c1060b7c3a71b1e584b8f9b8e79852 100644
|
||||
index ec4ff1b6fe1f73cf3fe2c19aba7500c6b6a2e97c..949984e54914fb90f10eb41c405f7ddcd430c4db 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2085,8 +2085,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2084,8 +2084,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void playerTouch(Player player) {}
|
||||
|
||||
public void push(Entity entity) {
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 9190b26c81c1060b7c3a71b1e584b8f9b8e79852..28782b46cef81a0ee049be902ca60ddb9fd5d852 100644
|
||||
index 949984e54914fb90f10eb41c405f7ddcd430c4db..1a4c212ec1aabd8d9b9f9a7e30d40aa2fbdc060b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1219,9 +1219,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1218,9 +1218,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
this.tryCheckInsideBlocks();
|
||||
|
||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0a2100378080d6ec76522428b354b4fa47cdff7a..4b3a689042ed0244c85d84beb21feb00ab13265a 100644
|
||||
index 5b2f18705b1b1da5c431b9061d5e5da5deab1589..25d1b4512f81802c658a5e0a03c8212ad69ac04e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -191,6 +191,8 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@@ -19,7 +19,7 @@ index 0a2100378080d6ec76522428b354b4fa47cdff7a..4b3a689042ed0244c85d84beb21feb00
|
||||
private static MinecraftServer SERVER; // Paper
|
||||
public static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
|
||||
@@ -321,6 +323,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -324,6 +326,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
||||
|
||||
atomicreference.set(s0);
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index f921771c0aeba72f3f208703dbf300e8748ded17..43913931fb17f5a98391e4a6e797a7cb46d58977 100644
|
||||
index 13a51c939b8bd17584a474217823150688af809f..ac23c85f17e0a5cd9702888a873cc470428b3e34 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -968,6 +968,22 @@ public class Metrics {
|
||||
@@ -973,6 +973,22 @@ public class Metrics {
|
||||
}));
|
||||
// Gale end - SIMD support - include in metrics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user