diff --git a/patches/server-remapped/0362-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch b/patches/removed/1.17/0362-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch similarity index 99% rename from patches/server-remapped/0362-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch rename to patches/removed/1.17/0362-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch index 9769725fb1..f172c356ec 100644 --- a/patches/server-remapped/0362-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch +++ b/patches/removed/1.17/0362-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 May 2020 20:29:02 -0400 Subject: [PATCH] Synchronize DataPaletteBlock instead of ReentrantLock - +1.17: Mini have fun I don't want to die Mojang has flaws in their logic about chunks being concurrently wrote to. So we constantly see crashes around multiple threads writing. diff --git a/patches/server-remapped/0363-incremental-chunk-saving.patch b/patches/removed/1.17/0363-incremental-chunk-saving.patch similarity index 99% rename from patches/server-remapped/0363-incremental-chunk-saving.patch rename to patches/removed/1.17/0363-incremental-chunk-saving.patch index 1600ad9506..70420b4593 100644 --- a/patches/server-remapped/0363-incremental-chunk-saving.patch +++ b/patches/removed/1.17/0363-incremental-chunk-saving.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 9 Jun 2019 03:53:22 +0100 Subject: [PATCH] incremental chunk saving - +1.17: saved for MM diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index ffe9b1a63d78925e1d77b9e730aef42fed6d58fa..1278d09f70c1e97607ef20d87a178dc252c7f723 100644 diff --git a/patches/server-remapped/0364-Anti-Xray.patch b/patches/removed/1.17/0364-Anti-Xray.patch similarity index 99% rename from patches/server-remapped/0364-Anti-Xray.patch rename to patches/removed/1.17/0364-Anti-Xray.patch index 95ed9fdc2a..250195a551 100644 --- a/patches/server-remapped/0364-Anti-Xray.patch +++ b/patches/removed/1.17/0364-Anti-Xray.patch @@ -2,7 +2,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 20 Aug 2018 03:03:58 +0200 Subject: [PATCH] Anti-Xray - +stonar96 — Today at 15:49 +I'm just here to watch you suffer :smile: +You can skip it if you want and I can do it later. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index 1278d09f70c1e97607ef20d87a178dc252c7f723..c45493e88bf7e8811be2759ff9ac19e3fe9d938a 100644 diff --git a/patches/server-remapped/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/patches/removed/1.17/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 96% rename from patches/server-remapped/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to patches/removed/1.17/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch index 17630cf486..a5be725dd8 100644 --- a/patches/server-remapped/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/patches/removed/1.17/0367-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jul 2019 00:51:11 +0100 Subject: [PATCH] Mark entities as being ticked when notifying navigation - +1.17: Check how this is done after rework diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java index 7a09bc921827958f58290bd3d6f19984bb34a8f6..a811ced17721b70bb51837f47e466c2261db2466 100644 diff --git a/patches/server-remapped/0369-Avoid-hopper-searches-if-there-are-no-items.patch b/patches/removed/1.17/0369-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 99% rename from patches/server-remapped/0369-Avoid-hopper-searches-if-there-are-no-items.patch rename to patches/removed/1.17/0369-Avoid-hopper-searches-if-there-are-no-items.patch index ee50904042..f4d9a785b8 100644 --- a/patches/server-remapped/0369-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/patches/removed/1.17/0369-Avoid-hopper-searches-if-there-are-no-items.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: CullanP Date: Thu, 3 Mar 2016 02:13:38 -0600 Subject: [PATCH] Avoid hopper searches if there are no items - +1.17: figure this out after methods got moved Hoppers searching for items and minecarts is the most expensive part of hopper ticking. We keep track of the number of minecarts and items in a chunk. If there are no items in the chunk, we skip searching for items. diff --git a/patches/server-remapped/0371-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/removed/1.17/0371-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 99% rename from patches/server-remapped/0371-Use-getChunkIfLoadedImmediately-in-places.patch rename to patches/removed/1.17/0371-Use-getChunkIfLoadedImmediately-in-places.patch index 3becb4b6e9..cc0346dfaf 100644 --- a/patches/server-remapped/0371-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/removed/1.17/0371-Use-getChunkIfLoadedImmediately-in-places.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 8 Jul 2019 00:13:36 -0700 Subject: [PATCH] Use getChunkIfLoadedImmediately in places - +1.17: figure out moved entitiy stuff again This prevents us from hitting chunk loads for chunks at or less-than ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/patches/server-remapped/0372-Reduce-sync-loads.patch b/patches/removed/1.17/0372-Reduce-sync-loads.patch similarity index 99% rename from patches/server-remapped/0372-Reduce-sync-loads.patch rename to patches/removed/1.17/0372-Reduce-sync-loads.patch index 5349d43158..b8467f22af 100644 --- a/patches/server-remapped/0372-Reduce-sync-loads.patch +++ b/patches/removed/1.17/0372-Reduce-sync-loads.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 19 Jul 2019 03:29:14 -0700 Subject: [PATCH] Reduce sync loads - +1.17: more entity stuff that someone has to figure out! This reduces calls to getChunkAt which would load chunks. This patch also adds a tool to find calls which are doing this, however diff --git a/patches/server-remapped/0373-Implement-alternative-item-despawn-rate.patch b/patches/removed/1.17/0373-Implement-alternative-item-despawn-rate.patch similarity index 99% rename from patches/server-remapped/0373-Implement-alternative-item-despawn-rate.patch rename to patches/removed/1.17/0373-Implement-alternative-item-despawn-rate.patch index 21aa2f962b..dde0e838a6 100644 --- a/patches/server-remapped/0373-Implement-alternative-item-despawn-rate.patch +++ b/patches/removed/1.17/0373-Implement-alternative-item-despawn-rate.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Mon, 3 Jun 2019 02:02:39 -0400 Subject: [PATCH] Implement alternative item-despawn-rate - +1.17: kickash32 want's to do that later diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index 1ee2cced100626e48eb36ee14f84b9257c79a2f8..b913cd2dd0cd1b369b3f7b5a9d8b1be73f6d7920 100644 diff --git a/patches/server-remapped/0376-implement-optional-per-player-mob-spawns.patch b/patches/removed/1.17/0376-implement-optional-per-player-mob-spawns.patch similarity index 99% rename from patches/server-remapped/0376-implement-optional-per-player-mob-spawns.patch rename to patches/removed/1.17/0376-implement-optional-per-player-mob-spawns.patch index 70bcd1b1bd..ad609e6f05 100644 --- a/patches/server-remapped/0376-implement-optional-per-player-mob-spawns.patch +++ b/patches/removed/1.17/0376-implement-optional-per-player-mob-spawns.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Mon, 19 Aug 2019 01:27:58 +0500 Subject: [PATCH] implement optional per player mob spawns - +1.17: kickash will take a look at this; has to be figured out again because of changes diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java index 24eac9400fbf971742e89bbf47b0ba52b587c4eb..b818a7451d45d2ab7d4678f0065ada9017d8a631 100644 diff --git a/patches/server-remapped/0361-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0331-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 94% rename from patches/server-remapped/0361-Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/0331-Show-blockstate-location-if-we-failed-to-read-it.patch index 873d34715d..f19e042336 100644 --- a/patches/server-remapped/0361-Show-blockstate-location-if-we-failed-to-read-it.patch +++ b/patches/server/0331-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Show blockstate location if we failed to read it diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 730fda7f0bf02400d349959e9cc2aafaed000b21..66aee7635cd9260d97ae9dd2e9a2a0590fe3c433 100644 +index 9a30770a2f68e1253afe3ca8ecdae19c988248f9..2b2c9e58eabe148c994152d2596e29a313be921b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -19,6 +19,8 @@ public class CraftBlockEntityState extends CraftBlockStat diff --git a/patches/server-remapped/0365-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0332-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 79% rename from patches/server-remapped/0365-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/0332-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 0d019759ff..fbf0003ead 100644 --- a/patches/server-remapped/0365-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/patches/server/0332-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,13 +17,14 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c45493e88bf7e8811be2759ff9ac19e3fe9d938a..384cb363eed794551bee6b0ec11ba1be92a3d7ac 100644 +index 090958a30ce20ff01ae77d4cd821a167474f0214..baf33659b021c89cbd02560cbfd9b0ddf205f0e2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -464,6 +464,16 @@ public class PaperWorldConfig { - maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); +@@ -401,4 +401,15 @@ public class PaperWorldConfig { + private void preventMovingIntoUnloadedChunks() { + preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false); } - ++ + public boolean countAllMobsForSpawning = false; + private void countAllMobsForSpawning() { + countAllMobsForSpawning = getBoolean("count-all-mobs-for-spawning", false); @@ -33,15 +34,13 @@ index c45493e88bf7e8811be2759ff9ac19e3fe9d938a..384cb363eed794551bee6b0ec11ba1be + log("Using improved mob spawn limits (Only Natural Spawns impact spawn limits for more natural spawns)"); + } + } + } + - public boolean antiXray; - public EngineMode engineMode; - public int maxChunkSectionIndex; diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index e23875ae07c23fed1161ea070e63bbc3a30168a0..0fb69f9194078e5e05e36ed909eb48424b6465b4 100644 +index 30ba1e3cb75d994770b006b9dfd6669000a9c1a4..e20a645e28a2e503c02b2bd89424e95506a2e6df 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -79,6 +79,13 @@ public final class NaturalSpawner { +@@ -85,6 +85,13 @@ public final class NaturalSpawner { MobCategory enumcreaturetype = entity.getType().getCategory(); if (enumcreaturetype != MobCategory.MISC) { @@ -53,5 +52,5 @@ index e23875ae07c23fed1161ea070e63bbc3a30168a0..0fb69f9194078e5e05e36ed909eb4842 + } + // Paper end BlockPos blockposition = entity.blockPosition(); - long j = ChunkPos.asLong(blockposition.getX() >> 4, blockposition.getZ() >> 4); + long j = ChunkPos.asLong(SectionPos.blockToSectionCoord(blockposition.getX()), SectionPos.blockToSectionCoord(blockposition.getZ())); diff --git a/patches/server-remapped/0366-Configurable-projectile-relative-velocity.patch b/patches/server/0333-Configurable-projectile-relative-velocity.patch similarity index 85% rename from patches/server-remapped/0366-Configurable-projectile-relative-velocity.patch rename to patches/server/0333-Configurable-projectile-relative-velocity.patch index 111827bdd8..48d891fe8a 100644 --- a/patches/server-remapped/0366-Configurable-projectile-relative-velocity.patch +++ b/patches/server/0333-Configurable-projectile-relative-velocity.patch @@ -25,11 +25,11 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 384cb363eed794551bee6b0ec11ba1be92a3d7ac..1ee2cced100626e48eb36ee14f84b9257c79a2f8 100644 +index baf33659b021c89cbd02560cbfd9b0ddf205f0e2..4c177a383b277debe8a7c02a70d029d862e6b048 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -507,4 +507,9 @@ public class PaperWorldConfig { - Bukkit.getLogger().warning("You have enabled permission-based Anti-Xray checking - depending on your permission plugin, this may cause performance issues"); +@@ -411,5 +411,10 @@ public class PaperWorldConfig { + log("Using improved mob spawn limits (Only Natural Spawns impact spawn limits for more natural spawns)"); } } + @@ -38,11 +38,12 @@ index 384cb363eed794551bee6b0ec11ba1be92a3d7ac..1ee2cced100626e48eb36ee14f84b925 + disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false); + } } + diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index d385fb6eee5000951c350b6ced5669dc3dcce725..ca3d936433cd47caa4e0335e41246b1c4ce0eb99 100644 +index 7311923d36ee872b4331d84f80709bb6cee61086..69f439851fe1ff07d827eaed274940a5783d5f6c 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -129,7 +129,7 @@ public abstract class Projectile extends Entity { +@@ -161,7 +161,7 @@ public abstract class Projectile extends Entity { this.shoot((double) f5, (double) f6, (double) f7, modifierZ, modifierXYZ); Vec3 vec3d = user.getDeltaMovement(); diff --git a/patches/server-remapped/0368-offset-item-frame-ticking.patch b/patches/server/0334-offset-item-frame-ticking.patch similarity index 90% rename from patches/server-remapped/0368-offset-item-frame-ticking.patch rename to patches/server/0334-offset-item-frame-ticking.patch index 32966f397f..5c65f244d8 100644 --- a/patches/server-remapped/0368-offset-item-frame-ticking.patch +++ b/patches/server/0334-offset-item-frame-ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] offset item frame ticking diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -index e0bf8c6c838b18a0c55b6f3317033e892b631f5c..3277a56bcf3831f8d3c9fa9168c608b369eed7e4 100644 +index acea1c03afb5b3e522edb072fd1c3f9b5c3edccc..ca9decf85dd1af0baf0d34a48aa67cbb9f4eb586 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java +++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java @@ -35,7 +35,7 @@ public abstract class HangingEntity extends Entity { diff --git a/patches/server-remapped/0374-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/patches/server/0335-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 85% rename from patches/server-remapped/0374-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to patches/server/0335-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index eab9bd3397..eb3a0b6db9 100644 --- a/patches/server-remapped/0374-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/patches/server/0335-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,13 +7,13 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 643d75b999c3da006eaaab11f4acd77e807683d4..753e6f609189c589514739bea80007bace3c89d2 100644 +index 40e48c3f1199b127066732e3c8a6d40c232215b2..f00839eab02277bf10b742c88fadc4aa9e89e7e0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -628,12 +628,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { @@ -24,7 +24,7 @@ index 643d75b999c3da006eaaab11f4acd77e807683d4..753e6f609189c589514739bea80007ba // CraftBukkit start if (world.generator != null) { Random rand = new Random(world.getSeed()); -@@ -649,6 +644,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop