diff --git a/patches/api/0055-Item-canEntityPickup.patch b/patches/api/0055-Item-canEntityPickup.patch index 27894bda9..1d18a940a 100644 --- a/patches/api/0055-Item-canEntityPickup.patch +++ b/patches/api/0055-Item-canEntityPickup.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java -index 3f2736fbddd8661e764bc2f8d0499bd13ca91df5..c404a5b8efea7c780db5ddae19456753808abb3d 100644 +index 65dd4554c6cc0801fcbc0ef6809b794dcebd1124..ab06c640cef1309ab44b0fae8d95df48cdc869a7 100644 --- a/src/main/java/org/bukkit/entity/Item.java +++ b/src/main/java/org/bukkit/entity/Item.java -@@ -75,4 +75,20 @@ public interface Item extends Entity { +@@ -89,4 +89,20 @@ public interface Item extends Entity { */ @Nullable public UUID getThrower(); diff --git a/patches/api/0230-Item-no-age-no-player-pickup.patch b/patches/api/0230-Item-no-age-no-player-pickup.patch index 142a8b520..5dd757212 100644 --- a/patches/api/0230-Item-no-age-no-player-pickup.patch +++ b/patches/api/0230-Item-no-age-no-player-pickup.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Item no age & no player pickup diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java -index c404a5b8efea7c780db5ddae19456753808abb3d..0ee072645ecf1bf5feb74de6960947ef76db366e 100644 +index ab06c640cef1309ab44b0fae8d95df48cdc869a7..48858e1c58c13d786bbc935abedb0f059837833c 100644 --- a/src/main/java/org/bukkit/entity/Item.java +++ b/src/main/java/org/bukkit/entity/Item.java -@@ -90,5 +90,34 @@ public interface Item extends Entity { +@@ -104,5 +104,34 @@ public interface Item extends Entity { * @param canMobPickup True to allow non-player entity pickup */ public void setCanMobPickup(boolean canMobPickup); diff --git a/patches/api/0348-Add-API-for-item-entity-health.patch b/patches/api/0348-Add-API-for-item-entity-health.patch index 913f679ec..94373dbdf 100644 --- a/patches/api/0348-Add-API-for-item-entity-health.patch +++ b/patches/api/0348-Add-API-for-item-entity-health.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add API for item entity health diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java -index 0ee072645ecf1bf5feb74de6960947ef76db366e..87dbc00ab565377b8ae0eb6e73799ae6e2e3a376 100644 +index 48858e1c58c13d786bbc935abedb0f059837833c..d0bef15785493b512ff0f7414c1d58d38fead581 100644 --- a/src/main/java/org/bukkit/entity/Item.java +++ b/src/main/java/org/bukkit/entity/Item.java -@@ -119,5 +119,24 @@ public interface Item extends Entity { +@@ -133,5 +133,24 @@ public interface Item extends Entity { * @param willAge True if the item should age */ public void setWillAge(boolean willAge); diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch index 9ca9d1a8d..20d71f445 100644 --- a/patches/server/0003-Build-system-changes.patch +++ b/patches/server/0003-Build-system-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes diff --git a/build.gradle.kts b/build.gradle.kts -index be24f2f1c72ffcb033fe99bd9197af2c0bed4e69..c1f97f5bb806e3c92a2b4633142d3214e11f7074 100644 +index bc894c62618437215e1a7185dc20283e4f9963dd..f08a6a00ad4d4c96166b386b3e79dc1ea021db3a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,10 +13,9 @@ repositories { @@ -39,7 +39,7 @@ index be24f2f1c72ffcb033fe99bd9197af2c0bed4e69..c1f97f5bb806e3c92a2b4633142d3214 for (tld in setOf("net", "com", "org")) { attributes("$tld/bukkit", "Sealed" to true) diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 3067833570c62e4d135b11b8637b52b8167ab269..b698d6a8d6b59eefd721639b62bfd8bcffcf5c6f 100644 +index e1963817af4d73c569da068b74ebbb260c5183cc..d20bb61700ba231cc5b58295f2a819ff7e7db705 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -190,7 +190,7 @@ public class Main { @@ -50,7 +50,7 @@ index 3067833570c62e4d135b11b8637b52b8167ab269..b698d6a8d6b59eefd721639b62bfd8bc + Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -3); + deadline.add(Calendar.DAY_OF_YEAR, -21); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/patches/server/0004-Paper-config-files.patch b/patches/server/0004-Paper-config-files.patch index fba78da45..43bda5596 100644 --- a/patches/server/0004-Paper-config-files.patch +++ b/patches/server/0004-Paper-config-files.patch @@ -629,10 +629,10 @@ index 9e4cca119722c2edc478fdd1a34af4370649aa5c..b49528d8a2c577def4f74ee694ffd53b Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9d38f78ba0db10578cfbcce29059e108272d0034..89522ebf7b11801cf8b9893a1bae50a1ee88ff79 100644 +index 6016216921232bedba84acc1f6a87a3cfbb75850..ef128de5fe17231b39edb12a7014291d03cf79ec 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -603,6 +603,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -963,6 +964,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements CommandSource, AutoCloseable { -@@ -895,6 +895,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 5000000000L) { -@@ -1264,15 +1285,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit @@ -861,10 +860,10 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d this.profiler.push("tallying"); long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i; -@@ -1283,30 +1307,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> scheduleChunkLoad(ChunkPos pos) { return CompletableFuture.supplyAsync(() -> { @@ -1067,7 +1066,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0 boolean flag = nbttagcompound.contains("Status", 8); if (flag) { -@@ -708,7 +713,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -696,7 +701,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } ChunkMap.LOGGER.error("Chunk file at {} is missing level data, skipping", pos); @@ -1076,7 +1075,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0 } catch (ReportedException reportedexception) { Throwable throwable = reportedexception.getCause(); -@@ -825,6 +830,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -813,6 +818,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel()); return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> { @@ -1084,7 +1083,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0 ChunkPos chunkcoordintpair = chunkHolder.getPos(); ProtoChunk protochunk = (ProtoChunk) ichunkaccess; LevelChunk chunk; -@@ -849,6 +855,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -837,6 +843,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } return chunk; @@ -1092,7 +1091,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0 }); }, (runnable) -> { ProcessorHandle mailbox = this.mainThreadMailbox; -@@ -1396,6 +1403,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1384,6 +1391,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider List list = Lists.newArrayList(); List list1 = this.level.players(); ObjectIterator objectiterator = this.entityMap.values().iterator(); @@ -1100,7 +1099,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0 ChunkMap.TrackedEntity playerchunkmap_entitytracker; -@@ -1420,14 +1428,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1408,14 +1416,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider playerchunkmap_entitytracker.serverEntity.sendChanges(); } } diff --git a/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 760b6c69a..b49d06b34 100644 --- a/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -25,10 +25,10 @@ index 9b908c5c66dc454faa479430a908dda0745638c8..6dec1bb96d695f28aae6517e4d782491 + } } diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index eb67ba3ce1ea68eb5db62f68bf48853fe5023f12..8e7479afd3579e6b732feca059c1e4df1160e450 100644 +index 690a2a97e10bf1003b49f7e4806aab0bca206d99..6dc1500866e634364ac258956b07a880ecbf6c76 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -130,6 +130,17 @@ public class FallingBlockEntity extends Entity { +@@ -131,6 +131,17 @@ public class FallingBlockEntity extends Entity { } this.move(MoverType.SELF, this.getDeltaMovement()); diff --git a/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index de4eb13e5..144fd8d65 100644 --- a/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -19,10 +19,10 @@ index f092497b6defd28c94393e483a9288d121158a1e..df44790b1c342d0a6ff794bea86319fa if (outputStream != null) { try { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3112f15993972c90d5bb797638a0186d88b403dc..8bacbb2289a9e5203766d71be6ba0a31f48b626e 100644 +index f1c94ec44233ce0007a43922d1ca7ba5e71d68bd..eef07309b24e88820d35517dd868fff25f777262 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1460,7 +1460,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public Commands vanillaCommandDispatcher; -@@ -292,7 +292,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements CommandSource, AutoCloseable { @@ -17,7 +17,7 @@ index 199401eb1a0722d84700681a0a5cba67953c6bec..9fb842e86aa6302259a98e5352da5296 public static final Logger LOGGER = LogUtils.getLogger(); public static final String VANILLA_BRAND = "vanilla"; private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F; -@@ -321,6 +322,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop registryreadops, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) { super("Server"); @@ -25,7 +25,7 @@ index 199401eb1a0722d84700681a0a5cba67953c6bec..9fb842e86aa6302259a98e5352da5296 this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.profiler = this.metricsRecorder.getProfiler(); this.onMetricsRecordingStopped = (methodprofilerresults) -> { -@@ -2310,7 +2312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 2000); longiterator.remove()) { long j = longiterator.nextLong(); -@@ -589,7 +589,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j); +@@ -577,7 +576,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + } } - activityAccountant.endActivity(); // Spigot - int k = Math.max(0, this.unloadQueue.size() - 2000); -+ int k = Math.max(0, Math.min(100, this.unloadQueue.size() - (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR))); // Paper - Target this queue as well ++ int k = Math.max(100, this.unloadQueue.size() - 2000); // Paper - Unload more than just up to queue size 2000 Runnable runnable; diff --git a/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch index 933e7082a..e180c3145 100644 --- a/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch +++ b/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch @@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d864cd5b511e36c9e0c0773324e7de4849595566..f17cee5678f912e7118e12c8e0ff907ed49e3acf 100644 +index 49c354fa65e0047a367f0a5410c79b8da8693df9..aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -230,6 +230,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> levels; private PlayerList playerList; private volatile boolean running; @@ -41,7 +41,7 @@ index d864cd5b511e36c9e0c0773324e7de4849595566..f17cee5678f912e7118e12c8e0ff907e private boolean stopped; private int tickCount; protected final Proxy proxy; -@@ -926,7 +927,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -369,7 +369,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop type, Level world) { super(type, world); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index b9044654d22a47cfa952dcf25754ad0d87fc0844..0d262c99c7e9ef06e297612b1802c493700f64ae 100644 +index 4ca76a7530f8679567d887cdf1491d110e7465ec..30c954efba587d69ff55df509339f03e7d5a476e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -@@ -49,6 +49,18 @@ public class CraftItem extends CraftEntity implements Item { - item.age = value; +@@ -66,6 +66,18 @@ public class CraftItem extends CraftEntity implements Item { + } } + // Paper Start diff --git a/patches/server/0140-Shoulder-Entities-Release-API.patch b/patches/server/0140-Shoulder-Entities-Release-API.patch index 146b44278..fbdd1baa2 100644 --- a/patches/server/0140-Shoulder-Entities-Release-API.patch +++ b/patches/server/0140-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index b15fd75ccbe54ea9169593e02631d2952b0d239a..ca9731d4d963f2615721e3e1f7e1a5e13c94cf52 100644 +index fe715c81ea755f83fae0020e66f5e61304c51867..7fc4cd29bd487955886c81e6997d832a3185ec8e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1961,20 +1961,44 @@ public abstract class Player extends LivingEntity { +@@ -1971,20 +1971,44 @@ public abstract class Player extends LivingEntity { } diff --git a/patches/server/0148-Fix-this-stupid-bullshit.patch b/patches/server/0148-Fix-this-stupid-bullshit.patch index 0e67ea083..e76bb5784 100644 --- a/patches/server/0148-Fix-this-stupid-bullshit.patch +++ b/patches/server/0148-Fix-this-stupid-bullshit.patch @@ -31,12 +31,12 @@ index 9f23951f6b4c17c2a968fdcb3e8f9f65c296f34a..248b7ca7dbd75d4eab52fb937cace2b2 Bootstrap.isBootstrapped = true; if (Registry.REGISTRY.keySet().isEmpty()) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 1e49bff6e1ccd7cf8405785c73f56caada94e399..08f4ba483a6c61365310de6561b314e428a6b978 100644 +index a168fd9daeca1bc5f390558eebaa3ee1a264f3ca..2695f047a2e3c7acb67487c2b547cfbd6d50c29c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -234,10 +234,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -3); + deadline.add(Calendar.DAY_OF_YEAR, -21); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch index 2034d8b6c..ed1bc704a 100644 --- a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d62b05265 100644 +index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac826f9e2e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -31,6 +31,7 @@ import net.minecraft.network.chat.MutableComponent; @@ -17,7 +17,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; -@@ -1191,7 +1192,7 @@ public abstract class Player extends LivingEntity { +@@ -1201,7 +1202,7 @@ public abstract class Player extends LivingEntity { int i = b0 + EnchantmentHelper.getKnockbackBonus(this); if (this.isSprinting() && flag) { @@ -26,7 +26,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d ++i; flag1 = true; } -@@ -1266,7 +1267,7 @@ public abstract class Player extends LivingEntity { +@@ -1276,7 +1277,7 @@ public abstract class Player extends LivingEntity { } } @@ -35,7 +35,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d this.sweepAttack(); } -@@ -1294,15 +1295,15 @@ public abstract class Player extends LivingEntity { +@@ -1304,15 +1305,15 @@ public abstract class Player extends LivingEntity { } if (flag2) { @@ -54,7 +54,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d } } -@@ -1354,7 +1355,7 @@ public abstract class Player extends LivingEntity { +@@ -1364,7 +1365,7 @@ public abstract class Player extends LivingEntity { this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value } else { @@ -63,7 +63,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d if (flag4) { target.clearFire(); } -@@ -1801,6 +1802,14 @@ public abstract class Player extends LivingEntity { +@@ -1811,6 +1812,14 @@ public abstract class Player extends LivingEntity { public int getXpNeededForNextLevel() { return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2); } diff --git a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch index 6805a47f5..7e608ec44 100644 --- a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch @@ -51,10 +51,10 @@ index 32a2fbf4a11a84d5a55e02d3ba21e6f4430379c0..a69bbc11b9e003aed1630a6f5cdbca52 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index f967388fa64aa9d4b2a390c86a2c98ac0fdd4523..7ce727c168a4c0fe6d7cd0bbaa8a4121adc96a90 100644 +index 52fc42050d5df0882586c8f4bb4890ef1dbf979e..ba8f9ffed49bf377be8b37532d4f2bdcb8c44d82 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -322,6 +322,13 @@ public class CraftBlock implements Block { +@@ -329,6 +329,13 @@ public class CraftBlock implements Block { return CraftBlockStates.getBlockState(this); } diff --git a/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch index 3fb8ab5bf..d960b570a 100644 --- a/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 50b2dc91f4926ebc4511e44e3aa3062eadc40ea0..610a1ce766d826f3fdca595dd4135f96ef9280d8 100644 +index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614897d1a98 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1127,7 +1127,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1114,7 +1114,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; @@ -23,7 +23,7 @@ index 50b2dc91f4926ebc4511e44e3aa3062eadc40ea0..610a1ce766d826f3fdca595dd4135f96 // Spigot end long i = chunkcoordintpair.toLong(); -@@ -1144,6 +1146,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1131,6 +1133,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } entityplayer = (ServerPlayer) iterator.next(); diff --git a/patches/server/0173-Add-ArmorStand-Item-Meta.patch b/patches/server/0173-Add-ArmorStand-Item-Meta.patch index e468d7914..4c74f73a6 100644 --- a/patches/server/0173-Add-ArmorStand-Item-Meta.patch +++ b/patches/server/0173-Add-ArmorStand-Item-Meta.patch @@ -13,7 +13,7 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java -index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241c17e103d 100644 +index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af880d679b1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -9,9 +9,22 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -54,11 +54,10 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 this.entityTag = armorStand.entityTag; } -@@ -30,11 +50,40 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -30,11 +50,39 @@ public class CraftMetaArmorStand extends CraftMetaItem { if (tag.contains(ENTITY_TAG.NBT)) { - this.entityTag = tag.getCompound(ENTITY_TAG.NBT); -+ + this.entityTag = tag.getCompound(ENTITY_TAG.NBT).copy(); + // Paper start + if (entityTag.contains(INVISIBLE.NBT)) { + invisible = entityTag.getBoolean(INVISIBLE.NBT); @@ -95,7 +94,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 } @Override -@@ -57,6 +106,31 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -57,6 +105,31 @@ public class CraftMetaArmorStand extends CraftMetaItem { void applyToItem(CompoundTag tag) { super.applyToItem(tag); @@ -127,7 +126,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 if (this.entityTag != null) { tag.put(ENTITY_TAG.NBT, entityTag); } -@@ -78,7 +152,7 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -78,7 +151,7 @@ public class CraftMetaArmorStand extends CraftMetaItem { } boolean isArmorStandEmpty() { @@ -136,7 +135,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 } @Override -@@ -89,7 +163,13 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -89,7 +162,13 @@ public class CraftMetaArmorStand extends CraftMetaItem { if (meta instanceof CraftMetaArmorStand) { CraftMetaArmorStand that = (CraftMetaArmorStand) meta; @@ -151,7 +150,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 } return true; } -@@ -104,9 +184,14 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -104,9 +183,14 @@ public class CraftMetaArmorStand extends CraftMetaItem { final int original; int hash = original = super.applyHash(); @@ -169,7 +168,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 return original != hash ? CraftMetaArmorStand.class.hashCode() ^ hash : hash; } -@@ -115,6 +200,28 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -115,6 +199,28 @@ public class CraftMetaArmorStand extends CraftMetaItem { Builder serialize(Builder builder) { super.serialize(builder); @@ -198,7 +197,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 return builder; } -@@ -128,4 +235,56 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -128,4 +234,56 @@ public class CraftMetaArmorStand extends CraftMetaItem { return clone; } @@ -256,7 +255,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 51d37a8963a2f8f5381bf802e28e5dfcdcc27eaa..2244a3c61f4effd365ed5fc010ecd1a4858b53a8 100644 +index 3f34d3989df1fedf625dc2bd767794067d8a0c06..ba8a8865e72faa826cb5abff3c428b5a2634bb27 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1445,6 +1445,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { diff --git a/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch index e0f1b8355..a541c9264 100644 --- a/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -21,10 +21,10 @@ index 2c92d3d924fa132937576c24da26e2a8f72f601e..207bef30c34e368066f4058dd28dd12f private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 653dbaafb9247653a6d8f549b57f0a5d62b05265..8978f3b53ce478d8aa078ac7a16784985f4a2744 100644 +index de71d57b86d681efe0916dbee53be3ac826f9e2e..66b474304f659efcc7bd1181e3eaee70657013eb 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1199,6 +1199,7 @@ public abstract class Player extends LivingEntity { +@@ -1209,6 +1209,7 @@ public abstract class Player extends LivingEntity { boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity; diff --git a/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch index 5011f668c..a0fdb8ec3 100644 --- a/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch +++ b/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch @@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4 public ClientboundStatusResponsePacket(ServerStatus metadata) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7adbe2f133e74d566b31098d5c805f5000ee3310..61edb76381a83f36d0ade1c35e9999eaad58abd2 100644 +index f846d9163ca97901ac1508ef8a476dabbf6dc454..4da9491425649b2b930b2304c4aa6692540ff4cb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -203,7 +203,7 @@ index 7adbe2f133e74d566b31098d5c805f5000ee3310..61edb76381a83f36d0ade1c35e9999ea import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1353,7 +1356,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { diff --git a/patches/server/0208-PlayerReadyArrowEvent.patch b/patches/server/0208-PlayerReadyArrowEvent.patch index 2d3e016e1..164b5f947 100644 --- a/patches/server/0208-PlayerReadyArrowEvent.patch +++ b/patches/server/0208-PlayerReadyArrowEvent.patch @@ -7,10 +7,10 @@ Called when a player is firing a bow and the server is choosing an arrow to use. Plugins can skip selection of certain arrows and control which is used. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index f1ee710de043ad8b71c8c385a24ab4b7167f45a3..f0da841cf8e37884c40397bb4032eab35e9eec4f 100644 +index 7b81d77649997aeb97cd819f380bdfe848702164..61fb16c1a2a70d96b3d20708321d1984f7592494 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -2194,6 +2194,17 @@ public abstract class Player extends LivingEntity { +@@ -2204,6 +2204,17 @@ public abstract class Player extends LivingEntity { return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING); } @@ -28,7 +28,7 @@ index f1ee710de043ad8b71c8c385a24ab4b7167f45a3..f0da841cf8e37884c40397bb4032eab3 @Override public ItemStack getProjectile(ItemStack stack) { if (!(stack.getItem() instanceof ProjectileWeaponItem)) { -@@ -2210,7 +2221,7 @@ public abstract class Player extends LivingEntity { +@@ -2220,7 +2231,7 @@ public abstract class Player extends LivingEntity { for (int i = 0; i < this.inventory.getContainerSize(); ++i) { ItemStack itemstack2 = this.inventory.getItem(i); diff --git a/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch b/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch index fb2d62ff7..e75691b68 100644 --- a/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch +++ b/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch @@ -82,10 +82,10 @@ index f6fd39823f04f8071c616d40a838b01e7159c5a1..e1cdf3ce38404d3f40be59e4cd3ad2b9 serverLevel.playSound((Player)null, pathfinderMob, this.getImpactSound.apply(pathfinderMob), SoundSource.HOSTILE, 1.0F, 1.0F); } else { diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index f0da841cf8e37884c40397bb4032eab35e9eec4f..c522ecc74d2b204986716bccfa555cb54e8bd062 100644 +index 61fb16c1a2a70d96b3d20708321d1984f7592494..1a264c6f18235580bd1fba4e5243554b56503253 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1242,7 +1242,7 @@ public abstract class Player extends LivingEntity { +@@ -1252,7 +1252,7 @@ public abstract class Player extends LivingEntity { if (flag5) { if (i > 0) { if (target instanceof LivingEntity) { @@ -94,7 +94,7 @@ index f0da841cf8e37884c40397bb4032eab35e9eec4f..c522ecc74d2b204986716bccfa555cb5 } else { target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F)); } -@@ -1266,7 +1266,7 @@ public abstract class Player extends LivingEntity { +@@ -1276,7 +1276,7 @@ public abstract class Player extends LivingEntity { if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) { diff --git a/patches/server/0215-InventoryCloseEvent-Reason-API.patch b/patches/server/0215-InventoryCloseEvent-Reason-API.patch index 33bcecc69..5e84e2fd4 100644 --- a/patches/server/0215-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0215-InventoryCloseEvent-Reason-API.patch @@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 7c64fbdaa8724fafd0bba6fcab581760ec0e0b0d..d4a09cbaac906c766c55577551e539c9840d8d03 100644 +index d8b0f6ae1604a158ef1be02701c8c605192e7fe1..4d69b6b35f04c904ee9ca9c896baaa9892f8ef9c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1133,7 +1133,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1137,7 +1137,7 @@ public class ServerLevel extends Level implements WorldGenLevel { for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { if (tileentity instanceof net.minecraft.world.Container) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) { @@ -19,7 +19,7 @@ index 7c64fbdaa8724fafd0bba6fcab581760ec0e0b0d..d4a09cbaac906c766c55577551e539c9 } } } -@@ -2070,7 +2070,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2074,7 +2074,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { @@ -118,7 +118,7 @@ index a1ca0c0c08f6793ce3440733f802a40f99890d85..b2034239e158ce0388c9b09a52d45727 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index c522ecc74d2b204986716bccfa555cb54e8bd062..2dcbeaed2e84675e95cde9e831b9d552b2e0b32f 100644 +index 1a264c6f18235580bd1fba4e5243554b56503253..64a887de47b26d2dfa27b0ed3c4d8c0e00db163b 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -263,7 +263,7 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 156e358d9..58f70dd2e 100644 --- a/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information 1.17: Needs to be reworked for new entity storage system diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 610a1ce766d826f3fdca595dd4135f96ef9280d8..b64f42b9ca1da5b6d5c290c157e510797e524117 100644 +index 81eb73e9fde37e3b196bd899ecd4d614897d1a98..4206e1c96cdc7b7e324331681215f735688dd558 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1366,6 +1366,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1353,6 +1353,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas()); @@ -19,7 +19,7 @@ index 610a1ce766d826f3fdca595dd4135f96ef9280d8..b64f42b9ca1da5b6d5c290c157e51079 this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.updatePlayers(this.level.players()); if (entity instanceof ServerPlayer) { -@@ -1408,7 +1409,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1395,7 +1396,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.broadcastRemoved(); } @@ -29,7 +29,7 @@ index 610a1ce766d826f3fdca595dd4135f96ef9280d8..b64f42b9ca1da5b6d5c290c157e51079 protected void tick() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d4a09cbaac906c766c55577551e539c9840d8d03..abff89e99d9f62a82c65a397016ab956f9ef42aa 100644 +index 4d69b6b35f04c904ee9ca9c896baaa9892f8ef9c..5f58aa648a5f0c3e61f6d9d5853583ca003e3620 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -209,6 +209,9 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -42,7 +42,7 @@ index d4a09cbaac906c766c55577551e539c9840d8d03..abff89e99d9f62a82c65a397016ab956 @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); -@@ -1096,7 +1099,28 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1099,7 +1102,28 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot diff --git a/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch index 7a3c2108b..cd76b5568 100644 --- a/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,10 +36,10 @@ index d654affc5565622cfabde9b838aa2b40e4e122bb..23ddaffadfafc3b23a09fcba2bf708f5 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 61edb76381a83f36d0ade1c35e9999eaad58abd2..432f1d6e5989f861e762a8b919a0048b58e77ce7 100644 +index 4da9491425649b2b930b2304c4aa6692540ff4cb..d6e6bc73f9bbcae99126876a9abdd3468d6c2a7f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1098,6 +1098,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> scheduleChunkLoad(ChunkPos pos) { @@ -2456,7 +2432,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895 this.markPosition(pos, protochunk.getStatus().getChunkType()); return Either.left(protochunk); } -@@ -729,7 +746,32 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -716,7 +732,32 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.markPositionReplaceable(pos); return Either.left(new ProtoChunk(pos, UpgradeData.EMPTY, this.level, this.level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), (BlendingData) null)); @@ -2490,7 +2466,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895 } private void markPositionReplaceable(ChunkPos pos) { -@@ -944,7 +986,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -931,7 +972,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } } @@ -2539,7 +2515,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895 this.poiManager.flush(chunk.getPos()); if (!chunk.isUnsaved()) { return false; -@@ -956,7 +1039,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -943,7 +1025,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider ChunkStatus chunkstatus = chunk.getStatus(); if (chunkstatus.getChunkType() != ChunkStatus.ChunkType.LEVELCHUNK) { @@ -2548,7 +2524,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895 return false; } -@@ -966,9 +1049,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -953,9 +1035,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } this.level.getProfiler().incrementCounter("chunkSave"); @@ -2566,7 +2542,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895 this.markPosition(chunkcoordintpair, chunkstatus.getChunkType()); return true; } catch (Exception exception) { -@@ -977,6 +1066,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -964,6 +1052,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return false; } } @@ -2574,7 +2550,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895 } private boolean isExistingChunkFull(ChunkPos pos) { -@@ -1110,6 +1200,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1097,6 +1186,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } } diff --git a/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index 62b297eaf..7273f35ce 100644 --- a/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 2244a3c61f4effd365ed5fc010ecd1a4858b53a8..4b48f4e1b2d69a18be0e9d83d52bc4f58b1f5bd9 100644 +index ba8a8865e72faa826cb5abff3c428b5a2634bb27..200d1cd53b5af8d7368b6c34b1cfb64463f3e782 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -83,6 +83,12 @@ import org.bukkit.persistence.PersistentDataContainer; @@ -60,7 +60,7 @@ index 2244a3c61f4effd365ed5fc010ecd1a4858b53a8..4b48f4e1b2d69a18be0e9d83d52bc4f5 this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); @@ -381,6 +404,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - this.persistentDataContainer.put(key, compound.get(key)); + this.persistentDataContainer.put(key, compound.get(key).copy()); } } + // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index e83e2ecb3..8ec3b02a9 100644 --- a/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -58,10 +58,10 @@ index 90d22b75fd33d8355e59b6bab79757c5b436c9d7..a8772417eb54e1a52c490b75b470a502 return executorService; } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f347842c224ee565d45f5120b2e3a359a9cade65..e2150c3a7cb7898adda6e53d9aeed8698d819a30 100644 +index 785df5ec8a5a4e307149edd5ccf7db75f7edb1fc..de10fc8a9d08dbab245292a4291590b54b0aa609 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -320,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper diff --git a/patches/server/0352-Add-effect-to-block-break-naturally.patch b/patches/server/0352-Add-effect-to-block-break-naturally.patch index f05e2e493..c254d6a8e 100644 --- a/patches/server/0352-Add-effect-to-block-break-naturally.patch +++ b/patches/server/0352-Add-effect-to-block-break-naturally.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add effect to block break naturally diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 7f1d4015ba795db7404669d931bd44060116bcc9..7eb8f37f493a83058a6e96f2e134a204b3304015 100644 +index 250185af0abcfea380cc00e670c0076f7fe87446..945553bfe218a16ebe4abbb11e0723b6d8fc4910 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -468,6 +468,18 @@ public class CraftBlock implements Block { +@@ -475,6 +475,18 @@ public class CraftBlock implements Block { @Override public boolean breakNaturally(ItemStack item) { @@ -27,7 +27,7 @@ index 7f1d4015ba795db7404669d931bd44060116bcc9..7eb8f37f493a83058a6e96f2e134a204 // Order matters here, need to drop before setting to air so skulls can get their data net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS(); net.minecraft.world.level.block.Block block = iblockdata.getBlock(); -@@ -477,6 +489,7 @@ public class CraftBlock implements Block { +@@ -484,6 +496,7 @@ public class CraftBlock implements Block { // Modelled off EntityHuman#hasBlock if (block != Blocks.AIR && (item == null || !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata))) { net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), position, this.world.getBlockEntity(position), null, nmsItem); diff --git a/patches/server/0354-Increase-Light-Queue-Size.patch b/patches/server/0354-Increase-Light-Queue-Size.patch index fa65647a5..0a9c51833 100644 --- a/patches/server/0354-Increase-Light-Queue-Size.patch +++ b/patches/server/0354-Increase-Light-Queue-Size.patch @@ -29,10 +29,10 @@ index 73d82e20d7353120a36815dc94be8c2253b2602d..6b88162d286bdabda0449d52b87457ac } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8e49a648671b4d4c0d07af35ba6558b63bbf28ee..e621d683df00a7d095cc72f74357224208b0dbca 100644 +index bec5328f1ab05faab83584f75d54a5a6c830f9b7..287014feb99c67083a959f2c09213d49ad5f743d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -811,7 +811,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { either.ifLeft((chunk) -> { this.tickingGenerated.getAndIncrement(); @@ -1139,7 +1139,7 @@ index 655a2f2fd64cc3ce1c972f3b05df8136f31a603a..ab976352bb0b7a7aa9ffaf1f8bffeadb this.getPlayers(chunkcoordintpair, false).forEach((entityplayer) -> { this.playerLoadedChunk(entityplayer, mutableobject, chunk); -@@ -1159,7 +1159,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1145,7 +1145,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider while (objectiterator.hasNext()) { ChunkHolder playerchunk = (ChunkHolder) objectiterator.next(); ChunkPos chunkcoordintpair = playerchunk.getPos(); @@ -1148,7 +1148,7 @@ index 655a2f2fd64cc3ce1c972f3b05df8136f31a603a..ab976352bb0b7a7aa9ffaf1f8bffeadb this.getPlayers(chunkcoordintpair, false).forEach((entityplayer) -> { SectionPos sectionposition = entityplayer.getLastSectionPos(); -@@ -1173,7 +1173,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1159,7 +1159,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } @@ -1157,7 +1157,7 @@ index 655a2f2fd64cc3ce1c972f3b05df8136f31a603a..ab976352bb0b7a7aa9ffaf1f8bffeadb if (player.level == this.level) { if (newWithinViewDistance && !oldWithinViewDistance) { ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos.toLong()); -@@ -1693,12 +1693,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1679,12 +1679,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } diff --git a/patches/server/0358-Tracking-Range-Improvements.patch b/patches/server/0358-Tracking-Range-Improvements.patch index 8d05c0e50..2a36982dc 100644 --- a/patches/server/0358-Tracking-Range-Improvements.patch +++ b/patches/server/0358-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index ab976352bb0b7a7aa9ffaf1f8bffeadb31abcc1d..6dae228c0d0460d74ed49aee5a38dfd7b145d891 100644 +index 0fad7ad13be138cbc7c4b09f457adbde570cf6fa..f1bf847a498023ce8729315c6ec68f1d16cab822 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1881,6 +1881,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1867,6 +1867,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getType().clientTrackingRange() * 16; diff --git a/patches/server/0376-Add-tick-times-API-and-mspt-command.patch b/patches/server/0376-Add-tick-times-API-and-mspt-command.patch index 7bf2ffe7f..19bf56aa0 100644 --- a/patches/server/0376-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0376-Add-tick-times-API-and-mspt-command.patch @@ -87,10 +87,10 @@ index 83bf428abd3be89e34cf42638bd1357a708ea0e3..fda5a623ec6bba0ed4d230415f7b9779 version = getInt("config-version", 25); set("config-version", 25); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e621d683df00a7d095cc72f74357224208b0dbca..1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e 100644 +index 287014feb99c67083a959f2c09213d49ad5f743d..2e08855085a547151140bcb05dce9bc469d81ff6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -245,6 +245,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2119a0cb18edffb88150451446f488b763db977c..01fca7eb1b12948d475f794e5a319ada72f0eb38 100644 +index e0e6915320264da3fefb3f449f27efb8477e1e63..5c5f9cf3539aeba4911d27111b0580d99a61f577 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2200,7 +2200,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2204,7 +2204,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTrackingStart(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot @@ -38,7 +38,7 @@ index 2119a0cb18edffb88150451446f488b763db977c..01fca7eb1b12948d475f794e5a319ada if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -2233,6 +2233,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2237,6 +2237,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } entity.valid = true; // CraftBukkit diff --git a/patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch index f2b52414b..b79b2b17b 100644 --- a/patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index a55ee0868fbf85456749ecede30cea7e0c481bb3..4e604e902145ea91811e8e7769952024fcbd1a3d 100644 +index 8a05690556f8f979d268cd7c6b5c14343ad33579..49648e258c6e72ac921f69114e1e36a926749d46 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1118,7 +1118,7 @@ public abstract class Player extends LivingEntity { +@@ -1128,7 +1128,7 @@ public abstract class Player extends LivingEntity { @Override protected boolean isImmobile() { diff --git a/patches/server/0388-Improved-Watchdog-Support.patch b/patches/server/0388-Improved-Watchdog-Support.patch index 2da28bf8c..6e1675915 100644 --- a/patches/server/0388-Improved-Watchdog-Support.patch +++ b/patches/server/0388-Improved-Watchdog-Support.patch @@ -71,10 +71,10 @@ index 8cc4cb2163a93b9491550fe6d0f5d980fb216920..4dd14d73a37b32288a64fbd67ee22c43 cause = cause.getCause(); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20faadb9c9 100644 +index 2e08855085a547151140bcb05dce9bc469d81ff6..c39479a9dffd9f9d7a8a6f99b97fef47391de1cd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -298,7 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public Commands vanillaCommandDispatcher; @@ -83,7 +83,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20 // CraftBukkit end // Spigot start public static final int TPS = 20; -@@ -309,6 +309,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new Thread(() -> { -@@ -913,6 +916,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); -@@ -1009,16 +1010,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -995,16 +996,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); CompletableFuture> completablefuture1 = completablefuture.thenApplyAsync((either) -> { return either.mapLeft((list) -> { diff --git a/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 1ea10446b..d7248b82b 100644 --- a/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 95feb9e316d4d1115c7dad5873979708f8d647d9..da40ae8799de108b1d3913c3c27ed4f9273fb303 100644 +index 43e5e148f1289ff5e42311981c597c66d98447aa..f4b14d77d5c256852677bd9bc6dbda2bbe5367e3 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1622,6 +1622,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1608,6 +1608,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider .printStackTrace(); return; } diff --git a/patches/server/0411-misc-debugging-dumps.patch b/patches/server/0411-misc-debugging-dumps.patch index a56f23d09..1c556f440 100644 --- a/patches/server/0411-misc-debugging-dumps.patch +++ b/patches/server/0411-misc-debugging-dumps.patch @@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2b301ab18cc67c04f6091f3a001aff20faadb9c9..fe877316a1c347354ee8e0651bbc243fb5eddc81 100644 +index c39479a9dffd9f9d7a8a6f99b97fef47391de1cd..6d774f126e31e90d0845fc24b1ad7df5346c7cc9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -917,6 +917,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = Lists.newArrayList(); List list1 = this.level.players(); ObjectIterator objectiterator = this.entityMap.values().iterator(); -@@ -1815,23 +1913,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1801,23 +1899,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -236,7 +236,7 @@ index 80018a94c12b7963c87b3960b71d88d8ac50ff09..2ff9c1f1c41494c282b43eafeb719172 Iterator iterator; Entity entity1; -@@ -1907,6 +2013,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1893,6 +1999,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.lastSectionPos = SectionPos.of(entity); } diff --git a/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch b/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch index e10d972ec..ef4110379 100644 --- a/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch +++ b/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch @@ -8,10 +8,10 @@ so inline where possible, and avoid the abstraction of the Either class. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 01fca7eb1b12948d475f794e5a319ada72f0eb38..2fed7a347844a24a1095a654f27c1494a53eef51 100644 +index 5c5f9cf3539aeba4911d27111b0580d99a61f577..42d7802e787d1e2722bf94487f9bf8383aeef660 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2165,19 +2165,22 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2169,19 +2169,22 @@ public class ServerLevel extends Level implements WorldGenLevel { } private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) { diff --git a/patches/server/0438-Fix-sand-duping.patch b/patches/server/0438-Fix-sand-duping.patch index 59c437cfe..c68919d4e 100644 --- a/patches/server/0438-Fix-sand-duping.patch +++ b/patches/server/0438-Fix-sand-duping.patch @@ -7,10 +7,10 @@ If the falling block dies during teleportation (entity#move), then we need to detect that by placing a check after the move. diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 2723816204ee61ea3fda9279369df030b8d70a13..c267bc75a5a2a410d941accbe8c41e3422a634a5 100644 +index f12eafb49c2536f91f4716188c931ad97264c113..e234373432f34f237f884f7054c0d80829228522 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -119,6 +119,11 @@ public class FallingBlockEntity extends Entity { +@@ -120,6 +120,11 @@ public class FallingBlockEntity extends Entity { @Override public void tick() { @@ -22,7 +22,7 @@ index 2723816204ee61ea3fda9279369df030b8d70a13..c267bc75a5a2a410d941accbe8c41e34 if (this.blockState.isAir()) { this.discard(); } else { -@@ -131,6 +136,12 @@ public class FallingBlockEntity extends Entity { +@@ -132,6 +137,12 @@ public class FallingBlockEntity extends Entity { this.move(MoverType.SELF, this.getDeltaMovement()); diff --git a/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index e1eb2923f..560761824 100644 --- a/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4658883ffc150e38d29d5387784587e6299fab65..81f611fef60518da5ee1bc34dcd7b8688818b096 100644 +index ca228085e07254aa23937219c7ef2b3330ca8fe0..03ef045c166c92efaeeaf655178b9729549e2296 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -822,7 +822,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> completablefuture = (CompletableFuture) this.futures.get(i); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc 100644 +index 2c9cd3619b0759905637eff746a761ebe89a38d8..1614b056d9e0c9e6b62d6c6a8926e87b2f3ad131 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -104,6 +104,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana @@ -241,7 +241,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163 protected void saveAllChunks(boolean flush) { if (flush) { List list = (List) this.visibleChunkMap.values().stream().filter(ChunkHolder::wasAccessibleSinceLastSave).peek(ChunkHolder::refreshAccessibility).collect(Collectors.toList()); -@@ -792,13 +851,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -778,13 +837,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } int l = 0; @@ -256,7 +256,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163 } -@@ -836,6 +889,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -822,6 +875,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.level.unload(chunk); } @@ -264,7 +264,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163 this.lightEngine.updateChunkStatus(ichunkaccess.getPos()); this.lightEngine.tryScheduleUpdate(); -@@ -1246,6 +1300,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1232,6 +1286,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider asyncSaveData, chunk); chunk.setUnsaved(false); @@ -272,7 +272,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163 } // Paper end -@@ -1255,6 +1310,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1241,6 +1296,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!chunk.isUnsaved()) { return false; } else { diff --git a/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 1b3469347..ac9fef762 100644 --- a/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -360,7 +360,7 @@ index 05d2790b80a6d2e1dc6b8d2375f783be4eff2343..6ba7e2713452c4c6f48a1a825ef27b50 return this.isEntityTickingReady; } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406ec7bc5ac 100644 +index 1614b056d9e0c9e6b62d6c6a8926e87b2f3ad131..c6ea30c9e91382297a5340096540f1ebc914fc35 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -131,6 +131,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -448,7 +448,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406 list1.add(playerchunk); list.add(completablefuture); -@@ -930,11 +980,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -916,11 +966,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (requiredStatus == ChunkStatus.EMPTY) { return this.scheduleChunkLoad(chunkcoordintpair); } else { @@ -469,7 +469,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406 if (optional.isPresent() && ((ChunkAccess) optional.get()).getStatus().isOrAfter(requiredStatus)) { CompletableFuture> completablefuture = requiredStatus.load(this.level, this.structureManager, this.lightEngine, (ichunkaccess) -> { -@@ -946,6 +1004,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -932,6 +990,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { return this.scheduleChunkGeneration(holder, requiredStatus); } @@ -477,7 +477,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406 } } -@@ -1002,14 +1061,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -988,14 +1047,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }; CompletableFuture chunkSaveFuture = this.level.asyncChunkTaskManager.getChunkSaveFuture(pos.x, pos.z); @@ -507,7 +507,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406 return ret; // Paper end } -@@ -1061,7 +1130,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1047,7 +1116,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.releaseLightTicket(chunkcoordintpair); return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); }); @@ -519,7 +519,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406 } protected void releaseLightTicket(ChunkPos pos) { -@@ -1145,7 +1217,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1131,7 +1203,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider long i = chunkHolder.getPos().toLong(); Objects.requireNonNull(chunkHolder); diff --git a/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 4a7aa73b9..77a8845bd 100644 --- a/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2182d17d463cea2ff999c5bc61eb31f4317362d8..f8a892110339ef63b5bdc31b64c4a40833685526 100644 +index c77f464b772e72c23fe00e99bc0fee24d46fb16b..b42637a2e9594cc2a30f910ef08399c11607e094 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1751,6 +1751,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1755,6 +1755,7 @@ public class ServerLevel extends Level implements WorldGenLevel { //ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c())); this.levelData.setSpawn(pos, angle); diff --git a/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch b/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch index cefa980de..ce941b1f3 100644 --- a/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch +++ b/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch @@ -54,7 +54,7 @@ index 6ba7e2713452c4c6f48a1a825ef27b500140aa16..cd4328bd606d778ebb45f36af8cf23d8 public ChunkHolder(ChunkPos pos, int level, LevelHeightAccessor world, LevelLightEngine lightingProvider, ChunkHolder.LevelChangeListener levelUpdateListener, ChunkHolder.PlayerProvider playersWatchingChunkProvider) { this.futures = new AtomicReferenceArray(ChunkHolder.CHUNK_STATUSES.size()); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 17af44ebe972158a4fa7b0cb5ea67406ec7bc5ac..9d9312cb8e9681428f7ab1b1e6eb803fc558d651 100644 +index c6ea30c9e91382297a5340096540f1ebc914fc35..104e7d0c18b032ee8198c4de25a57676d0f64745 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -691,7 +691,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -66,7 +66,7 @@ index 17af44ebe972158a4fa7b0cb5ea67406ec7bc5ac..9d9312cb8e9681428f7ab1b1e6eb803f } @Nullable -@@ -1101,6 +1101,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1087,6 +1087,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return "chunkGenerate " + requiredStatus.getName(); }); Executor executor = (runnable) -> { diff --git a/patches/server/0496-Add-methods-to-get-translation-keys.patch b/patches/server/0496-Add-methods-to-get-translation-keys.patch index a6fb1b05f..84393fcfd 100644 --- a/patches/server/0496-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0496-Add-methods-to-get-translation-keys.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add methods to get translation keys Co-authored-by: MeFisto94 diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 7eb8f37f493a83058a6e96f2e134a204b3304015..5fbfa060fc476236face04af724356dc5a21b5b5 100644 +index 945553bfe218a16ebe4abbb11e0723b6d8fc4910..e116ccfa4878636073cc4cdcf680683cda88d314 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -626,5 +626,15 @@ public class CraftBlock implements Block { +@@ -663,5 +663,15 @@ public class CraftBlock implements Block { public com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup() { return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMS().getBlock().defaultBlockState().getSoundType()); } diff --git a/patches/server/0498-Cache-block-data-strings.patch b/patches/server/0498-Cache-block-data-strings.patch index cb029f98b..4d0cb9354 100644 --- a/patches/server/0498-Cache-block-data-strings.patch +++ b/patches/server/0498-Cache-block-data-strings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2d1163fb234a2327373099dbfb569c3b8af9fa46..583031b2d26f9410306cbacd158fb6a21f0f24b5 100644 +index 851d63ba918f1fb2ffb975b0b46c8797e2b3b903..7e4c9fb177211afc1fbbede3393cc7de8d9014a9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2035,6 +2035,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 17cfa5bd58417c541e2d922c7d7b57676246f0d8..437daff6408357a4a19420422100914b3308b465 100644 +index 4bbaf22f449af42eba1307604e3860ea8b60a38c..25794fca0c10b262a696ecec9c736a991e8f357d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -636,5 +636,26 @@ public class CraftBlock implements Block { +@@ -673,5 +673,26 @@ public class CraftBlock implements Block { public String translationKey() { return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this); } diff --git a/patches/server/0550-Additional-Block-Material-API-s.patch b/patches/server/0550-Additional-Block-Material-API-s.patch index 8d23c9d90..c37be6c6c 100644 --- a/patches/server/0550-Additional-Block-Material-API-s.patch +++ b/patches/server/0550-Additional-Block-Material-API-s.patch @@ -9,10 +9,10 @@ process to do this in the Bukkit API Adds API for buildable, replaceable, burnable too. diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 437daff6408357a4a19420422100914b3308b465..0be0ddcb8ea184683c1d0c619a932f3b03064941 100644 +index 25794fca0c10b262a696ecec9c736a991e8f357d..3430bf2c05f9dc47a7483327bee4c04e4d87349e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -456,6 +456,25 @@ public class CraftBlock implements Block { +@@ -463,6 +463,25 @@ public class CraftBlock implements Block { return this.getNMS().getMaterial().isLiquid(); } diff --git a/patches/server/0563-Added-ServerResourcesReloadedEvent.patch b/patches/server/0563-Added-ServerResourcesReloadedEvent.patch index 3ea83769b..32592e509 100644 --- a/patches/server/0563-Added-ServerResourcesReloadedEvent.patch +++ b/patches/server/0563-Added-ServerResourcesReloadedEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index de024bf476e07558a249e2734be1f6ef6810ddd9..670180dd48a8e04b76c65242d2b316d52ae9090f 100644 +index 98d896db95953a91d31830a23b23265fa9f2c795..9abe6de575509d930c3f055e8dc5a14de5f1f49d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2004,7 +2004,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error -@@ -2030,6 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { this.getServer().execute(() -> { diff --git a/patches/server/0574-Add-PaperRegistry.patch b/patches/server/0574-Add-PaperRegistry.patch index 07bb4192a..ce5b0c9aa 100644 --- a/patches/server/0574-Add-PaperRegistry.patch +++ b/patches/server/0574-Add-PaperRegistry.patch @@ -171,10 +171,10 @@ index 0000000000000000000000000000000000000000..6f39e343147803e15e7681c993b8797a +public record RegistryKey(Class apiClass, ResourceKey> resourceKey) { +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 670180dd48a8e04b76c65242d2b316d52ae9090f..14b1524fcd27341eb8257f3925b94715bd4da152 100644 +index 9abe6de575509d930c3f055e8dc5a14de5f1f49d..696d382283f94335f6e23eb12c6fa209c51cff8c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2036,6 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper diff --git a/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch index 3206f8951..044e23afd 100644 --- a/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch @@ -21,10 +21,10 @@ index 4ab8e20efc54e7094e3e0f98109c95252d5e7c01..cdcb877e374bcd2dd944c754bfc91e23 public boolean phantomOnlyAttackInsomniacs = true; private void phantomSettings() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3b5eceaf3a40fee6430864e849d403f5e3c5f9b4..1b678f60ae054f6d9c97ba17f5ffe258d65cccb1 100644 +index 349f92a10e80f091abca6d86b869800d8c5ea787..773c7b0fe682fa17363f0a7841a77010b0b38b71 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1403,6 +1403,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1406,6 +1406,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } this.getChunkSource().blockChanged(pos); @@ -32,7 +32,7 @@ index 3b5eceaf3a40fee6430864e849d403f5e3c5f9b4..1b678f60ae054f6d9c97ba17f5ffe258 VoxelShape voxelshape = oldState.getCollisionShape(this, pos); VoxelShape voxelshape1 = newState.getCollisionShape(this, pos); -@@ -1444,6 +1445,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1447,6 +1448,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } diff --git a/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch b/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch index 96353575f..cd8f46da3 100644 --- a/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch +++ b/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch @@ -270,10 +270,10 @@ index 0000000000000000000000000000000000000000..ea83ee8762c126c449993a7497257b0b + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9fb306fdb2071ffcd16e9bb83da75c8923f2ba8e..7aba7d63727f6c7bbc074b5df5421ea449224ba4 100644 +index 445efad6a35b819dcb845524a28055a90da6e7f6..2914355be3f6c45b2dbd7ceb0ea65c7f22255a6d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1716,7 +1716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Fri, 23 Apr 2021 09:57:56 +1200 -Subject: [PATCH] Fix duplicating /give items on item drop cancel - -Fixes SPIGOT-2942 (Give command fires PlayerDropItemEvent, cancelling it causes item duplication). - -For every stack of items to give, /give puts the item stack straight -into the player's inventory. However, it also summons a "fake item" -at the player's location. When the PlayerDropItemEvent for this fake -item is cancelled, the server attempts to put the item back into the -player's inventory. The result is that the fake item, which is never -meant to be obtained, is combined with the real items injected directly -into the player's inventory. This means more items than the amount -specified in /give are given to the player - one for every stack of -items given. (e.g. /give @s dirt 1 gives you 2 dirt). - -While this isn't a big issue for general building usage, it can affect -e.g. adventure maps where the number of items the player receives is -important (and you want to restrict the player from throwing items). - -If there are any overflow items that didn't make it into the inventory -(insufficient space), those items are dropped as a real item instead -of a fake one. While cancelling this drop would also result in the -server attempting to put those items into the inventory, since it is -full this has no effect. - -Just ignoring cancellation of the PlayerDropItemEvent seems like the -cleanest and least intrusive way to fix it. - -diff --git a/src/main/java/net/minecraft/server/commands/GiveCommand.java b/src/main/java/net/minecraft/server/commands/GiveCommand.java -index 58941830a4bd024fcdb97df47783c82062e9167f..a0dc380e90415de9068ea408d62a1605c82631df 100644 ---- a/src/main/java/net/minecraft/server/commands/GiveCommand.java -+++ b/src/main/java/net/minecraft/server/commands/GiveCommand.java -@@ -47,7 +47,7 @@ public class GiveCommand { - boolean bl = serverPlayer.getInventory().add(itemStack); - if (bl && itemStack.isEmpty()) { - itemStack.setCount(1); -- ItemEntity itemEntity2 = serverPlayer.drop(itemStack, false); -+ ItemEntity itemEntity2 = serverPlayer.drop(itemStack, false, false, true); // Paper - Fix duplicating /give items on item drop cancel - if (itemEntity2 != null) { - itemEntity2.makeFakeItem(); - } -diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 4e604e902145ea91811e8e7769952024fcbd1a3d..0a486c8c4ad6abfdca804887e5db1487f53c1098 100644 ---- a/src/main/java/net/minecraft/world/entity/player/Player.java -+++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -693,6 +693,13 @@ public abstract class Player extends LivingEntity { - - @Nullable - public ItemEntity drop(ItemStack stack, boolean throwRandomly, boolean retainOwnership) { -+ // Paper start - Fix duplicating /give items on item drop cancel -+ return this.drop(stack, throwRandomly, retainOwnership, false); -+ } -+ -+ @Nullable -+ public ItemEntity drop(ItemStack stack, boolean throwRandomly, boolean retainOwnership, boolean alwaysSucceed) { -+ // Paper end - if (stack.isEmpty()) { - return null; - } else { -@@ -734,7 +741,7 @@ public abstract class Player extends LivingEntity { - PlayerDropItemEvent event = new PlayerDropItemEvent(player, drop); - this.level.getCraftServer().getPluginManager().callEvent(event); - -- if (event.isCancelled()) { -+ if (event.isCancelled() && !alwaysSucceed) { // Paper - Fix duplicating /give items on item drop cancel - org.bukkit.inventory.ItemStack cur = player.getInventory().getItemInHand(); - if (retainOwnership && (cur == null || cur.getAmount() == 0)) { - // The complete stack was dropped diff --git a/patches/server/0626-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0625-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/server/0626-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/0625-add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/server/0627-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0626-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/server/0627-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/0626-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/server/0628-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0627-fix-PigZombieAngerEvent-cancellation.patch similarity index 100% rename from patches/server/0628-fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/0627-fix-PigZombieAngerEvent-cancellation.patch diff --git a/patches/server/0629-Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/0628-Fix-checkReach-check-for-Shulker-boxes.patch similarity index 100% rename from patches/server/0629-Fix-checkReach-check-for-Shulker-boxes.patch rename to patches/server/0628-Fix-checkReach-check-for-Shulker-boxes.patch diff --git a/patches/server/0630-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0629-fix-PlayerItemHeldEvent-firing-twice.patch similarity index 100% rename from patches/server/0630-fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/0629-fix-PlayerItemHeldEvent-firing-twice.patch diff --git a/patches/server/0631-Added-PlayerDeepSleepEvent.patch b/patches/server/0630-Added-PlayerDeepSleepEvent.patch similarity index 91% rename from patches/server/0631-Added-PlayerDeepSleepEvent.patch rename to patches/server/0630-Added-PlayerDeepSleepEvent.patch index 00b71569b..77e3bcfda 100644 --- a/patches/server/0631-Added-PlayerDeepSleepEvent.patch +++ b/patches/server/0630-Added-PlayerDeepSleepEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Added PlayerDeepSleepEvent diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 0a486c8c4ad6abfdca804887e5db1487f53c1098..f4c861c86b718d67ae13ac02c6d1f20433312725 100644 +index 49648e258c6e72ac921f69114e1e36a926749d46..de0b885ebafecb37ef8be127362f76d487ff92ae 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -246,6 +246,11 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0632-More-World-API.patch b/patches/server/0631-More-World-API.patch similarity index 100% rename from patches/server/0632-More-World-API.patch rename to patches/server/0631-More-World-API.patch diff --git a/patches/server/0633-Added-PlayerBedFailEnterEvent.patch b/patches/server/0632-Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/server/0633-Added-PlayerBedFailEnterEvent.patch rename to patches/server/0632-Added-PlayerBedFailEnterEvent.patch diff --git a/patches/server/0634-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0633-Implement-methods-to-convert-between-Component-and-B.patch similarity index 100% rename from patches/server/0634-Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/0633-Implement-methods-to-convert-between-Component-and-B.patch diff --git a/patches/server/0635-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0634-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 100% rename from patches/server/0635-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/0634-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch diff --git a/patches/server/0636-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0635-Introduce-beacon-activation-deactivation-events.patch similarity index 100% rename from patches/server/0636-Introduce-beacon-activation-deactivation-events.patch rename to patches/server/0635-Introduce-beacon-activation-deactivation-events.patch diff --git a/patches/server/0637-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0636-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 100% rename from patches/server/0637-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/0636-add-RespawnFlags-to-PlayerRespawnEvent.patch diff --git a/patches/server/0638-Add-Channel-initialization-listeners.patch b/patches/server/0637-Add-Channel-initialization-listeners.patch similarity index 100% rename from patches/server/0638-Add-Channel-initialization-listeners.patch rename to patches/server/0637-Add-Channel-initialization-listeners.patch diff --git a/patches/server/0639-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0638-Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 100% rename from patches/server/0639-Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/0638-Send-empty-commands-if-tab-completion-is-disabled.patch diff --git a/patches/server/0640-Add-more-WanderingTrader-API.patch b/patches/server/0639-Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/server/0640-Add-more-WanderingTrader-API.patch rename to patches/server/0639-Add-more-WanderingTrader-API.patch diff --git a/patches/server/0641-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0640-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/server/0641-Add-EntityBlockStorage-clearEntities.patch rename to patches/server/0640-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/server/0642-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0641-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/server/0642-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/0641-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/server/0643-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0642-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 100% rename from patches/server/0643-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0642-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch diff --git a/patches/server/0644-Inventory-close.patch b/patches/server/0643-Inventory-close.patch similarity index 100% rename from patches/server/0644-Inventory-close.patch rename to patches/server/0643-Inventory-close.patch diff --git a/patches/server/0645-call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/0644-call-PortalCreateEvent-players-and-end-platform.patch similarity index 100% rename from patches/server/0645-call-PortalCreateEvent-players-and-end-platform.patch rename to patches/server/0644-call-PortalCreateEvent-players-and-end-platform.patch diff --git a/patches/server/0646-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0645-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/server/0646-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/0645-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/server/0647-Fix-CraftPotionBrewer-cache.patch b/patches/server/0646-Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/server/0647-Fix-CraftPotionBrewer-cache.patch rename to patches/server/0646-Fix-CraftPotionBrewer-cache.patch diff --git a/patches/server/0648-Add-basic-Datapack-API.patch b/patches/server/0647-Add-basic-Datapack-API.patch similarity index 100% rename from patches/server/0648-Add-basic-Datapack-API.patch rename to patches/server/0647-Add-basic-Datapack-API.patch diff --git a/patches/server/0649-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0648-Add-environment-variable-to-disable-server-gui.patch similarity index 100% rename from patches/server/0649-Add-environment-variable-to-disable-server-gui.patch rename to patches/server/0648-Add-environment-variable-to-disable-server-gui.patch diff --git a/patches/server/0650-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0649-additions-to-PlayerGameModeChangeEvent.patch similarity index 100% rename from patches/server/0650-additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/0649-additions-to-PlayerGameModeChangeEvent.patch diff --git a/patches/server/0651-ItemStack-repair-check-API.patch b/patches/server/0650-ItemStack-repair-check-API.patch similarity index 100% rename from patches/server/0651-ItemStack-repair-check-API.patch rename to patches/server/0650-ItemStack-repair-check-API.patch diff --git a/patches/server/0652-More-Enchantment-API.patch b/patches/server/0651-More-Enchantment-API.patch similarity index 100% rename from patches/server/0652-More-Enchantment-API.patch rename to patches/server/0651-More-Enchantment-API.patch diff --git a/patches/server/0653-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0652-Fix-and-optimise-world-force-upgrading.patch similarity index 98% rename from patches/server/0653-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0652-Fix-and-optimise-world-force-upgrading.patch index b110c0d52..f7e34581a 100644 --- a/patches/server/0653-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0652-Fix-and-optimise-world-force-upgrading.patch @@ -272,10 +272,10 @@ index 69dc1271be0a3f3f2fb4ce15981ed25d24dce785..1e0d261439255091a6f61485c0747231 Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index abb6b8f3b69826d69956a248770fc7b87745ba9a..5a2c5dc61580ff343ca96561fa56400c31995529 100644 +index 0e888c2d64cddb8b44e0572cea07fbb3cf0e6987..4a92ea5d6db5873277708d9fba6e1dd04205da78 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -557,11 +557,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop +Date: Mon, 28 Jun 2021 18:16:52 -0700 +Subject: [PATCH] Fix return value of Block#applyBoneMeal always being false + + +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +index 56fd99224edf9041104a540fd14ba3468af4805e..6c29efdb641c5d768a8bbf410da2a059e7d3e90a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +@@ -558,7 +558,7 @@ public class CraftBlock implements Block { + } + } + +- return result == InteractionResult.SUCCESS && (event == null || !event.isCancelled()); ++ return result == InteractionResult.CONSUME && (event == null || !event.isCancelled()); // Paper - CONSUME is returned on success server-side (see BoneMealItem.applyBoneMeal and InteractionResult.sidedSuccess(boolean)) + } + + @Override diff --git a/patches/server/0679-Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/0679-Fix-return-value-of-Block-applyBoneMeal-always-being.patch deleted file mode 100644 index 179e87842..000000000 --- a/patches/server/0679-Fix-return-value-of-Block-applyBoneMeal-always-being.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> -Date: Mon, 28 Jun 2021 18:16:52 -0700 -Subject: [PATCH] Fix return value of Block#applyBoneMeal always being false - - -diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 55f830598e67943674aa54ddfefc02bb3a3a3dcc..bb1f39fb215bbd422d6bb9ed0928d4d749d61dab 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -521,7 +521,7 @@ public class CraftBlock implements Block { - Direction direction = CraftBlock.blockFaceToNotch(face); - UseOnContext context = new UseOnContext(this.getCraftWorld().getHandle(), null, InteractionHand.MAIN_HAND, Items.BONE_MEAL.getDefaultInstance(), new BlockHitResult(Vec3.ZERO, direction, this.getPosition(), false)); - -- return BoneMealItem.applyBonemeal(context) == InteractionResult.SUCCESS; -+ return BoneMealItem.applyBonemeal(context) == InteractionResult.CONSUME; // Paper - CONSUME is returned on success server-side (see BoneMealItem.applyBoneMeal and InteractionResult.sidedSuccess(boolean)) - } - - @Override diff --git a/patches/server/0680-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0679-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 100% rename from patches/server/0680-Use-getChunkIfLoadedImmediately-in-places.patch rename to patches/server/0679-Use-getChunkIfLoadedImmediately-in-places.patch diff --git a/patches/server/0681-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0680-Fix-commands-from-signs-not-firing-command-events.patch similarity index 100% rename from patches/server/0681-Fix-commands-from-signs-not-firing-command-events.patch rename to patches/server/0680-Fix-commands-from-signs-not-firing-command-events.patch diff --git a/patches/server/0682-Adds-PlayerArmSwingEvent.patch b/patches/server/0681-Adds-PlayerArmSwingEvent.patch similarity index 100% rename from patches/server/0682-Adds-PlayerArmSwingEvent.patch rename to patches/server/0681-Adds-PlayerArmSwingEvent.patch diff --git a/patches/server/0683-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0682-Fixes-kick-event-leave-message-not-being-sent.patch similarity index 100% rename from patches/server/0683-Fixes-kick-event-leave-message-not-being-sent.patch rename to patches/server/0682-Fixes-kick-event-leave-message-not-being-sent.patch diff --git a/patches/server/0684-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0683-Add-config-for-mobs-immune-to-default-effects.patch similarity index 100% rename from patches/server/0684-Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/0683-Add-config-for-mobs-immune-to-default-effects.patch diff --git a/patches/server/0685-Fix-incorrect-message-for-outdated-client.patch b/patches/server/0684-Fix-incorrect-message-for-outdated-client.patch similarity index 100% rename from patches/server/0685-Fix-incorrect-message-for-outdated-client.patch rename to patches/server/0684-Fix-incorrect-message-for-outdated-client.patch diff --git a/patches/server/0686-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0685-Don-t-apply-cramming-damage-to-players.patch similarity index 100% rename from patches/server/0686-Don-t-apply-cramming-damage-to-players.patch rename to patches/server/0685-Don-t-apply-cramming-damage-to-players.patch diff --git a/patches/server/0687-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0686-Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 100% rename from patches/server/0687-Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/0686-Rate-options-and-timings-for-sensors-and-behaviors.patch diff --git a/patches/server/0688-Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/0687-Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 100% rename from patches/server/0688-Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/0687-Add-a-bunch-of-missing-forceDrop-toggles.patch diff --git a/patches/server/0689-Stinger-API.patch b/patches/server/0688-Stinger-API.patch similarity index 100% rename from patches/server/0689-Stinger-API.patch rename to patches/server/0688-Stinger-API.patch diff --git a/patches/server/0690-Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/0689-Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 100% rename from patches/server/0690-Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/0689-Fix-incosistency-issue-with-empty-map-items-in-CB.patch diff --git a/patches/server/0691-Add-System.out-err-catcher.patch b/patches/server/0690-Add-System.out-err-catcher.patch similarity index 100% rename from patches/server/0691-Add-System.out-err-catcher.patch rename to patches/server/0690-Add-System.out-err-catcher.patch diff --git a/patches/server/0692-Fix-test-not-bootstrapping.patch b/patches/server/0691-Fix-test-not-bootstrapping.patch similarity index 100% rename from patches/server/0692-Fix-test-not-bootstrapping.patch rename to patches/server/0691-Fix-test-not-bootstrapping.patch diff --git a/patches/server/0693-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/0692-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/server/0693-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/0692-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/server/0694-Improve-boat-collision-performance.patch b/patches/server/0693-Improve-boat-collision-performance.patch similarity index 100% rename from patches/server/0694-Improve-boat-collision-performance.patch rename to patches/server/0693-Improve-boat-collision-performance.patch diff --git a/patches/server/0695-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0694-Prevent-AFK-kick-while-watching-end-credits.patch similarity index 100% rename from patches/server/0695-Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/0694-Prevent-AFK-kick-while-watching-end-credits.patch diff --git a/patches/server/0696-Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/0695-Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/server/0696-Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/0695-Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/server/0697-Add-PlayerSetSpawnEvent.patch b/patches/server/0696-Add-PlayerSetSpawnEvent.patch similarity index 100% rename from patches/server/0697-Add-PlayerSetSpawnEvent.patch rename to patches/server/0696-Add-PlayerSetSpawnEvent.patch diff --git a/patches/server/0698-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0697-Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/server/0698-Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/0697-Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/server/0699-Optimize-entity-tracker-passenger-checks.patch b/patches/server/0698-Optimize-entity-tracker-passenger-checks.patch similarity index 100% rename from patches/server/0699-Optimize-entity-tracker-passenger-checks.patch rename to patches/server/0698-Optimize-entity-tracker-passenger-checks.patch diff --git a/patches/server/0700-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0699-Config-option-for-Piglins-guarding-chests.patch similarity index 100% rename from patches/server/0700-Config-option-for-Piglins-guarding-chests.patch rename to patches/server/0699-Config-option-for-Piglins-guarding-chests.patch diff --git a/patches/server/0701-Added-EntityDamageItemEvent.patch b/patches/server/0700-Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/server/0701-Added-EntityDamageItemEvent.patch rename to patches/server/0700-Added-EntityDamageItemEvent.patch diff --git a/patches/server/0702-Optimize-indirect-passenger-iteration.patch b/patches/server/0701-Optimize-indirect-passenger-iteration.patch similarity index 100% rename from patches/server/0702-Optimize-indirect-passenger-iteration.patch rename to patches/server/0701-Optimize-indirect-passenger-iteration.patch diff --git a/patches/server/0703-Fix-block-drops-position-losing-precision-millions-o.patch b/patches/server/0702-Fix-block-drops-position-losing-precision-millions-o.patch similarity index 100% rename from patches/server/0703-Fix-block-drops-position-losing-precision-millions-o.patch rename to patches/server/0702-Fix-block-drops-position-losing-precision-millions-o.patch diff --git a/patches/server/0704-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0703-Configurable-item-frame-map-cursor-update-interval.patch similarity index 100% rename from patches/server/0704-Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/0703-Configurable-item-frame-map-cursor-update-interval.patch diff --git a/patches/server/0705-Make-EntityUnleashEvent-cancellable.patch b/patches/server/0704-Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/server/0705-Make-EntityUnleashEvent-cancellable.patch rename to patches/server/0704-Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/server/0706-Clear-bucket-NBT-after-dispense.patch b/patches/server/0705-Clear-bucket-NBT-after-dispense.patch similarity index 100% rename from patches/server/0706-Clear-bucket-NBT-after-dispense.patch rename to patches/server/0705-Clear-bucket-NBT-after-dispense.patch diff --git a/patches/server/0707-Respect-despawn-rate-in-item-merge-check.patch b/patches/server/0706-Respect-despawn-rate-in-item-merge-check.patch similarity index 100% rename from patches/server/0707-Respect-despawn-rate-in-item-merge-check.patch rename to patches/server/0706-Respect-despawn-rate-in-item-merge-check.patch diff --git a/patches/server/0708-Change-EnderEye-target-without-changing-other-things.patch b/patches/server/0707-Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/server/0708-Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/0707-Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/server/0709-Add-BlockBreakBlockEvent.patch b/patches/server/0708-Add-BlockBreakBlockEvent.patch similarity index 100% rename from patches/server/0709-Add-BlockBreakBlockEvent.patch rename to patches/server/0708-Add-BlockBreakBlockEvent.patch diff --git a/patches/server/0710-Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/0709-Option-to-prevent-NBT-copy-in-smithing-recipes.patch similarity index 100% rename from patches/server/0710-Option-to-prevent-NBT-copy-in-smithing-recipes.patch rename to patches/server/0709-Option-to-prevent-NBT-copy-in-smithing-recipes.patch diff --git a/patches/server/0711-More-CommandBlock-API.patch b/patches/server/0710-More-CommandBlock-API.patch similarity index 100% rename from patches/server/0711-More-CommandBlock-API.patch rename to patches/server/0710-More-CommandBlock-API.patch diff --git a/patches/server/0712-Add-missing-team-sidebar-display-slots.patch b/patches/server/0711-Add-missing-team-sidebar-display-slots.patch similarity index 100% rename from patches/server/0712-Add-missing-team-sidebar-display-slots.patch rename to patches/server/0711-Add-missing-team-sidebar-display-slots.patch diff --git a/patches/server/0713-Add-back-EntityPortalExitEvent.patch b/patches/server/0712-Add-back-EntityPortalExitEvent.patch similarity index 100% rename from patches/server/0713-Add-back-EntityPortalExitEvent.patch rename to patches/server/0712-Add-back-EntityPortalExitEvent.patch diff --git a/patches/server/0714-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0713-Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 100% rename from patches/server/0714-Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/server/0713-Add-methods-to-find-targets-for-lightning-strikes.patch diff --git a/patches/server/0715-Get-entity-default-attributes.patch b/patches/server/0714-Get-entity-default-attributes.patch similarity index 100% rename from patches/server/0715-Get-entity-default-attributes.patch rename to patches/server/0714-Get-entity-default-attributes.patch diff --git a/patches/server/0716-Left-handed-API.patch b/patches/server/0715-Left-handed-API.patch similarity index 100% rename from patches/server/0716-Left-handed-API.patch rename to patches/server/0715-Left-handed-API.patch diff --git a/patches/server/0717-Add-advancement-display-API.patch b/patches/server/0716-Add-advancement-display-API.patch similarity index 100% rename from patches/server/0717-Add-advancement-display-API.patch rename to patches/server/0716-Add-advancement-display-API.patch diff --git a/patches/server/0718-Add-ItemFactory-getMonsterEgg-API.patch b/patches/server/0717-Add-ItemFactory-getMonsterEgg-API.patch similarity index 100% rename from patches/server/0718-Add-ItemFactory-getMonsterEgg-API.patch rename to patches/server/0717-Add-ItemFactory-getMonsterEgg-API.patch diff --git a/patches/server/0719-Add-critical-damage-API.patch b/patches/server/0718-Add-critical-damage-API.patch similarity index 96% rename from patches/server/0719-Add-critical-damage-API.patch rename to patches/server/0718-Add-critical-damage-API.patch index ca4be99b0..1eb7eeb9d 100644 --- a/patches/server/0719-Add-critical-damage-API.patch +++ b/patches/server/0718-Add-critical-damage-API.patch @@ -29,10 +29,10 @@ index 80d19af2ad423bd3de0e039c5bb8f97af536aaa9..a828cad27fcd39f8bfbaefa97052a2a3 public static DamageSource sting(LivingEntity attacker) { return new EntityDamageSource("sting", attacker); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index be2f492343770af9d360c4e7ed7495d196b2424c..3b235e98072664047c352dbb07fdcf2bd8553970 100644 +index 909f5c26ca149687c03688c33c241e549f19a3e9..8c74787c81d2b72a8b1c9dfff0a9db38ab13c973 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1227,7 +1227,7 @@ public abstract class Player extends LivingEntity { +@@ -1230,7 +1230,7 @@ public abstract class Player extends LivingEntity { flag1 = true; } @@ -41,7 +41,7 @@ index be2f492343770af9d360c4e7ed7495d196b2424c..3b235e98072664047c352dbb07fdcf2b flag2 = flag2 && !level.paperConfig.disablePlayerCrits; // Paper flag2 = flag2 && !this.isSprinting(); -@@ -1267,7 +1267,7 @@ public abstract class Player extends LivingEntity { +@@ -1270,7 +1270,7 @@ public abstract class Player extends LivingEntity { } Vec3 vec3d = target.getDeltaMovement(); @@ -50,7 +50,7 @@ index be2f492343770af9d360c4e7ed7495d196b2424c..3b235e98072664047c352dbb07fdcf2b if (flag5) { if (i > 0) { -@@ -1295,7 +1295,7 @@ public abstract class Player extends LivingEntity { +@@ -1298,7 +1298,7 @@ public abstract class Player extends LivingEntity { if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits diff --git a/patches/server/0720-Fix-issues-with-mob-conversion.patch b/patches/server/0719-Fix-issues-with-mob-conversion.patch similarity index 100% rename from patches/server/0720-Fix-issues-with-mob-conversion.patch rename to patches/server/0719-Fix-issues-with-mob-conversion.patch diff --git a/patches/server/0721-Add-isCollidable-methods-to-various-places.patch b/patches/server/0720-Add-isCollidable-methods-to-various-places.patch similarity index 94% rename from patches/server/0721-Add-isCollidable-methods-to-various-places.patch rename to patches/server/0720-Add-isCollidable-methods-to-various-places.patch index 6e08b3350..1497c827c 100644 --- a/patches/server/0721-Add-isCollidable-methods-to-various-places.patch +++ b/patches/server/0720-Add-isCollidable-methods-to-various-places.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index bb1f39fb215bbd422d6bb9ed0928d4d749d61dab..88c8817a85546ff92424b1164abcd74a15ff0917 100644 +index 6c29efdb641c5d768a8bbf410da2a059e7d3e90a..0b2e33fb16f832e0ddfe5e39a8a16caf98521098 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -473,6 +473,11 @@ public class CraftBlock implements Block { +@@ -480,6 +480,11 @@ public class CraftBlock implements Block { public boolean isSolid() { return getNMS().getMaterial().blocksMotion(); } diff --git a/patches/server/0722-Goat-ram-API.patch b/patches/server/0721-Goat-ram-API.patch similarity index 100% rename from patches/server/0722-Goat-ram-API.patch rename to patches/server/0721-Goat-ram-API.patch diff --git a/patches/server/0723-Add-API-for-resetting-a-single-score.patch b/patches/server/0722-Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/server/0723-Add-API-for-resetting-a-single-score.patch rename to patches/server/0722-Add-API-for-resetting-a-single-score.patch diff --git a/patches/server/0724-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0723-Add-Raw-Byte-Entity-Serialization.patch similarity index 100% rename from patches/server/0724-Add-Raw-Byte-Entity-Serialization.patch rename to patches/server/0723-Add-Raw-Byte-Entity-Serialization.patch diff --git a/patches/server/0725-Vanilla-command-permission-fixes.patch b/patches/server/0724-Vanilla-command-permission-fixes.patch similarity index 100% rename from patches/server/0725-Vanilla-command-permission-fixes.patch rename to patches/server/0724-Vanilla-command-permission-fixes.patch diff --git a/patches/server/0726-Make-CallbackExecutor-strict-again.patch b/patches/server/0725-Make-CallbackExecutor-strict-again.patch similarity index 95% rename from patches/server/0726-Make-CallbackExecutor-strict-again.patch rename to patches/server/0725-Make-CallbackExecutor-strict-again.patch index d2fcbba34..9360912a3 100644 --- a/patches/server/0726-Make-CallbackExecutor-strict-again.patch +++ b/patches/server/0725-Make-CallbackExecutor-strict-again.patch @@ -10,7 +10,7 @@ schedules. Effectively, use the callback executor as a tool of finding issues rather than hiding these issues. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 9d9312cb8e9681428f7ab1b1e6eb803fc558d651..edb35a483ae44073d560df1fe949aad60bf3d39d 100644 +index 104e7d0c18b032ee8198c4de25a57676d0f64745..d53ff732a503eab3aea0384475f8a56d3076828d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -164,17 +164,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0727-Do-not-allow-the-server-to-unload-chunks-at-request-.patch b/patches/server/0726-Do-not-allow-the-server-to-unload-chunks-at-request-.patch similarity index 100% rename from patches/server/0727-Do-not-allow-the-server-to-unload-chunks-at-request-.patch rename to patches/server/0726-Do-not-allow-the-server-to-unload-chunks-at-request-.patch diff --git a/patches/server/0728-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0727-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 93% rename from patches/server/0728-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/server/0727-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index b4e580704..62e9ac7bb 100644 --- a/patches/server/0728-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0727-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/ state desync POV because the TE is getting unloaded anyways. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 7eeb80e708da11cc0ec41e4eeee53fb370ac17b1..02b6cdc6b0b90fba7523f5eafb1b5641d6eceb66 100644 +index 990c16b52ac80df180086d045d56923bb2d69b1e..3d00c1bcd5acbeee09f1854076545a1d3628d27e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1309,9 +1309,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1312,9 +1312,13 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { if (tileentity instanceof net.minecraft.world.Container) { @@ -51,7 +51,7 @@ index 55bdc0abb1fe42c02479678c3840d1d4da3253ae..1a2dd16ec1f189c3b53a57c0224a15f4 public void doCloseContainer() { this.containerMenu.removed(this); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 3b235e98072664047c352dbb07fdcf2bd8553970..9c767096ca950d55d6002282c7a3fe2884bcd630 100644 +index 8c74787c81d2b72a8b1c9dfff0a9db38ab13c973..2483d7df7f1bf94344afd38b37602c645a4a2dff 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -497,6 +497,11 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0729-Correctly-handle-recursion-for-chunkholder-updates.patch b/patches/server/0728-Correctly-handle-recursion-for-chunkholder-updates.patch similarity index 100% rename from patches/server/0729-Correctly-handle-recursion-for-chunkholder-updates.patch rename to patches/server/0728-Correctly-handle-recursion-for-chunkholder-updates.patch diff --git a/patches/server/0730-Separate-lookup-locking-from-state-access-in-UserCac.patch b/patches/server/0729-Separate-lookup-locking-from-state-access-in-UserCac.patch similarity index 100% rename from patches/server/0730-Separate-lookup-locking-from-state-access-in-UserCac.patch rename to patches/server/0729-Separate-lookup-locking-from-state-access-in-UserCac.patch diff --git a/patches/server/0731-Fix-chunks-refusing-to-unload-at-low-TPS.patch b/patches/server/0730-Fix-chunks-refusing-to-unload-at-low-TPS.patch similarity index 88% rename from patches/server/0731-Fix-chunks-refusing-to-unload-at-low-TPS.patch rename to patches/server/0730-Fix-chunks-refusing-to-unload-at-low-TPS.patch index 0ea9e0770..9faff9462 100644 --- a/patches/server/0731-Fix-chunks-refusing-to-unload-at-low-TPS.patch +++ b/patches/server/0730-Fix-chunks-refusing-to-unload-at-low-TPS.patch @@ -10,10 +10,10 @@ chunk future to complete. We can simply schedule to the immediate executor to get this effect, rather than the main mailbox. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index edb35a483ae44073d560df1fe949aad60bf3d39d..fdfac353fe9cf8509a08b5157ed0762c3a12f3e3 100644 +index d53ff732a503eab3aea0384475f8a56d3076828d..971a31641ec33a80f45e507944fa4cd90bfc466a 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1314,9 +1314,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1300,9 +1300,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return chunk; }); diff --git a/patches/server/0732-Do-not-allow-ticket-level-changes-while-unloading-pl.patch b/patches/server/0731-Do-not-allow-ticket-level-changes-while-unloading-pl.patch similarity index 94% rename from patches/server/0732-Do-not-allow-ticket-level-changes-while-unloading-pl.patch rename to patches/server/0731-Do-not-allow-ticket-level-changes-while-unloading-pl.patch index 477937d99..a1d6ef420 100644 --- a/patches/server/0732-Do-not-allow-ticket-level-changes-while-unloading-pl.patch +++ b/patches/server/0731-Do-not-allow-ticket-level-changes-while-unloading-pl.patch @@ -8,7 +8,7 @@ Sync loading the chunk at this stage would cause it to load older data, as well as screwing our region state. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index fdfac353fe9cf8509a08b5157ed0762c3a12f3e3..33eebcd8f3459fcdc51c0a327563a1abc3c1d432 100644 +index 971a31641ec33a80f45e507944fa4cd90bfc466a..5d60fa26e9f5d3c9c57a61c509d5b924bbed3281 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -313,6 +313,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -27,7 +27,7 @@ index fdfac353fe9cf8509a08b5157ed0762c3a12f3e3..33eebcd8f3459fcdc51c0a327563a1ab if (k > ChunkMap.MAX_CHUNK_DISTANCE && level > ChunkMap.MAX_CHUNK_DISTANCE) { return holder; } else { -@@ -924,6 +926,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -910,6 +912,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (completablefuture1 != completablefuture) { this.scheduleUnload(pos, holder); } else { @@ -40,7 +40,7 @@ index fdfac353fe9cf8509a08b5157ed0762c3a12f3e3..33eebcd8f3459fcdc51c0a327563a1ab // Paper start boolean removed; if ((removed = this.pendingUnloads.remove(pos, holder)) && ichunkaccess != null) { -@@ -961,6 +969,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -947,6 +955,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z); } } // Paper end diff --git a/patches/server/0733-Do-not-allow-ticket-level-changes-when-updating-chun.patch b/patches/server/0732-Do-not-allow-ticket-level-changes-when-updating-chun.patch similarity index 100% rename from patches/server/0733-Do-not-allow-ticket-level-changes-when-updating-chun.patch rename to patches/server/0732-Do-not-allow-ticket-level-changes-when-updating-chun.patch diff --git a/patches/server/0734-Do-not-submit-profile-lookups-to-worldgen-threads.patch b/patches/server/0733-Do-not-submit-profile-lookups-to-worldgen-threads.patch similarity index 100% rename from patches/server/0734-Do-not-submit-profile-lookups-to-worldgen-threads.patch rename to patches/server/0733-Do-not-submit-profile-lookups-to-worldgen-threads.patch diff --git a/patches/server/0735-Log-when-the-async-catcher-is-tripped.patch b/patches/server/0734-Log-when-the-async-catcher-is-tripped.patch similarity index 100% rename from patches/server/0735-Log-when-the-async-catcher-is-tripped.patch rename to patches/server/0734-Log-when-the-async-catcher-is-tripped.patch diff --git a/patches/server/0736-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0735-Add-paper-mobcaps-and-paper-playermobcaps.patch similarity index 100% rename from patches/server/0736-Add-paper-mobcaps-and-paper-playermobcaps.patch rename to patches/server/0735-Add-paper-mobcaps-and-paper-playermobcaps.patch diff --git a/patches/server/0737-Prevent-unload-calls-removing-tickets-for-sync-loads.patch b/patches/server/0736-Prevent-unload-calls-removing-tickets-for-sync-loads.patch similarity index 100% rename from patches/server/0737-Prevent-unload-calls-removing-tickets-for-sync-loads.patch rename to patches/server/0736-Prevent-unload-calls-removing-tickets-for-sync-loads.patch diff --git a/patches/server/0738-Sanitize-ResourceLocation-error-logging.patch b/patches/server/0737-Sanitize-ResourceLocation-error-logging.patch similarity index 100% rename from patches/server/0738-Sanitize-ResourceLocation-error-logging.patch rename to patches/server/0737-Sanitize-ResourceLocation-error-logging.patch diff --git a/patches/server/0739-Optimise-general-POI-access.patch b/patches/server/0738-Optimise-general-POI-access.patch similarity index 100% rename from patches/server/0739-Optimise-general-POI-access.patch rename to patches/server/0738-Optimise-general-POI-access.patch diff --git a/patches/server/0740-Allow-controlled-flushing-for-network-manager.patch b/patches/server/0739-Allow-controlled-flushing-for-network-manager.patch similarity index 100% rename from patches/server/0740-Allow-controlled-flushing-for-network-manager.patch rename to patches/server/0739-Allow-controlled-flushing-for-network-manager.patch diff --git a/patches/server/0741-Add-more-async-catchers.patch b/patches/server/0740-Add-more-async-catchers.patch similarity index 100% rename from patches/server/0741-Add-more-async-catchers.patch rename to patches/server/0740-Add-more-async-catchers.patch diff --git a/patches/server/0742-Rewrite-entity-bounding-box-lookup-calls.patch b/patches/server/0741-Rewrite-entity-bounding-box-lookup-calls.patch similarity index 100% rename from patches/server/0742-Rewrite-entity-bounding-box-lookup-calls.patch rename to patches/server/0741-Rewrite-entity-bounding-box-lookup-calls.patch diff --git a/patches/server/0743-Optimise-chunk-tick-iteration.patch b/patches/server/0742-Optimise-chunk-tick-iteration.patch similarity index 99% rename from patches/server/0743-Optimise-chunk-tick-iteration.patch rename to patches/server/0742-Optimise-chunk-tick-iteration.patch index 4e6d8f0cb..6d81aa873 100644 --- a/patches/server/0743-Optimise-chunk-tick-iteration.patch +++ b/patches/server/0742-Optimise-chunk-tick-iteration.patch @@ -70,7 +70,7 @@ index fbfbe9adeca7364e6346c887616890bf968f38a1..bd43fbc8a93afa7604aa467392520ed7 int i = 0; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 33eebcd8f3459fcdc51c0a327563a1abc3c1d432..9b2c5fe2389c6baa239de4f7b479d9ca273e59cf 100644 +index 5d60fa26e9f5d3c9c57a61c509d5b924bbed3281..ef28e0f57ba593265a3eca4d3f21d0b1b51e8740 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -159,6 +159,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0744-Execute-chunk-tasks-mid-tick.patch b/patches/server/0743-Execute-chunk-tasks-mid-tick.patch similarity index 97% rename from patches/server/0744-Execute-chunk-tasks-mid-tick.patch rename to patches/server/0743-Execute-chunk-tasks-mid-tick.patch index 3705f009e..acf3980fc 100644 --- a/patches/server/0744-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0743-Execute-chunk-tasks-mid-tick.patch @@ -19,10 +19,10 @@ index b27021a42cbed3f0648a8d0903d00d03922ae221..eada966d7f108a6081be7a848f5c1dfc private MinecraftTimings() {} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ce40b5999e97b1bc56342876861b5bdad18d6cd6..ee33fd892e97e1ffea259a4f7974675923377d6b 100644 +index 65d5d96a687712d87bbc61d85f80438811bae07d..a279368fe144bd41d15e5fe5e565412f8b4ef9f7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1346,6 +1346,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a53d4ca46 100644 +index ef28e0f57ba593265a3eca4d3f21d0b1b51e8740..f4c1316ae1cadc1a7a7fed16e0e99704662c41e8 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -123,9 +123,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -120,7 +120,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a } } -@@ -873,7 +880,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -873,14 +880,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public boolean hasWork() { @@ -128,17 +128,16 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a + return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || !this.updatingChunks.getUpdatingValuesCopy().isEmpty() || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.distanceManager.hasTickets(); // Paper } - private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more -@@ -888,7 +895,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - while (longiterator.hasNext()) { // Spigot + private void processUnloads(BooleanSupplier shouldKeepTicking) { + LongIterator longiterator = this.toDrop.iterator(); + for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) { long j = longiterator.nextLong(); - longiterator.remove(); // Spigot - ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j); + ChunkHolder playerchunk = this.updatingChunks.queueRemove(j); // Paper - Don't copy if (playerchunk != null) { playerchunk.onChunkRemove(); // Paper -@@ -989,7 +996,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -975,7 +982,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!this.modified) { return false; } else { @@ -152,7 +151,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a this.modified = false; return true; } -@@ -1479,7 +1491,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1465,7 +1477,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.viewDistance = j; this.distanceManager.updatePlayerTickets(this.viewDistance + 1); @@ -161,7 +160,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a while (objectiterator.hasNext()) { ChunkHolder playerchunk = (ChunkHolder) objectiterator.next(); -@@ -1522,7 +1534,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1508,7 +1520,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public int size() { @@ -170,7 +169,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a } public DistanceManager getDistanceManager() { -@@ -1530,13 +1542,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1516,13 +1528,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected Iterable getChunks() { diff --git a/patches/server/0746-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/0745-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch similarity index 100% rename from patches/server/0746-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to patches/server/0745-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch diff --git a/patches/server/0747-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/0746-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/server/0747-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/server/0746-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/server/0748-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0747-Detail-more-information-in-watchdog-dumps.patch similarity index 100% rename from patches/server/0748-Detail-more-information-in-watchdog-dumps.patch rename to patches/server/0747-Detail-more-information-in-watchdog-dumps.patch diff --git a/patches/server/0749-Manually-inline-methods-in-BlockPosition.patch b/patches/server/0748-Manually-inline-methods-in-BlockPosition.patch similarity index 100% rename from patches/server/0749-Manually-inline-methods-in-BlockPosition.patch rename to patches/server/0748-Manually-inline-methods-in-BlockPosition.patch diff --git a/patches/server/0750-Distance-manager-tick-timings.patch b/patches/server/0749-Distance-manager-tick-timings.patch similarity index 100% rename from patches/server/0750-Distance-manager-tick-timings.patch rename to patches/server/0749-Distance-manager-tick-timings.patch diff --git a/patches/server/0751-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/server/0750-Name-craft-scheduler-threads-according-to-the-plugin.patch similarity index 100% rename from patches/server/0751-Name-craft-scheduler-threads-according-to-the-plugin.patch rename to patches/server/0750-Name-craft-scheduler-threads-according-to-the-plugin.patch diff --git a/patches/server/0752-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0751-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch similarity index 100% rename from patches/server/0752-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch rename to patches/server/0751-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch diff --git a/patches/server/0753-Add-packet-limiter-config.patch b/patches/server/0752-Add-packet-limiter-config.patch similarity index 100% rename from patches/server/0753-Add-packet-limiter-config.patch rename to patches/server/0752-Add-packet-limiter-config.patch diff --git a/patches/server/0754-Lag-compensate-block-breaking.patch b/patches/server/0753-Lag-compensate-block-breaking.patch similarity index 100% rename from patches/server/0754-Lag-compensate-block-breaking.patch rename to patches/server/0753-Lag-compensate-block-breaking.patch diff --git a/patches/server/0755-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0754-Use-correct-LevelStem-registry-when-loading-default-.patch similarity index 89% rename from patches/server/0755-Use-correct-LevelStem-registry-when-loading-default-.patch rename to patches/server/0754-Use-correct-LevelStem-registry-when-loading-default-.patch index 53e2e20e8..9bc3b8153 100644 --- a/patches/server/0755-Use-correct-LevelStem-registry-when-loading-default-.patch +++ b/patches/server/0754-Use-correct-LevelStem-registry-when-loading-default-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use correct LevelStem registry when loading default diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ee33fd892e97e1ffea259a4f7974675923377d6b..dff3ce704d44d13a250b9a6ae1ec1768e4a8187a 100644 +index a279368fe144bd41d15e5fe5e565412f8b4ef9f7..f877b956859643b4f3d969992f2e515dc490f90c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -565,7 +565,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver)); diff --git a/patches/server/0756-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/server/0755-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch similarity index 100% rename from patches/server/0756-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch rename to patches/server/0755-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch diff --git a/patches/server/0757-Consolidate-flush-calls-for-entity-tracker-packets.patch b/patches/server/0756-Consolidate-flush-calls-for-entity-tracker-packets.patch similarity index 100% rename from patches/server/0757-Consolidate-flush-calls-for-entity-tracker-packets.patch rename to patches/server/0756-Consolidate-flush-calls-for-entity-tracker-packets.patch diff --git a/patches/server/0758-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/server/0757-Don-t-lookup-fluid-state-when-raytracing.patch similarity index 100% rename from patches/server/0758-Don-t-lookup-fluid-state-when-raytracing.patch rename to patches/server/0757-Don-t-lookup-fluid-state-when-raytracing.patch diff --git a/patches/server/0759-Time-scoreboard-search.patch b/patches/server/0758-Time-scoreboard-search.patch similarity index 100% rename from patches/server/0759-Time-scoreboard-search.patch rename to patches/server/0758-Time-scoreboard-search.patch diff --git a/patches/server/0760-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0759-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/server/0760-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/0759-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/server/0761-Do-not-run-raytrace-logic-for-AIR.patch b/patches/server/0760-Do-not-run-raytrace-logic-for-AIR.patch similarity index 100% rename from patches/server/0761-Do-not-run-raytrace-logic-for-AIR.patch rename to patches/server/0760-Do-not-run-raytrace-logic-for-AIR.patch diff --git a/patches/server/0762-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0761-Oprimise-map-impl-for-tracked-players.patch similarity index 89% rename from patches/server/0762-Oprimise-map-impl-for-tracked-players.patch rename to patches/server/0761-Oprimise-map-impl-for-tracked-players.patch index 7ee2e496b..91de4460e 100644 --- a/patches/server/0762-Oprimise-map-impl-for-tracked-players.patch +++ b/patches/server/0761-Oprimise-map-impl-for-tracked-players.patch @@ -7,7 +7,7 @@ Reference2BooleanOpenHashMap is going to have better lookups than HashMap. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index c19395ab43b956787bf0e59ae242ff3a53d4ca46..af9b1fe737ab430861b4d0de33eec1325964c3a5 100644 +index f4c1316ae1cadc1a7a7fed16e0e99704662c41e8..b0aaeb601c8d9df50bf612985bbcbef8a082551f 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -110,6 +110,7 @@ import org.apache.commons.lang3.mutable.MutableObject; @@ -18,7 +18,7 @@ index c19395ab43b956787bf0e59ae242ff3a53d4ca46..af9b1fe737ab430861b4d0de33eec132 public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider { -@@ -2169,7 +2170,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -2155,7 +2156,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider final Entity entity; private final int range; SectionPos lastSectionPos; diff --git a/patches/server/0763-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0762-Optimise-BlockSoil-nearby-water-lookup.patch similarity index 100% rename from patches/server/0763-Optimise-BlockSoil-nearby-water-lookup.patch rename to patches/server/0762-Optimise-BlockSoil-nearby-water-lookup.patch diff --git a/patches/server/0764-Allow-removal-addition-of-entities-to-entity-ticklis.patch b/patches/server/0763-Allow-removal-addition-of-entities-to-entity-ticklis.patch similarity index 100% rename from patches/server/0764-Allow-removal-addition-of-entities-to-entity-ticklis.patch rename to patches/server/0763-Allow-removal-addition-of-entities-to-entity-ticklis.patch diff --git a/patches/server/0765-Optimise-random-block-ticking.patch b/patches/server/0764-Optimise-random-block-ticking.patch similarity index 100% rename from patches/server/0765-Optimise-random-block-ticking.patch rename to patches/server/0764-Optimise-random-block-ticking.patch diff --git a/patches/server/0766-Optimise-non-flush-packet-sending.patch b/patches/server/0765-Optimise-non-flush-packet-sending.patch similarity index 100% rename from patches/server/0766-Optimise-non-flush-packet-sending.patch rename to patches/server/0765-Optimise-non-flush-packet-sending.patch diff --git a/patches/server/0767-Optimise-nearby-player-lookups.patch b/patches/server/0766-Optimise-nearby-player-lookups.patch similarity index 99% rename from patches/server/0767-Optimise-nearby-player-lookups.patch rename to patches/server/0766-Optimise-nearby-player-lookups.patch index 6f6a160a7..ac5756d26 100644 --- a/patches/server/0767-Optimise-nearby-player-lookups.patch +++ b/patches/server/0766-Optimise-nearby-player-lookups.patch @@ -39,7 +39,7 @@ index bd43fbc8a93afa7604aa467392520ed7b30a1d83..1a7fc533afced7235162f81b2de8148c // Paper end - optimise anyPlayerCloseEnoughForSpawning long lastAutoSaveTime; // Paper - incremental autosave diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index af9b1fe737ab430861b4d0de33eec1325964c3a5..43373e6bbe20e467043e750e0d7a11cd5a0ea1bc 100644 +index b0aaeb601c8d9df50bf612985bbcbef8a082551f..bc6a4bfe7df804ee22791fb767f059a541a3900f 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -164,6 +164,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0768-Optimise-WorldServer-notify.patch b/patches/server/0767-Optimise-WorldServer-notify.patch similarity index 97% rename from patches/server/0768-Optimise-WorldServer-notify.patch rename to patches/server/0767-Optimise-WorldServer-notify.patch index a84a979c6..dfd437009 100644 --- a/patches/server/0768-Optimise-WorldServer-notify.patch +++ b/patches/server/0767-Optimise-WorldServer-notify.patch @@ -8,7 +8,7 @@ Instead, only iterate over navigators in the current region that are eligible for repathing. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 43373e6bbe20e467043e750e0d7a11cd5a0ea1bc..952286cca1ce9e893f4a9e5939c552efe975abb4 100644 +index bc6a4bfe7df804ee22791fb767f059a541a3900f..a578ff8a88ef944516150303e96f8b49bc797f64 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -301,15 +301,81 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -110,7 +110,7 @@ index 43373e6bbe20e467043e750e0d7a11cd5a0ea1bc..952286cca1ce9e893f4a9e5939c552ef } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc62efade9 100644 +index 3d4671dfa6ab878aa0fd076797de482fa8cb9b51..0a11eeaefe39d637fe2f9243b0f8a4b2d9734446 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1096,6 +1096,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -121,7 +121,7 @@ index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc try { if (currentlyTickingEntity.get() == null) { currentlyTickingEntity.lazySet(entity); -@@ -1548,9 +1549,18 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1551,9 +1552,18 @@ public class ServerLevel extends Level implements WorldGenLevel { if (Shapes.joinIsNotEmpty(voxelshape, voxelshape1, BooleanOp.NOT_SAME)) { List list = new ObjectArrayList(); @@ -142,7 +142,7 @@ index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc // CraftBukkit start - fix SPIGOT-6362 Mob entityinsentient; try { -@@ -1572,16 +1582,23 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1575,16 +1585,23 @@ public class ServerLevel extends Level implements WorldGenLevel { try { this.isUpdatingNavigations = true; @@ -169,7 +169,7 @@ index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc } } // Paper -@@ -2381,10 +2398,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2384,10 +2401,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingStart(Entity entity) { ServerLevel.this.entityTickList.add(entity); diff --git a/patches/server/0769-Remove-streams-for-villager-AI.patch b/patches/server/0768-Remove-streams-for-villager-AI.patch similarity index 100% rename from patches/server/0769-Remove-streams-for-villager-AI.patch rename to patches/server/0768-Remove-streams-for-villager-AI.patch diff --git a/patches/server/0770-Rewrite-dataconverter-system.patch b/patches/server/0769-Rewrite-dataconverter-system.patch similarity index 100% rename from patches/server/0770-Rewrite-dataconverter-system.patch rename to patches/server/0769-Rewrite-dataconverter-system.patch diff --git a/patches/server/0771-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0770-Use-Velocity-compression-and-cipher-natives.patch similarity index 100% rename from patches/server/0771-Use-Velocity-compression-and-cipher-natives.patch rename to patches/server/0770-Use-Velocity-compression-and-cipher-natives.patch diff --git a/patches/server/0772-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch b/patches/server/0771-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch similarity index 100% rename from patches/server/0772-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch rename to patches/server/0771-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch diff --git a/patches/server/0773-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch b/patches/server/0772-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch similarity index 100% rename from patches/server/0773-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch rename to patches/server/0772-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch diff --git a/patches/server/0774-Async-catch-modifications-to-critical-entity-state.patch b/patches/server/0773-Async-catch-modifications-to-critical-entity-state.patch similarity index 100% rename from patches/server/0774-Async-catch-modifications-to-critical-entity-state.patch rename to patches/server/0773-Async-catch-modifications-to-critical-entity-state.patch diff --git a/patches/server/0775-Fix-Bukkit-NamespacedKey-shenanigans.patch b/patches/server/0774-Fix-Bukkit-NamespacedKey-shenanigans.patch similarity index 100% rename from patches/server/0775-Fix-Bukkit-NamespacedKey-shenanigans.patch rename to patches/server/0774-Fix-Bukkit-NamespacedKey-shenanigans.patch diff --git a/patches/server/0776-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0775-Fix-merchant-inventory-not-closing-on-entity-removal.patch similarity index 90% rename from patches/server/0776-Fix-merchant-inventory-not-closing-on-entity-removal.patch rename to patches/server/0775-Fix-merchant-inventory-not-closing-on-entity-removal.patch index 52fbf4f87..cbc189593 100644 --- a/patches/server/0776-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0775-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,10 +5,10 @@ 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 ca9c43f48ab269430accbefe0ed470bc62efade9..2187331d2f3c4f14281dde6f01422fc4d5458e0e 100644 +index 0a11eeaefe39d637fe2f9243b0f8a4b2d9734446..1e2c430a8df6afde91e3c5169d2d7b501acdec7f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2482,6 +2482,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2485,6 +2485,11 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot end // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message diff --git a/patches/server/0777-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0776-Check-requirement-before-suggesting-root-nodes.patch similarity index 100% rename from patches/server/0777-Check-requirement-before-suggesting-root-nodes.patch rename to patches/server/0776-Check-requirement-before-suggesting-root-nodes.patch diff --git a/patches/server/0778-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0777-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch similarity index 100% rename from patches/server/0778-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch rename to patches/server/0777-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch diff --git a/patches/server/0779-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0778-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch similarity index 100% rename from patches/server/0779-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch rename to patches/server/0778-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch diff --git a/patches/server/0780-Ensure-valid-vehicle-status.patch b/patches/server/0779-Ensure-valid-vehicle-status.patch similarity index 100% rename from patches/server/0780-Ensure-valid-vehicle-status.patch rename to patches/server/0779-Ensure-valid-vehicle-status.patch diff --git a/patches/server/0781-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0780-Prevent-softlocked-end-exit-portal-generation.patch similarity index 100% rename from patches/server/0781-Prevent-softlocked-end-exit-portal-generation.patch rename to patches/server/0780-Prevent-softlocked-end-exit-portal-generation.patch diff --git a/patches/server/0782-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0781-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch similarity index 100% rename from patches/server/0782-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch rename to patches/server/0781-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch diff --git a/patches/server/0783-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0782-Don-t-log-debug-logging-being-disabled.patch similarity index 100% rename from patches/server/0783-Don-t-log-debug-logging-being-disabled.patch rename to patches/server/0782-Don-t-log-debug-logging-being-disabled.patch diff --git a/patches/server/0784-Mark-fish-and-axolotls-from-buckets-as-persistent.patch b/patches/server/0783-Mark-fish-and-axolotls-from-buckets-as-persistent.patch similarity index 100% rename from patches/server/0784-Mark-fish-and-axolotls-from-buckets-as-persistent.patch rename to patches/server/0783-Mark-fish-and-axolotls-from-buckets-as-persistent.patch diff --git a/patches/server/0785-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0784-fix-various-menus-with-empty-level-accesses.patch similarity index 100% rename from patches/server/0785-fix-various-menus-with-empty-level-accesses.patch rename to patches/server/0784-fix-various-menus-with-empty-level-accesses.patch diff --git a/patches/server/0786-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch b/patches/server/0785-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch similarity index 95% rename from patches/server/0786-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch rename to patches/server/0785-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch index dad671a3b..6e988a6c7 100644 --- a/patches/server/0786-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch +++ b/patches/server/0785-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch @@ -12,7 +12,7 @@ time to save, as flush saving performs a full flush at the end anyways. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 952286cca1ce9e893f4a9e5939c552efe975abb4..9ba13ee1df980b9bd5318cefeb3412a8923b66a3 100644 +index a578ff8a88ef944516150303e96f8b49bc797f64..9999f9743184ba929635d625c60836c046ededd4 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -928,6 +928,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0787-Preserve-overstacked-loot.patch b/patches/server/0786-Preserve-overstacked-loot.patch similarity index 100% rename from patches/server/0787-Preserve-overstacked-loot.patch rename to patches/server/0786-Preserve-overstacked-loot.patch diff --git a/patches/server/0788-Update-head-rotation-in-missing-places.patch b/patches/server/0787-Update-head-rotation-in-missing-places.patch similarity index 100% rename from patches/server/0788-Update-head-rotation-in-missing-places.patch rename to patches/server/0787-Update-head-rotation-in-missing-places.patch diff --git a/patches/server/0789-prevent-unintended-light-block-manipulation.patch b/patches/server/0788-prevent-unintended-light-block-manipulation.patch similarity index 100% rename from patches/server/0789-prevent-unintended-light-block-manipulation.patch rename to patches/server/0788-prevent-unintended-light-block-manipulation.patch diff --git a/patches/server/0790-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch b/patches/server/0789-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch similarity index 100% rename from patches/server/0790-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch rename to patches/server/0789-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch diff --git a/patches/server/0791-Fix-CraftCriteria-defaults-map.patch b/patches/server/0790-Fix-CraftCriteria-defaults-map.patch similarity index 100% rename from patches/server/0791-Fix-CraftCriteria-defaults-map.patch rename to patches/server/0790-Fix-CraftCriteria-defaults-map.patch diff --git a/patches/server/0792-Fix-upstreams-block-state-factories.patch b/patches/server/0791-Fix-upstreams-block-state-factories.patch similarity index 100% rename from patches/server/0792-Fix-upstreams-block-state-factories.patch rename to patches/server/0791-Fix-upstreams-block-state-factories.patch diff --git a/patches/server/0793-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0792-Add-config-option-for-logging-player-ip-addresses.patch similarity index 100% rename from patches/server/0793-Add-config-option-for-logging-player-ip-addresses.patch rename to patches/server/0792-Add-config-option-for-logging-player-ip-addresses.patch diff --git a/patches/server/0794-Configurable-feature-seeds.patch b/patches/server/0793-Configurable-feature-seeds.patch similarity index 100% rename from patches/server/0794-Configurable-feature-seeds.patch rename to patches/server/0793-Configurable-feature-seeds.patch diff --git a/patches/server/0795-VanillaCommandWrapper-didnt-account-for-entity-sende.patch b/patches/server/0794-VanillaCommandWrapper-didnt-account-for-entity-sende.patch similarity index 100% rename from patches/server/0795-VanillaCommandWrapper-didnt-account-for-entity-sende.patch rename to patches/server/0794-VanillaCommandWrapper-didnt-account-for-entity-sende.patch diff --git a/patches/server/0796-Add-root-admin-user-detection.patch b/patches/server/0795-Add-root-admin-user-detection.patch similarity index 100% rename from patches/server/0796-Add-root-admin-user-detection.patch rename to patches/server/0795-Add-root-admin-user-detection.patch diff --git a/patches/server/0797-Always-allow-item-changing-in-Fireball.patch b/patches/server/0796-Always-allow-item-changing-in-Fireball.patch similarity index 100% rename from patches/server/0797-Always-allow-item-changing-in-Fireball.patch rename to patches/server/0796-Always-allow-item-changing-in-Fireball.patch diff --git a/patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0797-don-t-attempt-to-teleport-dead-entities.patch similarity index 100% rename from patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch rename to patches/server/0797-don-t-attempt-to-teleport-dead-entities.patch diff --git a/patches/server/0799-Fix-anvil-prepare-event-not-working-with-zero-xp.patch b/patches/server/0798-Fix-anvil-prepare-event-not-working-with-zero-xp.patch similarity index 100% rename from patches/server/0799-Fix-anvil-prepare-event-not-working-with-zero-xp.patch rename to patches/server/0798-Fix-anvil-prepare-event-not-working-with-zero-xp.patch diff --git a/patches/server/0800-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0799-Prevent-excessive-velocity-through-repeated-crits.patch similarity index 100% rename from patches/server/0800-Prevent-excessive-velocity-through-repeated-crits.patch rename to patches/server/0799-Prevent-excessive-velocity-through-repeated-crits.patch diff --git a/patches/server/0801-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0800-Remove-client-side-code-using-deprecated-for-removal.patch similarity index 100% rename from patches/server/0801-Remove-client-side-code-using-deprecated-for-removal.patch rename to patches/server/0800-Remove-client-side-code-using-deprecated-for-removal.patch diff --git a/patches/server/0802-Rewrite-the-light-engine.patch b/patches/server/0801-Rewrite-the-light-engine.patch similarity index 99% rename from patches/server/0802-Rewrite-the-light-engine.patch rename to patches/server/0801-Rewrite-the-light-engine.patch index f0e4f7552..e0442546f 100644 --- a/patches/server/0802-Rewrite-the-light-engine.patch +++ b/patches/server/0801-Rewrite-the-light-engine.patch @@ -4432,7 +4432,7 @@ index 1a7fc533afced7235162f81b2de8148cef05414a..36b6e7295cf7484675c8c2b9624c1f6f private final DebugBuffer chunkToSaveHistory; public int oldTicketLevel; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 9ba13ee1df980b9bd5318cefeb3412a8923b66a3..78aab9174f8359ffc38fb5a79930e541b5cd419e 100644 +index 9999f9743184ba929635d625c60836c046ededd4..727ee42ec573fd1d008f526f49d0e63396ef0a9d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -133,7 +133,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0803-Always-parse-protochunk-light-sources-unless-it-is-m.patch b/patches/server/0802-Always-parse-protochunk-light-sources-unless-it-is-m.patch similarity index 100% rename from patches/server/0803-Always-parse-protochunk-light-sources-unless-it-is-m.patch rename to patches/server/0802-Always-parse-protochunk-light-sources-unless-it-is-m.patch diff --git a/patches/server/0804-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0803-Fix-removing-recipes-from-RecipeIterator.patch similarity index 100% rename from patches/server/0804-Fix-removing-recipes-from-RecipeIterator.patch rename to patches/server/0803-Fix-removing-recipes-from-RecipeIterator.patch diff --git a/patches/server/0805-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0804-Prevent-sending-oversized-item-data-in-equipment-and.patch similarity index 100% rename from patches/server/0805-Prevent-sending-oversized-item-data-in-equipment-and.patch rename to patches/server/0804-Prevent-sending-oversized-item-data-in-equipment-and.patch diff --git a/patches/server/0806-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0805-Hide-unnecessary-itemmeta-from-clients.patch similarity index 100% rename from patches/server/0806-Hide-unnecessary-itemmeta-from-clients.patch rename to patches/server/0805-Hide-unnecessary-itemmeta-from-clients.patch diff --git a/patches/server/0807-Fix-kelp-modifier-changing-growth-for-other-crops.patch b/patches/server/0806-Fix-kelp-modifier-changing-growth-for-other-crops.patch similarity index 100% rename from patches/server/0807-Fix-kelp-modifier-changing-growth-for-other-crops.patch rename to patches/server/0806-Fix-kelp-modifier-changing-growth-for-other-crops.patch diff --git a/patches/server/0808-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0807-Prevent-ContainerOpenersCounter-openCount-from-going.patch similarity index 100% rename from patches/server/0808-Prevent-ContainerOpenersCounter-openCount-from-going.patch rename to patches/server/0807-Prevent-ContainerOpenersCounter-openCount-from-going.patch diff --git a/patches/server/0809-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0808-Add-PlayerItemFrameChangeEvent.patch similarity index 100% rename from patches/server/0809-Add-PlayerItemFrameChangeEvent.patch rename to patches/server/0808-Add-PlayerItemFrameChangeEvent.patch diff --git a/patches/server/0810-Add-player-health-update-API.patch b/patches/server/0809-Add-player-health-update-API.patch similarity index 100% rename from patches/server/0810-Add-player-health-update-API.patch rename to patches/server/0809-Add-player-health-update-API.patch diff --git a/patches/server/0811-Optimize-HashMapPalette.patch b/patches/server/0810-Optimize-HashMapPalette.patch similarity index 100% rename from patches/server/0811-Optimize-HashMapPalette.patch rename to patches/server/0810-Optimize-HashMapPalette.patch diff --git a/patches/server/0812-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0811-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 100% rename from patches/server/0812-Allow-delegation-to-vanilla-chunk-gen.patch rename to patches/server/0811-Allow-delegation-to-vanilla-chunk-gen.patch diff --git a/patches/server/0813-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0812-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch similarity index 100% rename from patches/server/0813-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch rename to patches/server/0812-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch diff --git a/patches/server/0814-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0813-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 100% rename from patches/server/0814-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/server/0813-Optimise-collision-checking-in-player-move-packet-ha.patch diff --git a/patches/server/0815-Actually-unload-POI-data.patch b/patches/server/0814-Actually-unload-POI-data.patch similarity index 91% rename from patches/server/0815-Actually-unload-POI-data.patch rename to patches/server/0814-Actually-unload-POI-data.patch index b23193ed6..8a61aa29f 100644 --- a/patches/server/0815-Actually-unload-POI-data.patch +++ b/patches/server/0814-Actually-unload-POI-data.patch @@ -10,7 +10,7 @@ This patch also prevents the saving/unloading of POI data when world saving is disabled. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917469cccb9 100644 +index 727ee42ec573fd1d008f526f49d0e63396ef0a9d..0e6bc8f7b31581fe0e7adb13119b30295aeac48d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -848,6 +848,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -21,16 +21,16 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917 this.updatingChunks.queueUpdate(pos, holder); // Paper - Don't copy this.modified = true; -@@ -997,7 +998,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || !this.updatingChunks.getUpdatingValuesCopy().isEmpty() || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.distanceManager.hasTickets(); // Paper - } - -- private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more -+ public static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more +@@ -999,7 +1000,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private void processUnloads(BooleanSupplier shouldKeepTicking) { LongIterator longiterator = this.toDrop.iterator(); -@@ -1061,6 +1062,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +- for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) { ++ for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) { // Paper - diff on change + long j = longiterator.nextLong(); + ChunkHolder playerchunk = this.updatingChunks.queueRemove(j); // Paper - Don't copy + +@@ -1047,6 +1048,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z); } // Paper end @@ -38,7 +38,7 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917 if (ichunkaccess instanceof LevelChunk) { ((LevelChunk) ichunkaccess).setLoaded(false); } -@@ -1090,6 +1092,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1076,6 +1078,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider for (int index = 0, len = this.regionManagers.size(); index < len; ++index) { this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z); } @@ -46,7 +46,7 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917 } // Paper end } finally { this.unloadingPlayerChunk = unloadingBefore; } // Paper - do not allow ticket level changes while unloading chunks -@@ -1166,6 +1169,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1152,6 +1155,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } this.poiManager.loadInData(pos, chunkHolder.poiData); chunkHolder.tasks.forEach(Runnable::run); @@ -55,7 +55,7 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917 if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.level.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java -index 8a569e3300543cb171c3befae59969628adc424c..bbd9fdaa4b12543307b144da72b0604eae638cbb 100644 +index 8a569e3300543cb171c3befae59969628adc424c..54013682ee07cfe34f47070b6460c21ff420130f 100644 --- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java +++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java @@ -1,5 +1,6 @@ @@ -169,9 +169,9 @@ index 8a569e3300543cb171c3befae59969628adc424c..bbd9fdaa4b12543307b144da72b0604e + net.minecraft.server.level.ServerChunkCache chunkProvider = this.world.getChunkSource(); + net.minecraft.server.level.ChunkMap playerChunkMap = chunkProvider.chunkMap; + // copied target determination from PlayerChunkMap -+ int target = Math.min(this.queuedUnloads.size() - 100, (int) (this.queuedUnloads.size() * net.minecraft.server.level.ChunkMap.UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive -+ for (java.util.Iterator iterator = this.queuedUnloads.iterator(); -+ iterator.hasNext() && (this.queuedUnloads.size() > target || canSleepForTick.getAsBoolean());) { ++ ++ java.util.Iterator iterator = this.queuedUnloads.iterator(); ++ for (int i = 0; iterator.hasNext() && (i < 200 || this.queuedUnloads.size() > 2000 || canSleepForTick.getAsBoolean()); i++) { + QueuedUnload unload = iterator.next(); + if (unload.unloadTick > currentTick) { + break; diff --git a/patches/server/0816-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0815-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch similarity index 100% rename from patches/server/0816-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch rename to patches/server/0815-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch diff --git a/patches/server/0817-Update-Log4j.patch b/patches/server/0816-Update-Log4j.patch similarity index 100% rename from patches/server/0817-Update-Log4j.patch rename to patches/server/0816-Update-Log4j.patch diff --git a/patches/server/0818-Add-more-Campfire-API.patch b/patches/server/0817-Add-more-Campfire-API.patch similarity index 100% rename from patches/server/0818-Add-more-Campfire-API.patch rename to patches/server/0817-Add-more-Campfire-API.patch diff --git a/patches/server/0819-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch b/patches/server/0818-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch similarity index 100% rename from patches/server/0819-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch rename to patches/server/0818-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch diff --git a/patches/server/0820-Fix-tripwire-state-inconsistency.patch b/patches/server/0819-Fix-tripwire-state-inconsistency.patch similarity index 100% rename from patches/server/0820-Fix-tripwire-state-inconsistency.patch rename to patches/server/0819-Fix-tripwire-state-inconsistency.patch diff --git a/patches/server/0821-Fix-fluid-logging-on-Block-breakNaturally.patch b/patches/server/0820-Fix-fluid-logging-on-Block-breakNaturally.patch similarity index 86% rename from patches/server/0821-Fix-fluid-logging-on-Block-breakNaturally.patch rename to patches/server/0820-Fix-fluid-logging-on-Block-breakNaturally.patch index 3d1428bea..b87c2849f 100644 --- a/patches/server/0821-Fix-fluid-logging-on-Block-breakNaturally.patch +++ b/patches/server/0820-Fix-fluid-logging-on-Block-breakNaturally.patch @@ -7,10 +7,10 @@ Leaves fluid if the block broken was fluid-logged which is what happens if a player breaks a fluid-logged block diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 88c8817a85546ff92424b1164abcd74a15ff0917..c18edb2c0680a336f11fab30d1d985192dc1393e 100644 +index 0b2e33fb16f832e0ddfe5e39a8a16caf98521098..68eaae018646c541c8553ded80c5cafdfc5ae63f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -508,6 +508,7 @@ public class CraftBlock implements Block { +@@ -515,6 +515,7 @@ public class CraftBlock implements Block { net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS(); net.minecraft.world.level.block.Block block = iblockdata.getBlock(); net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item); @@ -18,7 +18,7 @@ index 88c8817a85546ff92424b1164abcd74a15ff0917..c18edb2c0680a336f11fab30d1d98519 boolean result = false; // Modelled off EntityHuman#hasBlock -@@ -518,7 +519,7 @@ public class CraftBlock implements Block { +@@ -525,7 +526,7 @@ public class CraftBlock implements Block { } // SPIGOT-6778: Directly call setBlock instead of setTypeAndData, so that the tile entiy is not removed and custom remove logic is run. diff --git a/patches/server/0822-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0821-Forward-CraftEntity-in-teleport-command.patch similarity index 100% rename from patches/server/0822-Forward-CraftEntity-in-teleport-command.patch rename to patches/server/0821-Forward-CraftEntity-in-teleport-command.patch diff --git a/patches/server/0823-Improve-scoreboard-entries.patch b/patches/server/0822-Improve-scoreboard-entries.patch similarity index 100% rename from patches/server/0823-Improve-scoreboard-entries.patch rename to patches/server/0822-Improve-scoreboard-entries.patch diff --git a/patches/server/0824-Entity-powdered-snow-API.patch b/patches/server/0823-Entity-powdered-snow-API.patch similarity index 100% rename from patches/server/0824-Entity-powdered-snow-API.patch rename to patches/server/0823-Entity-powdered-snow-API.patch diff --git a/patches/server/0825-Add-API-for-item-entity-health.patch b/patches/server/0824-Add-API-for-item-entity-health.patch similarity index 83% rename from patches/server/0825-Add-API-for-item-entity-health.patch rename to patches/server/0824-Add-API-for-item-entity-health.patch index c475b8fda..d923270a1 100644 --- a/patches/server/0825-Add-API-for-item-entity-health.patch +++ b/patches/server/0824-Add-API-for-item-entity-health.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add API for item entity health diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index 342345eb04d00efb58392ccf209e3c51c1064173..8d56f0ab748373e55c0166b92382c126fe8e5381 100644 +index 1d90219c3a0e86786a9497d4c078c2d4077ab6cd..fea44ba6a6584b4a510af6a58cab07eecec6b68b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -@@ -85,6 +85,21 @@ public class CraftItem extends CraftEntity implements Item { +@@ -102,6 +102,21 @@ public class CraftItem extends CraftEntity implements Item { public void setWillAge(boolean willAge) { item.age = willAge ? 0 : NO_AGE_TIME; } diff --git a/patches/server/0826-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0825-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 100% rename from patches/server/0826-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/0825-Fix-entity-type-tags-suggestions-in-selectors.patch diff --git a/patches/server/0827-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0826-Configurable-max-block-light-for-monster-spawning.patch similarity index 100% rename from patches/server/0827-Configurable-max-block-light-for-monster-spawning.patch rename to patches/server/0826-Configurable-max-block-light-for-monster-spawning.patch diff --git a/patches/server/0828-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0827-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch similarity index 100% rename from patches/server/0828-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch rename to patches/server/0827-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch diff --git a/patches/server/0829-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0828-Load-effect-amplifiers-greater-than-127-correctly.patch similarity index 100% rename from patches/server/0829-Load-effect-amplifiers-greater-than-127-correctly.patch rename to patches/server/0828-Load-effect-amplifiers-greater-than-127-correctly.patch diff --git a/patches/server/0830-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0829-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch similarity index 100% rename from patches/server/0830-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to patches/server/0829-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch diff --git a/patches/server/0831-Fix-bees-aging-inside-hives.patch b/patches/server/0830-Fix-bees-aging-inside-hives.patch similarity index 100% rename from patches/server/0831-Fix-bees-aging-inside-hives.patch rename to patches/server/0830-Fix-bees-aging-inside-hives.patch diff --git a/patches/server/0832-Bucketable-API.patch b/patches/server/0831-Bucketable-API.patch similarity index 100% rename from patches/server/0832-Bucketable-API.patch rename to patches/server/0831-Bucketable-API.patch diff --git a/patches/server/0833-Check-player-world-in-endPortalSoundRadius.patch b/patches/server/0832-Check-player-world-in-endPortalSoundRadius.patch similarity index 100% rename from patches/server/0833-Check-player-world-in-endPortalSoundRadius.patch rename to patches/server/0832-Check-player-world-in-endPortalSoundRadius.patch diff --git a/patches/server/0834-Validate-usernames.patch b/patches/server/0833-Validate-usernames.patch similarity index 100% rename from patches/server/0834-Validate-usernames.patch rename to patches/server/0833-Validate-usernames.patch diff --git a/patches/server/0835-Fix-saving-configs-with-more-long-comments.patch b/patches/server/0834-Fix-saving-configs-with-more-long-comments.patch similarity index 100% rename from patches/server/0835-Fix-saving-configs-with-more-long-comments.patch rename to patches/server/0834-Fix-saving-configs-with-more-long-comments.patch diff --git a/patches/server/0836-Make-water-animal-spawn-height-configurable.patch b/patches/server/0835-Make-water-animal-spawn-height-configurable.patch similarity index 100% rename from patches/server/0836-Make-water-animal-spawn-height-configurable.patch rename to patches/server/0835-Make-water-animal-spawn-height-configurable.patch diff --git a/patches/server/0837-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0836-Expose-vanilla-BiomeProvider-from-WorldInfo.patch similarity index 97% rename from patches/server/0837-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to patches/server/0836-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index ba7ebe0db..9f6150599 100644 --- a/patches/server/0837-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0836-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index dff3ce704d44d13a250b9a6ae1ec1768e4a8187a..4eafa147edad4fe66fb419635c320a01186e7fea 100644 +index f877b956859643b4f3d969992f2e515dc490f90c..88db383a1527301332e8a047066afa5ed827db32 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -584,7 +584,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993e65b2ad0 100644 +index 0e6bc8f7b31581fe0e7adb13119b30295aeac48d..6ce27675103d4b691216c6b701b6ceb821af528f 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -217,6 +217,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1434,7 +1434,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 } // Paper end // Paper start -@@ -1435,11 +1439,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1421,11 +1425,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider completablefuture1.thenAcceptAsync((either) -> { either.ifLeft((chunk) -> { this.tickingGenerated.getAndIncrement(); @@ -1447,7 +1447,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 }); }, (runnable) -> { this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, runnable)); -@@ -1608,33 +1608,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1594,33 +1594,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int k = this.viewDistance; this.viewDistance = j; @@ -1490,7 +1490,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 if (chunk != null) { this.playerLoadedChunk(player, packet, chunk); -@@ -1665,7 +1656,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1651,7 +1642,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider void dumpChunks(Writer writer) throws IOException { CsvOutput csvwriter = CsvOutput.builder().addColumn("x").addColumn("z").addColumn("level").addColumn("in_memory").addColumn("status").addColumn("full_status").addColumn("accessible_ready").addColumn("ticking_ready").addColumn("entity_ticking_ready").addColumn("ticket").addColumn("spawning").addColumn("block_entity_count").addColumn("ticking_ticket").addColumn("ticking_level").addColumn("block_ticks").addColumn("fluid_ticks").build(writer); @@ -1499,7 +1499,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 ObjectBidirectionalIterator objectbidirectionaliterator = this.updatingChunks.getVisibleMap().clone().long2ObjectEntrySet().fastIterator(); // Paper while (objectbidirectionaliterator.hasNext()) { -@@ -1681,7 +1672,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1667,7 +1658,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // CraftBukkit - decompile error csvwriter.writeRow(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(ChunkAccess::getStatus).orElse(null), optional1.map(LevelChunk::getFullStatus).orElse(null), ChunkMap.printFuture(playerchunk.getFullChunkFuture()), ChunkMap.printFuture(playerchunk.getTickingChunkFuture()), ChunkMap.printFuture(playerchunk.getEntityTickingChunkFuture()), this.distanceManager.getTicketDebugString(i), this.anyPlayerCloseEnoughForSpawning(chunkcoordintpair), optional1.map((chunk) -> { return chunk.getBlockEntities().size(); @@ -1508,7 +1508,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 return chunk.getBlockTicks().count(); }).orElse(0), optional1.map((chunk) -> { return chunk.getFluidTicks().count(); -@@ -1898,15 +1889,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1884,15 +1875,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.removePlayerFromDistanceMaps(player); // Paper - distance maps } @@ -1525,7 +1525,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 } -@@ -1914,7 +1897,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1900,7 +1883,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider SectionPos sectionposition = SectionPos.of((Entity) player); player.setLastSectionPos(sectionposition); @@ -1534,7 +1534,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 return sectionposition; } -@@ -1959,65 +1942,40 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1945,65 +1928,40 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int k1; int l1; @@ -1622,7 +1622,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993 } public void addEntity(Entity entity) { -@@ -2386,7 +2344,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -2372,7 +2330,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider double vec3d_dx = player.getX() - this.entity.getX(); double vec3d_dz = player.getZ() - this.entity.getZ(); // Paper end - remove allocation of Vec3D here @@ -1874,7 +1874,7 @@ index cd6eb305f4d36be923f6c5f0dd85e449d0f94c8f..5793154c0deca7fc570bbe858c6bea0d return true; } else { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2187331d2f3c4f14281dde6f01422fc4d5458e0e..af7e4ce201a471d2f59d16c0810bb08cc586363b 100644 +index 1e2c430a8df6afde91e3c5169d2d7b501acdec7f..1347ea594d3e771f02a73d95454388d4533c8be8 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -658,7 +658,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1898,7 +1898,7 @@ index 2187331d2f3c4f14281dde6f01422fc4d5458e0e..af7e4ce201a471d2f59d16c0810bb08c } protected void tickTime() { -@@ -2370,7 +2373,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2373,7 +2376,7 @@ public class ServerLevel extends Level implements WorldGenLevel { private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) { // Paper start - optimize is ticking ready type functions ChunkHolder chunkHolder = this.chunkSource.chunkMap.getVisibleChunkIfPresent(chunkPos); diff --git a/patches/server/0860-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0859-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 87% rename from patches/server/0860-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0859-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index 17181993c..5421744dc 100644 --- a/patches/server/0860-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0859-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4eafa147edad4fe66fb419635c320a01186e7fea..b69af9a2f1a0e3d578aaade1fb040d3d4230a941 100644 +index 88db383a1527301332e8a047066afa5ed827db32..dc94d0a99af26a61b1309ea556b0df2d5f525ea3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1356,6 +1356,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver1.getChunkSource().chunkMap.hasWork(); })) { -@@ -1010,9 +1017,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return true; }, false); @@ -42,7 +42,7 @@ index 17e87875a95495940899b862eabf98b3d6a365da..39b7c78b032ed6fc29ac765020d5a388 } this.saveAllChunks(false, true, false); -@@ -1308,6 +1317,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop