From 4668201606ced19348529b86b6ae70370eba0fe9 Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Sun, 21 Feb 2021 21:55:01 +0100 Subject: [PATCH] Upstream Update (#5211) --- Spigot-API-Patches/0005-Adventure.patch | 12 ++-- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +- .../0112-Expand-Explosions-API.patch | 4 +- ...CanPlaceOn-and-CanDestroy-NBT-values.patch | 6 +- .../0153-Material-API-additions.patch | 4 +- .../0157-Add-sun-related-API.patch | 4 +- .../0202-World-view-distance-api.patch | 4 +- .../0204-Spawn-Reason-API.patch | 6 +- ...-translation-keys-for-blocks-entitie.patch | 4 +- .../0002-Paper-config-files.patch | 20 +++--- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 4 +- Spigot-Server-Patches/0004-MC-Utils.patch | 57 ++++++++-------- ...to-current-Chunk-for-Entity-and-Bloc.patch | 10 +-- ...ts-for-each-Entity-Block-Entity-Type.patch | 6 +- Spigot-Server-Patches/0009-Timings-v2.patch | 67 ++++++++++--------- Spigot-Server-Patches/0010-Adventure.patch | 63 ++++++++--------- ...ient-crashes-server-lists-and-Mojang.patch | 4 +- ...ve-invalid-mob-spawner-tile-entities.patch | 4 +- ...024-Further-improve-server-tick-loop.patch | 10 +-- ...event-tile-entity-and-entity-crashes.patch | 10 +-- .../0030-Always-tick-falling-blocks.patch | 6 +- ...45-Ensure-commands-are-not-ran-async.patch | 6 +- .../0047-Expose-server-CommandMap.patch | 4 +- .../0053-Add-velocity-warnings.patch | 4 +- .../0055-Add-exception-reporting-event.patch | 8 +-- ...ading-permissions.yml-before-plugins.patch | 6 +- ...llow-Reloading-of-Custom-Permissions.patch | 4 +- .../0063-Remove-Metadata-on-reload.patch | 4 +- ...74-Configurable-Chunk-Inhabited-Time.patch | 4 +- ...Remove-unused-World-Tile-Entity-List.patch | 14 ++-- ...setting-for-proxy-online-mode-status.patch | 4 +- ...tion-to-remove-corrupt-tile-entities.patch | 4 +- .../0116-Add-EntityZapEvent.patch | 4 +- ...0-Allow-Reloading-of-Command-Aliases.patch | 4 +- ...1-Add-source-to-PlayerExpChangeEvent.patch | 6 +- .../0123-Add-ProjectileCollideEvent.patch | 4 +- .../0132-Firework-API-s.patch | 4 +- ...PI-for-Reason-Source-Triggering-play.patch | 8 +-- ...le-async-calls-to-restart-the-server.patch | 4 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- ...oleAppender-for-console-improvements.patch | 4 +- .../0151-Add-UnknownCommandEvent.patch | 8 +-- .../0152-Basic-PlayerProfile-API.patch | 6 +- .../0153-Shoulder-Entities-Release-API.patch | 4 +- ...-maximum-exp-value-when-merging-orbs.patch | 4 +- ...-get-a-BlockState-without-a-snapshot.patch | 4 +- .../0180-AsyncTabCompleteEvent.patch | 4 +- .../0183-ExperienceOrbMergeEvent.patch | 4 +- ...7-PlayerNaturallySpawnCreaturesEvent.patch | 4 +- .../0202-getPlayerUniqueId-API.patch | 4 +- ...d-method-to-open-already-placed-sign.patch | 4 +- ...ld.spawnParticle-API-and-add-Builder.patch | 8 +-- ...Item-entities-with-World.spawnEntity.patch | 4 +- .../0229-Expand-Explosions-API.patch | 4 +- ...3-Implement-World.getEntity-UUID-API.patch | 4 +- .../0234-InventoryCloseEvent-Reason-API.patch | 14 ++-- ...t-armor-stands-from-doing-entity-loo.patch | 4 +- ...8-Vanished-players-don-t-have-rights.patch | 8 +-- ...-anytime-entities-change-to-guarante.patch | 6 +- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 10 +-- ...ead-Entities-in-entityList-iteration.patch | 22 +++--- .../0259-Add-hand-to-bucket-events.patch | 14 ++-- ...dd-Early-Warning-Feature-to-WatchDog.patch | 6 +- .../0280-Improve-death-events.patch | 10 +-- .../0295-Add-sun-related-API.patch | 6 +- ...9-Add-Velocity-IP-Forwarding-Support.patch | 4 +- ...ault-permission-message-configurable.patch | 4 +- .../0317-Add-more-Zombie-API.patch | 8 +-- ...-Optimize-Captured-TileEntity-Lookup.patch | 4 +- ...isPrimaryThread-and-MinecraftServer-.patch | 4 +- .../0351-Duplicate-UUID-Resolve-Option.patch | 8 +-- ...le-Keep-Spawn-Loaded-range-per-world.patch | 8 +-- .../0355-ChunkMapDistance-CME.patch | 6 +- ...359-Fix-World-isChunkGenerated-calls.patch | 10 +-- .../0362-incremental-chunk-saving.patch | 14 ++-- ...-being-ticked-when-notifying-navigat.patch | 4 +- ...opper-searches-if-there-are-no-items.patch | 10 +-- ...69-Asynchronous-chunk-IO-and-loading.patch | 26 +++---- ...etChunkIfLoadedImmediately-in-places.patch | 12 ++-- .../0371-Reduce-sync-loads.patch | 14 ++-- ...ement-optional-per-player-mob-spawns.patch | 4 +- ...hanging-entities-that-are-not-ItemFr.patch | 4 +- ...382-Expose-the-internal-current-tick.patch | 4 +- .../0390-Optimize-Hoppers.patch | 4 +- .../0401-Tracking-Range-Improvements.patch | 4 +- .../0402-Entity-Activation-Range-2.0.patch | 39 +++++------ ...e-getChunkAt-calls-for-loaded-chunks.patch | 6 +- .../0408-Optimise-random-block-ticking.patch | 10 +-- ...412-add-hand-to-BlockMultiPlaceEvent.patch | 4 +- ...-chance-of-villager-zombie-infection.patch | 4 +- ...imise-TickListServer-by-rewriting-it.patch | 8 +-- ...ering-entities-from-unloading-chunks.patch | 4 +- ...hunkMap-memory-use-for-visibleChunks.patch | 6 +- ...asks-Speed-up-processing-of-chunk-lo.patch | 14 ++-- ...-Add-tick-times-API-and-mspt-command.patch | 6 +- ...433-Expose-MinecraftServer-isRunning.patch | 4 +- .../0438-Improved-Watchdog-Support.patch | 10 +-- ...vent-opening-inventories-when-frozen.patch | 6 +- ...oviderServer-s-chunk-level-checking-.patch | 4 +- ...-Chunk-Post-Processing-deadlock-risk.patch | 4 +- ...layer-is-attempted-to-be-removed-fro.patch | 6 +- ...Load-Chunks-for-Login-Asynchronously.patch | 6 +- ...m-duplication-issues-and-teleport-is.patch | 6 +- .../0463-Expose-game-version.patch | 4 +- .../0466-Implement-Mob-Goal-API.patch | 4 +- ...-isOutsideRange-to-use-distance-maps.patch | 16 ++--- ...No-Tick-view-distance-implementation.patch | 28 ++++---- .../0472-Fix-Light-Command.patch | 4 +- .../0475-Potential-bed-API.patch | 4 +- ...Wait-for-Async-Tasks-during-shutdown.patch | 4 +- ...k-Priority-Urgency-System-for-Chunks.patch | 46 ++++++------- .../0493-Optimize-Light-Engine.patch | 10 +-- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 10 +-- .../0524-Add-PrepareResultEvent.patch | 4 +- ...llow-delegation-to-vanilla-chunk-gen.patch | 8 +-- ...keLighting-call-to-World-spigot-stri.patch | 4 +- ...ull-chunk-sections-for-block-updates.patch | 4 +- .../0551-Add-setMaxPlayers-API.patch | 4 +- ...geEvent-not-firing-for-all-use-cases.patch | 6 +- .../0561-Optimize-redstone-algorithm.patch | 4 +- ...al-open-container-api-to-HumanEntity.patch | 4 +- ...rty-in-invalid-locations-SPIGOT-6086.patch | 4 +- ...-Add-getOfflinePlayerIfCached-String.patch | 4 +- .../0599-Seed-based-feature-search.patch | 4 +- ...-OBSTRUCTED-reason-to-BedEnterResult.patch | 4 +- .../0628-Optimized-tick-ready-check.patch | 6 +- .../0637-Added-WorldGameRuleChangeEvent.patch | 6 +- ...ld-settings-for-mobs-picking-up-loot.patch | 4 +- ...Implemented-BlockFailedDispenseEvent.patch | 50 +------------- .../0647-Remove-stale-POIs.patch | 6 +- .../0658-Added-Vanilla-Entity-Tags.patch | 4 +- ...ce-map-update-when-spawning-disabled.patch | 4 +- ...disable-pathfinding-updates-on-block.patch | 4 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 136 files changed, 554 insertions(+), 602 deletions(-) diff --git a/Spigot-API-Patches/0005-Adventure.patch b/Spigot-API-Patches/0005-Adventure.patch index 27990ef5b5..6b8bbc732c 100644 --- a/Spigot-API-Patches/0005-Adventure.patch +++ b/Spigot-API-Patches/0005-Adventure.patch @@ -305,10 +305,10 @@ index fee814e01a653d2b53c56e8b566383ca44aa5346..2acdf2a6d3955923c721222b9da784f3 * Gets the custom name on a mob or block. If there is no name this method * will return null. diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java -index 22eca2a180618ed43a4ef103bebd134897d6c71a..abb7448ee8fe1152623794d3b806eef9a9e17abc 100644 +index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..c65f0d6569c130b4920a9e71ad24af6427f1f030 100644 --- a/src/main/java/org/bukkit/NamespacedKey.java +++ b/src/main/java/org/bukkit/NamespacedKey.java -@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull; +@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable; * underscores, hyphens, and forward slashes. * */ @@ -317,9 +317,9 @@ index 22eca2a180618ed43a4ef103bebd134897d6c71a..abb7448ee8fe1152623794d3b806eef9 /** * The namespace representing all inbuilt keys. -@@ -139,4 +139,24 @@ public final class NamespacedKey { - public static NamespacedKey minecraft(@NotNull String key) { - return new NamespacedKey(MINECRAFT, key); +@@ -212,4 +212,24 @@ public final class NamespacedKey { + public static NamespacedKey fromString(@NotNull String key) { + return fromString(key, null); } + + // Paper start @@ -552,7 +552,7 @@ index a6b9e4f158583e5932bf8ca210d531857e9f5360..d9515a79dc7ed60c66960cd6c6bb4c10 throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index cdcbc8b05afc412017ac0e4ed0adf227d1342336..6b5dbe4ea711807a1944cfe2aae2ce415d4f2638 100644 +index b8a33ac504da73ec990550bdd23e4548f6ccba95..27faaf8d1101f8522b728e3d73833e4dddbf1715 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -38,7 +38,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch index ae0859d537..b508786e97 100644 --- a/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -515,10 +515,10 @@ index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c5217 * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 96e985eb98ab620e315aec13222b8f0334e5fe0a..1473b1ef341f13fbd634b81a058bf3148de7b2c6 100644 +index ed7d484416f127467c2898411564937f256d8861..7a96670447fde144e2263d107771e01cd642aaf4 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2550,7 +2550,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad +@@ -2559,7 +2559,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ diff --git a/Spigot-API-Patches/0112-Expand-Explosions-API.patch b/Spigot-API-Patches/0112-Expand-Explosions-API.patch index bacc01b5da..5e738ad2b4 100644 --- a/Spigot-API-Patches/0112-Expand-Explosions-API.patch +++ b/Spigot-API-Patches/0112-Expand-Explosions-API.patch @@ -106,10 +106,10 @@ index 4cf22afc3c1f1cc19b6e5350043431215908a612..af2ee43f2c5133668c18710f526a107d * Returns a list of entities within a bounding box centered around a Location. * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 1473b1ef341f13fbd634b81a058bf3148de7b2c6..432367560c572e3fa77c4c36cde5bf7d7e157846 100644 +index 7a96670447fde144e2263d107771e01cd642aaf4..608e57d92d93aef163bcb91c7fb63339b1672945 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1409,6 +1409,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad +@@ -1418,6 +1418,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad */ public boolean createExplosion(@NotNull Location loc, float power, boolean setFire); diff --git a/Spigot-API-Patches/0148-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/Spigot-API-Patches/0148-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch index 4395c41fa1..c5b4ce2e41 100644 --- a/Spigot-API-Patches/0148-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch +++ b/Spigot-API-Patches/0148-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch @@ -199,10 +199,10 @@ index 0000000000000000000000000000000000000000..28f3fda950999a9c964a3608042ca605 + } +} diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java -index abb7448ee8fe1152623794d3b806eef9a9e17abc..f49569d50510807570b51d894369fcffe180cc56 100644 +index c65f0d6569c130b4920a9e71ad24af6427f1f030..01bcb3a1bdb5accdf844d0178cec3d25746b3eaa 100644 --- a/src/main/java/org/bukkit/NamespacedKey.java +++ b/src/main/java/org/bukkit/NamespacedKey.java -@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull; +@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable; * underscores, hyphens, and forward slashes. * */ @@ -211,7 +211,7 @@ index abb7448ee8fe1152623794d3b806eef9a9e17abc..f49569d50510807570b51d894369fcff /** * The namespace representing all inbuilt keys. -@@ -83,11 +83,13 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap +@@ -84,11 +84,13 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap } @NotNull diff --git a/Spigot-API-Patches/0153-Material-API-additions.patch b/Spigot-API-Patches/0153-Material-API-additions.patch index eaa11edcc9..077025f677 100644 --- a/Spigot-API-Patches/0153-Material-API-additions.patch +++ b/Spigot-API-Patches/0153-Material-API-additions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Material API additions diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index f66cd342c2ec3e5d4f4ae5e68dda797c793c76a7..e203c5bfc1d1bf6b500ef8a4446d3aef182b8ecb 100644 +index 27adc7afae3d32c36762b9355cb5210e187df795..2e959d195f7a5e723952e421aeaeeb463f07d3f5 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -86,6 +86,7 @@ import org.jetbrains.annotations.Nullable; @@ -16,7 +16,7 @@ index f66cd342c2ec3e5d4f4ae5e68dda797c793c76a7..e203c5bfc1d1bf6b500ef8a4446d3aef public enum Material implements Keyed { // AIR(9648, 0), -@@ -3565,6 +3566,22 @@ public enum Material implements Keyed { +@@ -3562,6 +3563,22 @@ public enum Material implements Keyed { } } diff --git a/Spigot-API-Patches/0157-Add-sun-related-API.patch b/Spigot-API-Patches/0157-Add-sun-related-API.patch index 4872e743ff..590bc0544d 100644 --- a/Spigot-API-Patches/0157-Add-sun-related-API.patch +++ b/Spigot-API-Patches/0157-Add-sun-related-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index cf831f96efa302f789cf26a384a091df51215a76..19060c7d9c74b9b2808103f3d5627444aece6ccb 100644 +index ce2d4629ff39847cb21a34cc1a0868c9a4d3cdb9..cac7a083b439414ae269edc9df4dc242dfaf5b59 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1788,6 +1788,16 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @@ -23,7 +23,7 @@ index cf831f96efa302f789cf26a384a091df51215a76..19060c7d9c74b9b2808103f3d5627444 + // Paper end + /** - * Returns whether the world has an ongoing storm. + * Gets the full in-game time on this world since the world generation * diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java index b132287817d35579ca5128a1ed5c242bf229771a..d726453c041a980576312b6bee96a07837f37974 100644 diff --git a/Spigot-API-Patches/0202-World-view-distance-api.patch b/Spigot-API-Patches/0202-World-view-distance-api.patch index f036a64c8b..0b1e587d40 100644 --- a/Spigot-API-Patches/0202-World-view-distance-api.patch +++ b/Spigot-API-Patches/0202-World-view-distance-api.patch @@ -5,10 +5,10 @@ Subject: [PATCH] World view distance api diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index f8e104d5e61e52c5fe658d7cda373f62424c7bea..aefcd3c1b6e825ccba1b19444778a7529b1b1f53 100644 +index 5c004fddaaeb41f966ace1e169103ecfb082a197..eb2b5ae9b66f8ce8adc548f0913c54729a822018 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -3405,6 +3405,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad +@@ -3414,6 +3414,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad int getViewDistance(); // Spigot end diff --git a/Spigot-API-Patches/0204-Spawn-Reason-API.patch b/Spigot-API-Patches/0204-Spawn-Reason-API.patch index f5278ce5fc..5a78ef0f57 100644 --- a/Spigot-API-Patches/0204-Spawn-Reason-API.patch +++ b/Spigot-API-Patches/0204-Spawn-Reason-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Spawn Reason API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index aefcd3c1b6e825ccba1b19444778a7529b1b1f53..b1b12cd1c53ca4666d0f2e77853f3a11441d24e5 100644 +index eb2b5ae9b66f8ce8adc548f0913c54729a822018..6441d4e45e5d5f008f95233cdc34048b8be38592 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,8 @@ @@ -17,7 +17,7 @@ index aefcd3c1b6e825ccba1b19444778a7529b1b1f53..b1b12cd1c53ca4666d0f2e77853f3a11 import org.bukkit.generator.ChunkGenerator; import java.util.ArrayList; -@@ -2216,6 +2218,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad +@@ -2225,6 +2227,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @NotNull public T spawn(@NotNull Location location, @NotNull Class clazz) throws IllegalArgumentException; @@ -30,7 +30,7 @@ index aefcd3c1b6e825ccba1b19444778a7529b1b1f53..b1b12cd1c53ca4666d0f2e77853f3a11 /** * Spawn an entity of a specific class at the given {@link Location}, with * the supplied function run before the entity is added to the world. -@@ -2233,7 +2241,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad +@@ -2242,7 +2250,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad * {@link Entity} requested cannot be spawned */ @NotNull diff --git a/Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch index 6adb9e7578..2d8ba0fdc0 100644 --- a/Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch +++ b/Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add a way to get translation keys for blocks, entities and diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index e203c5bfc1d1bf6b500ef8a4446d3aef182b8ecb..4ba991b79f13219182df35b4ce0c5cf57cbd208b 100644 +index 2e959d195f7a5e723952e421aeaeeb463f07d3f5..2a3becabbd10fa8ffd19f35a3f6d8a6bfcb388c3 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -3580,6 +3580,16 @@ public enum Material implements Keyed { +@@ -3577,6 +3577,16 @@ public enum Material implements Keyed { } return false; } diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 6be171e6dd..08f287498c 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -533,10 +533,10 @@ index 0000000000000000000000000000000000000000..b31109d2dadd29e8852468c19265066b + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 49cfd12dd8f68468d7a122f5420687c874cf3317..84407dfd46138359d42ddf8fd5c462a5f494d46b 100644 +index d1051f05933be093fa598504e169e5cfdaa1b0e3..056e1fced00dff1d6507a90c13f2448a04ca0558 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -273,15 +273,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -281,15 +281,15 @@ public class ChunkProviderServer extends IChunkProvider { } } @@ -638,7 +638,7 @@ index 6d1012cc652780189a5d849125abe09b27b88422..d8c8bf2466be362b424fde611fe42b73 Main.LOGGER.info("Forcing world upgrade! {}", convertable_conversionsession.getLevelName()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(convertable_conversionsession, datafixer, immutableset, flag); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 169822482d3e31ef4f625a82102adc6d478588a8..2ffa56f3580b524c3593505585410dc347e1780c 100644 +index 4c5683bcb45ea500adb0775fc81f296bb2583f80..1606a7b4727fffef27d6bb08633b652b7e7fe588 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -77,6 +77,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -659,10 +659,10 @@ index 169822482d3e31ef4f625a82102adc6d478588a8..2ffa56f3580b524c3593505585410dc3 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e11983dc8f8d 100644 +index ab11efee28224852f4984ce7235494d83ba7fe7f..a19242d717f7f9c254e6127fb2cb2f202be2d78a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -809,6 +809,7 @@ public final class CraftServer implements Server { +@@ -808,6 +808,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -670,7 +670,7 @@ index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e119 for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -842,6 +843,7 @@ public final class CraftServer implements Server { +@@ -841,6 +842,7 @@ public final class CraftServer implements Server { world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns(); } world.spigotConfig.init(); // Spigot @@ -678,7 +678,7 @@ index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e119 } pluginManager.clearPlugins(); -@@ -849,6 +851,7 @@ public final class CraftServer implements Server { +@@ -848,6 +850,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -686,10 +686,10 @@ index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e119 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2096,4 +2099,35 @@ public final class CraftServer implements Server { - { +@@ -2097,4 +2100,35 @@ public final class CraftServer implements Server { return spigot; } + // Spigot end + + // Paper start + @SuppressWarnings({"rawtypes", "unchecked"}) @@ -742,7 +742,7 @@ index 3f52c19b6b797e26b3dcedcec2afd28c478e7091..3a6578170765a472d36b169b999e9dc5 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 0005d4226467cc25b55f9863eb5b7aaeb4dd6917..5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a 100644 +index 83d83ff7ceffbb77723da721b869dfd0091e496d..0efcbab8f8806aeb8dd8bd6384e5a7cee375d100 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -39,36 +39,36 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 0cf9cb1354..f1c55c8574 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -848,10 +848,10 @@ index 83d799bec90693e0fbbf8a7f3bc4f569b5c0ead9..141a8e31151010e5a0bd8d4661033f10 t0.a(nbttagcompound.getCompound("data")); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b6a2f11c34cba54f28ea8997d991b30febf63082..170332ce35db120b53f99a45869882236c361960 100644 +index 4955ec276c389158727fb98710dd700145c31be8..f1c206b6b506aff09c484730dd2d5ce796c3c2ab 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1798,7 +1798,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1809,7 +1809,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // CraftBukkit - decompile error diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 14aa39810c..d5c56ca2df 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2411,7 +2411,7 @@ index 1b2f415e3ed7f6dca12d13cd098cb4ec3af54020..64e8088d394ddcda59d0209883b778ab @Override public BlockPosition immutableCopy() { diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528edd26563 100644 +index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d1550eab1624 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -26,7 +26,7 @@ public class Chunk implements IChunkAccess { @@ -2572,7 +2572,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528 @Override public Fluid getFluid(BlockPosition blockposition) { return this.a(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -356,6 +473,7 @@ public class Chunk implements IChunkAccess { +@@ -357,6 +474,7 @@ public class Chunk implements IChunkAccess { entity.chunkX = this.loc.x; entity.chunkY = k; entity.chunkZ = this.loc.z; @@ -2580,7 +2580,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528 this.entitySlices[k].add(entity); } -@@ -378,6 +496,7 @@ public class Chunk implements IChunkAccess { +@@ -380,6 +498,7 @@ public class Chunk implements IChunkAccess { } this.entitySlices[i].remove(entity); @@ -2588,7 +2588,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528 } @Override -@@ -399,6 +518,7 @@ public class Chunk implements IChunkAccess { +@@ -401,6 +520,7 @@ public class Chunk implements IChunkAccess { return this.a(blockposition, Chunk.EnumTileEntityState.CHECK); } @@ -2596,7 +2596,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528 @Nullable public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start -@@ -510,7 +630,25 @@ public class Chunk implements IChunkAccess { +@@ -512,7 +632,25 @@ public class Chunk implements IChunkAccess { // CraftBukkit start public void loadCallback() { @@ -2622,7 +2622,7 @@ index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -549,6 +687,22 @@ public class Chunk implements IChunkAccess { +@@ -551,6 +689,22 @@ public class Chunk implements IChunkAccess { server.getPluginManager().callEvent(unloadEvent); // note: saving can be prevented, but not forced if no saving is actually required this.mustNotSave = !unloadEvent.isSaveChunk(); @@ -2746,7 +2746,7 @@ index ae61d0a7676bf06c8c9aa5c68ccb8dd4baf326b6..b12e43ed13a1a9d7d418831b8988c30a } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 84407dfd46138359d42ddf8fd5c462a5f494d46b..20f62f6f7704f47f86179d03b4e55a61e0149627 100644 +index 056e1fced00dff1d6507a90c13f2448a04ca0558..08f11f98c40221fa4ce9a4f14ee8398f8588f38a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -17,6 +17,10 @@ import java.util.function.Consumer; @@ -2928,7 +2928,7 @@ index 84407dfd46138359d42ddf8fd5c462a5f494d46b..20f62f6f7704f47f86179d03b4e55a61 public ChunkProviderServer(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator chunkgenerator, int i, boolean flag, WorldLoadListener worldloadlistener, Supplier supplier) { this.world = worldserver; -@@ -90,6 +246,49 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -98,6 +254,49 @@ public class ChunkProviderServer extends IChunkProvider { this.cacheChunk[0] = ichunkaccess; } @@ -2978,7 +2978,7 @@ index 84407dfd46138359d42ddf8fd5c462a5f494d46b..20f62f6f7704f47f86179d03b4e55a61 @Nullable @Override public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) { -@@ -372,10 +571,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -380,10 +579,9 @@ public class ChunkProviderServer extends IChunkProvider { this.p = spawnercreature_d; this.world.getMethodProfiler().exit(); @@ -3934,7 +3934,7 @@ index 8bdda63a2807635e8780481244251f6e35c13627..36a7e41cc5036345929ebf4d2fa160a8 int j = 0; ChunkSection[] achunksection = chunk.getSections(); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a15804502bd3579 100644 +index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b2c751b30 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -21,9 +21,9 @@ public class PlayerChunk { @@ -3959,7 +3959,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; -@@ -54,16 +56,63 @@ public class PlayerChunk { +@@ -54,10 +56,49 @@ public class PlayerChunk { this.ticketLevel = this.oldTicketLevel; this.n = this.oldTicketLevel; this.a(i); @@ -3993,24 +3993,25 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 + + public final boolean isEntityTickingReady() { + return this.isEntityTickingReady; - } - ++ } ++ + public final boolean isTickingReady() { + return this.isTickingReady; + } + + public final boolean isFullChunkReady() { + return this.isFullChunkReady; -+ } + } + // Paper end -+ + // CraftBukkit start - public Chunk getFullChunk() { + public final Chunk getFullChunk() { // Paper - final for inline if (!getChunkState(this.oldTicketLevel).isAtLeast(PlayerChunk.State.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks - CompletableFuture> statusFuture = this.getStatusFutureUnchecked(ChunkStatus.FULL); - Either either = (Either) statusFuture.getNow(null); - return either == null ? null : (Chunk) either.left().orElse(null); + return this.getFullChunkUnchecked(); + } +@@ -68,6 +109,14 @@ public class PlayerChunk { + return (either == null) ? null : (Chunk) either.left().orElse(null); } // CraftBukkit end + // Paper start - "real" get full chunk immediately @@ -4024,7 +4025,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { CompletableFuture> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c()); -@@ -75,20 +124,23 @@ public class PlayerChunk { +@@ -79,20 +128,23 @@ public class PlayerChunk { return getChunkStatus(this.ticketLevel).b(chunkstatus) ? this.getStatusFutureUnchecked(chunkstatus) : PlayerChunk.UNLOADED_CHUNK_ACCESS_FUTURE; } @@ -4052,7 +4053,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 CompletableFuture> completablefuture = this.a(); Either either = (Either) completablefuture.getNow(null); // CraftBukkit - decompile error -@@ -113,7 +165,7 @@ public class PlayerChunk { +@@ -117,7 +169,7 @@ public class PlayerChunk { return null; } @@ -4061,7 +4062,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 return this.chunkSave; } -@@ -254,11 +306,11 @@ public class PlayerChunk { +@@ -258,11 +310,11 @@ public class PlayerChunk { }); } @@ -4075,7 +4076,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 return this.ticketLevel; } -@@ -329,13 +381,27 @@ public class PlayerChunk { +@@ -333,13 +385,27 @@ public class PlayerChunk { this.hasBeenLoaded |= flag3; if (!flag2 && flag3) { @@ -4104,7 +4105,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 this.a(((CompletableFuture>) completablefuture).thenApply((either1) -> { // CraftBukkit - decompile error playerchunkmap.getClass(); return either1.ifLeft(playerchunkmap::a); -@@ -346,12 +412,24 @@ public class PlayerChunk { +@@ -350,12 +416,24 @@ public class PlayerChunk { boolean flag5 = playerchunk_state1.isAtLeast(PlayerChunk.State.TICKING); if (!flag4 && flag5) { @@ -4131,7 +4132,7 @@ index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a158045 this.tickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; } -@@ -363,12 +441,24 @@ public class PlayerChunk { +@@ -367,12 +445,24 @@ public class PlayerChunk { throw (IllegalStateException) SystemUtils.c((Throwable) (new IllegalStateException())); } @@ -4392,7 +4393,7 @@ index ff41038ce6d2c1a8093bce3539070fa0ccfd61c2..ed0f9c5d29c4f88b7beee4b0ecdd7a56 return VoxelShapes.b; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2ffa56f3580b524c3593505585410dc347e1780c..9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c 100644 +index 1606a7b4727fffef27d6bb08633b652b7e7fe588..6df28adb17d78a7f5189787a979a44fad677f05c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -22,6 +22,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot @@ -4501,7 +4502,7 @@ index 5719ef9714e9680596a08c42c33508c16c0e676a..bb0f30f182856d2701fde9b1a65eeb98 return this.j.m(); } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 170332ce35db120b53f99a45869882236c361960..c96ad91b15920293e228f5eb7d0843beda92faec 100644 +index f1c206b6b506aff09c484730dd2d5ce796c3c2ab..592af06de1fc02d94273363c2ede1175a39997f0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -12,6 +12,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry; @@ -4521,7 +4522,7 @@ index 170332ce35db120b53f99a45869882236c361960..c96ad91b15920293e228f5eb7d0843be boolean tickingEntities; private final MinecraftServer server; public final WorldDataServer worldDataServer; // CraftBukkit - type -@@ -1567,7 +1568,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1578,7 +1579,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { ObjectIterator objectiterator = spawnercreature_d.b().object2IntEntrySet().iterator(); while (objectiterator.hasNext()) { @@ -4593,7 +4594,7 @@ index 9ad17c560c8d99a396543ab9f97c34de648f6544..4bf48f77f3f7cd62a91590543f5af441 currentTask = null; } diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index 3f55381c152b9841b524f623c9b32360e97cb8ed..d85e21b75054067b926ecfee89d62c6dd0744189 100644 +index a8ce875f801edc424b5277abf7471e73ce91e3e6..f5f70c1fe31e5c533991e2c857fe8c10a83b94fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -39,6 +39,21 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot diff --git a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index 65dc2ebb96..a6b0ae7982 100644 --- a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121c42fb34a 100644 +index c8ff99ef5c7574292ee66a4aec45d1550eab1624..7c5f79124d2f2c69548263e79752484e07e77d48 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -56,11 +56,36 @@ public class Chunk implements IChunkAccess { @@ -49,7 +49,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121 this.l = Maps.newHashMap(); this.m = Maps.newHashMap(); this.n = new ShortList[16]; -@@ -470,6 +495,7 @@ public class Chunk implements IChunkAccess { +@@ -471,6 +496,7 @@ public class Chunk implements IChunkAccess { } entity.inChunk = true; @@ -57,7 +57,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121 entity.chunkX = this.loc.x; entity.chunkY = k; entity.chunkZ = this.loc.z; -@@ -482,6 +508,7 @@ public class Chunk implements IChunkAccess { +@@ -483,6 +509,7 @@ public class Chunk implements IChunkAccess { ((HeightMap) this.heightMap.get(heightmap_type)).a(along); } @@ -65,7 +65,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121 public void b(Entity entity) { this.a(entity, entity.chunkY); } -@@ -495,7 +522,12 @@ public class Chunk implements IChunkAccess { +@@ -497,7 +524,12 @@ public class Chunk implements IChunkAccess { i = this.entitySlices.length - 1; } @@ -80,7 +80,7 @@ index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121 } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 889e65729554b9584b631b0910a4f0c67246a2d6..9f32f6c3c34464e82a953a50141343b0083dea71 100644 +index b8267cf23f795fd7e586b0e567037eae5048d08e..b35ffae9f88cc14aec01482c2a3ed2e2428c2012 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -176,7 +176,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch index 1b3233c080..a4a2a5f478 100644 --- a/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch +++ b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type Opens door for future patches to optimize performance diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 402f6ed90132f48d560a21f56cd50121c42fb34a..9f1db6491dafa8e32395db381466a3447395da7e 100644 +index 7c5f79124d2f2c69548263e79752484e07e77d48..853e11836b6c4eadd03feead101bf578b17b86a3 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -57,15 +57,19 @@ public class Chunk implements IChunkAccess { @@ -37,7 +37,7 @@ index 402f6ed90132f48d560a21f56cd50121c42fb34a..9f1db6491dafa8e32395db381466a344 } return removed; } -@@ -494,6 +499,7 @@ public class Chunk implements IChunkAccess { +@@ -495,6 +500,7 @@ public class Chunk implements IChunkAccess { k = this.entitySlices.length - 1; } @@ -45,7 +45,7 @@ index 402f6ed90132f48d560a21f56cd50121c42fb34a..9f1db6491dafa8e32395db381466a344 entity.inChunk = true; entity.setCurrentChunk(this); // Paper entity.chunkX = this.loc.x; -@@ -527,6 +533,7 @@ public class Chunk implements IChunkAccess { +@@ -529,6 +535,7 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 4b9310280e..94a893d1cc 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -738,10 +738,10 @@ index 871b79cb2c63525c430c257f00b2cf70157aa476..d847326b0099a0c05a085d5d62de6304 private String name; @Nullable diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56d4bbee58 100644 +index 853e11836b6c4eadd03feead101bf578b17b86a3..0aea16df16b55b1d4756b51d10c8c22d37aef9a3 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -697,6 +697,7 @@ public class Chunk implements IChunkAccess { +@@ -699,6 +699,7 @@ public class Chunk implements IChunkAccess { server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration)); if (this.needsDecoration) { @@ -749,7 +749,7 @@ index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56 this.needsDecoration = false; java.util.Random random = new java.util.Random(); random.setSeed(world.getSeed()); -@@ -716,6 +717,7 @@ public class Chunk implements IChunkAccess { +@@ -718,6 +719,7 @@ public class Chunk implements IChunkAccess { } } server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); @@ -758,10 +758,10 @@ index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f8fa4fcf8 100644 +index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7ec25e485 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -314,11 +314,13 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -322,11 +322,13 @@ public class ChunkProviderServer extends IChunkProvider { } gameprofilerfiller.c("getChunkCacheMiss"); @@ -777,7 +777,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { return ichunkaccess1; }, (playerchunk_failure) -> { -@@ -505,7 +507,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -513,7 +515,9 @@ public class ChunkProviderServer extends IChunkProvider { public void save(boolean flag) { this.tickDistanceManager(); @@ -787,7 +787,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f } @Override -@@ -542,7 +546,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -550,7 +554,9 @@ public class ChunkProviderServer extends IChunkProvider { this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.getMethodProfiler().exitEnter("chunks"); @@ -797,7 +797,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.getMethodProfiler().exitEnter("unload"); this.playerChunkMap.unloadChunks(booleansupplier); -@@ -566,8 +572,10 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -574,8 +580,10 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit this.world.getMethodProfiler().enter("naturalSpawnCount"); @@ -808,7 +808,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f this.p = spawnercreature_d; this.world.getMethodProfiler().exit(); -@@ -578,7 +586,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -586,7 +594,9 @@ public class ChunkProviderServer extends IChunkProvider { if (optional.isPresent()) { this.world.getMethodProfiler().enter("broadcast"); @@ -818,7 +818,7 @@ index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f this.world.getMethodProfiler().exit(); Optional optional1 = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -592,25 +602,25 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -600,25 +610,25 @@ public class ChunkProviderServer extends IChunkProvider { SpawnerCreature.a(this.world, chunk, spawnercreature_d, this.allowAnimals, this.allowMonsters, flag2); } @@ -1007,7 +1007,7 @@ index d91b029c95b6380300db81e7c0fb172ff57958a1..218071260dec39dd4f7eb733ae6f832a } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9f32f6c3c34464e82a953a50141343b0083dea71..ace7d5a36c0a44763d554d5d83cee7817f77fcc1 100644 +index b35ffae9f88cc14aec01482c2a3ed2e2428c2012..03933c24ed4d97e16bcebf6b89b1a8d1fc43cd0b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -31,7 +31,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent; @@ -1517,7 +1517,7 @@ index b37b791cd66b2e88dd0ecf52beea1844c97cdb94..d34e91887cd73009bf852fb849e495a8 // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf434921e991 100644 +index 8c534c2f06fe72287364536b8767bd774b94c027..9c810b5aa21ca714ccf355d5648b7612f99b6884 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1636,7 +1636,7 @@ index b9ffd000c97111678d45fd55dc9c207ebadc140e..f1d0e2faffb3ef27f5a41d06d0ff7d78 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public CraftPersistentDataContainer persistentDataContainer; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2a3a01b53 100644 +index 6df28adb17d78a7f5189787a979a44fad677f05c..09577ddcb3c2432a0af6047b287a387de5d2920a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger; @@ -1665,7 +1665,7 @@ index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2 this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -@@ -746,15 +745,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -745,15 +744,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } timings.tileEntityPending.stopTiming(); // Spigot @@ -1683,7 +1683,7 @@ index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2 CrashReport crashreport = CrashReport.a(throwable, "Ticking entity"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked"); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c96ad91b15920293e228f5eb7d0843beda92faec..21e4088cfdb7218e78fb771fe4c9bd2027594663 100644 +index 592af06de1fc02d94273363c2ede1175a39997f0..3d915105b277a7cbf330ba2cb3c2f1451ee868e4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1810,7 +1810,7 @@ index c96ad91b15920293e228f5eb7d0843beda92faec..21e4088cfdb7218e78fb771fe4c9bd20 // CraftBukkit start - moved from MinecraftServer.saveChunks diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bf21a80f781e600a08f82d1a16f0e11983dc8f8d..73bd46c980cb13d6cbe4aba41adb122eaab769be 100644 +index a19242d717f7f9c254e6127fb2cb2f202be2d78a..351440f534653c9d315ccaf1e923e03ca6ba01f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2069,12 +2069,31 @@ public final class CraftServer implements Server { @@ -1846,10 +1846,9 @@ index bf21a80f781e600a08f82d1a16f0e11983dc8f8d..73bd46c980cb13d6cbe4aba41adb122e public void restart() { org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java -deleted file mode 100644 -index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..0000000000000000000000000000000000000000 +index 66523c21c49b8a019a82fdeb84a187c3b627ab73..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java -+++ /dev/null ++++ b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java @@ -1,163 +0,0 @@ -package org.bukkit.craftbukkit; - @@ -1921,7 +1920,7 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000 - - String name = "Task: " + plugin + " Runnable: " + taskname; - if (period > 0) { -- name += "(interval:" + period +")"; +- name += "(interval:" + period + ")"; - } else { - name += "(Single)"; - } @@ -2015,10 +2014,10 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3551ab3a570042585621c943d74d8d3c0bd299b4..4001145980f4dabbd291336d5a464c3856144996 100644 +index 6ebcf2afe78a0e0ab3ed4570b6aa416973c48fdf..8428ef53e0408c4a7f74cc03e7e238be9c2f1888 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1821,6 +1821,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1820,6 +1820,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } @@ -2110,23 +2109,25 @@ index 4bf48f77f3f7cd62a91590543f5af441c8268029..ffe9cc1011226d604dc5499e7692e9a9 private boolean isReady(final int currentTick) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index d85e21b75054067b926ecfee89d62c6dd0744189..9d0d1598bfce2f51998395faf39d8bd2f5d3f9f3 100644 +index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad49c62088 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -@@ -1,9 +1,11 @@ +@@ -1,11 +1,13 @@ package org.bukkit.craftbukkit.scheduler; import java.util.function.Consumer; + +import co.aikar.timings.NullTimingHandler; import org.bukkit.Bukkit; + import org.bukkit.plugin.Plugin; + import org.bukkit.scheduler.BukkitTask; -import org.bukkit.craftbukkit.SpigotTimings; // Spigot -import org.spigotmc.CustomTimingsHandler; // Spigot +import co.aikar.timings.MinecraftTimings; // Paper +import co.aikar.timings.Timing; // Paper - import org.bukkit.plugin.Plugin; - import org.bukkit.scheduler.BukkitTask; + + public class CraftTask implements BukkitTask, Runnable { // Spigot @@ -26,12 +28,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot */ private volatile long period; @@ -2238,10 +2239,10 @@ index 6194d8aac0d2e54958aad3fb8b5fe144451cf879..d63a160f1b00de8d67ae1eb4fefbd5ca * This helper class represents the different NBT Tags. *

diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f03dd4aa3 100644 +index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea55488d70451d 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither; +@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither; import net.minecraft.server.MathHelper; import net.minecraft.server.MinecraftServer; import net.minecraft.server.World; @@ -2250,7 +2251,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f public class ActivationRange { -@@ -75,8 +75,8 @@ public class ActivationRange +@@ -73,8 +73,8 @@ public class ActivationRange /** * These entities are excluded from Activation range checks. * @@ -2261,7 +2262,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f * @return boolean If it should always tick. */ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) -@@ -111,7 +111,7 @@ public class ActivationRange +@@ -109,7 +109,7 @@ public class ActivationRange */ public static void activateEntities(World world) { @@ -2270,7 +2271,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f final int miscActivationRange = world.spigotConfig.miscActivationRange; final int raiderActivationRange = world.spigotConfig.raiderActivationRange; final int animalActivationRange = world.spigotConfig.animalActivationRange; -@@ -148,7 +148,7 @@ public class ActivationRange +@@ -146,7 +146,7 @@ public class ActivationRange } } } @@ -2279,7 +2280,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f } /** -@@ -245,10 +245,8 @@ public class ActivationRange +@@ -243,10 +243,8 @@ public class ActivationRange */ public static boolean checkIfActive(Entity entity) { @@ -2290,7 +2291,7 @@ index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f return true; } -@@ -272,7 +270,6 @@ public class ActivationRange +@@ -270,7 +268,6 @@ public class ActivationRange { isActive = false; } diff --git a/Spigot-Server-Patches/0010-Adventure.patch b/Spigot-Server-Patches/0010-Adventure.patch index 2b10897a47..c3a486b688 100644 --- a/Spigot-Server-Patches/0010-Adventure.patch +++ b/Spigot-Server-Patches/0010-Adventure.patch @@ -1387,10 +1387,10 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..d11725d61b888ceb08c4ea30f23d5631 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0adde250e202 100644 +index 351440f534653c9d315ccaf1e923e03ca6ba01f6..99a242956a56121ab4f108fc58563e1df1537577 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -564,8 +564,11 @@ public final class CraftServer implements Server { +@@ -563,8 +563,11 @@ public final class CraftServer implements Server { } @Override @@ -1403,7 +1403,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add } public Player getPlayer(final EntityPlayer entity) { -@@ -1303,7 +1306,15 @@ public final class CraftServer implements Server { +@@ -1302,7 +1305,15 @@ public final class CraftServer implements Server { return configuration.getInt("settings.spawn-radius", -1); } @@ -1419,7 +1419,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add public String getShutdownMessage() { return configuration.getString("settings.shutdown-message"); } -@@ -1419,7 +1430,15 @@ public final class CraftServer implements Server { +@@ -1418,7 +1429,15 @@ public final class CraftServer implements Server { } @Override @@ -1435,7 +1435,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add Set recipients = new HashSet<>(); for (Permissible permissible : getPluginManager().getPermissionSubscriptions(permission)) { if (permissible instanceof CommandSender && permissible.hasPermission(permission)) { -@@ -1427,14 +1446,14 @@ public final class CraftServer implements Server { +@@ -1426,14 +1445,14 @@ public final class CraftServer implements Server { } } @@ -1452,7 +1452,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add for (CommandSender recipient : recipients) { recipient.sendMessage(message); -@@ -1660,6 +1679,14 @@ public final class CraftServer implements Server { +@@ -1659,6 +1678,14 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, type); } @@ -1467,7 +1467,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add @Override public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type); -@@ -1672,13 +1699,28 @@ public final class CraftServer implements Server { +@@ -1671,13 +1698,28 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, size); } @@ -1496,7 +1496,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add public Merchant createMerchant(String title) { return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title); } -@@ -1722,6 +1764,12 @@ public final class CraftServer implements Server { +@@ -1721,6 +1763,12 @@ public final class CraftServer implements Server { return Thread.currentThread().equals(console.serverThread) || console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog) } @@ -1509,7 +1509,7 @@ index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0add @Override public String getMotd() { return console.getMotd(); -@@ -2148,5 +2196,15 @@ public final class CraftServer implements Server { +@@ -2149,5 +2197,15 @@ public final class CraftServer implements Server { return null; } } @@ -1789,10 +1789,10 @@ index db7c4011c8b90b6daca2b48a6d9ec447d31f7197..969bf1095bb2a90ad0f1cb1f1e023e05 public void setCustomName(String name) { // sane limit for name length diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index af41d9f11c6da2609bd75e49f15f5ec129b92361..fb3378e22864335fe6b60d77a401e01a68b3553c 100644 +index 96b55867d8bfbc85cb290da9b320ec74b9dbb179..ccfa8243639f487e0f83f012349fcfef94f377cb 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 { +@@ -316,9 +316,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { container = CraftEventFactory.callInventoryOpenEvent(player, container); if (container == null) return; @@ -1807,7 +1807,7 @@ index af41d9f11c6da2609bd75e49f15f5ec129b92361..fb3378e22864335fe6b60d77a401e01a getHandle().activeContainer = container; getHandle().activeContainer.addSlotListener(player); } -@@ -388,8 +391,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -387,8 +390,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // Now open the window Containers windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); @@ -1823,18 +1823,10 @@ index af41d9f11c6da2609bd75e49f15f5ec129b92361..fb3378e22864335fe6b60d77a401e01a player.activeContainer.addSlotListener(player); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f5a7a15bf 100644 +index 8428ef53e0408c4a7f74cc03e7e238be9c2f1888..28368aa85e25ad5ee1e35255f093fd3f5a7a15bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -84,7 +84,6 @@ import org.bukkit.Particle; - import org.bukkit.Sound; - import org.bukkit.Statistic; - import org.bukkit.WeatherType; --import org.bukkit.World; - import org.bukkit.block.data.BlockData; - import org.bukkit.configuration.serialization.DelegateDeserialization; - import org.bukkit.conversations.Conversation; -@@ -240,14 +239,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -239,14 +239,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getDisplayName() { @@ -1874,7 +1866,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f @Override public String getPlayerListName() { return getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(getHandle().listName); -@@ -266,35 +290,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -265,35 +290,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } @@ -1918,7 +1910,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f updatePlayerListHeaderFooter(); } -@@ -302,8 +326,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -301,8 +326,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (getHandle().playerConnection == null) return; PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter(); @@ -1929,7 +1921,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f getHandle().playerConnection.sendPacket(packet); } -@@ -335,6 +359,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -334,6 +359,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().playerConnection.disconnect(message == null ? "" : message); } @@ -1949,7 +1941,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f @Override public void setCompassTarget(Location loc) { if (getHandle().playerConnection == null) return; -@@ -549,6 +586,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -548,6 +586,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().playerConnection.sendPacket(packet); } @@ -1987,7 +1979,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f @Override public void sendSignChange(Location loc, String[] lines) { sendSignChange(loc, lines, DyeColor.BLACK); -@@ -571,12 +639,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -570,12 +639,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } IChatBaseComponent[] components = CraftSign.sanitizeLines(lines); @@ -2003,7 +1995,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f } @Override -@@ -1706,6 +1775,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1705,6 +1775,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return (getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : getHandle().clientViewDistance; } @@ -2016,7 +2008,7 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f @Override public String getLocale() { return getHandle().locale; -@@ -1729,6 +1804,137 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1728,6 +1804,137 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } @@ -2155,10 +2147,10 @@ index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f private final Player.Spigot spigot = new Player.Spigot() { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index dde25528de07857175b00ff85612d738eb43b9ec..b82dd03855dab546cc430dc0f0f07f9067365fa7 100644 +index f6688c7151734f4bdb63a71e810996e04b09e22c..6c153971dd72ff9df9725f889032cfb59bbe31e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -772,7 +772,7 @@ public class CraftEventFactory { +@@ -766,7 +766,7 @@ public class CraftEventFactory { return event; } @@ -2167,7 +2159,7 @@ index dde25528de07857175b00ff85612d738eb43b9ec..b82dd03855dab546cc430dc0f0f07f90 CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); -@@ -798,7 +798,7 @@ public class CraftEventFactory { +@@ -792,7 +792,7 @@ public class CraftEventFactory { * Server methods */ public static ServerListPingEvent callServerListPingEvent(Server craftServer, InetAddress address, String motd, int numPlayers, int maxPlayers) { @@ -2407,14 +2399,15 @@ index 9f6e797d34e5ad21a496c89f5a45ddb0638d3adc..115ee3785b4e0ba6a235bbb31b643aa5 @Override public CraftMerchant getCraftMerchant() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 18faf5ea801984696ba45b9784aa0afdf6971e39..fb4d39a4cf101749f74da9c48bb3a27b0188fbeb 100644 +index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..fb4d39a4cf101749f74da9c48bb3a27b0188fbeb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -@@ -2,12 +2,15 @@ package org.bukkit.craftbukkit.inventory; +@@ -1,13 +1,16 @@ + package org.bukkit.craftbukkit.inventory; import com.google.common.collect.ImmutableList; - import com.google.common.collect.Lists; -import com.google.common.collect.ImmutableMap.Builder; + import com.google.common.collect.Lists; + +import com.google.common.collect.ImmutableMap; // Paper import java.util.ArrayList; diff --git a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 101208beb3..a168ea9575 100644 --- a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -32,10 +32,10 @@ index 89d3ff83f0e152e9747c554693af4145f0a7d07e..dd104b1cd544983024ac60888940a1c0 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b6f867c891c2f02a2e526a0d746d0adde250e202..73ede1a37b141007a6085adcdced82236ef656e9 100644 +index 99a242956a56121ab4f108fc58563e1df1537577..7a2409b78a044c37de1ee4fc772e4ac120ae657c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -227,7 +227,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -226,7 +226,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0022-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0022-Remove-invalid-mob-spawner-tile-entities.patch index 1abdd2b2db..bbd1eaf65c 100644 --- a/Spigot-Server-Patches/0022-Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/0022-Remove-invalid-mob-spawner-tile-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove invalid mob spawner tile entities diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 19ddcabdc17c23c4ec46f5669ba0fd56d4bbee58..0da51a454b599f54f3bd443040cdcac57b1c7d7c 100644 +index 0aea16df16b55b1d4756b51d10c8c22d37aef9a3..0d0f36c62d260390827321aa6472f51a3a204c95 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -612,6 +612,10 @@ public class Chunk implements IChunkAccess { +@@ -614,6 +614,10 @@ public class Chunk implements IChunkAccess { } // CraftBukkit start diff --git a/Spigot-Server-Patches/0024-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0024-Further-improve-server-tick-loop.patch index 5d5ea5ffea..6ed5b89aa0 100644 --- a/Spigot-Server-Patches/0024-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0024-Further-improve-server-tick-loop.patch @@ -140,10 +140,10 @@ index dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9 GameProfilerTick gameprofilertick = GameProfilerTick.a("Server"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 73ede1a37b141007a6085adcdced82236ef656e9..bf9afb9d4dd7d9d6b8647c760e1ba31a8c0ba150 100644 +index 7a2409b78a044c37de1ee4fc772e4ac120ae657c..390714fa5822a61f64f6b3b8731397e9dae77cfd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2114,6 +2114,17 @@ public final class CraftServer implements Server { +@@ -2113,6 +2113,17 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } @@ -158,14 +158,14 @@ index 73ede1a37b141007a6085adcdced82236ef656e9..bf9afb9d4dd7d9d6b8647c760e1ba31a + } + // Paper end + + // Spigot start private final Spigot spigot = new Spigot() { - diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -index 9cd57c9d5fe59ceb2cd307e4e1a2052c9ac428fe..7218f23df4d06ff1ca612286e4a404246389ab18 100644 +index f5b6dec1cbe7501ce2ee9125920e810bc94670cc..e62890433ffbe0b4e48942fe6c38b599a19e58fd 100644 --- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java +++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -@@ -26,22 +26,30 @@ public class TicksPerSecondCommand extends Command +@@ -24,22 +24,30 @@ public class TicksPerSecondCommand extends Command return true; } diff --git a/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch index 0b96e0c635..70e621b552 100644 --- a/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch @@ -23,7 +23,7 @@ index f1d0e2faffb3ef27f5a41d06d0ff7d787f1098f5..da96a91c6b4cc03ad2e4539053bd30e7 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ab1285ed371f7848cddd959c33019a8ff10e1c28..21868a246d01c0f8c8642e42f82f66632b3bcadd 100644 +index 0f602de85bc7002150247b6cb26c6905f0e4f585..bc1946ea3060220f4598aae2e1aed3d84ab18387 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -685,11 +685,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -42,10 +42,10 @@ index ab1285ed371f7848cddd959c33019a8ff10e1c28..21868a246d01c0f8c8642e42f82f6663 + this.tileEntityListTick.remove(tileTickPosition--); + continue; + // Paper end - } - // Spigot start - finally { -@@ -755,11 +757,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + // Spigot start + } finally { + tileentity.tickTimer.stopTiming(); +@@ -754,11 +756,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { consumer.accept(entity); } catch (Throwable throwable) { diff --git a/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch b/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch index f663925974..e75c94b5a7 100644 --- a/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch +++ b/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Always tick falling blocks diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 2b00258ccd808e3332af5ab3f7e4967f03dd4aa3..78f0fb5d97b077673ec542cd70bbc3ffa13f916c 100644 +index 093a11b6e355f9e1236ecca921ea55488d70451d..d44ef056bdab3bcff39aea45b40a4c7e9c62398f 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature; +@@ -12,6 +12,7 @@ import net.minecraft.server.EntityCreature; import net.minecraft.server.EntityCreeper; import net.minecraft.server.EntityEnderCrystal; import net.minecraft.server.EntityEnderDragon; @@ -16,7 +16,7 @@ index 2b00258ccd808e3332af5ab3f7e4967f03dd4aa3..78f0fb5d97b077673ec542cd70bbc3ff import net.minecraft.server.EntityFireball; import net.minecraft.server.EntityFireworks; import net.minecraft.server.EntityHuman; -@@ -93,6 +94,7 @@ public class ActivationRange +@@ -91,6 +92,7 @@ public class ActivationRange || entity instanceof EntityFireball || entity instanceof EntityLightning || entity instanceof EntityTNTPrimed diff --git a/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch index bb0d9bbfb8..7d2003668f 100644 --- a/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch @@ -48,10 +48,10 @@ index 287d1c6abd407dc8f1e5b29a95579ff9875bdaec..cfacd979d75fd612937586cbc9f55570 } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) { // Do nothing, this is coming from a plugin diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bf9afb9d4dd7d9d6b8647c760e1ba31a8c0ba150..6b26a8f09c022f398b847411166d11d2e2d0ca76 100644 +index 390714fa5822a61f64f6b3b8731397e9dae77cfd..e78182508ccd05bcb934a29eb495ff9c884d3a55 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -763,6 +763,29 @@ public final class CraftServer implements Server { +@@ -762,6 +762,29 @@ public final class CraftServer implements Server { Validate.notNull(commandLine, "CommandLine cannot be null"); org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot @@ -106,7 +106,7 @@ index aeed7697254af17ffefe8e578353ad216e15f9f3..9f7d2ef932ab41cef5d3d0736d20a7c7 public static void catchOp(String reason) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index e7b953ca312533f7ede12cdab42b2289aefc3b95..ccea803f58e09067cc998c62ffa134d6604878ff 100644 +index 56445844c7f542dd74c166bb09abd79cc17e1e12..26795b22e3ebc9594af79f93506a3c217cb784e2 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -43,6 +43,7 @@ public class RestartCommand extends Command diff --git a/Spigot-Server-Patches/0047-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0047-Expose-server-CommandMap.patch index 3ad8f7a0ca..4713f54b6b 100644 --- a/Spigot-Server-Patches/0047-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0047-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6b26a8f09c022f398b847411166d11d2e2d0ca76..5faa720f7249cbe0028927bb274cb45009068359 100644 +index e78182508ccd05bcb934a29eb495ff9c884d3a55..5e97a52222dbccbdde7d478d76363495784facb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1753,6 +1753,7 @@ public final class CraftServer implements Server { +@@ -1752,6 +1752,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0053-Add-velocity-warnings.patch b/Spigot-Server-Patches/0053-Add-velocity-warnings.patch index 0d24f4df6c..8cfcf04b99 100644 --- a/Spigot-Server-Patches/0053-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0053-Add-velocity-warnings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5faa720f7249cbe0028927bb274cb45009068359..09d28f816520abb0f092bc6cd1bb1f0e3cfe1417 100644 +index 5e97a52222dbccbdde7d478d76363495784facb8..f1aae33917fc8a61e38b410421c205a7bc5a13dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -263,6 +263,7 @@ public final class CraftServer implements Server { +@@ -262,6 +262,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; diff --git a/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch index 13553e5403..7f597196e0 100644 --- a/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch @@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8 + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0da51a454b599f54f3bd443040cdcac57b1c7d7c..81c6ce3ba87da692675bca8b2831a90fabfa4e37 100644 +index 0d0f36c62d260390827321aa6472f51a3a204c95..01655fd86f9a3218036f8b5404e233d32e0904a5 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -59,7 +59,7 @@ index 0da51a454b599f54f3bd443040cdcac57b1c7d7c..81c6ce3ba87da692675bca8b2831a90f import com.google.common.collect.Maps; import com.google.common.collect.Sets; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; -@@ -617,10 +618,15 @@ public class Chunk implements IChunkAccess { +@@ -619,10 +620,15 @@ public class Chunk implements IChunkAccess { this.tileEntities.remove(blockposition); // Paper end } else { @@ -187,7 +187,7 @@ index 1844a6504acc420bdfaaf8f045c569e970d055db..d6aadbda5c5a17976659f57ee04cf9b9 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 895436e36e6ef6f78dfd42e3ef3a0132506663f2..1c54c081c6ea1f422c19db1aa9e1935ce066d910 100644 +index eb0af6775d60e2cd610dde6e7c4874d4b01d6054..3638ae7c0eba5b1ef811bc1629334e9c483bef6f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,10 @@ @@ -214,7 +214,7 @@ index 895436e36e6ef6f78dfd42e3ef3a0132506663f2..1c54c081c6ea1f422c19db1aa9e1935c tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); continue; -@@ -757,8 +765,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -756,8 +764,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { consumer.accept(entity); } catch (Throwable throwable) { // Paper start - Prevent tile entity and entity crashes diff --git a/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch index 556f6620ee..5b1113d9b6 100644 --- a/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch @@ -30,10 +30,10 @@ index 1d03a79e9010bc514b72a81ba0ad4a62aeff1bb7..436e555205327afcb8e294370810cf27 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 09d28f816520abb0f092bc6cd1bb1f0e3cfe1417..499e2da0c9085cfffdb882df9801d654f4804d7f 100644 +index f1aae33917fc8a61e38b410421c205a7bc5a13dd..a02ec4d765ef54955459a372960fb5b539f912df 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -400,6 +400,7 @@ public final class CraftServer implements Server { +@@ -399,6 +399,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { helpMap.clear(); helpMap.initializeGeneralTopics(); @@ -41,7 +41,7 @@ index 09d28f816520abb0f092bc6cd1bb1f0e3cfe1417..499e2da0c9085cfffdb882df9801d654 } Plugin[] plugins = pluginManager.getPlugins(); -@@ -419,7 +420,7 @@ public final class CraftServer implements Server { +@@ -418,7 +419,7 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch index ef359867f7..1d4c8095eb 100644 --- a/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 499e2da0c9085cfffdb882df9801d654f4804d7f..5bbf334d9621822ffc0e731c6dbd26644a5e80d7 100644 +index a02ec4d765ef54955459a372960fb5b539f912df..e5f6dfa4061b98ccb5f3b0cd93ef416a2c20ee78 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2243,5 +2243,23 @@ public final class CraftServer implements Server { +@@ -2244,5 +2244,23 @@ public final class CraftServer implements Server { } return this.adventure$audiences; } diff --git a/Spigot-Server-Patches/0063-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0063-Remove-Metadata-on-reload.patch index 9b5b3088ae..fcfe939c29 100644 --- a/Spigot-Server-Patches/0063-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0063-Remove-Metadata-on-reload.patch @@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5bbf334d9621822ffc0e731c6dbd26644a5e80d7..0dd537392e0fdbd42466c39d69b03ea3c68c5fb6 100644 +index e5f6dfa4061b98ccb5f3b0cd93ef416a2c20ee78..83ab502d80bbb97204a6f0e4474d1a3b96218448 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -874,8 +874,18 @@ public final class CraftServer implements Server { +@@ -873,8 +873,18 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } diff --git a/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch b/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch index 7898d4b537..f3ecbeea8b 100644 --- a/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch +++ b/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch @@ -30,10 +30,10 @@ index cd64fb9d0c6d123e1c86cb33f12cd9cefc9f80d0..74ba5dbb83c13ce1721619b755036a78 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b6ff6095543d720382786e159a9f1cdd6eb6f166..f9ad646f3061914e55e424602abe27da7f1c0865 100644 +index 9ef17a2ad31c8e11ba433b49aa9a31cf8df57dc8..83858165764a7459843433de1a077037692a2a97 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -984,7 +984,7 @@ public class Chunk implements IChunkAccess { +@@ -986,7 +986,7 @@ public class Chunk implements IChunkAccess { @Override public long getInhabitedTime() { diff --git a/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch index f2b040421b..a6188cbf9a 100644 --- a/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b52f1164e 100644 +index d6ee6aae693519a379b4a6ba26642d5ef78e4deb..369a6b42a89fd75aeb3da4930f47b6917a1ae393 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -39,7 +39,7 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b this.tileEntityListUnload.clear(); } -@@ -730,7 +730,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -729,7 +729,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); // Spigot end @@ -48,7 +48,7 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition()); } -@@ -760,7 +760,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -759,7 +759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); // CraftBukkit start // From above, don't screw this up - SPIGOT-1746 @@ -57,7 +57,7 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b this.a(tileentity1); } // CraftBukkit end -@@ -906,7 +906,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -905,7 +905,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } else { if (tileentity != null) { this.tileEntityListPending.remove(tileentity); @@ -67,10 +67,10 @@ index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d199191220b5afc42d639f316878501c91514a50..4be09328cea0808c3a41681aea860cd04f799bbd 100644 +index dbb022fb186b181b9b1912adfaebbb00fa1c7d4b..486ba1efc934c6851d2b570493af6e1079a7abd5 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1600,7 +1600,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1611,7 +1611,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size())); @@ -79,7 +79,7 @@ index d199191220b5afc42d639f316878501c91514a50..4be09328cea0808c3a41681aea860cd0 bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a())); bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a())); bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n"); -@@ -1739,7 +1739,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1750,7 +1750,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void a(Writer writer) throws IOException { CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer); diff --git a/Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch index 16dcf212d8..1b7b0a7670 100644 --- a/Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch @@ -45,10 +45,10 @@ index 060887d765604e4be82913607bb6266a278f5db6..c5957c2d6c54b076ebe7f9a432e30551 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0dd537392e0fdbd42466c39d69b03ea3c68c5fb6..027d5409ae70015cdb5469a1502f861ed466ada1 100644 +index 83ab502d80bbb97204a6f0e4474d1a3b96218448..7a1a24c71999462aa4f8aebd78914d9bf243f5c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1508,7 +1508,8 @@ public final class CraftServer implements Server { +@@ -1507,7 +1507,8 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch index f1fa88135e..ecea71ce5e 100644 --- a/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch @@ -19,10 +19,10 @@ index 6eca3f300020006f02dd36253b522db442e3cc33..622affa0dc3cc1eadaed400511f2ca2c + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index f9ad646f3061914e55e424602abe27da7f1c0865..8dd560c8207f14123ab9c9820d8ce7333775db35 100644 +index 83858165764a7459843433de1a077037692a2a97..380690cdb1052b12d0574c111c2162bd7ed8ecca 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -641,6 +641,12 @@ public class Chunk implements IChunkAccess { +@@ -643,6 +643,12 @@ public class Chunk implements IChunkAccess { "Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16)); e.printStackTrace(); ServerInternalException.reportInternalException(e); diff --git a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch index 34d52b1101..8a066d62c6 100644 --- a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch @@ -38,10 +38,10 @@ index 824e172f06e57f86010836a1006a14d0a3b0bda3..eedec25373cfc8adec7ac8a99b146770 entitywitch.prepare(worldserver, worldserver.getDamageScaler(entitywitch.getChunkCoordinates()), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null); entitywitch.setNoAI(this.isNoAI()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index b82dd03855dab546cc430dc0f0f07f9067365fa7..dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22 100644 +index 6c153971dd72ff9df9725f889032cfb59bbe31e3..4b8c984a79e276b980dd9aa33d2ef5deee9e13d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1082,6 +1082,14 @@ public class CraftEventFactory { +@@ -1076,6 +1076,14 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch index 2666f495b1..b874398ca9 100644 --- a/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 027d5409ae70015cdb5469a1502f861ed466ada1..995b00b6ece91319e06022fb89356345fa257b54 100644 +index 7a1a24c71999462aa4f8aebd78914d9bf243f5c9..c87c5648582132db4e310a3c580eb3045afc32b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2272,5 +2272,24 @@ public final class CraftServer implements Server { +@@ -2273,5 +2273,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch index ef52777fd1..62edb5f2a1 100644 --- a/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch @@ -18,10 +18,10 @@ index fda68abbdd7c970048ba710d7ef35214f2aaa74c..2c2d44562f732c75532cda910db5ce67 this.die(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22..5f6255ceeede4e4ba3e6e8993b6aad6311f50462 100644 +index 4b8c984a79e276b980dd9aa33d2ef5deee9e13d1..4d90c941f92aaef8dd53b5c31b71a25d19954f40 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -121,6 +121,7 @@ import org.bukkit.entity.ThrownPotion; +@@ -117,6 +117,7 @@ import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.Vehicle; import org.bukkit.entity.Villager; import org.bukkit.entity.Villager.Profession; @@ -29,7 +29,7 @@ index dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22..5f6255ceeede4e4ba3e6e8993b6aad63 import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -1041,6 +1042,17 @@ public class CraftEventFactory { +@@ -1035,6 +1036,17 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch index c474617b6d..471e944317 100644 --- a/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch @@ -71,10 +71,10 @@ index 7391fd31148dbde60e34955841a296f454ac768e..53a8ea7d1eff84abe6c49464d556aa27 this.checkBlockCollisions(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5f6255ceeede4e4ba3e6e8993b6aad6311f50462..1db30da4294f1187eeacecfc056a44963378a1cc 100644 +index 4d90c941f92aaef8dd53b5c31b71a25d19954f40..62730cbdf46c0cabe71849d3ee3d403ecccab242 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1186,6 +1186,16 @@ public class CraftEventFactory { +@@ -1180,6 +1180,16 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } diff --git a/Spigot-Server-Patches/0132-Firework-API-s.patch b/Spigot-Server-Patches/0132-Firework-API-s.patch index 1f8932f30c..7fa32777c0 100644 --- a/Spigot-Server-Patches/0132-Firework-API-s.patch +++ b/Spigot-Server-Patches/0132-Firework-API-s.patch @@ -44,10 +44,10 @@ index 46b315036bbe576b2bf9938db73d9c5931003cc1..a646dc9f030ad1f76ba2b7bb1bc7897c @Override diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 9e17a002218ce82c0e1033f3487f878463970d17..14c0e7382292b3d39858d4d957df8016c301c712 100644 +index 5e1af55c429117111aa40a9408cecafc82a94512..658b5ca36d951f2f58d91613b89a328109606fd6 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java -@@ -183,6 +183,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable +@@ -182,6 +182,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable if (flag1) { object = new EntityFireworks(world, itemstack1, entityliving, entityliving.locX(), entityliving.getHeadY() - 0.15000000596046448D, entityliving.locZ(), true); diff --git a/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 1a64186e72..f9b0139ba1 100644 --- a/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -226,10 +226,10 @@ index eedec25373cfc8adec7ac8a99b146770dc15c70e..732323ee1de01929c73bc5f98444c0f6 } diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -index c830b3c2145effc16314c6216be8af935416cb58..f1a509063c09e603140c74255a3fb901693d2cc5 100644 +index 86e9c9ec35153d4d6248512e2e3406ca2f3dac46..fa3e786cd6ef67da378a5d51583ca84a82677d8c 100644 --- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java +++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -@@ -144,7 +144,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { +@@ -145,7 +145,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { if (merchantrecipe.isRewardExp()) { int i = 3 + this.random.nextInt(4); @@ -278,10 +278,10 @@ index a3ddf7be4c7ea588098381b8f05b2bad5b388853..99b20fa5feff0f766124d4ec9474852e } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3f35e1290beaab1fa2ca93ec64ab0dd42d68d71c..85562d2cafab6f81705b70ac1f965ccfb38abdf5 100644 +index e42f27bb10b6ee279555cfee3c90a88fccad9d65..5bf5a815653b0556d9d2bcaf5f69026b77bd28a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1822,7 +1822,7 @@ public class CraftWorld implements World { +@@ -1827,7 +1827,7 @@ public class CraftWorld implements World { } else if (TNTPrimed.class.isAssignableFrom(clazz)) { entity = new EntityTNTPrimed(world, x, y, z, null); } else if (ExperienceOrb.class.isAssignableFrom(clazz)) { diff --git a/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch index df92cf9e07..e4304c7291 100644 --- a/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch @@ -101,7 +101,7 @@ index 05ef12c3b90191a3998d1251221658c86af99654..7ecd5e3747fd8acbddcdf5b42285d7b6 // CraftBukkit start public void sendMessage(IChatBaseComponent[] iChatBaseComponents) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index ccea803f58e09067cc998c62ffa134d6604878ff..aefea3a9a8b9b75c62bd20018be7cd166a213001 100644 +index 26795b22e3ebc9594af79f93506a3c217cb784e2..aefea3a9a8b9b75c62bd20018be7cd166a213001 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -46,86 +46,134 @@ public class RestartCommand extends Command @@ -134,7 +134,7 @@ index ccea803f58e09067cc998c62ffa134d6604878ff..aefea3a9a8b9b75c62bd20018be7cd16 + } - // Kick all players -- for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players ) +- for ( EntityPlayer p : (List) MinecraftServer.getServer().getPlayerList().players ) - { - p.playerConnection.disconnect(SpigotConfig.restartMessage); - } diff --git a/Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch index 149092c00b..d8ca286081 100644 --- a/Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,10 +20,10 @@ index 3449ba199bdb426ad36dc4a281925f91eea3fab3..ed519159c37299595b4eaeaab5131a8e + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 995b00b6ece91319e06022fb89356345fa257b54..2ffbe9d1a18f65c1190b6fc14e20bde3084ed444 100644 +index c87c5648582132db4e310a3c580eb3045afc32b8..2101695ca111d0bfcec7da5065034b6029687949 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2291,5 +2291,10 @@ public final class CraftServer implements Server { +@@ -2292,5 +2292,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch index c80bdc3a5e..549a552afd 100644 --- a/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -259,7 +259,7 @@ index 7ecd5e3747fd8acbddcdf5b42285d7b6f3ffbac2..07ab0bf135a6903c936606296b6701b9 this.k = new GameProfileBanList(PlayerList.b); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2ffbe9d1a18f65c1190b6fc14e20bde3084ed444..c8b5d0933f26882be18505d9366a5c3d546ba2dc 100644 +index 2101695ca111d0bfcec7da5065034b6029687949..38486fb74a29fd8ace2bfa6e74c1b5230ab99a7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -46,7 +46,7 @@ import java.util.function.Consumer; @@ -271,7 +271,7 @@ index 2ffbe9d1a18f65c1190b6fc14e20bde3084ed444..c8b5d0933f26882be18505d9366a5c3d import net.minecraft.server.Advancement; import net.minecraft.server.ArgumentEntity; import net.minecraft.server.BiomeManager; -@@ -1202,9 +1202,13 @@ public final class CraftServer implements Server { +@@ -1201,9 +1201,13 @@ public final class CraftServer implements Server { return logger; } diff --git a/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch index dbd90807a3..5c26e6471f 100644 --- a/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c8b5d0933f26882be18505d9366a5c3d546ba2dc..7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6 100644 +index 38486fb74a29fd8ace2bfa6e74c1b5230ab99a7f..3ddd97c732fe5ae24075e70f8b8a2b0c3e52a32c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -105,6 +105,7 @@ import net.minecraft.server.WorldNBTStorage; +@@ -104,6 +104,7 @@ import net.minecraft.server.WorldNBTStorage; import net.minecraft.server.WorldServer; import net.minecraft.server.WorldSettings; import org.apache.commons.lang.Validate; @@ -16,7 +16,7 @@ index c8b5d0933f26882be18505d9366a5c3d546ba2dc..7bc616faba6e98cb04a36ab26afa7cfb import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -@@ -178,6 +179,7 @@ import org.bukkit.craftbukkit.util.Versioning; +@@ -177,6 +178,7 @@ import org.bukkit.craftbukkit.util.Versioning; import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -24,7 +24,7 @@ index c8b5d0933f26882be18505d9366a5c3d546ba2dc..7bc616faba6e98cb04a36ab26afa7cfb import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerChatTabCompleteEvent; import org.bukkit.event.server.BroadcastMessageEvent; -@@ -794,7 +796,13 @@ public final class CraftServer implements Server { +@@ -793,7 +795,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch index 4e0bc7391e..4c636d0481 100644 --- a/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch @@ -509,10 +509,10 @@ index e89c92aded564fe689cc1aa8d0c83abb72f7b10c..aa1b18ffa1e2b7f865f63b7df81d8f3b private volatile long c; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6..e89b0502b243a35ddc6c765b45cf2d69e491daff 100644 +index 3ddd97c732fe5ae24075e70f8b8a2b0c3e52a32c..2b6c9dbbbf97386cd9d9b37254640b8585092140 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -228,6 +228,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -227,6 +227,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot @@ -522,7 +522,7 @@ index 7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6..e89b0502b243a35ddc6c765b45cf2d69 public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2308,5 +2311,24 @@ public final class CraftServer implements Server { +@@ -2309,5 +2312,24 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch index b3651b6787..b2e19048d5 100644 --- a/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch @@ -58,10 +58,10 @@ index 63f3743bbf3632badf4e66a5ee4239ccbc5df700..502154234632fbf65fada993f9a1e457 @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 fb3378e22864335fe6b60d77a401e01a68b3553c..b1f837fcbaa2ab9d83bb8f17b24dd45fdc3b14e4 100644 +index ccfa8243639f487e0f83f012349fcfef94f377cb..f209e6d8fa20ceb7db71a6bb1685fd79b13f0738 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -494,6 +494,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -493,6 +493,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { getHandle().getCooldownTracker().setCooldown(CraftMagicNumbers.getItem(material), ticks); } diff --git a/Spigot-Server-Patches/0175-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0175-Option-for-maximum-exp-value-when-merging-orbs.patch index e4879a422e..c2184e63ed 100644 --- a/Spigot-Server-Patches/0175-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0175-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -20,10 +20,10 @@ index 90ca51dfdbb3045dd528450225cba96f5834166e..6c692e58cde22003ecbf6dc569579914 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 1db30da4294f1187eeacecfc056a44963378a1cc..56730babb7eb42625155361d47070d4e46bab9d0 100644 +index 62730cbdf46c0cabe71849d3ee3d403ecccab242..efe3133a8c5a034c5e168e33880a756161b9adb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -583,16 +583,32 @@ public class CraftEventFactory { +@@ -577,16 +577,32 @@ public class CraftEventFactory { EntityExperienceOrb xp = (EntityExperienceOrb) entity; double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/Spigot-Server-Patches/0179-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0179-API-to-get-a-BlockState-without-a-snapshot.patch index 03f58557fc..5b0bd5b5b1 100644 --- a/Spigot-Server-Patches/0179-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0179-API-to-get-a-BlockState-without-a-snapshot.patch @@ -81,12 +81,12 @@ index 5de8463c94612edd11e02ac5d9757382c9598e7d..661bb54c27966c8050644b293d99dfe8 switch (material) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 26cc40e57f5b73b9c32859bff37c4a3d94904c56..feeae1a9eb309ae4101783b191bb2bffe9aeb7d3 100644 +index 8a7e9302b4b6be086144add8df610b76b58e00d6..cca1c2ca5c1fe91fda30ace6f06a343b7850842e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -26,20 +26,40 @@ public class CraftBlockEntityState extends CraftBlockState this.tileEntity = tileEntityClass.cast(world.getHandle().getTileEntity(this.getPosition())); - Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? " + block); + Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? %s", block); + // Paper start + this.snapshotDisabled = DISABLE_SNAPSHOT; diff --git a/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch index 3a05ae3f83..2a5d6ae217 100644 --- a/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch @@ -72,10 +72,10 @@ index bbf89a81489bc6ec5741448b246ce9926b87b4e1..fa4ae84f7ed03da24d89268c4c566443 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e89b0502b243a35ddc6c765b45cf2d69e491daff..441547cdae0c2b2d61f79e537896f7521279b478 100644 +index 2b6c9dbbbf97386cd9d9b37254640b8585092140..cef40ca8f3c7da1ac16dc11c3643899f2fe45098 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1845,7 +1845,7 @@ public final class CraftServer implements Server { +@@ -1844,7 +1844,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0183-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0183-ExperienceOrbMergeEvent.patch index 4f3e6f845f..235cced8e8 100644 --- a/Spigot-Server-Patches/0183-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0183-ExperienceOrbMergeEvent.patch @@ -8,10 +8,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 56730babb7eb42625155361d47070d4e46bab9d0..7805ba48a33b12fb7094cd88972f422b14549c8f 100644 +index efe3133a8c5a034c5e168e33880a756161b9adb4..e98655a48d3c1edcac0c6f6facd3967018e21e5f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -593,7 +593,7 @@ public class CraftEventFactory { +@@ -587,7 +587,7 @@ public class CraftEventFactory { if (e instanceof EntityExperienceOrb) { EntityExperienceOrb loopItem = (EntityExperienceOrb) e; // Paper start diff --git a/Spigot-Server-Patches/0187-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0187-PlayerNaturallySpawnCreaturesEvent.patch index 36d896ba9f..02c2ebc380 100644 --- a/Spigot-Server-Patches/0187-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0187-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index dd78f093f6ee9822c4a31d87f3c83d2f8fa4fcf8..b6ec5d0f281bac483f210fd8c45a8965cd97cc02 100644 +index a066026bce318683dcc022920dad39d7ec25e485..8017953af1df6c046a47ebe655e5d1afa68d50f8 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -581,6 +581,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -589,6 +589,15 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper //Collections.shuffle(list); // Paper diff --git a/Spigot-Server-Patches/0202-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0202-getPlayerUniqueId-API.patch index afdf5b1191..6ded280e62 100644 --- a/Spigot-Server-Patches/0202-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0202-getPlayerUniqueId-API.patch @@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 441547cdae0c2b2d61f79e537896f7521279b478..272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6 100644 +index cef40ca8f3c7da1ac16dc11c3643899f2fe45098..ece800d6f7d156be97e3069f76df5d667b9ce94d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1512,6 +1512,26 @@ public final class CraftServer implements Server { +@@ -1511,6 +1511,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0207-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0207-Add-method-to-open-already-placed-sign.patch index 0e191f19e0..11e18a9ac6 100644 --- a/Spigot-Server-Patches/0207-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0207-Add-method-to-open-already-placed-sign.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index b1f837fcbaa2ab9d83bb8f17b24dd45fdc3b14e4..fb26a4f2953007b7fa503b654a99ca203ccc8caf 100644 +index f209e6d8fa20ceb7db71a6bb1685fd79b13f0738..d53cbcb6bba9d2526dbecb118735443c839c67d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -604,6 +604,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -603,6 +603,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } diff --git a/Spigot-Server-Patches/0213-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0213-Expand-World.spawnParticle-API-and-add-Builder.patch index d1beec32ad..ed2e922b3a 100644 --- a/Spigot-Server-Patches/0213-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0213-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ 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/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e23a5f446a1e357493f5232c39baa45f7386a637..a1491094b58cf814d7b05d6c0ce4067bf34dae1a 100644 +index 885bf43a591492f19bd5a421ea4271854ae8f192..d192e341f0f6a3d03329dab16de3b19962091d2a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -61,7 +61,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -22,7 +22,7 @@ index e23a5f446a1e357493f5232c39baa45f7386a637..a1491094b58cf814d7b05d6c0ce4067b public final ChunkProviderServer chunkProvider; // Paper - public boolean tickingEntities; private final MinecraftServer server; -@@ -1357,12 +1357,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1368,12 +1368,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { } public int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -43,10 +43,10 @@ index e23a5f446a1e357493f5232c39baa45f7386a637..a1491094b58cf814d7b05d6c0ce4067b if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 85562d2cafab6f81705b70ac1f965ccfb38abdf5..a13b2b549dc272ca37ef710c259407679fa2c00d 100644 +index 5bf5a815653b0556d9d2bcaf5f69026b77bd28a6..94fd77595a6bf2ee8deace75e243e5ce4286d82d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2334,11 +2334,17 @@ public class CraftWorld implements World { +@@ -2339,11 +2339,17 @@ public class CraftWorld implements World { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/Spigot-Server-Patches/0217-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0217-Allow-spawning-Item-entities-with-World.spawnEntity.patch index dd3827f9f9..de477b3923 100644 --- a/Spigot-Server-Patches/0217-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0217-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a13b2b549dc272ca37ef710c259407679fa2c00d..77845ad43ea5950f0c9acb19ca844c0d90d44703 100644 +index 94fd77595a6bf2ee8deace75e243e5ce4286d82d..3518505236e1b5c7267bc65756acd60f34873cfc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1502,6 +1502,10 @@ public class CraftWorld implements World { +@@ -1507,6 +1507,10 @@ public class CraftWorld implements World { if (Boat.class.isAssignableFrom(clazz)) { entity = new EntityBoat(world, x, y, z); entity.setPositionRotation(x, y, z, yaw, pitch); diff --git a/Spigot-Server-Patches/0229-Expand-Explosions-API.patch b/Spigot-Server-Patches/0229-Expand-Explosions-API.patch index f8cb823f2a..33d335e1b0 100644 --- a/Spigot-Server-Patches/0229-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0229-Expand-Explosions-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 77845ad43ea5950f0c9acb19ca844c0d90d44703..0471ac6cf1043f4a344b871aa85dcda4f04a5b5c 100644 +index 3518505236e1b5c7267bc65756acd60f34873cfc..5059ae88375ca9077f02fa521b9ff35018584417 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -877,6 +877,11 @@ public class CraftWorld implements World { +@@ -882,6 +882,11 @@ public class CraftWorld implements World { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled; } diff --git a/Spigot-Server-Patches/0233-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0233-Implement-World.getEntity-UUID-API.patch index c76601405d..6931f8ac7c 100644 --- a/Spigot-Server-Patches/0233-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0233-Implement-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0471ac6cf1043f4a344b871aa85dcda4f04a5b5c..cd0a59c3c88a0d7aa4d79acb473ad5da1c465072 100644 +index 5059ae88375ca9077f02fa521b9ff35018584417..6c58b404807c109bacdf6f3d35fbb05329ea8465 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1291,6 +1291,15 @@ public class CraftWorld implements World { +@@ -1296,6 +1296,15 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch index a9b36655ea..f9d56b33c0 100644 --- a/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch @@ -130,7 +130,7 @@ index d574bc5755b3075aa8d4a566262ee391b463be19..6c652849a24787a74e7eed16cb30d77e PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW)); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a1491094b58cf814d7b05d6c0ce4067bf34dae1a..a0d1e9f7535db896c0589dc02cb03bda23086167 100644 +index d192e341f0f6a3d03329dab16de3b19962091d2a..1a2760552cd42b302d4604917daf1fcd23765e59 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1014,7 +1014,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -152,10 +152,10 @@ index a1491094b58cf814d7b05d6c0ce4067bf34dae1a..a0d1e9f7535db896c0589dc02cb03bda } // Spigot End diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index fb26a4f2953007b7fa503b654a99ca203ccc8caf..38c0d54fcb084bb102ee004cc8987c8358b5a2ac 100644 +index d53cbcb6bba9d2526dbecb118735443c839c67d2..7b6ae7ef90c3df27a6ae43bc393b2d1d9a866143 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 { +@@ -372,7 +372,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (((EntityPlayer) getHandle()).playerConnection == null) return; if (getHandle().activeContainer != getHandle().defaultContainer) { // fire INVENTORY_CLOSE if one already open @@ -164,7 +164,7 @@ index fb26a4f2953007b7fa503b654a99ca203ccc8caf..38c0d54fcb084bb102ee004cc8987c83 } EntityPlayer player = (EntityPlayer) getHandle(); Container container; -@@ -443,8 +443,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -442,8 +442,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { @@ -193,10 +193,10 @@ index 03b4d9f0a396ef8016e8f5a8be7198843bf0b8dd..6ecbeffc83cef741c9a4ab1d8de1d536 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 7805ba48a33b12fb7094cd88972f422b14549c8f..229d1df5b10b0823e41b1f32d1bb4770592f81cc 100644 +index e98655a48d3c1edcac0c6f6facd3967018e21e5f..cf364cd080978602f4782e13bc31420d97a4f1a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1171,7 +1171,7 @@ public class CraftEventFactory { +@@ -1165,7 +1165,7 @@ public class CraftEventFactory { public static Container callInventoryOpenEvent(EntityPlayer player, Container container, boolean cancelled) { if (player.activeContainer != player.defaultContainer) { // fire INVENTORY_CLOSE if one already open @@ -205,7 +205,7 @@ index 7805ba48a33b12fb7094cd88972f422b14549c8f..229d1df5b10b0823e41b1f32d1bb4770 } CraftServer server = player.world.getServer(); -@@ -1336,8 +1336,18 @@ public class CraftEventFactory { +@@ -1330,8 +1330,18 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0247-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0247-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index e5fc5b1901..83a9dc7725 100644 --- a/Spigot-Server-Patches/0247-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0247-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -31,10 +31,10 @@ index e17637cfee773b1b79c05d7a8e6558963c7a9c14..9a3183e55fcb6809d2b324ad52e27f3e for (int i = 0; i < list.size(); ++i) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3bad056cf3c9a4322dbbf3486ea4510117a8d95b..7b2df7f3538f7ee696db08f7d8be74f258ff1996 100644 +index cb1330ef117224aea07208cebff544c714ae313a..51c57f4752ea49859b9e00045a40899783731f28 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -802,6 +802,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -801,6 +801,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // Paper end } } diff --git a/Spigot-Server-Patches/0248-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0248-Vanished-players-don-t-have-rights.patch index fed62f96ac..b7716322a6 100644 --- a/Spigot-Server-Patches/0248-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0248-Vanished-players-don-t-have-rights.patch @@ -17,7 +17,7 @@ index e0ae51ede44de5c894df526c1fc6d94c46d72013..8bcca73ae48ee822d32a6d23be2e1056 return this.getBlock().c(this.p(), iblockaccess, blockposition, voxelshapecollision); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 64a739d0660098b840e2369f150670691eb9c441..91b450da31b972e2251382cd068a818a6bd70c1e 100644 +index be5ad564964f26c90440bb30464edbf9882ff1e1..c7c8dd944c084c281568cb6444c8bda35b35a4df 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -96,7 +96,7 @@ index ed0f9c5d29c4f88b7beee4b0ecdd7a56de2d7a9e..881cea7c466f29ff4a89db28d104e850 if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c((Throwable) (new IllegalArgumentException())); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7b2df7f3538f7ee696db08f7d8be74f258ff1996..20a13b80e5df99c549b55d3cbddbe13f730f7cdf 100644 +index 51c57f4752ea49859b9e00045a40899783731f28..26669ded3ec47d13e4e79d65d0f05a588f9e1f63 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -178,6 +178,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -147,10 +147,10 @@ index 7b2df7f3538f7ee696db08f7d8be74f258ff1996..20a13b80e5df99c549b55d3cbddbe13f public boolean s_() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 229d1df5b10b0823e41b1f32d1bb4770592f81cc..e762a20c92a990ecc08e8bd4fe65b80b5913587e 100644 +index cf364cd080978602f4782e13bc31420d97a4f1a3..0d0140c1b132a4c569e34781264cdea8b6d555b2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1207,6 +1207,14 @@ public class CraftEventFactory { +@@ -1201,6 +1201,14 @@ public class CraftEventFactory { Projectile projectile = (Projectile) entity.getBukkitEntity(); org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity(); com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); diff --git a/Spigot-Server-Patches/0249-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/0249-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch index 69204c099e..49acb393e1 100644 --- a/Spigot-Server-Patches/0249-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch +++ b/Spigot-Server-Patches/0249-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8dd560c8207f14123ab9c9820d8ce7333775db35..90b2a891c5bfa26ab1ff6738f58719a10d5cbed6 100644 +index 380690cdb1052b12d0574c111c2162bd7ed8ecca..84ad87f4a1ab9c136e00f4c9f029853d82f57247 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -523,6 +523,7 @@ public class Chunk implements IChunkAccess { +@@ -524,6 +524,7 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.loc.z; this.entities.add(entity); // Paper - per chunk entity list this.entitySlices[k].add(entity); @@ -17,7 +17,7 @@ index 8dd560c8207f14123ab9c9820d8ce7333775db35..90b2a891c5bfa26ab1ff6738f58719a1 } @Override -@@ -550,6 +551,7 @@ public class Chunk implements IChunkAccess { +@@ -552,6 +553,7 @@ public class Chunk implements IChunkAccess { return; } entityCounts.decrement(entity.getMinecraftKeyString()); diff --git a/Spigot-Server-Patches/0250-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0250-Add-some-Debug-to-Chunk-Entity-slices.patch index 8a0f47ecc6..c8c69a78f4 100644 --- a/Spigot-Server-Patches/0250-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0250-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -9,10 +9,10 @@ This should hopefully avoid duplicate entities ever being created if the entity was to end up in 2 different chunk slices diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be56937c99595a 100644 +index 84ad87f4a1ab9c136e00f4c9f029853d82f57247..e829f62397d092fa919d387b157a65b0c627e2e2 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -514,6 +514,25 @@ public class Chunk implements IChunkAccess { +@@ -515,6 +515,25 @@ public class Chunk implements IChunkAccess { if (k >= this.entitySlices.length) { k = this.entitySlices.length - 1; } @@ -38,7 +38,7 @@ index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be5693 if (!entity.inChunk || entity.getCurrentChunk() != this) entityCounts.increment(entity.getMinecraftKeyString()); // Paper entity.inChunk = true; -@@ -523,6 +542,7 @@ public class Chunk implements IChunkAccess { +@@ -524,6 +543,7 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.loc.z; this.entities.add(entity); // Paper - per chunk entity list this.entitySlices[k].add(entity); @@ -46,7 +46,7 @@ index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be5693 this.markDirty(); // Paper } -@@ -547,6 +567,10 @@ public class Chunk implements IChunkAccess { +@@ -549,6 +569,10 @@ public class Chunk implements IChunkAccess { // Paper start if (entity.currentChunk != null && entity.currentChunk.get() == this) entity.setCurrentChunk(null); @@ -58,7 +58,7 @@ index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be5693 return; } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 91b450da31b972e2251382cd068a818a6bd70c1e..a331a62be48c3d9f5247817dfeeaba923aed5f57 100644 +index c7c8dd944c084c281568cb6444c8bda35b35a4df..da195d9bb6995fcbe569ca2e2b08c473431376a6 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0254-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0254-Ignore-Dead-Entities-in-entityList-iteration.patch index 8a8f50b210..6c4e2a025c 100644 --- a/Spigot-Server-Patches/0254-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0254-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -23,10 +23,10 @@ index 9cb2f3b31921870ddba044840e99eb04babe26bb..f0a836db74ad3e20778d3863223bc9a3 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.chunkX, e.chunkZ); diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6bae89767 100644 +index e829f62397d092fa919d387b157a65b0c627e2e2..3cb1ee261724e34a23c4a0f98673da1597786a01 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -823,6 +823,7 @@ public class Chunk implements IChunkAccess { +@@ -825,6 +825,7 @@ public class Chunk implements IChunkAccess { for (int i1 = 0; i1 < l; ++i1) { Entity entity1 = (Entity) list1.get(i1); @@ -34,7 +34,7 @@ index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6 if (entity1.getBoundingBox().c(axisalignedbb) && entity1 != entity) { if (predicate == null || predicate.test(entity1)) { -@@ -860,6 +861,7 @@ public class Chunk implements IChunkAccess { +@@ -862,6 +863,7 @@ public class Chunk implements IChunkAccess { while (iterator.hasNext()) { T entity = (T) iterator.next(); // CraftBukkit - decompile error @@ -42,7 +42,7 @@ index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6 if ((entitytypes == null || entity.getEntityType() == entitytypes) && entity.getBoundingBox().c(axisalignedbb) && predicate.test(entity)) { list.add(entity); -@@ -882,6 +884,7 @@ public class Chunk implements IChunkAccess { +@@ -884,6 +886,7 @@ public class Chunk implements IChunkAccess { while (iterator.hasNext()) { T t0 = (T) iterator.next(); // CraftBukkit - decompile error @@ -51,7 +51,7 @@ index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6 if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check list.add(t0); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a331a62be48c3d9f5247817dfeeaba923aed5f57..769fada8ffa657493e5d7bf025281ff5f9f4299f 100644 +index da195d9bb6995fcbe569ca2e2b08c473431376a6..49c7b40744adcd36e5ae1eef026679e9b646feac 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -190,6 +190,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -63,7 +63,7 @@ index a331a62be48c3d9f5247817dfeeaba923aed5f57..769fada8ffa657493e5d7bf025281ff5 public float getBukkitYaw() { return this.yaw; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d6c319c1177e43eebeb7d9f366da3495b38b6b97..1cbb1c3ddf45cd6d650ca274af4545f2d1c8a813 100644 +index f649b6cc5840a79c80217427abdadd889bf2738c..e26b1362899a9fad5e0e3a4e49acd98b67a4f03b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1198,6 +1198,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -83,10 +83,10 @@ index d6c319c1177e43eebeb7d9f366da3495b38b6b97..1cbb1c3ddf45cd6d650ca274af4545f2 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f699a03cb 100644 +index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b229cbf7541 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1027,6 +1027,7 @@ public class CraftWorld implements World { +@@ -1032,6 +1032,7 @@ public class CraftWorld implements World { for (Object o : world.entitiesById.values()) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -94,7 +94,7 @@ index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1046,6 +1047,7 @@ public class CraftWorld implements World { +@@ -1051,6 +1052,7 @@ public class CraftWorld implements World { for (Object o : world.entitiesById.values()) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -102,7 +102,7 @@ index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1072,6 +1074,7 @@ public class CraftWorld implements World { +@@ -1077,6 +1079,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { @@ -110,7 +110,7 @@ index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { -@@ -1095,6 +1098,7 @@ public class CraftWorld implements World { +@@ -1100,6 +1103,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { diff --git a/Spigot-Server-Patches/0259-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0259-Add-hand-to-bucket-events.patch index efbd0f4a52..45dd481ca3 100644 --- a/Spigot-Server-Patches/0259-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0259-Add-hand-to-bucket-events.patch @@ -73,7 +73,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd int i = blockposition.getX(); int j = blockposition.getY(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 20a13b80e5df99c549b55d3cbddbe13f730f7cdf..ec77151d0dde422024ae5226ad7e3fb18c08f7c0 100644 +index 26669ded3ec47d13e4e79d65d0f05a588f9e1f63..d6bce67fff263d2c04be29020a8dc66fa260a53e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -218,6 +218,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -95,10 +95,10 @@ index 20a13b80e5df99c549b55d3cbddbe13f730f7cdf..ec77151d0dde422024ae5226ad7e3fb1 public boolean s_() { return this.isClientSide; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1cbb1c3ddf45cd6d650ca274af4545f2d1c8a813..f047f07e768b77feb469c69166f36a3f6779f561 100644 +index e26b1362899a9fad5e0e3a4e49acd98b67a4f03b..f9d2228fb0543c60d2e0848afb4f927b6a7bce51 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1536,15 +1536,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1547,15 +1547,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition, f)); } @@ -126,10 +126,10 @@ index 1cbb1c3ddf45cd6d650ca274af4545f2d1c8a813..f047f07e768b77feb469c69166f36a3f public float v() { return this.worldData.d(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index e762a20c92a990ecc08e8bd4fe65b80b5913587e..42ffb557ac121ebf9404c02696231ef4e7117c92 100644 +index 0d0140c1b132a4c569e34781264cdea8b6d555b2..10e967e15048d4040005a6b6b31cc27c0397e1b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -232,7 +232,7 @@ public class CraftEventFactory { +@@ -226,7 +226,7 @@ public class CraftEventFactory { public static Entity entityDamage; // For use in EntityDamageByEntityEvent // helper methods @@ -138,7 +138,7 @@ index e762a20c92a990ecc08e8bd4fe65b80b5913587e..42ffb557ac121ebf9404c02696231ef4 int spawnSize = Bukkit.getServer().getSpawnRadius(); if (world.getDimensionKey() != World.OVERWORLD) return true; -@@ -411,6 +411,20 @@ public class CraftEventFactory { +@@ -405,6 +405,20 @@ public class CraftEventFactory { } private static PlayerEvent getPlayerBucketEvent(boolean isFilling, WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) { @@ -159,7 +159,7 @@ index e762a20c92a990ecc08e8bd4fe65b80b5913587e..42ffb557ac121ebf9404c02696231ef4 Player player = (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item); Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem()); -@@ -423,10 +437,10 @@ public class CraftEventFactory { +@@ -417,10 +431,10 @@ public class CraftEventFactory { PlayerEvent event; if (isFilling) { diff --git a/Spigot-Server-Patches/0262-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0262-Add-Early-Warning-Feature-to-WatchDog.patch index 7bed22203e..bdc4dd7be6 100644 --- a/Spigot-Server-Patches/0262-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0262-Add-Early-Warning-Feature-to-WatchDog.patch @@ -48,10 +48,10 @@ index 88b45c8b4f58ee83d625408eae08aa329c87a6d4..d6d93c76f047573b3e7ea91409fb85e0 long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop lastTick = start - TICK_TIME; // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6..cb73b10ca46b6bb2080f4c76f48a2b9789408dc4 100644 +index ece800d6f7d156be97e3069f76df5d667b9ce94d..760c5d3b1e9aba0946937f7a9263dbd0c4e295a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -814,6 +814,7 @@ public final class CraftServer implements Server { +@@ -813,6 +813,7 @@ public final class CraftServer implements Server { @Override public void reload() { @@ -59,7 +59,7 @@ index 272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6..cb73b10ca46b6bb2080f4c76f48a2b97 reloadCount++; configuration = YamlConfiguration.loadConfiguration(getConfigFile()); commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile()); -@@ -932,6 +933,7 @@ public final class CraftServer implements Server { +@@ -931,6 +932,7 @@ public final class CraftServer implements Server { enablePlugins(PluginLoadOrder.STARTUP); enablePlugins(PluginLoadOrder.POSTWORLD); getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD)); diff --git a/Spigot-Server-Patches/0280-Improve-death-events.patch b/Spigot-Server-Patches/0280-Improve-death-events.patch index 7f20819a6c..3f1e0ee644 100644 --- a/Spigot-Server-Patches/0280-Improve-death-events.patch +++ b/Spigot-Server-Patches/0280-Improve-death-events.patch @@ -27,7 +27,7 @@ index 0790d45e3c8ac68c280b9378d93061b48b045639..a8054a599e3eb502e7bbce903b568398 int i = this.f ? 300 : 100; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 769fada8ffa657493e5d7bf025281ff5f9f4299f..c9f4dab524e8f2a80b9e3ee178c36b2e394b5f84 100644 +index 49c7b40744adcd36e5ae1eef026679e9b646feac..9b55635d97f8ad90f13fdf609471c1f73eb40aed 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1452,6 +1452,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -346,10 +346,10 @@ index 17ca2f9fbd9f43a9b39637d81e26c92ec00ed4d2..bb88a4a035dc7f56c9b0e81e5c613235 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 42ffb557ac121ebf9404c02696231ef4e7117c92..3719bf85502f8b0a44ea2044163df84f4273cbc2 100644 +index 10e967e15048d4040005a6b6b31cc27c0397e1b9..126f403c18b0ee4af727f325fae307086f289ced 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -789,9 +789,16 @@ public class CraftEventFactory { +@@ -783,9 +783,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -366,7 +366,7 @@ index 42ffb557ac121ebf9404c02696231ef4e7117c92..3719bf85502f8b0a44ea2044163df84f victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -807,8 +814,15 @@ public class CraftEventFactory { +@@ -801,8 +808,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -382,7 +382,7 @@ index 42ffb557ac121ebf9404c02696231ef4e7117c92..3719bf85502f8b0a44ea2044163df84f victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -825,6 +839,31 @@ public class CraftEventFactory { +@@ -819,6 +833,31 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0295-Add-sun-related-API.patch b/Spigot-Server-Patches/0295-Add-sun-related-API.patch index ab67adfd67..51b920af13 100644 --- a/Spigot-Server-Patches/0295-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0295-Add-sun-related-API.patch @@ -17,7 +17,7 @@ index fbecc8ccab47b428c43530ad344e325538cf242d..800a8dd2543f0b83eec67e7805104274 if (this.world.isDay() && !this.world.isClientSide) { float f = this.aR(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ab05cc8e4188fcdfcd77ee6c1f217d0fa170c941..7e08032c968bb8405591082193b03badbe872436 100644 +index bc10ccd76fcf3f03c23f52064c4db17bcad1c574..46a7e7b2f6079df036d2b73c82d7bf5ea1b07871 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -858,6 +858,13 @@ public class CraftWorld implements World { @@ -32,8 +32,8 @@ index ab05cc8e4188fcdfcd77ee6c1f217d0fa170c941..7e08032c968bb8405591082193b03bad + // Paper end + @Override - public boolean createExplosion(double x, double y, double z, float power) { - return createExplosion(x, y, z, power, false, true); + public long getGameTime() { + return world.worldData.getTime(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java index c89bc7024b650c3b6d2c551f0e4e156975570cca..eaad222fd38a4db4074db04c931bcff7a9ca5e24 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java diff --git a/Spigot-Server-Patches/0299-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0299-Add-Velocity-IP-Forwarding-Support.patch index 89a7a64c7e..97eb38ef0f 100644 --- a/Spigot-Server-Patches/0299-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0299-Add-Velocity-IP-Forwarding-Support.patch @@ -273,10 +273,10 @@ index b52e8b72eaee87e227b7cc2fd66101550262cb7e..990cfea6c2339cd3cf688e4645de76dc public void a(PacketDataSerializer packetdataserializer) throws IOException { this.a = packetdataserializer.i(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index cb73b10ca46b6bb2080f4c76f48a2b9789408dc4..1babfde50eee8d90cab8d8d0445d5dae7f5965bf 100644 +index 760c5d3b1e9aba0946937f7a9263dbd0c4e295a7..0463e546fba266df3984022e3e1122750fc9bb06 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -686,7 +686,7 @@ public final class CraftServer implements Server { +@@ -685,7 +685,7 @@ public final class CraftServer implements Server { @Override public long getConnectionThrottle() { // Spigot Start - Automatically set connection throttle for bungee configurations diff --git a/Spigot-Server-Patches/0313-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0313-Make-the-default-permission-message-configurable.patch index b7f00a99ff..436d14176e 100644 --- a/Spigot-Server-Patches/0313-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0313-Make-the-default-permission-message-configurable.patch @@ -29,10 +29,10 @@ index e8bade581ed391b25c592dbafb3fb3ccf72be616..053ba1023b6d1393c0ade589ae53feb2 Object val = config.get("settings.save-player-data"); if (val instanceof Boolean) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1babfde50eee8d90cab8d8d0445d5dae7f5965bf..53c26b5353e1114a63451af1a466978b094cf2dd 100644 +index 0463e546fba266df3984022e3e1122750fc9bb06..c9ce183a8acfda1c639e6d808e90936f5a8d35a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2334,6 +2334,11 @@ public final class CraftServer implements Server { +@@ -2335,6 +2335,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0317-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0317-Add-more-Zombie-API.patch index 4f5286f33a..01c228d71e 100644 --- a/Spigot-Server-Patches/0317-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0317-Add-more-Zombie-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73b76b0df1 100644 +index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8ebab11dce40 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster { @@ -29,7 +29,7 @@ index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73 public void startDrownedConversion(int i) { this.lastTick = MinecraftServer.currentTick; // CraftBukkit this.drownedConversionTime = i; -@@ -226,9 +233,16 @@ public class EntityZombie extends EntityMonster { +@@ -229,9 +236,16 @@ public class EntityZombie extends EntityMonster { } @@ -47,7 +47,7 @@ index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73 @Override public boolean damageEntity(DamageSource damagesource, float f) { -@@ -349,6 +363,7 @@ public class EntityZombie extends EntityMonster { +@@ -352,6 +366,7 @@ public class EntityZombie extends EntityMonster { nbttagcompound.setBoolean("CanBreakDoors", this.eU()); nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bt : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); @@ -55,7 +55,7 @@ index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73 } @Override -@@ -360,7 +375,11 @@ public class EntityZombie extends EntityMonster { +@@ -363,7 +378,11 @@ public class EntityZombie extends EntityMonster { if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) { this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime")); } diff --git a/Spigot-Server-Patches/0343-Optimize-Captured-TileEntity-Lookup.patch b/Spigot-Server-Patches/0343-Optimize-Captured-TileEntity-Lookup.patch index 146aefbed0..371675d5a9 100644 --- a/Spigot-Server-Patches/0343-Optimize-Captured-TileEntity-Lookup.patch +++ b/Spigot-Server-Patches/0343-Optimize-Captured-TileEntity-Lookup.patch @@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to just do a get call since the value can never be null. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 89bb995909882a4b35e2d07e5a47739c1d4f46f2..f96ddcba26155bf179489b9d856305b90d1ae014 100644 +index 6c0e179f4a6c14cf0cedc5a57e959d13a40ca42b..4c36abfa48b7f4fee2d118ff1d218f8ee5fbe007 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -909,12 +909,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -908,12 +908,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return null; } else { // CraftBukkit start diff --git a/Spigot-Server-Patches/0349-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0349-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 68da9cb0e1..fd06fd06a2 100644 --- a/Spigot-Server-Patches/0349-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0349-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -29,10 +29,10 @@ index c4f1fa6bd54a1928d163d83807f2823029db54e6..83a0dc052683ad2de6843d49d2e2a861 public boolean isDebugging() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 53c26b5353e1114a63451af1a466978b094cf2dd..1b420307af7c7c6764a93dd659d045f36e6ba3d9 100644 +index c9ce183a8acfda1c639e6d808e90936f5a8d35a8..f420f41742efbd4f7bf02067768178bd8288848f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1835,7 +1835,7 @@ public final class CraftServer implements Server { +@@ -1834,7 +1834,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { diff --git a/Spigot-Server-Patches/0351-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0351-Duplicate-UUID-Resolve-Option.patch index 7ebc5281fd..8e824f523e 100644 --- a/Spigot-Server-Patches/0351-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0351-Duplicate-UUID-Resolve-Option.patch @@ -81,10 +81,10 @@ index fbf3ccfb347a5ba6e895339e9576629d940d1aa4..38d25a12c6a52d8a83214e2a0f43a218 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index a35cd4df85f0043b83f2f70cec6091d6bae89767..714ef2a305fe98895ab5eb9190826bafbb157f59 100644 +index 3cb1ee261724e34a23c4a0f98673da1597786a01..b258d4a85c41c2de55a28c565766f57c3f1604ff 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -503,6 +503,7 @@ public class Chunk implements IChunkAccess { +@@ -504,6 +504,7 @@ public class Chunk implements IChunkAccess { if (i != this.loc.x || j != this.loc.z) { Chunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.loc.x, this.loc.z, entity); entity.dead = true; @@ -93,7 +93,7 @@ index a35cd4df85f0043b83f2f70cec6091d6bae89767..714ef2a305fe98895ab5eb9190826baf int k = MathHelper.floor(entity.locY() / 16.0D); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3ba1ca223f689960c637245e1873a4aaa8672a22..e8e6e3ed5fa5aed6160e667142a244a39078c479 100644 +index 1dbeda9fb385be29b3bb20c33a0487334c6e7c16..595adbeb253529720e72f695667d5bf9584ebaf0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2711,6 +2711,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -197,7 +197,7 @@ index 4bbcd00950405a4bf3ce391b557049a3b1d4aee8..2db0f3e060850ae65033f878ed46b678 ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); CompletableFuture, PlayerChunk.Failure>> completablefuture = this.a(chunkcoordintpair, 1, (i) -> { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 58c00add7c64c425150342c3840aa533b605ca7b..33e30ed20c99ab237f86c9d8746041a5b046bd42 100644 +index 676d160fe5132177a7d91cbf514a386607826964..628d1a5555ec70571c0467900c884cc419cbab37 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -4,6 +4,8 @@ import com.google.common.annotations.VisibleForTesting; diff --git a/Spigot-Server-Patches/0353-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0353-Configurable-Keep-Spawn-Loaded-range-per-world.patch index f36510674d..5060052491 100644 --- a/Spigot-Server-Patches/0353-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0353-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -117,10 +117,10 @@ index 3868572aed50c8bffd93727a139a3fbb8dc19688..ae77805f71c6c574d92f39c51b1e48f2 @Override public void a(ChunkCoordIntPair chunkcoordintpair) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 33e30ed20c99ab237f86c9d8746041a5b046bd42..ffc048415e7321353644e3bb89cf89f9365f3644 100644 +index 628d1a5555ec70571c0467900c884cc419cbab37..3a95b98b77171b4b18a1d939eb14953d24b903e0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1552,12 +1552,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1563,12 +1563,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { return ((PersistentIdCounts) this.getMinecraftServer().E().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a(); } @@ -213,10 +213,10 @@ index 33e30ed20c99ab237f86c9d8746041a5b046bd42..ffc048415e7321353644e3bb89cf89f9 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 91eaa1964666607ec628d857ae4be8f94d2f89aa..3c44de754e2ee4668060dbf6140db8a20cfaec42 100644 +index af411ac8fb378f7ead19b4f82f9709680e321dfd..d1fa8ebc9137e0d4917dc6b933b21588257d343e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1954,15 +1954,21 @@ public class CraftWorld implements World { +@@ -1959,15 +1959,21 @@ public class CraftWorld implements World { @Override public void setKeepSpawnInMemory(boolean keepLoaded) { diff --git a/Spigot-Server-Patches/0355-ChunkMapDistance-CME.patch b/Spigot-Server-Patches/0355-ChunkMapDistance-CME.patch index 35844e4919..f9d5c5905e 100644 --- a/Spigot-Server-Patches/0355-ChunkMapDistance-CME.patch +++ b/Spigot-Server-Patches/0355-ChunkMapDistance-CME.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ChunkMapDistance CME diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index cf68c9105084d1823b5fc76b3f472a0f8ecd9568..d15bf949671c9a533573278d573376282bfed8c8 100644 +index 3d359b6dcea28135105cf0b9c06c65797cf537bf..706ef10959df897a4b1889c2e2e7ff41ed924876 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -33,7 +33,16 @@ public abstract class ChunkMapDistance { @@ -60,7 +60,7 @@ index cf68c9105084d1823b5fc76b3f472a0f8ecd9568..d15bf949671c9a533573278d57337628 return true; } else { if (!this.l.isEmpty()) { -@@ -366,7 +363,7 @@ public abstract class ChunkMapDistance { +@@ -367,7 +364,7 @@ public abstract class ChunkMapDistance { ObjectIterator objectiterator = this.a.long2ByteEntrySet().iterator(); while (objectiterator.hasNext()) { @@ -70,7 +70,7 @@ index cf68c9105084d1823b5fc76b3f472a0f8ecd9568..d15bf949671c9a533573278d57337628 long j = it_unimi_dsi_fastutil_longs_long2bytemap_entry.getLongKey(); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 7b4717ffc31bc406c04d98207a15804502bd3579..f6b83ced48aa649bbd58a9b8a8dfe460b961bc22 100644 +index 985fc002fa5afc71ecd242aa8101684b2c751b30..eefd94ef237657625f2e7b19099d802e7680b50a 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -20,6 +20,7 @@ public class PlayerChunk { diff --git a/Spigot-Server-Patches/0359-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0359-Fix-World-isChunkGenerated-calls.patch index 40602ff652..868f93ca02 100644 --- a/Spigot-Server-Patches/0359-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0359-Fix-World-isChunkGenerated-calls.patch @@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that its only purpose is to cache the status on DISK) diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 534bcc215b0efb8561f7489f01fe49d34cba4c4f..c4909536af2af2949a6e7ee8f72f39a6622911f5 100644 +index af597b8b3157ac76456f8575a8f85a48fb0f45cd..d340990000144d9500069824e7e6609400a54ece 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -30,7 +30,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -20,7 +20,7 @@ index 534bcc215b0efb8561f7489f01fe49d34cba4c4f..c4909536af2af2949a6e7ee8f72f39a6 public final PlayerChunkMap playerChunkMap; private final WorldPersistentData worldPersistentData; private long lastTickTime; -@@ -287,6 +287,21 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -295,6 +295,21 @@ public class ChunkProviderServer extends IChunkProvider { return ret; } @@ -108,10 +108,10 @@ index 2fde0b6ca8f38a998ac73b68be61fbfea9088cee..fa03834dacacf7ae6a326c88007256a2 @Nullable private PersistentStructureLegacy c; diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 2c73bc1151d5d87ce6eac3f778ebff9c555b0212..346bf40bbf3026d3bf5585f06f42eec6cae95704 100644 +index b7af53dbf3139d7d51069e11388b945785cb47f6..2d749c07b159604e1ab904e026adf326eb9a732e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -113,6 +113,19 @@ public class PlayerChunk { +@@ -117,6 +117,19 @@ public class PlayerChunk { Either either = (Either) statusFuture.getNow(null); return either == null ? null : (Chunk) either.left().orElse(null); } @@ -277,7 +277,7 @@ index de926992e20da3ec433f9c7b4bc73805fd9d36ab..7a15944926427eb6cad976daabe5e710 } catch (Throwable throwable1) { throwable = throwable1; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3c44de754e2ee4668060dbf6140db8a20cfaec42..7603250799196c04c61e76418c747b8ac86a8bf7 100644 +index d1fa8ebc9137e0d4917dc6b933b21588257d343e..32c4b0089bc4ab1351e74e04b4e07c79beb9e328 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -19,6 +19,7 @@ import java.util.Objects; diff --git a/Spigot-Server-Patches/0362-incremental-chunk-saving.patch b/Spigot-Server-Patches/0362-incremental-chunk-saving.patch index 2d0104733d..d98826c858 100644 --- a/Spigot-Server-Patches/0362-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0362-incremental-chunk-saving.patch @@ -29,7 +29,7 @@ index ffe9b1a63d78925e1d77b9e730aef42fed6d58fa..1278d09f70c1e97607ef20d87a178dc2 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 714ef2a305fe98895ab5eb9190826bafbb157f59..6b561332e89476dbecc0b2a044e8556c7fa70626 100644 +index b258d4a85c41c2de55a28c565766f57c3f1604ff..fa549cd2ab9d0665dc042f3d4e79e205eaf4da54 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -43,7 +43,7 @@ public class Chunk implements IChunkAccess { @@ -42,10 +42,10 @@ index 714ef2a305fe98895ab5eb9190826bafbb157f59..6b561332e89476dbecc0b2a044e8556c private long inhabitedTime; @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index c4909536af2af2949a6e7ee8f72f39a6622911f5..bd48c23890c1b28e9838612598a5e4bdcb83e8a0 100644 +index d340990000144d9500069824e7e6609400a54ece..71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -527,6 +527,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -535,6 +535,15 @@ public class ChunkProviderServer extends IChunkProvider { } // Paper - Timings } @@ -104,7 +104,7 @@ index 816ab7ac0485f3eb80d461711800e84129f50d64..cb551b24a103ff81459483d610509488 this.methodProfiler.enter("snooper"); if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 346bf40bbf3026d3bf5585f06f42eec6cae95704..5d736e4ca6098d97b6c16d2452066fbd35fe123c 100644 +index 2d749c07b159604e1ab904e026adf326eb9a732e..ad01b9333e73c8e4a7c848edc4ce252a51ea52b6 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -42,6 +42,9 @@ public class PlayerChunk { @@ -117,7 +117,7 @@ index 346bf40bbf3026d3bf5585f06f42eec6cae95704..5d736e4ca6098d97b6c16d2452066fbd public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; -@@ -393,7 +396,19 @@ public class PlayerChunk { +@@ -397,7 +400,19 @@ public class PlayerChunk { boolean flag2 = playerchunk_state.isAtLeast(PlayerChunk.State.BORDER); boolean flag3 = playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER); @@ -137,7 +137,7 @@ index 346bf40bbf3026d3bf5585f06f42eec6cae95704..5d736e4ca6098d97b6c16d2452066fbd if (!flag2 && flag3) { // Paper start - cache ticking ready status int expectCreateCount = ++this.fullChunkCreateCount; -@@ -513,8 +528,32 @@ public class PlayerChunk { +@@ -517,8 +532,32 @@ public class PlayerChunk { } public void m() { @@ -265,7 +265,7 @@ index d8bedba819fa9ee0a4d3bdfbf0b010da7144dd68..c4ed4d58f7b344626acb13baeb142889 return PlayerChunk.getChunkState(playerchunk.getTicketLevel()); }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ffc048415e7321353644e3bb89cf89f9365f3644..d43fe3564be139a935303a62047a8d74fd3b8d1f 100644 +index 3a95b98b77171b4b18a1d939eb14953d24b903e0..3f97befa2742a575b103b68b19fc6415bfbd8c04 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -776,11 +776,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0366-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0366-Mark-entities-as-being-ticked-when-notifying-navigat.patch index 8b8044209c..1309794f71 100644 --- a/Spigot-Server-Patches/0366-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0366-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Mark entities as being ticked when notifying navigation diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b3af14ed0364e1b2e68656884dff678309498f03..a468398008c176c67ead844e21b0dbf6cc4a9bf7 100644 +index 5ce589e38f924c1a60597589ea12d15dbc2a479c..6f9c3f913b2afbde3b5e285ffb9ee49017fa5464 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1364,6 +1364,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -16,7 +16,7 @@ index b3af14ed0364e1b2e68656884dff678309498f03..a468398008c176c67ead844e21b0dbf6 Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { -@@ -1374,6 +1375,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1385,6 +1386,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0368-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0368-Avoid-hopper-searches-if-there-are-no-items.patch index ec836b8e81..c8c1bfae8b 100644 --- a/Spigot-Server-Patches/0368-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0368-Avoid-hopper-searches-if-there-are-no-items.patch @@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a8910760b80b 100644 +index 6763ecaf5f814302c310f29e3a5a42fc1312a990..0601e9cdeb33dec82642ee9fbfaac1712bd0fae9 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -85,6 +85,10 @@ public class Chunk implements IChunkAccess { @@ -28,7 +28,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891 // Paper end public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList ticklist, TickList ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer consumer) { -@@ -543,6 +547,13 @@ public class Chunk implements IChunkAccess { +@@ -544,6 +548,13 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.loc.z; this.entities.add(entity); // Paper - per chunk entity list this.entitySlices[k].add(entity); @@ -42,7 +42,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891 entity.entitySlice = this.entitySlices[k]; // Paper this.markDirty(); // Paper } -@@ -575,6 +586,11 @@ public class Chunk implements IChunkAccess { +@@ -577,6 +588,11 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } @@ -54,7 +54,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891 entityCounts.decrement(entity.getMinecraftKeyString()); this.markDirty(); // Paper // Paper end -@@ -860,6 +876,14 @@ public class Chunk implements IChunkAccess { +@@ -862,6 +878,14 @@ public class Chunk implements IChunkAccess { for (int k = i; k <= j; ++k) { Iterator iterator = this.entitySlices[k].iterator(); // Spigot @@ -69,7 +69,7 @@ index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a891 while (iterator.hasNext()) { T entity = (T) iterator.next(); // CraftBukkit - decompile error if (entity.shouldBeRemoved) continue; // Paper -@@ -880,9 +904,29 @@ public class Chunk implements IChunkAccess { +@@ -882,9 +906,29 @@ public class Chunk implements IChunkAccess { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); diff --git a/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch index bec85bd518..9ed1b3447c 100644 --- a/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch @@ -2308,10 +2308,10 @@ index 0000000000000000000000000000000000000000..49a594e5f345096cb3b9913b8ee27607 + +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788241e09b4 100644 +index 71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87..03e59fd8dc339f3479243acb5d1c89883b280b68 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -302,11 +302,138 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -310,11 +310,138 @@ public class ChunkProviderServer extends IChunkProvider { return playerChunk.getAvailableChunkNow(); } @@ -2450,7 +2450,7 @@ index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788 if (Thread.currentThread() != this.serverThread) { return (IChunkAccess) CompletableFuture.supplyAsync(() -> { return this.getChunkAt(i, j, chunkstatus, flag); -@@ -329,11 +456,16 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -337,11 +464,16 @@ public class ChunkProviderServer extends IChunkProvider { } gameprofilerfiller.c("getChunkCacheMiss"); @@ -2468,7 +2468,7 @@ index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788 this.world.timings.syncChunkLoad.stopTiming(); // Paper } // Paper ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { -@@ -399,6 +531,11 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -407,6 +539,11 @@ public class ChunkProviderServer extends IChunkProvider { } private CompletableFuture> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) { @@ -2480,7 +2480,7 @@ index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788 ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); long k = chunkcoordintpair.pair(); int l = 33 + ChunkStatus.a(chunkstatus); -@@ -798,11 +935,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -806,11 +943,12 @@ public class ChunkProviderServer extends IChunkProvider { protected boolean executeNext() { // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task try { @@ -3010,10 +3010,10 @@ index 4c52c57c02571353f71772e3650932f314da62ca..71daa0cb08d69c16bded510d1a490534 @Override diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 5d736e4ca6098d97b6c16d2452066fbd35fe123c..a1341617ba5388d1d1f2c91ad158b0210b4505cb 100644 +index ad01b9333e73c8e4a7c848edc4ce252a51ea52b6..25f8febe63167349460e32c831088bb80b6b77ad 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -129,6 +129,18 @@ public class PlayerChunk { +@@ -133,6 +133,18 @@ public class PlayerChunk { } return null; } @@ -3032,7 +3032,7 @@ index 5d736e4ca6098d97b6c16d2452066fbd35fe123c..a1341617ba5388d1d1f2c91ad158b021 // Paper end public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { -@@ -347,7 +359,7 @@ public class PlayerChunk { +@@ -351,7 +363,7 @@ public class PlayerChunk { ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel); ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel); boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET; @@ -3041,7 +3041,7 @@ index 5d736e4ca6098d97b6c16d2452066fbd35fe123c..a1341617ba5388d1d1f2c91ad158b021 PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel); PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel); // CraftBukkit start -@@ -383,6 +395,12 @@ public class PlayerChunk { +@@ -387,6 +399,12 @@ public class PlayerChunk { } }); @@ -3910,7 +3910,7 @@ index d6aca683465c6898536507fab9e6888fef2e77e5..b926cebd053bef829517c9d9bbf1c609 HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a468398008c176c67ead844e21b0dbf6cc4a9bf7..f9d3e7a774f6621cb8608d3dfa8676c3d13a174f 100644 +index 6f9c3f913b2afbde3b5e285ffb9ee49017fa5464..85c9943a32f21e338daa295d5034af379edb8ddd 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -98,6 +98,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -4002,7 +4002,7 @@ index a468398008c176c67ead844e21b0dbf6cc4a9bf7..f9d3e7a774f6621cb8608d3dfa8676c3 } // CraftBukkit start -@@ -1621,7 +1696,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1632,7 +1707,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { } MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> { @@ -4015,7 +4015,7 @@ index a468398008c176c67ead844e21b0dbf6cc4a9bf7..f9d3e7a774f6621cb8608d3dfa8676c3 } public void removeTicketsForSpawn(int radiusInBlocks, BlockPosition spawn) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7603250799196c04c61e76418c747b8ac86a8bf7..fdef41cd64f18e145b042d887ea7d382283576fd 100644 +index 32c4b0089bc4ab1351e74e04b4e07c79beb9e328..83d1c748c0dd3004c4a479ca58f634d6a9b6faf4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -75,6 +75,7 @@ import net.minecraft.server.IBlockData; @@ -4058,7 +4058,7 @@ index 7603250799196c04c61e76418c747b8ac86a8bf7..fdef41cd64f18e145b042d887ea7d382 // fall through to load // we do this so we do not re-read the chunk data on disk -@@ -2484,6 +2486,34 @@ public class CraftWorld implements World { +@@ -2489,6 +2491,34 @@ public class CraftWorld implements World { public DragonBattle getEnderDragonBattle() { return (getHandle().getDragonBattle() == null) ? null : new CraftDragonBattle(getHandle().getDragonBattle()); } diff --git a/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch index 62737182fc..e054871c33 100644 --- a/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch @@ -21,7 +21,7 @@ index ba1046999ec48ed49de52be4d7b6d9893033a8d5..71b92f99f0148849acc733005aa90234 return; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218 100644 +index 16bc226dfef36b5f96d95f2de4c6bc2e6e606332..c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -104,6 +104,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -38,7 +38,7 @@ index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4 public ResourceKey getTypeKey() { return typeKey; } -@@ -1003,14 +1010,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1002,14 +1009,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public boolean p(BlockPosition blockposition) { @@ -55,7 +55,7 @@ index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4 return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity, enumdirection); } -@@ -1131,7 +1138,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1130,7 +1137,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -65,7 +65,7 @@ index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4 if (chunk != null) { chunk.a(oclass, axisalignedbb, list, predicate); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f9d3e7a774f6621cb8608d3dfa8676c3d13a174f..d3130ff85d90a8fb197c9917b66174389659e3bf 100644 +index 85c9943a32f21e338daa295d5034af379edb8ddd..f599d607afd73e30008e54757502077d783636a1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -95,7 +95,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -78,10 +78,10 @@ index f9d3e7a774f6621cb8608d3dfa8676c3d13a174f..d3130ff85d90a8fb197c9917b6617438 // Paper start - Asynchronous IO diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 78f0fb5d97b077673ec542cd70bbc3ffa13f916c..b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77 100644 +index d44ef056bdab3bcff39aea45b40a4c7e9c62398f..797e579afdbc77a8dc5fc4cdf5874e546922fbfa 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -143,9 +143,10 @@ public class ActivationRange +@@ -141,9 +141,10 @@ public class ActivationRange { for ( int j1 = k; j1 <= l; ++j1 ) { diff --git a/Spigot-Server-Patches/0371-Reduce-sync-loads.patch b/Spigot-Server-Patches/0371-Reduce-sync-loads.patch index 4b3fae6c9a..0b99c5b44b 100644 --- a/Spigot-Server-Patches/0371-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0371-Reduce-sync-loads.patch @@ -286,10 +286,10 @@ index 0000000000000000000000000000000000000000..1a68a8012f83bab9e814159c76b8c371 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 77e17feb56cc28e763640b2e37f66788241e09b4..2eb38bfcdc0c232da9dad6921df503e5a11de09f 100644 +index 03e59fd8dc339f3479243acb5d1c89883b280b68..070c3a842ebd9fa03e5daaee8355775718df6fb2 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -463,6 +463,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -471,6 +471,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY); com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z); // Paper end @@ -298,10 +298,10 @@ index 77e17feb56cc28e763640b2e37f66788241e09b4..2eb38bfcdc0c232da9dad6921df503e5 this.serverThreadQueue.awaitTasks(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb1bf40581 100644 +index c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715..dcca5257a03b6fe32ffcd6528e505762b7b4a3e7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1071,7 +1071,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1070,7 +1070,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 <= j; ++i1) { for (int j1 = k; j1 <= l; ++j1) { @@ -310,7 +310,7 @@ index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb if (chunk != null) { chunk.a(entity, axisalignedbb, list, predicate); -@@ -1092,7 +1092,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1091,7 +1091,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -319,7 +319,7 @@ index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb if (chunk != null) { chunk.a(entitytypes, axisalignedbb, list, predicate); -@@ -1115,7 +1115,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1114,7 +1114,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -329,7 +329,7 @@ index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb if (chunk != null) { chunk.a(oclass, axisalignedbb, list, predicate); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d3130ff85d90a8fb197c9917b66174389659e3bf..0d8ef258422c0aaba31afbecf4bee6da7678259a 100644 +index f599d607afd73e30008e54757502077d783636a1..6646b8e83c8658fa6cd4838ccd669fd4a280e2e8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -170,6 +170,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0375-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0375-implement-optional-per-player-mob-spawns.patch index 7dca6f4a2f..ba580937c0 100644 --- a/Spigot-Server-Patches/0375-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0375-implement-optional-per-player-mob-spawns.patch @@ -545,10 +545,10 @@ index 0000000000000000000000000000000000000000..4f13d3ff8391793a99f067189f854078 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 2eb38bfcdc0c232da9dad6921df503e5a11de09f..2fad6a79ee977c2712c55433bde8eca524d09ba7 100644 +index 070c3a842ebd9fa03e5daaee8355775718df6fb2..1eb201695cd118616fb404a0c7ed8cedee77db89 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -736,7 +736,22 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -744,7 +744,22 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().enter("naturalSpawnCount"); this.world.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.chunkMapDistance.b(); diff --git a/Spigot-Server-Patches/0381-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0381-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch index 19c1af4579..732fa76568 100644 --- a/Spigot-Server-Patches/0381-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch +++ b/Spigot-Server-Patches/0381-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index fdef41cd64f18e145b042d887ea7d382283576fd..e612d6528e1e73e774c742e763cbd3e5c28b87db 100644 +index 83d1c748c0dd3004c4a479ca58f634d6a9b6faf4..6ddfeea46997907f1dd666000c7cc2eb27cd4398 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1875,7 +1875,12 @@ public class CraftWorld implements World { +@@ -1880,7 +1880,12 @@ public class CraftWorld implements World { height = 9; } diff --git a/Spigot-Server-Patches/0382-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0382-Expose-the-internal-current-tick.patch index fdb5a1ddd4..e95856f6f6 100644 --- a/Spigot-Server-Patches/0382-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0382-Expose-the-internal-current-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1b420307af7c7c6764a93dd659d045f36e6ba3d9..e0f4dc286893fcb37b75e0982a3d2b0d57953943 100644 +index f420f41742efbd4f7bf02067768178bd8288848f..80e917d7154ed8cafd308440c66ae16fb782dd35 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2357,5 +2357,10 @@ public final class CraftServer implements Server { +@@ -2358,5 +2358,10 @@ public final class CraftServer implements Server { } return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name); } diff --git a/Spigot-Server-Patches/0390-Optimize-Hoppers.patch b/Spigot-Server-Patches/0390-Optimize-Hoppers.patch index a679c33d13..d4f864b58e 100644 --- a/Spigot-Server-Patches/0390-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0390-Optimize-Hoppers.patch @@ -485,10 +485,10 @@ index d9be182a574daaedcc7a106c759c2bde2e4eb19a..c6df2318762dc6542e73f18ed9a3172e } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 16e2f0e9580486337b8bc060d4b088bb1bf40581..2fa1cd43a8a7b083cd1522c32716d21dee922c46 100644 +index dcca5257a03b6fe32ffcd6528e505762b7b4a3e7..1dca840322990c996ed6eac49792529f60058a6f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1103,8 +1103,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1102,8 +1102,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return list; } diff --git a/Spigot-Server-Patches/0401-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0401-Tracking-Range-Improvements.patch index ac1d81ca1d..f2071060ce 100644 --- a/Spigot-Server-Patches/0401-Tracking-Range-Improvements.patch +++ b/Spigot-Server-Patches/0401-Tracking-Range-Improvements.patch @@ -20,7 +20,7 @@ index a167696d2fc3cb69b9eaa720c5904762e073008b..74df45e6c3f86736f7d136cf6fd911d5 if (j > i) { i = j; diff --git a/src/main/java/org/spigotmc/TrackingRange.java b/src/main/java/org/spigotmc/TrackingRange.java -index 6f8e6c1d079f82d7706d0b4f710bfb9b50e209d9..03990231a8b6bc6925f054e9033825316abfafcc 100644 +index 646811932e9703510679080dd93586a3389aace9..03990231a8b6bc6925f054e9033825316abfafcc 100644 --- a/src/main/java/org/spigotmc/TrackingRange.java +++ b/src/main/java/org/spigotmc/TrackingRange.java @@ -1,6 +1,8 @@ @@ -36,7 +36,7 @@ index 6f8e6c1d079f82d7706d0b4f710bfb9b50e209d9..03990231a8b6bc6925f054e903382531 if ( entity instanceof EntityPlayer ) { return config.playerTrackingRange; -- } else if ( entity.activationType == ActivationRange.ActivationType.MONSTER || entity.activationType == ActivationRange.ActivationType.RAIDER ) +- } else if ( entity.activationType == ActivationRange.ActivationType.MONSTER || entity.activationType == ActivationRange.ActivationType.RAIDER ) - { - return config.monsterTrackingRange; - } else if ( entity instanceof EntityGhast ) diff --git a/Spigot-Server-Patches/0402-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0402-Entity-Activation-Range-2.0.patch index 7cbca4dec7..fa3d6755d1 100644 --- a/Spigot-Server-Patches/0402-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0402-Entity-Activation-Range-2.0.patch @@ -14,7 +14,7 @@ Adds flying monsters to control ghast and phantoms Adds villagers as separate config diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e8e6e3ed5fa5aed6160e667142a244a39078c479..2b06163358827e0773969226d8f77e6e0ba0ca3d 100644 +index 595adbeb253529720e72f695667d5bf9584ebaf0..09e33261f4fe7ed1b68f6954202b359e9d6d9928 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -163,7 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -332,7 +332,7 @@ index 182cd7e9110408fff9909ef362d368d055a2b167..f3df10587e652d3a26d15deb09304b97 return this.c; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2fa1cd43a8a7b083cd1522c32716d21dee922c46..6a067e4db344ca5fc446650722db7118fa5127a2 100644 +index 1dca840322990c996ed6eac49792529f60058a6f..c9c5c0b6f8837001db0b38dabfba7e01bc6de6db 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -82,6 +82,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -349,7 +349,7 @@ index 2fa1cd43a8a7b083cd1522c32716d21dee922c46..6a067e4db344ca5fc446650722db7118 public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 15d68e08a51ae83ae4a8031f47d512b7c89deae0..7d17623989cb601a99195d6d1b0c6c2b29fd3c3f 100644 +index e6f4b677632f50efa90ebfbb5a04e444f6d9182a..4688b302eaeb42b406a0690f48d97d8cb78e3528 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -747,17 +747,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -440,13 +440,14 @@ index 15d68e08a51ae83ae4a8031f47d512b7c89deae0..7d17623989cb601a99195d6d1b0c6c2b } } else { diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d70afea8d5 100644 +index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..a87cec0b391dfe54f70be9e27723f04f149cfadd 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -2,24 +2,34 @@ package org.spigotmc; +@@ -1,24 +1,35 @@ + package org.spigotmc; import java.util.Collection; - import java.util.List; ++import java.util.List; + +import net.minecraft.server.Activity; import net.minecraft.server.AxisAlignedBB; @@ -478,7 +479,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 import net.minecraft.server.EntityProjectile; import net.minecraft.server.EntityRaider; import net.minecraft.server.EntitySheep; -@@ -29,16 +39,26 @@ import net.minecraft.server.EntityTNTPrimed; +@@ -27,16 +38,26 @@ import net.minecraft.server.EntityTNTPrimed; import net.minecraft.server.EntityThrownTrident; import net.minecraft.server.EntityVillager; import net.minecraft.server.EntityWither; @@ -505,7 +506,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 MONSTER, ANIMAL, RAIDER, -@@ -46,6 +66,43 @@ public class ActivationRange +@@ -44,6 +65,43 @@ public class ActivationRange AxisAlignedBB boundingBox = new AxisAlignedBB( 0, 0, 0, 0, 0, 0 ); } @@ -549,7 +550,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 static AxisAlignedBB maxBB = new AxisAlignedBB( 0, 0, 0, 0, 0, 0 ); -@@ -58,10 +115,13 @@ public class ActivationRange +@@ -56,10 +114,13 @@ public class ActivationRange */ public static ActivationType initializeEntityActivationType(Entity entity) { @@ -564,7 +565,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 { return ActivationType.MONSTER; } else if ( entity instanceof EntityCreature || entity instanceof EntityAmbient ) -@@ -82,10 +142,14 @@ public class ActivationRange +@@ -80,10 +141,14 @@ public class ActivationRange */ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) { @@ -583,7 +584,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 || entity instanceof EntityHuman || entity instanceof EntityProjectile || entity instanceof EntityEnderDragon -@@ -118,10 +182,25 @@ public class ActivationRange +@@ -116,10 +181,25 @@ public class ActivationRange final int raiderActivationRange = world.spigotConfig.raiderActivationRange; final int animalActivationRange = world.spigotConfig.animalActivationRange; final int monsterActivationRange = world.spigotConfig.monsterActivationRange; @@ -609,7 +610,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange ); for ( EntityHuman player : world.getPlayers() ) -@@ -133,6 +212,11 @@ public class ActivationRange +@@ -131,6 +211,11 @@ public class ActivationRange ActivationType.RAIDER.boundingBox = player.getBoundingBox().grow( raiderActivationRange, 256, raiderActivationRange ); ActivationType.ANIMAL.boundingBox = player.getBoundingBox().grow( animalActivationRange, 256, animalActivationRange ); ActivationType.MONSTER.boundingBox = player.getBoundingBox().grow( monsterActivationRange, 256, monsterActivationRange ); @@ -621,7 +622,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 int i = MathHelper.floor( maxBB.minX / 16.0D ); int j = MathHelper.floor( maxBB.maxX / 16.0D ); -@@ -143,7 +227,7 @@ public class ActivationRange +@@ -141,7 +226,7 @@ public class ActivationRange { for ( int j1 = k; j1 <= l; ++j1 ) { @@ -630,11 +631,11 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 if ( chunk != null ) { activateChunkEntities( chunk ); -@@ -161,19 +245,15 @@ public class ActivationRange +@@ -159,19 +244,15 @@ public class ActivationRange */ private static void activateChunkEntities(Chunk chunk) { -- for ( List slice : chunk.entitySlices ) +- for ( java.util.List slice : chunk.entitySlices ) - { - for ( Entity entity : (Collection) slice ) + // Paper start @@ -658,7 +659,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 entity.activatedTick = MinecraftServer.currentTick; } } -@@ -188,56 +268,105 @@ public class ActivationRange +@@ -186,56 +267,105 @@ public class ActivationRange * @param entity * @return */ @@ -780,7 +781,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 } /** -@@ -252,8 +381,19 @@ public class ActivationRange +@@ -250,8 +380,19 @@ public class ActivationRange if ( !entity.inChunk || entity instanceof EntityFireworks ) { return true; } @@ -801,7 +802,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 // Should this entity tick? if ( !isActive ) -@@ -261,15 +401,19 @@ public class ActivationRange +@@ -259,15 +400,19 @@ public class ActivationRange if ( ( MinecraftServer.currentTick - entity.activatedTick - 1 ) % 20 == 0 ) { // Check immunities every 20 ticks. @@ -827,7 +828,7 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d7 isActive = false; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index f0ad5fa235adfd165b8e56be7352568a3b3ae54a..9859e0c964e4d1e7dc7689cb97f40643a8e5cdd7 100644 +index 34ee684901906fc2ef5f0d09680d2686b813e52b..6b015c1f26facb4e82d75b252164dec05731ca6c 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -180,13 +180,59 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0405-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0405-Optimise-getChunkAt-calls-for-loaded-chunks.patch index c4713f719c..9c88237f66 100644 --- a/Spigot-Server-Patches/0405-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0405-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 2fad6a79ee977c2712c55433bde8eca524d09ba7..37ea114deba56efa6692a5e2290c2ef2d4d70ec8 100644 +index 1eb201695cd118616fb404a0c7ed8cedee77db89..e0296920a794157d89bb314b162de706d69a5459 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -439,6 +439,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -447,6 +447,12 @@ public class ChunkProviderServer extends IChunkProvider { return this.getChunkAt(i, j, chunkstatus, flag); }, this.serverThreadQueue).join(); } else { @@ -23,7 +23,7 @@ index 2fad6a79ee977c2712c55433bde8eca524d09ba7..37ea114deba56efa6692a5e2290c2ef2 GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); gameprofilerfiller.c("getChunk"); -@@ -489,39 +495,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -497,39 +503,7 @@ public class ChunkProviderServer extends IChunkProvider { if (Thread.currentThread() != this.serverThread) { return null; } else { diff --git a/Spigot-Server-Patches/0408-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0408-Optimise-random-block-ticking.patch index a73154f8e2..b70a2b64e6 100644 --- a/Spigot-Server-Patches/0408-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0408-Optimise-random-block-ticking.patch @@ -83,10 +83,10 @@ index f068436960c96b0df427bcdf337a4dcc6a9f66f5..253423acc3c3697a5e47136f34da9261 return this.d(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 08d122f7f20e3c2cdfeababb41b0a8910760b80b..81504bfbbd4a987c95f35d0f25754dbf8b2487e4 100644 +index 0601e9cdeb33dec82642ee9fbfaac1712bd0fae9..49bcd959206eeb21ff743f827a076b0c4cd3c722 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -597,8 +597,8 @@ public class Chunk implements IChunkAccess { +@@ -599,8 +599,8 @@ public class Chunk implements IChunkAccess { this.entities.remove(entity); // Paper } @@ -243,10 +243,10 @@ index fa8eab20bb839c53bf7989d02d2274f835002609..4ad393bc99881d813e2b349fb929fc8e public BlockPosition getHomePos() { // Paper - public diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6a067e4db344ca5fc446650722db7118fa5127a2..a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37 100644 +index c9c5c0b6f8837001db0b38dabfba7e01bc6de6db..4da88ce31cfb8baa6fa68c0115edadac0c5b2fba 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1413,10 +1413,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1412,10 +1412,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public abstract ITagRegistry p(); public BlockPosition a(int i, int j, int k, int l) { @@ -267,7 +267,7 @@ index 6a067e4db344ca5fc446650722db7118fa5127a2..a6a16f72b49a8a641dbb8ab580ecd9d6 public boolean isSavingDisabled() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7d17623989cb601a99195d6d1b0c6c2b29fd3c3f..91e8dceec2d3aa8bb072b3d2f80953dc9af470b4 100644 +index 4688b302eaeb42b406a0690f48d97d8cb78e3528..640ae46d754f4af09ef3a404860b6b3db7d63a1a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -561,7 +561,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0412-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-Server-Patches/0412-add-hand-to-BlockMultiPlaceEvent.patch index eb794a0fcc..e8e04a66d9 100644 --- a/Spigot-Server-Patches/0412-add-hand-to-BlockMultiPlaceEvent.patch +++ b/Spigot-Server-Patches/0412-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3719bf85502f8b0a44ea2044163df84f4273cbc2..6234baf6abea43cd054630fb029f0cd40350c723 100644 +index 126f403c18b0ee4af727f325fae307086f289ced..42226525fb61abec501d80251cb4cbe0dfeb5015 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -334,13 +334,18 @@ public class CraftEventFactory { +@@ -328,13 +328,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/Spigot-Server-Patches/0416-Configurable-chance-of-villager-zombie-infection.patch b/Spigot-Server-Patches/0416-Configurable-chance-of-villager-zombie-infection.patch index 046a44c9dc..341a5ca810 100644 --- a/Spigot-Server-Patches/0416-Configurable-chance-of-villager-zombie-infection.patch +++ b/Spigot-Server-Patches/0416-Configurable-chance-of-villager-zombie-infection.patch @@ -22,10 +22,10 @@ index fe1c9dd8258ec8c3fdf343d4a44de2be2ae3d35f..525d702d78a609af987ebd2c32169b87 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 05d7b7a67bfc117a91903db5f303587a4f8f8624..f390abf65d648e1e0697e2d802f3195a0241116e 100644 +index b7dc265ea684b71cc94e9a0542dad484864c0e30..360f14a3128f9a4c31fadb5a6f245d15845c8ae0 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -386,10 +386,14 @@ public class EntityZombie extends EntityMonster { +@@ -389,10 +389,14 @@ public class EntityZombie extends EntityMonster { @Override public void a(WorldServer worldserver, EntityLiving entityliving) { super.a(worldserver, entityliving); diff --git a/Spigot-Server-Patches/0418-Optimise-TickListServer-by-rewriting-it.patch b/Spigot-Server-Patches/0418-Optimise-TickListServer-by-rewriting-it.patch index 1bbfbf7268..e6b5c373e4 100644 --- a/Spigot-Server-Patches/0418-Optimise-TickListServer-by-rewriting-it.patch +++ b/Spigot-Server-Patches/0418-Optimise-TickListServer-by-rewriting-it.patch @@ -901,7 +901,7 @@ index 253423acc3c3697a5e47136f34da92617e719753..52ae74571b0d671a294900caedaa400b return this.b(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 37ea114deba56efa6692a5e2290c2ef2d4d70ec8..6d1744bbe6af33180fb814a99c041edad9d44aeb 100644 +index e0296920a794157d89bb314b162de706d69a5459..1f4776f6f2debb4e000440ed8e47e3e063202850 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -194,6 +194,13 @@ public class ChunkProviderServer extends IChunkProvider { @@ -990,10 +990,10 @@ index 33cfeabdee03195a294f303f28044a313cb1c4ed..2287e47d1b891135a5f2579ec324c705 public String toString() { return this.e + ": " + this.a + ", " + this.b + ", " + this.c + ", " + this.f; diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index a1341617ba5388d1d1f2c91ad158b0210b4505cb..3cdfb6cddf4b998ee48df64fd884a85237004b63 100644 +index 25f8febe63167349460e32c831088bb80b6b77ad..5305da4c7253c7e259d7b08e9722145188adc513 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -467,7 +467,9 @@ public class PlayerChunk { +@@ -471,7 +471,9 @@ public class PlayerChunk { PlayerChunk.this.isTickingReady = true; @@ -1191,7 +1191,7 @@ index 3b8f56c0f0507ebdd9ac20be70688b4c0cfe4cf8..3e148b7e99554a1abe257dd3c9acafb9 } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 91e8dceec2d3aa8bb072b3d2f80953dc9af470b4..fb9c55a864ce3fd646e9576b2feede70ab759bbc 100644 +index 640ae46d754f4af09ef3a404860b6b3db7d63a1a..e0be5975ddeb5116f16696b2ca0d067146b00cf4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -186,6 +186,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0421-Fix-unregistering-entities-from-unloading-chunks.patch b/Spigot-Server-Patches/0421-Fix-unregistering-entities-from-unloading-chunks.patch index d1f6dbd738..34a39f5621 100644 --- a/Spigot-Server-Patches/0421-Fix-unregistering-entities-from-unloading-chunks.patch +++ b/Spigot-Server-Patches/0421-Fix-unregistering-entities-from-unloading-chunks.patch @@ -15,14 +15,14 @@ Combine that with a buggy detail of the previous implementation of the Dupe UUID patch, then this was the likely source of the "Ghost entities" diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 95b25bb17d9d4b025047b01909a880da26e59146..0543f5f30340e367511ec282ea67b611168c6000 100644 +index 69060be0daf3fbae2763852209c915be59caac4f..cd04994ed38c7f5d4db6b1ef1796f95ef2c490e1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1451,9 +1451,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } private void removeEntityFromChunk(Entity entity) { -- IChunkAccess ichunkaccess = this.getChunkAt(entity.chunkX, entity.chunkZ, ChunkStatus.FULL, false); +- IChunkAccess ichunkaccess = chunkProvider.getChunkUnchecked(entity.chunkX, entity.chunkZ); // CraftBukkit - SPIGOT-5228: getChunkAt won't find the entity's chunk if it has already been unloaded (i.e. if it switched to state INACCESSIBLE). + Chunk ichunkaccess = entity.getCurrentChunk(); // Paper - getChunkAt(x,z,full,false) is broken by CraftBukkit as it won't return an unloading chunk. Use our current chunk reference as this points to what chunk they need to be removed from anyways - if (ichunkaccess instanceof Chunk) { diff --git a/Spigot-Server-Patches/0428-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0428-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 9e836b2b24..4cfa7e701f 100644 --- a/Spigot-Server-Patches/0428-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0428-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f6ff4d8132a95895680f5bc81f8f873e + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 6d1744bbe6af33180fb814a99c041edad9d44aeb..44aa6baed64a0d3847cd8df067e0fa32a0739c93 100644 +index 1f4776f6f2debb4e000440ed8e47e3e063202850..475e35a5d3f25929e60ef34d7f41e2db193443ef 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -748,7 +748,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end @@ -243,7 +243,7 @@ index 21dfbbdbe72a7562601e23384e2fec8f9393ef29..87de764f74e8174da4c1a28238375caa while (objectbidirectionaliterator.hasNext()) { Entry entry = (Entry) objectbidirectionaliterator.next(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e612d6528e1e73e774c742e763cbd3e5c28b87db..8f221c3b4c4cc9b5dea9938d868a2a036854d6e3 100644 +index 6ddfeea46997907f1dd666000c7cc2eb27cd4398..756c675939c5f5835736e6b8c42ae20941712c49 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -74,6 +74,7 @@ import net.minecraft.server.GroupDataEntity; diff --git a/Spigot-Server-Patches/0430-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/0430-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index 25b2eb8718..174a182b53 100644 --- a/Spigot-Server-Patches/0430-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/Spigot-Server-Patches/0430-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -56,10 +56,10 @@ index 519b43154993ec01eb13a58336ddcc745362892f..63b3726bfdd22900e7bc577c34db58dd + } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76bec3c3d80 100644 +index 475e35a5d3f25929e60ef34d7f41e2db193443ef..1f63cdd9588a8dda1f04154f4d9de21fd8224678 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -686,6 +686,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -694,6 +694,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().enter("purge"); this.world.timings.doChunkMap.startTiming(); // Spigot this.chunkMapDistance.purgeTickets(); @@ -67,7 +67,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.getMethodProfiler().exitEnter("chunks"); -@@ -695,6 +696,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -703,6 +704,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.getMethodProfiler().exitEnter("unload"); this.playerChunkMap.unloadChunks(booleansupplier); @@ -75,7 +75,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b this.world.timings.doChunkUnload.stopTiming(); // Spigot this.world.getMethodProfiler().exit(); this.clearCache(); -@@ -748,7 +750,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -756,7 +758,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end @@ -84,7 +84,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); if (optional.isPresent()) { -@@ -772,6 +774,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -780,6 +782,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.timings.chunkTicks.startTiming(); // Spigot // Paper this.world.a(chunk, k); this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper @@ -92,7 +92,7 @@ index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76b } } } -@@ -928,6 +931,41 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider { super.executeTask(runnable); } @@ -226,7 +226,7 @@ index 96a784744110e7dd4939eb2c1b57346a2d60f983..77a91fa0549d5db12e8a9fa9b51a34a2 // Spigot Start CrashReport crashreport; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d018cbee11356110aace897b1dd4516dd3ca5b61..1096ecf62127ad92dfed3872dbf6053c13975c94 100644 +index cbfe3cc34922c4dffb3dea5a279970072de1daae..7230432a67b0d07bcd40352ce510ce80517dd9b6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -457,6 +457,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0432-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0432-Add-tick-times-API-and-mspt-command.patch index ac49389ffd..6d15f02935 100644 --- a/Spigot-Server-Patches/0432-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0432-Add-tick-times-API-and-mspt-command.patch @@ -147,10 +147,10 @@ index 77a91fa0549d5db12e8a9fa9b51a34a258821e7b..a8fe6c5f99c2be9dc7fedb8dfa8b12e4 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e0f4dc286893fcb37b75e0982a3d2b0d57953943..7756b25f4b7e5aae7eb6f3e8b347db4d531589f4 100644 +index 80e917d7154ed8cafd308440c66ae16fb782dd35..255ab2909440a7daeae756fc2e3d21ff71f7a551 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2197,6 +2197,16 @@ public final class CraftServer implements Server { +@@ -2196,6 +2196,16 @@ public final class CraftServer implements Server { net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() }; } @@ -166,4 +166,4 @@ index e0f4dc286893fcb37b75e0982a3d2b0d57953943..7756b25f4b7e5aae7eb6f3e8b347db4d + } // Paper end - private final Spigot spigot = new Spigot() + // Spigot start diff --git a/Spigot-Server-Patches/0433-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0433-Expose-MinecraftServer-isRunning.patch index db798b7f33..08c13fb302 100644 --- a/Spigot-Server-Patches/0433-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-Server-Patches/0433-Expose-MinecraftServer-isRunning.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7756b25f4b7e5aae7eb6f3e8b347db4d531589f4..fa96805c33ab16fe3a8ffbc5e5b1a4517269dd41 100644 +index 255ab2909440a7daeae756fc2e3d21ff71f7a551..fafe6354fa73d1f11d30be88bd4ff4354bbbb016 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2372,5 +2372,10 @@ public final class CraftServer implements Server { +@@ -2373,5 +2373,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } diff --git a/Spigot-Server-Patches/0438-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0438-Improved-Watchdog-Support.patch index 9c6e691ea5..45912b0ce1 100644 --- a/Spigot-Server-Patches/0438-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0438-Improved-Watchdog-Support.patch @@ -312,7 +312,7 @@ index 1fe1df445ba56b2f176ee25502a774aa0a7bd00b..916a6a1fc1ccc73e4fb974ad77310d16 a(SystemUtils.e); a(SystemUtils.f); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37..a50b647631eae271380728c890ad3ff67f56bcbe 100644 +index 4da88ce31cfb8baa6fa68c0115edadac0c5b2fba..d26fd68b2abd4907138ce77a6e6bb45c9af4af02 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -798,6 +798,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -323,7 +323,7 @@ index a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37..a50b647631eae271380728c890ad3ff6 // Paper start - Prevent tile entity and entity crashes String msg = "TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ(); System.err.println(msg); -@@ -873,6 +874,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -872,6 +873,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { consumer.accept(entity); } catch (Throwable throwable) { @@ -332,7 +332,7 @@ index a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37..a50b647631eae271380728c890ad3ff6 String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ(); System.err.println(msg); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1c1dceb98413ccb24e3111435119b3b8c1b760c4..5d299a65417ff17eae3dfe52841c1a27a6d75677 100644 +index 3c72c156ca488e14604cb0db5f1ac4e068776066..e0f66718f3700f5f4bdb77178e05ca3fc95829e8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -65,7 +65,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -345,10 +345,10 @@ index 1c1dceb98413ccb24e3111435119b3b8c1b760c4..5d299a65417ff17eae3dfe52841c1a27 List afterEntityTickingTasks = Lists.newArrayList(); public void doIfNotEntityTicking(java.lang.Runnable run) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fa96805c33ab16fe3a8ffbc5e5b1a4517269dd41..9cb68bc8be2256244e7908cf76183d11f3b1a58b 100644 +index fafe6354fa73d1f11d30be88bd4ff4354bbbb016..7630a7fc347f6add6e628093c1f149ee01d05264 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1835,7 +1835,7 @@ public final class CraftServer implements Server { +@@ -1834,7 +1834,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { diff --git a/Spigot-Server-Patches/0443-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0443-Prevent-opening-inventories-when-frozen.patch index cbd789508f..7060346cf8 100644 --- a/Spigot-Server-Patches/0443-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0443-Prevent-opening-inventories-when-frozen.patch @@ -36,10 +36,10 @@ index 950a16e8aafe71b54b4ba46b61b5d71f8aa3cf94..a417971c0cd6e381078d5ed41508ac10 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 38c0d54fcb084bb102ee004cc8987c8358b5a2ac..c6564ccfd6580ac5691dd864602eb6fbaf4a34be 100644 +index 7b6ae7ef90c3df27a6ae43bc393b2d1d9a866143..9e9e5118cbdc02b9171bbccb1b29990c11d7cb5f 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 { +@@ -321,7 +321,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 @@ -48,7 +48,7 @@ index 38c0d54fcb084bb102ee004cc8987c8358b5a2ac..c6564ccfd6580ac5691dd864602eb6fb getHandle().activeContainer = container; getHandle().activeContainer.addSlotListener(player); } -@@ -396,7 +396,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -395,7 +395,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/Spigot-Server-Patches/0446-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0446-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch index 4a101e9eaa..f88136b208 100644 --- a/Spigot-Server-Patches/0446-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch +++ b/Spigot-Server-Patches/0446-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch @@ -9,10 +9,10 @@ so inline where possible, and avoid the abstraction of the Either class. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index cc7691a2ed5eaa30071ad5e385bbd76bec3c3d80..106a0e3b7bf3ee563b45a67db25a07114da2cf42 100644 +index 1f63cdd9588a8dda1f04154f4d9de21fd8224678..174fc04e8cf5bd481b2f3d4e07031dab9ae66d86 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -610,21 +610,29 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -618,21 +618,29 @@ public class ChunkProviderServer extends IChunkProvider { public final boolean isInEntityTickingChunk(Entity entity) { return this.a(entity); } // Paper - OBFHELPER @Override public boolean a(Entity entity) { diff --git a/Spigot-Server-Patches/0449-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0449-Fix-Chunk-Post-Processing-deadlock-risk.patch index 173bccbbbf..4f7d805a7c 100644 --- a/Spigot-Server-Patches/0449-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/Spigot-Server-Patches/0449-Fix-Chunk-Post-Processing-deadlock-risk.patch @@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash for heightmaps. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 106a0e3b7bf3ee563b45a67db25a07114da2cf42..f7355ca6d75c783b663b027efc2ccf6c07e6191d 100644 +index 174fc04e8cf5bd481b2f3d4e07031dab9ae66d86..75500aaae0dc44f0da3b4d5ed94da6fef9f96c38 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -986,6 +986,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -994,6 +994,7 @@ public class ChunkProviderServer extends IChunkProvider { return super.executeNext() || execChunkTask; // Paper } } finally { diff --git a/Spigot-Server-Patches/0450-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/Spigot-Server-Patches/0450-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch index e52d3ea2bf..7fde62fb0c 100644 --- a/Spigot-Server-Patches/0450-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch +++ b/Spigot-Server-Patches/0450-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch @@ -7,12 +7,12 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from I suspect it deals with teleporting as it uses players current x/y/z diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index d15bf949671c9a533573278d573376282bfed8c8..275c2b23b4d1ff09ee2b1823d0780700f773659e 100644 +index 706ef10959df897a4b1889c2e2e7ff41ed924876..52a69edcefb72a3908ecd522ef87e7eb989467a6 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -238,8 +238,8 @@ public abstract class ChunkMapDistance { - long i = sectionposition.r().pair(); +@@ -239,8 +239,8 @@ public abstract class ChunkMapDistance { ObjectSet objectset = (ObjectSet) this.c.get(i); + if (objectset == null) return; // CraftBukkit - SPIGOT-6208 - objectset.remove(entityplayer); - if (objectset.isEmpty()) { diff --git a/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch index 2371316689..318824fe15 100644 --- a/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Load Chunks for Login Asynchronously diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index f7355ca6d75c783b663b027efc2ccf6c07e6191d..6bcca8f1ddfd4886b6795a1856ec196e8aa61299 100644 +index 75500aaae0dc44f0da3b4d5ed94da6fef9f96c38..322d0a7d127878ba49362454808b82172acf1600 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -596,7 +596,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -604,7 +604,7 @@ public class ChunkProviderServer extends IChunkProvider { return this.serverThreadQueue.executeNext(); } @@ -18,7 +18,7 @@ index f7355ca6d75c783b663b027efc2ccf6c07e6191d..6bcca8f1ddfd4886b6795a1856ec196e boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3dc33c26150af672df19e3f78572e74ce65bdc79..9fa4425dc0e308f3cce06cb8ca5b02a08e505176 100644 +index 7da08dd7c2396ae1048d857bfae4fee2a9f3b4d9..1ed26fa55b149e3717cf190abde8f865a4c076eb 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1283,7 +1283,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0459-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0459-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 3ef386eda7..42bfc165aa 100644 --- a/Spigot-Server-Patches/0459-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0459-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d88470e6dc0316d0a5f5a50a9644d71aedadee6e..273f9c19768916a86968e02e653754c55317e663 100644 +index e4422d7cd70410e50ee9e86d3c832f7df65197df..894ef285638acbae9b340bd6e4511e7143c6999d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1880,11 +1880,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -102,10 +102,10 @@ index cd50fe3616d4b33c7ad76458fb75683541c33ae5..97425f38ac05c24433dc27c5cda74c36 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6234baf6abea43cd054630fb029f0cd40350c723..661f66f4ba2273c4c88c38de431543a1e2d7fa0a 100644 +index 42226525fb61abec501d80251cb4cbe0dfeb5015..cdcb20b322fdad0bc90b9f433b5102c9f72da4df 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -809,7 +809,8 @@ public class CraftEventFactory { +@@ -803,7 +803,8 @@ public class CraftEventFactory { for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { if (stack == null || stack.getType() == Material.AIR || stack.getAmount() == 0) continue; diff --git a/Spigot-Server-Patches/0463-Expose-game-version.patch b/Spigot-Server-Patches/0463-Expose-game-version.patch index a79faac0c9..7b239b5c79 100644 --- a/Spigot-Server-Patches/0463-Expose-game-version.patch +++ b/Spigot-Server-Patches/0463-Expose-game-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9cb68bc8be2256244e7908cf76183d11f3b1a58b..2d6637b6fc3286516224f8da0d4760433fb61a1b 100644 +index 7630a7fc347f6add6e628093c1f149ee01d05264..d0091fb05a0122e099d4d496f3e04a91b778cff2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -519,6 +519,13 @@ public final class CraftServer implements Server { +@@ -518,6 +518,13 @@ public final class CraftServer implements Server { return bukkitVersion; } diff --git a/Spigot-Server-Patches/0466-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0466-Implement-Mob-Goal-API.patch index 392e8a9fea..55435f07e3 100644 --- a/Spigot-Server-Patches/0466-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0466-Implement-Mob-Goal-API.patch @@ -873,10 +873,10 @@ index 22773eca7561d39cd838338efe6d40ab9421feba..2e56fcc32f914d2b5f4bb9d368f504f4 public PathfinderGoalWrapped(int i, PathfinderGoal pathfindergoal) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2d6637b6fc3286516224f8da0d4760433fb61a1b..8e691e594dd0b8fcd5e7fc83cf3562f0d17e18ce 100644 +index d0091fb05a0122e099d4d496f3e04a91b778cff2..e466dd5077fbae6963783774cb7a32b0bbca41ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2384,5 +2384,11 @@ public final class CraftServer implements Server { +@@ -2385,5 +2385,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/Spigot-Server-Patches/0468-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0468-Optimize-isOutsideRange-to-use-distance-maps.patch index dbac4b7b10..9cae5592c0 100644 --- a/Spigot-Server-Patches/0468-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0468-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize isOutsideRange to use distance maps Use a distance map to find the players in range quickly diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 275c2b23b4d1ff09ee2b1823d0780700f773659e..ef61f8e784b7ebd26293d627e8b8e1aef1be6e21 100644 +index 52a69edcefb72a3908ecd522ef87e7eb989467a6..126eae36dc99c29b0d15be26bd68f00fe7e563fe 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -31,7 +31,7 @@ public abstract class ChunkMapDistance { @@ -45,7 +45,7 @@ index 275c2b23b4d1ff09ee2b1823d0780700f773659e..ef61f8e784b7ebd26293d627e8b8e1ae this.g.update(i, 0, true); } -@@ -241,7 +243,7 @@ public abstract class ChunkMapDistance { +@@ -242,7 +244,7 @@ public abstract class ChunkMapDistance { if (objectset != null) objectset.remove(entityplayer); // Paper - some state corruption happens here, don't crash, clean up gracefully. if (objectset == null || objectset.isEmpty()) { // Paper this.c.remove(i); @@ -54,7 +54,7 @@ index 275c2b23b4d1ff09ee2b1823d0780700f773659e..ef61f8e784b7ebd26293d627e8b8e1ae this.g.update(i, Integer.MAX_VALUE, false); } -@@ -265,13 +267,17 @@ public abstract class ChunkMapDistance { +@@ -266,13 +268,17 @@ public abstract class ChunkMapDistance { } public int b() { @@ -77,10 +77,10 @@ index 275c2b23b4d1ff09ee2b1823d0780700f773659e..ef61f8e784b7ebd26293d627e8b8e1ae public String c() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 6bcca8f1ddfd4886b6795a1856ec196e8aa61299..dfd85fc1573338e333831e96d3d8845a21d48224 100644 +index 322d0a7d127878ba49362454808b82172acf1600..5c092243e3e6f069f9ab6799de56dd60499b3b53 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -720,6 +720,37 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -728,6 +728,37 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit if (!flag) { @@ -118,7 +118,7 @@ index 6bcca8f1ddfd4886b6795a1856ec196e8aa61299..dfd85fc1573338e333831e96d3d8845a this.world.getMethodProfiler().enter("pollingChunks"); int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit -@@ -749,15 +780,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -757,15 +788,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper //Collections.shuffle(list); // Paper @@ -135,7 +135,7 @@ index 6bcca8f1ddfd4886b6795a1856ec196e8aa61299..dfd85fc1573338e333831e96d3d8845a final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -773,9 +796,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -781,9 +804,9 @@ public class ChunkProviderServer extends IChunkProvider { Chunk chunk = (Chunk) optional1.get(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); @@ -161,7 +161,7 @@ index e364576955ce033f732bc9348ab653c5db71487f..ba24a1a98eb6082af337bce77ab72245 super(worldserver, worldserver.getSpawn(), worldserver.v(), gameprofile); this.spawnDimension = World.OVERWORLD; diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 3cdfb6cddf4b998ee48df64fd884a85237004b63..6bf27c8baf82cfc98158550f711414d9c8fb476b 100644 +index 5305da4c7253c7e259d7b08e9722145188adc513..7413e3dbaacc288a29d9499242cb8563b4169fd9 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -45,6 +45,18 @@ public class PlayerChunk { diff --git a/Spigot-Server-Patches/0470-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0470-No-Tick-view-distance-implementation.patch index e7e2d7bf87..f850f6df02 100644 --- a/Spigot-Server-Patches/0470-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0470-No-Tick-view-distance-implementation.patch @@ -37,7 +37,7 @@ index 46ac6d91422423f1e03b86d3efa3241f2599000d..6463d3e4837d032a35654a035f42b8a8 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8e91a0270a7a72f09dfc86331a788765de1f9f5e..544f4a473d1453e029111bea45483543e3bcbabb 100644 +index 63de4bba14df9bc33ce04fff5bc0baede6fad6f7..0347dca5d2e40ba078d3f256e17f69ee7f0265cc 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -202,7 +202,51 @@ public class Chunk implements IChunkAccess { @@ -92,7 +92,7 @@ index 8e91a0270a7a72f09dfc86331a788765de1f9f5e..544f4a473d1453e029111bea45483543 } public final boolean isAnyNeighborsLoaded() { -@@ -1089,7 +1133,7 @@ public class Chunk implements IChunkAccess { +@@ -1091,7 +1135,7 @@ public class Chunk implements IChunkAccess { IBlockData iblockdata = this.getType(blockposition); IBlockData iblockdata1 = Block.b(iblockdata, (GeneratorAccess) this.world, blockposition); @@ -102,10 +102,10 @@ index 8e91a0270a7a72f09dfc86331a788765de1f9f5e..544f4a473d1453e029111bea45483543 this.n[i].clear(); diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index ef61f8e784b7ebd26293d627e8b8e1aef1be6e21..03b1a67aaf3ed75b7669a3157847affd678f8df4 100644 +index 126eae36dc99c29b0d15be26bd68f00fe7e563fe..6ebc4a4b5c90d8592a017e7b29dec5ca00827432 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -262,7 +262,7 @@ public abstract class ChunkMapDistance { +@@ -263,7 +263,7 @@ public abstract class ChunkMapDistance { return s; } @@ -114,7 +114,7 @@ index ef61f8e784b7ebd26293d627e8b8e1aef1be6e21..03b1a67aaf3ed75b7669a3157847affd this.g.a(i); } -@@ -381,7 +381,7 @@ public abstract class ChunkMapDistance { +@@ -382,7 +382,7 @@ public abstract class ChunkMapDistance { private void a(long i, int j, boolean flag, boolean flag1) { if (flag != flag1) { @@ -151,7 +151,7 @@ index df3150072fd36dac28d83309e50342c9cfa326b3..0b5ddff008d151ad03a1f382a8f24494 worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange); worldData.addProperty("visible-chunk-count", visibleChunks.size()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 6bf27c8baf82cfc98158550f711414d9c8fb476b..20ee3d33eac121df3a5f85a9a19c21cf75961aa0 100644 +index 7413e3dbaacc288a29d9499242cb8563b4169fd9..825c3c522b0497499b72cb9f2ff3edb39d8fea08 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -57,6 +57,18 @@ public class PlayerChunk { @@ -173,7 +173,7 @@ index 6bf27c8baf82cfc98158550f711414d9c8fb476b..20ee3d33eac121df3a5f85a9a19c21cf public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; -@@ -212,7 +224,7 @@ public class PlayerChunk { +@@ -216,7 +228,7 @@ public class PlayerChunk { } public void a(BlockPosition blockposition) { @@ -182,7 +182,7 @@ index 6bf27c8baf82cfc98158550f711414d9c8fb476b..20ee3d33eac121df3a5f85a9a19c21cf if (chunk != null) { byte b0 = (byte) SectionPosition.a(blockposition.getY()); -@@ -228,7 +240,7 @@ public class PlayerChunk { +@@ -232,7 +244,7 @@ public class PlayerChunk { } public void a(EnumSkyBlock enumskyblock, int i) { @@ -191,7 +191,7 @@ index 6bf27c8baf82cfc98158550f711414d9c8fb476b..20ee3d33eac121df3a5f85a9a19c21cf if (chunk != null) { chunk.setNeedsSaving(true); -@@ -310,9 +322,48 @@ public class PlayerChunk { +@@ -314,9 +326,48 @@ public class PlayerChunk { } private void a(Packet packet, boolean flag) { @@ -608,7 +608,7 @@ index dce3ec8c9cb0ebbf1c2a87cb3225fca95f120314..778ceccf4c0ee6c56ead351ea9d4688d while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a50b647631eae271380728c890ad3ff67f56bcbe..8198962c05fe83fd2ff0401c35f4976eb6e6680b 100644 +index d26fd68b2abd4907138ce77a6e6bb45c9af4af02..b5127f4b2deaa70b411991d78657f0c9e73d9e43 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -465,8 +465,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -627,10 +627,10 @@ index a50b647631eae271380728c890ad3ff67f56bcbe..8198962c05fe83fd2ff0401c35f4976e if ((i & 1) != 0) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8f221c3b4c4cc9b5dea9938d868a2a036854d6e3..48dc8ed1294ac53216d7014b0b3130acb8e5b328 100644 +index 756c675939c5f5835736e6b8c42ae20941712c49..b55523c573d1d44e84a7a63502473dc33eb1538c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2535,10 +2535,39 @@ public class CraftWorld implements World { +@@ -2540,10 +2540,39 @@ public class CraftWorld implements World { // Spigot start @Override public int getViewDistance() { @@ -672,10 +672,10 @@ index 8f221c3b4c4cc9b5dea9938d868a2a036854d6e3..48dc8ed1294ac53216d7014b0b3130ac private final Spigot spigot = new Spigot() { diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 9030284ba06dfdcc17c2710f428e84d70afea8d5..0b93635ba59df4eb4456a97c5e9b51ab5aeda53f 100644 +index a87cec0b391dfe54f70be9e27723f04f149cfadd..18295dceeacefd2586f3e3fe8bd58790740ba14d 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -201,7 +201,7 @@ public class ActivationRange +@@ -200,7 +200,7 @@ public class ActivationRange maxRange = Math.max( maxRange, waterActivationRange ); maxRange = Math.max( maxRange, villagerActivationRange ); // Paper end diff --git a/Spigot-Server-Patches/0472-Fix-Light-Command.patch b/Spigot-Server-Patches/0472-Fix-Light-Command.patch index ee31926774..191e3cb778 100644 --- a/Spigot-Server-Patches/0472-Fix-Light-Command.patch +++ b/Spigot-Server-Patches/0472-Fix-Light-Command.patch @@ -124,10 +124,10 @@ index c80af89b4ad0223577ed9513dcab0a784cc964e4..f60800c3bc06a38493e17b00b815f18c if (!SyncLoadFinder.ENABLED) { sender.sendMessage(ChatColor.RED + "This command requires the server startup flag '-Dpaper.debug-sync-loads=true' to be set."); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 20ee3d33eac121df3a5f85a9a19c21cf75961aa0..1536d9661837e76fc23131ecd974f699048cc9ae 100644 +index 825c3c522b0497499b72cb9f2ff3edb39d8fea08..f3d5ea4672f950bd5c52b718f2e1e0280175ccb9 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -321,6 +321,7 @@ public class PlayerChunk { +@@ -325,6 +325,7 @@ public class PlayerChunk { } diff --git a/Spigot-Server-Patches/0475-Potential-bed-API.patch b/Spigot-Server-Patches/0475-Potential-bed-API.patch index 994ace6167..3911e4310a 100644 --- a/Spigot-Server-Patches/0475-Potential-bed-API.patch +++ b/Spigot-Server-Patches/0475-Potential-bed-API.patch @@ -8,10 +8,10 @@ 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 c6564ccfd6580ac5691dd864602eb6fbaf4a34be..f8be287a5c5e273eb71896c16064b1fd085faf7e 100644 +index 9e9e5118cbdc02b9171bbccb1b29990c11d7cb5f..bc1f8a0470e4720ff60f5b9c6f1c4172d903d15a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -127,6 +127,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -126,6 +126,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return getHandle().sleepTicks; } diff --git a/Spigot-Server-Patches/0476-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0476-Wait-for-Async-Tasks-during-shutdown.patch index eb4b4c6309..8e99058403 100644 --- a/Spigot-Server-Patches/0476-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0476-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,10 +22,10 @@ index 6fd956cbbb4fddc4294ff03976e66d93c1b086c7..d0ce4b96174f85c545a457fe864c7eba // CraftBukkit end if (this.getServerConnection() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8e691e594dd0b8fcd5e7fc83cf3562f0d17e18ce..9a2bc062dd0c05adf0de2f3534293fe4e4943ceb 100644 +index e466dd5077fbae6963783774cb7a32b0bbca41ac..6744d56a99d2187fcb742820c9d23158507a4dce 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -943,6 +943,35 @@ public final class CraftServer implements Server { +@@ -942,6 +942,35 @@ public final class CraftServer implements Server { org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload } diff --git a/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index f8cc477ea1..800ce7a010 100644 --- a/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -90,7 +90,7 @@ index b12e43ed13a1a9d7d418831b8988c30a242cb5c4..dcaf9f8574a9c913b64ba3a1d8b02220 return new BlockPosition(this.d(), 0, this.e()); } diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 03b1a67aaf3ed75b7669a3157847affd678f8df4..09fec533d7feebb90e989007dd19c952823550ba 100644 +index 6ebc4a4b5c90d8592a017e7b29dec5ca00827432..d0bdffadefa6ed67bd30d833891256cc39a8f7f0 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -23,6 +23,7 @@ import java.util.concurrent.Executor; @@ -307,7 +307,7 @@ index 03b1a67aaf3ed75b7669a3157847affd678f8df4..09fec533d7feebb90e989007dd19c952 public boolean addTicketAtLevel(TicketType ticketType, ChunkCoordIntPair chunkcoordintpair, int level, T identifier) { return this.addTicket(chunkcoordintpair.pair(), new Ticket<>(ticketType, level, identifier)); // CraftBukkit end -@@ -381,27 +520,50 @@ public abstract class ChunkMapDistance { +@@ -382,27 +521,50 @@ public abstract class ChunkMapDistance { private void a(long i, int j, boolean flag, boolean flag1) { if (flag != flag1) { @@ -364,7 +364,7 @@ index 03b1a67aaf3ed75b7669a3157847affd678f8df4..09fec533d7feebb90e989007dd19c952 }); }, i, true)); } -@@ -409,6 +571,101 @@ public abstract class ChunkMapDistance { +@@ -410,6 +572,101 @@ public abstract class ChunkMapDistance { } @@ -466,7 +466,7 @@ index 03b1a67aaf3ed75b7669a3157847affd678f8df4..09fec533d7feebb90e989007dd19c952 @Override public void a() { super.a(); -@@ -440,6 +697,7 @@ public abstract class ChunkMapDistance { +@@ -441,6 +698,7 @@ public abstract class ChunkMapDistance { } @@ -474,7 +474,7 @@ index 03b1a67aaf3ed75b7669a3157847affd678f8df4..09fec533d7feebb90e989007dd19c952 private boolean c(int i) { return i <= this.e - 2; } -@@ -456,6 +714,7 @@ public abstract class ChunkMapDistance { +@@ -457,6 +715,7 @@ public abstract class ChunkMapDistance { this.a.defaultReturnValue((byte) (i + 2)); } @@ -483,10 +483,10 @@ index 03b1a67aaf3ed75b7669a3157847affd678f8df4..09fec533d7feebb90e989007dd19c952 protected int c(long i) { return this.a.get(i); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index dfd85fc1573338e333831e96d3d8845a21d48224..35ac03c099f525c7cebe0d90ad2c665fc2637194 100644 +index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e541e6311 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -435,6 +435,26 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -443,6 +443,26 @@ public class ChunkProviderServer extends IChunkProvider { public void removeTicketAtLevel(TicketType ticketType, ChunkCoordIntPair chunkPos, int ticketLevel, T identifier) { this.chunkMapDistance.removeTicketAtLevel(ticketType, chunkPos, ticketLevel, identifier); } @@ -513,7 +513,7 @@ index dfd85fc1573338e333831e96d3d8845a21d48224..35ac03c099f525c7cebe0d90ad2c665f // Paper end @Nullable -@@ -473,6 +493,8 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -481,6 +501,8 @@ public class ChunkProviderServer extends IChunkProvider { if (!completablefuture.isDone()) { // Paper // Paper start - async chunk io/loading @@ -522,7 +522,7 @@ index dfd85fc1573338e333831e96d3d8845a21d48224..35ac03c099f525c7cebe0d90ad2c665f this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY); com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z); // Paper end -@@ -481,6 +503,8 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -489,6 +511,8 @@ public class ChunkProviderServer extends IChunkProvider { this.serverThreadQueue.awaitTasks(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug this.world.timings.syncChunkLoad.stopTiming(); // Paper @@ -531,7 +531,7 @@ index dfd85fc1573338e333831e96d3d8845a21d48224..35ac03c099f525c7cebe0d90ad2c665f } // Paper ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { return ichunkaccess1; -@@ -533,10 +557,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -541,10 +565,12 @@ public class ChunkProviderServer extends IChunkProvider { if (flag && !currentlyUnloading) { // CraftBukkit end this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair); @@ -544,7 +544,7 @@ index dfd85fc1573338e333831e96d3d8845a21d48224..35ac03c099f525c7cebe0d90ad2c665f this.tickDistanceManager(); playerchunk = this.getChunk(k); gameprofilerfiller.exit(); -@@ -545,8 +571,13 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -553,8 +579,13 @@ public class ChunkProviderServer extends IChunkProvider { } } } @@ -560,7 +560,7 @@ index dfd85fc1573338e333831e96d3d8845a21d48224..35ac03c099f525c7cebe0d90ad2c665f } private boolean a(@Nullable PlayerChunk playerchunk, int i) { -@@ -597,6 +628,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -605,6 +636,7 @@ public class ChunkProviderServer extends IChunkProvider { } public boolean tickDistanceManager() { // Paper - private -> public @@ -628,7 +628,7 @@ index 0b5ddff008d151ad03a1f382a8f24494356e8701..ff74be14512a947e81b62d53e616131c chunkData.addProperty("queued-for-unload", chunkMap.unloadQueue.contains(playerChunk.location.pair())); chunkData.addProperty("status", status == null ? "unloaded" : status.toString()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e544414d94b 100644 +index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9569784b4 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -1,6 +1,7 @@ @@ -779,7 +779,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); -@@ -166,6 +282,18 @@ public class PlayerChunk { +@@ -170,6 +286,18 @@ public class PlayerChunk { } return null; } @@ -798,7 +798,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 // Paper end public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { -@@ -412,6 +540,7 @@ public class PlayerChunk { +@@ -416,6 +544,7 @@ public class PlayerChunk { return this.n; } @@ -806,7 +806,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 private void d(int i) { this.n = i; } -@@ -430,7 +559,7 @@ public class PlayerChunk { +@@ -434,7 +563,7 @@ public class PlayerChunk { // CraftBukkit start // ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins. if (playerchunk_state.isAtLeast(PlayerChunk.State.BORDER) && !playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER)) { @@ -815,7 +815,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 Chunk chunk = (Chunk)either.left().orElse(null); if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { -@@ -495,12 +624,13 @@ public class PlayerChunk { +@@ -499,12 +628,13 @@ public class PlayerChunk { if (!flag2 && flag3) { // Paper start - cache ticking ready status int expectCreateCount = ++this.fullChunkCreateCount; @@ -830,7 +830,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 } -@@ -525,7 +655,7 @@ public class PlayerChunk { +@@ -529,7 +659,7 @@ public class PlayerChunk { if (!flag4 && flag5) { // Paper start - cache ticking ready status @@ -839,7 +839,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 if (either.left().isPresent()) { // note: Here is a very good place to add callbacks to logic waiting on this. Chunk tickingChunk = either.left().get(); -@@ -556,7 +686,7 @@ public class PlayerChunk { +@@ -560,7 +690,7 @@ public class PlayerChunk { } // Paper start - cache ticking ready status @@ -848,7 +848,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 if (either.left().isPresent()) { // note: Here is a very good place to add callbacks to logic waiting on this. Chunk entityTickingChunk = either.left().get(); -@@ -576,12 +706,29 @@ public class PlayerChunk { +@@ -580,12 +710,29 @@ public class PlayerChunk { this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; } @@ -880,7 +880,7 @@ index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e54 Chunk chunk = (Chunk)either.left().orElse(null); if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { -@@ -663,6 +810,7 @@ public class PlayerChunk { +@@ -667,6 +814,7 @@ public class PlayerChunk { public interface c { @@ -1222,10 +1222,10 @@ index d7b9d9fd3a3b607278a3d72b0b306b0be2aa30ad..6fd852db6bcfbfbf84ec2acf6d23b08a public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 48dc8ed1294ac53216d7014b0b3130acb8e5b328..560590c3c772eb91d562c622b627af36bf394609 100644 +index b55523c573d1d44e84a7a63502473dc33eb1538c..925aa6dddb4f572a05e7b5be5a0a201162b7b1eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2525,6 +2525,10 @@ public class CraftWorld implements World { +@@ -2530,6 +2530,10 @@ public class CraftWorld implements World { return future; } diff --git a/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch index 7bb82ae8c6..1b326599f2 100644 --- a/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch @@ -25,10 +25,10 @@ Massive update to light to improve performance and chunk loading/generation. 8) Fix NPE risk that crashes server in getting nibble data diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 35ac03c099f525c7cebe0d90ad2c665fc2637194..75d25576d68ec95a14372f8530f4916f2bd7c3c5 100644 +index 29ec0d9c5e10b19e07cf1ba3c848925e541e6311..12e417d2fe8e7f6a2f664ef916c141305ce1b29c 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1037,7 +1037,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -1045,7 +1045,7 @@ public class ChunkProviderServer extends IChunkProvider { if (ChunkProviderServer.this.tickDistanceManager()) { return true; } else { @@ -1329,10 +1329,10 @@ index ff00830b95a17f66d0c913087492dbf4b066df8a..4085426af03f032cf405bdfd1e40a8e5 private static final int nibbleBucketSizeMultiplier = Integer.getInteger("Paper.nibbleBucketSize", 3072); private static final int maxPoolSize = Integer.getInteger("Paper.maxNibblePoolSize", (int) Math.min(6, Math.max(1, Runtime.getRuntime().maxMemory() / 1024 / 1024 / 1024)) * (nibbleBucketSizeMultiplier * 8)); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 025ab54dddbf4ef80ce2253f9b6cabcb8e46bfd2..acb07a2a7a7606470aa938ffc8f6a54fd7b9f5f9 100644 +index 0799970f90527f97d64eb857a0b07990114c7ab2..afea606641c27e2ea8769455833b96e3f012e78e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -724,6 +724,7 @@ public class PlayerChunk { +@@ -728,6 +728,7 @@ public class PlayerChunk { ioPriority = com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGH_PRIORITY; } chunkMap.world.asyncChunkTaskManager.raisePriority(location.x, location.z, ioPriority); @@ -1400,7 +1400,7 @@ index b7af235dc2841dc9c8296805624f6ee763b86dfb..faf4745d368993ccdf0c017937efc5be this.a.a(t0); this.f(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index bb73dc2cfca633f85aa0aa1c988d3cdd86be8e4e..61eeba3c25fecfdebfeb546b7e18ff4464eedfc2 100644 +index 1a75e688d7bd6aa0c7d83574b07ab27960fcaf7a..d2edfc8053a3db0a8e27f408bd467b193d8f9d9c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -714,6 +714,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0495-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0495-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index a8d2e05833..3c37a1b7e6 100644 --- a/Spigot-Server-Patches/0495-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0495-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9a2bc062dd0c05adf0de2f3534293fe4e4943ceb..530d337e0d1350294aeab5d6fd043496276067bf 100644 +index 6744d56a99d2187fcb742820c9d23158507a4dce..64a2ab7a33342c7a60f0bc14dd9256ba1ed62666 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -347,7 +347,7 @@ public final class CraftServer implements Server { +@@ -346,7 +346,7 @@ public final class CraftServer implements Server { ambientSpawn = configuration.getInt("spawn-limits.ambient"); console.autosavePeriod = configuration.getInt("ticks-per.autosave"); warningState = WarningState.value(configuration.getString("settings.deprecated-verbose")); @@ -34,7 +34,7 @@ index 9a2bc062dd0c05adf0de2f3534293fe4e4943ceb..530d337e0d1350294aeab5d6fd043496 minimumAPI = configuration.getString("settings.minimum-api"); loadIcon(); } -@@ -838,7 +838,7 @@ public final class CraftServer implements Server { +@@ -837,7 +837,7 @@ public final class CraftServer implements Server { waterAmbientSpawn = configuration.getInt("spawn-limits.water-ambient"); ambientSpawn = configuration.getInt("spawn-limits.ambient"); warningState = WarningState.value(configuration.getString("settings.deprecated-verbose")); @@ -44,7 +44,7 @@ index 9a2bc062dd0c05adf0de2f3534293fe4e4943ceb..530d337e0d1350294aeab5d6fd043496 printSaveWarning = false; console.autosavePeriod = configuration.getInt("ticks-per.autosave"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 560590c3c772eb91d562c622b627af36bf394609..10697f8b5208a72bf3d7248c5abd73ddd10420cd 100644 +index 925aa6dddb4f572a05e7b5be5a0a201162b7b1eb..e32e972b00098bf1851b7974218c24eee55682d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -407,9 +407,22 @@ public class CraftWorld implements World { @@ -112,7 +112,7 @@ index 560590c3c772eb91d562c622b627af36bf394609..10697f8b5208a72bf3d7248c5abd73dd world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -2531,6 +2546,7 @@ public class CraftWorld implements World { +@@ -2536,6 +2551,7 @@ public class CraftWorld implements World { } return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> { net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); diff --git a/Spigot-Server-Patches/0524-Add-PrepareResultEvent.patch b/Spigot-Server-Patches/0524-Add-PrepareResultEvent.patch index 3b45055649..21eedbf5de 100644 --- a/Spigot-Server-Patches/0524-Add-PrepareResultEvent.patch +++ b/Spigot-Server-Patches/0524-Add-PrepareResultEvent.patch @@ -106,10 +106,10 @@ index ba3db09763d94d730c3fe8662e4dbb24e0636786..3506473f9b9f4c747f7b737d9bd02bef private void a(IInventory iinventory, ItemStack itemstack) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 661f66f4ba2273c4c88c38de431543a1e2d7fa0a..91832e76f22742f85a6de7e1d4f79a9406f98839 100644 +index cdcb20b322fdad0bc90b9f433b5102c9f72da4df..cccba4777b97c67dda79417a75742af2fabbc2ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1515,19 +1515,44 @@ public class CraftEventFactory { +@@ -1509,19 +1509,44 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0525-Allow-delegation-to-vanilla-chunk-gen.patch b/Spigot-Server-Patches/0525-Allow-delegation-to-vanilla-chunk-gen.patch index 676bf7aabf..b4939bde3b 100644 --- a/Spigot-Server-Patches/0525-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/Spigot-Server-Patches/0525-Allow-delegation-to-vanilla-chunk-gen.patch @@ -27,10 +27,10 @@ index b51613040e4583ff056060b47b1f97a86ebcde51..5366314e5f889b5b8d7740bbd0f024d9 for (int l = 0; l < k; ++l) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 530d337e0d1350294aeab5d6fd043496276067bf..5de62da91bc31aae1dff9fedcce11631a6c6ddc7 100644 +index 64a2ab7a33342c7a60f0bc14dd9256ba1ed62666..2535eb4af7f72e46f00c7b6d8c0991e725a01201 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2028,6 +2028,32 @@ public final class CraftServer implements Server { +@@ -2027,6 +2027,32 @@ public final class CraftServer implements Server { return new CraftChunkData(world); } @@ -90,10 +90,10 @@ index bb18740ebdf4a14ced9944efa82103b350b32ba5..948a59217cca0f8dfa9d3befb61e679a return tiles; } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java -index c8bce32eac7437a791c7088072b603f634b6036f..41ac4e6415c3ca2fe6b5ffb2c0dde55a21b7033b 100644 +index 69429e267fbe3f7c31634f98e6fbbbd988d4451e..bd7985cf2dd932ffcca2be61ddba97ee3a8927d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java -@@ -40,7 +40,7 @@ import org.bukkit.generator.ChunkGenerator.ChunkData; +@@ -33,7 +33,7 @@ import org.bukkit.generator.ChunkGenerator.ChunkData; public class CustomChunkGenerator extends InternalChunkGenerator { diff --git a/Spigot-Server-Patches/0537-Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/Spigot-Server-Patches/0537-Add-missing-strikeLighting-call-to-World-spigot-stri.patch index 61be8b9226..c9713cbe10 100644 --- a/Spigot-Server-Patches/0537-Add-missing-strikeLighting-call-to-World-spigot-stri.patch +++ b/Spigot-Server-Patches/0537-Add-missing-strikeLighting-call-to-World-spigot-stri.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing strikeLighting call to diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 10697f8b5208a72bf3d7248c5abd73ddd10420cd..f3aab5be1722651a27bb48a33618650b807d4e07 100644 +index e32e972b00098bf1851b7974218c24eee55682d9..ed55a1e6943fb9cdc763d1b7340e3ec53a46106e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2609,6 +2609,7 @@ public class CraftWorld implements World { +@@ -2614,6 +2614,7 @@ public class CraftWorld implements World { lightning.teleportAndSync( loc.getX(), loc.getY(), loc.getZ() ); lightning.isEffect = true; lightning.isSilent = isSilent; diff --git a/Spigot-Server-Patches/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch b/Spigot-Server-Patches/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch index bdcec6e3fc..39d5b13619 100644 --- a/Spigot-Server-Patches/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch +++ b/Spigot-Server-Patches/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't mark null chunk sections for block updates diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index acb07a2a7a7606470aa938ffc8f6a54fd7b9f5f9..014c0249b22eb4703d2d6b430afb402689a54e2a 100644 +index afea606641c27e2ea8769455833b96e3f012e78e..b374ea7d4a1a2ed3149a2c945e009d5558e1ab4c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -420,6 +420,7 @@ public class PlayerChunk { +@@ -424,6 +424,7 @@ public class PlayerChunk { this.a(world, blockposition, iblockdata); } else { ChunkSection chunksection = chunk.getSections()[sectionposition.getY()]; diff --git a/Spigot-Server-Patches/0551-Add-setMaxPlayers-API.patch b/Spigot-Server-Patches/0551-Add-setMaxPlayers-API.patch index 2cf2e2e44e..0676a16dab 100644 --- a/Spigot-Server-Patches/0551-Add-setMaxPlayers-API.patch +++ b/Spigot-Server-Patches/0551-Add-setMaxPlayers-API.patch @@ -18,10 +18,10 @@ index 0592ee3511d5532440944af45fe5428077c88d7f..9080f28d8c8ce20ea9934384bd149321 private EnumGamemode u; private boolean v; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5de62da91bc31aae1dff9fedcce11631a6c6ddc7..c87124e4d4933a0aac643b6c84f445faf182294d 100644 +index 2535eb4af7f72e46f00c7b6d8c0991e725a01201..93364d6a287282948f6ea9b75e8e56c4fc9482d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -619,6 +619,13 @@ public final class CraftServer implements Server { +@@ -618,6 +618,13 @@ public final class CraftServer implements Server { return playerList.getMaxPlayers(); } diff --git a/Spigot-Server-Patches/0554-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/Spigot-Server-Patches/0554-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 8cac7a4a73..9efb32290b 100644 --- a/Spigot-Server-Patches/0554-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/Spigot-Server-Patches/0554-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 61eeba3c25fecfdebfeb546b7e18ff4464eedfc2..705ce638416e98166a5c659f425be90af1a9a59b 100644 +index d2edfc8053a3db0a8e27f408bd467b193d8f9d9c..dbba898b226d72d3b88695d62c711256d7e3aee2 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1864,12 +1864,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1875,12 +1875,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // Paper end @@ -24,7 +24,7 @@ index 61eeba3c25fecfdebfeb546b7e18ff4464eedfc2..705ce638416e98166a5c659f425be90a // if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add this.removeTicketsForSpawn(this.paperConfig.keepLoadedRange, prevSpawn); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f3aab5be1722651a27bb48a33618650b807d4e07..257d3d9fe97122b5d123509d54916e0c1b16788d 100644 +index ed55a1e6943fb9cdc763d1b7340e3ec53a46106e..616732de1b9860b2f9ad990ae1b9c627db369752 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -388,11 +388,13 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0561-Optimize-redstone-algorithm.patch b/Spigot-Server-Patches/0561-Optimize-redstone-algorithm.patch index b2bbf3d62b..f3f1f5c334 100644 --- a/Spigot-Server-Patches/0561-Optimize-redstone-algorithm.patch +++ b/Spigot-Server-Patches/0561-Optimize-redstone-algorithm.patch @@ -1138,7 +1138,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..7f9ca45d403000d26d84198d8f88cd48 c(iblockdata, world, blockposition); world.a(blockposition, false); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 14dbedbe879c84d8b0e141d1a4e2e7c1256a6f97..a9a853f176613fae6c1f5937a724f580ce60db2c 100644 +index f2944dcf6b83b530124d53743a3d58b68ecec6f8..b91f1a4623a7d2d49bdd4265df3b1cfcdcb0ef88 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -599,6 +599,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -1149,7 +1149,7 @@ index 14dbedbe879c84d8b0e141d1a4e2e7c1256a6f97..a9a853f176613fae6c1f5937a724f580 public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!this.isClientSide) { IBlockData iblockdata = this.getType(blockposition); -@@ -1228,6 +1229,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1227,6 +1228,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); } diff --git a/Spigot-Server-Patches/0570-Add-additional-open-container-api-to-HumanEntity.patch b/Spigot-Server-Patches/0570-Add-additional-open-container-api-to-HumanEntity.patch index 2072933ed1..4bcdba8fd5 100644 --- a/Spigot-Server-Patches/0570-Add-additional-open-container-api-to-HumanEntity.patch +++ b/Spigot-Server-Patches/0570-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api 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 f8be287a5c5e273eb71896c16064b1fd085faf7e..fcc1d87f293e2117f0e559805188733454ca211e 100644 +index bc1f8a0470e4720ff60f5b9c6f1c4172d903d15a..d3b29ddb9375b9c026e9c5d023f42dcf011aa79f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -457,6 +457,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -456,6 +456,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().activeContainer.getBukkitView(); } diff --git a/Spigot-Server-Patches/0573-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch b/Spigot-Server-Patches/0573-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch index f56a06c90f..4a1db649f9 100644 --- a/Spigot-Server-Patches/0573-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch +++ b/Spigot-Server-Patches/0573-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086) diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 014c0249b22eb4703d2d6b430afb402689a54e2a..42b12ad5ba68bdf8f76704ddd970715770183de0 100644 +index b374ea7d4a1a2ed3149a2c945e009d5558e1ab4c..904c6a7d0a36b57bb4f693fc4fd0dd5b17adcbac 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -359,6 +359,7 @@ public class PlayerChunk { +@@ -363,6 +363,7 @@ public class PlayerChunk { } public void a(BlockPosition blockposition) { diff --git a/Spigot-Server-Patches/0592-Add-getOfflinePlayerIfCached-String.patch b/Spigot-Server-Patches/0592-Add-getOfflinePlayerIfCached-String.patch index c27e9a2bdc..d3a8b2067e 100644 --- a/Spigot-Server-Patches/0592-Add-getOfflinePlayerIfCached-String.patch +++ b/Spigot-Server-Patches/0592-Add-getOfflinePlayerIfCached-String.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c87124e4d4933a0aac643b6c84f445faf182294d..1b6c79f8c3038cbcae93eb7880cf16e0a77c83e8 100644 +index 93364d6a287282948f6ea9b75e8e56c4fc9482d7..b1e7494fe57cfd93a57b7cee62db692c599619ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1608,6 +1608,28 @@ public final class CraftServer implements Server { +@@ -1607,6 +1607,28 @@ public final class CraftServer implements Server { return result; } diff --git a/Spigot-Server-Patches/0599-Seed-based-feature-search.patch b/Spigot-Server-Patches/0599-Seed-based-feature-search.patch index e34e1feb5a..9ebde8b0d3 100644 --- a/Spigot-Server-Patches/0599-Seed-based-feature-search.patch +++ b/Spigot-Server-Patches/0599-Seed-based-feature-search.patch @@ -81,10 +81,10 @@ index c3bd58069d8dbdf36f70f1dafd7c24000f31708b..a62c87bceab2c9700a7b3925f208b0ff StructureStart structurestart = structuremanager.a(SectionPosition.a(ichunkaccess.getPos(), 0), this, ichunkaccess); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 16c3ef27e8f77942401568727ea78230147dba29..1c0bfeef83c3669651d9b727c4c746441f6b793c 100644 +index 23e5ad868f1acfb99ec313fbda9bb83a138ccf0b..179915312cd35845216a196018726345324614de 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1452,8 +1452,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1451,8 +1451,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.methodProfiler; } diff --git a/Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch index 47dc271106..cbf7a749d2 100644 --- a/Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch +++ b/Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 91832e76f22742f85a6de7e1d4f79a9406f98839..22edad7e7faa29155dac1abe9f21781ab1390da6 100644 +index cccba4777b97c67dda79417a75742af2fabbc2ea..3091241f2619827298b2aa768d41c285059b529e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -267,6 +267,10 @@ public class CraftEventFactory { +@@ -261,6 +261,10 @@ public class CraftEventFactory { return BedEnterResult.TOO_FAR_AWAY; case NOT_SAFE: return BedEnterResult.NOT_SAFE; diff --git a/Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch b/Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch index 71aa1e7446..5fb3151791 100644 --- a/Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch +++ b/Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimized tick ready check diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1c0bfeef83c3669651d9b727c4c746441f6b793c..02303f00e243748b9d1c4a37719fcf5c8d271ed9 100644 +index 179915312cd35845216a196018726345324614de..f5ab99156ce5429e63976183cbf115d5340a83a1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -794,13 +794,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -24,7 +24,7 @@ index 1c0bfeef83c3669651d9b727c4c746441f6b793c..02303f00e243748b9d1c4a37719fcf5c ((ITickable) tileentity).tick(); } else { tileentity.w(); -@@ -834,9 +834,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -833,9 +833,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.tileEntityListTick.remove(tileTickPosition--); // Spigot end //this.tileEntityList.remove(tileentity); // Paper - remove unused list @@ -38,7 +38,7 @@ index 1c0bfeef83c3669651d9b727c4c746441f6b793c..02303f00e243748b9d1c4a37719fcf5c } } -@@ -855,8 +857,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -854,8 +856,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } // CraftBukkit end */ diff --git a/Spigot-Server-Patches/0637-Added-WorldGameRuleChangeEvent.patch b/Spigot-Server-Patches/0637-Added-WorldGameRuleChangeEvent.patch index 5014da1a10..a9ea2650bf 100644 --- a/Spigot-Server-Patches/0637-Added-WorldGameRuleChangeEvent.patch +++ b/Spigot-Server-Patches/0637-Added-WorldGameRuleChangeEvent.patch @@ -74,10 +74,10 @@ index b245428604e2a432fa3bab4836a5ca1fb35c3f64..53b40f8947c9380ef57ecc7edca203c5 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 597d7a36d7d0b19502d92cf13da53d96c6ede58a..d86c25593db7cc0a73db1c37af94ae4e41bb4e93 100644 +index fe21b612f9bd2cf85670eeffa25998130b543339..22eba9372d334c65d009721e808c958dfc271308 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2345,8 +2345,13 @@ public class CraftWorld implements World { +@@ -2350,8 +2350,13 @@ public class CraftWorld implements World { if (!isGameRule(rule)) return false; @@ -92,7 +92,7 @@ index 597d7a36d7d0b19502d92cf13da53d96c6ede58a..d86c25593db7cc0a73db1c37af94ae4e handle.onChange(getHandle().getMinecraftServer()); return true; } -@@ -2381,8 +2386,12 @@ public class CraftWorld implements World { +@@ -2386,8 +2391,12 @@ public class CraftWorld implements World { if (!isGameRule(rule.getName())) return false; diff --git a/Spigot-Server-Patches/0639-Added-world-settings-for-mobs-picking-up-loot.patch b/Spigot-Server-Patches/0639-Added-world-settings-for-mobs-picking-up-loot.patch index 934ee522ac..bbd7d53a7b 100644 --- a/Spigot-Server-Patches/0639-Added-world-settings-for-mobs-picking-up-loot.patch +++ b/Spigot-Server-Patches/0639-Added-world-settings-for-mobs-picking-up-loot.patch @@ -37,10 +37,10 @@ index ced89af70ca791bfe42c4e2d21604997a0cf3e0f..f73304240a626f3f7d9355e6e5f2963a LocalDate localdate = LocalDate.now(); int i = localdate.get(ChronoField.DAY_OF_MONTH); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 096c345da09b273c9e3e30e93759f5901c5e6fb4..62d202ff871cf3f3deea69931fbee84131bdda8b 100644 +index 2aaa6aa323e805423a8fd2bd32cc6a1e48edc817..cab4226166c43f11f77be262e0ced1b223764b7d 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -433,7 +433,7 @@ public class EntityZombie extends EntityMonster { +@@ -436,7 +436,7 @@ public class EntityZombie extends EntityMonster { Object object = super.prepare(worldaccess, difficultydamagescaler, enummobspawn, groupdataentity, nbttagcompound); float f = difficultydamagescaler.d(); diff --git a/Spigot-Server-Patches/0640-Implemented-BlockFailedDispenseEvent.patch b/Spigot-Server-Patches/0640-Implemented-BlockFailedDispenseEvent.patch index c43fd103c5..2afc1cec64 100644 --- a/Spigot-Server-Patches/0640-Implemented-BlockFailedDispenseEvent.patch +++ b/Spigot-Server-Patches/0640-Implemented-BlockFailedDispenseEvent.patch @@ -29,7 +29,7 @@ index 65c212690d8ba7c8ea55d4d3b6af1ba3d9f4a7f6..22ab5a861920e1902c64301c3b06cf95 } else { ItemStack itemstack = tileentitydispenser.getItem(i); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 22edad7e7faa29155dac1abe9f21781ab1390da6..7721b3ca951054d73b2fbf28c01a7c02b5416451 100644 +index 3091241f2619827298b2aa768d41c285059b529e..a3a1a5fcb4e49f92d6ba137ee8d14e84d355187b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -4,6 +4,7 @@ import com.google.common.base.Function; @@ -40,35 +40,7 @@ index 22edad7e7faa29155dac1abe9f21781ab1390da6..7721b3ca951054d73b2fbf28c01a7c02 import java.net.InetAddress; import java.util.ArrayList; import java.util.Collections; -@@ -22,7 +23,6 @@ import net.minecraft.server.EntityAnimal; - import net.minecraft.server.EntityAreaEffectCloud; - import net.minecraft.server.EntityDamageSource; - import net.minecraft.server.EntityDamageSourceIndirect; --import net.minecraft.server.EntityEnderCrystal; - import net.minecraft.server.EntityEnderDragon; - import net.minecraft.server.EntityExperienceOrb; - import net.minecraft.server.EntityFireworks; -@@ -44,11 +44,9 @@ import net.minecraft.server.EntityVillager; - import net.minecraft.server.EntityWaterAnimal; - import net.minecraft.server.EnumDirection; - import net.minecraft.server.EnumHand; --import net.minecraft.server.EnumItemSlot; - import net.minecraft.server.Explosion; - import net.minecraft.server.GeneratorAccess; - import net.minecraft.server.IBlockData; --import net.minecraft.server.IChatBaseComponent; - import net.minecraft.server.IInventory; - import net.minecraft.server.IProjectile; - import net.minecraft.server.ItemActionContext; -@@ -69,7 +67,6 @@ import net.minecraft.server.Unit; - import net.minecraft.server.World; - import net.minecraft.server.WorldServer; - import org.bukkit.Bukkit; --import org.bukkit.Location; - import org.bukkit.Material; - import org.bukkit.NamespacedKey; - import org.bukkit.Server; -@@ -121,7 +118,6 @@ import org.bukkit.entity.ThrownPotion; +@@ -117,7 +118,6 @@ import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.Vehicle; import org.bukkit.entity.Villager; import org.bukkit.entity.Villager.Profession; @@ -76,23 +48,7 @@ index 22edad7e7faa29155dac1abe9f21781ab1390da6..7721b3ca951054d73b2fbf28c01a7c02 import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -162,7 +158,6 @@ import org.bukkit.event.entity.EntityDeathEvent; - import org.bukkit.event.entity.EntityEnterLoveModeEvent; - import org.bukkit.event.entity.EntityPickupItemEvent; - import org.bukkit.event.entity.EntityPlaceEvent; --import org.bukkit.event.entity.EntityPortalEvent; - import org.bukkit.event.entity.EntityPotionEffectEvent; - import org.bukkit.event.entity.EntityShootBowEvent; - import org.bukkit.event.entity.EntitySpawnEvent; -@@ -221,7 +216,6 @@ import org.bukkit.inventory.EquipmentSlot; - import org.bukkit.inventory.InventoryView; - import org.bukkit.inventory.meta.BookMeta; - import org.bukkit.potion.PotionEffect; --import org.bukkit.projectiles.ProjectileSource; - - import org.bukkit.event.entity.SpawnerSpawnEvent; // Spigot - -@@ -1758,4 +1752,12 @@ public class CraftEventFactory { +@@ -1752,4 +1752,12 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0647-Remove-stale-POIs.patch b/Spigot-Server-Patches/0647-Remove-stale-POIs.patch index 6494c68c6c..ea2328f775 100644 --- a/Spigot-Server-Patches/0647-Remove-stale-POIs.patch +++ b/Spigot-Server-Patches/0647-Remove-stale-POIs.patch @@ -25,10 +25,10 @@ index b926cebd053bef829517c9d9bbf1c609c23ca04a..6a0f07b13eef5560dfc7c7b39618c0b8 return (Boolean) this.d(SectionPosition.a(blockposition).s()).map((villageplacesection) -> { return villageplacesection.a(blockposition, predicate); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 91d759fee68e8b285f912406fb338750c286f6a0..fbe7f43f6c1010e7a34114f8afb0e64934744335 100644 +index 493e3cd8a3dbc77f73dd1e026c9e580896995675..53d3e1561ea33c38de5dc5dde181439153fa2775 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1942,8 +1942,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1953,8 +1953,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { Optional optional = VillagePlaceType.b(iblockdata); Optional optional1 = VillagePlaceType.b(iblockdata1); @@ -46,7 +46,7 @@ index 91d759fee68e8b285f912406fb338750c286f6a0..fbe7f43f6c1010e7a34114f8afb0e649 optional.ifPresent((villageplacetype) -> { this.getMinecraftServer().execute(() -> { -@@ -1960,6 +1968,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1971,6 +1979,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0658-Added-Vanilla-Entity-Tags.patch b/Spigot-Server-Patches/0658-Added-Vanilla-Entity-Tags.patch index 8c911115e2..4fa620e8e5 100644 --- a/Spigot-Server-Patches/0658-Added-Vanilla-Entity-Tags.patch +++ b/Spigot-Server-Patches/0658-Added-Vanilla-Entity-Tags.patch @@ -41,10 +41,10 @@ index 0000000000000000000000000000000000000000..4a689a2769ac343c2ffab49631c41601 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1b6c79f8c3038cbcae93eb7880cf16e0a77c83e8..3c83e2363aa4c7323eece1e17781bfe19ce26564 100644 +index b1e7494fe57cfd93a57b7cee62db692c599619ce..f4263b7a787a3b60d20d63aec3fd42658ca4af38 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2217,6 +2217,11 @@ public final class CraftServer implements Server { +@@ -2216,6 +2216,11 @@ public final class CraftServer implements Server { Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type"); return (org.bukkit.Tag) new CraftFluidTag(console.getTagRegistry().getFluidTags(), key); diff --git a/Spigot-Server-Patches/0665-Skip-distance-map-update-when-spawning-disabled.patch b/Spigot-Server-Patches/0665-Skip-distance-map-update-when-spawning-disabled.patch index 96e795198d..def8b55602 100644 --- a/Spigot-Server-Patches/0665-Skip-distance-map-update-when-spawning-disabled.patch +++ b/Spigot-Server-Patches/0665-Skip-distance-map-update-when-spawning-disabled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Skip distance map update when spawning disabled. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 75d25576d68ec95a14372f8530f4916f2bd7c3c5..96a6f4675dc10a0047b7d2ee4164d0376de36c27 100644 +index 12e417d2fe8e7f6a2f664ef916c141305ce1b29c..0ea1b25bf98d71c251351807fa92d4d08eb6b06e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -792,7 +792,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -800,7 +800,7 @@ public class ChunkProviderServer extends IChunkProvider { int l = this.chunkMapDistance.b(); // Paper start - per player mob spawning SpawnerCreature.d spawnercreature_d; // moved down diff --git a/Spigot-Server-Patches/0669-added-option-to-disable-pathfinding-updates-on-block.patch b/Spigot-Server-Patches/0669-added-option-to-disable-pathfinding-updates-on-block.patch index 552df653a8..565c4df9b7 100644 --- a/Spigot-Server-Patches/0669-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/Spigot-Server-Patches/0669-added-option-to-disable-pathfinding-updates-on-block.patch @@ -19,7 +19,7 @@ index ac96011d4e104c99bb37833d91b8121f03b9d349..0776e68340b0510cc99084bea80791d5 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index fdf6380bb95fd5d82842f69411ba440b520f82ca..2b94c195db43d8e7fd58301a33377e87daa16e98 100644 +index 466bb6297bd3bf7bb0ff1f4d0bd1f4ddfe294fa2..cf7d94aabab600822eb5e27f38690b06456d5fcc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1571,6 +1571,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -30,7 +30,7 @@ index fdf6380bb95fd5d82842f69411ba440b520f82ca..2b94c195db43d8e7fd58301a33377e87 VoxelShape voxelshape = iblockdata.getCollisionShape(this, blockposition); VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); -@@ -1588,6 +1589,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1599,6 +1600,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.tickingEntities = wasTicking; // Paper } diff --git a/work/Bukkit b/work/Bukkit index 1b5ad2af5d..1e843b72bb 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 1b5ad2af5decf1d2cd276ae391d75a8ab1167b15 +Subproject commit 1e843b72bbd67b7b5ec785eae260fb00a5b64292 diff --git a/work/CraftBukkit b/work/CraftBukkit index 8049146227..b7eed25467 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 8049146227e4f8e44013f6b825ee91bdc7e3290f +Subproject commit b7eed25467eb583d77cda6a042387dc48fe14f97 diff --git a/work/Spigot b/work/Spigot index 89d6047d1a..73fb6094f4 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 89d6047d1aea78b9011ba38681663780a63233c9 +Subproject commit 73fb6094f4fa318955bb5bb11a1ec1af12cf90a1