diff --git a/patches/removed/1.18/0432-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/patches/removed/1.18/No longer needed/0432-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 96% rename from patches/removed/1.18/0432-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to patches/removed/1.18/No longer needed/0432-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch index ac69b7883..a6a911f3a 100644 --- a/patches/removed/1.18/0432-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch +++ b/patches/removed/1.18/No longer needed/0432-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch @@ -15,6 +15,9 @@ full chunks so this was really starting to hurt. We further improve it by making a copy of the nbt tag with only the memory it needs, so that we dont have to hold a copy to the entire compound. +# 1.18: The postLoadChunk method was refactored to not keep a reference to the full nbt, +just the two nbt tag lists it needed, "entities" and "block_entities" + diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java index 79f2b3942a3ccccd8fe8719db12de458212e8659..d113b4835e86a789c0ba124eb839e1c56a5437d2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java diff --git a/patches/removed/1.18/0747-Prevent-unload-calls-removing-tickets-for-sync-loads.patch b/patches/server/0747-Prevent-unload-calls-removing-tickets-for-sync-loads.patch similarity index 92% rename from patches/removed/1.18/0747-Prevent-unload-calls-removing-tickets-for-sync-loads.patch rename to patches/server/0747-Prevent-unload-calls-removing-tickets-for-sync-loads.patch index b95a4cdfe..7560130c1 100644 --- a/patches/removed/1.18/0747-Prevent-unload-calls-removing-tickets-for-sync-loads.patch +++ b/patches/server/0747-Prevent-unload-calls-removing-tickets-for-sync-loads.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent unload() calls removing tickets for sync loads diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 6d0c56e4071a990a3b168143e8ac73f8b5ed0379..d03ca9b30380209397aed5371686e0022bf631d5 100644 +index e13a8e3dc11292aed13ff12ee8e0f9d6a95f0c34..9f0321179fb1d87b6e1b74e128955157983b0500 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -734,6 +734,8 @@ public class ServerChunkCache extends ChunkSource { +@@ -725,6 +725,8 @@ public class ServerChunkCache extends ChunkSource { return completablefuture; } @@ -17,7 +17,7 @@ index 6d0c56e4071a990a3b168143e8ac73f8b5ed0379..d03ca9b30380209397aed5371686e002 private CompletableFuture> getChunkFutureMainThread(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create) { // Paper start - add isUrgent - old sig left in place for dirty nms plugins return getChunkFutureMainThread(chunkX, chunkZ, leastStatus, create, false); -@@ -752,9 +754,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -743,9 +745,12 @@ public class ServerChunkCache extends ChunkSource { ChunkHolder.FullChunkStatus currentChunkState = ChunkHolder.getFullChunkStatus(playerchunk.getTicketLevel()); currentlyUnloading = (oldChunkState.isOrAfter(ChunkHolder.FullChunkStatus.BORDER) && !currentChunkState.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)); } @@ -30,12 +30,12 @@ index 6d0c56e4071a990a3b168143e8ac73f8b5ed0379..d03ca9b30380209397aed5371686e002 if (isUrgent) this.distanceManager.markUrgent(chunkcoordintpair); // Paper - Chunk priority if (this.chunkAbsent(playerchunk, l)) { ProfilerFiller gameprofilerfiller = this.level.getProfiler(); -@@ -765,13 +770,21 @@ public class ServerChunkCache extends ChunkSource { +@@ -756,13 +761,21 @@ public class ServerChunkCache extends ChunkSource { playerchunk = this.getVisibleChunkIfPresent(k); gameprofilerfiller.pop(); if (this.chunkAbsent(playerchunk, l)) { + this.distanceManager.removeTicketAtLevel(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Paper - throw (IllegalStateException) Util.pauseInIde((Throwable) (new IllegalStateException("No chunk holder after ticket has been added"))); + throw (IllegalStateException) Util.pauseInIde(new IllegalStateException("No chunk holder after ticket has been added")); } } - } diff --git a/patches/server/0747-Sanitize-ResourceLocation-error-logging.patch b/patches/server/0748-Sanitize-ResourceLocation-error-logging.patch similarity index 100% rename from patches/server/0747-Sanitize-ResourceLocation-error-logging.patch rename to patches/server/0748-Sanitize-ResourceLocation-error-logging.patch diff --git a/patches/server/0748-Optimise-general-POI-access.patch b/patches/server/0749-Optimise-general-POI-access.patch similarity index 100% rename from patches/server/0748-Optimise-general-POI-access.patch rename to patches/server/0749-Optimise-general-POI-access.patch diff --git a/patches/server/0749-Allow-controlled-flushing-for-network-manager.patch b/patches/server/0750-Allow-controlled-flushing-for-network-manager.patch similarity index 100% rename from patches/server/0749-Allow-controlled-flushing-for-network-manager.patch rename to patches/server/0750-Allow-controlled-flushing-for-network-manager.patch diff --git a/patches/server/0750-Add-more-async-catchers.patch b/patches/server/0751-Add-more-async-catchers.patch similarity index 100% rename from patches/server/0750-Add-more-async-catchers.patch rename to patches/server/0751-Add-more-async-catchers.patch diff --git a/patches/server/0751-Rewrite-entity-bounding-box-lookup-calls.patch b/patches/server/0752-Rewrite-entity-bounding-box-lookup-calls.patch similarity index 100% rename from patches/server/0751-Rewrite-entity-bounding-box-lookup-calls.patch rename to patches/server/0752-Rewrite-entity-bounding-box-lookup-calls.patch diff --git a/patches/server/0752-Execute-chunk-tasks-mid-tick.patch b/patches/server/0753-Execute-chunk-tasks-mid-tick.patch similarity index 100% rename from patches/server/0752-Execute-chunk-tasks-mid-tick.patch rename to patches/server/0753-Execute-chunk-tasks-mid-tick.patch diff --git a/patches/server/0753-Do-not-copy-visible-chunks.patch b/patches/server/0754-Do-not-copy-visible-chunks.patch similarity index 100% rename from patches/server/0753-Do-not-copy-visible-chunks.patch rename to patches/server/0754-Do-not-copy-visible-chunks.patch diff --git a/patches/server/0754-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/0755-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch similarity index 100% rename from patches/server/0754-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to patches/server/0755-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch diff --git a/patches/server/0755-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/0756-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/server/0755-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/server/0756-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/server/0756-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0757-Detail-more-information-in-watchdog-dumps.patch similarity index 100% rename from patches/server/0756-Detail-more-information-in-watchdog-dumps.patch rename to patches/server/0757-Detail-more-information-in-watchdog-dumps.patch diff --git a/patches/server/0757-Manually-inline-methods-in-BlockPosition.patch b/patches/server/0758-Manually-inline-methods-in-BlockPosition.patch similarity index 100% rename from patches/server/0757-Manually-inline-methods-in-BlockPosition.patch rename to patches/server/0758-Manually-inline-methods-in-BlockPosition.patch diff --git a/patches/server/0758-Distance-manager-tick-timings.patch b/patches/server/0759-Distance-manager-tick-timings.patch similarity index 91% rename from patches/server/0758-Distance-manager-tick-timings.patch rename to patches/server/0759-Distance-manager-tick-timings.patch index eb2ae8684..a79ba7d3e 100644 --- a/patches/server/0758-Distance-manager-tick-timings.patch +++ b/patches/server/0759-Distance-manager-tick-timings.patch @@ -19,10 +19,10 @@ index eada966d7f108a6081be7a848f5c1dfcb1eed676..a977f7483f37df473096b2234dc1308b public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks"); diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index e13a8e3dc11292aed13ff12ee8e0f9d6a95f0c34..660ce57b008985d9064271b1ef861f4291d7e09f 100644 +index 9f0321179fb1d87b6e1b74e128955157983b0500..0d9f8180110b072e54d6c0f8c64df584b40776b9 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -821,6 +821,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -834,6 +834,7 @@ public class ServerChunkCache extends ChunkSource { public boolean runDistanceManagerUpdates() { if (distanceManager.delayDistanceManagerTick) return false; // Paper - Chunk priority if (this.chunkMap.unloadingPlayerChunk) { net.minecraft.server.MinecraftServer.LOGGER.fatal("Cannot tick distance manager while unloading playerchunks", new Throwable()); throw new IllegalStateException("Cannot tick distance manager while unloading playerchunks"); } // Paper @@ -30,7 +30,7 @@ index e13a8e3dc11292aed13ff12ee8e0f9d6a95f0c34..660ce57b008985d9064271b1ef861f42 boolean flag = this.distanceManager.runAllUpdates(this.chunkMap); boolean flag1 = this.chunkMap.promoteChunkMap(); -@@ -830,6 +831,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -843,6 +844,7 @@ public class ServerChunkCache extends ChunkSource { this.clearCache(); return true; } diff --git a/patches/server/0759-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/server/0760-Name-craft-scheduler-threads-according-to-the-plugin.patch similarity index 100% rename from patches/server/0759-Name-craft-scheduler-threads-according-to-the-plugin.patch rename to patches/server/0760-Name-craft-scheduler-threads-according-to-the-plugin.patch diff --git a/patches/server/0760-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0761-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch similarity index 100% rename from patches/server/0760-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch rename to patches/server/0761-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch diff --git a/patches/server/0761-Add-packet-limiter-config.patch b/patches/server/0762-Add-packet-limiter-config.patch similarity index 100% rename from patches/server/0761-Add-packet-limiter-config.patch rename to patches/server/0762-Add-packet-limiter-config.patch diff --git a/patches/server/0762-Lag-compensate-block-breaking.patch b/patches/server/0763-Lag-compensate-block-breaking.patch similarity index 100% rename from patches/server/0762-Lag-compensate-block-breaking.patch rename to patches/server/0763-Lag-compensate-block-breaking.patch diff --git a/patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0764-Use-correct-LevelStem-registry-when-loading-default-.patch similarity index 100% rename from patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch rename to patches/server/0764-Use-correct-LevelStem-registry-when-loading-default-.patch diff --git a/patches/server/0764-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/server/0765-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch similarity index 100% rename from patches/server/0764-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch rename to patches/server/0765-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch diff --git a/patches/server/0765-Consolidate-flush-calls-for-entity-tracker-packets.patch b/patches/server/0766-Consolidate-flush-calls-for-entity-tracker-packets.patch similarity index 93% rename from patches/server/0765-Consolidate-flush-calls-for-entity-tracker-packets.patch rename to patches/server/0766-Consolidate-flush-calls-for-entity-tracker-packets.patch index b640ffd31..5a4d4e942 100644 --- a/patches/server/0765-Consolidate-flush-calls-for-entity-tracker-packets.patch +++ b/patches/server/0766-Consolidate-flush-calls-for-entity-tracker-packets.patch @@ -22,10 +22,10 @@ With this change I could get all 200 on at 0ms ping. So in general this patch should reduce Netty I/O thread load. diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 660ce57b008985d9064271b1ef861f4291d7e09f..5ca10071d98ee743671f09b57d43d519ea03da19 100644 +index 0d9f8180110b072e54d6c0f8c64df584b40776b9..758bb0fae0f9ba9672250e4a65c27f1175eab12d 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -1040,7 +1040,24 @@ public class ServerChunkCache extends ChunkSource { +@@ -1053,7 +1053,24 @@ public class ServerChunkCache extends ChunkSource { }); gameprofilerfiller.pop(); gameprofilerfiller.pop(); diff --git a/patches/server/0766-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/server/0767-Don-t-lookup-fluid-state-when-raytracing.patch similarity index 100% rename from patches/server/0766-Don-t-lookup-fluid-state-when-raytracing.patch rename to patches/server/0767-Don-t-lookup-fluid-state-when-raytracing.patch diff --git a/patches/server/0767-Time-scoreboard-search.patch b/patches/server/0768-Time-scoreboard-search.patch similarity index 100% rename from patches/server/0767-Time-scoreboard-search.patch rename to patches/server/0768-Time-scoreboard-search.patch diff --git a/patches/server/0768-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0769-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/server/0768-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/0769-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/server/0769-Do-not-run-raytrace-logic-for-AIR.patch b/patches/server/0770-Do-not-run-raytrace-logic-for-AIR.patch similarity index 100% rename from patches/server/0769-Do-not-run-raytrace-logic-for-AIR.patch rename to patches/server/0770-Do-not-run-raytrace-logic-for-AIR.patch diff --git a/patches/server/0770-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0771-Oprimise-map-impl-for-tracked-players.patch similarity index 100% rename from patches/server/0770-Oprimise-map-impl-for-tracked-players.patch rename to patches/server/0771-Oprimise-map-impl-for-tracked-players.patch diff --git a/patches/server/0771-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0772-Optimise-BlockSoil-nearby-water-lookup.patch similarity index 100% rename from patches/server/0771-Optimise-BlockSoil-nearby-water-lookup.patch rename to patches/server/0772-Optimise-BlockSoil-nearby-water-lookup.patch diff --git a/patches/server/0772-Allow-removal-addition-of-entities-to-entity-ticklis.patch b/patches/server/0773-Allow-removal-addition-of-entities-to-entity-ticklis.patch similarity index 100% rename from patches/server/0772-Allow-removal-addition-of-entities-to-entity-ticklis.patch rename to patches/server/0773-Allow-removal-addition-of-entities-to-entity-ticklis.patch diff --git a/patches/server/0773-Optimise-random-block-ticking.patch b/patches/server/0774-Optimise-random-block-ticking.patch similarity index 100% rename from patches/server/0773-Optimise-random-block-ticking.patch rename to patches/server/0774-Optimise-random-block-ticking.patch diff --git a/patches/server/0774-Optimise-non-flush-packet-sending.patch b/patches/server/0775-Optimise-non-flush-packet-sending.patch similarity index 100% rename from patches/server/0774-Optimise-non-flush-packet-sending.patch rename to patches/server/0775-Optimise-non-flush-packet-sending.patch diff --git a/patches/server/0775-Optimise-nearby-player-lookups.patch b/patches/server/0776-Optimise-nearby-player-lookups.patch similarity index 100% rename from patches/server/0775-Optimise-nearby-player-lookups.patch rename to patches/server/0776-Optimise-nearby-player-lookups.patch diff --git a/patches/server/0776-Optimise-WorldServer-notify.patch b/patches/server/0777-Optimise-WorldServer-notify.patch similarity index 100% rename from patches/server/0776-Optimise-WorldServer-notify.patch rename to patches/server/0777-Optimise-WorldServer-notify.patch diff --git a/patches/server/0777-Remove-streams-for-villager-AI.patch b/patches/server/0778-Remove-streams-for-villager-AI.patch similarity index 100% rename from patches/server/0777-Remove-streams-for-villager-AI.patch rename to patches/server/0778-Remove-streams-for-villager-AI.patch diff --git a/patches/server/0778-Rewrite-dataconverter-system.patch b/patches/server/0779-Rewrite-dataconverter-system.patch similarity index 100% rename from patches/server/0778-Rewrite-dataconverter-system.patch rename to patches/server/0779-Rewrite-dataconverter-system.patch diff --git a/patches/server/0779-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0780-Use-Velocity-compression-and-cipher-natives.patch similarity index 100% rename from patches/server/0779-Use-Velocity-compression-and-cipher-natives.patch rename to patches/server/0780-Use-Velocity-compression-and-cipher-natives.patch diff --git a/patches/server/0780-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch b/patches/server/0781-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch similarity index 100% rename from patches/server/0780-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch rename to patches/server/0781-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch diff --git a/patches/server/0781-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch b/patches/server/0782-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch similarity index 100% rename from patches/server/0781-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch rename to patches/server/0782-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch diff --git a/patches/server/0782-Async-catch-modifications-to-critical-entity-state.patch b/patches/server/0783-Async-catch-modifications-to-critical-entity-state.patch similarity index 100% rename from patches/server/0782-Async-catch-modifications-to-critical-entity-state.patch rename to patches/server/0783-Async-catch-modifications-to-critical-entity-state.patch diff --git a/patches/server/0783-Fix-Bukkit-NamespacedKey-shenanigans.patch b/patches/server/0784-Fix-Bukkit-NamespacedKey-shenanigans.patch similarity index 100% rename from patches/server/0783-Fix-Bukkit-NamespacedKey-shenanigans.patch rename to patches/server/0784-Fix-Bukkit-NamespacedKey-shenanigans.patch diff --git a/patches/server/0784-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0785-Fix-merchant-inventory-not-closing-on-entity-removal.patch similarity index 100% rename from patches/server/0784-Fix-merchant-inventory-not-closing-on-entity-removal.patch rename to patches/server/0785-Fix-merchant-inventory-not-closing-on-entity-removal.patch diff --git a/patches/server/0785-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0786-Check-requirement-before-suggesting-root-nodes.patch similarity index 100% rename from patches/server/0785-Check-requirement-before-suggesting-root-nodes.patch rename to patches/server/0786-Check-requirement-before-suggesting-root-nodes.patch diff --git a/patches/server/0786-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0787-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch similarity index 100% rename from patches/server/0786-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch rename to patches/server/0787-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch diff --git a/patches/server/0787-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0788-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch similarity index 100% rename from patches/server/0787-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch rename to patches/server/0788-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch diff --git a/patches/server/0788-Ensure-valid-vehicle-status.patch b/patches/server/0789-Ensure-valid-vehicle-status.patch similarity index 100% rename from patches/server/0788-Ensure-valid-vehicle-status.patch rename to patches/server/0789-Ensure-valid-vehicle-status.patch diff --git a/patches/server/0789-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0790-Prevent-softlocked-end-exit-portal-generation.patch similarity index 100% rename from patches/server/0789-Prevent-softlocked-end-exit-portal-generation.patch rename to patches/server/0790-Prevent-softlocked-end-exit-portal-generation.patch diff --git a/patches/server/0790-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0791-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch similarity index 100% rename from patches/server/0790-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch rename to patches/server/0791-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch diff --git a/patches/server/0791-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0792-Don-t-log-debug-logging-being-disabled.patch similarity index 100% rename from patches/server/0791-Don-t-log-debug-logging-being-disabled.patch rename to patches/server/0792-Don-t-log-debug-logging-being-disabled.patch diff --git a/patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch b/patches/server/0793-Mark-fish-and-axolotls-from-buckets-as-persistent.patch similarity index 100% rename from patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch rename to patches/server/0793-Mark-fish-and-axolotls-from-buckets-as-persistent.patch diff --git a/patches/server/0793-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0794-fix-various-menus-with-empty-level-accesses.patch similarity index 100% rename from patches/server/0793-fix-various-menus-with-empty-level-accesses.patch rename to patches/server/0794-fix-various-menus-with-empty-level-accesses.patch diff --git a/patches/server/0794-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch b/patches/server/0795-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch similarity index 100% rename from patches/server/0794-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch rename to patches/server/0795-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch diff --git a/patches/server/0795-Preserve-overstacked-loot.patch b/patches/server/0796-Preserve-overstacked-loot.patch similarity index 100% rename from patches/server/0795-Preserve-overstacked-loot.patch rename to patches/server/0796-Preserve-overstacked-loot.patch diff --git a/patches/server/0796-Update-head-rotation-in-missing-places.patch b/patches/server/0797-Update-head-rotation-in-missing-places.patch similarity index 100% rename from patches/server/0796-Update-head-rotation-in-missing-places.patch rename to patches/server/0797-Update-head-rotation-in-missing-places.patch diff --git a/patches/server/0797-prevent-unintended-light-block-manipulation.patch b/patches/server/0798-prevent-unintended-light-block-manipulation.patch similarity index 100% rename from patches/server/0797-prevent-unintended-light-block-manipulation.patch rename to patches/server/0798-prevent-unintended-light-block-manipulation.patch diff --git a/patches/server/0798-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch b/patches/server/0799-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch similarity index 100% rename from patches/server/0798-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch rename to patches/server/0799-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch diff --git a/patches/server/0799-Fix-CraftCriteria-defaults-map.patch b/patches/server/0800-Fix-CraftCriteria-defaults-map.patch similarity index 100% rename from patches/server/0799-Fix-CraftCriteria-defaults-map.patch rename to patches/server/0800-Fix-CraftCriteria-defaults-map.patch diff --git a/patches/server/0800-Fix-upstreams-block-state-factories.patch b/patches/server/0801-Fix-upstreams-block-state-factories.patch similarity index 100% rename from patches/server/0800-Fix-upstreams-block-state-factories.patch rename to patches/server/0801-Fix-upstreams-block-state-factories.patch diff --git a/patches/server/0801-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0802-Add-config-option-for-logging-player-ip-addresses.patch similarity index 100% rename from patches/server/0801-Add-config-option-for-logging-player-ip-addresses.patch rename to patches/server/0802-Add-config-option-for-logging-player-ip-addresses.patch diff --git a/patches/server/0802-Configurable-feature-seeds.patch b/patches/server/0803-Configurable-feature-seeds.patch similarity index 100% rename from patches/server/0802-Configurable-feature-seeds.patch rename to patches/server/0803-Configurable-feature-seeds.patch diff --git a/patches/server/0803-VanillaCommandWrapper-didnt-account-for-entity-sende.patch b/patches/server/0804-VanillaCommandWrapper-didnt-account-for-entity-sende.patch similarity index 100% rename from patches/server/0803-VanillaCommandWrapper-didnt-account-for-entity-sende.patch rename to patches/server/0804-VanillaCommandWrapper-didnt-account-for-entity-sende.patch diff --git a/patches/server/0804-Add-root-admin-user-detection.patch b/patches/server/0805-Add-root-admin-user-detection.patch similarity index 100% rename from patches/server/0804-Add-root-admin-user-detection.patch rename to patches/server/0805-Add-root-admin-user-detection.patch diff --git a/patches/server/0805-Always-allow-item-changing-in-Fireball.patch b/patches/server/0806-Always-allow-item-changing-in-Fireball.patch similarity index 100% rename from patches/server/0805-Always-allow-item-changing-in-Fireball.patch rename to patches/server/0806-Always-allow-item-changing-in-Fireball.patch diff --git a/patches/server/0806-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0807-don-t-attempt-to-teleport-dead-entities.patch similarity index 100% rename from patches/server/0806-don-t-attempt-to-teleport-dead-entities.patch rename to patches/server/0807-don-t-attempt-to-teleport-dead-entities.patch diff --git a/patches/server/0807-Call-onRemove-logic-for-breakNaturally.patch b/patches/server/0808-Call-onRemove-logic-for-breakNaturally.patch similarity index 100% rename from patches/server/0807-Call-onRemove-logic-for-breakNaturally.patch rename to patches/server/0808-Call-onRemove-logic-for-breakNaturally.patch diff --git a/patches/server/0808-Fix-anvil-prepare-event-not-working-with-zero-xp.patch b/patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch similarity index 100% rename from patches/server/0808-Fix-anvil-prepare-event-not-working-with-zero-xp.patch rename to patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch diff --git a/patches/server/0809-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0810-Prevent-excessive-velocity-through-repeated-crits.patch similarity index 100% rename from patches/server/0809-Prevent-excessive-velocity-through-repeated-crits.patch rename to patches/server/0810-Prevent-excessive-velocity-through-repeated-crits.patch diff --git a/patches/server/0810-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0811-Remove-client-side-code-using-deprecated-for-removal.patch similarity index 100% rename from patches/server/0810-Remove-client-side-code-using-deprecated-for-removal.patch rename to patches/server/0811-Remove-client-side-code-using-deprecated-for-removal.patch diff --git a/patches/server/0811-Rewrite-the-light-engine.patch b/patches/server/0812-Rewrite-the-light-engine.patch similarity index 99% rename from patches/server/0811-Rewrite-the-light-engine.patch rename to patches/server/0812-Rewrite-the-light-engine.patch index 71cbac333..8f1e7ceef 100644 --- a/patches/server/0811-Rewrite-the-light-engine.patch +++ b/patches/server/0812-Rewrite-the-light-engine.patch @@ -4746,13 +4746,13 @@ index fec2a2a9f958492eefbbffcaf8179a2fac5a4d99..731001489eb6d2562e4685af79efa811 // Paper end } diff --git a/src/main/java/net/minecraft/server/level/TicketType.java b/src/main/java/net/minecraft/server/level/TicketType.java -index 3c1698ba0d3bc412ab957777d9b5211dbc555208..858e94f07b675f4aed2930491633fb6e3a7d168e 100644 +index 41ddcf6775f99c56cf4b13b284420061e5dd6bdc..ae46429264e6a7e5c88b6b6a41a6df4db7b3e70d 100644 --- a/src/main/java/net/minecraft/server/level/TicketType.java +++ b/src/main/java/net/minecraft/server/level/TicketType.java -@@ -31,6 +31,7 @@ public class TicketType { - public static final TicketType PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit +@@ -32,6 +32,7 @@ public class TicketType { public static final TicketType PLUGIN_TICKET = TicketType.create("plugin_ticket", (plugin1, plugin2) -> plugin1.getClass().getName().compareTo(plugin2.getClass().getName())); // CraftBukkit public static final TicketType DELAY_UNLOAD = create("delay_unload", Long::compareTo, 300); // Paper + public static final TicketType REQUIRED_LOAD = create("required_load", Long::compareTo); // Paper - make sure getChunkAt does not fail + public static final TicketType CHUNK_RELIGHT = create("light_update", Long::compareTo); // Paper - ensure chunks stay loaded for lighting public static TicketType create(String name, Comparator argumentComparator) { diff --git a/patches/unapplied/server/0798-Always-parse-protochunk-light-sources-unless-it-is-m.patch b/patches/server/0813-Always-parse-protochunk-light-sources-unless-it-is-m.patch similarity index 74% rename from patches/unapplied/server/0798-Always-parse-protochunk-light-sources-unless-it-is-m.patch rename to patches/server/0813-Always-parse-protochunk-light-sources-unless-it-is-m.patch index 263c8c569..cd0dd1b77 100644 --- a/patches/unapplied/server/0798-Always-parse-protochunk-light-sources-unless-it-is-m.patch +++ b/patches/server/0813-Always-parse-protochunk-light-sources-unless-it-is-m.patch @@ -8,19 +8,19 @@ Chunks not marked as lit will always go through the light engine, so they should always have their block sources parsed. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index ad4081efec9c7eaf315ddb660f813f6ef3cfbb5b..7921ee2786d0d6a60d43786b20efc03a0f9178e3 100644 +index e54376b463b017d5e371f8d3204a37993b0e78e7..9b7bc1c9091d20671d281fa304722ac45fbf6e2e 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -267,16 +267,33 @@ public class ChunkSerializer { - protochunk.setLightEngine(lightengine); - } +@@ -304,16 +304,33 @@ public class ChunkSerializer { + BelowZeroRetrogen belowzeroretrogen = protochunk.getBelowZeroRetrogen(); + boolean flag2 = chunkstatus.isOrAfter(ChunkStatus.LIGHT) || belowzeroretrogen != null && belowzeroretrogen.targetStatus().isOrAfter(ChunkStatus.LIGHT); -- if (!flag && protochunk.getStatus().isOrAfter(ChunkStatus.LIGHT)) { -- Iterator iterator = BlockPos.betweenClosed(pos.getMinBlockX(), world.getMinBuildHeight(), pos.getMinBlockZ(), pos.getMaxBlockX(), world.getMaxBuildHeight() - 1, pos.getMaxBlockZ()).iterator(); +- if (!flag && flag2) { +- Iterator iterator = BlockPos.betweenClosed(chunkPos.getMinBlockX(), world.getMinBuildHeight(), chunkPos.getMinBlockZ(), chunkPos.getMaxBlockX(), world.getMaxBuildHeight() - 1, chunkPos.getMaxBlockZ()).iterator(); + if (!flag) { // Paper - fix incorrect parsing of blocks that emit light - it should always parse it, unless the chunk is marked as lit + // Paper start - let's make sure the implementation isn't as slow as possible -+ int offX = pos.x << 4; -+ int offZ = pos.z << 4; ++ int offX = chunkPos.x << 4; ++ int offZ = chunkPos.z << 4; + + int minChunkSection = io.papermc.paper.util.WorldUtil.getMinSection(world); + int maxChunkSection = io.papermc.paper.util.WorldUtil.getMaxSection(world); @@ -28,7 +28,7 @@ index ad4081efec9c7eaf315ddb660f813f6ef3cfbb5b..7921ee2786d0d6a60d43786b20efc03a + LevelChunkSection[] sections = achunksection; + for (int sectionY = minChunkSection; sectionY <= maxChunkSection; ++sectionY) { + LevelChunkSection section = sections[sectionY - minChunkSection]; -+ if (section == null || section.isEmpty()) { ++ if (section == null || section.hasOnlyAir()) { + // no sources in empty sections + continue; + }