diff --git a/patches/server/0004-Pufferfish-Utils.patch b/patches/server/0004-Pufferfish-Utils.patch index 1f0aacec..82a7197b 100644 --- a/patches/server/0004-Pufferfish-Utils.patch +++ b/patches/server/0004-Pufferfish-Utils.patch @@ -29,3 +29,156 @@ index 0000000000000000000000000000000000000000..53aab67aea0a28c004c6106aa775443c + setLevel(Level.ALL); + } +} +diff --git a/src/main/java/gg/pufferfish/pufferfish/util/AsyncExecutor.java b/src/main/java/gg/pufferfish/pufferfish/util/AsyncExecutor.java +new file mode 100644 +index 0000000000000000000000000000000000000000..a62d22dc4ae2cc82cf6763e8b0ce6d4611782a57 +--- /dev/null ++++ b/src/main/java/gg/pufferfish/pufferfish/util/AsyncExecutor.java +@@ -0,0 +1,73 @@ ++package gg.pufferfish.pufferfish.util; ++ ++import com.google.common.collect.Queues; ++import gg.pufferfish.pufferfish.PufferfishLogger; ++ ++import java.util.Queue; ++import java.util.concurrent.locks.Condition; ++import java.util.concurrent.locks.Lock; ++import java.util.concurrent.locks.ReentrantLock; ++import java.util.logging.Level; ++ ++public class AsyncExecutor implements Runnable { ++ ++ private final Queue jobs = Queues.newArrayDeque(); ++ private final Lock mutex = new ReentrantLock(); ++ private final Condition cond = mutex.newCondition(); ++ private final Thread thread; ++ private volatile boolean killswitch = false; ++ ++ public AsyncExecutor(String threadName) { ++ this.thread = new Thread(this, threadName); ++ } ++ ++ public void start() { ++ thread.start(); ++ } ++ ++ public void kill() { ++ killswitch = true; ++ cond.signalAll(); ++ } ++ ++ public void submit(Runnable runnable) { ++ mutex.lock(); ++ try { ++ jobs.offer(runnable); ++ cond.signalAll(); ++ } finally { ++ mutex.unlock(); ++ } ++ } ++ ++ @Override ++ public void run() { ++ while (!killswitch) { ++ try { ++ Runnable runnable = takeRunnable(); ++ if (runnable != null) { ++ runnable.run(); ++ } ++ } catch (InterruptedException e) { ++ Thread.currentThread().interrupt(); ++ } catch (Exception e) { ++ PufferfishLogger.LOGGER.log(Level.SEVERE, e, () -> "Failed to execute async job for thread " + thread.getName()); ++ } ++ } ++ } ++ ++ private Runnable takeRunnable() throws InterruptedException { ++ mutex.lock(); ++ try { ++ while (jobs.isEmpty() && !killswitch) { ++ cond.await(); ++ } ++ ++ if (jobs.isEmpty()) return null; // We've set killswitch ++ ++ return jobs.remove(); ++ } finally { ++ mutex.unlock(); ++ } ++ } ++} +diff --git a/src/main/java/gg/pufferfish/pufferfish/util/IterableWrapper.java b/src/main/java/gg/pufferfish/pufferfish/util/IterableWrapper.java +new file mode 100644 +index 0000000000000000000000000000000000000000..8b4a51ae41e99d41a1095333c2036efcc9a38973 +--- /dev/null ++++ b/src/main/java/gg/pufferfish/pufferfish/util/IterableWrapper.java +@@ -0,0 +1,20 @@ ++package gg.pufferfish.pufferfish.util; ++ ++import java.util.Iterator; ++ ++import org.jetbrains.annotations.NotNull; ++ ++public class IterableWrapper implements Iterable { ++ ++ private final Iterator iterator; ++ ++ public IterableWrapper(Iterator iterator) { ++ this.iterator = iterator; ++ } ++ ++ @NotNull ++ @Override ++ public Iterator iterator() { ++ return iterator; ++ } ++} +diff --git a/src/main/java/gg/pufferfish/pufferfish/util/Long2ObjectOpenHashMapWrapper.java b/src/main/java/gg/pufferfish/pufferfish/util/Long2ObjectOpenHashMapWrapper.java +new file mode 100644 +index 0000000000000000000000000000000000000000..5578acce073cea8a60619e634b3862624c8a1ae8 +--- /dev/null ++++ b/src/main/java/gg/pufferfish/pufferfish/util/Long2ObjectOpenHashMapWrapper.java +@@ -0,0 +1,42 @@ ++package gg.pufferfish.pufferfish.util; ++ ++import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; ++ ++import java.util.Map; ++ ++import org.jetbrains.annotations.Nullable; ++ ++public class Long2ObjectOpenHashMapWrapper extends Long2ObjectOpenHashMap { ++ ++ private final Map backingMap; ++ ++ public Long2ObjectOpenHashMapWrapper(Map map) { ++ backingMap = map; ++ } ++ ++ @Override ++ public V put(Long key, V value) { ++ return backingMap.put(key, value); ++ } ++ ++ @Override ++ public V get(Object key) { ++ return backingMap.get(key); ++ } ++ ++ @Override ++ public V remove(Object key) { ++ return backingMap.remove(key); ++ } ++ ++ @Nullable ++ @Override ++ public V putIfAbsent(Long key, V value) { ++ return backingMap.putIfAbsent(key, value); ++ } ++ ++ @Override ++ public int size() { ++ return backingMap.size(); ++ } ++} diff --git a/patches/work/server/0007-Pufferfish-Optimize-mob-spawning.patch b/patches/server/0007-Pufferfish-Optimize-mob-spawning.patch similarity index 63% rename from patches/work/server/0007-Pufferfish-Optimize-mob-spawning.patch rename to patches/server/0007-Pufferfish-Optimize-mob-spawning.patch index 1f870a36..8ff48796 100644 --- a/patches/work/server/0007-Pufferfish-Optimize-mob-spawning.patch +++ b/patches/server/0007-Pufferfish-Optimize-mob-spawning.patch @@ -20,10 +20,10 @@ and, in my opinion, worth the low risk of minor mob-spawning-related inconsistencies. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 17af0e5be9245573bfcd2ead2be3b6434cd8f576..a976002437a5d9c761835691213e11b14d9a7d45 100644 +index 333beb88e048daaaf44e67984bb17d5201a9ab21..798e6473e33819d6c7a39e25dace3fc241571b0a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -303,6 +303,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); - Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system + Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> { // Paper - rewrite chunk system diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 8c74652ffa2c1263c835381bc27ffdc6d272dbf7..05e214ca14240ba635927c9f2a71d19ba1e9aa45 100644 +index 42ac2efb4c84c5f15c10934f928183962f179626..944ada1e0f4e4a8460ec3c8e1d9a0de7469d395b 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -364,6 +364,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -373,6 +373,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface DedicatedServer.LOGGER.info("JMX monitoring enabled"); } @@ -44,26 +44,13 @@ index 8c74652ffa2c1263c835381bc27ffdc6d272dbf7..05e214ca14240ba635927c9f2a71d19b return true; } } -diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 7bac7112b520286ebe9e8d36dc0932900e76eb52..54c3e32c7ae869d55408d77ea2aa1635f980a39b 100644 ---- a/src/main/java/net/minecraft/server/level/ChunkMap.java -+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -246,7 +246,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - // Paper end - // Paper start - optimise chunk tick iteration - public final it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet needsChangeBroadcasting = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<>(); -- public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); -+ public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap = new gg.pufferfish.pufferfish.util.AsyncPlayerAreaMap(this.pooledLinkedPlayerHashSets); // Pufferfish - // Paper end - optimise chunk tick iteration - - public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 94689992b4d159ab996e00ae20afa8fef0e84db2..af4fe64e190e73dcc5f2495d0b533547d8f57f1d 100644 +index d2750fb7efbe8c1c77d4cb57f6ceec4fd968e326..a3283d6bd8654ef580274f83c7defcccba4240bb 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -74,6 +74,9 @@ public class ServerChunkCache extends ChunkSource { - private final LevelChunk[] lastLoadedChunks = new LevelChunk[4 * 4]; - // Paper end +@@ -127,6 +127,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon + // Paper end - rewrite chunk system + private ServerChunkCache.ChunkAndHolder[] iterationCopy; // Paper - chunk tick iteration optimisations + public boolean firstRunSpawnCounts = true; // Pufferfish + public final java.util.concurrent.atomic.AtomicBoolean _pufferfish_spawnCountsReady = new java.util.concurrent.atomic.AtomicBoolean(false); // Pufferfish - optimize countmobs @@ -71,7 +58,7 @@ index 94689992b4d159ab996e00ae20afa8fef0e84db2..af4fe64e190e73dcc5f2495d0b533547 public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory) { this.level = world; this.mainThreadProcessor = new ServerChunkCache.MainThreadExecutor(world); -@@ -508,6 +511,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -452,6 +455,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon // Paper start - Optional per player mob spawns int naturalSpawnChunkCount = k; if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled @@ -79,7 +66,7 @@ index 94689992b4d159ab996e00ae20afa8fef0e84db2..af4fe64e190e73dcc5f2495d0b533547 // re-set mob counts for (ServerPlayer player : this.level.players) { // Paper start - per player mob spawning backoff -@@ -522,14 +526,18 @@ public class ServerChunkCache extends ChunkSource { +@@ -466,14 +470,18 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } // Paper end - per player mob spawning backoff } @@ -101,20 +88,20 @@ index 94689992b4d159ab996e00ae20afa8fef0e84db2..af4fe64e190e73dcc5f2495d0b533547 // Gale start - MultiPaper - skip unnecessary mob spawning computations } else { spawnercreature_d = null; -@@ -622,8 +630,8 @@ public class ServerChunkCache extends ChunkSource { - if (tick && chunk1.chunkStatus.isOrAfter(net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING)) { - // Paper end - optimise chunk tick iteration +@@ -501,8 +509,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon + + if (true && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair)) { // Paper - rewrite chunk system chunk1.incrementInhabitedTime(j); -- if (spawn && flagAndHasNaturalSpawn && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration // Gale - MultiPaper - skip unnecessary mob spawning computations +- if (flagAndHasNaturalSpawn && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair, true)) { // Spigot // Gale - MultiPaper - skip unnecessary mob spawning computations - NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1); -+ if (spawn && flagAndHasNaturalSpawn && (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration // Gale - MultiPaper - skip unnecessary mob spawning computations // Pufferfish ++ if (flagAndHasNaturalSpawn && (!org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled || _pufferfish_spawnCountsReady.get()) && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair, true)) { // Spigot // Gale - MultiPaper - skip unnecessary mob spawning computations // Pufferfish + NaturalSpawner.spawnForChunk(this.level, chunk1, lastSpawnState, this.spawnFriendlies, this.spawnEnemies, flag1); // Pufferfish } - if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - optimise chunk tick iteration -@@ -666,6 +674,40 @@ public class ServerChunkCache extends ChunkSource { - this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing - // Paper - optimise chunk tick iteration + if (true) { // Paper - rewrite chunk system +@@ -542,6 +550,40 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon + this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing + // Paper end - chunk tick iteration optimisations } + + // Pufferfish start - optimize mob spawning @@ -139,8 +126,8 @@ index 94689992b4d159ab996e00ae20afa8fef0e84db2..af4fe64e190e73dcc5f2495d0b533547 + if (_pufferfish_spawnCountsReady.getAndSet(false)) { + net.minecraft.server.MinecraftServer.getServer().mobSpawnExecutor.submit(() -> { + int mapped = distanceManager.getNaturalSpawnChunkCount(); -+ io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet.Iterator objectiterator = -+ level.entityTickList.entities.iterator(io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet.ITERATOR_FLAG_SEE_ADDITIONS); ++ ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.Iterator objectiterator = ++ level.entityTickList.entities.iterator(ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.ITERATOR_FLAG_SEE_ADDITIONS); + gg.pufferfish.pufferfish.util.IterableWrapper wrappedIterator = + new gg.pufferfish.pufferfish.util.IterableWrapper<>(objectiterator); + lastSpawnState = NaturalSpawner.createState(mapped, wrappedIterator, this::getFullChunk, null, true); @@ -154,52 +141,41 @@ index 94689992b4d159ab996e00ae20afa8fef0e84db2..af4fe64e190e73dcc5f2495d0b533547 // Gale start - MultiPaper - skip unnecessary mob spawning computations diff --git a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java -index 83a39f900551e39d5af6f17a339a386ddee4feef..0c8c534fc69172387f188af5282accfed7597ac7 100644 +index d8b4196adf955f8d414688dc451caac2d9c609d9..80a43def4912a3228cd95117d5c2aac68798b4ec 100644 --- a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java +++ b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java @@ -9,7 +9,7 @@ import javax.annotation.Nullable; import net.minecraft.world.entity.Entity; public class EntityTickList { -- private final io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet entities = new io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<>(true); // Paper - rewrite this, always keep this updated - why would we EVER tick an entity that's not ticking? -+ public final io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet entities = new io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<>(true); // Paper - rewrite this, always keep this updated - why would we EVER tick an entity that's not ticking? // Pufferfish - private->public +- private final ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet entities = new ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<>(); // Paper - rewrite chunk system ++ public final ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet entities = new ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<>(); // Paper - rewrite chunk system // Pufferfish - private->public private void ensureActiveIsNotIterated() { - // Paper - replace with better logic, do not delay removals + // Paper - rewrite chunk system diff --git a/src/main/java/org/dreeam/leaf/config/modules/async/AsyncMobSpawning.java b/src/main/java/org/dreeam/leaf/config/modules/async/AsyncMobSpawning.java new file mode 100644 -index 0000000000000000000000000000000000000000..67c575439f7d60046586972dfc3212bb36a3d033 +index 0000000000000000000000000000000000000000..8a3726a747ff4640f9936a9eae1dca34e5203029 --- /dev/null +++ b/src/main/java/org/dreeam/leaf/config/modules/async/AsyncMobSpawning.java -@@ -0,0 +1,41 @@ +@@ -0,0 +1,30 @@ +package org.dreeam.leaf.config.modules.async; + -+import com.electronwill.nightconfig.core.file.CommentedFileConfig; -+import org.dreeam.leaf.config.ConfigInfo; -+import org.dreeam.leaf.config.DoNotLoad; ++import org.dreeam.leaf.config.ConfigModules; +import org.dreeam.leaf.config.EnumConfigCategory; -+import org.dreeam.leaf.config.IConfigModule; + -+public class AsyncMobSpawning implements IConfigModule { ++public class AsyncMobSpawning extends ConfigModules { + -+ @Override -+ public EnumConfigCategory getCategory() { -+ return EnumConfigCategory.ASYNC; ++ public String getBasePath() { ++ return EnumConfigCategory.ASYNC.getBaseKeyName() + ".async-mob-spawning"; + } + -+ @Override -+ public String getBaseName() { -+ return "async_mob_spawning"; -+ } -+ -+ @ConfigInfo(baseName = "enabled") + public static boolean enabled = true; -+ @DoNotLoad + public static boolean asyncMobSpawningInitialized; + + @Override -+ public void onLoaded(CommentedFileConfig config) { -+ config.setComment("async.async_mob_spawning", """ ++ public void onLoaded() { ++ config.addComment(getBasePath(), """ + Whether or not asynchronous mob spawning should be enabled. + On servers with many entities, this can improve performance by up to 15%. You must have + paper's per-player-mob-spawns setting set to true for this to work. @@ -209,7 +185,7 @@ index 0000000000000000000000000000000000000000..67c575439f7d60046586972dfc3212bb + // This prevents us from changing the value during a reload. + if (!asyncMobSpawningInitialized) { + asyncMobSpawningInitialized = true; -+ this.get("async.async_mob_spawning.enabled", enabled, config); ++ enabled = config.getBoolean(getBasePath() + ".enabled", enabled); + } + } +} diff --git a/patches/server/0007-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/patches/server/0008-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch similarity index 100% rename from patches/server/0007-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch rename to patches/server/0008-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch diff --git a/patches/server/0008-Pufferfish-Entity-TTL.patch b/patches/server/0009-Pufferfish-Entity-TTL.patch similarity index 97% rename from patches/server/0008-Pufferfish-Entity-TTL.patch rename to patches/server/0009-Pufferfish-Entity-TTL.patch index 6354499b..a879ed21 100644 --- a/patches/server/0008-Pufferfish-Entity-TTL.patch +++ b/patches/server/0009-Pufferfish-Entity-TTL.patch @@ -7,7 +7,7 @@ Original license: GPL v3 Original project: https://github.com/pufferfish-gg/Pufferfish diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e4081783fb55ee1d804af3947be76d400f2834d4..e8b651e628e8ab2033dbf2ee3eb5d38ff22c9f45 100644 +index 611cf8f85d479798858477dc5f657a567e32e04d..b22fe825a8556a9ec6cb645b67a4335a6cb7f54e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -849,6 +849,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0009-Purpur-Server-Changes.patch b/patches/server/0010-Purpur-Server-Changes.patch similarity index 99% rename from patches/server/0009-Purpur-Server-Changes.patch rename to patches/server/0010-Purpur-Server-Changes.patch index 552582a1..6d383696 100644 --- a/patches/server/0009-Purpur-Server-Changes.patch +++ b/patches/server/0010-Purpur-Server-Changes.patch @@ -699,7 +699,7 @@ index d2ea951c7e5899d0e2edb52064e35c23965c4230..b929842514a97ca993ead608d355a4af Bootstrap.bootStrap(); Bootstrap.validate(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 333beb88e048daaaf44e67984bb17d5201a9ab21..dd6e71ac7d02fc0ce8c904a59c3d8924e1c3ca09 100644 +index 798e6473e33819d6c7a39e25dace3fc241571b0a..7de28d562fe93fcefd186b0d23c5776ba6be277b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 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 worldserver.updateLagCompensationTick(); // Paper - lag compensation @@ -868,7 +868,7 @@ index 0d9de4c61c7b26a6ff37c12fde629161fd0c3d5a..2f7897744f4aea718170698881773e90 entityitem = entityplayer.drop(itemstack, false, false, false); // CraftBukkit - SPIGOT-2942: Add boolean to call event if (entityitem != null) { diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 42ac2efb4c84c5f15c10934f928183962f179626..ca31ceb08099324df560bfc4f7888a509ad75307 100644 +index 944ada1e0f4e4a8460ec3c8e1d9a0de7469d395b..e9d6f0cdb5b1f15e1536844b6a8637f3e7d21c6f 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -118,6 +118,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -926,10 +926,10 @@ index 42ac2efb4c84c5f15c10934f928183962f179626..ca31ceb08099324df560bfc4f7888a50 // CraftBukkit start // this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage)); // Spigot - moved up -@@ -373,6 +407,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface - DedicatedServer.LOGGER.info("JMX monitoring enabled"); +@@ -374,6 +408,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface } + if (org.dreeam.leaf.config.modules.async.AsyncMobSpawning.enabled) mobSpawnExecutor.start(); // Pufferfish + org.purpurmc.purpur.task.BossBarTask.startAll(); // Purpur + if (org.purpurmc.purpur.PurpurConfig.beeCountPayload) org.purpurmc.purpur.task.BeehiveTask.instance().register(); // Purpur return true; diff --git a/patches/server/0010-Fix-Pufferfish-and-Purpur-patches.patch b/patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch similarity index 95% rename from patches/server/0010-Fix-Pufferfish-and-Purpur-patches.patch rename to patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch index 6a8b8d78..c230ba92 100644 --- a/patches/server/0010-Fix-Pufferfish-and-Purpur-patches.patch +++ b/patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch @@ -27,7 +27,7 @@ index e94224ed280247ee69dfdff8dc960f2b8729be33..5b9725a9a81c0850dc2809c150529e5f for (Component component : formatProviders(spigotPlugins, sender)) { // Purpur diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index dd6e71ac7d02fc0ce8c904a59c3d8924e1c3ca09..ddff5713a30d96e0b6876371f5936aa9b8ccf339 100644 +index 7de28d562fe93fcefd186b0d23c5776ba6be277b..cff5d0f3193b62f7b7f983c4ac33f98cfedc754c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -300,7 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); - Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> { // Paper - rewrite chunk system -@@ -1030,6 +1032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop chunks = (it.unimi.dsi.fastutil.objects.ObjectArrayList)list; final ServerChunkCache.ChunkAndHolder[] raw = chunks.elements(); -@@ -540,7 +525,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -547,7 +532,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon holder.holder().broadcastChanges(holder.chunk()); } } - this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Paper end - chunk tick iteration optimisations } - } + diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java index ac323393d7fe0b77bafb0728b7eb545930136e6e..b97f3ec10552941892b2b6edd53a873eaf72df86 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/patches/server/0014-Bump-Dependencies.patch b/patches/server/0015-Bump-Dependencies.patch similarity index 100% rename from patches/server/0014-Bump-Dependencies.patch rename to patches/server/0015-Bump-Dependencies.patch diff --git a/patches/server/0015-Remove-vanilla-username-check.patch b/patches/server/0016-Remove-vanilla-username-check.patch similarity index 100% rename from patches/server/0015-Remove-vanilla-username-check.patch rename to patches/server/0016-Remove-vanilla-username-check.patch diff --git a/patches/server/0016-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch b/patches/server/0017-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch similarity index 100% rename from patches/server/0016-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch rename to patches/server/0017-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch diff --git a/patches/server/0017-Remove-UseItemOnPacket-Too-Far-Check.patch b/patches/server/0018-Remove-UseItemOnPacket-Too-Far-Check.patch similarity index 100% rename from patches/server/0017-Remove-UseItemOnPacket-Too-Far-Check.patch rename to patches/server/0018-Remove-UseItemOnPacket-Too-Far-Check.patch diff --git a/patches/server/0018-KTP-Allow-unknown-event-thread-execution.patch b/patches/server/0019-KTP-Allow-unknown-event-thread-execution.patch similarity index 100% rename from patches/server/0018-KTP-Allow-unknown-event-thread-execution.patch rename to patches/server/0019-KTP-Allow-unknown-event-thread-execution.patch diff --git a/patches/server/0019-KeYi-Player-Skull-API.patch b/patches/server/0020-KeYi-Player-Skull-API.patch similarity index 94% rename from patches/server/0019-KeYi-Player-Skull-API.patch rename to patches/server/0020-KeYi-Player-Skull-API.patch index f685ab5c..93c9592d 100644 --- a/patches/server/0019-KeYi-Player-Skull-API.patch +++ b/patches/server/0020-KeYi-Player-Skull-API.patch @@ -7,7 +7,7 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6a3b023b0f60dbb350943bdd7f0bfead9e8e3ce0..ee1d4d83b856b9a7eba28a6f72256bb5dc33b67b 100644 +index b9130d040acff1e5cb7a475be93b03cdbe229683..6b285e068cc789fd49a8c0f22ebd98378b6dd86b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -3648,4 +3648,27 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0020-KeYi-Disable-arrow-despawn-counter-by-default.patch b/patches/server/0021-KeYi-Disable-arrow-despawn-counter-by-default.patch similarity index 100% rename from patches/server/0020-KeYi-Disable-arrow-despawn-counter-by-default.patch rename to patches/server/0021-KeYi-Disable-arrow-despawn-counter-by-default.patch diff --git a/patches/server/0021-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch b/patches/server/0022-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch similarity index 100% rename from patches/server/0021-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch rename to patches/server/0022-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch diff --git a/patches/server/0022-Carpet-Fixes-Optimized-getBiome-method.patch b/patches/server/0023-Carpet-Fixes-Optimized-getBiome-method.patch similarity index 100% rename from patches/server/0022-Carpet-Fixes-Optimized-getBiome-method.patch rename to patches/server/0023-Carpet-Fixes-Optimized-getBiome-method.patch diff --git a/patches/server/0023-Carpet-Fixes-Use-optimized-RecipeManager.patch b/patches/server/0024-Carpet-Fixes-Use-optimized-RecipeManager.patch similarity index 100% rename from patches/server/0023-Carpet-Fixes-Use-optimized-RecipeManager.patch rename to patches/server/0024-Carpet-Fixes-Use-optimized-RecipeManager.patch diff --git a/patches/server/0024-Rail-Optimization-optimized-PoweredRailBlock-logic.patch b/patches/server/0025-Rail-Optimization-optimized-PoweredRailBlock-logic.patch similarity index 100% rename from patches/server/0024-Rail-Optimization-optimized-PoweredRailBlock-logic.patch rename to patches/server/0025-Rail-Optimization-optimized-PoweredRailBlock-logic.patch diff --git a/patches/server/0025-Akarin-Save-Json-list-asynchronously.patch b/patches/server/0026-Akarin-Save-Json-list-asynchronously.patch similarity index 100% rename from patches/server/0025-Akarin-Save-Json-list-asynchronously.patch rename to patches/server/0026-Akarin-Save-Json-list-asynchronously.patch diff --git a/patches/server/0026-Slice-Smooth-Teleports.patch b/patches/server/0027-Slice-Smooth-Teleports.patch similarity index 100% rename from patches/server/0026-Slice-Smooth-Teleports.patch rename to patches/server/0027-Slice-Smooth-Teleports.patch diff --git a/patches/server/0027-Parchment-Make-FixLight-use-action-bar.patch b/patches/server/0028-Parchment-Make-FixLight-use-action-bar.patch similarity index 100% rename from patches/server/0027-Parchment-Make-FixLight-use-action-bar.patch rename to patches/server/0028-Parchment-Make-FixLight-use-action-bar.patch diff --git a/patches/server/0028-Leaves-Server-Utils.patch b/patches/server/0029-Leaves-Server-Utils.patch similarity index 100% rename from patches/server/0028-Leaves-Server-Utils.patch rename to patches/server/0029-Leaves-Server-Utils.patch diff --git a/patches/server/0029-Leaves-Protocol-Core.patch b/patches/server/0030-Leaves-Protocol-Core.patch similarity index 99% rename from patches/server/0029-Leaves-Protocol-Core.patch rename to patches/server/0030-Leaves-Protocol-Core.patch index e517c798..66bda92f 100644 --- a/patches/server/0029-Leaves-Protocol-Core.patch +++ b/patches/server/0030-Leaves-Protocol-Core.patch @@ -51,7 +51,7 @@ index 1967c43ee3a12e63365cc40ee6565307e2fd73cf..6e376d0db5321d8e9b6e0b54617ffd17 assert isValidPath(path); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3a4aed08dbf8055cf0861bf3961706eb0de6e85d..7bb592292222c58f28545434981bc5743ddf5a49 100644 +index aa40039353b9b825370fb01d1da31c157590b046..59983594f1128b82230d8e8572438f2be8002966 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1802,6 +1802,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop Co-authored by: MachineBreaker diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index fd23063ef316d6f1930a565c601bdf5b72bcfda1..9b8f6dc0db7e409a2e403caa65f2b4fed863c04e 100644 +index 24ed26286c7e3e45279b6b27cd0a432b37fda4b2..83fcdd4d090bfc8801a640b2a5645313aa946343 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -854,17 +854,19 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -36,7 +36,7 @@ index fd23063ef316d6f1930a565c601bdf5b72bcfda1..9b8f6dc0db7e409a2e403caa65f2b4fe if (net.minecraft.world.phys.shapes.Shapes.joinIsNotEmpty(voxelshape, net.minecraft.world.phys.shapes.Shapes.create(entity.getBoundingBox()), net.minecraft.world.phys.shapes.BooleanOp.AND)) { return false; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9325d2c676899fcedc360ea9183339c91af026dc..56c02c4e6ad55cc5757f1b227189ada513b2d560 100644 +index 39cb0c26e1d7e246a5867ea0915dc87c43777cfe..8b100977de2aa5e1d7d68442e85584e351f4c03c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -638,6 +638,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0041-Faster-Natural-Spawning.patch b/patches/server/0042-Faster-Natural-Spawning.patch similarity index 95% rename from patches/server/0041-Faster-Natural-Spawning.patch rename to patches/server/0042-Faster-Natural-Spawning.patch index 8b1cc20b..4d9dca69 100644 --- a/patches/server/0041-Faster-Natural-Spawning.patch +++ b/patches/server/0042-Faster-Natural-Spawning.patch @@ -22,7 +22,7 @@ index 9c6f5b55b1f1376fa75e216cd366ee47c79fafc4..7762c8186035fdf60e11d9f1844516b6 static RandomSource createThreadSafe() { return new ThreadSafeLegacyRandomSource(RandomSupport.generateUniqueSeed()); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 3c01a14e08d6a401692cefef42796aaf89519889..562d0d4f7d253be10f1804f0d5d668d5c0f4bf2f 100644 +index 83fcdd4d090bfc8801a640b2a5645313aa946343..41dd7129fcb1b4aa06f3d51b3fb809d6ff0eb370 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -128,6 +128,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -34,7 +34,7 @@ index 3c01a14e08d6a401692cefef42796aaf89519889..562d0d4f7d253be10f1804f0d5d668d5 @Deprecated private final RandomSource threadSafeRandom = RandomSource.createThreadSafe(); diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index d556089907bb695a9d87df1961ef0b0ae4382cad..66244a2dd3e32ab4fd61f7a42243f967eb7f268d 100644 +index e33b39d369386d677cc15247846790b498e37a82..cf715114f0ebba449d7bd663445baec699d97537 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -405,10 +405,12 @@ public final class NaturalSpawner { diff --git a/patches/server/0042-Fix-sprint-glitch.patch b/patches/server/0043-Fix-sprint-glitch.patch similarity index 90% rename from patches/server/0042-Fix-sprint-glitch.patch rename to patches/server/0043-Fix-sprint-glitch.patch index cbae4ee3..c5e93a5e 100644 --- a/patches/server/0042-Fix-sprint-glitch.patch +++ b/patches/server/0043-Fix-sprint-glitch.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix sprint glitch diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1236d18388cac8bc68771a4d1eca792f1d8b2974..1759943f67cd58ed4e8717846f18ed5fa699efc4 100644 +index 41a2254c5665b1a1ef770fe9f08271136cec2983..7c75298c8ea7a828c2d9cd4e7ffd4d09a0113aed 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1429,7 +1429,8 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0043-Configurable-movement-speed-of-more-entities.patch b/patches/server/0044-Configurable-movement-speed-of-more-entities.patch similarity index 100% rename from patches/server/0043-Configurable-movement-speed-of-more-entities.patch rename to patches/server/0044-Configurable-movement-speed-of-more-entities.patch diff --git a/patches/server/0044-Faster-sequencing-of-futures-for-chunk-structure-gen.patch b/patches/server/0045-Faster-sequencing-of-futures-for-chunk-structure-gen.patch similarity index 98% rename from patches/server/0044-Faster-sequencing-of-futures-for-chunk-structure-gen.patch rename to patches/server/0045-Faster-sequencing-of-futures-for-chunk-structure-gen.patch index 509dc801..82da2b6d 100644 --- a/patches/server/0044-Faster-sequencing-of-futures-for-chunk-structure-gen.patch +++ b/patches/server/0045-Faster-sequencing-of-futures-for-chunk-structure-gen.patch @@ -7,7 +7,7 @@ Replace `thenApply` with `thenCompose`. Once one task is completed then the next to prevent blocking threads while waiting to complete all tasks. But may cause the sequence of future compose disorder. diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 5869f2f5c72f736e6b077683327c64b9e0e0c733..ad40341f7a2cbed895b25d8de288f034626ed417 100644 +index 0e38a641d8e537750166b56c57aca4a90d418af1..815253d03b85a7a476c1efdeca9496fd64afc137 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java @@ -490,13 +490,27 @@ public class Util { diff --git a/patches/server/0045-Reduce-items-finding-hopper-nearby-check.patch b/patches/server/0046-Reduce-items-finding-hopper-nearby-check.patch similarity index 100% rename from patches/server/0045-Reduce-items-finding-hopper-nearby-check.patch rename to patches/server/0046-Reduce-items-finding-hopper-nearby-check.patch diff --git a/patches/server/0046-Plazma-Add-some-missing-Pufferfish-configurations.patch b/patches/server/0047-Plazma-Add-some-missing-Pufferfish-configurations.patch similarity index 100% rename from patches/server/0046-Plazma-Add-some-missing-Pufferfish-configurations.patch rename to patches/server/0047-Plazma-Add-some-missing-Pufferfish-configurations.patch diff --git a/patches/server/0047-Plazma-Add-missing-purpur-configuration-options.patch b/patches/server/0048-Plazma-Add-missing-purpur-configuration-options.patch similarity index 100% rename from patches/server/0047-Plazma-Add-missing-purpur-configuration-options.patch rename to patches/server/0048-Plazma-Add-missing-purpur-configuration-options.patch diff --git a/patches/server/0048-Skip-event-if-no-listeners.patch b/patches/server/0049-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0048-Skip-event-if-no-listeners.patch rename to patches/server/0049-Skip-event-if-no-listeners.patch diff --git a/patches/server/0049-PaperPR-Rewrite-framed-map-tracker-ticking.patch b/patches/server/0050-PaperPR-Rewrite-framed-map-tracker-ticking.patch similarity index 100% rename from patches/server/0049-PaperPR-Rewrite-framed-map-tracker-ticking.patch rename to patches/server/0050-PaperPR-Rewrite-framed-map-tracker-ticking.patch diff --git a/patches/server/0050-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch b/patches/server/0051-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch similarity index 100% rename from patches/server/0050-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch rename to patches/server/0051-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch diff --git a/patches/server/0051-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch b/patches/server/0052-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch similarity index 100% rename from patches/server/0051-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch rename to patches/server/0052-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch diff --git a/patches/server/0052-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch b/patches/server/0053-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch similarity index 96% rename from patches/server/0052-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch rename to patches/server/0053-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch index f196c006..5d862bf4 100644 --- a/patches/server/0052-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch +++ b/patches/server/0053-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch @@ -75,13 +75,13 @@ index c03608fec96b51e1867f43d8f42e5aefb1520e46..15b21fa3907db1b77ed5b5d1050a37f4 throw new IllegalStateException("Ticking retired scheduler"); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7bb592292222c58f28545434981bc5743ddf5a49..9cf5a18a765924586d485cfc94e78c628688dcee 100644 +index 59983594f1128b82230d8e8572438f2be8002966..17c2ef53ce8a2fb0d8a2aba63082f23f6c8504ee 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 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 spin(Function serverFactory) { diff --git a/patches/server/0053-SparklyPaper-Optimize-canSee-checks.patch b/patches/server/0054-SparklyPaper-Optimize-canSee-checks.patch similarity index 100% rename from patches/server/0053-SparklyPaper-Optimize-canSee-checks.patch rename to patches/server/0054-SparklyPaper-Optimize-canSee-checks.patch diff --git a/patches/server/0054-Polpot-Make-egg-and-snowball-can-knockback-player.patch b/patches/server/0055-Polpot-Make-egg-and-snowball-can-knockback-player.patch similarity index 100% rename from patches/server/0054-Polpot-Make-egg-and-snowball-can-knockback-player.patch rename to patches/server/0055-Polpot-Make-egg-and-snowball-can-knockback-player.patch diff --git a/patches/server/0055-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch b/patches/server/0056-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch similarity index 100% rename from patches/server/0055-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch rename to patches/server/0056-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch diff --git a/patches/server/0056-Fix-MC-65198.patch b/patches/server/0057-Fix-MC-65198.patch similarity index 100% rename from patches/server/0056-Fix-MC-65198.patch rename to patches/server/0057-Fix-MC-65198.patch diff --git a/patches/server/0057-Including-5s-in-getTPS.patch b/patches/server/0058-Including-5s-in-getTPS.patch similarity index 100% rename from patches/server/0057-Including-5s-in-getTPS.patch rename to patches/server/0058-Including-5s-in-getTPS.patch diff --git a/patches/server/0058-Remove-useless-creating-stats-json-bases-on-player-n.patch b/patches/server/0059-Remove-useless-creating-stats-json-bases-on-player-n.patch similarity index 100% rename from patches/server/0058-Remove-useless-creating-stats-json-bases-on-player-n.patch rename to patches/server/0059-Remove-useless-creating-stats-json-bases-on-player-n.patch diff --git a/patches/server/0059-Fix-NPE-during-creating-GUI-graph.patch b/patches/server/0060-Fix-NPE-during-creating-GUI-graph.patch similarity index 100% rename from patches/server/0059-Fix-NPE-during-creating-GUI-graph.patch rename to patches/server/0060-Fix-NPE-during-creating-GUI-graph.patch diff --git a/patches/server/0060-Don-t-throw-exception-on-missing-ResourceKey-value.patch b/patches/server/0061-Don-t-throw-exception-on-missing-ResourceKey-value.patch similarity index 100% rename from patches/server/0060-Don-t-throw-exception-on-missing-ResourceKey-value.patch rename to patches/server/0061-Don-t-throw-exception-on-missing-ResourceKey-value.patch diff --git a/patches/server/0061-Improve-Purpur-AFK-system.patch b/patches/server/0062-Improve-Purpur-AFK-system.patch similarity index 100% rename from patches/server/0061-Improve-Purpur-AFK-system.patch rename to patches/server/0062-Improve-Purpur-AFK-system.patch diff --git a/patches/server/0062-Virtual-Thread-for-async-scheduler.patch b/patches/server/0063-Virtual-Thread-for-async-scheduler.patch similarity index 100% rename from patches/server/0062-Virtual-Thread-for-async-scheduler.patch rename to patches/server/0063-Virtual-Thread-for-async-scheduler.patch diff --git a/patches/server/0063-Mirai-Configurable-chat-message-signatures.patch b/patches/server/0064-Mirai-Configurable-chat-message-signatures.patch similarity index 98% rename from patches/server/0063-Mirai-Configurable-chat-message-signatures.patch rename to patches/server/0064-Mirai-Configurable-chat-message-signatures.patch index d5789046..5ff861e9 100644 --- a/patches/server/0063-Mirai-Configurable-chat-message-signatures.patch +++ b/patches/server/0064-Mirai-Configurable-chat-message-signatures.patch @@ -71,10 +71,10 @@ index 50dc68a005490415b88780397ef6c26859596dd5..162115048cffc824376e54b7f60ae071 public static record Favicon(byte[] iconBytes) { private static final String PREFIX = "data:image/png;base64,"; diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index b38470108f0842ee65cb55ff7e376105cc7ba2f6..9bf4b58f056172d88365197352b1d434b7170769 100644 +index 020a0f033f64875bb04d1dead332d471d480935f..f26cec20aa9f52b5dd090107fa76fcd390fc1067 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -708,6 +708,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -709,6 +709,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @Override public boolean enforceSecureProfile() { diff --git a/patches/server/0064-Block-log4j-rce-exploit-in-chat.patch b/patches/server/0065-Block-log4j-rce-exploit-in-chat.patch similarity index 96% rename from patches/server/0064-Block-log4j-rce-exploit-in-chat.patch rename to patches/server/0065-Block-log4j-rce-exploit-in-chat.patch index 2d00c989..77fc190a 100644 --- a/patches/server/0064-Block-log4j-rce-exploit-in-chat.patch +++ b/patches/server/0065-Block-log4j-rce-exploit-in-chat.patch @@ -34,7 +34,7 @@ index 7d691af2d3e1baa046dd3ab2ba70f8cf7bbd3c21..4ea341d586fae146659338f4cf70ee05 for (int i = 0; i < message.length(); ++i) { if (!StringUtil.isAllowedChatCharacter(message.charAt(i))) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0fa903d2a343d576ce12b22bb3c46c48930ba519..60e5f1c9af60a6f75bf6444dc7d36517905c18e2 100644 +index 675b86360802a19eea84a72aec48392a95fbdb25..7c66e3fea981cc6d3a1407c4cb0900a1a697e567 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -753,6 +753,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0065-Cache-player-profileResult.patch b/patches/server/0066-Cache-player-profileResult.patch similarity index 100% rename from patches/server/0065-Cache-player-profileResult.patch rename to patches/server/0066-Cache-player-profileResult.patch diff --git a/patches/server/0066-Prevent-change-non-editable-sign-warning-spam-in-con.patch b/patches/server/0067-Prevent-change-non-editable-sign-warning-spam-in-con.patch similarity index 100% rename from patches/server/0066-Prevent-change-non-editable-sign-warning-spam-in-con.patch rename to patches/server/0067-Prevent-change-non-editable-sign-warning-spam-in-con.patch diff --git a/patches/server/0067-Ignore-terminal-provider-warning.patch b/patches/server/0068-Ignore-terminal-provider-warning.patch similarity index 100% rename from patches/server/0067-Ignore-terminal-provider-warning.patch rename to patches/server/0068-Ignore-terminal-provider-warning.patch diff --git a/patches/server/0068-Fix-console-freeze-above-JAVA-22.patch b/patches/server/0069-Fix-console-freeze-above-JAVA-22.patch similarity index 100% rename from patches/server/0068-Fix-console-freeze-above-JAVA-22.patch rename to patches/server/0069-Fix-console-freeze-above-JAVA-22.patch diff --git a/patches/server/0069-Fix-console-output-display-on-Pterodactyl-panel.patch b/patches/server/0070-Fix-console-output-display-on-Pterodactyl-panel.patch similarity index 100% rename from patches/server/0069-Fix-console-output-display-on-Pterodactyl-panel.patch rename to patches/server/0070-Fix-console-output-display-on-Pterodactyl-panel.patch diff --git a/patches/server/0070-Faster-Random-Generator.patch b/patches/server/0071-Faster-Random-Generator.patch similarity index 100% rename from patches/server/0070-Faster-Random-Generator.patch rename to patches/server/0071-Faster-Random-Generator.patch diff --git a/patches/server/0071-Don-t-save-primed-tnt-entity.patch b/patches/server/0072-Don-t-save-primed-tnt-entity.patch similarity index 100% rename from patches/server/0071-Don-t-save-primed-tnt-entity.patch rename to patches/server/0072-Don-t-save-primed-tnt-entity.patch diff --git a/patches/server/0072-Don-t-save-falling-block-entity.patch b/patches/server/0073-Don-t-save-falling-block-entity.patch similarity index 100% rename from patches/server/0072-Don-t-save-falling-block-entity.patch rename to patches/server/0073-Don-t-save-falling-block-entity.patch diff --git a/patches/server/0073-Configurable-connection-message.patch b/patches/server/0074-Configurable-connection-message.patch similarity index 100% rename from patches/server/0073-Configurable-connection-message.patch rename to patches/server/0074-Configurable-connection-message.patch diff --git a/patches/server/0074-Remove-stream-in-BlockBehaviour-cache-blockstate.patch b/patches/server/0075-Remove-stream-in-BlockBehaviour-cache-blockstate.patch similarity index 100% rename from patches/server/0074-Remove-stream-in-BlockBehaviour-cache-blockstate.patch rename to patches/server/0075-Remove-stream-in-BlockBehaviour-cache-blockstate.patch diff --git a/patches/server/0075-Reduce-worldgen-allocations.patch b/patches/server/0076-Reduce-worldgen-allocations.patch similarity index 100% rename from patches/server/0075-Reduce-worldgen-allocations.patch rename to patches/server/0076-Reduce-worldgen-allocations.patch diff --git a/patches/server/0076-Fix-MC-183518.patch b/patches/server/0077-Fix-MC-183518.patch similarity index 100% rename from patches/server/0076-Fix-MC-183518.patch rename to patches/server/0077-Fix-MC-183518.patch diff --git a/patches/server/0077-Use-caffeine-cache-kickPermission-instead-of-using-g.patch b/patches/server/0078-Use-caffeine-cache-kickPermission-instead-of-using-g.patch similarity index 100% rename from patches/server/0077-Use-caffeine-cache-kickPermission-instead-of-using-g.patch rename to patches/server/0078-Use-caffeine-cache-kickPermission-instead-of-using-g.patch diff --git a/patches/server/0078-Do-not-place-player-if-the-server-is-full.patch b/patches/server/0079-Do-not-place-player-if-the-server-is-full.patch similarity index 95% rename from patches/server/0078-Do-not-place-player-if-the-server-is-full.patch rename to patches/server/0079-Do-not-place-player-if-the-server-is-full.patch index 30c593ba..359a8c4f 100644 --- a/patches/server/0078-Do-not-place-player-if-the-server-is-full.patch +++ b/patches/server/0079-Do-not-place-player-if-the-server-is-full.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Do not place player if the server is full Fix https://github.com/PaperMC/Paper/issues/10668 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 44b05a126360072f1966d7f0d2a822fd84ada921..6a6127a266526258a2402e2e5d220f9dc119bfd0 100644 +index e7d5610de6bda486e512f18bf0684686ed9c08df..7b22402d2b0ed0a17d6b8e01e7ed882033cadcf3 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -78,6 +78,7 @@ import net.minecraft.server.level.ClientInformation; diff --git a/patches/server/0079-Fix-MC-200418.patch b/patches/server/0080-Fix-MC-200418.patch similarity index 100% rename from patches/server/0079-Fix-MC-200418.patch rename to patches/server/0080-Fix-MC-200418.patch diff --git a/patches/server/0080-Fix-MC-119417.patch b/patches/server/0081-Fix-MC-119417.patch similarity index 100% rename from patches/server/0080-Fix-MC-119417.patch rename to patches/server/0081-Fix-MC-119417.patch diff --git a/patches/server/0081-Fix-MC-223153.patch b/patches/server/0082-Fix-MC-223153.patch similarity index 100% rename from patches/server/0081-Fix-MC-223153.patch rename to patches/server/0082-Fix-MC-223153.patch diff --git a/patches/server/0082-Optimize-LeavesProtocolManager-init-protocol.patch b/patches/server/0083-Optimize-LeavesProtocolManager-init-protocol.patch similarity index 100% rename from patches/server/0082-Optimize-LeavesProtocolManager-init-protocol.patch rename to patches/server/0083-Optimize-LeavesProtocolManager-init-protocol.patch diff --git a/patches/server/0083-Optimize-check-nearby-fire-or-lava-on-entity-move.patch b/patches/server/0084-Optimize-check-nearby-fire-or-lava-on-entity-move.patch similarity index 98% rename from patches/server/0083-Optimize-check-nearby-fire-or-lava-on-entity-move.patch rename to patches/server/0084-Optimize-check-nearby-fire-or-lava-on-entity-move.patch index 163493d1..3138cd6d 100644 --- a/patches/server/0083-Optimize-check-nearby-fire-or-lava-on-entity-move.patch +++ b/patches/server/0084-Optimize-check-nearby-fire-or-lava-on-entity-move.patch @@ -7,7 +7,7 @@ Remove stream and remove double Mth.floor() convert before 1700ms, after 370ms, in massive stacked minecart test diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 95d246ec3fded53f325bbeb8bf3244576aa9ca04..f456cddc806bd82c2234713ad41a9ac8cda7ccbc 100644 +index b907a7231cbed1c7b95b0b57ee0ac68843e5b412..d395f402c2bcec0b7a9699aa0177f95230e420b3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1337,9 +1337,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess