9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-19 15:09:27 +00:00

Update to Paper 1.21.6

This commit is contained in:
MrPowerGamerBR
2025-06-17 13:53:50 -03:00
parent f0e837bd2b
commit 682ec2f942
12 changed files with 121 additions and 122 deletions

View File

@@ -1,14 +1,14 @@
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -302,6 +_,7 @@
@@ -303,6 +_,7 @@
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
+ public final Set<net.minecraft.world.entity.Entity> entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // SparklyPaper - skip EntityScheduler's executeTick checks if there isn't any tasks to be run (concurrent because plugins may schedule tasks async)
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
AtomicReference<S> atomicReference = new AtomicReference<>();
@@ -1657,6 +_,18 @@
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
@@ -1659,6 +_,18 @@
this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
// Paper start - Folia scheduler API
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) org.bukkit.Bukkit.getGlobalRegionScheduler()).tick();
@@ -27,7 +27,7 @@
getAllLevels().forEach(level -> {
for (final net.minecraft.world.entity.Entity entity : level.getEntities().getAll()) {
if (entity.isRemoved()) {
@@ -1668,6 +_,8 @@
@@ -1670,6 +_,8 @@
}
}
});
@@ -36,7 +36,7 @@
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
profilerFiller.push("commandFunctions");
@@ -1719,7 +_,16 @@
@@ -1721,7 +_,16 @@
profilerFiller.push("tick");
try {