From cfe3ad1b0f0452cc88c3f5de675be3b34a98657b Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 9 Jun 2022 18:20:47 -0700 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 45d9c73c SPIGOT-7043: EnderChest does not implement Lidded 86b95f34 SPIGOT-7047: Add Player#getLastDeathLocation CraftBukkit Changes: b2557f6ac SPIGOT-7041: Custom BiomeProvider not used when world set to type FLAT 732c50cab SPIGOT-7043: EnderChest does not implement Lidded 6209029ea SPIGOT-7048: addPassenger() not working when vehicle is player 3aa7836df SPIGOT-7047: Add Player#getLastDeathLocation 7d522cd26 SPIGOT-7050: Enchantment data of items will not be saved correctly when saved in YAML configuration file Spigot Changes: 1dffefb4 Rebuild patches --- patches/api/0306-More-Lidded-Block-API.patch | 10 ------ patches/server/0004-Paper-config-files.patch | 4 +-- patches/server/0006-CB-fixes.patch | 4 +-- patches/server/0007-MC-Utils.patch | 10 +++--- patches/server/0008-Adventure.patch | 8 ++--- patches/server/0012-Timings-v2.patch | 22 ++++++------ patches/server/0027-Entity-Origin-API.patch | 4 +-- patches/server/0036-Disable-thunder.patch | 4 +-- .../server/0037-Disable-ice-and-snow.patch | 4 +-- .../server/0067-Add-World-Util-Methods.patch | 6 ++-- ...le-spawn-chances-for-skeleton-horses.patch | 4 +-- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 6 ++-- ...Entity-AddTo-RemoveFrom-World-Events.patch | 6 ++-- ...g-BlockPlaceEvent-triggering-physics.patch | 4 +-- ...item-frames-performance-and-bug-fixe.patch | 4 +-- ...-API-Replenishable-Lootables-Feature.patch | 4 +-- .../0140-Shoulder-Entities-Release-API.patch | 4 +-- ...6-Add-openSign-method-to-HumanEntity.patch | 4 +-- ...0191-Block-Enderpearl-Travel-Exploit.patch | 4 +-- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +-- .../0214-InventoryCloseEvent-Reason-API.patch | 12 +++---- ...ies-option-to-debug-dupe-uuid-issues.patch | 8 ++--- ...52-Asynchronous-chunk-IO-and-loading.patch | 8 ++--- ...-replace-OfflinePlayer-getLastPlayed.patch | 10 +++--- .../0306-Entity-getEntitySpawnReason.patch | 4 +-- ...le-Keep-Spawn-Loaded-range-per-world.patch | 6 ++-- ...timise-IEntityAccess-getPlayerByUUID.patch | 4 +-- .../0350-Entity-Activation-Range-2.0.patch | 14 ++++---- patches/server/0353-Anti-Xray.patch | 8 ++--- .../0361-Add-debug-for-sync-chunk-loads.patch | 6 ++-- ...-PlayerChunkMap-adds-crashing-server.patch | 6 ++-- ...vent-opening-inventories-when-frozen.patch | 6 ++-- patches/server/0416-Potential-bed-API.patch | 4 +-- ...rLevels-chunk-level-checking-methods.patch | 4 +-- ...-incremental-chunk-and-player-saving.patch | 6 ++-- ...geEvent-not-firing-for-all-use-cases.patch | 4 +-- ...al-open-container-api-to-HumanEntity.patch | 4 +-- ...p-capture-to-capture-all-items-added.patch | 4 +-- patches/server/0564-Remove-stale-POIs.patch | 4 +-- patches/server/0581-EntityMoveEvent.patch | 6 ++-- ...disable-pathfinding-updates-on-block.patch | 6 ++-- ...-add-isDeeplySleeping-to-HumanEntity.patch | 4 +-- ...cause-to-Weather-ThunderChangeEvents.patch | 8 ++--- .../server/0652-More-Lidded-Block-API.patch | 34 ++++--------------- ...etChunkIfLoadedImmediately-in-places.patch | 6 ++-- ...o-find-targets-for-lightning-strikes.patch | 6 ++-- ...-logic-for-inventories-on-chunk-unlo.patch | 4 +-- ...ite-entity-bounding-box-lookup-calls.patch | 4 +-- .../0736-Execute-chunk-tasks-mid-tick.patch | 8 ++--- ...l-more-information-in-watchdog-dumps.patch | 6 ++-- .../0756-Optimise-random-block-ticking.patch | 8 ++--- .../0758-Optimise-nearby-player-lookups.patch | 6 ++-- .../0759-Optimise-WorldServer-notify.patch | 10 +++--- ...entory-not-closing-on-entity-removal.patch | 4 +-- ...rOpenersCounter-openCount-from-going.patch | 4 +-- ...6-Replace-player-chunk-loader-system.patch | 8 ++--- ...858-Fix-World-locateNearestStructure.patch | 4 +-- .../0863-Fix-save-problems-on-shutdown.patch | 4 +-- patches/server/0895-Don-t-tick-markers.patch | 6 ++-- ...ix-OfflinePlayer-getBedSpawnLocation.patch | 6 ++-- ...nate-Current-redstone-implementation.patch | 6 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 64 files changed, 187 insertions(+), 219 deletions(-) diff --git a/patches/api/0306-More-Lidded-Block-API.patch b/patches/api/0306-More-Lidded-Block-API.patch index ca6b5ed74..a89f206f9 100644 --- a/patches/api/0306-More-Lidded-Block-API.patch +++ b/patches/api/0306-More-Lidded-Block-API.patch @@ -4,16 +4,6 @@ Date: Sun, 23 May 2021 17:49:31 +0900 Subject: [PATCH] More Lidded Block API -diff --git a/src/main/java/org/bukkit/block/EnderChest.java b/src/main/java/org/bukkit/block/EnderChest.java -index 17843e338f2cbccfa9342b420c62d0e4d6eec31d..ebae4e660244df15bf93a78d41f8c0c5c7083b27 100644 ---- a/src/main/java/org/bukkit/block/EnderChest.java -+++ b/src/main/java/org/bukkit/block/EnderChest.java -@@ -3,4 +3,4 @@ package org.bukkit.block; - /** - * Represents a captured state of an ender chest. - */ --public interface EnderChest extends TileState { } -+public interface EnderChest extends TileState, Lidded { } // Paper - More Lidded Block API diff --git a/src/main/java/org/bukkit/block/Lidded.java b/src/main/java/org/bukkit/block/Lidded.java index 9da2566e02e63be1a0188deaa27b841fa61688ea..30c7df0021df44a411e50636d906d4a1d30fd927 100644 --- a/src/main/java/org/bukkit/block/Lidded.java diff --git a/patches/server/0004-Paper-config-files.patch b/patches/server/0004-Paper-config-files.patch index 835a08bf8..a27a5441f 100644 --- a/patches/server/0004-Paper-config-files.patch +++ b/patches/server/0004-Paper-config-files.patch @@ -4049,10 +4049,10 @@ index 570db14d930e15a96621d0d24ce11a27dc38494b..e476f93547f386ded0174693a6218d79 this.setPvpAllowed(dedicatedserverproperties.pvp); this.setFlightAllowed(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5f7965076b14a694f644bf8fef9ba4f7b7a473ad..d9287cdcbd488a87832724feb7614b142a426aa3 100644 +index e45b71fa8ac1c3d0bca5f2c1737f302e787a1df3..3dadcddc9b4954e2c572e76e6b6c7d570fd47b8e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -225,7 +225,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -226,7 +226,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { // Holder holder = worlddimension.typeHolder(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error diff --git a/patches/server/0006-CB-fixes.patch b/patches/server/0006-CB-fixes.patch index f67770099..c5a85d1bf 100644 --- a/patches/server/0006-CB-fixes.patch +++ b/patches/server/0006-CB-fixes.patch @@ -17,10 +17,10 @@ Subject: [PATCH] CB fixes Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d9287cdcbd488a87832724feb7614b142a426aa3..d9cdd61006f1aef2e3d0bdd727bd436fea1b8327 100644 +index 3dadcddc9b4954e2c572e76e6b6c7d570fd47b8e..06b1821ea08eccc5bb1ae856d35b13912ab491ec 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -289,7 +289,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -292,7 +292,7 @@ public class ServerLevel extends Level implements WorldGenLevel { long l = minecraftserver.getWorldData().worldGenSettings().seed(); diff --git a/patches/server/0007-MC-Utils.patch b/patches/server/0007-MC-Utils.patch index 1f1e7ad13..4b837245c 100644 --- a/patches/server/0007-MC-Utils.patch +++ b/patches/server/0007-MC-Utils.patch @@ -5914,10 +5914,10 @@ index ce88976db29b9e9524dbe45b16721ef90afb692b..186a8f5895fedbaf27a7949d9bdbb1a9 ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a0140ea91f51e52174cff43738a9a159c3d24536..54bff89aed25ba49bf9fbf01c59efa61e021fd03 100644 +index 06b1821ea08eccc5bb1ae856d35b13912ab491ec..45c2002bbbdf838a3340b87756de1af6338aad64 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -166,6 +166,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; +@@ -167,6 +167,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; import org.bukkit.event.world.GenericGameEvent; import org.bukkit.event.world.TimeSkipEvent; // CraftBukkit end @@ -5925,7 +5925,7 @@ index a0140ea91f51e52174cff43738a9a159c3d24536..54bff89aed25ba49bf9fbf01c59efa61 public class ServerLevel extends Level implements WorldGenLevel { -@@ -221,6 +222,96 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -222,6 +223,96 @@ public class ServerLevel extends Level implements WorldGenLevel { return convertable.dimensionType; } @@ -6314,7 +6314,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671 public BlockState getBlockState(BlockPos pos) { return Blocks.AIR.defaultBlockState(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 45191c9d8dfe0c5e94d08f2c3b3fd20fe9903e18..c351e38cc12b5c58a2f85b707a7d04b59a1ef198 100644 +index 649df119b24dc8c390f45e9f813cf8c37994e0cf..0fa91ed5ed41c944f7398a88f9352742f34d4af5 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -85,6 +85,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -7085,7 +7085,7 @@ index d40c0d8be1b0153d62021b8bcb6e8b37fd0acb4e..e38e57b1f9ef27020de35d7ddcb36a66 public void clear() { // Create new array to reset memory usage to initial capacity diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 8a63098d821b7aacec8529811865e0743d78c021..3dacdbb28db72ecd8ddf82f75d6d19bb386f8df0 100644 +index 7c35d86eac0d69ba4be48faf364fd6dc84fa7e87..ed8ae212fc0ca781438fa9667f3f5cccc0af4cee 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -118,7 +118,11 @@ public class SpigotConfig diff --git a/patches/server/0008-Adventure.patch b/patches/server/0008-Adventure.patch index 484320b9f..3ad9238ba 100644 --- a/patches/server/0008-Adventure.patch +++ b/patches/server/0008-Adventure.patch @@ -2332,7 +2332,7 @@ index 8107ed0d248ff2a1cf8e556b7610a68f6c197691..eaff8df6c8c12c64e005a68a02e2e35e + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index b4c90f8f55afcf66cff97d11ab5d69d3a692633e..7d186c7595dbcd109cee2cc16d70d8302b4d6b8f 100644 +index 53b5af4179cc4bc4d5646f183da5e327a45237ac..a859a675b4bc543e139358223cc92ad5eee3ddb5 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -189,6 +189,12 @@ public class CraftEnchantment extends Enchantment { @@ -2412,10 +2412,10 @@ index 7fa6212fca01af9efd787f2c74af986fbeef4a77..b403022201b34118adddf817b19a8bbd @Override public boolean isPermissionSet(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index b4d3f6358b8a762d44586fbded8844ba5485f2d0..ea952e82078acc2256757b599d1d4ca457f951b5 100644 +index 56151652fdeb98f54358cfefc3d8773c1a39fcf6..2099056896954c700840f3c598f147e4983b86a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -317,9 +317,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -318,9 +318,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { container = CraftEventFactory.callInventoryOpenEvent(player, container); if (container == null) return; @@ -2430,7 +2430,7 @@ index b4d3f6358b8a762d44586fbded8844ba5485f2d0..ea952e82078acc2256757b599d1d4ca4 player.containerMenu = container; player.initMenu(container); } -@@ -388,8 +391,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -389,8 +392,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // Now open the window MenuType windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); diff --git a/patches/server/0012-Timings-v2.patch b/patches/server/0012-Timings-v2.patch index a74f0ea0b..0e3453dfc 100644 --- a/patches/server/0012-Timings-v2.patch +++ b/patches/server/0012-Timings-v2.patch @@ -1146,7 +1146,7 @@ index 186a8f5895fedbaf27a7949d9bdbb1a9f2e36fbf..86acdd910eebb8beac4536942119c9e9 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3db1710d3e 100644 +index 45c2002bbbdf838a3340b87756de1af6338aad64..823b0d6ce2ad55532532abec07b7920ee546eb56 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1,6 +1,8 @@ @@ -1158,7 +1158,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d import com.google.common.collect.Lists; import com.mojang.datafixers.DataFixer; import com.mojang.datafixers.util.Pair; -@@ -155,7 +157,6 @@ import org.slf4j.Logger; +@@ -156,7 +158,6 @@ import org.slf4j.Logger; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.WeatherType; @@ -1166,7 +1166,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.generator.CustomWorldChunkManager; import org.bukkit.craftbukkit.util.CraftNamespacedKey; -@@ -443,7 +444,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -446,7 +447,7 @@ public class ServerLevel extends Level implements WorldGenLevel { this.updateSkyBrightness(); this.tickTime(); gameprofilerfiller.popPush("tickPending"); @@ -1175,7 +1175,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d if (!this.isDebug()) { j = this.getGameTime(); gameprofilerfiller.push("blockTicks"); -@@ -452,12 +453,16 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -455,12 +456,16 @@ public class ServerLevel extends Level implements WorldGenLevel { this.fluidTicks.tick(j, 65536, this::tickFluid); gameprofilerfiller.pop(); } @@ -1193,7 +1193,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d gameprofilerfiller.popPush("blockEvents"); timings.doSounds.startTiming(); // Spigot this.runBlockEvents(); -@@ -624,6 +629,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -627,6 +632,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } gameprofilerfiller.popPush("tickBlocks"); @@ -1201,7 +1201,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d if (randomTickSpeed > 0) { LevelChunkSection[] achunksection = chunk.getSections(); int l = achunksection.length; -@@ -656,6 +662,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -659,6 +665,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } @@ -1209,7 +1209,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d gameprofilerfiller.pop(); } -@@ -890,14 +897,22 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -893,14 +900,22 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void tickNonPassenger(Entity entity) { @@ -1233,7 +1233,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d entity.setOldPosAndRot(); ProfilerFiller gameprofilerfiller = this.getProfiler(); -@@ -916,7 +931,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -919,7 +934,7 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(entity, entity1); } @@ -1242,7 +1242,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d } -@@ -958,6 +973,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -961,6 +976,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (!savingDisabled) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit @@ -1250,7 +1250,7 @@ index 43a5d4c6f9167ab6a05df0fea56066aa74298ead..9afdcd06e7cbf71df7be98e3cb5d4b3d if (progressListener != null) { progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel")); } -@@ -967,7 +983,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -970,7 +986,10 @@ public class ServerLevel extends Level implements WorldGenLevel { progressListener.progressStage(Component.translatable("menu.savingChunks")); } @@ -1634,7 +1634,7 @@ index 98ba88896c73651591b8ad8e070868fb443ae999..864e2e0355a5fb8c1d4a5b0896ba299f }; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 268715e19a6fa7d26510d9d0a8f19b158835b279..c9e528c66cc2dab4895ff8b33e63d458c44cfc36 100644 +index c8c205db57a8a88b76589998819166e43f9d8c1d..441ec74f965744c384fd44795540ec1906a4815c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2343,12 +2343,31 @@ public final class CraftServer implements Server { diff --git a/patches/server/0027-Entity-Origin-API.patch b/patches/server/0027-Entity-Origin-API.patch index dea067f44..17814a850 100644 --- a/patches/server/0027-Entity-Origin-API.patch +++ b/patches/server/0027-Entity-Origin-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e11dd9c191b25aa29d4052e2c7479749f7e54958..39737b5ac7d4a16527196600965a8b617502c027 100644 +index 823b0d6ce2ad55532532abec07b7920ee546eb56..41c398b1819d960994922b0ffaf64ae7348d82cf 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2105,6 +2105,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2108,6 +2108,15 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.valid = true; // CraftBukkit diff --git a/patches/server/0036-Disable-thunder.patch b/patches/server/0036-Disable-thunder.patch index ef2a06195..69bb0d108 100644 --- a/patches/server/0036-Disable-thunder.patch +++ b/patches/server/0036-Disable-thunder.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 39737b5ac7d4a16527196600965a8b617502c027..2a51916a3fc8bd8d6b0255051a024dbb7f6a9ad5 100644 +index 41c398b1819d960994922b0ffaf64ae7348d82cf..93f3f935b64850cce748cd2e8d34f4c85163d888 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -579,7 +579,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -582,7 +582,7 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.push("thunder"); BlockPos blockposition; diff --git a/patches/server/0037-Disable-ice-and-snow.patch b/patches/server/0037-Disable-ice-and-snow.patch index eed900bd5..c8d77009b 100644 --- a/patches/server/0037-Disable-ice-and-snow.patch +++ b/patches/server/0037-Disable-ice-and-snow.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2a51916a3fc8bd8d6b0255051a024dbb7f6a9ad5..0023f18e7b856f6178e516d1b692d3697ba99631 100644 +index 93f3f935b64850cce748cd2e8d34f4c85163d888..1775d3c61d9c02cee6b9d89518b3ff7c97abd42d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -603,7 +603,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -606,7 +606,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } gameprofilerfiller.popPush("iceandsnow"); diff --git a/patches/server/0067-Add-World-Util-Methods.patch b/patches/server/0067-Add-World-Util-Methods.patch index a5ec2708b..436c00687 100644 --- a/patches/server/0067-Add-World-Util-Methods.patch +++ b/patches/server/0067-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0023f18e7b856f6178e516d1b692d3697ba99631..42489fe2054d75ce6fe7dd62e248387c85c0e4e5 100644 +index 1775d3c61d9c02cee6b9d89518b3ff7c97abd42d..e01f380fea580e98e62444902bdef5694dc0ffd0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -214,7 +214,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -215,7 +215,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -19,7 +19,7 @@ index 0023f18e7b856f6178e516d1b692d3697ba99631..42489fe2054d75ce6fe7dd62e248387c } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 447ce111786a53fca6b0f6c8803b47f9cadd7df7..19aca3026b2c5a7eb4288ef1a0ea297989d1c948 100644 +index ee71a6cc552bd2bb82beda1bd44905ea4cc14604..e89410b00c8f9ef94cd2baf621802fa847bd6456 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -333,6 +333,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0071-Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/0071-Configurable-spawn-chances-for-skeleton-horses.patch index d7bf4dabd..70d150cb6 100644 --- a/patches/server/0071-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/patches/server/0071-Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 42489fe2054d75ce6fe7dd62e248387c85c0e4e5..6b85a9ee89bf2f01385aa0d3aab2e92325381021 100644 +index e01f380fea580e98e62444902bdef5694dc0ffd0..6414e672dc05c772c49e14aa0cd552d888b29b31 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -583,7 +583,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -586,7 +586,7 @@ public class ServerLevel extends Level implements WorldGenLevel { blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15)); if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); diff --git a/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 17853dc91..cba2f0d92 100644 --- a/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -18,10 +18,10 @@ index 21e09c039a4c3fa64f6456e5cc7d50463590f787..cfbf7efb06f7ed6064930c4154c6e3e9 this.profiler.push(() -> { return worldserver + " " + worldserver.dimension().location(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6b85a9ee89bf2f01385aa0d3aab2e92325381021..868db73e815a59f7f917de64f3cc45d89f5b6bb5 100644 +index 6414e672dc05c772c49e14aa0cd552d888b29b31..12ab01bae716b72bed1fa4417af4643586d15c5d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -213,6 +213,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -214,6 +214,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -30,7 +30,7 @@ index 6b85a9ee89bf2f01385aa0d3aab2e92325381021..868db73e815a59f7f917de64f3cc45d8 @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); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7c058e32b83847625bd4136bfed9b5804e8beca7..46c7c63d4dced4e75079588cef2c155859e5ae36 100644 +index d3277e8aa7244ab490a6b354d863d4a9f3c60fec..8359cc9cde98ffe11f2d9ede4350a404bc5086be 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -488,7 +488,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch index 893f39848..437706561 100644 --- a/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 868db73e815a59f7f917de64f3cc45d89f5b6bb5..1115f4e444ae36d84a6f148930a3e2287e76b55a 100644 +index 12ab01bae716b72bed1fa4417af4643586d15c5d..f7270a563835cf43239cdb43bb20cda23053de67 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2115,6 +2115,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2118,6 +2118,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); } // Paper end @@ -16,7 +16,7 @@ index 868db73e815a59f7f917de64f3cc45d89f5b6bb5..1115f4e444ae36d84a6f148930a3e228 } public void onTrackingEnd(Entity entity) { -@@ -2190,6 +2191,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2193,6 +2194,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } // CraftBukkit end diff --git a/patches/server/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index e19ba5a1e..36fc104d1 100644 --- a/patches/server/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/patches/server/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 1115f4e444ae36d84a6f148930a3e2287e76b55a..a81fbe11d7b3af9ce17db1dc5dfe2eb7e043a4a5 100644 +index f7270a563835cf43239cdb43bb20cda23053de67..47511f73b9924e48b4427ba9a245fb62d824626d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1361,6 +1361,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1364,6 +1364,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void updateNeighborsAt(BlockPos pos, Block sourceBlock) { diff --git a/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 33d25bb6b..1125e93a9 100644 --- a/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system. Additionally, numerous issues to player position tracking on maps has been fixed. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a81fbe11d7b3af9ce17db1dc5dfe2eb7e043a4a5..535cb7102ad69c34e3035422429c9874ba434e31 100644 +index 47511f73b9924e48b4427ba9a245fb62d824626d..e4d6fe5f19a575acfb08fcb8335f7519ed73b295 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2136,6 +2136,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2139,6 +2139,7 @@ public class ServerLevel extends Level implements WorldGenLevel { { if ( iter.next().player == entity ) { diff --git a/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch index 9bbdc8509..28265cc6b 100644 --- a/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch @@ -669,10 +669,10 @@ index 216fc20326d71121098430dc1b9f7477265a91b7..e3bee2df77d87630e96621470e940d9d if (player != null) { builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java -index d0c1121fabe46e8268cd2691398361c182be9db5..9796e2d3cd9601416124ad5c36f962ed3f8682e8 100644 +index b31fa63019822bc172d85427b3f3f2c154d7e179..82b3f3b3aced73ce136b6b94fe212972ac6090ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java -@@ -13,8 +13,9 @@ import org.bukkit.craftbukkit.CraftWorld; +@@ -12,8 +12,9 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest; import org.bukkit.inventory.Inventory; diff --git a/patches/server/0140-Shoulder-Entities-Release-API.patch b/patches/server/0140-Shoulder-Entities-Release-API.patch index 62e01adf5..bb1d20db9 100644 --- a/patches/server/0140-Shoulder-Entities-Release-API.patch +++ b/patches/server/0140-Shoulder-Entities-Release-API.patch @@ -58,10 +58,10 @@ index 9aa134e56d661d033bb7229e6ab662534bf9cba9..794081610e52b7b8e04403510d1ad05f @Override public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index ea952e82078acc2256757b599d1d4ca457f951b5..013e68d483a1c2e707b61bfd0e2859fdc093fffa 100644 +index 2099056896954c700840f3c598f147e4983b86a1..ea024ec921a382e40c982cc529f13d08101ca131 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -503,6 +503,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -504,6 +504,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { this.getHandle().getCooldowns().addCooldown(CraftMagicNumbers.getItem(material), ticks); } diff --git a/patches/server/0186-Add-openSign-method-to-HumanEntity.patch b/patches/server/0186-Add-openSign-method-to-HumanEntity.patch index d842f4f11..460c383cf 100644 --- a/patches/server/0186-Add-openSign-method-to-HumanEntity.patch +++ b/patches/server/0186-Add-openSign-method-to-HumanEntity.patch @@ -28,10 +28,10 @@ index 911843bf38ab750edd4a63417ba7a9deb6b64cb1..a0950f5902c3719dc31205ec43dca948 // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 013e68d483a1c2e707b61bfd0e2859fdc093fffa..6c708f65b3a3718c7b53e0c2cc12ee8ad62ff2b9 100644 +index ea024ec921a382e40c982cc529f13d08101ca131..34e8ee0cc42c77715c62b0b4682f3df946266e11 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -613,6 +613,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -614,6 +614,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } diff --git a/patches/server/0191-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0191-Block-Enderpearl-Travel-Exploit.patch index 7cbf7c07a..5ad567139 100644 --- a/patches/server/0191-Block-Enderpearl-Travel-Exploit.patch +++ b/patches/server/0191-Block-Enderpearl-Travel-Exploit.patch @@ -12,10 +12,10 @@ This disables that by not saving the thrower when the chunk is unloaded. This is mainly useful for survival servers that do not allow freeform teleporting. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 535cb7102ad69c34e3035422429c9874ba434e31..9804934384975c38e1c6986c7fa73d510bb1136b 100644 +index e4d6fe5f19a575acfb08fcb8335f7519ed73b295..bd37a46aebe84e5d02b9ae40a57ed95c7c35c54b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2069,6 +2069,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2072,6 +2072,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingEnd(Entity entity) { ServerLevel.this.entityTickList.remove(entity); diff --git a/patches/server/0192-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0192-Expand-World.spawnParticle-API-and-add-Builder.patch index c7f0abe55..5886ca984 100644 --- a/patches/server/0192-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0192-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9804934384975c38e1c6986c7fa73d510bb1136b..ef9bf1ec96a320ff16385ceb28d77315b56cfef0 100644 +index bd37a46aebe84e5d02b9ae40a57ed95c7c35c54b..96723a042c23d53a955c766d7899164684c32b74 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1482,12 +1482,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1485,12 +1485,17 @@ public class ServerLevel extends Level implements WorldGenLevel { } public 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/0214-InventoryCloseEvent-Reason-API.patch b/patches/server/0214-InventoryCloseEvent-Reason-API.patch index a62e447bf..316913022 100644 --- a/patches/server/0214-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0214-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 e9f2672e7e6b4fa731343be0d34b0b13c01b1463..aa4fffbf334c925d1db66ae8da5d22f5ca4f6586 100644 +index 96723a042c23d53a955c766d7899164684c32b74..1e559d238441d28c52b3305c42dec0f6115b2626 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1155,7 +1155,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1158,7 +1158,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 e9f2672e7e6b4fa731343be0d34b0b13c01b1463..aa4fffbf334c925d1db66ae8da5d22f5 } } } -@@ -2159,7 +2159,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2162,7 +2162,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())) { @@ -145,10 +145,10 @@ index f484bdf2ef045faefad326f8e6d59962b3abb4b3..9dad71368225d86598f02962b42659bc this.containerMenu = this.inventoryMenu; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 6c708f65b3a3718c7b53e0c2cc12ee8ad62ff2b9..a6ac2fdcda24ec031d5d2ea9e4492614171acb1e 100644 +index 34e8ee0cc42c77715c62b0b4682f3df946266e11..6abac92f929f3260e62a78b0ee1887b109b0cc25 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -373,7 +373,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -374,7 +374,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (((ServerPlayer) this.getHandle()).connection == null) return; if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { // fire INVENTORY_CLOSE if one already open @@ -157,7 +157,7 @@ index 6c708f65b3a3718c7b53e0c2cc12ee8ad62ff2b9..a6ac2fdcda24ec031d5d2ea9e4492614 } ServerPlayer player = (ServerPlayer) this.getHandle(); AbstractContainerMenu container; -@@ -443,8 +443,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -444,8 +444,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { diff --git a/patches/server/0237-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0237-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 44caabe98..6818c311b 100644 --- a/patches/server/0237-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0237-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -29,10 +29,10 @@ index f9ef45635b731cafc9b6879603cac34c146833b0..29482bebf5b878c698283720d1452ef2 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 584f93acc8192444e241e71d49f6351f691a019b..ff266253406ae6b5047ce4605755df3c753a56c5 100644 +index 1e559d238441d28c52b3305c42dec0f6115b2626..547aea9a2ead3eff5690f18cfc351b01dd4cd395 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -214,6 +214,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -215,6 +215,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper @@ -42,7 +42,7 @@ index 584f93acc8192444e241e71d49f6351f691a019b..ff266253406ae6b5047ce4605755df3c @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); -@@ -1117,7 +1120,28 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1120,7 +1123,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 @@ -85,7 +85,7 @@ index 57b1d37bfe35215552c138caad8597986f755064..d020cbe64e13b479e22a8f6c09016539 if (this.bukkitEntity == null) { this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index f8058e1f54d0281863cab81e866e0aa5400bb6bd..52b954528037e2f43d7cbcf2bcf8198b0c835109 100644 +index 13fcd9d885043444d3a2c5a3d9bd1c906b4c4934..2225921e988cdcaa4fb906b281c237972c6e7c1b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -148,6 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch b/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch index 27e0516a0..30347e997 100644 --- a/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch @@ -2277,7 +2277,7 @@ index 97b29bcb20e199c2d02457f8025e67e2d4a925fc..8fda43173012ed3134ed1f114143ceaa DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, config.get(), ops.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d4595c3eadce0b09042043bd9d31aa57285e04ce..ae210087f3f0af1f98064b39e817d4f8584a1b7c 100644 +index e3f43c2b6ff47f6a8c158d176dfc2c5a3fa66a62..7bec6d7b376e382c6266456314eda3ea1cc885ec 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -953,7 +953,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop WorldDataServer -@@ -395,6 +467,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -398,6 +470,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.sleepStatus = new SleepStatus(); this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit diff --git a/patches/server/0293-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0293-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index aa8cee6ac..c5397f477 100644 --- a/patches/server/0293-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0293-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -40,10 +40,10 @@ index 5285cd8f395871c8bb55e0dc143216ae3acc0310..fee344bc4457fb4cd21d2e7ed9845f0b GameProfileCache usercache = this.server.getProfileCache(); Optional optional = usercache.get(gameprofile.getId()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index f6665825e62a0cd912e6b06df6d68795596486f0..1f2bc88d4570c6ef00e67a772b745e0b0c98e051 100644 +index e7442952ef1f03969949014492a7ddc6d0796ba5..d7823d7dc88cfba6f6ac9dae220e03dea4a0bcdd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -@@ -247,6 +247,61 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa +@@ -250,6 +250,61 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa return this.getData() != null; } @@ -103,10 +103,10 @@ index f6665825e62a0cd912e6b06df6d68795596486f0..1f2bc88d4570c6ef00e67a772b745e0b + // Paper end + @Override - public Location getBedSpawnLocation() { - CompoundTag data = this.getData(); + public Location getLastDeathLocation() { + if (this.getData().contains("LastDeathLocation", 10)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c39e13bd897d1178900558d510de7367bd0bb3a2..26f7393e912722150f91e9c2891afb2c4942d3de 100644 +index 14ea624eeb87451578138d1eedb4268a2dee7e30..fe50a54779e3ae7c26792dda740b2aa8c20b799b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -168,6 +168,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0306-Entity-getEntitySpawnReason.patch b/patches/server/0306-Entity-getEntitySpawnReason.patch index 3a6f10588..0c89d878f 100644 --- a/patches/server/0306-Entity-getEntitySpawnReason.patch +++ b/patches/server/0306-Entity-getEntitySpawnReason.patch @@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b749315bf8ae2cc4a6b98e0c0d8ca43bb4ed2fe3..fdd4b2d399db5e7071b6ac3a767e4135476ac64b 100644 +index f9b02224c455077ab37d60e830403681ca12ccc5..40a0f98acf26e104912ff2db71aab744a6c727cb 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1209,6 +1209,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1212,6 +1212,7 @@ public class ServerLevel extends Level implements WorldGenLevel { return true; } // Paper end diff --git a/patches/server/0320-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0320-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 96a3d0551..5100a6791 100644 --- a/patches/server/0320-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/0320-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8eeb1b1f2b34a231931b4dcadd7379a7dd79fe44..6ceed3a97a7fc351052b2020572d65801542f593 100644 +index 97e964030a5cc449543252933f8a7b4800833e69..feba451e86ef49e5edcc5dc60fae18537a95ee71 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -726,31 +726,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(new TypeToken>() {}, Registry.ENTITY_TYPE_REGISTRY, true)) .register(new RegistryValueSerializer<>(Item.class, Registry.ITEM_REGISTRY, true)) diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -index 7cf356a700e47686e093e2f2f880af919dc0414a..e902b437ee089907b34ae30c0a6bdf1d42e1e674 100644 +index 568ac283baf40e2a89f5b002ffd899eba8008ef2..23d76eb74a88610472aa0288559efbaa5cd916dc 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java @@ -33,7 +33,10 @@ public class ClientboundLevelChunkPacketData { @@ -1172,10 +1172,10 @@ index c4af6e0f38ac9271247ed657b8ee6b48822417b5..7996247c00bf6ea4399322d089821432 List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0b8260bd1e18a332063fc0f5ffcf2cf804fdad9c..9e80a76b4d6b6c1b9b0fa99ac8fbacf101e54a79 100644 +index aff0c117d88afab7d670a1ce95beda3df95fa0c2..bbe5e04ac07b47c143c46b3f728b8d5f968cc7f0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -401,7 +401,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -402,7 +402,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { // Holder holder = worlddimension.typeHolder(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error @@ -1606,7 +1606,7 @@ index cf48c93d89da53e0ec771e5c2c8582e30b35e3f5..518dfbb7dbd4221937636cf46d27109d } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 45d923dafdc7dad8b35b8bfd97ce7934abf7efde..2dfcb0fcae636043fa3aeeb20aaa0091a73b578c 100644 +index 66bd0ff02c6085d41251808140aceefa02782b1f..0c2658c2cd411b6e5e5dcb9a190e7b223eeb0ffc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2204,7 +2204,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0361-Add-debug-for-sync-chunk-loads.patch b/patches/server/0361-Add-debug-for-sync-chunk-loads.patch index 6e1979bb6..04d213e70 100644 --- a/patches/server/0361-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0361-Add-debug-for-sync-chunk-loads.patch @@ -13,7 +13,7 @@ chunks, however it must be enabled by setting the startup flag /paper syncloadinfo clear diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index 7ed91424ff9185bf8c06a034e880f83681f7d019..610af917885fa1c86f4258a0cc36a488c0ab4b06 100644 +index c1c95d6abfc7f1698a74387319ff90ad3a7e39af..fb2cb76e4954d9d69b4a631d6e20bdcc511b6b3f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -1,5 +1,6 @@ @@ -323,10 +323,10 @@ index c12c03b9e79f264ee593373f8a72ed37c0ae8514..509b2ee115584ce80717cc12a7ab548d chunkproviderserver_b.managedBlock(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9e80a76b4d6b6c1b9b0fa99ac8fbacf101e54a79..4ef35afd61f4bcf06807a79a0d1b16f6593ab7d7 100644 +index bbe5e04ac07b47c143c46b3f728b8d5f968cc7f0..6c3e14ebc72f179848dfb93f17864843c8a12575 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -388,6 +388,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -389,6 +389,12 @@ public class ServerLevel extends Level implements WorldGenLevel { }; public final com.destroystokyo.paper.io.chunk.ChunkTaskManager asyncChunkTaskManager; // Paper end diff --git a/patches/server/0379-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0379-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index 5def4c4fa..edfa91821 100644 --- a/patches/server/0379-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/patches/server/0379-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -26,10 +26,10 @@ index 492e073cfc2a43951e20fd2d15a576601e84a364..1290f55259a5ba0b855323ba59a1d9b8 EntityType 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 d4e054a6ed2626845373f4b0fa8463682322cf12..59d0e9f9cf90bde3d56d69c87e2fe4b9e1903ff7 100644 +index 6c3e14ebc72f179848dfb93f17864843c8a12575..a08a996722095b01720fa985ca7165a41a932056 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2288,7 +2288,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2291,7 +2291,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 d4e054a6ed2626845373f4b0fa8463682322cf12..59d0e9f9cf90bde3d56d69c87e2fe4b9 if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -2322,6 +2322,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2325,6 +2325,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.valid = true; // CraftBukkit diff --git a/patches/server/0389-Prevent-opening-inventories-when-frozen.patch b/patches/server/0389-Prevent-opening-inventories-when-frozen.patch index b9cf114eb..262597793 100644 --- a/patches/server/0389-Prevent-opening-inventories-when-frozen.patch +++ b/patches/server/0389-Prevent-opening-inventories-when-frozen.patch @@ -27,10 +27,10 @@ index 3933387e180acc0fcbff1c1147fcf73eeaa8b0d7..02a84c3f3ca6b591a1c475b5cf3357ce this.initMenu(container); return OptionalInt.of(this.containerCounter); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index a6ac2fdcda24ec031d5d2ea9e4492614171acb1e..08625a587c23394b344fed139abfcd82a3185aaf 100644 +index 6abac92f929f3260e62a78b0ee1887b109b0cc25..9d6c3cb06cf1096fc9bffe5123bf19df13fdded6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -322,7 +322,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -323,7 +323,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(container.getBukkitView().getTitle()); // Paper //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper // Paper - comment @@ -39,7 +39,7 @@ index a6ac2fdcda24ec031d5d2ea9e4492614171acb1e..08625a587c23394b344fed139abfcd82 player.containerMenu = container; player.initMenu(container); } -@@ -396,7 +396,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -397,7 +397,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment diff --git a/patches/server/0416-Potential-bed-API.patch b/patches/server/0416-Potential-bed-API.patch index 313f3b066..f7b3635cf 100644 --- a/patches/server/0416-Potential-bed-API.patch +++ b/patches/server/0416-Potential-bed-API.patch @@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 08625a587c23394b344fed139abfcd82a3185aaf..0bad3e55ede8346531dd0eb1c139c14a13e4b72e 100644 +index 9d6c3cb06cf1096fc9bffe5123bf19df13fdded6..b68e1f8c9acb05ef38ec9d35ee68748c5a31abe7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -12,6 +12,7 @@ import net.minecraft.nbt.CompoundTag; @@ -19,7 +19,7 @@ index 08625a587c23394b344fed139abfcd82a3185aaf..0bad3e55ede8346531dd0eb1c139c14a import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.Entity; -@@ -125,6 +126,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -126,6 +127,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().sleepCounter; } diff --git a/patches/server/0426-Optimize-ServerLevels-chunk-level-checking-methods.patch b/patches/server/0426-Optimize-ServerLevels-chunk-level-checking-methods.patch index 106b5f1f0..b71457af4 100644 --- a/patches/server/0426-Optimize-ServerLevels-chunk-level-checking-methods.patch +++ b/patches/server/0426-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 59d0e9f9cf90bde3d56d69c87e2fe4b9e1903ff7..d8694d9c766bc8f85d828da4dabf53215f01e54e 100644 +index a08a996722095b01720fa985ca7165a41a932056..13354b9e626ce7fec74cbaac68304a912517c40e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2247,19 +2247,22 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2250,19 +2250,22 @@ public class ServerLevel extends Level implements WorldGenLevel { } private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) { diff --git a/patches/server/0448-incremental-chunk-and-player-saving.patch b/patches/server/0448-incremental-chunk-and-player-saving.patch index 5d3d7f9f9..c19bc8c41 100644 --- a/patches/server/0448-incremental-chunk-and-player-saving.patch +++ b/patches/server/0448-incremental-chunk-and-player-saving.patch @@ -5,7 +5,7 @@ Subject: [PATCH] incremental chunk and player saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5ff10579b1ae3a7070c0548d3e5e2fae886ca6f7..67ba7274461ed438014cc208326a2c3fe7a2e43e 100644 +index d40623b3ed69a0821057f82e6164b4c94b4a7087..54a155295ed2ee2386f180bf8f5d413984febe96 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -851,7 +851,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { this.getServer().execute(() -> { diff --git a/patches/server/0581-EntityMoveEvent.patch b/patches/server/0581-EntityMoveEvent.patch index b8e9affe5..0aec7d28e 100644 --- a/patches/server/0581-EntityMoveEvent.patch +++ b/patches/server/0581-EntityMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EntityMoveEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2dbd4718b98f90842600ae4cde927b09d5fc738b..b82e510939281efa3f32d21e8080adcf232285fc 100644 +index 18f050a80f9928bae3c1a0288f152907090644b7..49f481d34eec97c2bd4f0780e97ce2d41ed04b34 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1493,6 +1493,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a679742adaca71926614203eab53099deeb6fc51..d9ecc467fb2a001856f58c090a6c8fe2d7b717e0 100644 +index 61e836ac09f91897e3edad17e4fa619a0b3f92f1..406c0b3ac5e6315789618075821e34fd7d3762f4 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -214,6 +214,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -215,6 +215,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper diff --git a/patches/server/0582-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0582-added-option-to-disable-pathfinding-updates-on-block.patch index 6a807399b..343f6700c 100644 --- a/patches/server/0582-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0582-added-option-to-disable-pathfinding-updates-on-block.patch @@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d9ecc467fb2a001856f58c090a6c8fe2d7b717e0..5c42b8ca8498074e0d371dd24ff2ac91afbaf69c 100644 +index 406c0b3ac5e6315789618075821e34fd7d3762f4..951d5fed0d688591fe6d38374a9fd340c8ab93cf 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1486,6 +1486,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1489,6 +1489,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } this.getChunkSource().blockChanged(pos); @@ -16,7 +16,7 @@ index d9ecc467fb2a001856f58c090a6c8fe2d7b717e0..5c42b8ca8498074e0d371dd24ff2ac91 VoxelShape voxelshape = oldState.getCollisionShape(this, pos); VoxelShape voxelshape1 = newState.getCollisionShape(this, pos); -@@ -1527,6 +1528,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1530,6 +1531,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } diff --git a/patches/server/0617-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0617-add-isDeeplySleeping-to-HumanEntity.patch index 45aa29e9a..2a99c85e9 100644 --- a/patches/server/0617-add-isDeeplySleeping-to-HumanEntity.patch +++ b/patches/server/0617-add-isDeeplySleeping-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 61665989cf24484509766619db95247ef40b3e1e..83c5314ed3a3f09162bca47902c4e749fab940a0 100644 +index a9c46bd7173d44191c3e9f273e0e1c576ac30a26..73517e2cc98e9cda6e577976232a6c9314226ece 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -121,6 +121,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -122,6 +122,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } diff --git a/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch index 123a3800e..5690474f5 100644 --- a/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5c42b8ca8498074e0d371dd24ff2ac91afbaf69c..c7f48b1fd8b12289a6773191277fc07bea735531 100644 +index 951d5fed0d688591fe6d38374a9fd340c8ab93cf..b19f6e48c106feed9c9c4c24c6b46fb7ac91800d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -490,8 +490,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -493,8 +493,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setClearWeatherTime(clearDuration); this.serverLevelData.setRainTime(rainDuration); this.serverLevelData.setThunderTime(rainDuration); @@ -19,7 +19,7 @@ index 5c42b8ca8498074e0d371dd24ff2ac91afbaf69c..c7f48b1fd8b12289a6773191277fc07b } @Override -@@ -883,8 +883,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -886,8 +886,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setThunderTime(j); this.serverLevelData.setRainTime(k); this.serverLevelData.setClearWeatherTime(i); @@ -30,7 +30,7 @@ index 5c42b8ca8498074e0d371dd24ff2ac91afbaf69c..c7f48b1fd8b12289a6773191277fc07b } this.oThunderLevel = this.thunderLevel; -@@ -950,14 +950,14 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -953,14 +953,14 @@ public class ServerLevel extends Level implements WorldGenLevel { private void resetWeatherCycle() { // CraftBukkit start diff --git a/patches/server/0652-More-Lidded-Block-API.patch b/patches/server/0652-More-Lidded-Block-API.patch index 5b7c8a3b6..135fd6869 100644 --- a/patches/server/0652-More-Lidded-Block-API.patch +++ b/patches/server/0652-More-Lidded-Block-API.patch @@ -21,10 +21,10 @@ index 9d0c272b1d89a96b0b63603fa8e4649f11fb6c51..d5fdf4504a0ca76fb0483f4ae5861c93 + // Paper end - More Lidded Block API } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java -index 9796e2d3cd9601416124ad5c36f962ed3f8682e8..03edde8c3b429d541b30d5ee9d15aa03bfb88d38 100644 +index 82b3f3b3aced73ce136b6b94fe212972ac6090ef..b4bc5cbb71007b4d1a27bb841ff787a95e9ecbdc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java -@@ -75,4 +75,11 @@ public class CraftChest extends CraftLootable implements Chest +@@ -78,4 +78,11 @@ public class CraftChest extends CraftLootable implements Chest } getTileEntity().openersCounter.opened = false; } @@ -37,38 +37,16 @@ index 9796e2d3cd9601416124ad5c36f962ed3f8682e8..03edde8c3b429d541b30d5ee9d15aa03 + // Paper end - More Lidded Block API } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java -index 950066001b23e7b9aec48b2369163d6196979640..c48d7ec19603962855962c6ae6e1275c1552c906 100644 +index 6513acb46591b2903d1baf18c23ed1fc8c2a731f..b8ab67fd1820613520203f708f2f267587ace67b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java -@@ -9,4 +9,33 @@ public class CraftEnderChest extends CraftBlockEntityState optional = this.findLightningRod(blockposition1); -@@ -786,6 +791,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -789,6 +794,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (!list.isEmpty()) { return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition(); } else { diff --git a/patches/server/0720-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0720-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index 2fd4f5ad6..8625d2dd2 100644 --- a/patches/server/0720-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0720-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 1637a809256350685d85abedf0a57971ce5613ea..a110acecd0459ff2731dbc5f10cc0d990afd4d5b 100644 +index 5f35cfe1ab67cc77d4b7ad4e440bf1d4dc6642c6..3fc394d82217a273dad07b44cc18a66e1e3886c6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1330,9 +1330,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1333,9 +1333,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) { diff --git a/patches/server/0734-Rewrite-entity-bounding-box-lookup-calls.patch b/patches/server/0734-Rewrite-entity-bounding-box-lookup-calls.patch index 3fd2a79f0..5b5e482cc 100644 --- a/patches/server/0734-Rewrite-entity-bounding-box-lookup-calls.patch +++ b/patches/server/0734-Rewrite-entity-bounding-box-lookup-calls.patch @@ -914,10 +914,10 @@ index 0000000000000000000000000000000000000000..3ba094e640d7fe7803e2bbdab8ff3beb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 4dc54c121b4e41cc7ef5da1313fa6a49e73de9e8..5518dc58647aae68b31dbe059cdbc669cfa73112 100644 +index 3fc394d82217a273dad07b44cc18a66e1e3886c6..463d665ee708d741440331393e0b0a97fc981200 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -446,7 +446,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -449,7 +449,7 @@ public class ServerLevel extends Level implements WorldGenLevel { DataFixer datafixer = minecraftserver.getFixerUpper(); EntityPersistentStorage entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver); diff --git a/patches/server/0736-Execute-chunk-tasks-mid-tick.patch b/patches/server/0736-Execute-chunk-tasks-mid-tick.patch index 7cb0972dc..e6a7a57ca 100644 --- a/patches/server/0736-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0736-Execute-chunk-tasks-mid-tick.patch @@ -126,10 +126,10 @@ index 438406936633b9c67d21b26527c3d1654118c744..2de322ffc2eedae9efe39f9b771c447d } // Paper start - optimise chunk tick iteration diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 645a90cf1b98848186383472765716948ab2cd3e..c0340d8147e676a1e9d650902ef2dfe700e25d97 100644 +index 463d665ee708d741440331393e0b0a97fc981200..572e635739cf43ddb4b4e51df59d4c2612b77034 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -209,6 +209,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -210,6 +210,7 @@ public class ServerLevel extends Level implements WorldGenLevel { private final StructureManager structureManager; private final StructureCheck structureCheck; private final boolean tickTime; @@ -137,7 +137,7 @@ index 645a90cf1b98848186383472765716948ab2cd3e..c0340d8147e676a1e9d650902ef2dfe7 // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; -@@ -983,6 +984,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -986,6 +987,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (fluid1.is(fluid)) { fluid1.tick(this, pos); } @@ -145,7 +145,7 @@ index 645a90cf1b98848186383472765716948ab2cd3e..c0340d8147e676a1e9d650902ef2dfe7 } -@@ -992,6 +994,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -995,6 +997,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (iblockdata.is(block)) { iblockdata.tick(this, pos, this.random); } diff --git a/patches/server/0740-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0740-Detail-more-information-in-watchdog-dumps.patch index a5d0b1017..17b3bc428 100644 --- a/patches/server/0740-Detail-more-information-in-watchdog-dumps.patch +++ b/patches/server/0740-Detail-more-information-in-watchdog-dumps.patch @@ -77,10 +77,10 @@ index a34f22cadc09e53ea4de787b04d050b99dddbcac..c8012de68b997d6270ba4a5d79bc93c0 }); throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0b3c4e43d5d9b13c963b1802cd85f099b4274c8c..61251596a16fc1e2aba735feca2c073a4db3a4a8 100644 +index 572e635739cf43ddb4b4e51df59d4c2612b77034..d3470ba0b1732356d1082f23632dbe218ceb167e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -998,7 +998,26 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1001,7 +1001,26 @@ public class ServerLevel extends Level implements WorldGenLevel { } @@ -107,7 +107,7 @@ index 0b3c4e43d5d9b13c963b1802cd85f099b4274c8c..61251596a16fc1e2aba735feca2c073a ++TimingHistory.entityTicks; // Paper - timings // Spigot start co.aikar.timings.Timing timer; // Paper -@@ -1038,7 +1057,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1041,7 +1060,13 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(entity, entity1); } // } finally { timer.stopTiming(); } // Paper - timings - move up diff --git a/patches/server/0756-Optimise-random-block-ticking.patch b/patches/server/0756-Optimise-random-block-ticking.patch index 268386f2a..c27a32ab1 100644 --- a/patches/server/0756-Optimise-random-block-ticking.patch +++ b/patches/server/0756-Optimise-random-block-ticking.patch @@ -120,10 +120,10 @@ index 0000000000000000000000000000000000000000..16ca915c33e31b50d33336408b041e40 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 61251596a16fc1e2aba735feca2c073a4db3a4a8..69ecceda441d9a228c1ae401688ea7333287b80c 100644 +index d3470ba0b1732356d1082f23632dbe218ceb167e..b0c971df2ae296b2ae4516ff121052b3b4526103 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -662,6 +662,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -665,6 +665,10 @@ public class ServerLevel extends Level implements WorldGenLevel { entityplayer.stopSleepInBed(false, false); }); } @@ -134,7 +134,7 @@ index 61251596a16fc1e2aba735feca2c073a4db3a4a8..69ecceda441d9a228c1ae401688ea733 public void tickChunk(LevelChunk chunk, int randomTickSpeed) { ChunkPos chunkcoordintpair = chunk.getPos(); -@@ -671,10 +675,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -674,10 +678,10 @@ public class ServerLevel extends Level implements WorldGenLevel { ProfilerFiller gameprofilerfiller = this.getProfiler(); gameprofilerfiller.push("thunder"); @@ -147,7 +147,7 @@ index 61251596a16fc1e2aba735feca2c073a4db3a4a8..69ecceda441d9a228c1ae401688ea733 if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper -@@ -698,64 +702,75 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -701,64 +705,75 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.popPush("iceandsnow"); if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow diff --git a/patches/server/0758-Optimise-nearby-player-lookups.patch b/patches/server/0758-Optimise-nearby-player-lookups.patch index cce3f6f7c..5ea9f8655 100644 --- a/patches/server/0758-Optimise-nearby-player-lookups.patch +++ b/patches/server/0758-Optimise-nearby-player-lookups.patch @@ -105,10 +105,10 @@ index d2227b40aa6a5e49e30c1f33e407d8f25cf2be4e..1c5137be8c0935ae371d0b9e6a8f3d8b protected ChunkGenerator generator() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 69ecceda441d9a228c1ae401688ea7333287b80c..61964e73b020aa565a855d23f2f4da2da342c1e1 100644 +index b0c971df2ae296b2ae4516ff121052b3b4526103..2c61c756764bc8d2830294ca0c8be8e0e8fb1828 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -404,6 +404,83 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -405,6 +405,83 @@ public class ServerLevel extends Level implements WorldGenLevel { return this.getServer().getPlayerList().getPlayer(uuid); } // Paper end @@ -192,7 +192,7 @@ index 69ecceda441d9a228c1ae401688ea7333287b80c..61964e73b020aa565a855d23f2f4da2d // Add env and gen to constructor, IWorldDataServer -> WorldDataServer public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { -@@ -505,6 +582,14 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -508,6 +585,14 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void tick(BooleanSupplier shouldKeepTicking) { diff --git a/patches/server/0759-Optimise-WorldServer-notify.patch b/patches/server/0759-Optimise-WorldServer-notify.patch index c2bb970d7..fdf622c73 100644 --- a/patches/server/0759-Optimise-WorldServer-notify.patch +++ b/patches/server/0759-Optimise-WorldServer-notify.patch @@ -110,10 +110,10 @@ index 1c5137be8c0935ae371d0b9e6a8f3d8bccd85d31..8939d15bd413a2b743303d137fc797be } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 61964e73b020aa565a855d23f2f4da2da342c1e1..81016748af10abc2b3ea15109e4d9bb32383cbc3 100644 +index 2c61c756764bc8d2830294ca0c8be8e0e8fb1828..eb1c66e648c20c5cb23227c2f4692a1917b0f55a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1113,6 +1113,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1116,6 +1116,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void tickNonPassenger(Entity entity) { // Paper start - log detailed entity tick information io.papermc.paper.util.TickThread.ensureTickThread("Cannot tick an entity off-main"); @@ -121,7 +121,7 @@ index 61964e73b020aa565a855d23f2f4da2da342c1e1..81016748af10abc2b3ea15109e4d9bb3 try { if (currentlyTickingEntity.get() == null) { currentlyTickingEntity.lazySet(entity); -@@ -1630,9 +1631,18 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1633,9 +1634,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 61964e73b020aa565a855d23f2f4da2da342c1e1..81016748af10abc2b3ea15109e4d9bb3 // CraftBukkit start - fix SPIGOT-6362 Mob entityinsentient; try { -@@ -1654,16 +1664,23 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1657,16 +1667,23 @@ public class ServerLevel extends Level implements WorldGenLevel { try { this.isUpdatingNavigations = true; @@ -169,7 +169,7 @@ index 61964e73b020aa565a855d23f2f4da2da342c1e1..81016748af10abc2b3ea15109e4d9bb3 } } // Paper -@@ -2461,10 +2478,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2464,10 +2481,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingStart(Entity entity) { ServerLevel.this.entityTickList.add(entity); diff --git a/patches/server/0767-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0767-Fix-merchant-inventory-not-closing-on-entity-removal.patch index ab7cb8cc3..7b2fa0c05 100644 --- a/patches/server/0767-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0767-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 81016748af10abc2b3ea15109e4d9bb32383cbc3..edeafd4c671d686c96bffc095fa81b9a4a6723a6 100644 +index eb1c66e648c20c5cb23227c2f4692a1917b0f55a..3b2a3f5e6db4685c3f8d95dc46c85a2ba7b5ec7c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2569,6 +2569,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2572,6 +2572,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/0796-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0796-Prevent-ContainerOpenersCounter-openCount-from-going.patch index 028a3784e..62a65ff13 100644 --- a/patches/server/0796-Prevent-ContainerOpenersCounter-openCount-from-going.patch +++ b/patches/server/0796-Prevent-ContainerOpenersCounter-openCount-from-going.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent ContainerOpenersCounter openCount from going negative diff --git a/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java b/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java -index 76bdce9c1555c57f8cde6d4701ee1846ea3b67d8..bb34a517a32185c53f7d769a3b3661e6d5d49f09 100644 +index ba06184bad7e8ae55cb2d55f6196e8f990d2811d..3e4b3eecc788c564f81b7929bfab7d2fdb6e307d 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java +++ b/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java -@@ -50,6 +50,7 @@ public abstract class ContainerOpenersCounter { +@@ -64,6 +64,7 @@ public abstract class ContainerOpenersCounter { public void decrementOpeners(Player player, Level world, BlockPos pos, BlockState state) { int oldPower = Math.max(0, Math.min(15, this.openCount)); // CraftBukkit - Get power before new viewer is added diff --git a/patches/server/0856-Replace-player-chunk-loader-system.patch b/patches/server/0856-Replace-player-chunk-loader-system.patch index b08a674c5..5492221e0 100644 --- a/patches/server/0856-Replace-player-chunk-loader-system.patch +++ b/patches/server/0856-Replace-player-chunk-loader-system.patch @@ -1855,10 +1855,10 @@ index 96a232f22b1c270b91635ce9c7c6cacc63b026cc..59acbf6249f8f5285504c0ddea448a34 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 52a86efcfc82621e1783bfb8dc42ae995f0755ad..4210d4b3c9d6f8bb3501b3592a6c1317c45ff3cd 100644 +index 3b2a3f5e6db4685c3f8d95dc46c85a2ba7b5ec7c..bcfa1959c2ffd9ee31804c5a00a84133599cbbc4 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -673,7 +673,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -676,7 +676,7 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.push("checkDespawn"); entity.checkDespawn(); gameprofilerfiller.pop(); @@ -1867,7 +1867,7 @@ index 52a86efcfc82621e1783bfb8dc42ae995f0755ad..4210d4b3c9d6f8bb3501b3592a6c1317 Entity entity1 = entity.getVehicle(); if (entity1 != null) { -@@ -706,7 +706,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -709,7 +709,10 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public boolean shouldTickBlocksAt(long chunkPos) { @@ -1879,7 +1879,7 @@ index 52a86efcfc82621e1783bfb8dc42ae995f0755ad..4210d4b3c9d6f8bb3501b3592a6c1317 } protected void tickTime() { -@@ -2450,7 +2453,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2453,7 +2456,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/0858-Fix-World-locateNearestStructure.patch b/patches/server/0858-Fix-World-locateNearestStructure.patch index 1238f7619..faa9e0860 100644 --- a/patches/server/0858-Fix-World-locateNearestStructure.patch +++ b/patches/server/0858-Fix-World-locateNearestStructure.patch @@ -23,10 +23,10 @@ index 05e8e1cc33c0c4509ec157608e73989b423647ad..1bc400cf245ba3110e8874a4f2837a91 if (Thread.currentThread() != this.serverThread) return; // Paper //this.getPlayerList().saveAll(); // Paper - we don't need to do this diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 4210d4b3c9d6f8bb3501b3592a6c1317c45ff3cd..6b8f888741f1715bbcc0a8f4d080bf91d6c1a547 100644 +index bcfa1959c2ffd9ee31804c5a00a84133599cbbc4..cf3622930aab7ff62e293622ab1cd5ff97ee68f5 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1884,7 +1884,16 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1887,7 +1887,16 @@ public class ServerLevel extends Level implements WorldGenLevel { if (optional.isEmpty()) { return null; } else { diff --git a/patches/server/0863-Fix-save-problems-on-shutdown.patch b/patches/server/0863-Fix-save-problems-on-shutdown.patch index 1799fa3a7..c331284d5 100644 --- a/patches/server/0863-Fix-save-problems-on-shutdown.patch +++ b/patches/server/0863-Fix-save-problems-on-shutdown.patch @@ -55,10 +55,10 @@ index 1bc400cf245ba3110e8874a4f2837a91d0f70916..60de49a9888b6dfe17dcb0d9dd0dd3d2 if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken return this.forceTicks || this.runningTask() || Util.getMillis() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTime : this.nextTickTime); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6b8f888741f1715bbcc0a8f4d080bf91d6c1a547..230d2aed0bb4eb19259f33ba7536b3ee1809500e 100644 +index cf3622930aab7ff62e293622ab1cd5ff97ee68f5..de0fe1743dbddc6ff548dc4c658955266600180f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1275,7 +1275,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1278,7 +1278,13 @@ public class ServerLevel extends Level implements WorldGenLevel { } } diff --git a/patches/server/0895-Don-t-tick-markers.patch b/patches/server/0895-Don-t-tick-markers.patch index 42694a314..12934c4f8 100644 --- a/patches/server/0895-Don-t-tick-markers.patch +++ b/patches/server/0895-Don-t-tick-markers.patch @@ -9,7 +9,7 @@ list is only used in the tick and tickPassenger methods, so we can safely not ad markers to it. diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index e3aa9ca50e743590c1c0c994588597d47052b7c0..b1592bd75bb273622680a1d5c5fef7a7adf049f8 100644 +index a96b3f62a7a6aa5c87976dcda93f4b47bc2cd252..8ec20f17a3f8c39ae3ebf3fb630f98b35283ba88 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -626,7 +626,7 @@ public class PaperCommand extends Command { @@ -22,10 +22,10 @@ index e3aa9ca50e743590c1c0c994588597d47052b7c0..b1592bd75bb273622680a1d5c5fef7a7 } }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 230d2aed0bb4eb19259f33ba7536b3ee1809500e..8f0b4179eb7982f130be04c98c962c701c181238 100644 +index de0fe1743dbddc6ff548dc4c658955266600180f..09e7c07973f4ce868a418f9ac4ff7e838f6b99be 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2495,6 +2495,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2498,6 +2498,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void onTickingStart(Entity entity) { diff --git a/patches/server/0898-Fix-OfflinePlayer-getBedSpawnLocation.patch b/patches/server/0898-Fix-OfflinePlayer-getBedSpawnLocation.patch index 6832fde97..b11ce011a 100644 --- a/patches/server/0898-Fix-OfflinePlayer-getBedSpawnLocation.patch +++ b/patches/server/0898-Fix-OfflinePlayer-getBedSpawnLocation.patch @@ -8,10 +8,10 @@ instance of CraftOfflinePlayer the world was incorrect due to the logic for reading the NBT not being up-to-date. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index 1f2bc88d4570c6ef00e67a772b745e0b0c98e051..50927403d07954f3b930b39046866899a1b289e6 100644 +index d7823d7dc88cfba6f6ac9dae220e03dea4a0bcdd..6d2ba650f53de8a460857f1846401a20b50cc43c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -@@ -28,6 +28,7 @@ import org.bukkit.profile.PlayerProfile; +@@ -31,6 +31,7 @@ import org.bukkit.profile.PlayerProfile; @SerializableAs("Player") public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializable { @@ -19,7 +19,7 @@ index 1f2bc88d4570c6ef00e67a772b745e0b0c98e051..50927403d07954f3b930b39046866899 private final GameProfile profile; private final CraftServer server; private final PlayerDataStorage storage; -@@ -308,11 +309,20 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa +@@ -319,11 +320,20 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa if (data == null) return null; if (data.contains("SpawnX") && data.contains("SpawnY") && data.contains("SpawnZ")) { diff --git a/patches/server/0904-Add-Alternate-Current-redstone-implementation.patch b/patches/server/0904-Add-Alternate-Current-redstone-implementation.patch index e01bd41d9..957818a4a 100644 --- a/patches/server/0904-Add-Alternate-Current-redstone-implementation.patch +++ b/patches/server/0904-Add-Alternate-Current-redstone-implementation.patch @@ -1921,10 +1921,10 @@ index 0000000000000000000000000000000000000000..dde98a49b0f4db023386f8e4b98c9934 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8f0b4179eb7982f130be04c98c962c701c181238..3f1d0b2cad36b26389755ee098465b78acf228d3 100644 +index 09e7c07973f4ce868a418f9ac4ff7e838f6b99be..aaa7ad2a14389dc0dbc0d0fa3fb5ea16ec4172f6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -216,6 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -217,6 +217,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper public boolean hasEntityMoveEvent = false; // Paper @@ -1932,7 +1932,7 @@ index 8f0b4179eb7982f130be04c98c962c701c181238..3f1d0b2cad36b26389755ee098465b78 public static Throwable getAddToWorldStackTrace(Entity entity) { return new Throwable(entity + " Added to world at " + new java.util.Date()); } -@@ -2484,6 +2485,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2487,6 +2488,13 @@ public class ServerLevel extends Level implements WorldGenLevel { return this.entityManager.canPositionTick(pos.toLong()); // Paper } diff --git a/work/Bukkit b/work/Bukkit index 0a4b84d68..45d9c73c3 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 0a4b84d68e478de6751678238f1d18200ba51bf9 +Subproject commit 45d9c73c34736f64e2bbdf4227081be5d41dc093 diff --git a/work/CraftBukkit b/work/CraftBukkit index 576a03704..b2557f6ac 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 576a0370445b9c1344b337c02d955142d9004162 +Subproject commit b2557f6acd3a2b065643f1c58a411a20c1eef842 diff --git a/work/Spigot b/work/Spigot index fa893f0bb..1dffefb44 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit fa893f0bb7c6e1cbd28315f77da5c37a67afbe98 +Subproject commit 1dffefb44e3f2feaffe93434bb2e888817798d42