From 7c8fdc1fb60212217e26040593b03d30642b5bcd Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 5 Dec 2021 13:58:01 -0800 Subject: [PATCH] Add dropped hunk from mid-tick tasks (#7034) --- patches/server/0006-MC-Utils.patch | 4 ++-- ... 0755-Optimise-chunk-tick-iteration.patch} | 12 +++++----- ...> 0756-Execute-chunk-tasks-mid-tick.patch} | 22 ++++++++++++++++++- ... => 0757-Do-not-copy-visible-chunks.patch} | 0 ...ulate-regionfile-header-if-it-is-co.patch} | 0 ...ementation-for-blockstate-state-loo.patch} | 0 ...-more-information-in-watchdog-dumps.patch} | 2 +- ...lly-inline-methods-in-BlockPosition.patch} | 0 ... 0762-Distance-manager-tick-timings.patch} | 2 +- ...ler-threads-according-to-the-plugin.patch} | 0 ...-getChunkAt-has-inlined-logic-for-l.patch} | 0 ...h => 0765-Add-packet-limiter-config.patch} | 0 ... 0766-Lag-compensate-block-breaking.patch} | 0 ...Stem-registry-when-loading-default-.patch} | 0 ...our-chunk-data-off-disk-when-conver.patch} | 0 ...sh-calls-for-entity-tracker-packets.patch} | 8 +++---- ...-lookup-fluid-state-when-raytracing.patch} | 0 ...atch => 0771-Time-scoreboard-search.patch} | 0 ...packets-for-hard-colliding-entities.patch} | 0 ...3-Do-not-run-raytrace-logic-for-AIR.patch} | 0 ...rimise-map-impl-for-tracked-players.patch} | 0 ...imise-BlockSoil-nearby-water-lookup.patch} | 0 ...ition-of-entities-to-entity-ticklis.patch} | 0 ... 0777-Optimise-random-block-ticking.patch} | 4 ++-- ...8-Optimise-non-flush-packet-sending.patch} | 0 ...0779-Optimise-nearby-player-lookups.patch} | 4 ++-- ...=> 0780-Optimise-WorldServer-notify.patch} | 2 +- ...0781-Remove-streams-for-villager-AI.patch} | 0 ...> 0782-Rewrite-dataconverter-system.patch} | 0 ...city-compression-and-cipher-natives.patch} | 2 +- ...hread-worker-count-for-low-core-cou.patch} | 0 ...tity-loads-in-CraftChunk-getEntitie.patch} | 0 ...ifications-to-critical-entity-state.patch} | 0 ...ix-Bukkit-NamespacedKey-shenanigans.patch} | 0 ...ntory-not-closing-on-entity-removal.patch} | 2 +- ...rement-before-suggesting-root-nodes.patch} | 0 ...ServerboundCommandSuggestionPacket-.patch} | 2 +- ...nColor-on-tropical-fish-bucket-meta.patch} | 0 ...=> 0792-Ensure-valid-vehicle-status.patch} | 0 ...ftlocked-end-exit-portal-generation.patch} | 0 ...r-causing-a-crash-when-trying-to-ge.patch} | 0 ...-t-log-debug-logging-being-disabled.patch} | 0 ...axolotls-from-buckets-as-persistent.patch} | 0 ...ous-menus-with-empty-level-accesses.patch} | 0 ...-O-threads-with-chunk-data-while-fl.patch} | 0 ...h => 0799-Preserve-overstacked-loot.patch} | 2 +- ...ate-head-rotation-in-missing-places.patch} | 0 ...unintended-light-block-manipulation.patch} | 0 ...piglins-and-hoglins-towards-mob-cap.patch} | 0 ...0803-Fix-CraftCriteria-defaults-map.patch} | 0 ...Fix-upstreams-block-state-factories.patch} | 0 ...ion-for-logging-player-ip-addresses.patch} | 2 +- ... => 0806-Configurable-feature-seeds.patch} | 2 +- ...pper-didnt-account-for-entity-sende.patch} | 0 ... 0808-Add-root-admin-user-detection.patch} | 0 ...ays-allow-item-changing-in-Fireball.patch} | 0 ...t-attempt-to-teleport-dead-entities.patch} | 2 +- ...l-onRemove-logic-for-breakNaturally.patch} | 2 +- ...pare-event-not-working-with-zero-xp.patch} | 0 ...ive-velocity-through-repeated-crits.patch} | 0 ...e-code-using-deprecated-for-removal.patch} | 0 ...ch => 0815-Rewrite-the-light-engine.patch} | 2 +- ...ochunk-light-sources-unless-it-is-m.patch} | 0 ....patch => 0817-Fix-removing-recipes.patch} | 0 ...versized-item-data-in-equipment-and.patch} | 0 ...e-unnecessary-itemmeta-from-clients.patch} | 2 +- ...ier-changing-growth-for-other-crops.patch} | 0 ...OpenersCounter-openCount-from-going.patch} | 0 ...0822-Add-PlayerItemFrameChangeEvent.patch} | 0 ...> 0823-Add-player-health-update-API.patch} | 0 ...tch => 0824-Optimize-HashMapPalette.patch} | 0 ...low-delegation-to-vanilla-chunk-gen.patch} | 0 ...ingle-and-multi-AABB-VoxelShapes-an.patch} | 0 ...n-checking-in-player-move-packet-ha.patch} | 0 todo.txt | 19 ---------------- 75 files changed, 50 insertions(+), 49 deletions(-) rename patches/server/{0827-Optimise-chunk-tick-iteration.patch => 0755-Optimise-chunk-tick-iteration.patch} (92%) rename patches/server/{0755-Execute-chunk-tasks-mid-tick.patch => 0756-Execute-chunk-tasks-mid-tick.patch} (85%) rename patches/server/{0756-Do-not-copy-visible-chunks.patch => 0757-Do-not-copy-visible-chunks.patch} (100%) rename patches/server/{0757-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch => 0758-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch} (100%) rename patches/server/{0758-Custom-table-implementation-for-blockstate-state-loo.patch => 0759-Custom-table-implementation-for-blockstate-state-loo.patch} (100%) rename patches/server/{0759-Detail-more-information-in-watchdog-dumps.patch => 0760-Detail-more-information-in-watchdog-dumps.patch} (99%) rename patches/server/{0760-Manually-inline-methods-in-BlockPosition.patch => 0761-Manually-inline-methods-in-BlockPosition.patch} (100%) rename patches/server/{0761-Distance-manager-tick-timings.patch => 0762-Distance-manager-tick-timings.patch} (96%) rename patches/server/{0762-Name-craft-scheduler-threads-according-to-the-plugin.patch => 0763-Name-craft-scheduler-threads-according-to-the-plugin.patch} (100%) rename patches/server/{0763-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch => 0764-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch} (100%) rename patches/server/{0764-Add-packet-limiter-config.patch => 0765-Add-packet-limiter-config.patch} (100%) rename patches/server/{0765-Lag-compensate-block-breaking.patch => 0766-Lag-compensate-block-breaking.patch} (100%) rename patches/server/{0766-Use-correct-LevelStem-registry-when-loading-default-.patch => 0767-Use-correct-LevelStem-registry-when-loading-default-.patch} (100%) rename patches/server/{0767-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch => 0768-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch} (100%) rename patches/server/{0768-Consolidate-flush-calls-for-entity-tracker-packets.patch => 0769-Consolidate-flush-calls-for-entity-tracker-packets.patch} (89%) rename patches/server/{0769-Don-t-lookup-fluid-state-when-raytracing.patch => 0770-Don-t-lookup-fluid-state-when-raytracing.patch} (100%) rename patches/server/{0770-Time-scoreboard-search.patch => 0771-Time-scoreboard-search.patch} (100%) rename patches/server/{0771-Send-full-pos-packets-for-hard-colliding-entities.patch => 0772-Send-full-pos-packets-for-hard-colliding-entities.patch} (100%) rename patches/server/{0772-Do-not-run-raytrace-logic-for-AIR.patch => 0773-Do-not-run-raytrace-logic-for-AIR.patch} (100%) rename patches/server/{0773-Oprimise-map-impl-for-tracked-players.patch => 0774-Oprimise-map-impl-for-tracked-players.patch} (100%) rename patches/server/{0774-Optimise-BlockSoil-nearby-water-lookup.patch => 0775-Optimise-BlockSoil-nearby-water-lookup.patch} (100%) rename patches/server/{0775-Allow-removal-addition-of-entities-to-entity-ticklis.patch => 0776-Allow-removal-addition-of-entities-to-entity-ticklis.patch} (100%) rename patches/server/{0776-Optimise-random-block-ticking.patch => 0777-Optimise-random-block-ticking.patch} (99%) rename patches/server/{0777-Optimise-non-flush-packet-sending.patch => 0778-Optimise-non-flush-packet-sending.patch} (100%) rename patches/server/{0778-Optimise-nearby-player-lookups.patch => 0779-Optimise-nearby-player-lookups.patch} (99%) rename patches/server/{0779-Optimise-WorldServer-notify.patch => 0780-Optimise-WorldServer-notify.patch} (99%) rename patches/server/{0780-Remove-streams-for-villager-AI.patch => 0781-Remove-streams-for-villager-AI.patch} (100%) rename patches/server/{0781-Rewrite-dataconverter-system.patch => 0782-Rewrite-dataconverter-system.patch} (100%) rename patches/server/{0782-Use-Velocity-compression-and-cipher-natives.patch => 0783-Use-Velocity-compression-and-cipher-natives.patch} (99%) rename patches/server/{0783-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch => 0784-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch} (100%) rename patches/server/{0784-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch => 0785-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch} (100%) rename patches/server/{0785-Async-catch-modifications-to-critical-entity-state.patch => 0786-Async-catch-modifications-to-critical-entity-state.patch} (100%) rename patches/server/{0786-Fix-Bukkit-NamespacedKey-shenanigans.patch => 0787-Fix-Bukkit-NamespacedKey-shenanigans.patch} (100%) rename patches/server/{0787-Fix-merchant-inventory-not-closing-on-entity-removal.patch => 0788-Fix-merchant-inventory-not-closing-on-entity-removal.patch} (93%) rename patches/server/{0788-Check-requirement-before-suggesting-root-nodes.patch => 0789-Check-requirement-before-suggesting-root-nodes.patch} (100%) rename patches/server/{0789-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch => 0790-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch} (91%) rename patches/server/{0790-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch => 0791-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch} (100%) rename patches/server/{0791-Ensure-valid-vehicle-status.patch => 0792-Ensure-valid-vehicle-status.patch} (100%) rename patches/server/{0792-Prevent-softlocked-end-exit-portal-generation.patch => 0793-Prevent-softlocked-end-exit-portal-generation.patch} (100%) rename patches/server/{0793-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch => 0794-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch} (100%) rename patches/server/{0794-Don-t-log-debug-logging-being-disabled.patch => 0795-Don-t-log-debug-logging-being-disabled.patch} (100%) rename patches/server/{0795-Mark-fish-and-axolotls-from-buckets-as-persistent.patch => 0796-Mark-fish-and-axolotls-from-buckets-as-persistent.patch} (100%) rename patches/server/{0796-fix-various-menus-with-empty-level-accesses.patch => 0797-fix-various-menus-with-empty-level-accesses.patch} (100%) rename patches/server/{0797-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch => 0798-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch} (100%) rename patches/server/{0798-Preserve-overstacked-loot.patch => 0799-Preserve-overstacked-loot.patch} (97%) rename patches/server/{0799-Update-head-rotation-in-missing-places.patch => 0800-Update-head-rotation-in-missing-places.patch} (100%) rename patches/server/{0800-prevent-unintended-light-block-manipulation.patch => 0801-prevent-unintended-light-block-manipulation.patch} (100%) rename patches/server/{0801-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch => 0802-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch} (100%) rename patches/server/{0802-Fix-CraftCriteria-defaults-map.patch => 0803-Fix-CraftCriteria-defaults-map.patch} (100%) rename patches/server/{0803-Fix-upstreams-block-state-factories.patch => 0804-Fix-upstreams-block-state-factories.patch} (100%) rename patches/server/{0804-Add-config-option-for-logging-player-ip-addresses.patch => 0805-Add-config-option-for-logging-player-ip-addresses.patch} (98%) rename patches/server/{0805-Configurable-feature-seeds.patch => 0806-Configurable-feature-seeds.patch} (98%) rename patches/server/{0806-VanillaCommandWrapper-didnt-account-for-entity-sende.patch => 0807-VanillaCommandWrapper-didnt-account-for-entity-sende.patch} (100%) rename patches/server/{0807-Add-root-admin-user-detection.patch => 0808-Add-root-admin-user-detection.patch} (100%) rename patches/server/{0808-Always-allow-item-changing-in-Fireball.patch => 0809-Always-allow-item-changing-in-Fireball.patch} (100%) rename patches/server/{0809-don-t-attempt-to-teleport-dead-entities.patch => 0810-don-t-attempt-to-teleport-dead-entities.patch} (91%) rename patches/server/{0810-Call-onRemove-logic-for-breakNaturally.patch => 0811-Call-onRemove-logic-for-breakNaturally.patch} (92%) rename patches/server/{0811-Fix-anvil-prepare-event-not-working-with-zero-xp.patch => 0812-Fix-anvil-prepare-event-not-working-with-zero-xp.patch} (100%) rename patches/server/{0812-Prevent-excessive-velocity-through-repeated-crits.patch => 0813-Prevent-excessive-velocity-through-repeated-crits.patch} (100%) rename patches/server/{0813-Remove-client-side-code-using-deprecated-for-removal.patch => 0814-Remove-client-side-code-using-deprecated-for-removal.patch} (100%) rename patches/server/{0814-Rewrite-the-light-engine.patch => 0815-Rewrite-the-light-engine.patch} (99%) rename patches/server/{0815-Always-parse-protochunk-light-sources-unless-it-is-m.patch => 0816-Always-parse-protochunk-light-sources-unless-it-is-m.patch} (100%) rename patches/server/{0816-Fix-removing-recipes.patch => 0817-Fix-removing-recipes.patch} (100%) rename patches/server/{0817-Prevent-sending-oversized-item-data-in-equipment-and.patch => 0818-Prevent-sending-oversized-item-data-in-equipment-and.patch} (100%) rename patches/server/{0818-Hide-unnecessary-itemmeta-from-clients.patch => 0819-Hide-unnecessary-itemmeta-from-clients.patch} (98%) rename patches/server/{0819-Fix-kelp-modifier-changing-growth-for-other-crops.patch => 0820-Fix-kelp-modifier-changing-growth-for-other-crops.patch} (100%) rename patches/server/{0820-Prevent-ContainerOpenersCounter-openCount-from-going.patch => 0821-Prevent-ContainerOpenersCounter-openCount-from-going.patch} (100%) rename patches/server/{0821-Add-PlayerItemFrameChangeEvent.patch => 0822-Add-PlayerItemFrameChangeEvent.patch} (100%) rename patches/server/{0822-Add-player-health-update-API.patch => 0823-Add-player-health-update-API.patch} (100%) rename patches/server/{0823-Optimize-HashMapPalette.patch => 0824-Optimize-HashMapPalette.patch} (100%) rename patches/server/{0824-Allow-delegation-to-vanilla-chunk-gen.patch => 0825-Allow-delegation-to-vanilla-chunk-gen.patch} (100%) rename patches/server/{0825-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch => 0826-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch} (100%) rename patches/server/{0826-Optimise-collision-checking-in-player-move-packet-ha.patch => 0827-Optimise-collision-checking-in-player-move-packet-ha.patch} (100%) diff --git a/patches/server/0006-MC-Utils.patch b/patches/server/0006-MC-Utils.patch index b1fe48c977..0c065fc992 100644 --- a/patches/server/0006-MC-Utils.patch +++ b/patches/server/0006-MC-Utils.patch @@ -6511,7 +6511,7 @@ index bfcaaa69991342f71fba4df46f69aea2ec6adca7..0ea0690ab1d45f60a2b13cf8a69e5802 this.levelHeightAccessor = heightLimitView; this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()]; 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 28555314738ba891e0e36d3c85b1623116f743dd..3f09451a04404231f1eaac0954c0ecf01b7507ea 100644 +index 28555314738ba891e0e36d3c85b1623116f743dd..0f8302c8fda85f8fb5cf24974d9013706dcc5a0a 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -24,6 +24,7 @@ import net.minecraft.nbt.CompoundTag; @@ -6528,7 +6528,7 @@ index 28555314738ba891e0e36d3c85b1623116f743dd..3f09451a04404231f1eaac0954c0ecf0 + // Paper start + public final com.destroystokyo.paper.util.maplist.EntityList entities = new com.destroystokyo.paper.util.maplist.EntityList(); -+ public ChunkHolder playerChunk; ++ public @Nullable ChunkHolder playerChunk; + + static final int NEIGHBOUR_CACHE_RADIUS = 3; + public static int getNeighbourCacheRadius() { diff --git a/patches/server/0827-Optimise-chunk-tick-iteration.patch b/patches/server/0755-Optimise-chunk-tick-iteration.patch similarity index 92% rename from patches/server/0827-Optimise-chunk-tick-iteration.patch rename to patches/server/0755-Optimise-chunk-tick-iteration.patch index 3921f5b13a..ca24ea128f 100644 --- a/patches/server/0827-Optimise-chunk-tick-iteration.patch +++ b/patches/server/0755-Optimise-chunk-tick-iteration.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise chunk tick iteration Use a dedicated list of entity ticking chunks to reduce the cost diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 51c4ca36221e9af074fa92f6ab94fa7ba5403080..8d38a5a4c74d3f9298ba4f215e978fbc25ba91f0 100644 +index 280ca8758cbaf710c2bf357e41dd2af6e14b49bc..4f502f1c8a86a28e2cd6513516f3846ed74be891 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -1001,34 +1001,46 @@ public class ServerChunkCache extends ChunkSource { +@@ -999,34 +999,46 @@ public class ServerChunkCache extends ChunkSource { this.lastSpawnState = spawnercreature_d; gameprofilerfiller.popPush("filteringLoadedChunks"); @@ -72,7 +72,7 @@ index 51c4ca36221e9af074fa92f6ab94fa7ba5403080..8d38a5a4c74d3f9298ba4f215e978fbc NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1); } -@@ -1036,7 +1048,16 @@ public class ServerChunkCache extends ChunkSource { +@@ -1034,7 +1046,16 @@ public class ServerChunkCache extends ChunkSource { this.level.tickChunk(chunk1, k); } } @@ -89,7 +89,7 @@ index 51c4ca36221e9af074fa92f6ab94fa7ba5403080..8d38a5a4c74d3f9298ba4f215e978fbc this.level.timings.chunkTicks.stopTiming(); // Paper gameprofilerfiller.popPush("customSpawners"); if (flag2) { -@@ -1045,13 +1066,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -1043,13 +1064,7 @@ public class ServerChunkCache extends ChunkSource { } // Paper - timings } @@ -102,5 +102,5 @@ index 51c4ca36221e9af074fa92f6ab94fa7ba5403080..8d38a5a4c74d3f9298ba4f215e978fbc - gameprofilerfiller.pop(); + // Paper - no, iterating just ONCE is expensive enough! Don't do it TWICE! Code moved up gameprofilerfiller.pop(); - // Paper start - controlled flush for entity tracker packets - List disabledFlushes = new java.util.ArrayList<>(this.level.players.size()); + this.chunkMap.tick(); + } diff --git a/patches/server/0755-Execute-chunk-tasks-mid-tick.patch b/patches/server/0756-Execute-chunk-tasks-mid-tick.patch similarity index 85% rename from patches/server/0755-Execute-chunk-tasks-mid-tick.patch rename to patches/server/0756-Execute-chunk-tasks-mid-tick.patch index 0f2185edb1..09c7b22a67 100644 --- a/patches/server/0755-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0756-Execute-chunk-tasks-mid-tick.patch @@ -107,8 +107,28 @@ index 088334869cb62797a1e1d1bbb6187f03189d852d..c245c1f4611f7273c8da629f774e0c64 return true; } else { if (this.haveTime()) { +diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +index ad352b4b67632f9984c4d10994a9acfe434a4996..df415f79dfd2ae9a709747b112022b38437daac4 100644 +--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java ++++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +@@ -1023,6 +1023,7 @@ public class ServerChunkCache extends ChunkSource { + iterator1 = shuffled.iterator(); + } + ++ int chunksTicked = 0; // Paper + try { + while (iterator1.hasNext()) { + LevelChunk chunk1 = iterator1.next(); +@@ -1044,6 +1045,7 @@ public class ServerChunkCache extends ChunkSource { + + if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { + this.level.tickChunk(chunk1, k); ++ if ((chunksTicked++ & 1) == 0) net.minecraft.server.MinecraftServer.getServer().executeMidTickTasks(); // Paper + } + } + // Paper start - optimise chunk tick iteration diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2459b8bfbb73310be66e354112c39e0ded1db036..f4b61f719c422028a5d8bc63c29f7a1c44fd2a6c 100644 +index 427deff283b5e47e68966ad6af8823b282b20cf8..5fc77bd9a05d5fad7c49d15fe64ccab14ec37bc3 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -198,7 +198,9 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0756-Do-not-copy-visible-chunks.patch b/patches/server/0757-Do-not-copy-visible-chunks.patch similarity index 100% rename from patches/server/0756-Do-not-copy-visible-chunks.patch rename to patches/server/0757-Do-not-copy-visible-chunks.patch diff --git a/patches/server/0757-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/0758-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch similarity index 100% rename from patches/server/0757-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to patches/server/0758-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch diff --git a/patches/server/0758-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/0759-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/server/0758-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/server/0759-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/server/0759-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0760-Detail-more-information-in-watchdog-dumps.patch similarity index 99% rename from patches/server/0759-Detail-more-information-in-watchdog-dumps.patch rename to patches/server/0760-Detail-more-information-in-watchdog-dumps.patch index f2bfb8aeaf..c0bd75a9ce 100644 --- a/patches/server/0759-Detail-more-information-in-watchdog-dumps.patch +++ b/patches/server/0760-Detail-more-information-in-watchdog-dumps.patch @@ -77,7 +77,7 @@ index bcf53ec07b8eeec7a88fb67e6fb908362e6f51b0..acc12307f61e1e055896b68fe16654c9 }); throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f4b61f719c422028a5d8bc63c29f7a1c44fd2a6c..a1b4a9c92b2b602b2de97424eefbb0677a80dede 100644 +index 5fc77bd9a05d5fad7c49d15fe64ccab14ec37bc3..495bcfdb63957363915ff0d5dbf538d467b9ec0f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -973,7 +973,26 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0760-Manually-inline-methods-in-BlockPosition.patch b/patches/server/0761-Manually-inline-methods-in-BlockPosition.patch similarity index 100% rename from patches/server/0760-Manually-inline-methods-in-BlockPosition.patch rename to patches/server/0761-Manually-inline-methods-in-BlockPosition.patch diff --git a/patches/server/0761-Distance-manager-tick-timings.patch b/patches/server/0762-Distance-manager-tick-timings.patch similarity index 96% rename from patches/server/0761-Distance-manager-tick-timings.patch rename to patches/server/0762-Distance-manager-tick-timings.patch index a79ba7d3e5..0274a09f76 100644 --- a/patches/server/0761-Distance-manager-tick-timings.patch +++ b/patches/server/0762-Distance-manager-tick-timings.patch @@ -19,7 +19,7 @@ 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 9f0321179fb1d87b6e1b74e128955157983b0500..0d9f8180110b072e54d6c0f8c64df584b40776b9 100644 +index b89596e3394698d91bb5720648916e01c251f52e..bcca5262f9658b5e8f30c389faf371b3857fd6a4 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -834,6 +834,7 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0762-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/server/0763-Name-craft-scheduler-threads-according-to-the-plugin.patch similarity index 100% rename from patches/server/0762-Name-craft-scheduler-threads-according-to-the-plugin.patch rename to patches/server/0763-Name-craft-scheduler-threads-according-to-the-plugin.patch diff --git a/patches/server/0763-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0764-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch similarity index 100% rename from patches/server/0763-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch rename to patches/server/0764-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch diff --git a/patches/server/0764-Add-packet-limiter-config.patch b/patches/server/0765-Add-packet-limiter-config.patch similarity index 100% rename from patches/server/0764-Add-packet-limiter-config.patch rename to patches/server/0765-Add-packet-limiter-config.patch diff --git a/patches/server/0765-Lag-compensate-block-breaking.patch b/patches/server/0766-Lag-compensate-block-breaking.patch similarity index 100% rename from patches/server/0765-Lag-compensate-block-breaking.patch rename to patches/server/0766-Lag-compensate-block-breaking.patch diff --git a/patches/server/0766-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0767-Use-correct-LevelStem-registry-when-loading-default-.patch similarity index 100% rename from patches/server/0766-Use-correct-LevelStem-registry-when-loading-default-.patch rename to patches/server/0767-Use-correct-LevelStem-registry-when-loading-default-.patch diff --git a/patches/server/0767-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/server/0768-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch similarity index 100% rename from patches/server/0767-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch rename to patches/server/0768-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch diff --git a/patches/server/0768-Consolidate-flush-calls-for-entity-tracker-packets.patch b/patches/server/0769-Consolidate-flush-calls-for-entity-tracker-packets.patch similarity index 89% rename from patches/server/0768-Consolidate-flush-calls-for-entity-tracker-packets.patch rename to patches/server/0769-Consolidate-flush-calls-for-entity-tracker-packets.patch index 5a4d4e942a..85e5738ffc 100644 --- a/patches/server/0768-Consolidate-flush-calls-for-entity-tracker-packets.patch +++ b/patches/server/0769-Consolidate-flush-calls-for-entity-tracker-packets.patch @@ -22,12 +22,12 @@ 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 0d9f8180110b072e54d6c0f8c64df584b40776b9..758bb0fae0f9ba9672250e4a65c27f1175eab12d 100644 +index bcca5262f9658b5e8f30c389faf371b3857fd6a4..aee92dc0d5b26fcd4df48169bdb02ed8b9cc1b4e 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -1053,7 +1053,24 @@ public class ServerChunkCache extends ChunkSource { - }); - gameprofilerfiller.pop(); +@@ -1070,7 +1070,24 @@ public class ServerChunkCache extends ChunkSource { + + // Paper - no, iterating just ONCE is expensive enough! Don't do it TWICE! Code moved up gameprofilerfiller.pop(); + // Paper start - controlled flush for entity tracker packets + List disabledFlushes = new java.util.ArrayList<>(this.level.players.size()); diff --git a/patches/server/0769-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/server/0770-Don-t-lookup-fluid-state-when-raytracing.patch similarity index 100% rename from patches/server/0769-Don-t-lookup-fluid-state-when-raytracing.patch rename to patches/server/0770-Don-t-lookup-fluid-state-when-raytracing.patch diff --git a/patches/server/0770-Time-scoreboard-search.patch b/patches/server/0771-Time-scoreboard-search.patch similarity index 100% rename from patches/server/0770-Time-scoreboard-search.patch rename to patches/server/0771-Time-scoreboard-search.patch diff --git a/patches/server/0771-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0772-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/server/0771-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/0772-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/server/0772-Do-not-run-raytrace-logic-for-AIR.patch b/patches/server/0773-Do-not-run-raytrace-logic-for-AIR.patch similarity index 100% rename from patches/server/0772-Do-not-run-raytrace-logic-for-AIR.patch rename to patches/server/0773-Do-not-run-raytrace-logic-for-AIR.patch diff --git a/patches/server/0773-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0774-Oprimise-map-impl-for-tracked-players.patch similarity index 100% rename from patches/server/0773-Oprimise-map-impl-for-tracked-players.patch rename to patches/server/0774-Oprimise-map-impl-for-tracked-players.patch diff --git a/patches/server/0774-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0775-Optimise-BlockSoil-nearby-water-lookup.patch similarity index 100% rename from patches/server/0774-Optimise-BlockSoil-nearby-water-lookup.patch rename to patches/server/0775-Optimise-BlockSoil-nearby-water-lookup.patch diff --git a/patches/server/0775-Allow-removal-addition-of-entities-to-entity-ticklis.patch b/patches/server/0776-Allow-removal-addition-of-entities-to-entity-ticklis.patch similarity index 100% rename from patches/server/0775-Allow-removal-addition-of-entities-to-entity-ticklis.patch rename to patches/server/0776-Allow-removal-addition-of-entities-to-entity-ticklis.patch diff --git a/patches/server/0776-Optimise-random-block-ticking.patch b/patches/server/0777-Optimise-random-block-ticking.patch similarity index 99% rename from patches/server/0776-Optimise-random-block-ticking.patch rename to patches/server/0777-Optimise-random-block-ticking.patch index 906f0a2193..24277f8c22 100644 --- a/patches/server/0776-Optimise-random-block-ticking.patch +++ b/patches/server/0777-Optimise-random-block-ticking.patch @@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..e8b4053babe46999980b926431254050 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a1b4a9c92b2b602b2de97424eefbb0677a80dede..0e8bfceeb2eae9b465e8810c67073e11ff882ea7 100644 +index 495bcfdb63957363915ff0d5dbf538d467b9ec0f..17b01c1592ec2481d1ff444ff12dbc3790e09368 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -639,6 +639,10 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -264,7 +264,7 @@ index 6426d6c2c31ead49444fe56e2230266290fa79dd..881a2318aac72526e0451688af58c620 public void getAll(IntConsumer action) { int i = 0; diff --git a/src/main/java/net/minecraft/util/ZeroBitStorage.java b/src/main/java/net/minecraft/util/ZeroBitStorage.java -index 172e7a0761724cc802387e613258830a0defb04a..55c486349ddb295d4d4c6fa9214cdae90f851948 100644 +index 9686ce7536c9924b1b2aced4f013f46759cbc72e..5d8e9bdf5538b19681f21949368d862fab8a89ad 100644 --- a/src/main/java/net/minecraft/util/ZeroBitStorage.java +++ b/src/main/java/net/minecraft/util/ZeroBitStorage.java @@ -46,6 +46,15 @@ public class ZeroBitStorage implements BitStorage { diff --git a/patches/server/0777-Optimise-non-flush-packet-sending.patch b/patches/server/0778-Optimise-non-flush-packet-sending.patch similarity index 100% rename from patches/server/0777-Optimise-non-flush-packet-sending.patch rename to patches/server/0778-Optimise-non-flush-packet-sending.patch diff --git a/patches/server/0778-Optimise-nearby-player-lookups.patch b/patches/server/0779-Optimise-nearby-player-lookups.patch similarity index 99% rename from patches/server/0778-Optimise-nearby-player-lookups.patch rename to patches/server/0779-Optimise-nearby-player-lookups.patch index 155aa7711e..a7293bc1ff 100644 --- a/patches/server/0778-Optimise-nearby-player-lookups.patch +++ b/patches/server/0779-Optimise-nearby-player-lookups.patch @@ -92,7 +92,7 @@ index 9ab37d95b0dbd13dfe31b34b2a91c2a7bc7f6e64..27e9bd7dabb5f827b8baf126565d1efb protected ChunkGenerator generator() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0e8bfceeb2eae9b465e8810c67073e11ff882ea7..c525d8aed8f0671ad6cfef67cadaeb311a4d5e97 100644 +index 17b01c1592ec2481d1ff444ff12dbc3790e09368..3ce8055f0fb8c5b605356e4e85ee1dbdcc73ba0e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -396,6 +396,83 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -309,7 +309,7 @@ index 928025438af179711c42381fc3eaeac74cd20c59..c48d0773e7f1af4bc247d777eccc8a42 private static Boolean isValidSpawnPostitionForType(ServerLevel world, MobCategory group, StructureFeatureManager structureAccessor, ChunkGenerator chunkGenerator, MobSpawnSettings.SpawnerData spawnEntry, BlockPos.MutableBlockPos pos, double squaredDistance) { // Paper 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 b641bf5b2d02bfc1443a84af3cb98aff0dc7a575..c9cd9121e0ca7402c812e803ffd417c1887a4823 100644 +index f73b3bb9b92fab3ca73d8561672797c1fd3e318b..c30204c5daac422eb009a447c1eb4fbc94a84318 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -235,6 +235,93 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0779-Optimise-WorldServer-notify.patch b/patches/server/0780-Optimise-WorldServer-notify.patch similarity index 99% rename from patches/server/0779-Optimise-WorldServer-notify.patch rename to patches/server/0780-Optimise-WorldServer-notify.patch index c553f2a0cb..57fa172a05 100644 --- a/patches/server/0779-Optimise-WorldServer-notify.patch +++ b/patches/server/0780-Optimise-WorldServer-notify.patch @@ -110,7 +110,7 @@ index 27e9bd7dabb5f827b8baf126565d1efb9eb2c2ef..a14effa7f8f56a27bccd4479baad82fc } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c525d8aed8f0671ad6cfef67cadaeb311a4d5e97..0cf1c9203addc602f3ed0cf7a3c439b98bc73e9b 100644 +index 3ce8055f0fb8c5b605356e4e85ee1dbdcc73ba0e..051c32968d5b134f6f83dd9ac7db7e608ec1a4f2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1090,6 +1090,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0780-Remove-streams-for-villager-AI.patch b/patches/server/0781-Remove-streams-for-villager-AI.patch similarity index 100% rename from patches/server/0780-Remove-streams-for-villager-AI.patch rename to patches/server/0781-Remove-streams-for-villager-AI.patch diff --git a/patches/server/0781-Rewrite-dataconverter-system.patch b/patches/server/0782-Rewrite-dataconverter-system.patch similarity index 100% rename from patches/server/0781-Rewrite-dataconverter-system.patch rename to patches/server/0782-Rewrite-dataconverter-system.patch diff --git a/patches/server/0782-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0783-Use-Velocity-compression-and-cipher-natives.patch similarity index 99% rename from patches/server/0782-Use-Velocity-compression-and-cipher-natives.patch rename to patches/server/0783-Use-Velocity-compression-and-cipher-natives.patch index f3d0058479..64e78ac585 100644 --- a/patches/server/0782-Use-Velocity-compression-and-cipher-natives.patch +++ b/patches/server/0783-Use-Velocity-compression-and-cipher-natives.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use Velocity compression and cipher natives diff --git a/build.gradle.kts b/build.gradle.kts -index a5e3868343f6dd0c483d59962b0aed301b973cc6..cd74406039704e5a880f00b9b60bb7b1dedc5398 100644 +index 3381ac7c25323d662935c98aa444195c49cf4e8e..5678a9f8d2aa8a7afbc5729570ec297b12acf75d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,6 +44,11 @@ dependencies { diff --git a/patches/server/0783-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch b/patches/server/0784-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch similarity index 100% rename from patches/server/0783-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch rename to patches/server/0784-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch diff --git a/patches/server/0784-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch b/patches/server/0785-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch similarity index 100% rename from patches/server/0784-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch rename to patches/server/0785-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch diff --git a/patches/server/0785-Async-catch-modifications-to-critical-entity-state.patch b/patches/server/0786-Async-catch-modifications-to-critical-entity-state.patch similarity index 100% rename from patches/server/0785-Async-catch-modifications-to-critical-entity-state.patch rename to patches/server/0786-Async-catch-modifications-to-critical-entity-state.patch diff --git a/patches/server/0786-Fix-Bukkit-NamespacedKey-shenanigans.patch b/patches/server/0787-Fix-Bukkit-NamespacedKey-shenanigans.patch similarity index 100% rename from patches/server/0786-Fix-Bukkit-NamespacedKey-shenanigans.patch rename to patches/server/0787-Fix-Bukkit-NamespacedKey-shenanigans.patch diff --git a/patches/server/0787-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0788-Fix-merchant-inventory-not-closing-on-entity-removal.patch similarity index 93% rename from patches/server/0787-Fix-merchant-inventory-not-closing-on-entity-removal.patch rename to patches/server/0788-Fix-merchant-inventory-not-closing-on-entity-removal.patch index d50214bb27..9cd01be5f2 100644 --- a/patches/server/0787-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0788-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0cf1c9203addc602f3ed0cf7a3c439b98bc73e9b..f055d25394d20afb208e8612fb31d77af141876b 100644 +index 051c32968d5b134f6f83dd9ac7db7e608ec1a4f2..e371ffb1f88e08883a1a2460260ff368c0cfe853 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2440,6 +2440,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0788-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0789-Check-requirement-before-suggesting-root-nodes.patch similarity index 100% rename from patches/server/0788-Check-requirement-before-suggesting-root-nodes.patch rename to patches/server/0789-Check-requirement-before-suggesting-root-nodes.patch diff --git a/patches/server/0789-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0790-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch similarity index 91% rename from patches/server/0789-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch rename to patches/server/0790-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch index c34f26e3fb..2dbc76dea7 100644 --- a/patches/server/0789-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch +++ b/patches/server/0790-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7b6cf326dfab9bd0b13dfc330d143d2efeea9aa1..3eba6962040f33b7b31b16c9de22d90f225710b4 100644 +index d572a0f423844606a8e96eba1f7570d9d356077c..f4f075c678f30d375d15041860fcc5543eedc7fe 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -762,6 +762,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser diff --git a/patches/server/0790-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0791-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch similarity index 100% rename from patches/server/0790-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch rename to patches/server/0791-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch diff --git a/patches/server/0791-Ensure-valid-vehicle-status.patch b/patches/server/0792-Ensure-valid-vehicle-status.patch similarity index 100% rename from patches/server/0791-Ensure-valid-vehicle-status.patch rename to patches/server/0792-Ensure-valid-vehicle-status.patch diff --git a/patches/server/0792-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0793-Prevent-softlocked-end-exit-portal-generation.patch similarity index 100% rename from patches/server/0792-Prevent-softlocked-end-exit-portal-generation.patch rename to patches/server/0793-Prevent-softlocked-end-exit-portal-generation.patch diff --git a/patches/server/0793-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0794-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch similarity index 100% rename from patches/server/0793-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch rename to patches/server/0794-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch diff --git a/patches/server/0794-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0795-Don-t-log-debug-logging-being-disabled.patch similarity index 100% rename from patches/server/0794-Don-t-log-debug-logging-being-disabled.patch rename to patches/server/0795-Don-t-log-debug-logging-being-disabled.patch diff --git a/patches/server/0795-Mark-fish-and-axolotls-from-buckets-as-persistent.patch b/patches/server/0796-Mark-fish-and-axolotls-from-buckets-as-persistent.patch similarity index 100% rename from patches/server/0795-Mark-fish-and-axolotls-from-buckets-as-persistent.patch rename to patches/server/0796-Mark-fish-and-axolotls-from-buckets-as-persistent.patch diff --git a/patches/server/0796-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0797-fix-various-menus-with-empty-level-accesses.patch similarity index 100% rename from patches/server/0796-fix-various-menus-with-empty-level-accesses.patch rename to patches/server/0797-fix-various-menus-with-empty-level-accesses.patch diff --git a/patches/server/0797-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch b/patches/server/0798-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch similarity index 100% rename from patches/server/0797-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch rename to patches/server/0798-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch diff --git a/patches/server/0798-Preserve-overstacked-loot.patch b/patches/server/0799-Preserve-overstacked-loot.patch similarity index 97% rename from patches/server/0798-Preserve-overstacked-loot.patch rename to patches/server/0799-Preserve-overstacked-loot.patch index adf5975922..c344524a24 100644 --- a/patches/server/0798-Preserve-overstacked-loot.patch +++ b/patches/server/0799-Preserve-overstacked-loot.patch @@ -10,7 +10,7 @@ chunk bans via the large amount of NBT created by unstacking the items. Fixes GH-5140 and GH-4748. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index d549455e893a2e65fb6f4a529cc9685420190da9..6dc4c20464783c021104f5f20e76eca48323e81f 100644 +index f0073bafac729f018ad3264f673c158c1ed5b0d7..ea67eb1099e6ec34426d80c95e9999f4aa8793b9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -901,6 +901,11 @@ public class PaperWorldConfig { diff --git a/patches/server/0799-Update-head-rotation-in-missing-places.patch b/patches/server/0800-Update-head-rotation-in-missing-places.patch similarity index 100% rename from patches/server/0799-Update-head-rotation-in-missing-places.patch rename to patches/server/0800-Update-head-rotation-in-missing-places.patch diff --git a/patches/server/0800-prevent-unintended-light-block-manipulation.patch b/patches/server/0801-prevent-unintended-light-block-manipulation.patch similarity index 100% rename from patches/server/0800-prevent-unintended-light-block-manipulation.patch rename to patches/server/0801-prevent-unintended-light-block-manipulation.patch diff --git a/patches/server/0801-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch b/patches/server/0802-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch similarity index 100% rename from patches/server/0801-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch rename to patches/server/0802-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch diff --git a/patches/server/0802-Fix-CraftCriteria-defaults-map.patch b/patches/server/0803-Fix-CraftCriteria-defaults-map.patch similarity index 100% rename from patches/server/0802-Fix-CraftCriteria-defaults-map.patch rename to patches/server/0803-Fix-CraftCriteria-defaults-map.patch diff --git a/patches/server/0803-Fix-upstreams-block-state-factories.patch b/patches/server/0804-Fix-upstreams-block-state-factories.patch similarity index 100% rename from patches/server/0803-Fix-upstreams-block-state-factories.patch rename to patches/server/0804-Fix-upstreams-block-state-factories.patch diff --git a/patches/server/0804-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0805-Add-config-option-for-logging-player-ip-addresses.patch similarity index 98% rename from patches/server/0804-Add-config-option-for-logging-player-ip-addresses.patch rename to patches/server/0805-Add-config-option-for-logging-player-ip-addresses.patch index fdf4ff8ea0..39b64883ac 100644 --- a/patches/server/0804-Add-config-option-for-logging-player-ip-addresses.patch +++ b/patches/server/0805-Add-config-option-for-logging-player-ip-addresses.patch @@ -81,7 +81,7 @@ index d2dd8b802ecea7fd2efe5f07fcef65c26e1adfbc..33a29890435d6065a2cc4f8e8bf8209c @Override diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8a74c1aa2add393f4706a7f943f0fd5d9f5175e1..40d55cade76d0e8f39f91a322bc8a821877efa2c 100644 +index 81650be96a25f276c4df958dc4f339c75b39211e..25b787d1b22e495fb6756e4ee909776ed8699492 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -237,7 +237,7 @@ public abstract class PlayerList { diff --git a/patches/server/0805-Configurable-feature-seeds.patch b/patches/server/0806-Configurable-feature-seeds.patch similarity index 98% rename from patches/server/0805-Configurable-feature-seeds.patch rename to patches/server/0806-Configurable-feature-seeds.patch index 5b2812d7fc..4a81ec7caf 100644 --- a/patches/server/0805-Configurable-feature-seeds.patch +++ b/patches/server/0806-Configurable-feature-seeds.patch @@ -19,7 +19,7 @@ index ee53453440177537fc653ea156785d7591498614..5e3b7fb2e0b7608610555cd23e7ad25a } final Object val = config.get(key); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6dc4c20464783c021104f5f20e76eca48323e81f..21e502716f312849b5232d1a3c5c87dc76394fee 100644 +index ea67eb1099e6ec34426d80c95e9999f4aa8793b9..8150330bc55a010c7d0f96421586226631eb72f7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -946,6 +946,55 @@ public class PaperWorldConfig { diff --git a/patches/server/0806-VanillaCommandWrapper-didnt-account-for-entity-sende.patch b/patches/server/0807-VanillaCommandWrapper-didnt-account-for-entity-sende.patch similarity index 100% rename from patches/server/0806-VanillaCommandWrapper-didnt-account-for-entity-sende.patch rename to patches/server/0807-VanillaCommandWrapper-didnt-account-for-entity-sende.patch diff --git a/patches/server/0807-Add-root-admin-user-detection.patch b/patches/server/0808-Add-root-admin-user-detection.patch similarity index 100% rename from patches/server/0807-Add-root-admin-user-detection.patch rename to patches/server/0808-Add-root-admin-user-detection.patch diff --git a/patches/server/0808-Always-allow-item-changing-in-Fireball.patch b/patches/server/0809-Always-allow-item-changing-in-Fireball.patch similarity index 100% rename from patches/server/0808-Always-allow-item-changing-in-Fireball.patch rename to patches/server/0809-Always-allow-item-changing-in-Fireball.patch diff --git a/patches/server/0809-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0810-don-t-attempt-to-teleport-dead-entities.patch similarity index 91% rename from patches/server/0809-don-t-attempt-to-teleport-dead-entities.patch rename to patches/server/0810-don-t-attempt-to-teleport-dead-entities.patch index a828511ee7..ffaf509f20 100644 --- a/patches/server/0809-don-t-attempt-to-teleport-dead-entities.patch +++ b/patches/server/0810-don-t-attempt-to-teleport-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] don't attempt to teleport dead entities diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cd18e0eff4814e106b48118c8c6c43ccd66ac79d..3febcc7e88b74d4bdb45e633fdaa9d3313a6ae0b 100644 +index 62b9abd299980f5e3cf711003dfbb90cf1687ae9..516015eb48900abaf0e2f47de4ffd10e9cf4d9a7 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -706,7 +706,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i diff --git a/patches/server/0810-Call-onRemove-logic-for-breakNaturally.patch b/patches/server/0811-Call-onRemove-logic-for-breakNaturally.patch similarity index 92% rename from patches/server/0810-Call-onRemove-logic-for-breakNaturally.patch rename to patches/server/0811-Call-onRemove-logic-for-breakNaturally.patch index e7fd337046..8ccb77cbf1 100644 --- a/patches/server/0810-Call-onRemove-logic-for-breakNaturally.patch +++ b/patches/server/0811-Call-onRemove-logic-for-breakNaturally.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call onRemove logic for breakNaturally diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 808bdd0e8d6b679c2eee87c3078a4c3dbcd08b8b..2da1609c42bc85f173ed56767933bcafd5f0422e 100644 +index fcf2e5b0b07d2884b678b9c39b72cc7dc5518163..ca320ef8a28fe15b32197669419981c4c2fcafd9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -516,8 +516,14 @@ public class CraftBlock implements Block { diff --git a/patches/server/0811-Fix-anvil-prepare-event-not-working-with-zero-xp.patch b/patches/server/0812-Fix-anvil-prepare-event-not-working-with-zero-xp.patch similarity index 100% rename from patches/server/0811-Fix-anvil-prepare-event-not-working-with-zero-xp.patch rename to patches/server/0812-Fix-anvil-prepare-event-not-working-with-zero-xp.patch diff --git a/patches/server/0812-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0813-Prevent-excessive-velocity-through-repeated-crits.patch similarity index 100% rename from patches/server/0812-Prevent-excessive-velocity-through-repeated-crits.patch rename to patches/server/0813-Prevent-excessive-velocity-through-repeated-crits.patch diff --git a/patches/server/0813-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0814-Remove-client-side-code-using-deprecated-for-removal.patch similarity index 100% rename from patches/server/0813-Remove-client-side-code-using-deprecated-for-removal.patch rename to patches/server/0814-Remove-client-side-code-using-deprecated-for-removal.patch diff --git a/patches/server/0814-Rewrite-the-light-engine.patch b/patches/server/0815-Rewrite-the-light-engine.patch similarity index 99% rename from patches/server/0814-Rewrite-the-light-engine.patch rename to patches/server/0815-Rewrite-the-light-engine.patch index dc20ddf6e0..95cd8326c2 100644 --- a/patches/server/0814-Rewrite-the-light-engine.patch +++ b/patches/server/0815-Rewrite-the-light-engine.patch @@ -4949,7 +4949,7 @@ index 7c5b3acd299c5b021bd20f17ff0b89c8208a6623..d29739c3a67e60741a06fb25bcaf7705 super(wrapped.getPos(), UpgradeData.EMPTY, wrapped.levelHeightAccessor, wrapped.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), wrapped.getBlendingData()); this.wrapped = wrapped; 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 b39904f011d86f6ced80e4d3fb48c26ccfa7f828..b0e3c49989216dc886471ae84f7e05b01b9ae786 100644 +index c30204c5daac422eb009a447c1eb4fbc94a84318..37ff1d911db531b6e51aa4234bcdffcce66722cf 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -100,6 +100,10 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0815-Always-parse-protochunk-light-sources-unless-it-is-m.patch b/patches/server/0816-Always-parse-protochunk-light-sources-unless-it-is-m.patch similarity index 100% rename from patches/server/0815-Always-parse-protochunk-light-sources-unless-it-is-m.patch rename to patches/server/0816-Always-parse-protochunk-light-sources-unless-it-is-m.patch diff --git a/patches/server/0816-Fix-removing-recipes.patch b/patches/server/0817-Fix-removing-recipes.patch similarity index 100% rename from patches/server/0816-Fix-removing-recipes.patch rename to patches/server/0817-Fix-removing-recipes.patch diff --git a/patches/server/0817-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0818-Prevent-sending-oversized-item-data-in-equipment-and.patch similarity index 100% rename from patches/server/0817-Prevent-sending-oversized-item-data-in-equipment-and.patch rename to patches/server/0818-Prevent-sending-oversized-item-data-in-equipment-and.patch diff --git a/patches/server/0818-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0819-Hide-unnecessary-itemmeta-from-clients.patch similarity index 98% rename from patches/server/0818-Hide-unnecessary-itemmeta-from-clients.patch rename to patches/server/0819-Hide-unnecessary-itemmeta-from-clients.patch index 930da9494d..36d52956b0 100644 --- a/patches/server/0818-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0819-Hide-unnecessary-itemmeta-from-clients.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Hide unnecessary itemmeta from clients diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fd5927247e23878fd8bf6ab62a2eb477d07f4cc3..0544f03b65696fe9e972283254f7e51a98586072 100644 +index 8150330bc55a010c7d0f96421586226631eb72f7..d71cd626bcbefc576f9c05b8885acc9fb2a33cd5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -916,6 +916,13 @@ public class PaperWorldConfig { diff --git a/patches/server/0819-Fix-kelp-modifier-changing-growth-for-other-crops.patch b/patches/server/0820-Fix-kelp-modifier-changing-growth-for-other-crops.patch similarity index 100% rename from patches/server/0819-Fix-kelp-modifier-changing-growth-for-other-crops.patch rename to patches/server/0820-Fix-kelp-modifier-changing-growth-for-other-crops.patch diff --git a/patches/server/0820-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0821-Prevent-ContainerOpenersCounter-openCount-from-going.patch similarity index 100% rename from patches/server/0820-Prevent-ContainerOpenersCounter-openCount-from-going.patch rename to patches/server/0821-Prevent-ContainerOpenersCounter-openCount-from-going.patch diff --git a/patches/server/0821-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0822-Add-PlayerItemFrameChangeEvent.patch similarity index 100% rename from patches/server/0821-Add-PlayerItemFrameChangeEvent.patch rename to patches/server/0822-Add-PlayerItemFrameChangeEvent.patch diff --git a/patches/server/0822-Add-player-health-update-API.patch b/patches/server/0823-Add-player-health-update-API.patch similarity index 100% rename from patches/server/0822-Add-player-health-update-API.patch rename to patches/server/0823-Add-player-health-update-API.patch diff --git a/patches/server/0823-Optimize-HashMapPalette.patch b/patches/server/0824-Optimize-HashMapPalette.patch similarity index 100% rename from patches/server/0823-Optimize-HashMapPalette.patch rename to patches/server/0824-Optimize-HashMapPalette.patch diff --git a/patches/server/0824-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0825-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 100% rename from patches/server/0824-Allow-delegation-to-vanilla-chunk-gen.patch rename to patches/server/0825-Allow-delegation-to-vanilla-chunk-gen.patch diff --git a/patches/server/0825-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0826-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch similarity index 100% rename from patches/server/0825-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch rename to patches/server/0826-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch diff --git a/patches/server/0826-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0827-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 100% rename from patches/server/0826-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/server/0827-Optimise-collision-checking-in-player-move-packet-ha.patch diff --git a/todo.txt b/todo.txt index 85f181aec3..10e952eda4 100644 --- a/todo.txt +++ b/todo.txt @@ -4,27 +4,8 @@ Improve Server Thread Pool and Thread Priorities: mojang added a max thread coun Use Vanilla Minecart Speeds: is this needed? 0467-Optimize-WorldBorder-collision-checks-and-air check first hunk that has been removed -Not sure where this needs to go, if anywhere -diff --git a/src/main/java/net/minecraft/world/phys/shapes/Shapes.java b/src/main/java/net/minecraft/world/phys/shapes/Shapes.java -index 48812329969b7192acd948db974bb77bb546f979..5b1e0ea40dea6c7d787699ed25160c8b75ab3bf3 100644 ---- a/src/main/java/net/minecraft/world/phys/shapes/Shapes.java -+++ b/src/main/java/net/minecraft/world/phys/shapes/Shapes.java -@@ -237,7 +237,8 @@ public final class Shapes { - - if (s < 3) { - mutableBlockPos.set(axisCycle, q, r, p); -- BlockState blockState = world.getBlockState(mutableBlockPos); -+ BlockState blockState = world.getTypeIfLoaded(mutableBlockPos); // Paper -+ if (blockState == null) return 0.0D; // Paper - if ((s != 1 || blockState.hasLargeCollisionShape()) && (s != 2 || blockState.is(Blocks.MOVING_PISTON))) { - initial = blockState.getCollisionShape(world, mutableBlockPos, context).collide(axis3, box.move((double)(-mutableBlockPos.getX()), (double)(-mutableBlockPos.getY()), (double)(-mutableBlockPos.getZ())), initial); - if (Math.abs(initial) < 1.0E-7D) { - - - check ChunkHolder#updateFutures async catcher -leaf: check mid tick chunk task diff in ServerChunkCache optimize nearby player lookups - look at patch and updateranges diff in chunkmap (why is it in this patch) GENERAL_AREA_MAP_ACCEPTABLE_SEARCH_RANGE_SQUARED is unused?