From a28f80090ec6bd48069cac782382d4ea9ea012a8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 24 Jun 2020 04:38:17 -0400 Subject: [PATCH 01/95] Initial prep for 1.16 Remove patcehs we know need to go add comment on one im not sure should be dropped go ahead and fix patched repos to turn off gpg signing, as this helps rebase/apply --continue commands not suck. Go ahead and prep the pom file change --- Spigot-API-Patches/0001-POM-changes.patch | 2 +- Spigot-Server-Patches/0001-POM-Changes.patch | 4 ++-- Spigot-Server-Patches/0402-Fix-MC-161754.patch | 2 +- .../0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch | 0 ...0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch | 0 scripts/applyPatches.sh | 1 + 6 files changed, 5 insertions(+), 4 deletions(-) rename {Spigot-Server-Patches => removed/1.16}/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch (100%) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 52950142e8..c6e0fac177 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -22,7 +22,7 @@ index 186405ba1914b2b384896c61770c225b50091401..9975ba9ae19f6217bec206fee247fac1 - spigot-api + com.destroystokyo.paper + paper-api - 1.15.2-R0.1-SNAPSHOT + 1.16-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index d0e2a70921..e88b4595f9 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -16,7 +16,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 - spigot + paper jar - 1.15.2-R0.1-SNAPSHOT + 1.16-R0.1-SNAPSHOT - Spigot - https://www.spigotmc.org/ + Paper @@ -27,7 +27,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 + UTF-8 unknown - 1.15.2 + 1.16 @@ -19,16 +18,22 @@ diff --git a/Spigot-Server-Patches/0402-Fix-MC-161754.patch b/Spigot-Server-Patches/0402-Fix-MC-161754.patch index 9ba10c6d76..4e725ed021 100644 --- a/Spigot-Server-Patches/0402-Fix-MC-161754.patch +++ b/Spigot-Server-Patches/0402-Fix-MC-161754.patch @@ -17,7 +17,7 @@ index c95ce0124d948626732e796c386b7544e34b36c4..18e1ae7f0a4b06ec7d7400e791ac79e5 @Override public boolean canUse(EntityHuman entityhuman) { - return this.c.a(entityhuman) && this.d.isAlive() && this.d.g((Entity) entityhuman) < 8.0F; -+ return this.c.a(entityhuman) && (this.d.isAlive() && this.d.valid) && this.d.g((Entity) entityhuman) < 8.0F; // Paper - Fix MC-161754 ++ return this.c.a(entityhuman) && (this.d.isAlive() && this.d.valid) && this.d.g((Entity) entityhuman) < 8.0F; // Paper - Fix MC-161754 - evaluate we might still want this in 1.16 as im not confident mojang fixed this, and made it worse } @Override diff --git a/Spigot-Server-Patches/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch b/removed/1.16/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch similarity index 100% rename from Spigot-Server-Patches/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch rename to removed/1.16/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch diff --git a/Spigot-Server-Patches/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch b/removed/1.16/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch similarity index 100% rename from Spigot-Server-Patches/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch rename to removed/1.16/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index e4c073fda2..e700fde80b 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -39,6 +39,7 @@ function applyPatch { statusfile=".git/patch-apply-failed" rm -f "$statusfile" + git config commit.gpgsign false $gitcmd am --abort >/dev/null 2>&1 # Special case Windows handling because of ARG_MAX constraint From 6c87b85dd1d026db4a2a2a5b6bcaba8e07c60e10 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 24 Jun 2020 21:10:30 -0400 Subject: [PATCH 02/95] 1.16.1 prep --- Spigot-API-Patches/0001-POM-changes.patch | 2 +- Spigot-API-Patches/0004-Timings-v2.patch | 4 +- .../0008-Version-Command-2.0.patch | 2 +- ...ly-disable-plugins-that-fail-to-load.patch | 2 +- .../0017-Add-exception-reporting-event.patch | 2 +- .../0022-Use-ASM-for-event-executors.patch | 2 +- ...eload-permissions.yml-and-require-co.patch | 2 +- ...-get-a-BlockState-without-a-snapshot.patch | 2 +- ...e-PlayerProfile-in-AsyncPreLoginEven.patch | 2 +- ...tional-world.getNearbyEntities-API-s.patch | 2 +- ...lose-Plugin-Class-Loaders-on-Disable.patch | 4 +- ...dd-an-asterisk-to-legacy-API-plugins.patch | 4 +- ...deadlock-risk-in-firing-async-events.patch | 2 +- ...Blocks-to-be-accessed-via-a-long-key.patch | 2 +- ...nts-firing-Async-errors-during-shutd.patch | 2 +- ...95-Make-JavaPluginLoader-thread-safe.patch | 2 +- ...rioritise-own-classes-where-possible.patch | 2 +- ...Add-Raw-Byte-ItemStack-Serialization.patch | 2 +- Spigot-Server-Patches/0001-POM-Changes.patch | 4 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 45 ------------------- Spigot-Server-Patches/0004-MC-Utils.patch | 6 +-- Spigot-Server-Patches/0009-Timings-v2.patch | 4 +- ...figurable-baby-zombie-movement-speed.patch | 2 +- ...5-Allow-for-toggling-of-spawn-chunks.patch | 2 +- ...ient-crashes-server-lists-and-Mojang.patch | 2 +- ...event-tile-entity-and-entity-crashes.patch | 2 +- .../0032-Optimize-explosions.patch | 2 +- .../0033-Disable-explosion-knockback.patch | 2 +- .../0041-Disable-spigot-tick-limiters.patch | 2 +- .../0042-Add-PlayerInitialSpawnEvent.patch | 2 +- ...entation-of-tile-entity-removal-list.patch | 2 +- .../0054-Add-exception-reporting-event.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 2 +- .../0066-Add-World-Util-Methods.patch | 2 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 2 +- ...dDebugInfo-not-initialized-on-client.patch | 2 +- ...g-BlockPlaceEvent-triggering-physics.patch | 2 +- ...Remove-unused-World-Tile-Entity-List.patch | 2 +- ...ityRegainHealthEvent-isFastRegen-API.patch | 2 +- ...r-redstone-torch-rapid-clock-removal.patch | 2 +- .../0104-Add-server-name-parameter.patch | 2 +- ...mative-vehicle-moved-wrongly-message.patch | 2 +- ...ptimise-BlockState-s-hashCode-equals.patch | 18 ++++---- ...onfigurable-packet-in-spam-threshold.patch | 2 +- ...13-Configurable-flying-kick-messages.patch | 2 +- .../0118-Add-EntityZapEvent.patch | 2 +- ...3-Add-source-to-PlayerExpChangeEvent.patch | 2 +- .../0125-Add-ProjectileCollideEvent.patch | 2 +- ...imize-World.isLoaded-BlockPosition-Z.patch | 2 +- ...32-Properly-fix-item-duplication-bug.patch | 2 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- .../0137-Enforce-Sync-Player-Saves.patch | 2 +- ...PI-for-Reason-Source-Triggering-play.patch | 2 +- .../0140-Cap-Entity-Collisions.patch | 2 +- .../0143-Do-not-let-armorstands-drown.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 2 +- ...ke-parrots-stay-on-shoulders-despite.patch | 2 +- ...oleAppender-for-console-improvements.patch | 2 +- .../0162-ProfileWhitelistVerifyEvent.patch | 2 +- .../0163-Fix-this-stupid-bullshit.patch | 2 +- ...66-Fix-MC-117075-TE-Unload-Lag-Spike.patch | 2 +- .../0168-LivingEntity-setKiller.patch | 2 +- .../0173-Add-PlayerJumpEvent.patch | 2 +- ...4-handle-PacketPlayInKeepAlive-async.patch | 2 +- ...rt-serverside-behavior-of-keepalives.patch | 2 +- ...dEffects-only-to-players-who-can-see.patch | 2 +- ...-maximum-exp-value-when-merging-orbs.patch | 2 +- .../0179-Add-PlayerArmorChangeEvent.patch | 2 +- ...e-implementations-for-captured-block.patch | 2 +- ...-get-a-BlockState-without-a-snapshot.patch | 2 +- .../0183-AsyncTabCompleteEvent.patch | 2 +- .../0186-ExperienceOrbMergeEvent.patch | 2 +- ...-Add-setPlayerProfile-API-for-Skulls.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 2 +- ...-allowed-colored-signs-to-be-created.patch | 2 +- ...ent-consumeArrow-and-getArrowItem-AP.patch | 2 +- ...plement-EntityKnockbackByEntityEvent.patch | 2 +- ...nventory-when-cancelling-PlayerInter.patch | 2 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 2 +- ...t-armor-stands-from-doing-entity-loo.patch | 2 +- ...4-Vanished-players-don-t-have-rights.patch | 4 +- .../0257-EntityTransformedEvent.patch | 4 +- ...nd-make-tab-spam-limits-configurable.patch | 2 +- .../0266-Add-hand-to-bucket-events.patch | 2 +- ...ient-rendering-skulls-from-same-user.patch | 2 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 2 +- ...71-Use-ConcurrentHashMap-in-JsonList.patch | 2 +- ...Allow-disabling-armour-stand-ticking.patch | 2 +- ...ets-from-world-player-list-not-serve.patch | 2 +- .../0289-Improve-death-events.patch | 4 +- ...ow-chests-to-be-placed-with-NBT-data.patch | 2 +- .../0298-Support-Overriding-World-Seeds.patch | 2 +- .../0299-Optimize-Server-World-Map.patch | 2 +- ...tator-target-events-and-improve-impl.patch | 2 +- ...event-players-from-moving-into-unloa.patch | 2 +- .../0321-Optimize-World-Time-Updates.patch | 2 +- ...t-allow-digging-into-unloaded-chunks.patch | 2 +- .../0326-Optimize-redstone-algorithm.patch | 2 +- ...entity-dismount-during-teleportation.patch | 2 +- .../0328-Book-Size-Limits.patch | 2 +- .../0330-Add-more-Zombie-API.patch | 2 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 2 +- .../0337-Fix-PlayerEditBookEvent.patch | 2 +- .../0341-BlockDestroyEvent.patch | 2 +- .../0343-Fix-sign-edit-memory-leak.patch | 2 +- .../0344-Limit-Client-Sign-length-more.patch | 2 +- ...-Manager-and-add-advanced-packet-sup.patch | 2 +- ...0-Fix-Whitelist-On-Off-inconsistency.patch | 2 +- ...oggleEvent-when-whitelist-is-toggled.patch | 2 +- .../0354-Entity-getEntitySpawnReason.patch | 2 +- ...ity-Metadata-for-all-tracked-players.patch | 2 +- ...357-Implement-PlayerPostRespawnEvent.patch | 2 +- .../0360-Server-Tick-Events.patch | 2 +- ...-Optimize-Captured-TileEntity-Lookup.patch | 2 +- .../0363-Add-Heightmap-API.patch | 4 +- ...l-to-changed-postToMainThread-method.patch | 2 +- ...x-some-generation-concurrency-issues.patch | 2 +- .../0376-Implement-CraftBlockSoundGroup.patch | 2 +- .../0377-Chunk-debug-command.patch | 2 +- ...PaletteBlock-instead-of-ReentrantLoc.patch | 2 +- ...-being-ticked-when-notifying-navigat.patch | 2 +- ...90-Asynchronous-chunk-IO-and-loading.patch | 2 +- ...if-we-have-a-custom-Bukkit-generator.patch | 2 +- .../0395-Fix-MC-158900.patch | 2 +- .../0402-Fix-MC-161754.patch | 2 +- ...-sneak-when-changing-worlds-MC-10657.patch | 2 +- ...or-when-player-hand-set-to-empty-typ.patch | 4 +- ...timise-IEntityAccess-getPlayerByUUID.patch | 2 +- .../0424-Entity-Activation-Range-2.0.patch | 4 +- .../0429-Seed-based-feature-search.patch | 4 +- ...ow-overriding-the-java-version-check.patch | 2 +- .../0435-Optimise-random-block-ticking.patch | 4 +- .../0436-Entity-Jump-API.patch | 2 +- .../0438-Make-the-GUI-graph-fancier.patch | 2 +- ...440-add-hand-to-BlockMultiPlaceEvent.patch | 2 +- ...41-Prevent-teleporting-dead-entities.patch | 2 +- ...to-allow-iron-golems-to-spawn-in-air.patch | 2 +- ...-chance-of-villager-zombie-infection.patch | 2 +- ...imise-TickListServer-by-rewriting-it.patch | 2 +- ...re-Entity-is-never-double-registered.patch | 2 +- ...ering-entities-from-unloading-chunks.patch | 2 +- ...-PlayerChunkMap-adds-crashing-server.patch | 2 +- ...ptimize-Collision-to-not-load-chunks.patch | 2 +- ...move-existing-players-to-world-spawn.patch | 2 +- ...-entity-collision-code-if-not-needed.patch | 2 +- ...82-Broadcast-join-message-to-console.patch | 2 +- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 2 +- ...PlayerAttackEntityCooldownResetEvent.patch | 2 +- ...m-duplication-issues-and-teleport-is.patch | 2 +- ...No-Tick-view-distance-implementation.patch | 2 +- ...k-Priority-Urgency-System-for-Chunks.patch | 2 +- ...-packets-to-nearby-locations-sounds-.patch | 2 +- ...unk-Unloads-based-on-Player-Movement.patch | 2 +- .../0546-Expose-Arrow-getItemStack.patch | 2 +- .../1.16}/0316-Fix-MC-93764.patch | 0 scripts/rebuildPatches.sh | 2 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 160 files changed, 181 insertions(+), 226 deletions(-) rename {Spigot-Server-Patches => removed/1.16}/0316-Fix-MC-93764.patch (100%) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index c6e0fac177..52950142e8 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -22,7 +22,7 @@ index 186405ba1914b2b384896c61770c225b50091401..9975ba9ae19f6217bec206fee247fac1 - spigot-api + com.destroystokyo.paper + paper-api - 1.16-R0.1-SNAPSHOT + 1.15.2-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-API-Patches/0004-Timings-v2.patch b/Spigot-API-Patches/0004-Timings-v2.patch index 8c10658d7f..1dd40a7a8b 100644 --- a/Spigot-API-Patches/0004-Timings-v2.patch +++ b/Spigot-API-Patches/0004-Timings-v2.patch @@ -3374,7 +3374,7 @@ index 92bafd6365313390326ea12fb815c62463f4d0fc..bfbe775fcd631b12975c0aaae8c82156 @NotNull diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index ec77d7be69a8213c91d05bd3beabdd4fc664afa4..c548911c4b4fad495e4b321ea47455ec65c68255 100644 +index 62d0017362204070465c8ff72e5c2ca07501f558..745eaa8f2f2ff83536301db8ca47a8af30df7a73 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -358,7 +358,6 @@ public final class SimplePluginManager implements PluginManager { @@ -3434,7 +3434,7 @@ index ec77d7be69a8213c91d05bd3beabdd4fc664afa4..c548911c4b4fad495e4b321ea47455ec } } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index df8a5dcbe3345abf7be53d7ebb81d13b33c86511..50a51394f71579b71c3875e4dc8c71abc23ae246 100644 +index 7b9ad3834c9c81220c74a16f1e66fb4da512e9f6..b6d739ca8ad8ebd4b1be7ebd129f9a7ae16b2a2a 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -53,7 +53,6 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/0008-Version-Command-2.0.patch b/Spigot-API-Patches/0008-Version-Command-2.0.patch index 30c0dac026..3a888b027f 100644 --- a/Spigot-API-Patches/0008-Version-Command-2.0.patch +++ b/Spigot-API-Patches/0008-Version-Command-2.0.patch @@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..2a2651299e8dc631938ba4b4078dc694 + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 26dbc2a761108d6aad056a786cb5146c63b7ad3d..98df287bcb1462fa42b7d4a706a68d36927fbc1c 100644 +index 945b8b030d1b2a13afc0c4efad76997eb7bf00ba..1b6d737046646c102b0d519ab3f67c3fbd503979 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -77,5 +77,12 @@ public interface UnsafeValues { diff --git a/Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch b/Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch index ea81806dff..9d44d1360d 100644 --- a/Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch +++ b/Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Automatically disable plugins that fail to load diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 50a51394f71579b71c3875e4dc8c71abc23ae246..5cc37eeedab8437db82791dd95cef4e387c124b3 100644 +index b6d739ca8ad8ebd4b1be7ebd129f9a7ae16b2a2a..c8497cb3021f584a885f4cb21c3be576ce0935a7 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -344,6 +344,10 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch b/Spigot-API-Patches/0017-Add-exception-reporting-event.patch index 914766487c..b295b466fc 100644 --- a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch +++ b/Spigot-API-Patches/0017-Add-exception-reporting-event.patch @@ -506,7 +506,7 @@ index f020cb04eba27a2e70fc7cf799ebbfb434b9d974..adfc7aae2c0f49bbcdd358e83b04a0cf } diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index c548911c4b4fad495e4b321ea47455ec65c68255..9a5fe8ca4ad9415055f3a71b62064d9e79b8e644 100644 +index 745eaa8f2f2ff83536301db8ca47a8af30df7a73..d0fec44d2546290091649879450761ce08514fcb 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -23,6 +23,10 @@ import java.util.WeakHashMap; diff --git a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch index 65e844a8e6..b6c0d6bac8 100644 --- a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch @@ -412,7 +412,7 @@ index a850f0780de05463fc0d3f9e15ff7f19d88b2aed..9026e108ccd3a88aee1267ee275137be + // Paper end } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 5cc37eeedab8437db82791dd95cef4e387c124b3..e72cbde4b3225cbf17d8a9b275e0ffcaa6d86c19 100644 +index c8497cb3021f584a885f4cb21c3be576ce0935a7..5be6460e8eb81381c7e305cb7ab6b77c0c7a8fe5 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -300,21 +300,7 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch b/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch index b7eafeabd0..b3744bc53b 100644 --- a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch +++ b/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch @@ -85,7 +85,7 @@ index 50cc311be7904cc8fc6070a21c8e4de3a489fd20..c62da4131b17e66892678e8b618fb9ba } } diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 9a5fe8ca4ad9415055f3a71b62064d9e79b8e644..8ddaf9c2e63b382533d7f8929023c364ff3a8f9d 100644 +index d0fec44d2546290091649879450761ce08514fcb..8b33d914d29897c0276f9e2e7ce83bd2c316d5e2 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -894,4 +894,13 @@ public final class SimplePluginManager implements PluginManager { diff --git a/Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch index 3fe23df9f4..0f95b2be82 100644 --- a/Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch @@ -9,7 +9,7 @@ on the real tile entity. This is useful for where performance is needed diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 8a48572e92e311de8c799ae608c5bee681ac91a5..8154093df6f6d4180485cecf98da3af26219eab8 100644 +index 2ff77abef2b25c839ddd524aa29afbc4e49d0c31..633733d7c914cf6ae988f727d644c8f2be408b02 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -269,6 +269,16 @@ public interface Block extends Metadatable { diff --git a/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 4db167a055..2bbaa66d15 100644 --- a/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java -index c8384da69af61e1970f254a3a9c206ee81d7a989..10292e59257d1c33cf4800d38bc24f6b35f75de1 100644 +index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a06208270200f576c02 100644 --- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java @@ -2,6 +2,9 @@ package org.bukkit.event.player; diff --git a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch b/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch index 8f2e860517..6af56de3a3 100644 --- a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch +++ b/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch @@ -277,7 +277,7 @@ index 3b027f67c1763ee0a4f7b02490d3cee1c3eff369..fbe7e76c0f3122dd47c7ca4562b5ac35 * Get a list of all players in this World * diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java -index 6c09ea6c61bdeb6149c8f2f23f15b2abb543e66e..76c4a1a6e0c0e72b0f3f75d06f179c07f863e143 100644 +index 16352c7dab042c5042020a06208270200f576c02..e5b811229830e4d55b08ab18bedec1494ff342ac 100644 --- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java @@ -42,8 +42,7 @@ public class AsyncPlayerPreLoginEvent extends Event { diff --git a/Spigot-API-Patches/0098-Close-Plugin-Class-Loaders-on-Disable.patch b/Spigot-API-Patches/0098-Close-Plugin-Class-Loaders-on-Disable.patch index 331239ba2e..4272393c94 100644 --- a/Spigot-API-Patches/0098-Close-Plugin-Class-Loaders-on-Disable.patch +++ b/Spigot-API-Patches/0098-Close-Plugin-Class-Loaders-on-Disable.patch @@ -53,7 +53,7 @@ index 41e26451fe12d8e6e0ef73c85731b24b4e3f200c..86cc5025ad98f7a752c51713b7cd6a39 * Gets a {@link Permission} from its fully qualified name * diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 8ddaf9c2e63b382533d7f8929023c364ff3a8f9d..8bb24f734f0bbb5df37dff2f376a450b8be9be28 100644 +index 8b33d914d29897c0276f9e2e7ce83bd2c316d5e2..a7393d2830b95d7167121b02066a3f357cee6085 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -492,17 +492,28 @@ public final class SimplePluginManager implements PluginManager { @@ -97,7 +97,7 @@ index 8ddaf9c2e63b382533d7f8929023c364ff3a8f9d..8bb24f734f0bbb5df37dff2f376a450b lookupNames.clear(); dependencyGraph = GraphBuilder.directed().build(); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index e72cbde4b3225cbf17d8a9b275e0ffcaa6d86c19..32ec68b489ab1933b4375a339c77c05a3e235202 100644 +index 5be6460e8eb81381c7e305cb7ab6b77c0c7a8fe5..bef88a6e2e6f7071401a3af0aec31e62aa265566 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -331,7 +331,7 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch index ed8e05eb0c..cfe9dbb84d 100644 --- a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch +++ b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch @@ -7,7 +7,7 @@ Not here to name and shame, only so server admins can be aware of which plugins have and haven't been updated. diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 98df287bcb1462fa42b7d4a706a68d36927fbc1c..6f5601639c472db62120bab8d903620ee87f7e5c 100644 +index 1b6d737046646c102b0d519ab3f67c3fbd503979..541e28a9bece0beb0c2cf02c39030840b758c6e6 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -84,5 +84,11 @@ public interface UnsafeValues { @@ -42,7 +42,7 @@ index a1071e3178a298f3fc1d6c960f4d8a6d3a3d0277..3dcecf3a543646327c277ee269810615 return "(" + plugins.size() + "): " + pluginList.toString(); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 32ec68b489ab1933b4375a339c77c05a3e235202..8ff228ced356eb509b93abb7a0d3d9a26dd3e057 100644 +index bef88a6e2e6f7071401a3af0aec31e62aa265566..de44d850d7b3ab3e528eb6f2de375a6c3e0e5cf9 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -315,7 +315,14 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch b/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch index 20fce849c9..54e90180af 100644 --- a/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch +++ b/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch @@ -29,7 +29,7 @@ index a8dbf282d0a8fb57f4719b9e95199894d8d3324c..b4069dbf31587786da39f5e387a71b7b * * @return a new copy of Location containing the position of this entity diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 8bb24f734f0bbb5df37dff2f376a450b8be9be28..8355f9f0eb1b554bf6cfd3883afd2bdd2bf8c357 100644 +index a7393d2830b95d7167121b02066a3f357cee6085..a1a805004941d67abb0b9aa1721e0370c45b5289 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -462,7 +462,7 @@ public final class SimplePluginManager implements PluginManager { diff --git a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch b/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch index 32b318c48e..6914045123 100644 --- a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch +++ b/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch @@ -91,7 +91,7 @@ index 8fe496ad8f566183e2280582d00c3b7751f06d75..08aebaedce935faa1a2c54c5abc02b85 * Gets the highest non-empty (impassable) coordinate at the given * coordinates. diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 8154093df6f6d4180485cecf98da3af26219eab8..41f6b849186346f9a4e254122d2448a7ea8e0ee9 100644 +index 633733d7c914cf6ae988f727d644c8f2be408b02..d7c7df85228c01529e266ffdd3b3bcdc9ed35774 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -153,6 +153,72 @@ public interface Block extends Metadatable { diff --git a/Spigot-API-Patches/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch b/Spigot-API-Patches/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch index a7e3a69f3b..5ca0264ed8 100644 --- a/Spigot-API-Patches/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch +++ b/Spigot-API-Patches/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch @@ -11,7 +11,7 @@ errors. This isn't an issue on Spigot diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 8355f9f0eb1b554bf6cfd3883afd2bdd2bf8c357..4931bc86d44cd697d458d6e365c3b8030ea8285d 100644 +index a1a805004941d67abb0b9aa1721e0370c45b5289..26685f59b235ea5b4c4fb7ae21acb5149edaa2b3 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -591,7 +591,7 @@ public final class SimplePluginManager implements PluginManager { diff --git a/Spigot-API-Patches/0195-Make-JavaPluginLoader-thread-safe.patch b/Spigot-API-Patches/0195-Make-JavaPluginLoader-thread-safe.patch index 283d4022b8..21dbe589a4 100644 --- a/Spigot-API-Patches/0195-Make-JavaPluginLoader-thread-safe.patch +++ b/Spigot-API-Patches/0195-Make-JavaPluginLoader-thread-safe.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make JavaPluginLoader thread-safe diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 8ff228ced356eb509b93abb7a0d3d9a26dd3e057..ba2c5c6eee6fc9f7c96c3ab304d8a1fc759ccd77 100644 +index de44d850d7b3ab3e528eb6f2de375a6c3e0e5cf9..9d1f7cdf12029c8198792fd299f92be476040222 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -52,6 +52,8 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/0207-Prioritise-own-classes-where-possible.patch b/Spigot-API-Patches/0207-Prioritise-own-classes-where-possible.patch index a96387ed87..fad10c31db 100644 --- a/Spigot-API-Patches/0207-Prioritise-own-classes-where-possible.patch +++ b/Spigot-API-Patches/0207-Prioritise-own-classes-where-possible.patch @@ -25,7 +25,7 @@ The patch in general terms just loads the class in the plugin's jar before it starts looking elsewhere for it. diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index ba2c5c6eee6fc9f7c96c3ab304d8a1fc759ccd77..528ceeb22c55f23259340c29e3c4ed5ece89a118 100644 +index 9d1f7cdf12029c8198792fd299f92be476040222..384edf9890dfbd1cddfdcac4db1ebe9a4d761f78 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -50,6 +50,7 @@ import org.yaml.snakeyaml.error.YAMLException; diff --git a/Spigot-API-Patches/0208-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-API-Patches/0208-Add-Raw-Byte-ItemStack-Serialization.patch index e309f0c798..c4406670d6 100644 --- a/Spigot-API-Patches/0208-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/Spigot-API-Patches/0208-Add-Raw-Byte-ItemStack-Serialization.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization Serializes using NBT which is safer for server data migrations than bukkits format. diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 6f5601639c472db62120bab8d903620ee87f7e5c..70d95e89a050632b2b0e2f477d3c286a3e8db1bd 100644 +index 541e28a9bece0beb0c2cf02c39030840b758c6e6..d3ec5084e33dff038d54cdd2aeb703a3eb25f7a7 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -90,5 +90,9 @@ public interface UnsafeValues { diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index e88b4595f9..d0e2a70921 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -16,7 +16,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 - spigot + paper jar - 1.16-R0.1-SNAPSHOT + 1.15.2-R0.1-SNAPSHOT - Spigot - https://www.spigotmc.org/ + Paper @@ -27,7 +27,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 + UTF-8 unknown - 1.16 + 1.15.2 @@ -19,16 +18,22 @@ diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 315c5c35bd..ae0b5be3e0 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -84,51 +84,6 @@ index 960dce23072bbb5fad36760677f0fe2efb661552..253890e53702f9ba1c6628cc860a4ca1 } public List> g() { -diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java -index ab03b556823a3daee07cc6a57112d01ee52b677f..1cf97cefc9d113583214f340e72b35d5560d1e5d 100644 ---- a/src/main/java/net/minecraft/server/BlockDataAbstract.java -+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java -@@ -29,7 +29,7 @@ public abstract class BlockDataAbstract implements IBlockDataHolder { - } - - private > String a(IBlockState iblockstate, Comparable comparable) { -- return iblockstate.a(comparable); -+ return iblockstate.a((T) comparable); // Paper - decompiler fix - } - }; - protected final O a; -@@ -42,11 +42,11 @@ public abstract class BlockDataAbstract implements IBlockDataHolder { - } - - public > S a(IBlockState iblockstate) { -- return this.set(iblockstate, (Comparable) a(iblockstate.getValues(), this.get(iblockstate))); -+ return this.set(iblockstate, a(iblockstate.getValues(), this.get(iblockstate))); // Paper - decompile fix - } - - protected static T a(Collection collection, T t0) { -- Iterator iterator = collection.iterator(); -+ Iterator iterator = collection.iterator(); // Paper - decompiler fix - - do { - if (!iterator.hasNext()) { -@@ -89,7 +89,7 @@ public abstract class BlockDataAbstract implements IBlockDataHolder { - if (comparable == null) { - throw new IllegalArgumentException("Cannot get property " + iblockstate + " as it does not exist in " + this.a); - } else { -- return (Comparable) iblockstate.b().cast(comparable); -+ return iblockstate.b().cast(comparable); // Paper - decompiler fix - } - } - -@@ -100,7 +100,7 @@ public abstract class BlockDataAbstract implements IBlockDataHolder { - if (comparable == null) { - throw new IllegalArgumentException("Cannot set property " + iblockstate + " as it does not exist in " + this.a); - } else if (comparable == v0) { -- return this; -+ return (S) this; // Paper - decompiler fix - } else { - S s0 = this.e.get(iblockstate, v0); - diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java index e40f9c153b4f1f8f11ea467e6bd8e670959282d6..c88a62f6b72a8851b95587bb49c898569d74e0c6 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 10a690c4bd..adc0c050ca 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2318,11 +2318,11 @@ index eff6ebcd30b538cbaedaa031a46a59ea956253ba..30cbfc8eac20910aa55951e3dce63862 @Override public IBlockData getType(BlockPosition blockposition) { return Blocks.AIR.getBlockData(); -diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java +diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java index 1cf97cefc9d113583214f340e72b35d5560d1e5d..2040f183490d515b913df048ae8ab07bbecaa9a4 100644 --- a/src/main/java/net/minecraft/server/BlockDataAbstract.java +++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java -@@ -78,6 +78,7 @@ public abstract class BlockDataAbstract implements IBlockDataHolder { +@@ -78,6 +78,7 @@ public abstract static class BlockDataAbstract implements IBlockDataHolder { return Collections.unmodifiableCollection(this.d.keySet()); } @@ -3102,7 +3102,7 @@ index bdfb1738539d0e0c9043ecb63950a5e7fce1c532..0b06fa2b664830d40cdb93968bc2f8c9 // CraftBukkit start - fire event setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 9d1adaaa2c0dbd3773f81a1b54aac98fd16ae26d..3ace8ee854c11abd607dc27b93fe61a0982a73de 100644 +index 979e4b9de8cde8fb0209e081a58c5c01cd9dafd3..ff6579cb99dcd93254cae67fe84de0f7c034eaa5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -129,6 +129,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 19951169a7..c947cd4ee5 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1055,7 +1055,7 @@ index 0d8262b1d2722e716f95db4c9a8a132c54b613cf..19d68aa4585ccfc156e9db6024b7a99b protected BlockPosition ag() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3ace8ee854c11abd607dc27b93fe61a0982a73de..690c1ce0f6707b2f5dd787e0fe340af5bd719783 100644 +index ff6579cb99dcd93254cae67fe84de0f7c034eaa5..3fdd7132d483155a574d12b56a2bc3432d16ac63 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -37,7 +37,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -1502,7 +1502,7 @@ index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf43 PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7e8c50aa92e036b88b1fd725021c31846eb06097..79cfcbce85e779fc8e8589840a27961f59209f3d 100644 +index f36ef51158e9c8509465e46e33fe14a5931ac739..c759dd0f9a66dc2fa30746132564a0981037f265 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch index 009e07aa2b..7301f8fdb5 100644 --- a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch @@ -25,7 +25,7 @@ index 098bd3fba867c0e4c6c58748aa6e2e632737a948..912611cf1aeccf5a82a789aab07d7672 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 7783b57912e87ac132bab3d2e85808240f077174..0240cef74aaa7f9fcfea40106267ee2e8d39f133 100644 +index 95d238c82114621cb4e24b4488bba36cb828c241..83d5731b7f964136edf7cfabb96421e0788d067a 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -21,7 +21,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch index c3a72a7fe3..690cd70b6c 100644 --- a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch +++ b/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch @@ -20,7 +20,7 @@ index 2845686411615245137cfe1a155088a865a4d3a0..8ee2b9bb1bce698fce50ac1b3fc477fc + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 740c59004514a332ebe556c4e91f84bd9bf4a11d..b69d84baf8d318968ef171232e493a315f71814b 100644 +index a126a6d22ccee90d0aadb8513bda60455a703bf6..13a759bc823f12daba3de367255079095b2b6df3 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -142,6 +142,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 280e94335b..d05ca8da1b 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -45,7 +45,7 @@ index 1ceba5f7eae58426834d7042af17f7e3b1990a56..ee749863730cb2228712ceddd4e405a7 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 101d5b42e319c010fd7ed043fb17d1f2289ae38f..1ee40506095ed14f50b4b8031bb882e9bea475b5 100644 +index daa65aaf8c9616e5e058f3337fc4fc0895d13364..524c1d4c6d8a45620d534f23f67d75fd8988918b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -200,12 +200,25 @@ public class Main { diff --git a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch index fe41d422f0..e20b49e3fd 100644 --- a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch @@ -23,7 +23,7 @@ index fa6400dccd4df635d696e0858c0c164a0f19b4a4..e2f3cec7420edbd284b531ca7d1d1214 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b69d84baf8d318968ef171232e493a315f71814b..ca3b4c9f2f7e1b5425e8be4c3d11e3e881915e8b 100644 +index 13a759bc823f12daba3de367255079095b2b6df3..12e57818687fe359e752f29f2c7d038c2e4a512f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -665,11 +665,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0032-Optimize-explosions.patch b/Spigot-Server-Patches/0032-Optimize-explosions.patch index 9fafbf0455..52e8789495 100644 --- a/Spigot-Server-Patches/0032-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0032-Optimize-explosions.patch @@ -135,7 +135,7 @@ index c61037c837e29544e3afeb0b23f422073d3f5166..a67c31a6021d881b49cfdb75f514404c } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ca3b4c9f2f7e1b5425e8be4c3d11e3e881915e8b..6dfefa3f9ebf6d2ad08ebe6ddd77ca6d95971544 100644 +index 12e57818687fe359e752f29f2c7d038c2e4a512f..ea27e1fd62ff38fc92e914eb659e29ac836c2b45 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -80,6 +80,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch b/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch index a9babd0de7..0fedfc1b93 100644 --- a/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch @@ -19,7 +19,7 @@ index f038d3f7dc7d1034a3ee9f2384a85642f224836e..25e0717186366af580e512eedfd403b8 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 690c1ce0f6707b2f5dd787e0fe340af5bd719783..d4d60220efdf32ee84eef57a7155e7de513cf029 100644 +index 3fdd7132d483155a574d12b56a2bc3432d16ac63..b3a1199d736798c295c695aea1152ac9d0a30d29 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1073,6 +1073,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch index b50f633927..4d8b8b4b6f 100644 --- a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6dfefa3f9ebf6d2ad08ebe6ddd77ca6d95971544..65fc7105c8c93ccee569abb14ccba3f5cf75a7a8 100644 +index ea27e1fd62ff38fc92e914eb659e29ac836c2b45..8c0cabd9b3d5315c319a4ef7eda9fce688c22584 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -635,9 +635,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch index 4c186c7a87..973a105a91 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch @@ -9,7 +9,7 @@ This is a duplicate API from spigot, so use our duplicate subclass and improve setPosition to use raw diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 79cfcbce85e779fc8e8589840a27961f59209f3d..f8b7ea28694170148027123f889fb93f8647cdc4 100644 +index c759dd0f9a66dc2fa30746132564a0981037f265..6f11111f413914856e6a3622512f00f8a49cdfa2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -119,14 +119,14 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch index 6f61ea2efe..ffdb326a6e 100644 --- a/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Change implementation of (tile)entity removal list use sets for faster removal diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 65fc7105c8c93ccee569abb14ccba3f5cf75a7a8..fc9bbc4fdd371931ea31c061b9bef0c4f91853d9 100644 +index 8c0cabd9b3d5315c319a4ef7eda9fce688c22584..9a9a7ae659dd1aea5111603852fbda9fad707be2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -36,7 +36,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch index ccf79bfb40..06244eb003 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch @@ -80,7 +80,7 @@ index ef779879e33c2f64c325afd3cd411032fb0d63f9..b85e21202eb8bb9446989aa1d6889eed } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 875f353dc3a0f3418b01821abf30e0f1ca32bb4d..fa4ad0b6dcd2cb428d87047340b81594b271e4b2 100644 +index 83707fa6ae5cf4f564760ca0fb5e8c1932d4a91e..7464aeb4e2f2cbe177cfd2ac19c45aabac625632 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -15,6 +15,9 @@ import java.util.function.BooleanSupplier; diff --git a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch index 631beb2a46..24ec7bf891 100644 --- a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch @@ -37,7 +37,7 @@ index 65a421ee6f704af88ba2170930d17b46a9531c28..383805926e60f9f2f77e258e9d51ed07 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d4d60220efdf32ee84eef57a7155e7de513cf029..591bf14a6270a67e0bf705a90869c1223b9b36fd 100644 +index b3a1199d736798c295c695aea1152ac9d0a30d29..e763bf1a6486134fe222865d207359c8b868c008 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -535,6 +535,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch index 1114a1ed89..48d9cf1d80 100644 --- a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6e7d3573ed6f58a9c5f29c8b1b49746f13e21dc7..a721ad8addfd5a47608e304b372762d3ca89fa65 100644 +index 6e4329d21d7877e46369361e55954f2f9371bd6e..7f1f0111373fa409e52894e59ac49d5278d0bd58 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -223,6 +223,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 09ee1b4a66..9ad19a252a 100644 --- a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -44,7 +44,7 @@ index a67c31a6021d881b49cfdb75f514404c342eea45..4c7df81217c10d92d05e619ad760bc5d this.methodProfiler.a(() -> { return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 40a51633ed509ca7ae6131e11276f8f3cb7c03ce..7278242d569dafd99984921a3a3b86de46d8287f 100644 +index 50c2c4b0dc6256d5fbc361ba9b89b4e17bef8acb..9ce4d23aa0af877b383750bbb73b7a93a117d03f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -370,7 +370,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch index 4c750dd271..511f55f7a8 100644 --- a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f8b7ea28694170148027123f889fb93f8647cdc4..87c854d052d32a10ba6f1abc317db083e8f079d4 100644 +index 6f11111f413914856e6a3622512f00f8a49cdfa2..c0c774d17b81109eaaea2ad726629eca902cfd6c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -150,6 +150,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index d88c6fc35b..6ede81f3d3 100644 --- a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7278242d569dafd99984921a3a3b86de46d8287f..491e491895246063c4df38e1a90693bfc730ef33 100644 +index 9ce4d23aa0af877b383750bbb73b7a93a117d03f..1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -440,6 +440,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch index 0e9f14b4f4..6a7d7e006d 100644 --- a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0086-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 491e491895246063c4df38e1a90693bfc730ef33..a3de9ae44acb3736394ac97c730d1b1cc2d5b914 100644 +index 1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14..6647b9aca46b7db5e2466984f14d787a1c5daa10 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -36,7 +36,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch index e79c9532f5..9d9d47c7c0 100644 --- a/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 07c8f38f86a9d1eed95ccddb4c97892b555faf59..56c8b56b06a67e90c05f21c8141e61df7c9aafb1 100644 +index d6ef12f1d65e8ab8b1c41bcf06f022f3193df15f..9ba0bf40f823003a5966244e7cdde4e3e11da9ec 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -924,10 +924,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch index 2f5565d730..22ea8b2f2c 100644 --- a/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch +++ b/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch @@ -77,7 +77,7 @@ index 98a255ae578d4cdc6c0081c5fe7991a8a9b574f2..4c3062ece97409056b614cf36fefea22 public RedstoneUpdateInfo(BlockPosition blockposition, long i) { this.a = blockposition; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a3de9ae44acb3736394ac97c730d1b1cc2d5b914..fd8724c755d4129c0f3fbd6e0730def09dba1e55 100644 +index 6647b9aca46b7db5e2466984f14d787a1c5daa10..5dd504ea0b0d0ca7e7cd8c33473177f95c54bd8c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -84,6 +84,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0104-Add-server-name-parameter.patch b/Spigot-Server-Patches/0104-Add-server-name-parameter.patch index 0d4fa9b3aa..7fa217b96d 100644 --- a/Spigot-Server-Patches/0104-Add-server-name-parameter.patch +++ b/Spigot-Server-Patches/0104-Add-server-name-parameter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 1ee40506095ed14f50b4b8031bb882e9bea475b5..afbe711acbd1cbaf307513d4fede44bb17b3caae 100644 +index 524c1d4c6d8a45620d534f23f67d75fd8988918b..18a945ea8674390d294e2a978c78ee2b53039aed 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -137,6 +137,14 @@ public class Main { diff --git a/Spigot-Server-Patches/0109-More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/0109-More-informative-vehicle-moved-wrongly-message.patch index ebef2819e2..44c53269c3 100644 --- a/Spigot-Server-Patches/0109-More-informative-vehicle-moved-wrongly-message.patch +++ b/Spigot-Server-Patches/0109-More-informative-vehicle-moved-wrongly-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More informative vehicle moved wrongly message diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ac5e6f9e0dd9ea62c93076f2810bcfb4dba9a83d..4aaa5e4dd02fe8b3db512facf8465c1f8d2d8c62 100644 +index f9b77ec31b466687eaef2b952b01a2dcf38605c1..c00ada6c10529fd50b0d7fbb1763b6e09287a1fc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -365,7 +365,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0111-Optimise-BlockState-s-hashCode-equals.patch b/Spigot-Server-Patches/0111-Optimise-BlockState-s-hashCode-equals.patch index 4db5da51d8..6df5b76c40 100644 --- a/Spigot-Server-Patches/0111-Optimise-BlockState-s-hashCode-equals.patch +++ b/Spigot-Server-Patches/0111-Optimise-BlockState-s-hashCode-equals.patch @@ -8,20 +8,20 @@ object identity checks safely. Use a simpler optimized hashcode -diff --git a/src/main/java/net/minecraft/server/BlockState.java b/src/main/java/net/minecraft/server/BlockState.java +diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java index 0ce77d9230f3d1c53df7c5b72a380a2fa0c6d882..00e67b567f00824b25b45e5ff5ecd62c87ea0309 100644 ---- a/src/main/java/net/minecraft/server/BlockState.java -+++ b/src/main/java/net/minecraft/server/BlockState.java -@@ -28,23 +28,13 @@ public abstract class BlockState> implements IBlockState +--- a/src/main/java/net/minecraft/server/IBlockState.java ++++ b/src/main/java/net/minecraft/server/IBlockState.java +@@ -28,23 +28,13 @@ public abstract class IBlockState> } public boolean equals(Object object) { - if (this == object) { - return true; -- } else if (!(object instanceof BlockState)) { +- } else if (!(object instanceof IBlockState)) { - return false; - } else { -- BlockState blockstate = (BlockState) object; +- IBlockState blockstate = (IBlockState) object; - - return this.a.equals(blockstate.a) && this.b.equals(blockstate.b); - } @@ -44,7 +44,7 @@ diff --git a/src/main/java/net/minecraft/server/BlockStateBoolean.java b/src/mai index d8738447d794f6967307daa1271473903b76a632..7ca302b522df081755120c597a08d589193c57a6 100644 --- a/src/main/java/net/minecraft/server/BlockStateBoolean.java +++ b/src/main/java/net/minecraft/server/BlockStateBoolean.java -@@ -30,8 +30,7 @@ public class BlockStateBoolean extends BlockState { +@@ -30,8 +30,7 @@ public class BlockStateBoolean extends IBlockState { return obool.toString(); } @@ -58,7 +58,7 @@ diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/j index 1486d460c8ec3d117b4dc3d28b2c3f1b632e187b..7cdadc6b6abd069f9a1bc000a8f116f73b90e029 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java -@@ -49,8 +49,7 @@ public class BlockStateEnum & INamable> extends BlockState +@@ -49,8 +49,7 @@ public class BlockStateEnum & INamable> extends IBlockState return ((INamable) t0).getName(); } @@ -72,7 +72,7 @@ diff --git a/src/main/java/net/minecraft/server/BlockStateInteger.java b/src/mai index 6f35c365f9086a2289e17b4d8e73757ad2c7f87b..0499a71705f3bdac6c94a8dc340cc15e96d9586e 100644 --- a/src/main/java/net/minecraft/server/BlockStateInteger.java +++ b/src/main/java/net/minecraft/server/BlockStateInteger.java -@@ -38,8 +38,7 @@ public class BlockStateInteger extends BlockState { +@@ -38,8 +38,7 @@ public class BlockStateInteger extends IBlockState { return this.a; } diff --git a/Spigot-Server-Patches/0112-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0112-Configurable-packet-in-spam-threshold.patch index af1a5acf01..03383c0c01 100644 --- a/Spigot-Server-Patches/0112-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0112-Configurable-packet-in-spam-threshold.patch @@ -23,7 +23,7 @@ index 53f96a1576582fce83999a1f7e9a2624506ed51f..010b17d2e7a27ace6ff8b15edff577c4 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4aaa5e4dd02fe8b3db512facf8465c1f8d2d8c62..eec425abe1fd4c9730ab843d003267740216b050 100644 +index c00ada6c10529fd50b0d7fbb1763b6e09287a1fc..6a6739bba0ad9a5fadac7a49e698c2435200c1fc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1204,13 +1204,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0113-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0113-Configurable-flying-kick-messages.patch index d5362c5064..fa29bc96ad 100644 --- a/Spigot-Server-Patches/0113-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0113-Configurable-flying-kick-messages.patch @@ -21,7 +21,7 @@ index 010b17d2e7a27ace6ff8b15edff577c4164d2e81..5a83fc21cb6801d597a01fb4a83d3048 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index eec425abe1fd4c9730ab843d003267740216b050..eb3ed0d8757c59b387cd74a6df7371c356bd6d3a 100644 +index 6a6739bba0ad9a5fadac7a49e698c2435200c1fc..7ed21a99e9025837bc5c38efa542df85dc2eb248 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -147,7 +147,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0118-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0118-Add-EntityZapEvent.patch index 5e2b15d0cb..1a72bb4223 100644 --- a/Spigot-Server-Patches/0118-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0118-Add-EntityZapEvent.patch @@ -39,7 +39,7 @@ index f72347050302e4cb99d4c9b71b7e8acab545ea59..5e3835851d8c5e804542c256a54187e4 entitywitch.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entitywitch)), 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 b04ce0ee06ec21f87d605904e602ddc8d45a2aae..d739605ded8d81632c491af92322e02b4716c0b1 100644 +index 37b0776ed580995024008e81254b8a8516641e3f..26e29e0f37b9d4f23b4928c5aeef1da184efe3fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1053,6 +1053,14 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0123-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0123-Add-source-to-PlayerExpChangeEvent.patch index 2d229c5916..8ef90a2803 100644 --- a/Spigot-Server-Patches/0123-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/0123-Add-source-to-PlayerExpChangeEvent.patch @@ -18,7 +18,7 @@ index f72bb0c13806c3fadcbbf345f3533c115a200a7f..0447800d9dc341af647a928abd8b7993 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 d739605ded8d81632c491af92322e02b4716c0b1..0c79171ba166846c7136ec6e89fd2a41f99ed260 100644 +index 26e29e0f37b9d4f23b4928c5aeef1da184efe3fc..d9997278d335901138ff8bd29faaf88d4e0f36cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -117,6 +117,7 @@ import org.bukkit.entity.ThrownPotion; diff --git a/Spigot-Server-Patches/0125-Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/0125-Add-ProjectileCollideEvent.patch index a424564583..998300bfa5 100644 --- a/Spigot-Server-Patches/0125-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0125-Add-ProjectileCollideEvent.patch @@ -93,7 +93,7 @@ index 2e4c9d42677d3e48a8f8ad559a723fc4eeec07e3..724b78b5d2d7f4ce8de31c763d2d95b9 this.c(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition()); } else { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0c79171ba166846c7136ec6e89fd2a41f99ed260..48008ca8b7632a9cfbf78ee8a142af9c8e2e91b6 100644 +index d9997278d335901138ff8bd29faaf88d4e0f36cf..f1a4de57282f3553f34245122bf15130420f558b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1157,6 +1157,16 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0127-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0127-Optimize-World.isLoaded-BlockPosition-Z.patch index 8a7422d28f..8eb7ae2704 100644 --- a/Spigot-Server-Patches/0127-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0127-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index fd8724c755d4129c0f3fbd6e0730def09dba1e55..184ea74726078809ae1b6df320d37532fa0d26ab 100644 +index 5dd504ea0b0d0ca7e7cd8c33473177f95c54bd8c..203c4173ff2467a027da059b2d473ec1a90bb88b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -225,6 +225,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0132-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0132-Properly-fix-item-duplication-bug.patch index 38e21f3efd..777cb2cbff 100644 --- a/Spigot-Server-Patches/0132-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0132-Properly-fix-item-duplication-bug.patch @@ -19,7 +19,7 @@ index 482d7b7cb6b89d79b2ce54338130481f9f1c8c24..bf32997c422d478699c32ce0539a65c3 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index eb3ed0d8757c59b387cd74a6df7371c356bd6d3a..fbaf234e8400dc14dc2421c87c80eb887ba44fef 100644 +index 7ed21a99e9025837bc5c38efa542df85dc2eb248..d6f5f176d4b5a39ddea4a9dc31a2322cc7d9d2d0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2526,7 +2526,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0136-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0136-Provide-E-TE-Chunk-count-stat-methods.patch index 7eb6fa96ad..28a446b8df 100644 --- a/Spigot-Server-Patches/0136-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0136-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3f420be58afb3721cef9caa413a2292a57406d19..32e96bc05704f10ac4830a661bd6abb71b71f487 100644 +index 1e4f45ef7e10156d6a48d907490009123028bff2..4ca9ddacb7da760b31d405e77b691ef6d8ff534a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -278,6 +278,48 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0137-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0137-Enforce-Sync-Player-Saves.patch index 8f197b5f9e..ba5eace7d2 100644 --- a/Spigot-Server-Patches/0137-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0137-Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index aeb0a77d9aaf3877310528286a481f71fd5a4290..a97941d1f8a125c6d033b1d359c1527937f97799 100644 +index 0f09cacf6d67dab5bc7962f19fcf3eba85ada4ff..18c81bdcf206ecaa331cc5186a29ad321870b57f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -918,11 +918,13 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 570232f963..aef7659aec 100644 --- a/Spigot-Server-Patches/0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -147,7 +147,7 @@ index 807ec3394db7bef29bf92f2c200fd76f96df03ab..73f5961aa331aa94fbbc57c5b4db9bc4 // CraftBukkit end if (itemstack1.getItem().a(TagsItem.FISHES)) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 56c8b56b06a67e90c05f21c8141e61df7c9aafb1..306435c1c6f28ad1a891d4ee8c124b14a83ae25b 100644 +index 9ba0bf40f823003a5966244e7cdde4e3e11da9ec..78785c11166e3541ee9ad1615c5e6fa46cfea523 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1379,7 +1379,8 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0140-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0140-Cap-Entity-Collisions.patch index fdb5db8220..6fd28f793a 100644 --- a/Spigot-Server-Patches/0140-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0140-Cap-Entity-Collisions.patch @@ -39,7 +39,7 @@ index 63649936525efd33f50c602f6d723085edb2896e..0b971ad8addd65850162e46707c15fbc // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 306435c1c6f28ad1a891d4ee8c124b14a83ae25b..639d113de3fa1bbb610c596b84121ccde58f2622 100644 +index 78785c11166e3541ee9ad1615c5e6fa46cfea523..f4d68a5f0a6d28f278596cb6787d070bacd792a4 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2626,8 +2626,11 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0143-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0143-Do-not-let-armorstands-drown.patch index a23d9d8a1e..2be226b132 100644 --- a/Spigot-Server-Patches/0143-Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/0143-Do-not-let-armorstands-drown.patch @@ -20,7 +20,7 @@ index 176af6c889fa29d5df7c822f888cdc26f81110e6..992d7bfb0fd26540fbdeaf8d7845e8c2 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 639d113de3fa1bbb610c596b84121ccde58f2622..e6b48cc0eafc4612181495a1f412fd4f411ab0e5 100644 +index f4d68a5f0a6d28f278596cb6787d070bacd792a4..28d873d8fe7bb79d2a84eb9bf234ac8ba0223813 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -227,6 +227,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0144-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0144-Properly-handle-async-calls-to-restart-the-server.patch index 424206522e..7781480243 100644 --- a/Spigot-Server-Patches/0144-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0144-Properly-handle-async-calls-to-restart-the-server.patch @@ -73,7 +73,7 @@ index 629304c403c596bf81dd8de919f0fcb5c77bd403..80d8b0b0eac47b8d8e62db60da9daf0d // Spigot Start private static double calcTps(double avg, double exp, double tps) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a97941d1f8a125c6d033b1d359c1527937f97799..940c3acfa0dee0d454a1cc10dd3ca3862fd7b030 100644 +index 18c81bdcf206ecaa331cc5186a29ad321870b57f..d6af965c9d391ee802d0d65110fe62f1eacbac98 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1031,10 +1031,15 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0146-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/0146-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index e346d63b72..c5d23873a9 100644 --- a/Spigot-Server-Patches/0146-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/0146-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -39,7 +39,7 @@ index 0e8ba05455161883c86df6606104fab3529c3c0c..ad79e4521cee699de86a94885b273563 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index fbaf234e8400dc14dc2421c87c80eb887ba44fef..08211fd37ab7916586c0579cfb9c014c29553991 100644 +index d6f5f176d4b5a39ddea4a9dc31a2322cc7d9d2d0..26f894c752d623ed082f97fdbffe5a6680a941b7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1773,6 +1773,13 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0148-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0148-Use-TerminalConsoleAppender-for-console-improvements.patch index 561fe6d2d0..2e701fd660 100644 --- a/Spigot-Server-Patches/0148-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0148-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -245,7 +245,7 @@ index 80d8b0b0eac47b8d8e62db60da9daf0da8671fb3..ed32242bd169e9f28607942aa31aa48a public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index da5220728afbed353432b4c0399138d47f678ed1..63838572f60c9413b9531197b96783f3c77bd0f8 100644 +index d6af965c9d391ee802d0d65110fe62f1eacbac98..6b669f0f632418d36617c980b01cfcd0ef7487c2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -76,8 +76,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0162-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0162-ProfileWhitelistVerifyEvent.patch index a57bf98a3d..22b195fadf 100644 --- a/Spigot-Server-Patches/0162-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0162-ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0b403f08bed136916969b927c04078c14697803e..1800a6c86b2150b8183acdce3a7f6daa1c9a350b 100644 +index 6b669f0f632418d36617c980b01cfcd0ef7487c2..46ea6d8e487d0c051780b0bdb06622e515cd987f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -509,9 +509,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0163-Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/0163-Fix-this-stupid-bullshit.patch index e5fb521c2e..9f78361c93 100644 --- a/Spigot-Server-Patches/0163-Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/0163-Fix-this-stupid-bullshit.patch @@ -9,7 +9,7 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index fc07fdb590475ccaa09875b8fcbb81adc0db5e66..bf0a020189425d6507fa75f68f8e754723c58818 100644 +index c3641ca48bfe4051f6450c891ccd4dd023257cb5..9b4f01120d473a4fea993a5df952e265b33cde0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -218,10 +218,12 @@ public class Main { diff --git a/Spigot-Server-Patches/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 927fe63722..00698ecb31 100644 --- a/Spigot-Server-Patches/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 184ea74726078809ae1b6df320d37532fa0d26ab..08f22545393148e91bec3d4a091092eab6828711 100644 +index 203c4173ff2467a027da059b2d473ec1a90bb88b..d8509ccdb01be022d5aa216b05fd97faeebd53a9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -648,7 +648,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0168-LivingEntity-setKiller.patch b/Spigot-Server-Patches/0168-LivingEntity-setKiller.patch index 7389c25b87..5c8b4eb3c0 100644 --- a/Spigot-Server-Patches/0168-LivingEntity-setKiller.patch +++ b/Spigot-Server-Patches/0168-LivingEntity-setKiller.patch @@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index e6b48cc0eafc4612181495a1f412fd4f411ab0e5..88688be66880d406705a89efabbd7c509b7e7b8c 100644 +index 28d873d8fe7bb79d2a84eb9bf234ac8ba0223813..ca2620548c7c80beab09554b96d8e55e499614f8 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -80,7 +80,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0173-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0173-Add-PlayerJumpEvent.patch index b9446e8ea0..f46cc03fa4 100644 --- a/Spigot-Server-Patches/0173-Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/0173-Add-PlayerJumpEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 08211fd37ab7916586c0579cfb9c014c29553991..8da65ed9d96bc7fa3ebac27c2ac35c3bc97fd1f1 100644 +index 26f894c752d623ed082f97fdbffe5a6680a941b7..2fd9f9ceddd108f0d733ea481d5b5c7d4506329c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,8 @@ import org.bukkit.inventory.CraftingInventory; diff --git a/Spigot-Server-Patches/0174-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0174-handle-PacketPlayInKeepAlive-async.patch index f791ff0f87..da0e511ec9 100644 --- a/Spigot-Server-Patches/0174-handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/0174-handle-PacketPlayInKeepAlive-async.patch @@ -15,7 +15,7 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 8da65ed9d96bc7fa3ebac27c2ac35c3bc97fd1f1..1e81032f3118fb0c572ffe1ac975e60d30f94d67 100644 +index 2fd9f9ceddd108f0d733ea481d5b5c7d4506329c..7512764532fc3403cf1daa31079fe739820facde 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2487,14 +2487,18 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0176-revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/0176-revert-serverside-behavior-of-keepalives.patch index a39e2c78af..a7aa14f47b 100644 --- a/Spigot-Server-Patches/0176-revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/0176-revert-serverside-behavior-of-keepalives.patch @@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1e81032f3118fb0c572ffe1ac975e60d30f94d67..be52533ef59c7a21119b8308247a5c8092a7db26 100644 +index 7512764532fc3403cf1daa31079fe739820facde..7d0fa2efe876d5de8b4bafd2be1a1323ea630410 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -70,7 +70,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch index ecbbf5a655..3b4cf3e485 100644 --- a/Spigot-Server-Patches/0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -72,7 +72,7 @@ index 8e5edd2c9b7cc9a441969efeb666061515188486..542f935b4e7a027b3df82f037fcd6523 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 08f22545393148e91bec3d4a091092eab6828711..b3e01415110d6a714b6cd5a94bf747a1481d72ab 100644 +index d8509ccdb01be022d5aa216b05fd97faeebd53a9..4e41b4262971401d90a96cd7710890e5048d5b63 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -585,6 +585,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0178-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0178-Option-for-maximum-exp-value-when-merging-orbs.patch index 0cdf0fc353..8e9e680006 100644 --- a/Spigot-Server-Patches/0178-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0178-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -20,7 +20,7 @@ index 39ab5457569684bc66cd67f5f9d2505ef9f304ab..d2582d981f859b55ba5086540963c01e + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 48008ca8b7632a9cfbf78ee8a142af9c8e2e91b6..90349d76a77a13094ca6476cc0dafaf526187946 100644 +index f1a4de57282f3553f34245122bf15130420f558b..d012376c134886cdf692bfe29e6154a618f932ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -550,16 +550,32 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch index 1100cc9e16..b867534ca7 100644 --- a/Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch +++ b/Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 88688be66880d406705a89efabbd7c509b7e7b8c..c5c0fc3877fa6c8602e4468d5702612d986891f9 100644 +index ca2620548c7c80beab09554b96d8e55e499614f8..f5da67fd8908f027835b837a8b847e27c3638790 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0181-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0181-use-CB-BlockState-implementations-for-captured-block.patch index 89e508c6ed..ca68041251 100644 --- a/Spigot-Server-Patches/0181-use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/0181-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b3e01415110d6a714b6cd5a94bf747a1481d72ab..08bed18ad6f78c6aad444eeb5a321887d90e5829 100644 +index 4e41b4262971401d90a96cd7710890e5048d5b63..6603392f475f0bfe7af259a54ba9bb3469c18541 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -66,7 +66,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0182-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0182-API-to-get-a-BlockState-without-a-snapshot.patch index cb6a1928fe..6f6ca899dc 100644 --- a/Spigot-Server-Patches/0182-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0182-API-to-get-a-BlockState-without-a-snapshot.patch @@ -39,7 +39,7 @@ index 630b279158f26902ebdcc6e5c810b189ce49c910..958279249fdadfe5c2808d2a046636f0 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 6bf73af21ceb52708013b1e25373fa42ddbefb2b..30b7c9038d3a95b80304e052a5d629b461f76e99 100644 +index 5a1629a19f082235f91913736d78509d44f8fd67..dd0bccd6995a79c52ec20cf45df27bb7ed06a5e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -308,6 +308,20 @@ public class CraftBlock implements Block { diff --git a/Spigot-Server-Patches/0183-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0183-AsyncTabCompleteEvent.patch index bbf50969bb..cd18e4ad58 100644 --- a/Spigot-Server-Patches/0183-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0183-AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index be52533ef59c7a21119b8308247a5c8092a7db26..5cb402156dc29eb27b17266490f2a5ff88ba9dea 100644 +index 7d0fa2efe876d5de8b4bafd2be1a1323ea630410..c256e798d12098881cb5bfb655eab5b63f1614e7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -524,10 +524,10 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0186-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0186-ExperienceOrbMergeEvent.patch index fc73d734f2..7a67c40952 100644 --- a/Spigot-Server-Patches/0186-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0186-ExperienceOrbMergeEvent.patch @@ -8,7 +8,7 @@ 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 90349d76a77a13094ca6476cc0dafaf526187946..43965bea87e5884fa0f6b7838abbade08ce5c536 100644 +index d012376c134886cdf692bfe29e6154a618f932ea..6d7236d3dcdb70cc1f33f462d08e78720045ccd0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -560,7 +560,7 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0191-Add-setPlayerProfile-API-for-Skulls.patch b/Spigot-Server-Patches/0191-Add-setPlayerProfile-API-for-Skulls.patch index b2286d9154..02559230ee 100644 --- a/Spigot-Server-Patches/0191-Add-setPlayerProfile-API-for-Skulls.patch +++ b/Spigot-Server-Patches/0191-Add-setPlayerProfile-API-for-Skulls.patch @@ -48,7 +48,7 @@ index 20588598386a4f479e6a58b294149bed789c63ce..ecc32c2fb1e8e1ac03074102b982adb4 public BlockFace getRotation() { BlockData blockData = getBlockData(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 35eda0a03cfec244103cfe4b998f9d2b9322fe69..109edb76618025651d05689d9db52248220550ca 100644 +index c31011ff91f4ea8368e3afbc5ec07eff84e93fe2..21e7a661739da84e6ec7a20c81cefcb0440484a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -3,6 +3,8 @@ package org.bukkit.craftbukkit.inventory; diff --git a/Spigot-Server-Patches/0201-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0201-Implement-extended-PaperServerListPingEvent.patch index 14a54576e3..a59630a807 100644 --- a/Spigot-Server-Patches/0201-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0201-Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4a513aaea587414cf6abc1c136e52420d59688d8..d1667eba3398efecc8913c2778931030a90d6195 100644 +index 54f80cb8e1b771f2a493543e04f8bc8346a391dc..e7ee0e9b9b68f1fe31e189fbfd7e5b175a288a50 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1,6 +1,9 @@ diff --git a/Spigot-Server-Patches/0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index 545295c55c..fa360cc099 100644 --- a/Spigot-Server-Patches/0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5cb402156dc29eb27b17266490f2a5ff88ba9dea..ab9ab7a88dde29ac141753e1f1e9c0ff87d199cd 100644 +index c256e798d12098881cb5bfb655eab5b63f1614e7..a357b6167405be4034cf3dad4124827e04278366 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2502,7 +2502,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index 62612213b1..5f08c8d0fe 100644 --- a/Spigot-Server-Patches/0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -72,7 +72,7 @@ index 7be41c8698e86727978db7d72b3dd3fbfe6b7272..60a47bccca5bc77039c0bec94eb329b3 event.getProjectile().remove(); return; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 43965bea87e5884fa0f6b7838abbade08ce5c536..3a897cf5903539e1099f1a9ec98f1e157437fee0 100644 +index 6d7236d3dcdb70cc1f33f462d08e78720045ccd0..b9e011256f0c8f67808ebebb5e9dc63d3358849f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -52,6 +52,7 @@ import net.minecraft.server.GeneratorAccess; diff --git a/Spigot-Server-Patches/0233-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0233-Implement-EntityKnockbackByEntityEvent.patch index 2b57a2e338..5e2f5954c3 100644 --- a/Spigot-Server-Patches/0233-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0233-Implement-EntityKnockbackByEntityEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 8f6fe004a40b693d1a9945dcab0625c5e9346c01..c1e6792e0d75647108127bcf43bdc9e7bf18aea3 100644 +index 1a1d608f5acfc92e3e55e53f63c9da6ab0aa6a0a..2a567dca19034ed9071ef09b5371eabb5fff557c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1421,6 +1421,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch index cdd72c5f12..f3b5d4e6a0 100644 --- a/Spigot-Server-Patches/0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,7 +16,7 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index eb53d8bb5c36482c39afeb6c324a620d2c7b21fb..4fb5c47fc8505c6a6e68d21a240887a0cbe10d14 100644 +index 0c9e46a8973436a4438730a49986c88f12829be1..a46ef5e72d03a32e22cfd77b2581de70edcc686a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1950,6 +1950,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 18a7c99300..8ea3b8bb72 100644 --- a/Spigot-Server-Patches/0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -40,7 +40,7 @@ index 7804cc0f6a02d14f4adbe05b37e8470a382c0d26..4ee26ff08f7a058648ab54f0dcd81b46 protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 08bed18ad6f78c6aad444eeb5a321887d90e5829..9a001a2a7934dc87f3e57d3388a8a888ec43908b 100644 +index 6603392f475f0bfe7af259a54ba9bb3469c18541..fb719c5e18bcfa0e424c67c6b23c5abedd234f79 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -63,6 +63,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 036d18d06a..50bfc2319b 100644 --- a/Spigot-Server-Patches/0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -19,7 +19,7 @@ index 387e0dcb9f01ad947daaa19211331a96742ce004..eaaa51e4bf761f41fd516402ce1ad0f9 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9a001a2a7934dc87f3e57d3388a8a888ec43908b..688d98dd1e6e5d2e17c8fc04e105fdc0ee649574 100644 +index fb719c5e18bcfa0e424c67c6b23c5abedd234f79..52d0b9e37b222274cccd2a7a872f61a6a72f2f06 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -782,6 +782,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch index 9d2d19bd03..273b9575ca 100644 --- a/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch @@ -97,7 +97,7 @@ index 0e30d8c9933dc6595b9715ef6dc99cc8910892cb..335142ec0dfad822cfe40877e99dec0f if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c(new IllegalArgumentException()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 688d98dd1e6e5d2e17c8fc04e105fdc0ee649574..037770cde15a72192f0f45fdac33f8bd66ba646c 100644 +index 52d0b9e37b222274cccd2a7a872f61a6a72f2f06..2db91e85bd5e95d15b607a96114f33b6e7687b19 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -153,6 +153,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -148,7 +148,7 @@ index 688d98dd1e6e5d2e17c8fc04e105fdc0ee649574..037770cde15a72192f0f45fdac33f8bd public boolean p_() { 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 6ca6ba46d0dd511072f518baa3aae6dc8281ef66..0125bf43e3383fddf7c36d831d19cca3f1ee3fae 100644 +index 4a76402c01dfe6525bae8728da2dde6e5d673765..dccc187c6198ce2e8824b8460347586ccf5c6741 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1179,6 +1179,14 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0257-EntityTransformedEvent.patch b/Spigot-Server-Patches/0257-EntityTransformedEvent.patch index 5b5b04366c..53a2e0a865 100644 --- a/Spigot-Server-Patches/0257-EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/0257-EntityTransformedEvent.patch @@ -29,7 +29,7 @@ index 6ca4fa43c41ad555c093b90cf08cfdb1e73fda22..6e0020ae0b4d2f2597843129b83fff0d // CraftBukkit end this.die(); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 0240cef74aaa7f9fcfea40106267ee2e8d39f133..31aba6bfc3c196cc0c664c0e139f0f8eb7c804b4 100644 +index 83d5731b7f964136edf7cfabb96421e0788d067a..97a1dedf7460d513a560d722b2e0f1bf09fe669c 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -257,6 +257,7 @@ public class EntityZombie extends EntityMonster { @@ -49,7 +49,7 @@ index 0240cef74aaa7f9fcfea40106267ee2e8d39f133..31aba6bfc3c196cc0c664c0e139f0f8e this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java -index 91cac5d53035d5ba6fca14549bc373bc36347f23..8082fa617a10448ce81b82045e1619311aca2f4b 100644 +index 5c2d132c3a495650c5c279065e6659a88de0421d..b1818d269a78b6cb5594dd2f21c91ab1452649f7 100644 --- a/src/main/java/net/minecraft/server/EntityZombieVillager.java +++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java @@ -197,6 +197,7 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo diff --git a/Spigot-Server-Patches/0265-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0265-Break-up-and-make-tab-spam-limits-configurable.patch index b078dbfe95..4158686238 100644 --- a/Spigot-Server-Patches/0265-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0265-Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,7 +45,7 @@ index 26ab855dcf38446a3d8577108bd16fdbb76126b2..adef07d4d521b4aaa6f3389b04aa27e2 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4fb5c47fc8505c6a6e68d21a240887a0cbe10d14..94469cf71f6617cd4fd9682781c8a3ef04ff3f9b 100644 +index a46ef5e72d03a32e22cfd77b2581de70edcc686a..e7ad580740bab3e102f32bd715c6b01a0e721e09 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0266-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0266-Add-hand-to-bucket-events.patch index 6ef868cfa4..2a6aeb13c4 100644 --- a/Spigot-Server-Patches/0266-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0266-Add-hand-to-bucket-events.patch @@ -69,7 +69,7 @@ index 7c5c0498435e3fae6a7997e34f197d402daa3bd8..ffe4b9eb868ecd9582ba1d3fc3aef0f8 ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0125bf43e3383fddf7c36d831d19cca3f1ee3fae..4329780e9de3337fd8fcca78b1ed8804e4687552 100644 +index dccc187c6198ce2e8824b8460347586ccf5c6741..2e859c32b5a7d314e38221da75d785ff244224ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -381,6 +381,20 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch index d26dddde1a..6d75986eeb 100644 --- a/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch @@ -80,7 +80,7 @@ index 3a1d0deb0dec880d73185690e2a7c769a2731479..1fcbbd698a7e1b9ae3e8b5fa0328b85c this.g.add(nbttagcompound); } diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 177cceb77f8783fe93ba7e4342de9c589f155c1b..0882d82cef92382cd4639ee7c9858fa5d59b3e5a 100644 +index 83faa9dc5f74df4609cab34a66e4feed12990463..93030a7b24d53953b3672a23816dfc02d3c74caf 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java @@ -142,9 +142,37 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa diff --git a/Spigot-Server-Patches/0269-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0269-Add-Early-Warning-Feature-to-WatchDog.patch index 736e84fac2..8f436a04a9 100644 --- a/Spigot-Server-Patches/0269-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0269-Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,7 +36,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d1667eba3398efecc8913c2778931030a90d6195..b7c83cd82ca1c9b6bdaaf566e800b8d15ad7d966 100644 +index e7ee0e9b9b68f1fe31e189fbfd7e5b175a288a50..3b89f62ab0522d23f47fd59c2f06fa7d0eacb7af 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -873,6 +873,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 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 4329780e9de3337fd8fcca78b1ed8804e4687552..91cfc6966e19a8d3d3b2cafdb0464162c9a94de5 100644 +index 2e859c32b5a7d314e38221da75d785ff244224ad..6ea8650d23b9fa8826142f0de3556db14c301f61 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -757,9 +757,16 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0290-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0290-Allow-chests-to-be-placed-with-NBT-data.patch index 5f1e4fec78..84600cf4ed 100644 --- a/Spigot-Server-Patches/0290-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/0290-Allow-chests-to-be-placed-with-NBT-data.patch @@ -17,7 +17,7 @@ index 0b0c3c681c07cf8506df1b91b1feaf130891a440..d953cdef14a9b62833a35a4fe94a22b5 for (BlockState blockstate : blocks) { blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index c4766f729fed7c9da9e456cae044400e2d08400c..b22bd06e27b3e07f1eb3e729686c394602a0ba5c 100644 +index eb2b6ff8fd86233c434882c69a8890adc9861d4b..9a5f2da8c073f9b249edac98b0990615a9efb0e2 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -292,7 +292,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic diff --git a/Spigot-Server-Patches/0298-Support-Overriding-World-Seeds.patch b/Spigot-Server-Patches/0298-Support-Overriding-World-Seeds.patch index c43edf6010..2ff8415988 100644 --- a/Spigot-Server-Patches/0298-Support-Overriding-World-Seeds.patch +++ b/Spigot-Server-Patches/0298-Support-Overriding-World-Seeds.patch @@ -59,7 +59,7 @@ index 214b577b326bc794fa3721deb6171228dd4f25e6..559e6b42ba5bf0ea92cccbabd2ef1d4c + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b7c83cd82ca1c9b6bdaaf566e800b8d15ad7d966..acc5f01d022e49348de0079a9a89455cffc255ee 100644 +index 3b89f62ab0522d23f47fd59c2f06fa7d0eacb7af..85f989829b5ad1d7681b57cf68519a4806b26ea1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -378,7 +378,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index db31b17b87084c47402f5452872f385629c58382..0d5731429abe7b4ff97d6644ff088063dde19e60 100644 +index 07729667f5c66bbcb85fc59cb5fa3c218efa2ec8..2a3d133e51326b0088af2ce53e09bf2fe4b0c3c6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -339,6 +339,29 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0366-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0366-Fix-CB-call-to-changed-postToMainThread-method.patch index 66621d2e85..977e0e6456 100644 --- a/Spigot-Server-Patches/0366-Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/Spigot-Server-Patches/0366-Fix-CB-call-to-changed-postToMainThread-method.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 20cc434b2120c52c9a5786c67b773f65d286c4a9..96d26b45851c4066978186d49eed7ee131cc9140 100644 +index 266aa79420238d144a07022aab4a3ced5b0707e4..a5700a955b6d7927228a14128860b49e79e61f03 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -286,7 +286,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0373-Fix-some-generation-concurrency-issues.patch b/Spigot-Server-Patches/0373-Fix-some-generation-concurrency-issues.patch index 2c074157e1..016b1f23c8 100644 --- a/Spigot-Server-Patches/0373-Fix-some-generation-concurrency-issues.patch +++ b/Spigot-Server-Patches/0373-Fix-some-generation-concurrency-issues.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix some generation concurrency issues diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ee08cdcffc9237ee4154b7c756ba032b7723bd1f..74709dff3f87e929f1583be524d4e53ad3be6728 100644 +index a59a965104a2c2977fa3b3d0a199913df268bbd3..69db339c29c8f06026f05b0b5bb8019099af3fdf 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -86,6 +86,23 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch index 17fbd8dcbe..9609100498 100644 --- a/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch @@ -96,7 +96,7 @@ index b774d2d8d903acc1ce4c5bd9240b2e96779e1d53..adf0913a0ecc3eaf330bee303d9cc7fb return this.D; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 30b7c9038d3a95b80304e052a5d629b461f76e99..1fc7f55fcaa1f9aaa4c675f9fcd508ffb80e9629 100644 +index dd0bccd6995a79c52ec20cf45df27bb7ed06a5e6..16349e8e796c5e7e4e43fb355d4d641df7f41dc9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -704,4 +704,11 @@ public class CraftBlock implements Block { diff --git a/Spigot-Server-Patches/0377-Chunk-debug-command.patch b/Spigot-Server-Patches/0377-Chunk-debug-command.patch index e327853d6c..ad712dc109 100644 --- a/Spigot-Server-Patches/0377-Chunk-debug-command.patch +++ b/Spigot-Server-Patches/0377-Chunk-debug-command.patch @@ -185,7 +185,7 @@ index 5acad8e44f024d3ddf5ef4fd320460ac516e0fb8..af810987846efcd2bffbd23c31481b2d * Ported from MinecraftForge - author: LexManos - License: LGPLv2.1 */ diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 8c6550433c20c54cbe390219821ce393c5720da8..e6d08756f76360b29b29f18305e5ec84d09f2d54 100644 +index 261eff5bdb4f4dfae2f66eecad79b21fef69ea8f..8a8fb6acaabc5fc179a23ce3e23ddb54e1ee23a4 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -22,7 +22,7 @@ import org.apache.logging.log4j.Logger; diff --git a/Spigot-Server-Patches/0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch b/Spigot-Server-Patches/0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch index a4138a3a75..fab2aaf139 100644 --- a/Spigot-Server-Patches/0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch +++ b/Spigot-Server-Patches/0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch @@ -13,7 +13,7 @@ contention situations. And this is extremely a low contention situation. diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index d5f5a51872dfabdbb828b6c20d61893aed2efec7..3da575929fcf878ebfe18e3240fac84325159225 100644 +index 3586fe065f21fbf1e71b602c372a690ef603f377..44310efd63b0a460e9dcdc1c8ad0abec78052061 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java @@ -24,7 +24,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { diff --git a/Spigot-Server-Patches/0387-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0387-Mark-entities-as-being-ticked-when-notifying-navigat.patch index bd1b8d54e4..372f4a9a83 100644 --- a/Spigot-Server-Patches/0387-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0387-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 36a951cfcd617baf1a840f394e639567bd044308..58018bfcee5396d440b0f022a7aa9ed452e67ec5 100644 +index 702dcc0387f85ebae8f1cfe9a8e79affef24281b..83585f3ba7ef9e72f3702079a82f62c8b17e4077 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1401,6 +1401,7 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0390-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0390-Asynchronous-chunk-IO-and-loading.patch index 63124c86df..1f4ccdf6f6 100644 --- a/Spigot-Server-Patches/0390-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0390-Asynchronous-chunk-IO-and-loading.patch @@ -4083,7 +4083,7 @@ index cf059aa091e9c732f99b89fc347074a9c1b879a8..5aea49404717061fce4bf24e91f36217 // we do this so we do not re-read the chunk data on disk @@ -2442,6 +2444,34 @@ public class CraftWorld implements World { - return new CraftDragonBattle(((WorldProviderTheEnd) worldProvider).o()); // PAIL rename getDragonBattle + return new CraftDragonBattle(worldProvider.o()); // PAIL rename getDragonBattle } + // Paper start + @Override diff --git a/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index 10d83ed9e3..45b933c4b9 100644 --- a/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,7 +7,7 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index befdabc38edfcdffb588c4cdbe52908afe8a9c04..469f4e718ba123c65b9743877555f14d8d218589 100644 +index da38293cf02d84f3e24a883136ffe5118a510b5a..135d1211525f499198122e500626ce463c263088 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -814,12 +814,13 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0395-Fix-MC-158900.patch b/Spigot-Server-Patches/0395-Fix-MC-158900.patch index baaab4d551..b7d14ec681 100644 --- a/Spigot-Server-Patches/0395-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0395-Fix-MC-158900.patch @@ -7,7 +7,7 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7b2514355d26681ddd69c040ad6a7bc4d6aaaac2..e3127e01a5642225bf24bb061b069765da16cf72 100644 +index 559a411627ed7b018f00b90e8dfc1b470af4a531..3cc9c70882bfb9a933c726b7a194aa3b142034fa 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -502,8 +502,10 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0402-Fix-MC-161754.patch b/Spigot-Server-Patches/0402-Fix-MC-161754.patch index 4e725ed021..9ba10c6d76 100644 --- a/Spigot-Server-Patches/0402-Fix-MC-161754.patch +++ b/Spigot-Server-Patches/0402-Fix-MC-161754.patch @@ -17,7 +17,7 @@ index c95ce0124d948626732e796c386b7544e34b36c4..18e1ae7f0a4b06ec7d7400e791ac79e5 @Override public boolean canUse(EntityHuman entityhuman) { - return this.c.a(entityhuman) && this.d.isAlive() && this.d.g((Entity) entityhuman) < 8.0F; -+ return this.c.a(entityhuman) && (this.d.isAlive() && this.d.valid) && this.d.g((Entity) entityhuman) < 8.0F; // Paper - Fix MC-161754 - evaluate we might still want this in 1.16 as im not confident mojang fixed this, and made it worse ++ return this.c.a(entityhuman) && (this.d.isAlive() && this.d.valid) && this.d.g((Entity) entityhuman) < 8.0F; // Paper - Fix MC-161754 } @Override diff --git a/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 076f9ddecf..3ab0a3b4d5 100644 --- a/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -18,7 +18,7 @@ index 3db173fb5559e62150192a28dbdccdff16787401..81f00141776a1767b907d14ef04f60b5 PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e3127e01a5642225bf24bb061b069765da16cf72..e479dedc889bdfabda99d9c2b36f6c4b7ce87a99 100644 +index 3cc9c70882bfb9a933c726b7a194aa3b142034fa..088c82c5379b39f8cebd60465e054b97c96eb983 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -718,6 +718,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index 79d4feb42b..019af38f15 100644 --- a/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -7,7 +7,7 @@ Fixes an AssertionError when setting the player's item in hand to null or a new Fixes GH-2718 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 24594aa0e9b8741811acfc9f84f4db7552832bd2..aada8d3b08b437f81f68f8e988412c1071287d54 100644 +index 576c9c6ae4339951d4ec9fffa69c7f860d82b33f..4f9255c0bc2ff46f34072846d2b0dc2e97f05db4 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1891,6 +1891,7 @@ public abstract class EntityLiving extends Entity { @@ -19,7 +19,7 @@ index 24594aa0e9b8741811acfc9f84f4db7552832bd2..aada8d3b08b437f81f68f8e988412c10 if (enumhand == EnumHand.MAIN_HAND) { return this.getEquipment(EnumItemSlot.MAINHAND); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5d9bca7a87f463ede1ff0a478d5d6d524ccb877b..3ef083f7df1604e39405ed59b8630334ee9fcd4a 100644 +index ee186ed5a076ede4d89702aeb5a2128d6e7ac8cf..9ba5f9325fe0a7adc3ecf745d52cafe6496bc73f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1438,6 +1438,10 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0419-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0419-Optimise-IEntityAccess-getPlayerByUUID.patch index 3bd05ac082..f9ea7f61b5 100644 --- a/Spigot-Server-Patches/0419-Optimise-IEntityAccess-getPlayerByUUID.patch +++ b/Spigot-Server-Patches/0419-Optimise-IEntityAccess-getPlayerByUUID.patch @@ -23,7 +23,7 @@ index d5c284cdd10d33f5f1b7f456d6a384a44eafb139..4157e50e4d99c029759bffcb48a8d645 EntityHuman entityhuman = (EntityHuman) this.getPlayers().get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index fe84d8b33733391cf58215d92f8f31d6ac107f0a..1f28e24f4f056c1f72293a3004c6dbdb8f8d1f9e 100644 +index 3ecc73d021c09fbcad74dd62aced460771f86038..f32e313a6287c8f5d487d4ad7148cac176773228 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -82,6 +82,15 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch index beee0f4a89..574d3c7907 100644 --- a/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch @@ -111,7 +111,7 @@ index 6d53254f8381f3a957673930c7fdf42d4b9d2f36..5aca7a9131787415fb2edba1ebec9601 if (this.isPassenger() && this.getVehicle() instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) this.getVehicle(); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 252b3c59294a75618622950286969f5e656da85a..38f666bb115d7d29da8eac1f4848ba23ef29ba43 100644 +index 0ec0ddb7d0e3f25820fe064d75916407cb579eae..bbe72ac65b7a9cfdfd577a0fbc316fbcc84fac59 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -91,7 +91,7 @@ public abstract class EntityLiving extends Entity { @@ -331,7 +331,7 @@ index 5a8c60ad909394413427851db8068ba79c058b63..29657fed75184aee0c89e56f5e642a5d return this.c; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6b6612de65081895825858f52d0f1c6f23c8edb6..3742be65afebcf4c61a9efbd1c207f968e5f7473 100644 +index 2beb1374b105381d4467de4989c207339cb5dca1..0fa2b335db297c6270090d3dd24ced92eab12825 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -76,6 +76,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0429-Seed-based-feature-search.patch b/Spigot-Server-Patches/0429-Seed-based-feature-search.patch index 2fcf7d28e0..0fa2f297f4 100644 --- a/Spigot-Server-Patches/0429-Seed-based-feature-search.patch +++ b/Spigot-Server-Patches/0429-Seed-based-feature-search.patch @@ -15,7 +15,7 @@ changes but this should usually not happen. A config option to disable this improvement is added though in case that should ever be necessary. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fca4b6e20ab407ecaef3c5909c3d5e23a944e01b..ade7af40effbfff72e731628ac45c5fc40507c99 100644 +index cab503bd5c34d12b38a2f5deed6d3feb9287b370..2ab810f71beaa608af2194165696817a2cde4b92 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -357,6 +357,12 @@ public class PaperWorldConfig { @@ -94,7 +94,7 @@ index e8ce2ecf23e58d82febf6b9441e0004e69cdc858..acfe732af5b9f63fc2f6b78499defabe public abstract StructureGenerator.a a(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3742be65afebcf4c61a9efbd1c207f968e5f7473..b9685abed74fd1fb239b0940751fde65cceb6f57 100644 +index 0fa2b335db297c6270090d3dd24ced92eab12825..d7ac4c86d170a8d7d816f86ac691c3b5129a20ba 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1570,8 +1570,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0433-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0433-Allow-overriding-the-java-version-check.patch index 0f8fe08741..f1bc40efc3 100644 --- a/Spigot-Server-Patches/0433-Allow-overriding-the-java-version-check.patch +++ b/Spigot-Server-Patches/0433-Allow-overriding-the-java-version-check.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow overriding the java version check -DPaper.IgnoreJavaVersion=true diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index bf0a020189425d6507fa75f68f8e754723c58818..093dbeae2784d51dae74f66e3e1ce5bf6a370428 100644 +index 9b4f01120d473a4fea993a5df952e265b33cde0b..d3463abe89f6e730373cef5e3ac8c0911d0b0963 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -175,7 +175,7 @@ public class Main { diff --git a/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch index f4822e3d65..4b05375b2e 100644 --- a/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch @@ -338,7 +338,7 @@ index 321eae23c575528788b1b575f17593580d6ba737..b19bbbbc81376177751396a2de9452ce public final SoundEffectType getStepSound() { return this.r(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index dab9d36dfcda6f363fb78ad6be6a0306786945ae..6f7da0a79bbbb2be354796033baa498845aaea7c 100644 +index adacff593ee20804b5ddb2df55b66bc6c162dc70..a52d8a27cee6721c32444d9d2bd81135b7d4b859 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1564,10 +1564,19 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -363,7 +363,7 @@ index dab9d36dfcda6f363fb78ad6be6a0306786945ae..6f7da0a79bbbb2be354796033baa4988 public boolean isSavingDisabled() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1f28e24f4f056c1f72293a3004c6dbdb8f8d1f9e..5519fb529dd8e1f93aab79dbc434715e08edb94f 100644 +index f32e313a6287c8f5d487d4ad7148cac176773228..7fded15f14a3f5c04a676e9e25413718b9922c13 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -531,7 +531,12 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0436-Entity-Jump-API.patch b/Spigot-Server-Patches/0436-Entity-Jump-API.patch index 929f727354..c2af5a8fed 100644 --- a/Spigot-Server-Patches/0436-Entity-Jump-API.patch +++ b/Spigot-Server-Patches/0436-Entity-Jump-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 38f666bb115d7d29da8eac1f4848ba23ef29ba43..253e35826f6f51145c278b083d195599affca2a7 100644 +index bbe72ac65b7a9cfdfd577a0fbc316fbcc84fac59..4cac47c280a757b09e0b1e3f98c815bb8cd1b3c0 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2608,8 +2608,10 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0438-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0438-Make-the-GUI-graph-fancier.patch index b84071ea4a..6f0b10d334 100644 --- a/Spigot-Server-Patches/0438-Make-the-GUI-graph-fancier.patch +++ b/Spigot-Server-Patches/0438-Make-the-GUI-graph-fancier.patch @@ -398,7 +398,7 @@ index c21db8e6b798cd5106801d666f14d1d73d5e84ed..7b6e9352578aecf37c5827ba2b2596d0 }); private final int[] b = new int[256]; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e9c3d1507317e38272305e157e889a033c5d2803..dcc5781d99d760e1d1fe6194db8fd49b23091404 100644 +index 8c08a542a97edd76c07ef7d64834bdbd70345876..234c6f1854d4a491f6233fbd4677719a0503d3a1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -105,7 +105,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 255650fc6adcd81df2ee063209d2098745e45e39..c1e3c5ad7bbadedf01f7bd9162602398b81005a2 100644 +index 68c7c243a6d12d5c2f1045dfc5dd36f455dfbffa..dfc9f4d5738b01e3f80af8f3d25aec51b6e9d8d9 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1463,7 +1463,7 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch index f7bc6e470d..8677547aa7 100644 --- a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch @@ -84,7 +84,7 @@ index f851ed11df14fd9aa8017f44d82fb6cfc3bde345..3eefbf4d5f10b53f930759a0afa56612 if ((j2 != 1 || iblockdata.f()) && (j2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { VoxelShape voxelshape2 = iblockdata.b((IBlockAccess) ICollisionAccess.this, blockposition_mutableblockposition, voxelshapecollision); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0ba103a5c60d8f5b8f332fe63364c597925a6450..157738f452493aabdefb228cd527ba85400baad5 100644 +index 088c82c5379b39f8cebd60465e054b97c96eb983..0e9ba6319472f54a1f77a9d2cdfb86d7490f0572 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -677,6 +677,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0459-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0459-Don-t-move-existing-players-to-world-spawn.patch index 261e26db9e..6d17816785 100644 --- a/Spigot-Server-Patches/0459-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0459-Don-t-move-existing-players-to-world-spawn.patch @@ -40,7 +40,7 @@ index f4215d38acef8018f09dff5f379c14336647687d..4e4c0acc6c103c85b7ba2a390a54d351 this.dimension = ((WorldServer) this.world).getWorldProvider().getDimensionManager(); this.playerInteractManager.a((WorldServer) world); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 157738f452493aabdefb228cd527ba85400baad5..611dea90200fe346915d66317e21d94154381e97 100644 +index 0e9ba6319472f54a1f77a9d2cdfb86d7490f0572..80f1c41062de9251343c3d9be4e076315cdbf88d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -108,6 +108,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0475-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0475-Don-t-run-entity-collision-code-if-not-needed.patch index fa10e6fb2d..63d284875c 100644 --- a/Spigot-Server-Patches/0475-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/Spigot-Server-Patches/0475-Don-t-run-entity-collision-code-if-not-needed.patch @@ -7,7 +7,7 @@ Will not run if max entity craming is disabled and the max collisions per entity is less than or equal to 0 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 253e35826f6f51145c278b083d195599affca2a7..2c81344a65bf230a6ba09deb2a3bb45881144a39 100644 +index 4cac47c280a757b09e0b1e3f98c815bb8cd1b3c0..b546537586c3033f696aba9c133490258a9422b2 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2666,10 +2666,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0482-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0482-Broadcast-join-message-to-console.patch index 046df57479..36a66ac469 100644 --- a/Spigot-Server-Patches/0482-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0482-Broadcast-join-message-to-console.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5428f306340acb92b93fe133b827173b646e5d4c..ba97c48c937051adc0baa1e9acbc911575ea58d0 100644 +index 4d4912a38ad0bf38a42ac8fed0ad4c1eecaf63a5..3d6509786cba4307898c4485f6865e3f55ebb13b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -188,9 +188,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 835b1f83a7..a668639175 100644 --- a/Spigot-Server-Patches/0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -52,7 +52,7 @@ index 48f858388029e77f710365e73905f8570f1103f5..2caa53a7e143aae32918ecbefc1bdadc if (!(entity instanceof EntityComplexPart)) { if (!(entity instanceof EntityLightning)) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ba97c48c937051adc0baa1e9acbc911575ea58d0..1c7aac029ae01afa127ca386278a4ff8520e3674 100644 +index 3d6509786cba4307898c4485f6865e3f55ebb13b..d9fff5836e6f4b8a14fea1db66c5a89b43b2b952 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -177,6 +177,12 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0487-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0487-Add-PlayerAttackEntityCooldownResetEvent.patch index f5ba23a129..9128290e7a 100644 --- a/Spigot-Server-Patches/0487-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/Spigot-Server-Patches/0487-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2c81344a65bf230a6ba09deb2a3bb45881144a39..3fc2360a103a5399f2878eccb0c13eb6e41e824d 100644 +index b546537586c3033f696aba9c133490258a9422b2..ab6576f36e7682d5100f4e9358e76426e4a1c525 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1690,7 +1690,17 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch index fd2e4bff84..f049948582 100644 --- a/Spigot-Server-Patches/0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -88,7 +88,7 @@ index 8ad131e4fc20efc61b938a5f6ab64379da23bf0d..d35a0b2d94e4f52c257375c35f55b5a4 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 08471184b04690653761a17d79941cd4ae8b1f81..ce8d7877adcc4635ebf2f5743c8b02aa95691102 100644 +index 5d88a48b4c54c4b2c79804557bd36d1a6c686c89..a4cd6c404c2a8d526c4673695aadd001f2b4516f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -777,7 +777,8 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0503-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0503-No-Tick-view-distance-implementation.patch index 5c11fc1075..442134ba54 100644 --- a/Spigot-Server-Patches/0503-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0503-No-Tick-view-distance-implementation.patch @@ -553,7 +553,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d7a9ec78db5994259bd6de289a8b4996349b2559..6daca5c0ffd1d84f9a25cd106e8992a055dfb912 100644 +index 628327e1e39299bbe64dff042d0187a9f79203a8..74571c1befa60e71e93de8052740a56f7b80e920 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -152,7 +152,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 55fde45492..519dc60fec 100644 --- a/Spigot-Server-Patches/0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1123,7 +1123,7 @@ index d52fbda79fe1c52d3ddb53c0f1c1f521d7620702..f9cb87a3be35575ecf3362b10dc7fe5e } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6daca5c0ffd1d84f9a25cd106e8992a055dfb912..f133e7baf958b031819c2c72ccd21c52ba9a683d 100644 +index 74571c1befa60e71e93de8052740a56f7b80e920..f0fe864026dc10cd809f06dc9d4e823c21494a8d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -174,8 +174,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch index fe477cdf8b..c15c5465f4 100644 --- a/Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,7 +11,7 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f133e7baf958b031819c2c72ccd21c52ba9a683d..ab8247eb790be2084be7544f72e5b6661151905d 100644 +index f0fe864026dc10cd809f06dc9d4e823c21494a8d..5b634f2385f6dbb62cf3884daabded3870e8b8cc 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1031,11 +1031,30 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 36bc22fde8..583c249a71 100644 --- a/Spigot-Server-Patches/0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -35,7 +35,7 @@ index c3f7717869c86d9ac6395615bceda324aea16b27..ecacb72b922927f06883b75e7d2cc1f9 + } } diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index ff9e164574f1f3d043740ac727faf567122e5b64..cc02ed6b58a219d8f06e4ccc2a51f46c33af98d1 100644 +index 35a4999b2c34ae62cba042885db25dd1837cb127..9a84d1749cf00316f1acadc55d45426267a94827 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -176,6 +176,27 @@ public abstract class ChunkMapDistance { diff --git a/Spigot-Server-Patches/0546-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0546-Expose-Arrow-getItemStack.patch index 2c0aea35cb..0d64b1ddaf 100644 --- a/Spigot-Server-Patches/0546-Expose-Arrow-getItemStack.patch +++ b/Spigot-Server-Patches/0546-Expose-Arrow-getItemStack.patch @@ -18,7 +18,7 @@ index 9c97edf9c9e9a8cdf029264f6b563090142c686b..e66f6b30069af5b9031c7c78a2bb3d3a @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -index 29d23db4121bf8cbd98b4d7acce90b13790df245..2e4765ba14c591f995f6ab0a6e3a16158c7ca308 100644 +index 228e1327ca8821cc7e1542d2c09cdeb3365024a5..27897182559044d7079953e302ecfaa67918536a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -102,6 +102,13 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow { diff --git a/Spigot-Server-Patches/0316-Fix-MC-93764.patch b/removed/1.16/0316-Fix-MC-93764.patch similarity index 100% rename from Spigot-Server-Patches/0316-Fix-MC-93764.patch rename to removed/1.16/0316-Fix-MC-93764.patch diff --git a/scripts/rebuildPatches.sh b/scripts/rebuildPatches.sh index 7dd38d46fd..df1934b491 100755 --- a/scripts/rebuildPatches.sh +++ b/scripts/rebuildPatches.sh @@ -9,7 +9,7 @@ gitcmd="git -c commit.gpgsign=false -c core.safecrlf=false" echo "Rebuilding patch files from current fork state..." nofilter="0" -if [ "$2" = "nofilter" ]; then +if [ "$2" == "nofilter" ] || [ "$2" == "noclean" ]; then nofilter="1" fi function cleanupPatches { diff --git a/work/BuildData b/work/BuildData index 455d45a424..be3371e674 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 455d45a4244894335cd07451bdda79ccd380aff6 +Subproject commit be3371e67489b5a2293306e24420793106baadc1 diff --git a/work/Bukkit b/work/Bukkit index 149527f7b1..32fcd349d4 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 149527f7b10f992ef22186e85f13ded96ab76a63 +Subproject commit 32fcd349d4074c564116bbeb4b481332460902ee diff --git a/work/CraftBukkit b/work/CraftBukkit index be6aaf046e..2b00831c95 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit be6aaf046eed614b0034ec42d5ef5e6f7de16ff0 +Subproject commit 2b00831c95f8dda096ad22ae88bc615d9dd31ea1 diff --git a/work/Spigot b/work/Spigot index a99063f771..758abbeee4 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit a99063f77142a462546e31413de6c6190e913f11 +Subproject commit 758abbeee4e12f5ff65470999dd9955d0ebb49cd From 0ec07fc0ce43dd9d88f4ebaf3a9f7fd313dd03eb Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 24 Jun 2020 22:33:35 -0400 Subject: [PATCH 03/95] API update --- Spigot-API-Patches/0001-POM-changes.patch | 13 ++---- Spigot-API-Patches/0004-Timings-v2.patch | 4 +- .../0005-Player-affects-spawning-API.patch | 4 +- .../0010-Add-player-view-distance-API.patch | 4 +- ...cord-chat-API-from-spigot-subclasses.patch | 4 +- .../0016-Player-Tab-List-and-Title-APIs.patch | 4 +- ...working-with-arrows-stuck-in-living-.patch | 4 +- .../0021-Complete-resource-pack-API.patch | 6 +-- .../0022-Use-ASM-for-event-executors.patch | 4 +- ...0041-Add-String-based-Action-Bar-API.patch | 10 ++--- Spigot-API-Patches/0044-Fireworks-API-s.patch | 20 +++------ ...upstream-javadoc-warnings-and-errors.patch | 42 +++++++++---------- .../0056-Shoulder-Entities-Release-API.patch | 4 +- .../0064-LivingEntity-setKiller.patch | 4 +- ...low-plugins-to-use-SLF4J-for-logging.patch | 4 +- ...6-Ability-to-apply-mending-to-XP-API.patch | 4 +- .../0087-Player.setPlayerProfile-API.patch | 4 +- ...d-method-to-open-already-placed-sign.patch | 4 +- ...91-Add-Ban-Methods-to-Player-Objects.patch | 4 +- ...ld.spawnParticle-API-and-add-Builder.patch | 8 ++-- ...e-shield-blocking-delay-configurable.patch | 4 +- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 6 +-- ...-ray-tracing-methods-to-LivingEntity.patch | 4 +- ...e-attack-cooldown-methods-for-Player.patch | 4 +- .../0153-Material-API-additions.patch | 6 +-- .../0154-Add-Material-Tags.patch | 42 +++++++++---------- ...156-Add-LivingEntity-getTargetEntity.patch | 4 +- Spigot-API-Patches/0190-Entity-Jump-API.patch | 4 +- .../0196-Add-Player-Client-Options-API.patch | 4 +- .../0203-World-view-distance-api.patch | 4 +- .../0206-Potential-bed-API.patch | 37 +++++++++++++--- 31 files changed, 141 insertions(+), 133 deletions(-) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 52950142e8..3fb5b8c2b0 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 186405ba1914b2b384896c61770c225b50091401..9975ba9ae19f6217bec206fee247fac1a30d58fc 100644 +index 82b370b7fe4cd0faba8d20fa7697f2913d9f53c1..6953bd86915f6c7a0afb0b87abd38053cb7766d5 100644 --- a/pom.xml +++ b/pom.xml @@ -2,34 +2,28 @@ @@ -22,7 +22,7 @@ index 186405ba1914b2b384896c61770c225b50091401..9975ba9ae19f6217bec206fee247fac1 - spigot-api + com.destroystokyo.paper + paper-api - 1.15.2-R0.1-SNAPSHOT + 1.16.1-R0.1-SNAPSHOT jar - Spigot-API @@ -85,14 +85,7 @@ index 186405ba1914b2b384896c61770c225b50091401..9975ba9ae19f6217bec206fee247fac1 com.google.guava -@@ -107,12 +119,13 @@ - - org.ow2.asm - asm-tree -- 7.3.1 -+ 8.0.1 - test - +@@ -113,6 +125,7 @@ diff --git a/Spigot-API-Patches/0004-Timings-v2.patch b/Spigot-API-Patches/0004-Timings-v2.patch index 1dd40a7a8b..a1ab67634c 100644 --- a/Spigot-API-Patches/0004-Timings-v2.patch +++ b/Spigot-API-Patches/0004-Timings-v2.patch @@ -3358,10 +3358,10 @@ index 2a145d851ce30360aa39549745bd87590c034584..00000000000000000000000000000000 - // Spigot end -} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 92bafd6365313390326ea12fb815c62463f4d0fc..bfbe775fcd631b12975c0aaae8c82156b81c9614 100644 +index 87e23bd62037694ddfa3bfe0a0fd5f61af6e0ac2..2e68724b5c0c44a83189ca23b2435778ed775ccb 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1329,6 +1329,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1355,6 +1355,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch b/Spigot-API-Patches/0005-Player-affects-spawning-API.patch index b086a964bb..67ffc0fa02 100644 --- a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch +++ b/Spigot-API-Patches/0005-Player-affects-spawning-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index bfbe775fcd631b12975c0aaae8c82156b81c9614..41cb8b3770d787eb0e12be191984e7767cc004e1 100644 +index 2e68724b5c0c44a83189ca23b2435778ed775ccb..53f1b31553a04f63b8176d23583b45b2a32678a9 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1231,6 +1231,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1257,6 +1257,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @NotNull public String getLocale(); diff --git a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch b/Spigot-API-Patches/0010-Add-player-view-distance-API.patch index 3df8366b1d..e9e63b9113 100644 --- a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/0010-Add-player-view-distance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add player view distance API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 41cb8b3770d787eb0e12be191984e7767cc004e1..a985431e5d69e2837dae5c3284b0252ace04992a 100644 +index 53f1b31553a04f63b8176d23583b45b2a32678a9..ef0d8c25a52806690be6ed77c864602d86887a77 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1245,6 +1245,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1271,6 +1271,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param affects Whether the player can affect mob spawning */ public void setAffectsSpawning(boolean affects); diff --git a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index d870c5543a..912e4c6277 100644 --- a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -68,10 +68,10 @@ index af21bb1aa133c6ab119f23c098d17a5bc4e9cd47..b09d010853a67db16787d9e764f1e294 * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index a985431e5d69e2837dae5c3284b0252ace04992a..dd6adedb63c0a51dab92879b199a8d284472f270 100644 +index ef0d8c25a52806690be6ed77c864602d86887a77..33a72a449d31641e156b805dadbfde55ceb8319a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -441,6 +441,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -467,6 +467,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); diff --git a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch index 6fbbfe5eda..37955aa098 100644 --- a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch @@ -384,7 +384,7 @@ index 0000000000000000000000000000000000000000..4fe18540f77143ee7cd7e94d3aa279ae + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index dd6adedb63c0a51dab92879b199a8d284472f270..3d07467a4ba39aa7c59abb49d12b094c872251da 100644 +index 33a72a449d31641e156b805dadbfde55ceb8319a..a2b0bb31e9ca98b76b987c094184d5d4dbdef2b9 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1,6 +1,7 @@ @@ -395,7 +395,7 @@ index dd6adedb63c0a51dab92879b199a8d284472f270..3d07467a4ba39aa7c59abb49d12b094c import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -471,6 +472,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -497,6 +498,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } diff --git a/Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch index 3b095e9b85..b617eea89a 100644 --- a/Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 203d135f156aa78f4daf497831399f4fdab41d5f..52541e496bd85e041a96fd5858acbb9bddbb8196 100644 +index 8744f2e5fdf47200d433d708fcd9d9aaded56c0c..5b0c95ab7372c7accd190b9052b587637106c4af 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -531,4 +531,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -552,4 +552,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * @param the type of the passed value */ void setMemory(@NotNull MemoryKey memoryKey, @Nullable T memoryValue); diff --git a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch b/Spigot-API-Patches/0021-Complete-resource-pack-API.patch index 0cec19d183..72ca7290a6 100644 --- a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch +++ b/Spigot-API-Patches/0021-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 3d07467a4ba39aa7c59abb49d12b094c872251da..9e62987cbd36074923ade7c9dea0e418cfb9c2bc 100644 +index a2b0bb31e9ca98b76b987c094184d5d4dbdef2b9..0a9d2b1914a059fd3a247ca48e6bef9554d2cf16 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -981,7 +981,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1007,7 +1007,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the URL is null. * @throws IllegalArgumentException Thrown if the URL is too long. The * length restriction is an implementation specific arbitrary value. @@ -18,7 +18,7 @@ index 3d07467a4ba39aa7c59abb49d12b094c872251da..9e62987cbd36074923ade7c9dea0e418 public void setResourcePack(@NotNull String url); /** -@@ -1419,6 +1421,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1445,6 +1447,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void openBook(@NotNull ItemStack book); diff --git a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch index b6c0d6bac8..cdc3d940e5 100644 --- a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. diff --git a/pom.xml b/pom.xml -index e8d9982bdbf9f66a54db16bf920e8106b81b034f..661d109f7c5b78587c68f32d47029c6d2fe7604d 100644 +index 04781abaf6ec21f2f19f366c3d1b27687f502743..bce749991a83aeea871229352f0e4511bb592216 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,17 @@ - 8.0.1 + 8.0.1 test + diff --git a/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch index c4221d173e..76718ddca7 100644 --- a/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch +++ b/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add String based Action Bar API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 9e62987cbd36074923ade7c9dea0e418cfb9c2bc..6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d 100644 +index 0a9d2b1914a059fd3a247ca48e6bef9554d2cf16..3b6f08209d8882cda5593305936474e3bc975f3d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -443,6 +443,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -469,6 +469,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start @@ -35,7 +35,7 @@ index 9e62987cbd36074923ade7c9dea0e418cfb9c2bc..6f3ab730b3196ae0cb4b3c2fb8976dce /** * Sends the component to the player * -@@ -466,9 +486,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -492,9 +512,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * @@ -47,7 +47,7 @@ index 9e62987cbd36074923ade7c9dea0e418cfb9c2bc..6f3ab730b3196ae0cb4b3c2fb8976dce public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } -@@ -1544,9 +1566,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1570,9 +1592,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends the component to the specified screen position of this player * @@ -59,7 +59,7 @@ index 9e62987cbd36074923ade7c9dea0e418cfb9c2bc..6f3ab730b3196ae0cb4b3c2fb8976dce public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { throw new UnsupportedOperationException("Not supported yet."); } -@@ -1554,9 +1578,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1580,9 +1604,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * diff --git a/Spigot-API-Patches/0044-Fireworks-API-s.patch b/Spigot-API-Patches/0044-Fireworks-API-s.patch index c2de448c1c..a0ed753ac6 100644 --- a/Spigot-API-Patches/0044-Fireworks-API-s.patch +++ b/Spigot-API-Patches/0044-Fireworks-API-s.patch @@ -7,32 +7,22 @@ Get the Entity being boosted Get the firework launcher diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java -index f844d5aa983f1d4718c9f22da80b0eed113547b1..e8c04c1383ec6dd53f30727db4e910ca17fbae5d 100644 +index 05e86cb9d826cdf14490fa649348d46c51adbfdb..d616d5941b3c7b85e350e845901da798601b9a3c 100644 --- a/src/main/java/org/bukkit/entity/Firework.java +++ b/src/main/java/org/bukkit/entity/Firework.java -@@ -3,6 +3,9 @@ package org.bukkit.entity; - import org.bukkit.inventory.meta.FireworkMeta; - import org.jetbrains.annotations.NotNull; - -+import java.util.UUID; -+import org.jetbrains.annotations.Nullable; -+ - public interface Firework extends Entity { - - /** -@@ -43,4 +46,15 @@ public interface Firework extends Entity { +@@ -43,4 +43,15 @@ public interface Firework extends Projectile { * @param shotAtAngle the new shotAtAngle */ void setShotAtAngle(boolean shotAtAngle); + + // Paper start -+ @Nullable -+ public UUID getSpawningEntity(); ++ @org.jetbrains.annotations.Nullable ++ public java.util.UUID getSpawningEntity(); + /** + * If this firework is boosting an entity, return it + * @return The entity being boosted + */ -+ @Nullable ++ @org.jetbrains.annotations.Nullable + public LivingEntity getBoostedEntity(); + // Paper end } diff --git a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch index 7cb9a9960d..83edd7cf6f 100644 --- a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1c3eff369 100644 +index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7ef36f0cd 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2009,6 +2009,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2013,6 +2013,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -17,7 +17,7 @@ index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); -@@ -2025,6 +2026,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2029,6 +2030,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -25,7 +25,7 @@ index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); -@@ -2075,6 +2077,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2079,6 +2081,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -33,7 +33,7 @@ index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -2095,6 +2098,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2099,6 +2102,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -41,7 +41,7 @@ index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -2151,6 +2155,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2155,6 +2159,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -49,7 +49,7 @@ index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); -@@ -2173,6 +2178,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2177,6 +2182,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -57,7 +57,7 @@ index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); -@@ -2196,6 +2202,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2200,6 +2206,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param force whether to send the particle to players within an extended * range and encourage their client to render it regardless of * settings @@ -65,7 +65,7 @@ index 808c3b4a4f494e05542f29324db655ee6166021e..3b027f67c1763ee0a4f7b02490d3cee1 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force); -@@ -2221,6 +2228,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2225,6 +2232,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param force whether to send the particle to players within an extended * range and encourage their client to render it regardless of * settings @@ -86,10 +86,10 @@ index c2096b5344d48d855d031538ec32e0154bd9054d..bca9d3659f6fceeca4b7fecbc7034d6f void setParticle(@NotNull Particle particle, @Nullable T data); diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba52651baca55 100644 +index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661e1841680 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -458,7 +458,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -484,7 +484,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * Use supplied alternative character to the section symbol to represent legacy color codes. * @@ -98,7 +98,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 * @param message The message to send */ public void sendActionBar(char alternateChar, @NotNull String message); -@@ -525,6 +525,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -551,6 +551,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Update the subtitle of titles displayed to the player * @@ -106,7 +106,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated -@@ -533,6 +534,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -559,6 +560,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Update the subtitle of titles displayed to the player * @@ -114,7 +114,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated -@@ -541,6 +543,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -567,6 +569,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Show the given title to the player, along with the last subtitle set, using the last set times * @@ -122,7 +122,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated -@@ -549,6 +552,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -575,6 +578,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Show the given title to the player, along with the last subtitle set, using the last set times * @@ -130,7 +130,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated -@@ -1198,6 +1202,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1224,6 +1228,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -138,7 +138,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); -@@ -1214,6 +1219,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1240,6 +1245,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -146,7 +146,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); -@@ -1264,6 +1270,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1290,6 +1296,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -154,7 +154,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -1284,6 +1291,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1310,6 +1317,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -162,7 +162,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -1340,6 +1348,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1366,6 +1374,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -170,7 +170,7 @@ index 6f3ab730b3196ae0cb4b3c2fb8976dcefafc1d4d..cb7d9f055193618c8a7e80796c2ba526 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); -@@ -1362,6 +1371,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1388,6 +1397,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * particle used (normally speed) * @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/0056-Shoulder-Entities-Release-API.patch b/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch index 859798a0b4..78e1f55fa1 100644 --- a/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch +++ b/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index a7f08bb1c0778d99f06abfd15bb4a1a8bef6d502..3adff676c85a6648fc85a088e12ea524f4567b12 100644 +index 19424479caead7adb966746a70de34d9684f37bc..72ec97f5dcdf0e181e75b28f4de19b307835cb02 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -324,6 +324,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -299,6 +299,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getExpToLevel(); diff --git a/Spigot-API-Patches/0064-LivingEntity-setKiller.patch b/Spigot-API-Patches/0064-LivingEntity-setKiller.patch index 12e8f6c347..f95331f271 100644 --- a/Spigot-API-Patches/0064-LivingEntity-setKiller.patch +++ b/Spigot-API-Patches/0064-LivingEntity-setKiller.patch @@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 52541e496bd85e041a96fd5858acbb9bddbb8196..ae712e76d961137a35b70dd3f3fbb33dddf37f0a 100644 +index 5b0c95ab7372c7accd190b9052b587637106c4af..f0018823e17fab49e0167ece1c8c9eda2d562b87 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -250,6 +250,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -251,6 +251,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @Nullable public Player getKiller(); diff --git a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch index 82911ecbf9..feb61e660f 100644 --- a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -14,11 +14,11 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index 661d109f7c5b78587c68f32d47029c6d2fe7604d..20c473f521e50df57065d3644398f9db777c1a24 100644 +index bce749991a83aeea871229352f0e4511bb592216..fee78297a549112beb6bc2f6363b85bac28fd12f 100644 --- a/pom.xml +++ b/pom.xml @@ -109,6 +109,13 @@ - 18.0.0 + 19.0.0 provided + diff --git a/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch b/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch index ba17eaf22a..13fda96cc4 100644 --- a/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch @@ -10,10 +10,10 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 9398f303f191c57ee3e2bd33f205a881be6543f4..8a67375dedf9ef91216a431d87e1e6a90c6787d8 100644 +index 8afa4db2d47b3941055d045ff351eb8b0a35fffa..92aae1e34961b35b989048c1de05cd3dcef4e1b1 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -690,12 +690,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -716,12 +716,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void resetPlayerWeather(); diff --git a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch index ba0f7d54f7..5811558c5b 100644 --- a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 8a67375dedf9ef91216a431d87e1e6a90c6787d8..8fe402336c2fe8d3f4d803f73b24d4848cdb3c69 100644 +index 92aae1e34961b35b989048c1de05cd3dcef4e1b1..5b7a25831205778bc5d6582e38fd4ac89d5b929f 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -2,6 +2,7 @@ package org.bukkit.entity; @@ -17,7 +17,7 @@ index 8a67375dedf9ef91216a431d87e1e6a90c6787d8..8fe402336c2fe8d3f4d803f73b24d484 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -1528,6 +1529,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1554,6 +1555,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} */ boolean hasResourcePack(); diff --git a/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch b/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch index 094aa9960e..f6a3d4a4fd 100644 --- a/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-API-Patches/0090-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/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 3adff676c85a6648fc85a088e12ea524f4567b12..2d413d720c828c7f334abde7eb02935317e2fd17 100644 +index 72ec97f5dcdf0e181e75b28f4de19b307835cb02..863cdf7408cb6b42e7927505e34a2a93017e06ff 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -468,4 +468,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -443,4 +443,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ @Deprecated public void setShoulderEntityRight(@Nullable Entity entity); diff --git a/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch b/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch index eaf7e30eb1..f43abea5cd 100644 --- a/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch +++ b/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch @@ -74,7 +74,7 @@ index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c7958 /** * Checks if this player is whitelisted or not diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 8fe402336c2fe8d3f4d803f73b24d4848cdb3c69..c37d7fca014fb0f325574a33ef4ccba67db7fe49 100644 +index 5b7a25831205778bc5d6582e38fd4ac89d5b929f..6e05580d83fc4722d6f6fc5faa012c24b72f4562 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -3,6 +3,10 @@ package org.bukkit.entity; @@ -88,7 +88,7 @@ index 8fe402336c2fe8d3f4d803f73b24d4848cdb3c69..c37d7fca014fb0f325574a33ef4ccba6 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -444,6 +448,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -470,6 +474,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start diff --git a/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch index 27f7e480ff..cc17754d68 100644 --- a/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -493,10 +493,10 @@ index 0000000000000000000000000000000000000000..06f1602f5b327705f726d0a99dd6b95e + } +} diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java -index 49467ac70a5ff6e31a8c5c3ec92de3c65fee2284..d2ceb07c727ab898e4ef1b502f9544817ce3bda6 100644 +index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c521751bf13a7 100644 --- a/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java -@@ -96,6 +96,17 @@ public enum Particle { +@@ -106,6 +106,17 @@ public enum Particle { return dataType; } @@ -515,10 +515,10 @@ index 49467ac70a5ff6e31a8c5c3ec92de3c65fee2284..d2ceb07c727ab898e4ef1b502f954481 * 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 fbe7e76c0f3122dd47c7ca4562b5ac3577a71ffc..085c7a42c3e758770d5883e3cddf896ac6b7645b 100644 +index 3150f7d81c87b57944231bd95bb2e49af51f7eca..c478db22ade86ca58551ba94043dd1c2fd08004e 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2433,7 +2433,57 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2437,7 +2437,57 @@ public interface World extends PluginMessageRecipient, Metadatable { * the type of this depends on {@link Particle#getDataType()} * @param Type */ diff --git a/Spigot-API-Patches/0106-Make-shield-blocking-delay-configurable.patch b/Spigot-API-Patches/0106-Make-shield-blocking-delay-configurable.patch index 031f7f0575..d5f7d1d09e 100644 --- a/Spigot-API-Patches/0106-Make-shield-blocking-delay-configurable.patch +++ b/Spigot-API-Patches/0106-Make-shield-blocking-delay-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index ae712e76d961137a35b70dd3f3fbb33dddf37f0a..896b1971c86410ccc62353e44bfe5a449f8a0c97 100644 +index f0018823e17fab49e0167ece1c8c9eda2d562b87..3c02de9ebca92ba03beb1dd3c04a32c745e9ea8e 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -554,5 +554,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -575,5 +575,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * @param arrows Number of arrows to stick in this entity */ void setArrowsStuck(int arrows); diff --git a/Spigot-API-Patches/0113-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-API-Patches/0113-LivingEntity-Hand-Raised-Item-Use-API.patch index 46d1a43a65..ac446cc822 100644 --- a/Spigot-API-Patches/0113-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-API-Patches/0113-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 896b1971c86410ccc62353e44bfe5a449f8a0c97..4af8e680dbcd3e0bc1ed692146b72fecbf7735ba 100644 +index 3c02de9ebca92ba03beb1dd3c04a32c745e9ea8e..5f8a544574bbc095f2b2c06ccbf887d17af93475 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -11,6 +11,7 @@ import org.bukkit.attribute.Attributable; +@@ -12,6 +12,7 @@ import org.bukkit.attribute.Attributable; import org.bukkit.block.Block; import org.bukkit.entity.memory.MemoryKey; import org.bukkit.inventory.EntityEquipment; @@ -17,7 +17,7 @@ index 896b1971c86410ccc62353e44bfe5a449f8a0c97..4af8e680dbcd3e0bc1ed692146b72fec import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.projectiles.ProjectileSource; -@@ -568,5 +569,32 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -589,5 +590,32 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * @param delay Delay in ticks */ void setShieldBlockingDelay(int delay); diff --git a/Spigot-API-Patches/0143-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-API-Patches/0143-Add-ray-tracing-methods-to-LivingEntity.patch index 1ff60e35ce..284a02349e 100644 --- a/Spigot-API-Patches/0143-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-API-Patches/0143-Add-ray-tracing-methods-to-LivingEntity.patch @@ -65,10 +65,10 @@ index 0000000000000000000000000000000000000000..18a96dbb01d3b34476652264b2d6be37 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 4af8e680dbcd3e0bc1ed692146b72fecbf7735ba..5e9ca6f3d5aac2d119808eb03cfc00367306f5e4 100644 +index 5f8a544574bbc095f2b2c06ccbf887d17af93475..c75ce8435ddef6502df1a57ca4b95186259a2a41 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -81,6 +81,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -82,6 +82,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @NotNull public Block getTargetBlock(@Nullable Set transparent, int maxDistance); diff --git a/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch index 3a0c136f2e..9225bfe8fd 100644 --- a/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index c37d7fca014fb0f325574a33ef4ccba67db7fe49..3600b4c84058713616a6448c1175a7d1ba74fd7b 100644 +index 6e05580d83fc4722d6f6fc5faa012c24b72f4562..13077f96ce32cbb75197a4480715b1c71deb451d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1703,6 +1703,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1729,6 +1729,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param profile The new profile to use */ void setPlayerProfile(@NotNull PlayerProfile profile); diff --git a/Spigot-API-Patches/0153-Material-API-additions.patch b/Spigot-API-Patches/0153-Material-API-additions.patch index 970b653933..fe4a0d241c 100644 --- a/Spigot-API-Patches/0153-Material-API-additions.patch +++ b/Spigot-API-Patches/0153-Material-API-additions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 57b0d98121cea592dded31165e5e70f6b3bbdaa5..b89fc2dc0b186b99f76d9bf8b1f5daad3e211dfb 100644 +index c7316bd2ef89e63ced9f8d37f0936f1551c1157d..769c65e7928be5e0a15e592c874fc68cc6d30148 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -82,6 +82,7 @@ import org.jetbrains.annotations.Nullable; +@@ -85,6 +85,7 @@ import org.jetbrains.annotations.Nullable; /** * An enum of all material IDs accepted by the official server and client */ @@ -16,7 +16,7 @@ index 57b0d98121cea592dded31165e5e70f6b3bbdaa5..b89fc2dc0b186b99f76d9bf8b1f5daad public enum Material implements Keyed { // ACACIA_BOAT(27326, 1), -@@ -3306,6 +3307,22 @@ public enum Material implements Keyed { +@@ -3563,6 +3564,22 @@ public enum Material implements Keyed { } } diff --git a/Spigot-API-Patches/0154-Add-Material-Tags.patch b/Spigot-API-Patches/0154-Add-Material-Tags.patch index 4ead203791..e21f3f5e9c 100644 --- a/Spigot-API-Patches/0154-Add-Material-Tags.patch +++ b/Spigot-API-Patches/0154-Add-Material-Tags.patch @@ -204,7 +204,7 @@ index 0000000000000000000000000000000000000000..c91ea2a0679a7f3a5627b5a008e0b39d +} diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java new file mode 100644 -index 0000000000000000000000000000000000000000..88556fdb6fa8f21355c49a77d5f4638216fbf156 +index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e340830c34310 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java @@ -0,0 +1,374 @@ @@ -313,18 +313,18 @@ index 0000000000000000000000000000000000000000..88556fdb6fa8f21355c49a77d5f46382 + .ensureSize("DYES", 16); + + /** -+ * Covers all 6 wood variants of gates. ++ * Covers all variants of gates. + */ + public static final MaterialSetTag FENCE_GATES = new MaterialSetTag(keyFor("fence_gates")) + .endsWith("_GATE") -+ .ensureSize("FENCE_GATES", 6); ++ .ensureSize("FENCE_GATES", 8); + + /** -+ * Covers all 6 wood variants and nether brick fence. ++ * Covers all variants of fences. + */ + public static final MaterialSetTag FENCES = new MaterialSetTag(keyFor("fences")) + .endsWith("_FENCE") -+ .ensureSize("FENCES", 7); ++ .ensureSize("FENCES", 9); + + /** + * Covers all 4 variants of fish buckets. @@ -407,18 +407,18 @@ index 0000000000000000000000000000000000000000..88556fdb6fa8f21355c49a77d5f46382 + .add(Material.BROWN_MUSHROOM, Material.RED_MUSHROOM); + + /** -+ * Covers all 12 music disc items. ++ * Covers all music disc items. + */ + public static final MaterialSetTag MUSIC_DISCS = new MaterialSetTag(keyFor("music_discs")) -+ .startsWith("MUSIC_DISC_") -+ .ensureSize("MUSIC_DISCS", 12); ++ .startsWith("MUSIC_DISC_"); + + /** -+ * Covers all 8 ores. ++ * Covers all ores. + */ + public static final MaterialSetTag ORES = new MaterialSetTag(keyFor("ores")) ++ .add(Material.ANCIENT_DEBRIS) + .endsWith("_ORE") -+ .ensureSize("ORES", 8); ++ .ensureSize("ORES", 10); + + /** + * Covers all piston typed items and blocks including the piston head and moving piston. @@ -435,11 +435,11 @@ index 0000000000000000000000000000000000000000..88556fdb6fa8f21355c49a77d5f46382 + .ensureSize("POTATOES", 3); + + /** -+ * Covers all 6 wooden pressure plates and the 2 weighted pressure plates and 1 stone pressure plate. ++ * Covers all wooden pressure plates and the weighted pressure plates and 1 stone pressure plate. + */ + public static final MaterialSetTag PRESSURE_PLATES = new MaterialSetTag(keyFor("pressure_plates")) + .endsWith("_PRESSURE_PLATE") -+ .ensureSize("PRESSURE_PLATES", 9); ++ .ensureSize("PRESSURE_PLATES", 12); + + /** + * Covers the 3 variants of prismarine blocks. @@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..88556fdb6fa8f21355c49a77d5f46382 + */ + public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs")) + .endsWith("_SPAWN_EGG") -+ .ensureSize("SPAWN_EGGS", 59); ++ .ensureSize("SPAWN_EGGS", 63); + + /** + * Covers all 16 colors of stained glass. @@ -535,31 +535,31 @@ index 0000000000000000000000000000000000000000..88556fdb6fa8f21355c49a77d5f46382 + .ensureSize("STAINED_GLASS_PANES", 16); + + /** -+ * Covers all 7 variants of trapdoors. ++ * Covers all variants of trapdoors. + */ + public static final MaterialSetTag TRAPDOORS = new MaterialSetTag(keyFor("trapdoors")) + .endsWith("_TRAPDOOR") -+ .ensureSize("TRAPDOORS", 7); ++ .ensureSize("TRAPDOORS", 9); + + /** -+ * Covers all 6 wood variants of fences. ++ * Covers all wood variants of fences. + */ + public static final MaterialSetTag WOODEN_FENCES = new MaterialSetTag(keyFor("wooden_fences")) + .endsWith("_FENCE") + .not(Material.NETHER_BRICK_FENCE) -+ .ensureSize("WOODEN_FENCES", 6); ++ .ensureSize("WOODEN_FENCES", 8); + + /** -+ * Covers all 6 wood variants of trapdoors. ++ * Covers all wood variants of trapdoors. + */ + public static final MaterialSetTag WOODEN_TRAPDOORS = new MaterialSetTag(keyFor("wooden_trapdoors")) + .endsWith("_TRAPDOOR") + .not(Material.IRON_TRAPDOOR) -+ .ensureSize("WOODEN_TRAPDOORS", 6); ++ .ensureSize("WOODEN_TRAPDOORS", 8); + + public static final MaterialSetTag WOODEN_GATES = new MaterialSetTag(keyFor("wooden_gates")) + .endsWith("_GATE") -+ .ensureSize("WOODEN_GATES", 6); ++ .ensureSize("WOODEN_GATES", 8); + + public static final MaterialSetTag PURPUR = new MaterialSetTag(keyFor("purpur")) + .startsWith("PURPUR_") @@ -567,7 +567,7 @@ index 0000000000000000000000000000000000000000..88556fdb6fa8f21355c49a77d5f46382 + + public static final MaterialSetTag SIGNS = new MaterialSetTag(keyFor("signs")) + .endsWith("_SIGN") -+ .ensureSize("SIGNS", 12); ++ .ensureSize("SIGNS", 16); + + public static final MaterialSetTag TORCH = new MaterialSetTag(keyFor("torch")) + .add(Material.TORCH, Material.WALL_TORCH) diff --git a/Spigot-API-Patches/0156-Add-LivingEntity-getTargetEntity.patch b/Spigot-API-Patches/0156-Add-LivingEntity-getTargetEntity.patch index 1e8991f57c..154fabd97c 100644 --- a/Spigot-API-Patches/0156-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-API-Patches/0156-Add-LivingEntity-getTargetEntity.patch @@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..f52644fab1522bdf83ff4f489e9805b2 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 5e9ca6f3d5aac2d119808eb03cfc00367306f5e4..deab505250145e795ef14537c5d453c1703f80aa 100644 +index c75ce8435ddef6502df1a57ca4b95186259a2a41..cda3ab0924b27bcd3ccfec4b0eb19ef1c24f18fb 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -150,6 +150,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -151,6 +151,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ @Nullable public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode); diff --git a/Spigot-API-Patches/0190-Entity-Jump-API.patch b/Spigot-API-Patches/0190-Entity-Jump-API.patch index 74f7ac19f3..32ddfae9d9 100644 --- a/Spigot-API-Patches/0190-Entity-Jump-API.patch +++ b/Spigot-API-Patches/0190-Entity-Jump-API.patch @@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f0067c2e953d18e1a33536980071ba3f + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index deab505250145e795ef14537c5d453c1703f80aa..7f73e4b92bc7456477d054e69e93e5602d88a8fa 100644 +index cda3ab0924b27bcd3ccfec4b0eb19ef1c24f18fb..a60523cc9c05396ce5c3ebabd231f3ca374c3efe 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -711,5 +711,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -732,5 +732,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * @return Whether or not this entity is using or charging an attack (Bow pulled back, drinking potion, eating food) */ boolean isHandRaised(); diff --git a/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch b/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch index 8b7612e97f..b979af8fbb 100644 --- a/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch +++ b/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch @@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..f7f171c4ee0b8339b2f8fbe82442d65f + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 3600b4c84058713616a6448c1175a7d1ba74fd7b..787bb144b5918ef1e46d69cb72b84128d2b678f3 100644 +index 13077f96ce32cbb75197a4480715b1c71deb451d..e133fe79d0cfdcc057a3101f0b7b5877fbc82b3c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1,6 +1,7 @@ @@ -187,7 +187,7 @@ index 3600b4c84058713616a6448c1175a7d1ba74fd7b..787bb144b5918ef1e46d69cb72b84128 import com.destroystokyo.paper.Title; // Paper import com.destroystokyo.paper.profile.PlayerProfile; // Paper import java.util.Date; // Paper -@@ -1723,6 +1724,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1749,6 +1750,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * Reset the cooldown counter to 0, effectively starting the cooldown period. */ void resetCooldown(); diff --git a/Spigot-API-Patches/0203-World-view-distance-api.patch b/Spigot-API-Patches/0203-World-view-distance-api.patch index 6676931bf2..402b218254 100644 --- a/Spigot-API-Patches/0203-World-view-distance-api.patch +++ b/Spigot-API-Patches/0203-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 0a5865d85dfc28cb68f753878608b12afd74bc99..be4d6ca8e8ec4c2e6643eaecc19f11466e14658c 100644 +index 143fcbcdbfad551cd4392f54cf189fe3bee41706..ec719d5c0741f3489884709169fee93ef02244bb 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -3275,6 +3275,34 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -3279,6 +3279,34 @@ public interface World extends PluginMessageRecipient, Metadatable { int getViewDistance(); // Spigot end diff --git a/Spigot-API-Patches/0206-Potential-bed-API.patch b/Spigot-API-Patches/0206-Potential-bed-API.patch index 764a63d9d7..dd2041922b 100644 --- a/Spigot-API-Patches/0206-Potential-bed-API.patch +++ b/Spigot-API-Patches/0206-Potential-bed-API.patch @@ -8,13 +8,22 @@ 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/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 79569a329aa19ed954b9b65b78ef5d6d313501a1..c0d38f5a39610cbc523d210b76f17fa17c0d7e62 100644 +index 1f94cbee36b6a952b2ecca8efbeaf7deee640a81..c0d38f5a39610cbc523d210b76f17fa17c0d7e62 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -248,6 +248,18 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder - @Nullable - public Location getBedSpawnLocation(); +@@ -239,6 +239,43 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder + */ + public int getSleepTicks(); ++ /** ++ * Gets the Location where the player will spawn at their bed, null if ++ * they have not slept in one or their current bed spawn is invalid. ++ * ++ * @return Bed Spawn Location if bed exists, otherwise null. ++ */ ++ @Nullable ++ public Location getBedSpawnLocation(); ++ + // Paper start - Potential bed api + /** + * Gets the Location of the player's bed, null if they have not slept @@ -26,7 +35,23 @@ index 79569a329aa19ed954b9b65b78ef5d6d313501a1..c0d38f5a39610cbc523d210b76f17fa1 + @Nullable + public Location getPotentialBedLocation(); + // Paper end ++ ++ /** ++ * Sets the Location where the player will spawn at their bed. ++ * ++ * @param location where to set the respawn location ++ */ ++ public void setBedSpawnLocation(@Nullable Location location); ++ ++ /** ++ * Sets the Location where the player will spawn at their bed. ++ * ++ * @param location where to set the respawn location ++ * @param force whether to forcefully set the respawn location even if a ++ * valid bed is not present ++ */ ++ public void setBedSpawnLocation(@Nullable Location location, boolean force); + /** - * Sets the Location where the player will spawn at their bed. - * + * Attempts to make the entity sleep at the given location. + *
From e27149bff4cc569427ff82faa739bd03a3a5e703 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 25 Jun 2020 00:02:26 -0400 Subject: [PATCH 04/95] Current progress --- Spigot-Server-Patches/0001-POM-Changes.patch | 14 ++-- .../0002-Paper-config-files.patch | 64 +++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index d0e2a70921..ec0dbc3a7d 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d45118d75526 100644 +index 0466cd48f5ccd1479f2909c70654d884dc1e8f24..7bc5bf271e435e1e0d85af133f1352f319f462b5 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,14 @@ @@ -16,7 +16,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 - spigot + paper jar - 1.15.2-R0.1-SNAPSHOT + 1.16.1-R0.1-SNAPSHOT - Spigot - https://www.spigotmc.org/ + Paper @@ -27,7 +27,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 + UTF-8 unknown - 1.15.2 + 1.16.1 @@ -19,16 +18,22 @@ @@ -56,7 +56,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 compile @@ -50,6 +55,17 @@ - 7.3.1 + 8.0.1 compile + @@ -190,18 +190,18 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 91e2d0b9d9f698f54b49636944a6282adcff5b4b..3fb78997d8c4d913770a9a6a35f34e2c61b896fa 100644 +index 4ac80c20ba970a2078fe62c452e7fdfb8ad0b46e..a5c4b7f28f13f0aad4712912f60ba5fc6785539a 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -186,7 +186,7 @@ public class Main { } - if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { + if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { - Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L); + Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -21); + deadline.add(Calendar.DAY_OF_YEAR, -3); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 93046379d0cefd5d3236fc59e698809acdc18f80..674096cab190d62622f9947853b056f57d43a2a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index f8d47ac482..1995587bd2 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -530,10 +530,10 @@ index 0000000000000000000000000000000000000000..a738657394bcccd859ef260a801736d4 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 87c4b4c6b7793808308c0bfab957f9fd6425f452..beb6b63fa483f0a7b29f5403bebf7ee47b27cd29 100644 +index 062a82c37723b7f032103ba2904877ae79b1ae01..5585b5646b5f3650aa3b795be06f920699a85403 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -270,15 +270,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -273,15 +273,15 @@ public class ChunkProviderServer extends IChunkProvider { } } @@ -543,22 +543,22 @@ index 87c4b4c6b7793808308c0bfab957f9fd6425f452..beb6b63fa483f0a7b29f5403bebf7ee4 + @Override public boolean a(Entity entity) { long i = ChunkCoordIntPair.pair(MathHelper.floor(entity.locX()) >> 4, MathHelper.floor(entity.locZ()) >> 4); - return this.a(i, PlayerChunk::b); + return this.a(i, (Function>>) PlayerChunk::b); // CraftBukkit - decompile error } - @Override - public boolean a(ChunkCoordIntPair chunkcoordintpair) { + public final boolean isEntityTickingChunk(ChunkCoordIntPair chunkcoordintpair) { return this.a(chunkcoordintpair); } // Paper - OBFHELPER + @Override public boolean a(ChunkCoordIntPair chunkcoordintpair) { - return this.a(chunkcoordintpair.pair(), PlayerChunk::b); + return this.a(chunkcoordintpair.pair(), (Function>>) PlayerChunk::b); // CraftBukkit - decompile error } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 136d1b50f1cfe71aa5ce1495d9ffdf4a3cbd5aac..9eed98e3796be6d49dc51af9038a7376c94edeee 100644 +index 27e6872c675647d7e61040b76183dac4e347a40c..1964130ae411ff7d5e1b456a23629804d294a5d0 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -170,6 +170,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings")); +@@ -148,6 +148,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings")); org.spigotmc.SpigotConfig.registerCommands(); // Spigot end + // Paper start @@ -571,14 +571,14 @@ index 136d1b50f1cfe71aa5ce1495d9ffdf4a3cbd5aac..9eed98e3796be6d49dc51af9038a7376 + com.destroystokyo.paper.PaperConfig.registerCommands(); + // Paper end - this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); - this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs); + this.setPVP(dedicatedserverproperties.pvp); + this.setAllowFlight(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9fddbae24c7cb7b24e3899714ced1375b928654f..f4863852b04c5fa55b79acabe40ce59909b9bbbd 100644 +index 390dafff979ebdd99b98db312035d665ab1eabda..2f81613099f3fa8828ce0a20c2cc26d431f208e5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { - private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); +@@ -136,9 +136,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { + private static final DataWatcherObject aA = DataWatcher.a(Entity.class, DataWatcherRegistry.i); protected static final DataWatcherObject POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s); public boolean inChunk; - public int chunkX; @@ -587,23 +587,23 @@ index 9fddbae24c7cb7b24e3899714ced1375b928654f..f4863852b04c5fa55b79acabe40ce599 + public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER + public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER + public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER + private boolean aB; public long Z; public long aa; - public long ab; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 158cc1beb2d6b00642d025a5dd6797c4a20464bd..29e776ca19621b93d5b295d12f0576e6980cf11a 100644 +index 62f62c2c98fbaff163d9079091e6f39db2d77fa0..484e78746aa62bb0b12968165bf8e056b27152f3 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -3,6 +3,7 @@ package net.minecraft.server; - import com.mojang.datafixers.DataFixUtils; - import java.util.Collections; +@@ -2,6 +2,7 @@ package net.minecraft.server; + + import com.google.common.collect.ImmutableSet; import java.util.Optional; +import java.util.Set; // Paper import java.util.UUID; import java.util.function.Function; import java.util.stream.Stream; -@@ -435,4 +436,10 @@ public class EntityTypes { - return new EntityTypes<>(this.a, this.b, this.c, this.d, this.e, this.f, this.g); +@@ -463,4 +464,10 @@ public class EntityTypes { + return new EntityTypes<>(this.a, this.b, this.d, this.e, this.f, this.g, this.c, this.j, this.h, this.i); } } + @@ -614,10 +614,10 @@ index 158cc1beb2d6b00642d025a5dd6797c4a20464bd..29e776ca19621b93d5b295d12f0576e6 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ad43b48073f5d59e6f6b5b2ec3de8cc9f03f9956..2e1eabba14a3757d03fd90741651001e78c6322f 100644 +index 74ad1325727bdc41ed5b2e67058aeaa4fe6db4f2..03dc3dd41015dc210d2781c207261fc310c65519 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -70,6 +70,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -76,6 +76,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean populating; public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot @@ -626,27 +626,27 @@ index ad43b48073f5d59e6f6b5b2ec3de8cc9f03f9956..2e1eabba14a3757d03fd90741651001e public final SpigotTimings.WorldTimingsHandler timings; // Spigot public static BlockPosition lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -90,6 +92,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -92,6 +94,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { - this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot + protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { + this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot + this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper this.generator = gen; 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 be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b549172bea56ec 100644 +index 9c13f39e85b019440cb59bbd736ad9920e2151da..174c63f2c93693aa06a3574dc6dea91c98ea1e25 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -769,6 +769,7 @@ public final class CraftServer implements Server { +@@ -792,6 +792,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot + com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper for (WorldServer world : console.getWorlds()) { - world.worldData.setDifficulty(config.difficulty); + world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -796,6 +797,7 @@ public final class CraftServer implements Server { +@@ -819,6 +820,7 @@ public final class CraftServer implements Server { world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns(); } world.spigotConfig.init(); // Spigot @@ -654,7 +654,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917 } pluginManager.clearPlugins(); -@@ -803,6 +805,7 @@ public final class CraftServer implements Server { +@@ -826,6 +828,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -662,7 +662,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2000,4 +2003,35 @@ public final class CraftServer implements Server { +@@ -2051,4 +2054,35 @@ public final class CraftServer implements Server { { return spigot; } @@ -699,7 +699,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 3fb78997d8c4d913770a9a6a35f34e2c61b896fa..daa65aaf8c9616e5e058f3337fc4fc0895d13364 100644 +index a5c4b7f28f13f0aad4712912f60ba5fc6785539a..3d15661eb1f15f74213ecb7e8eceb1f231ad2c1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -129,6 +129,14 @@ public class Main { @@ -718,7 +718,7 @@ index 3fb78997d8c4d913770a9a6a35f34e2c61b896fa..daa65aaf8c9616e5e058f3337fc4fc08 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index a52cbba6e681bc96a15a3eea62831a1628f921a7..98ed975a6241395b6119d5b3a62d24329aa1f05b 100644 +index 0005d4226467cc25b55f9863eb5b7aaeb4dd6917..5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -39,36 +39,36 @@ public class SpigotWorldConfig From 6800c77f75cfd834ff14ab1d28dc2dd8374d1a13 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 25 Jun 2020 05:27:25 -0400 Subject: [PATCH 05/95] Current progress - Leaf, tag your it --- .../0002-Add-FastUtil-to-Bukkit.patch | 2 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- ...nt-protocol-version-and-virtual-host.patch | 2 +- ...tional-world.getNearbyEntities-API-s.patch | 2 +- .../0111-Expand-Explosions-API.patch | 2 +- .../0115-Add-World.getEntity-UUID-API.patch | 2 +- .../0116-InventoryCloseEvent-Reason-API.patch | 2 +- ...vide-Chunk-Coordinates-as-a-Long-API.patch | 2 +- .../0132-Async-Chunks-API.patch | 2 +- ...Blocks-to-be-accessed-via-a-long-key.patch | 2 +- .../0138-isChunkGenerated-API.patch | 2 +- .../0157-Add-sun-related-API.patch | 2 +- .../0180-Add-Heightmap-API.patch | 2 +- .../0205-Spawn-Reason-API.patch | 2 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 431 +++++++-------- Spigot-Server-Patches/0004-MC-Utils.patch | 517 +++++++++--------- ...-MinecraftKey-Information-to-Objects.patch | 16 +- ...to-current-Chunk-for-Entity-and-Bloc.patch | 68 +-- ...ts-for-each-Entity-Block-Entity-Type.patch | 10 +- Spigot-Server-Patches/0009-Timings-v2.patch | 414 +++++++------- ...ctus-and-reed-natural-growth-heights.patch | 18 +- ...figurable-baby-zombie-movement-speed.patch | 24 +- ...012-Configurable-fishing-time-ranges.patch | 14 +- ...d-mobs-to-jump-and-take-water-damage.patch | 41 +- ...-despawn-distances-for-living-entiti.patch | 19 +- ...5-Allow-for-toggling-of-spawn-chunks.patch | 4 +- ...ck-and-tnt-entities-at-the-specified.patch | 10 +- ...ient-crashes-server-lists-and-Mojang.patch | 16 +- .../0018-Implement-Paper-VersionChecker.patch | 2 +- ...d-version-history-to-version-command.patch | 6 +- .../0020-Player-affects-spawning-API.patch | 106 +++- ...ve-invalid-mob-spawner-tile-entities.patch | 4 +- .../0022-Optimize-TileEntity-Ticking.patch | 4 +- ...023-Further-improve-server-tick-loop.patch | 20 +- ...024-Only-refresh-abilities-if-needed.patch | 4 +- .../0025-Entity-Origin-API.patch | 28 +- ...event-tile-entity-and-entity-crashes.patch | 8 +- ...nfigurable-top-of-nether-void-damage.patch | 26 +- ...e-before-converting-and-renaming-pla.patch | 6 +- .../0029-Always-tick-falling-blocks.patch | 2 +- .../0030-Configurable-end-credits.patch | 20 +- ...-explosions-processing-dead-entities.patch | 21 +- .../0032-Optimize-explosions.patch | 22 +- .../0033-Disable-explosion-knockback.patch | 25 +- .../0034-Disable-thunder.patch | 8 +- .../0035-Disable-ice-and-snow.patch | 4 +- ...6-Configurable-mob-spawner-tick-rate.patch | 2 +- ...sition-the-first-time-an-entity-is-s.patch | 18 +- .../0038-Add-BeaconEffectEvent.patch | 6 +- ...figurable-container-update-tick-rate.patch | 6 +- .../0041-Disable-spigot-tick-limiters.patch | 4 +- .../0042-Add-PlayerInitialSpawnEvent.patch | 4 +- ...urable-Disabling-Cat-Chest-Detection.patch | 4 +- ...44-Ensure-commands-are-not-ran-async.patch | 8 +- ...chunks-are-slime-spawn-chunks-toggle.patch | 16 +- .../0046-Expose-server-CommandMap.patch | 4 +- ...e-informative-in-maxHealth-exception.patch | 4 +- .../0048-Player-Tab-List-and-Title-APIs.patch | 12 +- .../0049-Ensure-inv-drag-is-in-bounds.patch | 4 +- ...entation-of-tile-entity-removal-list.patch | 8 +- .../0154-Basic-PlayerProfile-API.patch | 10 +- 61 files changed, 988 insertions(+), 1068 deletions(-) diff --git a/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch index 0f3d5a059a..cfd9c9d576 100644 --- a/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch +++ b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add FastUtil to Bukkit Doesn't expose to plugins, just allows Paper-API to use it for optimization diff --git a/pom.xml b/pom.xml -index 9975ba9ae19f6217bec206fee247fac1a30d58fc..e8d9982bdbf9f66a54db16bf920e8106b81b034f 100644 +index 6953bd86915f6c7a0afb0b87abd38053cb7766d5..04781abaf6ec21f2f19f366c3d1b27687f502743 100644 --- a/pom.xml +++ b/pom.xml @@ -49,6 +49,12 @@ diff --git a/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch index a522f45e48..6632e4ba1a 100644 --- a/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index cd8a09576a99f03f5ef9926d55fa3a1193ba0da6..808c3b4a4f494e05542f29324db655ee6166021e 100644 +index 9c7c74eb30d2f54843f5e103530f5b2592e8414e..75d62402181934d316582023fdc012ea3c74306a 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable; diff --git a/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch index ee3fbafd42..575ec840f2 100644 --- a/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b + +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index cb7d9f055193618c8a7e80796c2ba52651baca55..9398f303f191c57ee3e2bd33f205a881be6543f4 100644 +index 28faaa29bde457e539c99d7ebe59a661e1841680..8afa4db2d47b3941055d045ff351eb8b0a35fffa 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch b/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch index 6af56de3a3..b3278c8a90 100644 --- a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch +++ b/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 3b027f67c1763ee0a4f7b02490d3cee1c3eff369..fbe7e76c0f3122dd47c7ca4562b5ac3577a71ffc 100644 +index a636956c4772f4e38eaa71553d3dfbd7ef36f0cd..3150f7d81c87b57944231bd95bb2e49af51f7eca 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,9 @@ diff --git a/Spigot-API-Patches/0111-Expand-Explosions-API.patch b/Spigot-API-Patches/0111-Expand-Explosions-API.patch index 0b5880cfd7..11871fe62c 100644 --- a/Spigot-API-Patches/0111-Expand-Explosions-API.patch +++ b/Spigot-API-Patches/0111-Expand-Explosions-API.patch @@ -106,7 +106,7 @@ index 4cf22afc3c1f1cc19b6e5350043431215908a612..ac3c8eef58872c2de840a4b7ba7d77c2 * 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 085c7a42c3e758770d5883e3cddf896ac6b7645b..08985f77dce71ebd76510be873043e34ac34a821 100644 +index c478db22ade86ca58551ba94043dd1c2fd08004e..42129f705a3e821872538183ec38bbd179a4cfae 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1354,6 +1354,88 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch b/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch index c8a7bafa4a..cf2bc25a7e 100644 --- a/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch +++ b/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 08985f77dce71ebd76510be873043e34ac34a821..889756b1c8d5e413a6ebe3623e128a737f88d48c 100644 +index 42129f705a3e821872538183ec38bbd179a4cfae..f321f7a3b7afc3969edf2675a7872ffe31fb657f 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -914,6 +914,17 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch b/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch index 566114944a..3bed0ec54c 100644 --- a/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 2d413d720c828c7f334abde7eb02935317e2fd17..79569a329aa19ed954b9b65b78ef5d6d313501a1 100644 +index 863cdf7408cb6b42e7927505e34a2a93017e06ff..1f94cbee36b6a952b2ecca8efbeaf7deee640a81 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -152,6 +152,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder diff --git a/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch b/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch index 7ebd3b8fdc..4f42606789 100644 --- a/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch +++ b/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch @@ -44,7 +44,7 @@ index 95e485eea693e7648e63d198c8591d89e02e6755..0bbef14a9fc2a3ec03b4db59c8d8e1ee * Gets the world containing this chunk * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 889756b1c8d5e413a6ebe3623e128a737f88d48c..e5b76d59fdcc85344cf3932b38ab096155d2eec3 100644 +index f321f7a3b7afc3969edf2675a7872ffe31fb657f..008fb638b5b0601109c72c322caa7669403ae273 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -207,6 +207,22 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0132-Async-Chunks-API.patch b/Spigot-API-Patches/0132-Async-Chunks-API.patch index 16273413b5..c9e79329ad 100644 --- a/Spigot-API-Patches/0132-Async-Chunks-API.patch +++ b/Spigot-API-Patches/0132-Async-Chunks-API.patch @@ -8,7 +8,7 @@ Adds API's to load or generate chunks asynchronously. Also adds utility methods to Entity to teleport asynchronously. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index e5b76d59fdcc85344cf3932b38ab096155d2eec3..8fe496ad8f566183e2280582d00c3b7751f06d75 100644 +index 008fb638b5b0601109c72c322caa7669403ae273..fbd9546731aaf5673603646136c668dbc59821b1 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -221,6 +221,467 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch b/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch index 6914045123..2ac345f8a0 100644 --- a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch +++ b/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch @@ -48,7 +48,7 @@ index f87ecd0a753b0f730ee33c0dd699b7388e8c6697..07e532cde37255ffb2db368453bb69ee * @return A new location where X/Y/Z are the center of the block */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 8fe496ad8f566183e2280582d00c3b7751f06d75..08aebaedce935faa1a2c54c5abc02b85896df216 100644 +index fbd9546731aaf5673603646136c668dbc59821b1..85bd7d8926d313a313f17c5dea644615daf72c62 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -90,6 +90,38 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0138-isChunkGenerated-API.patch b/Spigot-API-Patches/0138-isChunkGenerated-API.patch index 5d2194dadf..69599faeb2 100644 --- a/Spigot-API-Patches/0138-isChunkGenerated-API.patch +++ b/Spigot-API-Patches/0138-isChunkGenerated-API.patch @@ -34,7 +34,7 @@ index 07e532cde37255ffb2db368453bb69ee0a410931..6e1a1124a6e528c1a94ccb1d09bc5dcc /** * Sets the position of this Location and returns itself diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 08aebaedce935faa1a2c54c5abc02b85896df216..42b91634a131f8705cbde96b6068d5881a393fb7 100644 +index 85bd7d8926d313a313f17c5dea644615daf72c62..933f2729276b37b4c82cda986e39292cc2e86c4e 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -254,6 +254,17 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0157-Add-sun-related-API.patch b/Spigot-API-Patches/0157-Add-sun-related-API.patch index b4c7ae2399..14fe94f7f4 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 42b91634a131f8705cbde96b6068d5881a393fb7..f9a5ea4fcdb87e741cf04b47d469e05f8a786155 100644 +index 933f2729276b37b4c82cda986e39292cc2e86c4e..e3d4da353e5f876f0456106b350838917f492051 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1755,6 +1755,16 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0180-Add-Heightmap-API.patch b/Spigot-API-Patches/0180-Add-Heightmap-API.patch index cec3573176..f270b314cb 100644 --- a/Spigot-API-Patches/0180-Add-Heightmap-API.patch +++ b/Spigot-API-Patches/0180-Add-Heightmap-API.patch @@ -89,7 +89,7 @@ index 77d9cd0a1f54b5eb233eddbcff1bfa76bc182e9a..5904750329a5c7061de6e4fe32335b0d * Creates explosion at this location with given power * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index f9a5ea4fcdb87e741cf04b47d469e05f8a786155..0a5865d85dfc28cb68f753878608b12afd74bc99 100644 +index e3d4da353e5f876f0456106b350838917f492051..143fcbcdbfad551cd4392f54cf189fe3bee41706 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -160,6 +160,87 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0205-Spawn-Reason-API.patch b/Spigot-API-Patches/0205-Spawn-Reason-API.patch index de7272882a..b3dd53923a 100644 --- a/Spigot-API-Patches/0205-Spawn-Reason-API.patch +++ b/Spigot-API-Patches/0205-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 be4d6ca8e8ec4c2e6643eaecc19f11466e14658c..9518da825ed752c5a477ca9132de50f923f9192d 100644 +index ec719d5c0741f3489884709169fee93ef02244bb..920f3eb82f1492bd59896e03b65a4df2e46c854d 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,8 @@ diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index ae0b5be3e0..c16fe13fe1 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -50,65 +50,154 @@ index a3afe60b0d85cf90bf7a170dc0a0b61a796381a7..85f799a713db0c822d46b689010f9f6b System.arraycopy(this.b, 0, au, 0, this.c); if (au.length > this.c) { diff --git a/src/main/java/net/minecraft/server/BehaviorFindPosition.java b/src/main/java/net/minecraft/server/BehaviorFindPosition.java -index 37006ec1bbb8fa285257edacdf337591595852a2..35eb3a5a61145e94d5b0c77c0eb13bfa46fac23b 100644 +index 84a872dfd35249972129130083d51d71d75bff1e..b4976b9e00e631c1431543c0cb2064e153f3a2ef 100644 --- a/src/main/java/net/minecraft/server/BehaviorFindPosition.java +++ b/src/main/java/net/minecraft/server/BehaviorFindPosition.java -@@ -53,7 +53,7 @@ public class BehaviorFindPosition extends Behavior { - villageplace.a(this.a.c(), (blockposition1) -> { +@@ -81,7 +81,7 @@ public class BehaviorFindPosition extends Behavior { + villageplace.a(this.b.c(), (blockposition1) -> { return blockposition1.equals(blockposition); }, blockposition, 1); -- entitycreature.getBehaviorController().setMemory(this.b, (Object) GlobalPos.create(worldserver.getWorldProvider().getDimensionManager(), blockposition)); -+ entitycreature.getBehaviorController().setMemory(this.b, GlobalPos.create(worldserver.getWorldProvider().getDimensionManager(), blockposition)); +- entitycreature.getBehaviorController().setMemory(this.c, (Object) GlobalPos.create(worldserver.getDimensionKey(), blockposition)); ++ entitycreature.getBehaviorController().setMemory(this.c, GlobalPos.create(worldserver.getDimensionKey(), blockposition)); // Paper - decompile fix + this.f.clear(); PacketDebug.c(worldserver, blockposition); }); - } else if (this.f < 5) { diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 960dce23072bbb5fad36760677f0fe2efb661552..253890e53702f9ba1c6628cc860a4ca10756626a 100644 +index 6c2ed9c1b8567abcdb11bdc3dbaeed217a2f61e7..ae0ac8d383ca11a683465d8c83a8b8a66e567079 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -54,7 +54,7 @@ public abstract class BiomeBase { +@@ -26,76 +26,31 @@ import org.apache.logging.log4j.Logger; + public class BiomeBase { + + public static final Logger LOGGER = LogManager.getLogger(); +- public static final Codec b = RecordCodecBuilder.create((instance) -> { +- RecordCodecBuilder recordcodecbuilder = BiomeBase.Precipitation.d.fieldOf("precipitation").forGetter((biomebase) -> { +- return biomebase.o; +- }); +- RecordCodecBuilder recordcodecbuilder1 = BiomeBase.Geography.r.fieldOf("category").forGetter((biomebase) -> { +- return biomebase.n; +- }); +- RecordCodecBuilder recordcodecbuilder2 = Codec.FLOAT.fieldOf("depth").forGetter((biomebase) -> { +- return biomebase.h; +- }); +- RecordCodecBuilder recordcodecbuilder3 = Codec.FLOAT.fieldOf("scale").forGetter((biomebase) -> { +- return biomebase.i; +- }); +- RecordCodecBuilder recordcodecbuilder4 = Codec.FLOAT.fieldOf("temperature").forGetter((biomebase) -> { +- return biomebase.j; +- }); +- RecordCodecBuilder recordcodecbuilder5 = Codec.FLOAT.fieldOf("downfall").forGetter((biomebase) -> { +- return biomebase.k; +- }); +- RecordCodecBuilder recordcodecbuilder6 = BiomeFog.a.fieldOf("effects").forGetter((biomebase) -> { +- return biomebase.p; +- }); +- RecordCodecBuilder recordcodecbuilder7 = Codec.INT.fieldOf("sky_color").forGetter((biomebase) -> { +- return biomebase.t; +- }); +- RecordCodecBuilder recordcodecbuilder8 = WorldGenSurfaceComposite.a.fieldOf("surface_builder").forGetter((biomebase) -> { +- return biomebase.m; +- }); +- Codec codec = WorldGenStage.Features.c; +- Codec codec1 = WorldGenCarverWrapper.a.listOf(); +- Logger logger = BiomeBase.LOGGER; +- +- logger.getClass(); +- RecordCodecBuilder recordcodecbuilder9 = Codec.simpleMap(codec, codec1.promotePartial(SystemUtils.a("Carver: ", logger::error)), INamable.a(WorldGenStage.Features.values())).fieldOf("carvers").forGetter((biomebase) -> { +- return biomebase.q; +- }); +- +- codec1 = WorldGenStage.Decoration.k; +- Codec codec2 = WorldGenFeatureConfigured.b.listOf(); +- Logger logger1 = BiomeBase.LOGGER; +- +- logger1.getClass(); +- RecordCodecBuilder recordcodecbuilder10 = Codec.simpleMap(codec1, codec2.promotePartial(SystemUtils.a("Feature: ", logger1::error)), INamable.a(WorldGenStage.Decoration.values())).fieldOf("features").forGetter((biomebase) -> { +- return biomebase.r; +- }); +- +- codec2 = StructureFeature.a.listOf(); +- logger1 = BiomeBase.LOGGER; +- logger1.getClass(); +- RecordCodecBuilder recordcodecbuilder11 = codec2.promotePartial(SystemUtils.a("Structure start: ", logger1::error)).fieldOf("starts").forGetter((biomebase) -> { +- return (List) biomebase.u.values().stream().sorted(Comparator.comparing((structurefeature) -> { +- return IRegistry.STRUCTURE_FEATURE.getKey(structurefeature.b); +- })).collect(Collectors.toList()); +- }); +- Codec codec3 = EnumCreatureType.g; +- Codec codec4 = BiomeBase.BiomeMeta.b.listOf(); +- Logger logger2 = BiomeBase.LOGGER; +- +- logger2.getClass(); +- return instance.group(recordcodecbuilder, recordcodecbuilder1, recordcodecbuilder2, recordcodecbuilder3, recordcodecbuilder4, recordcodecbuilder5, recordcodecbuilder6, recordcodecbuilder7, recordcodecbuilder8, recordcodecbuilder9, recordcodecbuilder10, recordcodecbuilder11, Codec.simpleMap(codec3, codec4.promotePartial(SystemUtils.a("Spawn data: ", logger2::error)), INamable.a(EnumCreatureType.values())).fieldOf("spawners").forGetter((biomebase) -> { +- return biomebase.v; +- }), BiomeBase.d.a.listOf().fieldOf("climate_parameters").forGetter((biomebase) -> { +- return biomebase.x; +- }), Codec.STRING.optionalFieldOf("parent").forGetter((biomebase) -> { +- return Optional.ofNullable(biomebase.l); +- })).apply(instance, BiomeBase::new); ++ // Paper decompile error - Spigots stupid decompiler ++ public static final Codec b = RecordCodecBuilder.create(i -> { ++ Codec k1 = WorldGenStage.Decoration.k; // Erase type - WorldGenstage.Decoration has wrong type ++ return i.group( ++ Precipitation.d.fieldOf("precipitation").forGetter(biome -> biome.o), ++ Geography.r.fieldOf("category").forGetter(biome -> biome.n), ++ Codec.FLOAT.fieldOf("depth").forGetter(biome -> biome.h), ++ Codec.FLOAT.fieldOf("scale").forGetter(biome -> biome.i), ++ Codec.FLOAT.fieldOf("temperature").forGetter(biome -> biome.j), ++ Codec.FLOAT.fieldOf("downfall").forGetter(biome -> biome.k), ++ BiomeFog.a.fieldOf("effects").forGetter(biome -> biome.p), ++ Codec.INT.fieldOf("sky_color").forGetter(biome -> biome.t), ++ WorldGenSurfaceComposite.a.fieldOf("surface_builder").forGetter(biome -> biome.m), ++ Codec.simpleMap(WorldGenStage.Features.c, WorldGenCarverWrapper.a.listOf().promotePartial(SystemUtils.a("Carver: ", LOGGER::error)), INamable.a(WorldGenStage.Features.values())).fieldOf("carvers").forGetter(biome -> biome.q), ++ Codec.simpleMap((Codec) k1, WorldGenFeatureConfigured.b.listOf().promotePartial(SystemUtils.a("Feature: ", LOGGER::error)), INamable.a(WorldGenStage.Decoration.values())).fieldOf("features").forGetter(biome -> biome.r), ++ StructureFeature.a.listOf().promotePartial(SystemUtils.a("Structure start: ", LOGGER::error)).fieldOf("starts").forGetter(biome -> biome.u.values().stream().sorted(Comparator.comparing(cf -> IRegistry.STRUCTURE_FEATURE.getKey(cf.b))).collect(Collectors.toList())), ++ Codec.simpleMap(EnumCreatureType.g, BiomeMeta.b.listOf().promotePartial(SystemUtils.a("Spawn data: ", LOGGER::error)), INamable.a(EnumCreatureType.values())).fieldOf("spawners").forGetter(biome -> biome.v), ++ d.a.listOf().fieldOf("climate_parameters").forGetter(biome -> biome.x), ++ Codec.STRING.optionalFieldOf("parent").forGetter(biome -> Optional.ofNullable(biome.l)) ++ ).apply(i, BiomeBase::new); ++ // Paper end + }); + public static final Set c = Sets.newHashSet(); +- public static final RegistryBlockID d = new RegistryBlockID<>(); +- protected static final NoiseGenerator3 e = new NoiseGenerator3(new SeededRandom(1234L), ImmutableList.of(0)); ++ public static final RegistryBlockID reg = new RegistryBlockID<>(); // Paper - decompile error - rename ++ protected static final NoiseGenerator3 NOISE_GENERATOR_3 = new NoiseGenerator3(new SeededRandom(1234L), ImmutableList.of(0)); // Paper - decompile error - rename + public static final NoiseGenerator3 f = new NoiseGenerator3(new SeededRandom(2345L), ImmutableList.of(0)); + @Nullable + protected String g; +@@ -130,7 +85,7 @@ public class BiomeBase { @Nullable public static BiomeBase a(BiomeBase biomebase) { -- return (BiomeBase) BiomeBase.c.fromId(IRegistry.BIOME.a((Object) biomebase)); -+ return (BiomeBase) BiomeBase.c.fromId(IRegistry.BIOME.a(biomebase)); // Paper - decompile fix +- return (BiomeBase) BiomeBase.d.fromId(IRegistry.BIOME.a((Object) biomebase)); ++ return (BiomeBase) BiomeBase.reg.fromId(IRegistry.BIOME.a(biomebase)); // Paper - decompile fix / rename } public static WorldGenCarverWrapper a(WorldGenCarverAbstract worldgencarverabstract, C c0) { -@@ -236,7 +236,7 @@ public abstract class BiomeBase { +@@ -197,7 +152,7 @@ public class BiomeBase { + }, Function.identity())); + this.v = map2; + this.x = list1; +- this.l = (String) optional.orElse((Object) null); ++ this.l = (String) optional.orElse(null); // Paper - decompile fix + Stream stream = map1.values().stream().flatMap(Collection::stream).filter((worldgenfeatureconfigured) -> { + return worldgenfeatureconfigured.d == WorldGenerator.DECORATED_FLOWER; + }); +@@ -250,7 +205,7 @@ public class BiomeBase { - @Nullable - public C b(StructureGenerator structuregenerator) { -- return (WorldGenFeatureConfiguration) this.t.get(structuregenerator); -+ return (C) this.t.get(structuregenerator); // Paper - decompile fix - } + protected float a(BlockPosition blockposition) { + if (blockposition.getY() > 64) { +- float f = (float) (BiomeBase.e.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D); ++ float f = (float) (BiomeBase.NOISE_GENERATOR_3.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D); // Paper - decompile error - rename - public List> g() { -diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index e40f9c153b4f1f8f11ea467e6bd8e670959282d6..c88a62f6b72a8851b95587bb49c898569d74e0c6 100644 ---- a/src/main/java/net/minecraft/server/BlockPosition.java -+++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - OfInt ofint = dynamic.asIntStream().spliterator(); - int[] aint = new int[3]; - -- if (ofint.tryAdvance((i) -> { -+ if (ofint.tryAdvance((Consumer) (i) -> { // Paper - decomile fix - aint[0] = i; -- }) && ofint.tryAdvance((i) -> { -+ }) && ofint.tryAdvance((Consumer) (i) -> { // Paper - decompile fix - aint[1] = i; - })) { -- ofint.tryAdvance((i) -> { -+ ofint.tryAdvance((Consumer) (i) -> { // Paper - decompile fix - aint[2] = i; - }); - } + return this.getTemperature() - (f + (float) blockposition.getY() - 64.0F) * 0.05F / 30.0F; + } else { diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java -index 28cfbaae287653d21e06f0017396b937e99fc3ad..1486d460c8ec3d117b4dc3d28b2c3f1b632e187b 100644 +index 771841e08591955e61c7bcc5b09c8457652c1b9c..8162c11d14b8e88c2b572f9ddf6b7a15977047f8 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java -@@ -20,10 +20,10 @@ public class BlockStateEnum & INamable> extends BlockState +@@ -20,10 +20,10 @@ public class BlockStateEnum & INamable> extends IBlockState protected BlockStateEnum(String s, Class oclass, Collection collection) { super(s, oclass); this.a = ImmutableSet.copyOf(collection); @@ -122,10 +211,10 @@ index 28cfbaae287653d21e06f0017396b937e99fc3ad..1486d460c8ec3d117b4dc3d28b2c3f1b if (this.b.containsKey(s1)) { diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java -index 68a601bac587294b46a79be6df7ee4e6e38e5f28..efdf611e66ffd782291de749d8a48f3bf08f2129 100644 +index 026c51b5ce80ff4161d2f126e8df9dc493a46957..fb3ddcc5d5a1154a7e0583135ecd541e8f67ff0b 100644 --- a/src/main/java/net/minecraft/server/ChunkStatus.java +++ b/src/main/java/net/minecraft/server/ChunkStatus.java -@@ -84,7 +84,7 @@ public class ChunkStatus { +@@ -90,7 +90,7 @@ public class ChunkStatus { return (CompletableFuture) function.apply(ichunkaccess); }); private static final List q = ImmutableList.of(ChunkStatus.FULL, ChunkStatus.FEATURES, ChunkStatus.LIQUID_CARVERS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS); @@ -135,10 +224,10 @@ index 68a601bac587294b46a79be6df7ee4e6e38e5f28..efdf611e66ffd782291de749d8a48f3b for (int j = a().size() - 1; j >= 0; --j) { diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java -index ca9ed573914558d51318c713b14665480efdc5bf..f0d7a91fa06632d5731e277a9199aa9804d3a96a 100644 +index fbb708f5f7e4d2da9d96b595498da436b088a408..f27c7041cdc2f062f0abb222b02026194ab33c60 100644 --- a/src/main/java/net/minecraft/server/CraftingManager.java +++ b/src/main/java/net/minecraft/server/CraftingManager.java -@@ -63,7 +63,7 @@ public class CraftingManager extends ResourceDataJson { +@@ -64,7 +64,7 @@ public class CraftingManager extends ResourceDataJson { } this.recipes = (Map) map1.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry1) -> { @@ -148,7 +237,7 @@ index ca9ed573914558d51318c713b14665480efdc5bf..f0d7a91fa06632d5731e277a9199aa98 CraftingManager.LOGGER.info("Loaded {} recipes", map1.size()); } diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java -index 7d44348c78b0e468cef5c137d3a69aeb5704d881..73ecdd22ea1157abe00795d90c3e7b748650dbc8 100644 +index 4ab6e82a1415c40f3e2eee7414bf7de97f53b420..9c152b79164710d3d4175d0acbc9548d61390097 100644 --- a/src/main/java/net/minecraft/server/EntityVindicator.java +++ b/src/main/java/net/minecraft/server/EntityVindicator.java @@ -25,7 +25,7 @@ public class EntityVindicator extends EntityIllagerAbstract { @@ -160,21 +249,8 @@ index 7d44348c78b0e468cef5c137d3a69aeb5704d881..73ecdd22ea1157abe00795d90c3e7b74 this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); -diff --git a/src/main/java/net/minecraft/server/Fluid.java b/src/main/java/net/minecraft/server/Fluid.java -index 035f05e82769445f213c225a731db6d95626f6cd..7c9ba128620f54c9cd691d350d1ee225d867fe70 100644 ---- a/src/main/java/net/minecraft/server/Fluid.java -+++ b/src/main/java/net/minecraft/server/Fluid.java -@@ -74,7 +74,7 @@ public interface Fluid extends IBlockDataHolder { - if (immutablemap.isEmpty()) { - object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.FLUID.getKey(fluid.getType()).toString()))); - } else { -- object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.FLUID.getKey(fluid.getType()).toString()), dynamicops.createString("Properties"), dynamicops.createMap((Map) immutablemap.entrySet().stream().map((entry) -> { -+ object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.FLUID.getKey(fluid.getType()).toString()), dynamicops.createString("Properties"), dynamicops.createMap(immutablemap.entrySet().stream().map((entry) -> { // Paper - decompile fix - return Pair.of(dynamicops.createString(((IBlockState) entry.getKey()).a()), dynamicops.createString(IBlockDataHolder.b((IBlockState) entry.getKey(), (Comparable) entry.getValue()))); - }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond))))); - } diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java -index 447f6a55b619402447b5cf4db9b22ea8cfc7d51d..1890c760f9ffd7628d6ae3db40c36f5272379227 100644 +index 8886cedfe8809fe4711b5f2451e3e6456d2a6513..b77a0f0c2ee30df44b113aa6c8d4fa9206d3e2ba 100644 --- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java +++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java @@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler implements Mailbox implements - - public static Dynamic a(DynamicOps dynamicops, IBlockData iblockdata) { - ImmutableMap, Comparable> immutablemap = iblockdata.getStateMap(); -- Object object; -+ T object; // Paper - decompile fix - - if (immutablemap.isEmpty()) { - object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.BLOCK.getKey(iblockdata.getBlock()).toString()))); - } else { -- object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.BLOCK.getKey(iblockdata.getBlock()).toString()), dynamicops.createString("Properties"), dynamicops.createMap((Map) immutablemap.entrySet().stream().map((entry) -> { -+ object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.BLOCK.getKey(iblockdata.getBlock()).toString()), dynamicops.createString("Properties"), dynamicops.createMap(immutablemap.entrySet().stream().map((entry) -> { // Paper - decompile fix - return Pair.of(dynamicops.createString(((IBlockState) entry.getKey()).a()), dynamicops.createString(IBlockDataHolder.b((IBlockState) entry.getKey(), (Comparable) entry.getValue()))); - }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond))))); - } -@@ -348,9 +348,9 @@ public class IBlockData extends BlockDataAbstract implements - if (!iblockdata.o()) { - this.f = null; - } else { -- this.f = new VoxelShape[IBlockData.a.a.length]; -+ this.f = new VoxelShape[a.length]; // Paper - decompile fix - VoxelShape voxelshape = block.i(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO); -- EnumDirection[] aenumdirection = IBlockData.a.a; -+ EnumDirection[] aenumdirection = a; // Paper - decompile fix - - i = aenumdirection.length; - -@@ -366,7 +366,7 @@ public class IBlockData extends BlockDataAbstract implements - return this.g.b(enumdirection_enumaxis) < 0.0D || this.g.c(enumdirection_enumaxis) > 1.0D; - }); - this.i = new boolean[6]; -- EnumDirection[] aenumdirection1 = IBlockData.a.a; -+ EnumDirection[] aenumdirection1 = a; // Paper - decompile fix - int k = aenumdirection1.length; - - for (i = 0; i < k; ++i) { diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java -index 534e70671a624e58ed98df9dd62bd7f5ffdf91af..d5c284cdd10d33f5f1b7f456d6a384a44eafb139 100644 +index 2517b70ddeb985ae7d708c6a1708b42c6a67dd00..c469b5db81fb040fc27cd2e4f7cd61797f56a62d 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java +++ b/src/main/java/net/minecraft/server/IEntityAccess.java -@@ -47,7 +47,7 @@ public interface IEntityAccess { - return Stream.empty(); - } else { - AxisAlignedBB axisalignedbb1 = axisalignedbb.g(1.0E-7D); -- Stream stream = this.getEntities(entity, axisalignedbb1).stream().filter((entity1) -> { -+ Stream stream = this.getEntities(entity, axisalignedbb1).stream().filter((entity1) -> { // Paper - decompile fix - return !set.contains(entity1); - }).filter((entity1) -> { - return entity == null || !entity.isSameVehicle(entity1); -@@ -55,7 +55,6 @@ public interface IEntityAccess { - return Stream.of(entity1.au(), entity == null ? null : entity.j(entity1)); - }).filter(Objects::nonNull); - -- axisalignedbb1.getClass(); - return stream.filter(axisalignedbb1::c).map(VoxelShapes::a); - } - } -@@ -157,22 +156,22 @@ public interface IEntityAccess { +@@ -150,22 +150,22 @@ public interface IEntityAccess { @Nullable default T a(Class oclass, PathfinderTargetCondition pathfindertargetcondition, @Nullable EntityLiving entityliving, double d0, double d1, double d2, AxisAlignedBB axisalignedbb) { @@ -291,7 +310,7 @@ index 534e70671a624e58ed98df9dd62bd7f5ffdf91af..d5c284cdd10d33f5f1b7f456d6a384a4 if (pathfindertargetcondition.a(entityliving, t1)) { double d4 = t1.g(d0, d1, d2); -@@ -205,10 +204,10 @@ public interface IEntityAccess { +@@ -198,10 +198,10 @@ public interface IEntityAccess { default List a(Class oclass, PathfinderTargetCondition pathfindertargetcondition, EntityLiving entityliving, AxisAlignedBB axisalignedbb) { List list = this.a(oclass, axisalignedbb, (Predicate) null); List list1 = Lists.newArrayList(); @@ -305,45 +324,34 @@ index 534e70671a624e58ed98df9dd62bd7f5ffdf91af..d5c284cdd10d33f5f1b7f456d6a384a4 if (pathfindertargetcondition.a(entityliving, t0)) { list1.add(t0); diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java -index a986f2912fc04a7fdd49d648cbcd570464597937..c5658c0779b0e0d51fd4921456b6fef0711d7be3 100644 +index c5a95f51ba43b94fd07f8df6576f45c3dd0216a3..38ccfd78639a85abcefb915c5c231be5881cebc1 100644 --- a/src/main/java/net/minecraft/server/IOWorker.java +++ b/src/main/java/net/minecraft/server/IOWorker.java -@@ -46,7 +46,7 @@ public class IOWorker implements AutoCloseable { - if (throwable != null) { - completablefuture.completeExceptionally(throwable); - } else { -- completablefuture.complete((Object) null); -+ completablefuture.complete(null); // Paper - Decompile fix - } +@@ -83,7 +83,7 @@ public class IOWorker implements AutoCloseable { + return this.a(() -> { + try { + this.d.a(); +- return Either.left((Object) null); ++ return Either.left(null); // Paper - decompile error + } catch (Exception exception) { + IOWorker.LOGGER.warn("Failed to synchronized chunks", exception); + return Either.right(exception); +@@ -117,13 +117,13 @@ public class IOWorker implements AutoCloseable { + } - }); -@@ -106,7 +106,7 @@ public class IOWorker implements AutoCloseable { - })); + private void c() { +- this.c.a((Object) (new PairedQueue.b(IOWorker.Priority.LOW.ordinal(), this::b))); ++ this.c.a((new PairedQueue.b(IOWorker.Priority.LOW.ordinal(), this::b))); // Paper - decompile error + } - completablefuture1.whenComplete((object, throwable) -> { -- completablefuture.complete((Object) null); -+ completablefuture.complete(null); // Paper - decompile fix - }); - }; - }); -@@ -165,7 +165,7 @@ public class IOWorker implements AutoCloseable { private void a(ChunkCoordIntPair chunkcoordintpair, IOWorker.a ioworker_a) { try { - this.e.write(chunkcoordintpair, ioworker_a.a); + this.d.write(chunkcoordintpair, ioworker_a.a); - ioworker_a.b.complete((Object) null); + ioworker_a.b.complete(null); // Paper - decompile fix } catch (Exception exception) { IOWorker.LOGGER.error("Failed to store chunk {}", chunkcoordintpair, exception); ioworker_a.b.completeExceptionally(exception); -@@ -176,7 +176,7 @@ public class IOWorker implements AutoCloseable { - private void g() { - try { - this.e.close(); -- this.h.complete((Object) null); -+ this.h.complete(null); // Paper - decompile fix - } catch (Exception exception) { - IOWorker.LOGGER.error("Failed to close storage", exception); - this.h.completeExceptionally(exception); diff --git a/src/main/java/net/minecraft/server/LightEngineStorageSky.java b/src/main/java/net/minecraft/server/LightEngineStorageSky.java index 1e1f7ec6e6e6fc698a8a5118ce21321d104dc5eb..75d9065b32731dc635d9d09c48fb9643172381a9 100644 --- a/src/main/java/net/minecraft/server/LightEngineStorageSky.java @@ -362,18 +370,9 @@ index 1e1f7ec6e6e6fc698a8a5118ce21321d104dc5eb..75d9065b32731dc635d9d09c48fb9643 ++k; if (k >= l) { diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java -index ef315377579ca425ecb8d41aaf59eb1dd5b39e12..8776799de033f02b0f87e9ea7e4a4ce912e94dd4 100644 +index 8b1f9116afd92b13426eb0e97066297705d202fb..a9dc8466278f9ec2becbcb643e6e1c973df72b82 100644 --- a/src/main/java/net/minecraft/server/LightEngineThreaded.java +++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java -@@ -110,7 +110,7 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable { - } - - private void a(int i, int j, IntSupplier intsupplier, LightEngineThreaded.Update lightenginethreaded_update, Runnable runnable) { -- this.e.a((Object) ChunkTaskQueueSorter.a(() -> { -+ this.e.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile error - this.c.add(Pair.of(lightenginethreaded_update, runnable)); - if (this.c.size() >= this.f) { - this.b(); @@ -167,7 +167,7 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable { public void queueUpdate() { @@ -384,23 +383,23 @@ index ef315377579ca425ecb8d41aaf59eb1dd5b39e12..8776799de033f02b0f87e9ea7e4a4ce9 this.g.set(false); })); diff --git a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java b/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java -index fa11b2fc6364dc6fb6a951e092ea01f5e74c2c1d..5fe0da76bd172c2c552b2dd210e89be214c4385c 100644 +index 3aa5cc4281cdba8738890e9ffd5c7a129e60c310..32a98e758b9df48005ddc5283eacdc5123a32c39 100644 --- a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java +++ b/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java -@@ -69,7 +69,7 @@ public class LootItemFunctionExplorationMap extends LootItemFunctionConditional - } +@@ -73,7 +73,7 @@ public class LootItemFunctionExplorationMap extends LootItemFunctionConditional + public b() {} public void a(JsonObject jsonobject, LootItemFunctionExplorationMap lootitemfunctionexplorationmap, JsonSerializationContext jsonserializationcontext) { - super.a(jsonobject, (LootItemFunctionConditional) lootitemfunctionexplorationmap, jsonserializationcontext); + super.a(jsonobject, lootitemfunctionexplorationmap, jsonserializationcontext); // Paper - decompile fix - if (!lootitemfunctionexplorationmap.d.equals("Buried_Treasure")) { - jsonobject.add("destination", jsonserializationcontext.serialize(lootitemfunctionexplorationmap.d)); + if (!lootitemfunctionexplorationmap.e.equals(LootItemFunctionExplorationMap.a)) { + jsonobject.add("destination", jsonserializationcontext.serialize(lootitemfunctionexplorationmap.e.i())); } diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java -index 59bb53543113660cd2514350a24a4908a8464f24..3ed6a1e785f68c4bb6c5afe024c43150915968a3 100644 +index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d554593674c 100644 --- a/src/main/java/net/minecraft/server/LootSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java -@@ -125,7 +125,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract { +@@ -123,7 +123,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract { @Override public T b(LootItemFunction.a lootitemfunction_a) { this.c.add(lootitemfunction_a.b()); @@ -409,7 +408,7 @@ index 59bb53543113660cd2514350a24a4908a8464f24..3ed6a1e785f68c4bb6c5afe024c43150 } protected LootItemFunction[] a() { -@@ -134,12 +134,12 @@ public abstract class LootSelectorEntry extends LootEntryAbstract { +@@ -132,12 +132,12 @@ public abstract class LootSelectorEntry extends LootEntryAbstract { public T a(int i) { this.a = i; @@ -438,7 +437,7 @@ index 829a7ae0a2b77205fb8e8c5754d0d4333afa224d..8b9e47b4c7f5dc464fa617a59583df9e default String asString() { return this.toString(); diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java -index 22035b6c0b76687404e4df92f5796dbf244c50bc..5406f4c40f86e74f8ed4e7e986b23d19141ddc30 100644 +index b8bb5027ecccfc9b664145a1bfe3755f1a8af3eb..ad8a506bb430b26fe147a657a2f826daf9bf4d45 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java @@ -51,7 +51,7 @@ public class NBTTagList extends NBTList { @@ -472,31 +471,6 @@ index 8471920b8b92f0bbd0d3ee827e1b0a120f405f6c..e9c405fb5376c5733b9b0191cd530917 }); } -diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java -index 737afc7d71f415e942602efb4bd91fba6c6baa72..db9f0196bda4c987de6cf63eea437b7154d47b57 100644 ---- a/src/main/java/net/minecraft/server/RegionFileSection.java -+++ b/src/main/java/net/minecraft/server/RegionFileSection.java -@@ -83,9 +83,9 @@ public class RegionFileSection implements AutoC - Optional optional = this.d(i); - - if (optional.isPresent()) { -- return (MinecraftSerializable) optional.get(); -+ return optional.get(); // Paper - decompile fix - } else { -- R r0 = (MinecraftSerializable) this.f.apply(() -> { -+ R r0 = this.f.apply(() -> { // Paper - decompile fix - this.a(i); - }); - -@@ -124,7 +124,7 @@ public class RegionFileSection implements AutoC - for (int l = 0; l < 16; ++l) { - long i1 = SectionPosition.a(chunkcoordintpair, l).v(); - Optional optional = optionaldynamic.get(Integer.toString(l)).get().map((dynamic2) -> { -- return (MinecraftSerializable) this.e.apply(() -> { -+ return this.e.apply(() -> { // Paper - decompile fix - this.a(i1); - }, dynamic2); - }); diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java index 7f89562e90ede1bdd06b71c0798d986ccbb7886e..4efcb8b595750891b421e524812542f0f67e9f3f 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -511,7 +485,7 @@ index 7f89562e90ede1bdd06b71c0798d986ccbb7886e..4efcb8b595750891b421e524812542f0 this.c.set(i, t0); diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index 4cb78c6a3feb15eb15f76f967e724829655e8617..e15d286710ed66a01bfb6b60f8735b837efb3fd7 100644 +index 2dc20b5c930c6845af41b35d69cdb03db639d63e..6cdd4d46d987132c3c241800b5d59cee2dfa25e2 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java @@ -17,9 +17,9 @@ public class RegistryID implements Registry { @@ -526,7 +500,7 @@ index 4cb78c6a3feb15eb15f76f967e724829655e8617..e15d286710ed66a01bfb6b60f8735b83 } public int getId(@Nullable K k0) { -@@ -55,9 +55,9 @@ public class RegistryID implements Registry { +@@ -59,9 +59,9 @@ public class RegistryID implements Registry { K[] ak = this.b; int[] aint = this.c; @@ -539,10 +513,10 @@ index 4cb78c6a3feb15eb15f76f967e724829655e8617..e15d286710ed66a01bfb6b60f8735b83 this.f = 0; diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc59bbd4f1 100644 +index a1a5460e429356b52a75037c809cec85bd99084a..80ee8d196436e271833503a0e123401d1b3314a9 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java -@@ -45,8 +45,8 @@ public class SystemUtils { +@@ -55,8 +55,8 @@ public class SystemUtils { return Collectors.toMap(Entry::getKey, Entry::getValue); } @@ -553,7 +527,7 @@ index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc } public static String a(String s, @Nullable MinecraftKey minecraftkey) { -@@ -168,8 +168,8 @@ public class SystemUtils { +@@ -224,8 +224,8 @@ public class SystemUtils { public static T b(Iterable iterable, @Nullable T t0) { Iterator iterator = iterable.iterator(); @@ -564,16 +538,16 @@ index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc for (object1 = null; iterator.hasNext(); object1 = object) { object = iterator.next(); -@@ -194,7 +194,7 @@ public class SystemUtils { +@@ -250,7 +250,7 @@ public class SystemUtils { } - public static Strategy i() { + public static Strategy k() { - return SystemUtils.IdentityHashingStrategy.INSTANCE; + return (Strategy) SystemUtils.IdentityHashingStrategy.INSTANCE; // Paper - decompile fix } public static CompletableFuture> b(List> list) { -@@ -205,7 +205,7 @@ public class SystemUtils { +@@ -261,7 +261,7 @@ public class SystemUtils { list.forEach((completablefuture1) -> { int i = list1.size(); @@ -583,10 +557,10 @@ index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc if (throwable != null) { completablefuture.completeExceptionally(throwable); diff --git a/src/main/java/net/minecraft/server/ThreadedMailbox.java b/src/main/java/net/minecraft/server/ThreadedMailbox.java -index 8dbb33e749a282ab1e41bfdc616a22744dc7b162..8082569022384a3ba03fb4a6f1ae12b443598dcb 100644 +index b64fc6e3dc8f628ead2c243baa48f2872bd8da0c..35f4d2d9591e625ab0bbeab7b606761e74965eec 100644 --- a/src/main/java/net/minecraft/server/ThreadedMailbox.java +++ b/src/main/java/net/minecraft/server/ThreadedMailbox.java -@@ -83,7 +83,7 @@ public class ThreadedMailbox implements Mailbox, AutoCloseable, Runnable { +@@ -99,7 +99,7 @@ public class ThreadedMailbox implements Mailbox, AutoCloseable, Runnable { public void run() { try { @@ -609,10 +583,10 @@ index ee2059cf8ef0a0372e02b91a4bf6fa8a0ab31bca..77bb6b092a0763ff27f90f0401a8a81b } diff --git a/src/main/java/net/minecraft/server/TileEntityPiston.java b/src/main/java/net/minecraft/server/TileEntityPiston.java -index 79df42f5e53464f07e76d22cd1317637145e2056..489175abd8e582a3c082364fec357c4f061a22d7 100644 +index dc52856856796524e4519c34ab92e37031013759..5b941321a7fdc561e6b794a1dce5d600083c505d 100644 --- a/src/main/java/net/minecraft/server/TileEntityPiston.java +++ b/src/main/java/net/minecraft/server/TileEntityPiston.java -@@ -137,7 +137,7 @@ public class TileEntityPiston extends TileEntity implements ITickable { +@@ -140,7 +140,7 @@ public class TileEntityPiston extends TileEntity implements ITickable { private static void a(EnumDirection enumdirection, Entity entity, double d0, EnumDirection enumdirection1) { TileEntityPiston.h.set(enumdirection); entity.move(EnumMoveType.PISTON, new Vec3D(d0 * (double) enumdirection1.getAdjacentX(), d0 * (double) enumdirection1.getAdjacentY(), d0 * (double) enumdirection1.getAdjacentZ())); @@ -622,28 +596,31 @@ index 79df42f5e53464f07e76d22cd1317637145e2056..489175abd8e582a3c082364fec357c4f private void g(float f) { diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java -index c137484f66a022f7f4581d0657210d60c619c5fa..c999f8c9bf8a59e19b3d6d1b7ad8b5fb6e48b928 100644 +index bc2fab806ee1cc7628841a065436f0339f17ecce..b8c15047771bd4527b86e514a3b950b2ffc6eef0 100644 --- a/src/main/java/net/minecraft/server/VillagePlace.java +++ b/src/main/java/net/minecraft/server/VillagePlace.java -@@ -165,7 +165,7 @@ public class VillagePlace extends RegionFileSection { +@@ -170,9 +170,9 @@ public class VillagePlace extends RegionFileSection { } private static boolean a(ChunkSection chunksection) { -- Stream stream = VillagePlaceType.e(); -+ Stream stream = VillagePlaceType.e(); // Paper - decompile fix +- Set set = VillagePlaceType.x; ++ Set set = VillagePlaceType.x; // Paper - decompile error - chunksection.getClass(); - return stream.anyMatch(chunksection::a); -@@ -185,7 +185,7 @@ public class VillagePlace extends RegionFileSection { +- set.getClass(); ++ //set.getClass(); // Paper - decompile error + return chunksection.a(set::contains); + } + +@@ -190,7 +190,7 @@ public class VillagePlace extends RegionFileSection { SectionPosition.b(new ChunkCoordIntPair(blockposition), Math.floorDiv(i, 16)).map((sectionposition) -> { - return Pair.of(sectionposition, this.d(sectionposition.v())); + return Pair.of(sectionposition, this.d(sectionposition.s())); }).filter((pair) -> { - return !(Boolean) ((Optional) pair.getSecond()).map(VillagePlaceSection::a).orElse(false); + return !(Boolean) (pair.getSecond()).map(VillagePlaceSection::a).orElse(false); // Paper - decompile fix }).map((pair) -> { - return ((SectionPosition) pair.getFirst()).u(); + return ((SectionPosition) pair.getFirst()).r(); }).filter((chunkcoordintpair) -> { -@@ -237,7 +237,7 @@ public class VillagePlace extends RegionFileSection { +@@ -242,7 +242,7 @@ public class VillagePlace extends RegionFileSection { private final Predicate d; @@ -653,25 +630,25 @@ index c137484f66a022f7f4581d0657210d60c619c5fa..c999f8c9bf8a59e19b3d6d1b7ad8b5fb } diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java -index a06a31534e5bdfddcd3914f68e5b60ae0ec43117..3bcf0b385d1f707176dae9c3ee49370e2e6dd481 100644 +index b0ec371c058c428a909faafe027e58e9c7f0cb38..532460e7549192dfe6170e2bf489edb46b8b5737 100644 --- a/src/main/java/net/minecraft/server/VillagerTrades.java +++ b/src/main/java/net/minecraft/server/VillagerTrades.java -@@ -15,12 +15,12 @@ import javax.annotation.Nullable; +@@ -14,12 +14,12 @@ import javax.annotation.Nullable; public class VillagerTrades { - public static final Map> a = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> { + public static final Map> a = SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // Paper - decompile fix hashmap.put(VillagerProfession.FARMER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHEAT, 20, 16, 2), new VillagerTrades.b(Items.POTATO, 26, 16, 2), new VillagerTrades.b(Items.CARROT, 22, 16, 2), new VillagerTrades.b(Items.BEETROOT, 15, 16, 2), new VillagerTrades.h(Items.BREAD, 1, 6, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.PUMPKIN, 6, 12, 10), new VillagerTrades.h(Items.PUMPKIN_PIE, 1, 4, 5), new VillagerTrades.h(Items.APPLE, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.COOKIE, 3, 18, 10), new VillagerTrades.b(Blocks.MELON, 4, 12, 20)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Blocks.CAKE, 1, 1, 12, 15), new VillagerTrades.i(MobEffects.NIGHT_VISION, 100, 15), new VillagerTrades.i(MobEffects.JUMP, 160, 15), new VillagerTrades.i(MobEffects.WEAKNESS, 140, 15), new VillagerTrades.i(MobEffects.BLINDNESS, 120, 15), new VillagerTrades.i(MobEffects.POISON, 280, 15), new VillagerTrades.i(MobEffects.SATURATION, 7, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GOLDEN_CARROT, 3, 3, 30), new VillagerTrades.h(Items.GLISTERING_MELON_SLICE, 4, 3, 30)}))); -- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pT, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); -+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pT, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix +- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.rm, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); ++ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.rm, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // hashmap.put(VillagerProfession.SHEPHERD, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.WHITE_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BROWN_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BLACK_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.GRAY_WOOL, 18, 16, 2), new VillagerTrades.h(Items.SHEARS, 2, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHITE_DYE, 12, 16, 10), new VillagerTrades.b(Items.GRAY_DYE, 12, 16, 10), new VillagerTrades.b(Items.BLACK_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIGHT_BLUE_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIME_DYE, 12, 16, 10), new VillagerTrades.h(Blocks.WHITE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.ORANGE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.YELLOW_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIME_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PINK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.CYAN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PURPLE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BROWN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GREEN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.RED_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLACK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.WHITE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.ORANGE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.YELLOW_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIME_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PINK_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.CYAN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PURPLE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BROWN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GREEN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.RED_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLACK_CARPET, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.YELLOW_DYE, 12, 16, 20), new VillagerTrades.b(Items.LIGHT_GRAY_DYE, 12, 16, 20), new VillagerTrades.b(Items.ORANGE_DYE, 12, 16, 20), new VillagerTrades.b(Items.RED_DYE, 12, 16, 20), new VillagerTrades.b(Items.PINK_DYE, 12, 16, 20), new VillagerTrades.h(Blocks.WHITE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.YELLOW_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.RED_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLACK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BROWN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.CYAN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GREEN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIME_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.MAGENTA_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.ORANGE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PINK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PURPLE_BED, 3, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BROWN_DYE, 12, 16, 30), new VillagerTrades.b(Items.PURPLE_DYE, 12, 16, 30), new VillagerTrades.b(Items.BLUE_DYE, 12, 16, 30), new VillagerTrades.b(Items.GREEN_DYE, 12, 16, 30), new VillagerTrades.b(Items.MAGENTA_DYE, 12, 16, 30), new VillagerTrades.b(Items.CYAN_DYE, 12, 16, 30), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 12, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.PAINTING, 2, 3, 30)}))); - hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STICK, 32, 16, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 12, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FLINT, 26, 12, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 14, 16, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FEATHER, 24, 16, 30), new VillagerTrades.e(Items.BOW, 2, 3, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.dE, 8, 12, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 3, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 12, 30)}))); -- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pR, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); -+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pR, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Paper - decompile fix - hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.df, 11, 16, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)}))); + hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STICK, 32, 16, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 12, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FLINT, 26, 12, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 14, 16, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FEATHER, 24, 16, 30), new VillagerTrades.e(Items.BOW, 2, 3, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.es, 8, 12, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 3, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 12, 30)}))); +- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.rj, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.az, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); ++ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.rj, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.az, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Integer, IMerchantRecipeOption[] + hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.dP, 11, 16, 10), new VillagerTrades.k(13, StructureGenerator.MONUMENT, MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, StructureGenerator.MANSION, MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)}))); hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 16, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 12, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 12, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 12, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 12, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 12, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)}))); - hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pQ), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)}))); + hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.ri), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)}))); diff --git a/src/main/java/net/minecraft/server/VoxelShapeMergerList.java b/src/main/java/net/minecraft/server/VoxelShapeMergerList.java index e8daa74986f07163fd5318f431398b4f0efde6e8..71d2ae2a9c5a05351241b5a313e66ca15b0624ef 100644 --- a/src/main/java/net/minecraft/server/VoxelShapeMergerList.java @@ -685,18 +662,6 @@ index e8daa74986f07163fd5318f431398b4f0efde6e8..71d2ae2a9c5a05351241b5a313e66ca1 this.b.add(i - 1); this.c.add(j - 1); this.a.add(d1); -diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java -index 555cf6be79985b686eb71cffe25453648f4cbc17..22e14fe1e98c8439f8db74c9464137a497fdaf7c 100644 ---- a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java -+++ b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java -@@ -40,6 +40,6 @@ public class WorldGenFeatureStateProviderWeighted extends WorldGenFeatureStatePr - builder.put(dynamicops.createString("type"), dynamicops.createString(IRegistry.t.getKey(this.a).toString())).put(dynamicops.createString("entries"), this.b.a(dynamicops, (iblockdata) -> { - return IBlockData.a(dynamicops, iblockdata); - })); -- return (new Dynamic(dynamicops, dynamicops.createMap(builder.build()))).getValue(); -+ return (new Dynamic(dynamicops, dynamicops.createMap(builder.build()))).getValue(); // Paper - decompile fix - } - } diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java index 55fe7625af2207062f69188e9ab345ea68fac6ca..19e68a78310de787bca701bc2597c64e34a77d7c 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index adc0c050ca..3d64c33748 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2259,10 +2259,10 @@ index 0000000000000000000000000000000000000000..9df0006c1a283f77c4d01d9fce9062fc + } +} diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index 4f60b931a143ebf70a8469913ec445ff13da4d8d..3e90b57b6fd5dcb6cb1325861306e2ff84d0cccb 100644 +index 277d7a124e9a21803fe4d5a66fc0b311df2cfba7..02c09f39848399a86d46bd17569b4f01a7b5ab1f 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -186,10 +186,12 @@ public class AxisAlignedBB { +@@ -190,10 +190,12 @@ public class AxisAlignedBB { return this.d(vec3d.x, vec3d.y, vec3d.z); } @@ -2275,7 +2275,7 @@ index 4f60b931a143ebf70a8469913ec445ff13da4d8d..3e90b57b6fd5dcb6cb1325861306e2ff public boolean a(double d0, double d1, double d2, double d3, double d4, double d5) { return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2; } -@@ -202,6 +204,7 @@ public class AxisAlignedBB { +@@ -206,6 +208,7 @@ public class AxisAlignedBB { return d0 >= this.minX && d0 < this.maxX && d1 >= this.minY && d1 < this.maxY && d2 >= this.minZ && d2 < this.maxZ; } @@ -2284,15 +2284,15 @@ index 4f60b931a143ebf70a8469913ec445ff13da4d8d..3e90b57b6fd5dcb6cb1325861306e2ff double d0 = this.b(); double d1 = this.c(); diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index a3b5793e4824718c8bf3d0a4f963de0ca94a738e..3f09c24e1cd1bba2809b70b1fa6e89773537d834 100644 +index ff4b23927bb0e0ac8221d71fe2543cbee54f913a..ee28d0335418a0053f8448ab5e12ebba5a9a3b2d 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -80,6 +80,7 @@ public class BaseBlockPosition implements Comparable { +@@ -98,6 +98,7 @@ public class BaseBlockPosition implements Comparable { return this.distanceSquared(iposition.getX(), iposition.getY(), iposition.getZ(), true) < d0 * d0; } -+ public final double distanceSquared(BaseBlockPosition baseblockposition) { return m(baseblockposition); } // Paper - OBFHELPER - public double m(BaseBlockPosition baseblockposition) { ++ public final double distanceSquared(BaseBlockPosition baseblockposition) { return j(baseblockposition); } // Paper - OBFHELPER + public double j(BaseBlockPosition baseblockposition) { return this.distanceSquared((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ(), true); } diff --git a/src/main/java/net/minecraft/server/BlockAccessAir.java b/src/main/java/net/minecraft/server/BlockAccessAir.java @@ -2318,23 +2318,11 @@ index eff6ebcd30b538cbaedaa031a46a59ea956253ba..30cbfc8eac20910aa55951e3dce63862 @Override public IBlockData getType(BlockPosition blockposition) { return Blocks.AIR.getBlockData(); -diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java -index 1cf97cefc9d113583214f340e72b35d5560d1e5d..2040f183490d515b913df048ae8ab07bbecaa9a4 100644 ---- a/src/main/java/net/minecraft/server/BlockDataAbstract.java -+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java -@@ -78,6 +78,7 @@ public abstract static class BlockDataAbstract implements IBlockDataHolder { - return Collections.unmodifiableCollection(this.d.keySet()); - } - -+ public final > boolean hasProperty(IBlockState iblockstate) { return this.b(iblockstate); } // Paper - OBFHELPER - public > boolean b(IBlockState iblockstate) { - return this.d.containsKey(iblockstate); - } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index c88a62f6b72a8851b95587bb49c898569d74e0c6..f8ac39e1b019b0918996f745d99f6ed09db0fd11 100644 +index 8eb94bcb605f882c9ce096fc758df5e3ae3ab28d..b61651fcd6605cd8638ce14f15e41b878add3f1c 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -120,6 +120,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -98,6 +98,7 @@ public class BlockPosition extends BaseBlockPosition { return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2); } @@ -2342,7 +2330,7 @@ index c88a62f6b72a8851b95587bb49c898569d74e0c6..f8ac39e1b019b0918996f745d99f6ed0 public BlockPosition b(int i, int j, int k) { return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k); } -@@ -210,6 +211,8 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -188,6 +189,8 @@ public class BlockPosition extends BaseBlockPosition { return new BlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); } @@ -2351,62 +2339,70 @@ index c88a62f6b72a8851b95587bb49c898569d74e0c6..f8ac39e1b019b0918996f745d99f6ed0 public BlockPosition immutableCopy() { return this; } -@@ -264,6 +267,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - super(i, j, k); - } - -+ public static BlockPosition.PooledBlockPosition acquire() { return r(); } // Paper - OBFHELPER - public static BlockPosition.PooledBlockPosition r() { - return f(0, 0, 0); - } -@@ -402,6 +406,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - return this.d; +@@ -368,6 +371,7 @@ public class BlockPosition extends BaseBlockPosition { + return super.a(enumblockrotation).immutableCopy(); } + public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return d(i, j, k);} // Paper - OBFHELPER public BlockPosition.MutableBlockPosition d(int i, int j, int k) { - this.b = i; - this.c = j; -@@ -413,6 +418,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - return this.c(entity.locX(), entity.locY(), entity.locZ()); + this.o(i); + this.p(j); +@@ -375,6 +379,7 @@ public class BlockPosition extends BaseBlockPosition { + return this; } + public BlockPosition.MutableBlockPosition setValues(double d0, double d1, double d2) { return c(d0, d1, d2);} // Paper - OBFHELPER public BlockPosition.MutableBlockPosition c(double d0, double d1, double d2) { return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } -@@ -441,14 +447,17 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - return this.d(this.b + i, this.c + j, this.d + k); +@@ -424,16 +429,19 @@ public class BlockPosition extends BaseBlockPosition { + } } -+ public final void setX(final int x) { this.o(x); } // Paper - OBFHELPER ++ public final void setX(final int x) { super.o(x); } // Paper - OBFHELPER + @Override public void o(int i) { - this.b = i; + super.o(i); } -+ public final void setY(final int y) { this.p(y); } // Paper - OBFHELPER ++ public final void setY(final int y) { super.p(y); } // Paper - OBFHELPER + @Override public void p(int i) { - this.c = i; + super.p(i); } -+ public final void setZ(final int z) { this.q(z); } // Paper - OBFHELPER ++ public final void setZ(final int z) { super.q(z); } // Paper - OBFHELPER + @Override public void q(int i) { - this.d = i; + super.q(i); +@@ -444,4 +452,13 @@ public class BlockPosition extends BaseBlockPosition { + return new BlockPosition(this); } + } ++ ++ // Paper start ++ public static class PooledBlockPosition extends BlockPosition.MutableBlockPosition implements AutoCloseable { ++ @Deprecated ++ public void close() {} ++ @Deprecated ++ public static BlockPosition.PooledBlockPosition acquire() { return new PooledBlockPosition(); } ++ } ++ // Paper end + } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4d6b787a7 100644 +index 3cdcdc60df4f28197cf19c59ea42a92ae4af3819..7c7826cf3adb19814984ab627e4c4726d8933244 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger; - public class Chunk implements IChunkAccess { +@@ -26,7 +26,7 @@ public class Chunk implements IChunkAccess { private static final Logger LOGGER = LogManager.getLogger(); + @Nullable - public static final ChunkSection a = null; -+ public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER ++ public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = a; // Paper - OBFHELPER private final ChunkSection[] sections; private BiomeStorage d; private final Map e; -@@ -48,7 +48,7 @@ public class Chunk implements IChunkAccess { +@@ -49,7 +49,7 @@ public class Chunk implements IChunkAccess { private Supplier u; @Nullable private Consumer v; @@ -2415,16 +2411,16 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 private volatile boolean x; public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage) { -@@ -65,7 +65,7 @@ public class Chunk implements IChunkAccess { +@@ -66,7 +66,7 @@ public class Chunk implements IChunkAccess { this.n = new ShortList[16]; this.entitySlices = (List[]) (new List[16]); // Spigot - this.world = world; + this.world = (WorldServer) world; // CraftBukkit - type - this.loc = chunkcoordintpair; + this.loc = chunkcoordintpair; this.coordinateKey = MCUtil.getCoordinateKey(chunkcoordintpair); // Paper - cache coordinate key this.i = chunkconverter; HeightMap.Type[] aheightmap_type = HeightMap.Type.values(); int j = aheightmap_type.length; -@@ -108,6 +108,110 @@ public class Chunk implements IChunkAccess { +@@ -109,6 +109,110 @@ public class Chunk implements IChunkAccess { public boolean needsDecoration; // CraftBukkit end @@ -2535,7 +2531,7 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 public Chunk(World world, ProtoChunk protochunk) { this(world, protochunk.getPos(), protochunk.getBiomeIndex(), protochunk.p(), protochunk.n(), protochunk.o(), protochunk.getInhabitedTime(), protochunk.getSections(), (Consumer) null); Iterator iterator = protochunk.y().iterator(); -@@ -213,6 +317,18 @@ public class Chunk implements IChunkAccess { +@@ -214,6 +318,18 @@ public class Chunk implements IChunkAccess { } } @@ -2554,7 +2550,7 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 @Override public Fluid getFluid(BlockPosition blockposition) { return this.a(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -352,6 +468,7 @@ public class Chunk implements IChunkAccess { +@@ -353,6 +469,7 @@ public class Chunk implements IChunkAccess { entity.chunkX = this.loc.x; entity.chunkY = k; entity.chunkZ = this.loc.z; @@ -2562,7 +2558,7 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 this.entitySlices[k].add(entity); } -@@ -374,6 +491,7 @@ public class Chunk implements IChunkAccess { +@@ -375,6 +492,7 @@ public class Chunk implements IChunkAccess { } this.entitySlices[i].remove(entity); @@ -2570,7 +2566,7 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 } @Override -@@ -395,6 +513,7 @@ public class Chunk implements IChunkAccess { +@@ -396,6 +514,7 @@ public class Chunk implements IChunkAccess { return this.a(blockposition, Chunk.EnumTileEntityState.CHECK); } @@ -2578,7 +2574,7 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 @Nullable public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start -@@ -506,7 +625,25 @@ public class Chunk implements IChunkAccess { +@@ -507,7 +626,25 @@ public class Chunk implements IChunkAccess { // CraftBukkit start public void loadCallback() { @@ -2604,7 +2600,7 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -545,6 +682,22 @@ public class Chunk implements IChunkAccess { +@@ -546,6 +683,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(); @@ -2628,10 +2624,10 @@ index 55373cae078ddaf6c7c974abf59183698f669c24..9397b58f047c837f8a9146723e4cd9a4 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java -index 11c4d23ba988dac5f3fd85142083c77fb603e673..a03e4c5b8693395f4a145ca565b074d6aed1913f 100644 +index b703382204a3ccd57e642cff18c7c28fef157cc0..8eecdcde510661ec3a13a25a04ba394f6b6dc012 100644 --- a/src/main/java/net/minecraft/server/ChunkCache.java +++ b/src/main/java/net/minecraft/server/ChunkCache.java -@@ -8,7 +8,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { +@@ -10,7 +10,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { protected final int b; protected final IChunkAccess[][] c; protected boolean d; @@ -2640,7 +2636,7 @@ index 11c4d23ba988dac5f3fd85142083c77fb603e673..a03e4c5b8693395f4a145ca565b074d6 public ChunkCache(World world, BlockPosition blockposition, BlockPosition blockposition1) { this.e = world; -@@ -27,7 +27,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { +@@ -29,7 +29,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { for (k = this.a; k <= i; ++k) { for (l = this.b; l <= j; ++l) { @@ -2649,7 +2645,7 @@ index 11c4d23ba988dac5f3fd85142083c77fb603e673..a03e4c5b8693395f4a145ca565b074d6 } } -@@ -52,7 +52,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { +@@ -54,7 +54,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { int k = i - this.a; int l = j - this.b; @@ -2658,7 +2654,7 @@ index 11c4d23ba988dac5f3fd85142083c77fb603e673..a03e4c5b8693395f4a145ca565b074d6 IChunkAccess ichunkaccess = this.c[k][l]; return (IChunkAccess) (ichunkaccess != null ? ichunkaccess : new ChunkEmpty(this.e, new ChunkCoordIntPair(i, j))); -@@ -71,6 +71,29 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { +@@ -73,6 +73,29 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { return this.a(i, j); } @@ -2689,7 +2685,7 @@ index 11c4d23ba988dac5f3fd85142083c77fb603e673..a03e4c5b8693395f4a145ca565b074d6 @Override public TileEntity getTileEntity(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index 260644bf0be4c5b2d96033f11382f88231048ce3..5a975f6bc60922ac872ec9c00c9150ce7dcad046 100644 +index 2837823547bdc9655376af3af89c43d84719d513..35b8a85d1280ba3be757b14b14388954ac1617d4 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java @@ -11,27 +11,33 @@ public class ChunkCoordIntPair { @@ -2729,22 +2725,22 @@ index 260644bf0be4c5b2d96033f11382f88231048ce3..5a975f6bc60922ac872ec9c00c9150ce } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index beb6b63fa483f0a7b29f5403bebf7ee47b27cd29..64d84b334d211fe39e808d2c8b5d457757fb1359 100644 +index 5585b5646b5f3650aa3b795be06f920699a85403..359441cd993a95f933f23aebcec8180f314a5f09 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -23,7 +23,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -24,7 +24,7 @@ public class ChunkProviderServer extends IChunkProvider { private final ChunkMapDistance chunkMapDistance; - public final ChunkGenerator chunkGenerator; + public final ChunkGenerator chunkGenerator; private final WorldServer world; - private final Thread serverThread; + public final Thread serverThread; // Paper - private -> public private final LightEngineThreaded lightEngine; private final ChunkProviderServer.a serverThreadQueue; public final PlayerChunkMap playerChunkMap; -@@ -35,6 +35,169 @@ public class ChunkProviderServer extends IChunkProvider { - private final ChunkStatus[] cacheStatus = new ChunkStatus[4]; +@@ -37,6 +37,167 @@ public class ChunkProviderServer extends IChunkProvider { private final IChunkAccess[] cacheChunk = new IChunkAccess[4]; - + @Nullable + private SpawnerCreature.d p; + // Paper start + final com.destroystokyo.paper.util.concurrent.WeakSeqLock loadedChunkMapSeqLock = new com.destroystokyo.paper.util.concurrent.WeakSeqLock(); + final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap loadedChunkMap = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>(8192, 0.5f); @@ -2863,7 +2859,7 @@ index beb6b63fa483f0a7b29f5403bebf7ee47b27cd29..64d84b334d211fe39e808d2c8b5d4577 + } + ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z); + Long identifier = Long.valueOf(this.chunkFutureAwaitCounter++); -+ this.addTicketAtLevel(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier); ++ this.chunkMapDistance.addTicketAtLevel(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier); + this.tickDistanceManager(); + + PlayerChunk chunk = this.playerChunkMap.getUpdatingChunk(chunkPos.pair()); @@ -2900,18 +2896,16 @@ index beb6b63fa483f0a7b29f5403bebf7ee47b27cd29..64d84b334d211fe39e808d2c8b5d4577 + } + } finally { + // due to odd behaviour with CB unload implementation we need to have these AFTER the load callback. -+ ChunkProviderServer.this.addTicketAtLevel(TicketType.UNKNOWN, chunkPos, ticketLevel, chunkPos); -+ ChunkProviderServer.this.removeTicketAtLevel(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier); ++ ChunkProviderServer.this.chunkMapDistance.addTicketAtLevel(TicketType.UNKNOWN, chunkPos, ticketLevel, chunkPos); ++ ChunkProviderServer.this.chunkMapDistance.removeTicketAtLevel(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier); + } + }, this.serverThreadQueue); + } + // Paper end -+ -+ - public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier supplier) { + + 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; - this.serverThreadQueue = new ChunkProviderServer.a(worldserver); -@@ -87,6 +250,49 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -90,6 +251,49 @@ public class ChunkProviderServer extends IChunkProvider { this.cacheChunk[0] = ichunkaccess; } @@ -2961,11 +2955,25 @@ index beb6b63fa483f0a7b29f5403bebf7ee47b27cd29..64d84b334d211fe39e808d2c8b5d4577 @Nullable @Override public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) { +@@ -372,10 +576,9 @@ public class ChunkProviderServer extends IChunkProvider { + + this.p = spawnercreature_d; + this.world.getMethodProfiler().exit(); +- List list = Lists.newArrayList(this.playerChunkMap.f()); +- +- Collections.shuffle(list); +- list.forEach((playerchunk) -> { ++ //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper ++ //Collections.shuffle(list); // Paper ++ this.playerChunkMap.f().forEach((playerchunk) -> { // Paper - no... just no... + Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); + + if (optional.isPresent()) { diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 652067757a6b9510b19c339072f1f4183e8d64b6..638b0e39798a3f75566fcf9ea48b81024e60b471 100644 +index b0f7ea97d4795655b6c30b296fd929806dac4ef1..882c2733beaff1df68b892d44fc77cacf4364ff4 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -132,6 +132,7 @@ public class ChunkSection { +@@ -133,6 +133,7 @@ public class ChunkSection { return this.blockIds; } @@ -2974,39 +2982,39 @@ index 652067757a6b9510b19c339072f1f4183e8d64b6..638b0e39798a3f75566fcf9ea48b8102 packetdataserializer.writeShort(this.nonEmptyBlockCount); this.blockIds.b(packetdataserializer); diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index 7ca3a1d0c592df0038953c9fd81783f9bb5c8beb..2edd9b87146a3d1b6623b0efb17b28b524f18c2f 100644 +index cd572c76522b2ee900a03fd5cf6753f3297c1ccd..2c3580c1c7bcd6afc83a45550c0f672a592e0c38 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java @@ -83,6 +83,7 @@ public class DataBits { - } + return (int) (k >> l & this.d); } + public long[] getDataBits() { return this.a(); } // Paper - OBFHELPER public long[] a() { - return this.a; + return this.b; } diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java -index 75ba69886872f737ff102cb68ec229feb268f94a..45403fbe308cbc6192536d5df606cf8643a65e13 100644 +index b7f4330bbe3b51e6792043cbd0c46c73aad457cb..75b721933ccbe8edc1cd7ea5cc4562214e26b66d 100644 --- a/src/main/java/net/minecraft/server/DataPalette.java +++ b/src/main/java/net/minecraft/server/DataPalette.java -@@ -4,10 +4,12 @@ import javax.annotation.Nullable; +@@ -5,10 +5,12 @@ import javax.annotation.Nullable; public interface DataPalette { + default int getOrCreateIdFor(T object) { return this.a(object); } // Paper - OBFHELPER int a(T t0); - boolean b(T t0); + boolean a(Predicate predicate); + @Nullable default T getObject(int dataBits) { return this.a(dataBits); } // Paper - OBFHELPER @Nullable T a(int i); diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 774a8f543424853be5fc8c0367d734ddf196d7f9..d5f5a51872dfabdbb828b6c20d61893aed2efec7 100644 +index 8856981da86219bdb036aa6246152f382ff8a818..4c6979903d287f7f37d9029f6ce2551742f26164 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -11,7 +11,7 @@ import java.util.stream.Collectors; +@@ -10,7 +10,7 @@ import java.util.stream.Collectors; public class DataPaletteBlock implements DataPaletteExpandable { @@ -3015,7 +3023,7 @@ index 774a8f543424853be5fc8c0367d734ddf196d7f9..d5f5a51872dfabdbb828b6c20d61893a private final DataPaletteExpandable c = (i, object) -> { return 0; }; -@@ -19,9 +19,9 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -18,9 +18,9 @@ public class DataPaletteBlock implements DataPaletteExpandable { private final Function e; private final Function f; private final T g; @@ -3028,7 +3036,7 @@ index 774a8f543424853be5fc8c0367d734ddf196d7f9..d5f5a51872dfabdbb828b6c20d61893a private final ReentrantLock j = new ReentrantLock(); public void a() { -@@ -56,6 +56,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -55,6 +55,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { return j << 8 | k << 4 | i; } @@ -3036,7 +3044,7 @@ index 774a8f543424853be5fc8c0367d734ddf196d7f9..d5f5a51872dfabdbb828b6c20d61893a private void b(int i) { if (i != this.i) { this.i = i; -@@ -133,6 +134,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -132,6 +133,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { return t0 == null ? this.g : t0; } @@ -3044,32 +3052,24 @@ index 774a8f543424853be5fc8c0367d734ddf196d7f9..d5f5a51872dfabdbb828b6c20d61893a public void b(PacketDataSerializer packetdataserializer) { this.a(); packetdataserializer.writeByte(this.i); -diff --git a/src/main/java/net/minecraft/server/DimensionManager.java b/src/main/java/net/minecraft/server/DimensionManager.java -index 5724fe6e57d3671b4978aecaf217ac4c2e0d7f82..393bc4dc700bbf8653db0662c7957f676b0a647a 100644 ---- a/src/main/java/net/minecraft/server/DimensionManager.java -+++ b/src/main/java/net/minecraft/server/DimensionManager.java -@@ -55,6 +55,7 @@ public class DimensionManager implements MinecraftSerializable { - return this.folder.isEmpty() ? file : new File(file, this.folder); - } - -+ public WorldServer world; // Paper - store ref to world this manager is for - public WorldProvider getWorldProvider(World world) { - return (WorldProvider) this.providerFactory.apply(world, this); - } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f4863852b04c5fa55b79acabe40ce59909b9bbbd..7e01f6a1807f9885a7f4b163ce6bb626d8786a9a 100644 +index 2f81613099f3fa8828ce0a20c2cc26d431f208e5..1512b23034b0ec95e2c72b9dd1c7b0a80d611e15 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1033,6 +1033,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -984,8 +984,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { } -+ public final AxisAlignedBB getCollisionBox(){return au();} //Paper - OBFHELPER - @Nullable - public AxisAlignedBB au() { +- @Nullable +- public AxisAlignedBB ay() { ++ ++ @Nullable public final AxisAlignedBB getCollisionBox(){return ay();} //Paper - OBFHELPER ++ @Nullable public AxisAlignedBB ay() { return null; -@@ -1842,6 +1843,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { - return false; + } + +@@ -1775,6 +1776,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { + return EnumInteractionResult.PASS; } + public final AxisAlignedBB getHardCollisionBox(Entity entity){ return j(entity);}//Paper - OBFHELPER @@ -3077,7 +3077,7 @@ index f4863852b04c5fa55b79acabe40ce59909b9bbbd..7e01f6a1807f9885a7f4b163ce6bb626 public AxisAlignedBB j(Entity entity) { return null; diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java -index fe69161e5b9e69c75696a3434a681d0489f3863e..b40c8d2f83a80bcb8925632a1e7d6bb4cc0caebf 100644 +index e83d587fd4feee1e36c18c49b98e669c09f5de20..c94197a50269622e8995685119bac984c45e6833 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -6,6 +6,8 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -3090,10 +3090,10 @@ index fe69161e5b9e69c75696a3434a681d0489f3863e..b40c8d2f83a80bcb8925632a1e7d6bb4 super(entitytypes, world); } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index bdfb1738539d0e0c9043ecb63950a5e7fce1c532..0b06fa2b664830d40cdb93968bc2f8c98415d1bf 100644 +index b309d9a13b35f5c04c3a0f048e858df99d8ac617..e5455d99e3f5607a5754e5760d42853a62dddb82 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -146,6 +146,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -160,6 +160,7 @@ public abstract class EntityInsentient extends EntityLiving { return this.goalTarget; } @@ -3102,19 +3102,19 @@ index bdfb1738539d0e0c9043ecb63950a5e7fce1c532..0b06fa2b664830d40cdb93968bc2f8c9 // CraftBukkit start - fire event setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 979e4b9de8cde8fb0209e081a58c5c01cd9dafd3..ff6579cb99dcd93254cae67fe84de0f7c034eaa5 100644 +index 8ff295ed373cc316e56e4a01a268f98b7b773bd5..dccb315440f7429fe881bd0d12af8f1ae8e35c3d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -129,6 +129,7 @@ public abstract class EntityLiving extends Entity { - public org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes; +@@ -137,6 +137,7 @@ public abstract class EntityLiving extends Entity { public boolean collides = true; + public Set collidableExemptions = new HashSet<>(); public boolean canPickUpLoot; + public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper @Override public float getBukkitYaw() { diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index 00c3b666d7b568f1619d885de6ca7ab2ce0daa7a..e5322fbae5140ce784dad49b690767af8c52ce1c 100644 +index fb0f281261455c9f127abd8d3b336135ad84fc27..ebdd990829edb8e423f482fa4352fe2d468efcba 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -5,6 +5,7 @@ import java.util.function.Predicate; @@ -3126,21 +3126,21 @@ index 00c3b666d7b568f1619d885de6ca7ab2ce0daa7a..e5322fbae5140ce784dad49b690767af super(entitytypes, world); this.f = 5; diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 541ddc928b9a4e6a7bf5c6a4f64d78422d241d90..26e32aa1dbd6de0ba971c32f8daef0d92d65b683 100644 +index 3f4453bbfbad4d4171c2981fd625e80aec6bea6c..2f3fe374070a3743931ac0c68c949cded4da085a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -87,6 +87,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -91,6 +91,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public Integer clientViewDistance; // CraftBukkit end + public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper + public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { - super((World) worldserver, gameprofile); - playerinteractmanager.player = this; -@@ -98,6 +100,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.H = 1.0F; - this.a(worldserver); + super(worldserver, worldserver.getSpawn(), gameprofile); + this.spawnDimension = World.OVERWORLD; +@@ -102,6 +104,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + this.G = 1.0F; + this.b(worldserver); + this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper + @@ -3148,30 +3148,30 @@ index 541ddc928b9a4e6a7bf5c6a4f64d78422d241d90..26e32aa1dbd6de0ba971c32f8daef0d9 this.displayName = this.getName(); this.canPickUpLoot = true; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 29e776ca19621b93d5b295d12f0576e6980cf11a..4328273b1fca165320097dbac0650b31fae4e5ca 100644 +index 484e78746aa62bb0b12968165bf8e056b27152f3..9a772e40ad8f9858e6278b99d9d1ff5dc54513cb 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils; - import java.util.Collections; +@@ -3,6 +3,7 @@ package net.minecraft.server; + import com.google.common.collect.ImmutableSet; import java.util.Optional; import java.util.Set; // Paper +import java.util.Map; // Paper import java.util.UUID; import java.util.function.Function; import java.util.stream.Stream; -@@ -290,8 +291,8 @@ public class EntityTypes { - return this.bj.height; +@@ -305,8 +306,8 @@ public class EntityTypes { + return this.bq.height; } - @Nullable - public T a(World world) { + public T create(World world) { return this.a(world); } // Paper - OBFHELPER + @Nullable public T a(World world) { // Paper - OBFHELPER - return this.ba.create(this, world); + return this.be.create(this, world); } diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java -index 1890c760f9ffd7628d6ae3db40c36f5272379227..7e5ece9d50af7151ad4cc084e3680dae41ac92be 100644 +index b77a0f0c2ee30df44b113aa6c8d4fa9206d3e2ba..1ba26ee10f338edbec0f580bb55d083a3d6d2284 100644 --- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java +++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java @@ -68,6 +68,15 @@ public abstract class IAsyncTaskHandler implements Mailbox implements - return this.c != null && this.c.f != null ? this.c.f[enumdirection.ordinal()] : VoxelShapes.a(this.j(iblockaccess, blockposition), enumdirection); - } - -+ public final boolean exceedsCube(){ return f();} // Paper - OBFHELPER - public boolean f() { - return this.c == null || this.c.h; + return this.getType(blockposition).f(); } diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java -index c5658c0779b0e0d51fd4921456b6fef0711d7be3..b90baef0f54bdb8f5ee51cdde149f64e39887ef5 100644 +index 38ccfd78639a85abcefb915c5c231be5881cebc1..8668b8f3941f37a7bc30a55c33baf74bd8ac49e3 100644 --- a/src/main/java/net/minecraft/server/IOWorker.java +++ b/src/main/java/net/minecraft/server/IOWorker.java -@@ -22,7 +22,7 @@ public class IOWorker implements AutoCloseable { - private final Thread b; - private final AtomicBoolean c = new AtomicBoolean(); - private final Queue d = Queues.newConcurrentLinkedQueue(); -- private final RegionFileCache e; -+ private final RegionFileCache e; public RegionFileCache getRegionFileCache() { return e; } // Paper - OBFHELPER - private final Map f = Maps.newLinkedHashMap(); - private boolean g = true; - private CompletableFuture h = new CompletableFuture(); +@@ -21,7 +21,7 @@ public class IOWorker implements AutoCloseable { + private static final Logger LOGGER = LogManager.getLogger(); + private final AtomicBoolean b = new AtomicBoolean(); + private final ThreadedMailbox c; +- private final RegionFileCache d; ++ private final RegionFileCache d;public RegionFileCache getRegionFileCache() { return d; } // Paper - OBFHELPER + private final Map e = Maps.newLinkedHashMap(); + + protected IOWorker(File file, boolean flag, String s) { diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java -index ba315131e1633ce8b9b8824b00d2be47950d6f19..cbe2aa4c0acbdcc0b453fdad9a192a3e264406c6 100644 +index 284283c5f062107df88e77edaf092cf23302a109..b6d6905260cdd32873010f24ef5a3505e66159be 100644 --- a/src/main/java/net/minecraft/server/IWorldReader.java +++ b/src/main/java/net/minecraft/server/IWorldReader.java -@@ -4,6 +4,7 @@ import javax.annotation.Nullable; +@@ -5,6 +5,7 @@ import javax.annotation.Nullable; public interface IWorldReader extends IBlockLightAccess, ICollisionAccess, BiomeManager.Provider { @@ -3257,31 +3245,19 @@ index ba315131e1633ce8b9b8824b00d2be47950d6f19..cbe2aa4c0acbdcc0b453fdad9a192a3e IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag); diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 75308712d0642d5ab168de653023349df8aee5ed..aa7501d366b15e7f7f64b7d98a1dccff99f731d2 100644 +index dc5625f54a54db35e5dfa630f1414887c736b704..76091ab3f149decc0d3c848b79edd24e20cf181d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent; - public final class ItemStack { - +@@ -49,7 +49,7 @@ public final class ItemStack { + })).apply(instance, ItemStack::new); + }); private static final Logger LOGGER = LogManager.getLogger(); -- public static final ItemStack a = new ItemStack((Item) null); -+ public static final ItemStack a = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = a; // Paper - OBFHELPER - public static final DecimalFormat b = H(); - private int count; - private int e; -+ // Paper start -+ private org.bukkit.craftbukkit.inventory.CraftItemStack bukkitStack; -+ public org.bukkit.inventory.ItemStack getBukkitStack() { -+ if (bukkitStack == null || bukkitStack.getHandle() != this) { -+ bukkitStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this); -+ } -+ return bukkitStack; -+ } -+ // Paper end - @Deprecated - private Item item; - private NBTTagCompound tag; -@@ -593,6 +602,17 @@ public final class ItemStack { +- public static final ItemStack b = new ItemStack((Item) null); ++ public static final ItemStack b = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = b; // Paper - OBFHELPER + public static final DecimalFormat c = (DecimalFormat) SystemUtils.a((new DecimalFormat("#.##")), (decimalformat) -> { // CraftBukkit - decompile error + decimalformat.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); + }); +@@ -606,6 +606,24 @@ public final class ItemStack { return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList(); } @@ -3295,11 +3271,18 @@ index 75308712d0642d5ab168de653023349df8aee5ed..aa7501d366b15e7f7f64b7d98a1dccff + public static ItemStack fromBukkitCopy(org.bukkit.inventory.ItemStack itemstack) { + return CraftItemStack.asNMSCopy(itemstack); + } ++ private org.bukkit.craftbukkit.inventory.CraftItemStack bukkitStack; ++ public org.bukkit.inventory.ItemStack getBukkitStack() { ++ if (bukkitStack == null || bukkitStack.getHandle() != this) { ++ bukkitStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this); ++ } ++ return bukkitStack; ++ } + // Paper end public void setTag(@Nullable NBTTagCompound nbttagcompound) { this.tag = nbttagcompound; if (this.getItem().usesDurability()) { -@@ -685,6 +705,7 @@ public final class ItemStack { +@@ -698,6 +716,7 @@ public final class ItemStack { return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false; } @@ -3307,7 +3290,7 @@ index 75308712d0642d5ab168de653023349df8aee5ed..aa7501d366b15e7f7f64b7d98a1dccff public void a(String s, NBTBase nbtbase) { this.getOrCreateTag().set(s, nbtbase); } -@@ -761,6 +782,7 @@ public final class ItemStack { +@@ -783,6 +802,7 @@ public final class ItemStack { // CraftBukkit start @Deprecated public void setItem(Item item) { @@ -3317,10 +3300,10 @@ index 75308712d0642d5ab168de653023349df8aee5ed..aa7501d366b15e7f7f64b7d98a1dccff // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 0000000000000000000000000000000000000000..16302c4ac6d3e40318a762cea0afcf3f94715216 +index 0000000000000000000000000000000000000000..da7a325d070e194cd1664ed20dcb3a762c9a517a --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java -@@ -0,0 +1,514 @@ +@@ -0,0 +1,502 @@ +package net.minecraft.server; + +import com.destroystokyo.paper.block.TargetBlockInfo; @@ -3782,24 +3765,12 @@ index 0000000000000000000000000000000000000000..16302c4ac6d3e40318a762cea0afcf3f + asyncExecutor.execute(run); + } + -+ @Nullable -+ public static TileEntityHopper getHopper(World world, BlockPosition pos) { -+ Chunk chunk = world.getChunkIfLoaded(pos.getX() >> 4, pos.getZ() >> 4); -+ if (chunk != null && chunk.getType(new BlockPosition(pos.getX(), pos.getY(), pos.getZ())).getBlock() == Blocks.HOPPER) { -+ TileEntity tileEntity = chunk.getTileEntityImmediately(pos); -+ if (tileEntity instanceof TileEntityHopper) { -+ return (TileEntityHopper) tileEntity; -+ } -+ } -+ return null; -+ } -+ + @Nonnull -+ public static World getNMSWorld(@Nonnull org.bukkit.World world) { ++ public static WorldServer getNMSWorld(@Nonnull org.bukkit.World world) { + return ((CraftWorld) world).getHandle(); + } + -+ public static World getNMSWorld(@Nonnull org.bukkit.entity.Entity entity) { ++ public static WorldServer getNMSWorld(@Nonnull org.bukkit.entity.Entity entity) { + return getNMSWorld(entity.getWorld()); + } + @@ -3836,12 +3807,12 @@ index 0000000000000000000000000000000000000000..16302c4ac6d3e40318a762cea0afcf3f + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b4a0bd79511a3b1185a165991c937375aeecf3d1..786d38438cc1bd5a736b2dfa80aca9b9c6253e65 100644 +index f5346ebbc338b002a9997e13e3bfba2d31457d90..aeb2e95e4c350f0b539466fc56ac41c8280aba20 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -741,6 +741,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant map; + public final Map map; // Paper - private NBTTagCompound(Map map) { + protected NBTTagCompound(Map map) { this.map = map; -@@ -123,11 +123,15 @@ public class NBTTagCompound implements NBTBase { +@@ -133,10 +133,14 @@ public class NBTTagCompound implements NBTBase { this.map.put(s, NBTTagLong.a(i)); } + public void setUUID(String prefix, UUID uuid) { a(prefix, uuid); } // Paper - OBFHELPER public void a(String s, UUID uuid) { - this.setLong(s + "Most", uuid.getMostSignificantBits()); - this.setLong(s + "Least", uuid.getLeastSignificantBits()); + this.map.put(s, GameProfileSerializer.a(uuid)); } + + @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER + @Nullable public UUID a(String s) { - return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); + return GameProfileSerializer.a(this.get(s)); } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 6700582e362b3ff2e0aa4a203981f75de0f22d89..3ccf1663669c79a63a6b3a9f6dc17a6e25e91915 100644 +index 69718caa347bc75ed243041797a6b53d90fc553c..c2fdccfb9192aa7ec55fd67c169cba71a695075c 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -159,6 +159,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -158,6 +158,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } @@ -3890,7 +3860,7 @@ index 6700582e362b3ff2e0aa4a203981f75de0f22d89..3ccf1663669c79a63a6b3a9f6dc17a6e private void b(Packet packet, @Nullable GenericFutureListener> genericfuturelistener) { EnumProtocol enumprotocol = EnumProtocol.a(packet); EnumProtocol enumprotocol1 = (EnumProtocol) this.channel.attr(NetworkManager.c).get(); -@@ -199,6 +200,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -198,6 +199,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } @@ -3898,7 +3868,7 @@ index 6700582e362b3ff2e0aa4a203981f75de0f22d89..3ccf1663669c79a63a6b3a9f6dc17a6e private void o() { if (this.channel != null && this.channel.isOpen()) { Queue queue = this.packetQueue; -@@ -327,9 +329,9 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -326,9 +328,9 @@ public class NetworkManager extends SimpleChannelInboundHandler> { static class QueuedPacket { @@ -3911,10 +3881,10 @@ index 6700582e362b3ff2e0aa4a203981f75de0f22d89..3ccf1663669c79a63a6b3a9f6dc17a6e public QueuedPacket(Packet packet, @Nullable GenericFutureListener> genericfuturelistener) { this.a = packet; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index 81b6f4581f8e4d956668535a44342f991d677267..d9574a9ace96d8c5666e62a5aed96a67021b91d8 100644 +index f574a28b68cf4d3745ee5f1a3756e19dbc23ca92..6e049c2e2a142ce022b9dc278a3bb302f723e42c 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java -@@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -36,6 +36,7 @@ public class PacketDataSerializer extends ByteBuf { this.a = bytebuf; } @@ -3935,7 +3905,7 @@ index 90223deae3376fd6828eddf3831dab96650afef2..63c4dbd327beb7b6ab42eb44650d68ac throw new SkipEncodeException(throwable); } else { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 677e3e5f687e81ffb6c6aec134e2a19b90bd61cf..3a1d0deb0dec880d73185690e2a7c769a2731479 100644 +index cb0b7e7157b629c259b0ccb946c29cbcb3c6fa98..e336437207f9d6adbab69ef2785c129ff2ec1b36 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -17,7 +17,7 @@ public class PacketPlayOutMapChunk implements Packet { @@ -3946,8 +3916,8 @@ index 677e3e5f687e81ffb6c6aec134e2a19b90bd61cf..3a1d0deb0dec880d73185690e2a7c769 + private byte[] f; private byte[] getData() { return this.f; } // Paper - OBFHELPER private List g; private boolean h; - -@@ -129,6 +129,7 @@ public class PacketPlayOutMapChunk implements Packet { + private boolean i; +@@ -133,6 +133,7 @@ public class PacketPlayOutMapChunk implements Packet { return bytebuf; } @@ -3956,7 +3926,7 @@ index 677e3e5f687e81ffb6c6aec134e2a19b90bd61cf..3a1d0deb0dec880d73185690e2a7c769 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 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d85a66eb7c 100644 +index dc5e59bcecbe080445f33daa01b81ba747ed6337..ca41e420a1ab22f097dd0b98e156fd51434733d8 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -19,9 +19,9 @@ public class PlayerChunk { @@ -3972,7 +3942,7 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 private CompletableFuture chunkSave; public int oldTicketLevel; private int ticketLevel; -@@ -38,6 +38,8 @@ public class PlayerChunk { +@@ -37,6 +37,8 @@ public class PlayerChunk { public final PlayerChunk.d players; private boolean hasBeenLoaded; @@ -3981,7 +3951,7 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 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; -@@ -53,8 +55,47 @@ public class PlayerChunk { +@@ -52,8 +54,47 @@ public class PlayerChunk { this.ticketLevel = this.oldTicketLevel; this.n = this.oldTicketLevel; this.a(i); @@ -4029,7 +3999,7 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 // CraftBukkit start public Chunk getFullChunk() { if (!getChunkState(this.oldTicketLevel).isAtLeast(PlayerChunk.State.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks -@@ -63,6 +104,14 @@ public class PlayerChunk { +@@ -62,6 +103,14 @@ public class PlayerChunk { return either == null ? null : (Chunk) either.left().orElse(null); } // CraftBukkit end @@ -4044,7 +4014,7 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { CompletableFuture> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c()); -@@ -74,14 +123,17 @@ public class PlayerChunk { +@@ -73,14 +122,17 @@ public class PlayerChunk { return getChunkStatus(this.ticketLevel).b(chunkstatus) ? this.getStatusFutureUnchecked(chunkstatus) : PlayerChunk.UNLOADED_CHUNK_ACCESS_FUTURE; } @@ -4062,7 +4032,7 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 public CompletableFuture> c() { return this.fullChunkFuture; } -@@ -335,13 +387,27 @@ public class PlayerChunk { +@@ -322,13 +374,27 @@ public class PlayerChunk { this.hasBeenLoaded |= flag3; if (!flag2 && flag3) { @@ -4091,7 +4061,7 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 this.a(((CompletableFuture>) completablefuture).thenApply((either1) -> { // CraftBukkit - decompile error playerchunkmap.getClass(); return either1.ifLeft(playerchunkmap::a); -@@ -352,12 +418,24 @@ public class PlayerChunk { +@@ -339,12 +405,24 @@ public class PlayerChunk { boolean flag5 = playerchunk_state1.isAtLeast(PlayerChunk.State.TICKING); if (!flag4 && flag5) { @@ -4118,7 +4088,7 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 this.tickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; } -@@ -369,12 +447,24 @@ public class PlayerChunk { +@@ -356,12 +434,24 @@ public class PlayerChunk { throw (IllegalStateException) SystemUtils.c(new IllegalStateException()); } @@ -4146,10 +4116,10 @@ index 5c5bf010d07b65f1328541843b0f24ce5d50e6ac..6e9f402fb0faccc222b4289deb36e2d8 } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 7ad30548e2ad221494d6870b0b3a08e1d2f3ed06..b505244516321292e56609eaa54693d84e0bf617 100644 +index a25d431630596d631b6ee1c1a9f386f5940eb480..11e42f083d793dbdda3aab3280984add26232ed3 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -99,6 +99,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -101,6 +101,26 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; // CraftBukkit end @@ -4171,14 +4141,12 @@ index 7ad30548e2ad221494d6870b0b3a08e1d2f3ed06..b505244516321292e56609eaa54693d8 + int chunkZ = MCUtil.getChunkCoordinate(player.locZ()); + // Note: players need to be explicitly added to distance maps before they can be updated + } -+ -+ + // Paper end + - public PlayerChunkMap(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i) { - super(new File(worldserver.getWorldProvider().getDimensionManager().a(file), "region"), datafixer); + public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i, boolean flag) { + super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag); this.visibleChunks = this.updatingChunks.clone(); -@@ -187,6 +209,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -190,6 +210,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; } @@ -4193,15 +4161,15 @@ index 7ad30548e2ad221494d6870b0b3a08e1d2f3ed06..b505244516321292e56609eaa54693d8 private CompletableFuture, PlayerChunk.Failure>> a(ChunkCoordIntPair chunkcoordintpair, int i, IntFunction intfunction) { List>> list = Lists.newArrayList(); int j = chunkcoordintpair.x; -@@ -867,6 +897,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -900,6 +928,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (!flag1) { this.chunkDistanceManager.a(SectionPosition.a((Entity) entityplayer), entityplayer); } + this.addPlayerToDistanceMaps(entityplayer); // Paper - distance maps } else { - SectionPosition sectionposition = entityplayer.K(); + SectionPosition sectionposition = entityplayer.N(); -@@ -874,6 +905,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -907,6 +936,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (!flag2) { this.chunkDistanceManager.b(sectionposition, entityplayer); } @@ -4209,7 +4177,7 @@ index 7ad30548e2ad221494d6870b0b3a08e1d2f3ed06..b505244516321292e56609eaa54693d8 } for (int k = i - this.viewDistance; k <= i + this.viewDistance; ++k) { -@@ -984,6 +1016,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1017,6 +1047,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -4219,7 +4187,7 @@ index 7ad30548e2ad221494d6870b0b3a08e1d2f3ed06..b505244516321292e56609eaa54693d8 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 8cc5f417fe2ad2370b52236e8f5497688553aeba..f40cb14d5301631161f1701043ee987359d9a8e9 100644 +index 883b7bd8ca2094e6d43be3a8575fff6d90a5990b..a8f11d1842e9a8ef82230e2ae4998923f3b02ca9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -4236,7 +4204,7 @@ index 8cc5f417fe2ad2370b52236e8f5497688553aeba..f40cb14d5301631161f1701043ee9873 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java -index 08768a3c877bfe26c2a9533af390068b172a5996..d103cfaace4f42aaad677103f4eef578490699da 100644 +index c027fb94881be14396cba879087861df35023500..3b65711b91c51ac7b4b5b2b0144ffd279fe60eeb 100644 --- a/src/main/java/net/minecraft/server/PlayerInventory.java +++ b/src/main/java/net/minecraft/server/PlayerInventory.java @@ -17,7 +17,7 @@ public class PlayerInventory implements IInventory, INamableTileEntity { @@ -4261,10 +4229,10 @@ index b3824898daa80da791cdc8cfd06900e9a0b3b5b5..bf4172be525d5bdd7c152117afce8bf0 MinecraftKey minecraftkey = IRegistry.POTION.getKey(potionregistry); diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 6e65306a275fe91ce82b28e4e6155f91dceaa3f2..39339fa27551b06a9bfd8ea67b1ec8c66726f488 100644 +index f92fbf136158336b65217a504ecd422bfcc4964f..070449198273e6c42e72c891882b82361d1c8dbd 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -80,6 +80,18 @@ public class ProtoChunk implements IChunkAccess { +@@ -81,6 +81,18 @@ public class ProtoChunk implements IChunkAccess { } @@ -4284,10 +4252,10 @@ index 6e65306a275fe91ce82b28e4e6155f91dceaa3f2..39339fa27551b06a9bfd8ea67b1ec8c6 public IBlockData getType(BlockPosition blockposition) { int i = blockposition.getY(); diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 7b6e0e86b00c7750267f0090b79b738696f115c4..187c4e0f58b7de58dfd2194afb194cbed0a58957 100644 +index 43c5b8258d9cd15d86d4160e9c614c7ca6152962..1ce85ab949213efb9eae6daddca6ac8fb15dd472 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -88,6 +88,7 @@ public class RegionFile implements AutoCloseable { +@@ -93,6 +93,7 @@ public class RegionFile implements AutoCloseable { return this.d.resolve(s); } @@ -4296,11 +4264,11 @@ index 7b6e0e86b00c7750267f0090b79b738696f115c4..187c4e0f58b7de58dfd2194afb194cbe public synchronized DataInputStream a(ChunkCoordIntPair chunkcoordintpair) throws IOException { int i = this.getOffset(chunkcoordintpair); diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -index 8c123f265e674ca99bc06e4d64f212148f6cac1a..9d0e8c2d43ba56d53bc30c0a3e2d7d170d8be474 100644 +index a2ec45a6b8bd63299508113e3522436cea2507e5..478d252953c65792df9f0068a4c1afd1985151ab 100644 --- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java +++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -@@ -108,6 +108,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccess { - return i >= ichunkaccess.getPos().x && i <= ichunkaccess1.getPos().x && j >= ichunkaccess.getPos().z && j <= ichunkaccess1.getPos().z; +@@ -101,6 +101,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccessSeed { + return i >= this.n.x && i <= this.o.x && j >= this.n.z && j <= this.o.z; } + // Paper start - if loaded util @@ -4339,10 +4307,10 @@ index 4efcb8b595750891b421e524812542f0f67e9f3f..60948afa4ead71010dc27c7cef3e5acd return this.b.size(); } diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 7b92ecfff94e3c4a69269139ebed75fc59bbd4f1..7e224ebeff3bf34270df173a47b08d3290c00670 100644 +index 80ee8d196436e271833503a0e123401d1b3314a9..275c1d2d1eb2649de9a9b5aece6e88c21362efba 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java -@@ -58,7 +58,7 @@ public class SystemUtils { +@@ -68,7 +68,7 @@ public class SystemUtils { } public static long getMonotonicNanos() { @@ -4364,7 +4332,7 @@ index f82db93f88223ffddc55deec8f21efc5b774d900..75ab9f185b3231113dfa387c956a707b public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index 143be566c683ae035997f9a4058381a109f3de23..0e30d8c9933dc6595b9715ef6dc99cc8910892cb 100644 +index 3c08ae0cf92ab1f5395662e957ab4d9c03e13deb..86f6f082fe2991ea9065b09c9680b76ca1cf7154 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java @@ -21,10 +21,12 @@ public final class VoxelShapes { @@ -4381,7 +4349,7 @@ index 143be566c683ae035997f9a4058381a109f3de23..0e30d8c9933dc6595b9715ef6dc99cc8 return VoxelShapes.b; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2e1eabba14a3757d03fd90741651001e78c6322f..45ded8cd3aee69083f6196765208d8c2430f0a02 100644 +index 03dc3dd41015dc210d2781c207261fc310c65519..42294c7c7de146be08d38eddafd8d099073b627a 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 @@ -4392,15 +4360,16 @@ index 2e1eabba14a3757d03fd90741651001e78c6322f..45ded8cd3aee69083f6196765208d8c2 import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.event.block.BlockPhysicsEvent; // CraftBukkit end -@@ -94,6 +95,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot - this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper +@@ -94,7 +95,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + + protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { + this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot +- this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper ++ this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper this.generator = gen; -+ if (dimensionmanager.world == null) dimensionmanager.world = (WorldServer) this; // Paper this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit - this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit -@@ -183,6 +185,39 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -245,6 +246,39 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return (Chunk) this.getChunkAt(i, j, ChunkStatus.FULL); } @@ -4408,7 +4377,7 @@ index 2e1eabba14a3757d03fd90741651001e78c6322f..45ded8cd3aee69083f6196765208d8c2 + @Nullable + @Override + public IChunkAccess getChunkIfLoadedImmediately(int x, int z) { -+ return ((ChunkProviderServer)this.chunkProvider).getChunkAtIfLoadedImmediately(x, z); ++ return ((WorldServer)this).chunkProvider.getChunkAtIfLoadedImmediately(x, z); + } + + @Override @@ -4439,8 +4408,8 @@ index 2e1eabba14a3757d03fd90741651001e78c6322f..45ded8cd3aee69083f6196765208d8c2 + @Override public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) { - IChunkAccess ichunkaccess = this.chunkProvider.getChunkAt(i, j, chunkstatus, flag); -@@ -336,8 +371,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + IChunkAccess ichunkaccess = this.getChunkProvider().getChunkAt(i, j, chunkstatus, flag); +@@ -403,8 +437,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void a(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} @@ -4453,20 +4422,32 @@ index 2e1eabba14a3757d03fd90741651001e78c6322f..45ded8cd3aee69083f6196765208d8c2 return this.setTypeAndData(blockposition, fluid.getBlockData(), 3 | (flag ? 64 : 0)); diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 020e5c171a44f8886395849d718efd6f90659bab..3db276f176301ebf15d5a2ba44d0edb5c7ec6097 100644 +index ddc4570139fd9b82f4b740697e84775f5ff0a75a..d039e715624d33fc3ec9e87d5ad992415e7dc6b9 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java -@@ -35,6 +35,8 @@ public class WorldBorder { +@@ -37,6 +37,7 @@ public class WorldBorder { return this.b(entity.locX(), entity.locZ()); } -+ public final VoxelShape asVoxelShape(){ return a();} // Paper - OBFHELPER -+ - public VoxelShape a() { - return this.i.m(); ++ public final VoxelShape asVoxelShape(){ return c();} // Paper - OBFHELPER + public VoxelShape c() { + 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 ac7c9efc53123e4fa964b33f67cf8196846056cc..f45b5ddc66024e993ac94436ee25a03e085742b4 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + private final Map entitiesByUUID = Maps.newHashMap(); + private final Queue entitiesToAdd = Queues.newArrayDeque(); + private final List players = Lists.newArrayList(); +- private final ChunkProviderServer chunkProvider; ++ public final ChunkProviderServer chunkProvider; // Paper - public + boolean tickingEntities; + private final MinecraftServer server; + public final WorldDataServer worldDataServer; // CraftBukkit - type diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index e181df6f4d08b88835db7342f97e0b848bcf01ef..4a9132c7016b076ab35b5d66ce81bbd247e1a3ce 100644 +index e636cc71f7ea2941dd50cb0242cb9bc00ffecfb3..c59da5b36c158a25ab861b1aaee497b4119feb3e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack { @@ -4666,11 +4647,11 @@ index 0000000000000000000000000000000000000000..49dc0c441b9dd7e7745cf15ced67f383 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -index d8358a0f031ca6e5d5dc1700172175446f74384e..d0b813008ca21fe6aa9b514ed4325596113fd459 100644 +index 254bc29d7188f08bac865bd56765f12dba753adc..8a4eb405f7e4a0e0a79a6b264610da1f970df79b 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -@@ -196,4 +196,22 @@ public class DummyGeneratorAccess implements GeneratorAccess { - public boolean a(BlockPosition blockposition, boolean flag, Entity entity) { +@@ -186,4 +186,22 @@ public class DummyGeneratorAccess implements GeneratorAccess { + public boolean a(BlockPosition blockposition, boolean flag, Entity entity, int i) { throw new UnsupportedOperationException("Not supported yet."); } + diff --git a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch index cb079c2240..f59281236e 100644 --- a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch @@ -19,10 +19,10 @@ index 41c79650b169b87fbc70cf502438a5453a04f23d..b839769ceae8932bb121a0b96fde1e7d MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7e01f6a1807f9885a7f4b163ce6bb626d8786a9a..6c7816fdc1ef476969cb70c8ea697b60746d6ab4 100644 +index 1512b23034b0ec95e2c72b9dd1c7b0a80d611e15..06165a668c96d25f3a863f5c98eae93240fd56fc 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; +@@ -50,7 +50,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.plugin.PluginManager; // CraftBukkit end @@ -31,7 +31,7 @@ index 7e01f6a1807f9885a7f4b163ce6bb626d8786a9a..6c7816fdc1ef476969cb70c8ea697b60 // CraftBukkit start private static final int CURRENT_LEVEL = 2; -@@ -1708,12 +1708,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1671,12 +1671,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return true; } @@ -63,18 +63,18 @@ index 7e01f6a1807f9885a7f4b163ce6bb626d8786a9a..6c7816fdc1ef476969cb70c8ea697b60 + // Paper end } - protected abstract void a(NBTTagCompound nbttagcompound); + protected abstract void loadData(NBTTagCompound nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 4328273b1fca165320097dbac0650b31fae4e5ca..8427ee2ee8b90d5deb686412bb2eefb9a574b75a 100644 +index 9a772e40ad8f9858e6278b99d9d1ff5dc54513cb..b9fe08301409bc1f0d61a7566c26e720ff720d80 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -237,6 +237,7 @@ public class EntityTypes { +@@ -248,6 +248,7 @@ public class EntityTypes { } } + public boolean isPersistable() { return a(); } // Paper - OBFHELPER public boolean a() { - return this.bc; + return this.bh; } diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java new file mode 100644 @@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..743142d0303fa25fe48a2abb07040d12 + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 40752f7617d5aa6b5ae55cd9a1b2eeb57c276adb..9071bb7ece6d38d85b4ea11e53671f3ec5210b28 100644 +index 6d06812f5fb6366ccd2673e9155be869b9bc0f6d..3cae7ef750371cee741c2f27799c1bb5864a278a 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -11,7 +11,7 @@ import org.bukkit.inventory.InventoryHolder; 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 bdd8563825..704accb548 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,19 +8,10 @@ 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 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd1415c4a41a5 100644 +index 7c7826cf3adb19814984ab627e4c4726d8933244..bd92ed2e6d4766f4f16ec3002c41b36b5a7e0358 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -29,7 +29,7 @@ public class Chunk implements IChunkAccess { - private final ChunkSection[] sections; - private BiomeStorage d; - private final Map e; -- public boolean loaded; -+ public boolean loaded; public boolean isLoaded() { return loaded; } // Paper - OBFHELPER - public final World world; - public final Map heightMap; - private final ChunkConverter i; -@@ -55,11 +55,36 @@ public class Chunk implements IChunkAccess { +@@ -56,11 +56,36 @@ public class Chunk implements IChunkAccess { this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null); } @@ -58,7 +49,7 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141 this.l = Maps.newHashMap(); this.m = Maps.newHashMap(); this.n = new ShortList[16]; -@@ -465,6 +490,7 @@ public class Chunk implements IChunkAccess { +@@ -466,6 +491,7 @@ public class Chunk implements IChunkAccess { } entity.inChunk = true; @@ -66,7 +57,7 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141 entity.chunkX = this.loc.x; entity.chunkY = k; entity.chunkZ = this.loc.z; -@@ -477,6 +503,7 @@ public class Chunk implements IChunkAccess { +@@ -478,6 +504,7 @@ public class Chunk implements IChunkAccess { ((HeightMap) this.heightMap.get(heightmap_type)).a(along); } @@ -74,7 +65,7 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141 public void b(Entity entity) { this.a(entity, entity.chunkY); } -@@ -490,7 +517,12 @@ public class Chunk implements IChunkAccess { +@@ -491,7 +518,12 @@ public class Chunk implements IChunkAccess { i = this.entitySlices.length - 1; } @@ -89,28 +80,19 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141 } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6c7816fdc1ef476969cb70c8ea697b60746d6ab4..0d8262b1d2722e716f95db4c9a8a132c54b613cf 100644 +index 06165a668c96d25f3a863f5c98eae93240fd56fc..62814197d32f9daf4e6b6aad26920589589efd75 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - private static final DataWatcherObject aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i); - private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); - protected static final DataWatcherObject POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s); -- public boolean inChunk; -+ public boolean inChunk; public boolean isAddedToChunk() { return inChunk; } // Paper - OBFHELPER - public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER - public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER - public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER -@@ -178,7 +178,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -179,7 +179,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean isChunkLoaded() { -- return world.isChunkLoaded((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); +- return world.isChunkLoaded((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4); + return getCurrentChunk() != null; } // CraftBukkit end -@@ -1709,6 +1709,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1672,6 +1672,23 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start @@ -124,38 +106,18 @@ index 6c7816fdc1ef476969cb70c8ea697b60746d6ab4..0d8262b1d2722e716f95db4c9a8a132c + */ + public Chunk getCurrentChunk() { + final Chunk chunk = currentChunk != null ? currentChunk.get() : null; -+ if (chunk != null && chunk.isLoaded()) { ++ if (chunk != null && chunk.loaded) { + return chunk; + } + -+ return !isAddedToChunk() ? null : ((ChunkProviderServer) world.chunkProvider).getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ()); -+ } -+ -+ /** -+ * Returns the chunk at the location, using the entities local cache if avail -+ * Will only return null if the location specified is not loaded -+ */ -+ public Chunk getCurrentChunkAt(int x, int z) { -+ Chunk chunk = getCurrentChunk(); -+ if (chunk != null && getChunkX() == chunk.getPos().x && getChunkZ() == chunk.getPos().z) { -+ return chunk; -+ } -+ return ((ChunkProviderServer) world.chunkProvider).getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ()); -+ } -+ /** -+ * Returns the chunk at the entities current location, using the entities local cache if avail -+ * Ideally this is always the same as getCurrentChunk, but only becomes different in registration issues. -+ * Will only return null if the location specified is not loaded -+ */ -+ public Chunk getChunkAtLocation() { -+ return getCurrentChunkAt((int)Math.floor(locX) >> 4, (int)Math.floor(locZ) >> 4); ++ return !inChunk ? null : ((WorldServer)world).getChunkProvider().getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ()); + } + private MinecraftKey entityKey; private String entityKeyString; diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 9071bb7ece6d38d85b4ea11e53671f3ec5210b28..820180ab3f7053c348caa80cc21f15dfa3d26afd 100644 +index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5d2b47e6a 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -175,10 +137,10 @@ index 9071bb7ece6d38d85b4ea11e53671f3ec5210b28..820180ab3f7053c348caa80cc21f15df @Nullable diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 27e2379f2dd6e9e06ae7a973ab8654cdcacf66c0..9672dd7c2166bba88832b1743b97e16561fe434c 100644 +index 305de86630b442fe1fa27431fca1ac989d16dc61..e867168be3c17548490f30944ca56a635cc3b054 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieHusk; +@@ -141,6 +141,7 @@ import net.minecraft.server.EntityZombieHusk; import net.minecraft.server.EntityZombieVillager; import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.NBTTagCompound; @@ -186,7 +148,7 @@ index 27e2379f2dd6e9e06ae7a973ab8654cdcacf66c0..9672dd7c2166bba88832b1743b97e165 import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.Server; -@@ -178,6 +179,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -182,6 +183,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { this.entity = entity; } 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 c1622b5e1b..57cb426087 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,10 +6,10 @@ 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 e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d716422113c396 100644 +index bd92ed2e6d4766f4f16ec3002c41b36b5a7e0358..eb08c7467595394fff9adf4f162aba9d71d7a7c2 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -56,15 +56,19 @@ public class Chunk implements IChunkAccess { +@@ -57,15 +57,19 @@ public class Chunk implements IChunkAccess { } // Paper start @@ -29,7 +29,7 @@ index e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d71642 } return replaced; } -@@ -74,6 +78,7 @@ public class Chunk implements IChunkAccess { +@@ -75,6 +79,7 @@ public class Chunk implements IChunkAccess { TileEntity removed = super.remove(key); if (removed != null) { removed.setCurrentChunk(null); @@ -37,7 +37,7 @@ index e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d71642 } return removed; } -@@ -489,6 +494,7 @@ public class Chunk implements IChunkAccess { +@@ -490,6 +495,7 @@ public class Chunk implements IChunkAccess { k = this.entitySlices.length - 1; } @@ -45,7 +45,7 @@ index e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d71642 entity.inChunk = true; entity.setCurrentChunk(this); // Paper entity.chunkX = this.loc.x; -@@ -522,6 +528,7 @@ public class Chunk implements IChunkAccess { +@@ -523,6 +529,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 c947cd4ee5..400a049810 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -714,13 +714,13 @@ index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index cd72a9c84569592f9c82708a17388e594648d19d..5de881371a485957fd8fadc7540a2b549b20dd65 100644 +index c95bbcd46978522a2dce173b4c116aa39c8f2f01..3cc572b0ce757160c7ab4733b98d8ca84f9f325a 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -31,6 +31,15 @@ public class Block implements IMaterial { - protected final boolean q; - protected final SoundEffectType stepSound; - protected final Material material; +@@ -24,6 +24,15 @@ public class Block extends BlockBase implements IMaterial { + private static final VoxelShape c = a(7.0D, 0.0D, 7.0D, 9.0D, 10.0D, 9.0D); + protected final BlockStateList blockStateList; + private IBlockData blockData; + // Paper start + public co.aikar.timings.Timing timing; + public co.aikar.timings.Timing getTiming() { @@ -730,14 +730,14 @@ index cd72a9c84569592f9c82708a17388e594648d19d..5de881371a485957fd8fadc7540a2b54 + return timing; + } + // Paper end - protected final MaterialMapColor t; - private final float frictionFactor; - private final float f; + @Nullable + 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 f1b9b937e8ced0c718db463c94d716422113c396..43dc791191cdf2aa3e5cb2768c25e6be4b2cf6b1 100644 +index eb08c7467595394fff9adf4f162aba9d71d7a7c2..09b4594ae6750252b4b13ed4735dad0d00e2aeec 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -692,6 +692,7 @@ public class Chunk implements IChunkAccess { +@@ -693,6 +693,7 @@ public class Chunk implements IChunkAccess { server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration)); if (this.needsDecoration) { @@ -745,7 +745,7 @@ index f1b9b937e8ced0c718db463c94d716422113c396..43dc791191cdf2aa3e5cb2768c25e6be this.needsDecoration = false; java.util.Random random = new java.util.Random(); random.setSeed(world.getSeed()); -@@ -711,6 +712,7 @@ public class Chunk implements IChunkAccess { +@@ -712,6 +713,7 @@ public class Chunk implements IChunkAccess { } } server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); @@ -754,10 +754,10 @@ index f1b9b937e8ced0c718db463c94d716422113c396..43dc791191cdf2aa3e5cb2768c25e6be } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 64d84b334d211fe39e808d2c8b5d457757fb1359..83707fa6ae5cf4f564760ca0fb5e8c1932d4a91e 100644 +index 359441cd993a95f933f23aebcec8180f314a5f09..7dd9c5eec53631d25ae511b1e57bdadfe28ce289 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -318,11 +318,13 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -319,11 +319,13 @@ public class ChunkProviderServer extends IChunkProvider { } gameprofilerfiller.c("getChunkCacheMiss"); @@ -773,7 +773,7 @@ index 64d84b334d211fe39e808d2c8b5d457757fb1359..83707fa6ae5cf4f564760ca0fb5e8c19 ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { return ichunkaccess1; }, (playerchunk_failure) -> { -@@ -515,7 +517,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -510,7 +512,9 @@ public class ChunkProviderServer extends IChunkProvider { public void save(boolean flag) { this.tickDistanceManager(); @@ -783,7 +783,7 @@ index 64d84b334d211fe39e808d2c8b5d457757fb1359..83707fa6ae5cf4f564760ca0fb5e8c19 } @Override -@@ -552,7 +556,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -547,7 +551,9 @@ public class ChunkProviderServer extends IChunkProvider { this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.getMethodProfiler().exitEnter("chunks"); @@ -793,50 +793,44 @@ index 64d84b334d211fe39e808d2c8b5d457757fb1359..83707fa6ae5cf4f564760ca0fb5e8c19 this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.getMethodProfiler().exitEnter("unload"); this.playerChunkMap.unloadChunks(booleansupplier); -@@ -583,10 +589,12 @@ public class ChunkProviderServer extends IChunkProvider { - // CraftBukkit end +@@ -571,8 +577,10 @@ public class ChunkProviderServer extends IChunkProvider { + boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit this.world.getMethodProfiler().enter("naturalSpawnCount"); + this.world.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.chunkMapDistance.b(); - EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); - Object2IntMap object2intmap = this.world.l(); - + SpawnerCreature.d spawnercreature_d = SpawnerCreature.a(l, this.world.z(), this::a); + this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings - this.world.getMethodProfiler().exit(); - this.playerChunkMap.f().forEach((playerchunk) -> { - Optional optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -595,11 +603,14 @@ public class ChunkProviderServer extends IChunkProvider { - Chunk chunk = (Chunk) optional.get(); + this.p = spawnercreature_d; + this.world.getMethodProfiler().exit(); +@@ -583,7 +591,9 @@ public class ChunkProviderServer extends IChunkProvider { + + if (optional.isPresent()) { this.world.getMethodProfiler().enter("broadcast"); + this.world.timings.broadcastChunkUpdates.startTiming(); // Paper - timings - playerchunk.a(chunk); + playerchunk.a((Chunk) optional.get()); + this.world.timings.broadcastChunkUpdates.stopTiming(); // Paper - timings this.world.getMethodProfiler().exit(); - ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); + Optional optional1 = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); - if (!this.playerChunkMap.isOutsideOfRange(chunkcoordintpair)) { -+ // Paper end - chunk.setInhabitedTime(chunk.getInhabitedTime() + j); - if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot - this.world.getMethodProfiler().enter("spawner"); -@@ -650,24 +661,24 @@ public class ChunkProviderServer extends IChunkProvider { - this.world.getMethodProfiler().exit(); +@@ -597,25 +607,25 @@ public class ChunkProviderServer extends IChunkProvider { + SpawnerCreature.a(this.world, chunk, spawnercreature_d, this.allowAnimals, this.allowMonsters, flag2); + } + +- this.world.timings.doTickTiles.startTiming(); // Spigot ++ this.world.timings.chunkTicks.startTiming(); // Spigot // Paper + this.world.a(chunk, k); +- this.world.timings.doTickTiles.stopTiming(); // Spigot ++ this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper } - -- this.world.timings.doTickTiles.startTiming(); // Spigot -+ this.world.timings.chunkTicks.startTiming(); // Spigot // Paper - this.world.a(chunk, k); -- this.world.timings.doTickTiles.stopTiming(); // Spigot -+ this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper } } }); this.world.getMethodProfiler().enter("customSpawners"); if (flag1) { + try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings - this.chunkGenerator.doMobSpawning(this.world, this.allowMonsters, this.allowAnimals); + this.world.doMobSpawning(this.allowMonsters, this.allowAnimals); + } // Paper - timings } @@ -849,9 +843,9 @@ index 64d84b334d211fe39e808d2c8b5d457757fb1359..83707fa6ae5cf4f564760ca0fb5e8c19 - this.world.timings.tracker.stopTiming(); // Spigot } - @Override + private void a(long i, Consumer consumer) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index e16d30f2cafcbc5edbcd58d97703686aaf1537d5..13d99de2cd08de02215031a1f699110c13ef35ff 100644 +index 79e0e65a35945a6071cf08f688311ec4d1f71c72..28039aa8421207ce04840cc90e03d21bc8b7269f 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -1,5 +1,6 @@ @@ -861,7 +855,7 @@ index e16d30f2cafcbc5edbcd58d97703686aaf1537d5..13d99de2cd08de02215031a1f699110c import com.google.common.collect.Maps; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongSet; -@@ -388,7 +389,6 @@ public class ChunkRegionLoader { +@@ -392,7 +393,6 @@ public class ChunkRegionLoader { private static void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) { NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10); World world = chunk.getWorld(); @@ -869,7 +863,7 @@ index e16d30f2cafcbc5edbcd58d97703686aaf1537d5..13d99de2cd08de02215031a1f699110c for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i); -@@ -400,8 +400,6 @@ public class ChunkRegionLoader { +@@ -404,8 +404,6 @@ public class ChunkRegionLoader { chunk.d(true); } @@ -878,7 +872,7 @@ index e16d30f2cafcbc5edbcd58d97703686aaf1537d5..13d99de2cd08de02215031a1f699110c NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10); for (int j = 0; j < nbttaglist1.size(); ++j) { -@@ -418,8 +416,6 @@ public class ChunkRegionLoader { +@@ -423,8 +421,6 @@ public class ChunkRegionLoader { } } } @@ -886,9 +880,9 @@ index e16d30f2cafcbc5edbcd58d97703686aaf1537d5..13d99de2cd08de02215031a1f699110c - } - private static NBTTagCompound a(ChunkCoordIntPair chunkcoordintpair, Map map, Map map1) { + private static NBTTagCompound a(ChunkCoordIntPair chunkcoordintpair, Map, StructureStart> map, Map, LongSet> map1) { diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java -index 8d7a6d2403722c7e7ff437f8e153ffa6194679d7..707bd2600d19699f58405eaa23ec36f406ca20ba 100644 +index 6d628c759346701c4097f36c302d1a1ab258bf9c..dd945eb709f75da58889002c9b8f7c22aaeeb30f 100644 --- a/src/main/java/net/minecraft/server/CustomFunction.java +++ b/src/main/java/net/minecraft/server/CustomFunction.java @@ -13,12 +13,22 @@ public class CustomFunction { @@ -915,32 +909,23 @@ index 8d7a6d2403722c7e7ff437f8e153ffa6194679d7..707bd2600d19699f58405eaa23ec36f4 return this.b; } diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java -index ba40d5fbb5fe69225d25bdc4e299857f5ab21b40..ee42e1dfa493c3d7f5af8cc7b8e17e80fcb32b71 100644 +index 903cbd10fba18e61a4dc3ced71e22a665b78f177..423e4d12aba9197b936e69dfd4146ceeca3a30c4 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java -@@ -103,7 +103,7 @@ public class CustomFunctionData implements IResourcePackListener { +@@ -69,7 +69,7 @@ public class CustomFunctionData { } else { int j; - try { + try (co.aikar.timings.Timing timing = customfunction.getTiming().startTiming()) { // Paper - this.h = true; + this.d = true; int k = 0; CustomFunction.c[] acustomfunction_c = customfunction.b(); diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 9eed98e3796be6d49dc51af9038a7376c94edeee..d6646d7e61b63c116fa87951b0ef3131b68ebe97 100644 +index 1964130ae411ff7d5e1b456a23629804d294a5d0..4cf4ef11ce295aec3b7d0bf07b64a1ecdca3c39a 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -20,6 +20,8 @@ import java.util.List; - import java.util.Locale; - import java.util.Optional; - import java.util.Random; -+import java.util.concurrent.CompletableFuture; -+import java.util.concurrent.ExecutionException; - import java.util.function.BooleanSupplier; - import java.util.regex.Pattern; - import javax.annotation.Nullable; -@@ -32,7 +34,7 @@ import org.apache.logging.log4j.Level; +@@ -28,7 +28,7 @@ import org.apache.logging.log4j.Level; import org.bukkit.command.CommandSender; import org.bukkit.craftbukkit.LoggerOutputStream; @@ -949,7 +934,7 @@ index 9eed98e3796be6d49dc51af9038a7376c94edeee..d6646d7e61b63c116fa87951b0ef3131 import org.bukkit.event.server.ServerCommandEvent; import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; -@@ -438,7 +440,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -381,7 +381,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } public void handleCommandQueue() { @@ -958,7 +943,7 @@ index 9eed98e3796be6d49dc51af9038a7376c94edeee..d6646d7e61b63c116fa87951b0ef3131 while (!this.serverCommandQueue.isEmpty()) { ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0); -@@ -453,7 +455,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -396,7 +396,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer // CraftBukkit end } @@ -967,7 +952,7 @@ index 9eed98e3796be6d49dc51af9038a7376c94edeee..d6646d7e61b63c116fa87951b0ef3131 } @Override -@@ -679,6 +681,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -627,6 +627,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @Override public String executeRemoteCommand(String s) { @@ -975,7 +960,7 @@ index 9eed98e3796be6d49dc51af9038a7376c94edeee..d6646d7e61b63c116fa87951b0ef3131 this.remoteControlCommandListener.clearMessages(); this.executeSync(() -> { // CraftBukkit start - fire RemoteServerCommandEvent -@@ -687,10 +690,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -635,10 +636,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer if (event.isCancelled()) { return; } @@ -1016,10 +1001,10 @@ index 9eed98e3796be6d49dc51af9038a7376c94edeee..d6646d7e61b63c116fa87951b0ef3131 } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0d8262b1d2722e716f95db4c9a8a132c54b613cf..19d68aa4585ccfc156e9db6024b7a99bbeca4de4 100644 +index 62814197d32f9daf4e6b6aad26920589589efd75..a25e9ce6d536c8c276750bfd56ac73a2dbaf7202 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; +@@ -30,7 +30,8 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Hanging; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Vehicle; @@ -1029,7 +1014,7 @@ index 0d8262b1d2722e716f95db4c9a8a132c54b613cf..19d68aa4585ccfc156e9db6024b7a99b import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; -@@ -165,7 +166,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -166,7 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public boolean valid; public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 @@ -1038,27 +1023,27 @@ index 0d8262b1d2722e716f95db4c9a8a132c54b613cf..19d68aa4585ccfc156e9db6024b7a99b // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -504,7 +505,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -527,7 +528,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public void move(EnumMoveType enummovetype, Vec3D vec3d) { - org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot if (this.noclip) { - this.a(this.getBoundingBox().b(vec3d)); + this.a(this.getBoundingBox().c(vec3d)); this.recalcPosition(); -@@ -656,7 +656,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -664,7 +664,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.getMethodProfiler().exit(); } - org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot } - protected BlockPosition ag() { + protected BlockPosition ak() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ff6579cb99dcd93254cae67fe84de0f7c034eaa5..3fdd7132d483155a574d12b56a2bc3432d16ac63 100644 +index dccb315440f7429fe881bd0d12af8f1ae8e35c3d..96a95413f74592ef0a8e9367fd3ed81fc0a2c2fe 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -37,7 +37,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; +@@ -41,7 +41,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; import org.bukkit.event.player.PlayerItemConsumeEvent; // CraftBukkit end @@ -1067,15 +1052,15 @@ index ff6579cb99dcd93254cae67fe84de0f7c034eaa5..3fdd7132d483155a574d12b56a2bc343 public abstract class EntityLiving extends Entity { -@@ -2265,7 +2265,6 @@ public abstract class EntityLiving extends Entity { +@@ -2335,7 +2335,6 @@ public abstract class EntityLiving extends Entity { @Override public void tick() { - SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot super.tick(); - this.o(); - this.r(); -@@ -2353,9 +2352,7 @@ public abstract class EntityLiving extends Entity { + this.u(); + this.x(); +@@ -2384,9 +2383,7 @@ public abstract class EntityLiving extends Entity { } } @@ -1085,7 +1070,7 @@ index ff6579cb99dcd93254cae67fe84de0f7c034eaa5..3fdd7132d483155a574d12b56a2bc343 double d0 = this.locX() - this.lastX; double d1 = this.locZ() - this.lastZ; float f = (float) (d0 * d0 + d1 * d1); -@@ -2435,8 +2432,6 @@ public abstract class EntityLiving extends Entity { +@@ -2466,8 +2463,6 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.pitch = 0.0F; } @@ -1093,16 +1078,16 @@ index ff6579cb99dcd93254cae67fe84de0f7c034eaa5..3fdd7132d483155a574d12b56a2bc343 - SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot } - protected float f(float f, float f1) { -@@ -2515,7 +2510,6 @@ public abstract class EntityLiving extends Entity { + private void q() { +@@ -2649,7 +2644,6 @@ public abstract class EntityLiving extends Entity { this.setMot(d4, d5, d6); this.world.getMethodProfiler().enter("ai"); - SpigotTimings.timerEntityAI.startTiming(); // Spigot if (this.isFrozen()) { this.jumping = false; - this.aZ = 0.0F; -@@ -2525,7 +2519,6 @@ public abstract class EntityLiving extends Entity { + this.aY = 0.0F; +@@ -2659,7 +2653,6 @@ public abstract class EntityLiving extends Entity { this.doTick(); this.world.getMethodProfiler().exit(); } @@ -1110,17 +1095,17 @@ index ff6579cb99dcd93254cae67fe84de0f7c034eaa5..3fdd7132d483155a574d12b56a2bc343 this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().enter("jump"); -@@ -2549,9 +2542,7 @@ public abstract class EntityLiving extends Entity { - this.n(); +@@ -2694,9 +2687,7 @@ public abstract class EntityLiving extends Entity { + this.t(); AxisAlignedBB axisalignedbb = this.getBoundingBox(); - SpigotTimings.timerEntityAIMove.startTiming(); // Spigot - this.e(new Vec3D((double) this.aZ, (double) this.ba, (double) this.bb)); + this.f(new Vec3D((double) this.aY, (double) this.aZ, (double) this.ba)); - SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().enter("push"); - if (this.bn > 0) { -@@ -2559,9 +2550,7 @@ public abstract class EntityLiving extends Entity { + if (this.bm > 0) { +@@ -2704,9 +2695,7 @@ public abstract class EntityLiving extends Entity { this.a(axisalignedbb, this.getBoundingBox()); } @@ -1128,13 +1113,13 @@ index ff6579cb99dcd93254cae67fe84de0f7c034eaa5..3fdd7132d483155a574d12b56a2bc343 this.collideNearby(); - SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot this.world.getMethodProfiler().exit(); - } - + if (!this.world.isClientSide && this.dN() && this.aC()) { + this.damageEntity(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 786d38438cc1bd5a736b2dfa80aca9b9c6253e65..5429d8eee93980a01cdf008b57e88e1dccc1ef67 100644 +index aeb2e95e4c350f0b539466fc56ac41c8280aba20..a7579b01d27e367603ba643c390b316bcd9b492b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer; +@@ -64,7 +64,7 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.Main; import org.bukkit.event.server.ServerLoadEvent; // CraftBukkit end @@ -1142,19 +1127,19 @@ index 786d38438cc1bd5a736b2dfa80aca9b9c6253e65..5429d8eee93980a01cdf008b57e88e1d +import co.aikar.timings.MinecraftTimings; // Paper import org.spigotmc.SlackActivityAccountant; // Spigot - public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { -@@ -128,8 +128,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable { +@@ -118,8 +118,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcePackRepository; + private final ScoreboardServer scoreboardServer; @Nullable -@@ -694,6 +694,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { -@@ -1000,14 +1021,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { +@@ -1023,14 +1044,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -1231,7 +1216,7 @@ index 786d38438cc1bd5a736b2dfa80aca9b9c6253e65..5429d8eee93980a01cdf008b57e88e1d } this.methodProfiler.enter("snooper"); -@@ -1020,6 +1039,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> f(ChunkCoordIntPair chunkcoordintpair) { return CompletableFuture.supplyAsync(() -> { @@ -1356,7 +1341,7 @@ index b505244516321292e56609eaa54693d84e0bf617..65134c87772cb6d4d732fc223929cfda boolean flag = nbttagcompound.hasKeyOfType("Level", 10) && nbttagcompound.getCompound("Level").hasKeyOfType("Status", 8); if (flag) { -@@ -522,7 +527,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -524,7 +529,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } PlayerChunkMap.LOGGER.error("Chunk file at {} is missing level data, skipping", chunkcoordintpair); @@ -1365,7 +1350,7 @@ index b505244516321292e56609eaa54693d84e0bf617..65134c87772cb6d4d732fc223929cfda } catch (ReportedException reportedexception) { Throwable throwable = reportedexception.getCause(); -@@ -549,7 +554,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -561,7 +566,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return "chunkGenerate " + chunkstatus.d(); }); return completablefuture.thenComposeAsync((either) -> { @@ -1374,7 +1359,7 @@ index b505244516321292e56609eaa54693d84e0bf617..65134c87772cb6d4d732fc223929cfda try { CompletableFuture> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> { return this.c(playerchunk); -@@ -602,6 +607,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -614,6 +619,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkStatus chunkstatus = PlayerChunk.getChunkStatus(playerchunk.getTicketLevel()); return !chunkstatus.b(ChunkStatus.FULL) ? PlayerChunk.UNLOADED_CHUNK_ACCESS : either.mapLeft((ichunkaccess) -> { @@ -1382,7 +1367,7 @@ index b505244516321292e56609eaa54693d84e0bf617..65134c87772cb6d4d732fc223929cfda ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); Chunk chunk; -@@ -653,6 +659,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -665,6 +671,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } return chunk; @@ -1390,7 +1375,7 @@ index b505244516321292e56609eaa54693d84e0bf617..65134c87772cb6d4d732fc223929cfda }); }, (runnable) -> { Mailbox mailbox = this.mailboxMain; -@@ -1094,6 +1101,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1123,6 +1130,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunkMap.EntityTracker playerchunkmap_entitytracker; ObjectIterator objectiterator; @@ -1398,7 +1383,7 @@ index b505244516321292e56609eaa54693d84e0bf617..65134c87772cb6d4d732fc223929cfda for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) { playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); -@@ -1111,16 +1119,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1140,16 +1148,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { playerchunkmap_entitytracker.e = sectionposition1; } } @@ -1420,7 +1405,7 @@ index b505244516321292e56609eaa54693d84e0bf617..65134c87772cb6d4d732fc223929cfda protected void broadcast(Entity entity, Packet packet) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f40cb14d5301631161f1701043ee987359d9a8e9..87119b4fe5ae27c63d272c8e436e3734eddd8f68 100644 +index a8f11d1842e9a8ef82230e2ae4998923f3b02ca9..890b0fc7baf51ed6896d979021b3956c5c279c40 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1441,13 +1426,13 @@ index f40cb14d5301631161f1701043ee987359d9a8e9..87119b4fe5ae27c63d272c8e436e3734 this.player.lastY = this.player.locY(); @@ -211,7 +211,6 @@ public class PlayerConnection implements PacketListenerPlayIn { this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854 - this.disconnect(new ChatMessage("multiplayer.disconnect.idling", new Object[0])); + this.disconnect(new ChatMessage("multiplayer.disconnect.idling")); } - org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot } -@@ -1639,7 +1638,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1683,7 +1682,7 @@ public class PlayerConnection implements PacketListenerPlayIn { // CraftBukkit end private void handleCommand(String s) { @@ -1456,7 +1441,7 @@ index f40cb14d5301631161f1701043ee987359d9a8e9..87119b4fe5ae27c63d272c8e436e3734 // CraftBukkit start - whole method if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getName() + " issued server command: " + s); -@@ -1650,7 +1649,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1694,7 +1693,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -1465,7 +1450,7 @@ index f40cb14d5301631161f1701043ee987359d9a8e9..87119b4fe5ae27c63d272c8e436e3734 return; } -@@ -1663,7 +1662,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1707,7 +1706,7 @@ public class PlayerConnection implements PacketListenerPlayIn { java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); return; } finally { @@ -1502,7 +1487,7 @@ index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf43 PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f36ef51158e9c8509465e46e33fe14a5931ac739..c759dd0f9a66dc2fa30746132564a0981037f265 100644 +index f51bae1a01b6ac158f808d85bc77cb03a8f19aa3..7464ef739bf673baab8661e561abbe9266b888c4 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1512,7 +1497,7 @@ index f36ef51158e9c8509465e46e33fe14a5931ac739..c759dd0f9a66dc2fa30746132564a098 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -898,10 +899,11 @@ public abstract class PlayerList { +@@ -940,10 +941,11 @@ public abstract class PlayerList { } public void savePlayers() { @@ -1526,20 +1511,19 @@ index f36ef51158e9c8509465e46e33fe14a5931ac739..c759dd0f9a66dc2fa30746132564a098 public WhiteList getWhitelist() { diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java -index 00bbd34b6a2a8185bc6395d6c85bce6353c3cbc4..f533860bbed19ff2915c90186c259b466f41ce90 100644 +index e8ff43662b8397229cb19ea26342b66c88807379..3b8f56c0f0507ebdd9ac20be70688b4c0cfe4cf8 100644 --- a/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java -@@ -28,13 +28,18 @@ public class TickListServer implements TickList { - private final List> h = Lists.newArrayList(); - private final Consumer> i; +@@ -26,12 +26,17 @@ public class TickListServer implements TickList { + private final List> g = Lists.newArrayList(); + private final Consumer> h; -- public TickListServer(WorldServer worldserver, Predicate predicate, Function function, Function function1, Consumer> consumer) { -+ public TickListServer(WorldServer worldserver, Predicate predicate, Function function, Function function1, Consumer> consumer, String timingsType) { // Paper +- public TickListServer(WorldServer worldserver, Predicate predicate, Function function, Consumer> consumer) { ++ public TickListServer(WorldServer worldserver, Predicate predicate, Function function, Consumer> consumer, String timingsType) { // Paper this.a = predicate; this.b = function; - this.c = function1; - this.f = worldserver; - this.i = consumer; + this.e = worldserver; + this.h = consumer; + this.timingCleanup = co.aikar.timings.WorldTimingsHandler.getTickList(worldserver, timingsType + " - Cleanup"); + this.timingTicking = co.aikar.timings.WorldTimingsHandler.getTickList(worldserver, timingsType + " - Ticking"); } @@ -1549,34 +1533,34 @@ index 00bbd34b6a2a8185bc6395d6c85bce6353c3cbc4..f533860bbed19ff2915c90186c259b46 public void b() { int i = this.nextTickList.size(); -@@ -57,6 +62,7 @@ public class TickListServer implements TickList { +@@ -54,6 +59,7 @@ public class TickListServer implements TickList { - this.f.getMethodProfiler().enter("cleaning"); + this.e.getMethodProfiler().enter("cleaning"); + this.timingCleanup.startTiming(); // Paper NextTickListEntry nextticklistentry; while (i > 0 && iterator.hasNext()) { -@@ -72,7 +78,9 @@ public class TickListServer implements TickList { +@@ -69,7 +75,9 @@ public class TickListServer implements TickList { --i; } } + this.timingCleanup.stopTiming(); // Paper + this.timingTicking.startTiming(); // Paper - this.f.getMethodProfiler().exitEnter("ticking"); + this.e.getMethodProfiler().exitEnter("ticking"); - while ((nextticklistentry = (NextTickListEntry) this.g.poll()) != null) { -@@ -93,6 +101,7 @@ public class TickListServer implements TickList { + while ((nextticklistentry = (NextTickListEntry) this.f.poll()) != null) { +@@ -89,6 +97,7 @@ public class TickListServer implements TickList { + } } - this.f.getMethodProfiler().exit(); + this.timingTicking.stopTiming(); // Paper - this.h.clear(); + this.e.getMethodProfiler().exit(); this.g.clear(); - } + this.f.clear(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 820180ab3f7053c348caa80cc21f15dfa3d26afd..fa6400dccd4df635d696e0858c0c164a0f19b4a4 100644 +index f4d88de468e7843585eb5c722c9e94f5d2b47e6a..03c6a1c95daaa25208917d6985594eb5f182e8e1 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; @@ -1595,27 +1579,18 @@ index 820180ab3f7053c348caa80cc21f15dfa3d26afd..fa6400dccd4df635d696e0858c0c164a 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 45ded8cd3aee69083f6196765208d8c2430f0a02..a126a6d22ccee90d0aadb8513bda60455a703bf6 100644 +index 42294c7c7de146be08d38eddafd8d099073b627a..8a7ce347c35e0527471b3b586a248d6497c3b75d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; - -+import co.aikar.timings.Timing; -+import co.aikar.timings.Timings; - import com.google.common.collect.Lists; - import java.io.IOException; - import java.util.Collection; -@@ -18,7 +20,7 @@ import org.apache.logging.log4j.util.Supplier; +@@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger; import java.util.HashMap; import java.util.Map; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.SpigotTimings; // Spigot -+import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.block.CapturedBlockState; -@@ -73,7 +75,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -79,7 +78,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper @@ -1624,7 +1599,7 @@ index 45ded8cd3aee69083f6196765208d8c2430f0a02..a126a6d22ccee90d0aadb8513bda6045 public static BlockPosition lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; private org.spigotmc.TickLimiter tileLimiter; -@@ -139,7 +141,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -157,7 +156,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void c(WorldBorder worldborder, double d0) {} }); // CraftBukkit end @@ -1633,7 +1608,7 @@ index 45ded8cd3aee69083f6196765208d8c2430f0a02..a126a6d22ccee90d0aadb8513bda6045 this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -@@ -723,15 +725,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -779,15 +778,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } timings.tileEntityPending.stopTiming(); // Spigot @@ -1651,87 +1626,72 @@ index 45ded8cd3aee69083f6196765208d8c2430f0a02..a126a6d22ccee90d0aadb8513bda6045 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 545ec5a2de00e9a91b349e358db44ed16aa50e68..4ab77e8dc0f918bd4f069a0f886d04dea473f046 100644 +index f45b5ddc66024e993ac94436ee25a03e085742b4..2b39fb903c1cf6ded8aa170f5bd25f4fadb1195a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1,6 +1,8 @@ - package net.minecraft.server; - +@@ -3,6 +3,8 @@ package net.minecraft.server; import com.google.common.annotations.VisibleForTesting; + import com.google.common.collect.ImmutableList; + import com.google.common.collect.Iterables; +import co.aikar.timings.TimingHistory; // Paper +import co.aikar.timings.Timings; // Paper import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -40,7 +42,6 @@ import org.apache.logging.log4j.Logger; +@@ -39,7 +41,6 @@ import org.apache.logging.log4j.Logger; import java.util.logging.Level; import org.bukkit.Bukkit; import org.bukkit.WeatherType; -import org.bukkit.craftbukkit.SpigotTimings; // Spigot import org.bukkit.craftbukkit.event.CraftEventFactory; + import org.bukkit.craftbukkit.util.WorldUUID; import org.bukkit.event.entity.CreatureSpawnEvent; - import org.bukkit.event.server.MapInitializeEvent; -@@ -97,10 +98,10 @@ public class WorldServer extends World { +@@ -95,10 +96,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit end this.nextTickListBlock = new TickListServer<>(this, (block) -> { return block == null || block.getBlockData().isAir(); -- }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::get, this::b); -+ }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::get, this::b, "Blocks"); // Paper - Timings +- }, IRegistry.BLOCK::getKey, this::b); ++ }, IRegistry.BLOCK::getKey, this::b, "Blocks"); // Paper - Timings this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> { return fluidtype == null || fluidtype == FluidTypes.EMPTY; -- }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a); -+ }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings +- }, IRegistry.FLUID::getKey, this::a); ++ }, IRegistry.FLUID::getKey, this::a, "Fluids"); // Paper - Timings this.navigators = Sets.newHashSet(); - this.I = new ObjectLinkedOpenHashSet(); - this.dataManager = worldnbtstorage; -@@ -305,20 +306,24 @@ public class WorldServer extends World { + this.L = new ObjectLinkedOpenHashSet(); + this.Q = flag1; +@@ -326,17 +327,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.N(); - this.a(); + this.b(); gameprofilerfiller.exitEnter("chunkSource"); + this.timings.chunkProviderTick.startTiming(); // Paper - timings this.getChunkProvider().tick(booleansupplier); + this.timings.chunkProviderTick.stopTiming(); // Paper - timings gameprofilerfiller.exitEnter("tickPending"); - timings.doTickPending.startTiming(); // Spigot -+ timings.scheduledBlocks.startTiming(); // Spigot - if (this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) { ++ timings.scheduledBlocks.startTiming(); // Paper + if (!this.isDebugWorld()) { this.nextTickListBlock.b(); this.nextTickListFluid.b(); } - timings.doTickPending.stopTiming(); // Spigot -+ timings.scheduledBlocks.stopTiming(); // Spigot ++ timings.scheduledBlocks.stopTiming(); // Paper gameprofilerfiller.exitEnter("raid"); + this.timings.raids.startTiming(); // Paper - timings this.persistentRaid.a(); - if (this.mobSpawnerTrader != null) { - this.mobSpawnerTrader.a(); - } + this.timings.raids.stopTiming(); // Paper - timings - gameprofilerfiller.exitEnter("blockEvents"); timings.doSounds.startTiming(); // Spigot -@@ -361,6 +366,7 @@ public class WorldServer extends World { + this.ah(); +@@ -360,6 +365,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { org.spigotmc.ActivationRange.activateEntities(this); // Spigot timings.entityTick.startTiming(); // Spigot + TimingHistory.entityTicks += this.globalEntityList.size(); // Paper while (objectiterator.hasNext()) { Entry entry = (Entry) objectiterator.next(); - Entity entity1 = (Entity) entry.getValue(); -@@ -409,9 +415,11 @@ public class WorldServer extends World { - - this.tickingEntities = false; - -+ try (co.aikar.timings.Timing ignored = this.timings.newEntities.startTiming()) { // Paper - timings - while ((entity = (Entity) this.entitiesToAdd.poll()) != null) { - this.registerEntity(entity); - } -+ } // Paper - timings - - gameprofilerfiller.exit(); - timings.tickEntities.stopTiming(); // Spigot -@@ -476,6 +484,7 @@ public class WorldServer extends World { + Entity entity = (Entity) entry.getValue(); +@@ -508,6 +514,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exitEnter("tickBlocks"); @@ -1739,7 +1699,7 @@ index 545ec5a2de00e9a91b349e358db44ed16aa50e68..4ab77e8dc0f918bd4f069a0f886d04de if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int l = achunksection.length; -@@ -507,7 +516,7 @@ public class WorldServer extends World { +@@ -539,7 +546,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } } @@ -1748,25 +1708,25 @@ index 545ec5a2de00e9a91b349e358db44ed16aa50e68..4ab77e8dc0f918bd4f069a0f886d04de gameprofilerfiller.exit(); } -@@ -603,6 +612,7 @@ public class WorldServer extends World { - - public void entityJoinedWorld(Entity entity) { - if (entity instanceof EntityHuman || this.getChunkProvider().a(entity)) { +@@ -637,6 +644,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + if (!(entity instanceof EntityHuman) && !this.getChunkProvider().a(entity)) { + this.chunkCheck(entity); + } else { + ++TimingHistory.entityTicks; // Paper - timings // Spigot start if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { entity.ticksLived++; -@@ -611,7 +621,9 @@ public class WorldServer extends World { +@@ -644,7 +652,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { + return; } // Spigot end - + TimingHistory.activatedEntityTicks++; // Paper - timings entity.tickTimer.startTiming(); // Spigot + try { // Paper - timings entity.f(entity.locX(), entity.locY(), entity.locZ()); entity.lastYaw = entity.yaw; entity.lastPitch = entity.pitch; -@@ -638,7 +650,9 @@ public class WorldServer extends World { +@@ -671,7 +681,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.a(entity, entity1); } } @@ -1776,16 +1736,16 @@ index 545ec5a2de00e9a91b349e358db44ed16aa50e68..4ab77e8dc0f918bd4f069a0f886d04de } } -@@ -799,6 +813,7 @@ public class WorldServer extends World { +@@ -748,6 +760,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (!flag1) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit + try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper if (iprogressupdate != null) { - iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); + iprogressupdate.a(new ChatMessage("menu.savingLevel")); } -@@ -808,7 +823,10 @@ public class WorldServer extends World { - iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); +@@ -757,7 +770,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { + iprogressupdate.c(new ChatMessage("menu.savingChunks")); } + timings.worldSaveChunks.startTiming(); // Paper @@ -1796,10 +1756,10 @@ index 545ec5a2de00e9a91b349e358db44ed16aa50e68..4ab77e8dc0f918bd4f069a0f886d04de // 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 ad1dcf53040695a1b3194efa92b549172bea56ec..1ceba5f7eae58426834d7042af17f7e3b1990a56 100644 +index 174c63f2c93693aa06a3574dc6dea91c98ea1e25..e7a8d0d02b49863ee3ad325b8be23bae6d3b861c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1973,12 +1973,31 @@ public final class CraftServer implements Server { +@@ -2024,12 +2024,31 @@ public final class CraftServer implements Server { private final Spigot spigot = new Spigot() { @@ -1833,16 +1793,17 @@ index ad1dcf53040695a1b3194efa92b549172bea56ec..1ceba5f7eae58426834d7042af17f7e3 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 2bd22a369825040c7f5074117d82ae83f07b6096..0000000000000000000000000000000000000000 +index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..0000000000000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null -@@ -1,162 +0,0 @@ +@@ -1,163 +0,0 @@ -package org.bukkit.craftbukkit; - -import java.util.HashMap; -import net.minecraft.server.Entity; -import net.minecraft.server.TileEntity; -import net.minecraft.server.World; +-import net.minecraft.server.WorldDataServer; -import org.bukkit.craftbukkit.scheduler.CraftTask; -import org.bukkit.plugin.java.JavaPluginLoader; -import org.bukkit.scheduler.BukkitTask; @@ -1973,7 +1934,7 @@ index 2bd22a369825040c7f5074117d82ae83f07b6096..00000000000000000000000000000000 - public final CustomTimingsHandler syncChunkLoadPostTimer; - - public WorldTimingsHandler(World server) { -- String name = server.worldData.getName() +" - "; +- String name = ((WorldDataServer) server.worldData).getName() + " - "; - - mobSpawn = new CustomTimingsHandler("** " + name + "mobSpawn"); - doChunkUnload = new CustomTimingsHandler("** " + name + "doChunkUnload"); @@ -2000,10 +1961,10 @@ index 2bd22a369825040c7f5074117d82ae83f07b6096..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index db0bd5cc0acb5523815183ba9c4a8b853a9e9d12..48d1397a6846c64dfa372390783ce66827153bf9 100644 +index 6fcd45c9cf178ce68cfb955b9b3ff5db7fcb22df..a86883ad21710f5f550695dd4a8ef826e2e92240 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1717,6 +1717,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1757,6 +1757,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } @@ -2095,7 +2056,7 @@ index 533c0bc55fc7ac4cc1f493f898a85a6617371031..de332758e03a563a9b72c134332db9e6 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..ce495907f13dd10b5daba521101a78d65a2e8836 100644 +index d85e21b75054067b926ecfee89d62c6dd0744189..9d0d1598bfce2f51998395faf39d8bd2f5d3f9f3 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 @@ @@ -2128,7 +2089,7 @@ index d85e21b75054067b926ecfee89d62c6dd0744189..ce495907f13dd10b5daba521101a78d6 CraftTask() { this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING); } -@@ -51,11 +53,11 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot +@@ -51,7 +53,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot this.id = id; this.period = CraftTask.NO_REPEATING; this.taskName = taskName; @@ -2137,11 +2098,6 @@ index d85e21b75054067b926ecfee89d62c6dd0744189..ce495907f13dd10b5daba521101a78d6 } // Paper end -- CraftTask(final Plugin plugin, final Object task, final int id, final long period) { -+ CraftTask(final Plugin plugin, final Object task, final int id, final long period) { // Paper - this.plugin = plugin; - if (task instanceof Runnable) { - this.rTask = (Runnable) task; @@ -72,7 +74,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot } this.id = id; @@ -2197,7 +2153,7 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae this.value = value; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 68728b4d86c4037fb1907bd16d86df5e23e8fe77..f647450b8c6977b4a6bb1819b34052c4ae2fe0f4 100644 +index 9c5becd4df059f4ce5554e97d27b960e640e2c42..9beaa1574ede9893f3adf782b52c9a70c1a19e09 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -133,6 +133,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -2228,7 +2184,7 @@ index 68728b4d86c4037fb1907bd16d86df5e23e8fe77..f647450b8c6977b4a6bb1819b34052c4 * 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 ca7789b5e0f0baf0a1b0529236d6469b2abae236..4423839697987e255e5a93bdd6742186dde2e4c4 100644 +index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f03dd4aa3 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; diff --git a/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch b/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch index dbef4cb010..2f721262cb 100644 --- a/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch +++ b/Spigot-Server-Patches/0010-Configurable-cactus-and-reed-natural-growth-heights.patch @@ -23,23 +23,23 @@ index a738657394bcccd859ef260a801736d44b234469..098bd3fba867c0e4c6c58748aa6e2e63 + } } diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java -index 1e1d02dc73ea193fca69b26e4c51efd845713d2f..e0974e256f0f10e047b9eb8e362982c6578d2d98 100644 +index 4a3049575ad78e1c75d1b43a35311974c1d489de..13e4517bd04096001ca1caf32b9949abb3cf9c7f 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java -@@ -30,7 +30,7 @@ public class BlockCactus extends Block { - ; - } +@@ -35,7 +35,7 @@ public class BlockCactus extends Block { + ; + } -- if (i < 3) { +- if (i < 3) { + if (i < worldserver.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height - int j = (Integer) iblockdata.get(BlockCactus.AGE); + int j = (Integer) iblockdata.get(BlockCactus.AGE); - if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot + if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java -index 2106b0b49f19f56fd446c2c6cec63526eb74fdb7..55b07444e1d769952f2a411b1b5d1032565af8a1 100644 +index 30282f73d263a96a14bd7bf7d3ac520e315b093a..c051decd19ff763a061822bc2a4b03289dfe3ac7 100644 --- a/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java -@@ -29,7 +29,7 @@ public class BlockReed extends Block { +@@ -35,7 +35,7 @@ public class BlockReed extends Block { ; } diff --git a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch index 7301f8fdb5..7c4a0b52ac 100644 --- a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch @@ -25,27 +25,27 @@ index 098bd3fba867c0e4c6c58748aa6e2e632737a948..912611cf1aeccf5a82a789aab07d7672 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 95d238c82114621cb4e24b4488bba36cb828c241..83d5731b7f964136edf7cfabb96421e0788d067a 100644 +index 5bc0a591ab359785e46648604000eac116e7e37e..b808477cea6bf704edfaf08a2d0366bf263e69aa 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -21,7 +21,7 @@ public class EntityZombie extends EntityMonster { +@@ -21,7 +21,7 @@ import org.bukkit.event.entity.EntityTransformEvent; + public class EntityZombie extends EntityMonster { - protected static final IAttribute d = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance"); private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); - private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE); -+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementModifier, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier babyModifier = this.c; // Paper - remove static - Make baby speed configurable - private static final DataWatcherObject bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); - private static final DataWatcherObject bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); ++ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier babyModifier = this.c; // Paper - remove static - Make baby speed configurable + private static final DataWatcherObject d = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); + private static final DataWatcherObject bv = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); -@@ -129,9 +129,9 @@ public class EntityZombie extends EntityMonster { +@@ -123,9 +123,9 @@ public class EntityZombie extends EntityMonster { if (this.world != null && !this.world.isClientSide) { - AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); + AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); -- attributeinstance.removeModifier(EntityZombie.c); -+ attributeinstance.removeModifier(this.babyModifier); // Paper +- attributemodifiable.removeModifier(EntityZombie.c); ++ attributemodifiable.removeModifier(this.babyModifier); // Paper if (flag) { -- attributeinstance.addModifier(EntityZombie.c); -+ attributeinstance.addModifier(this.babyModifier); // Paper +- attributemodifiable.b(EntityZombie.c); ++ attributemodifiable.b(this.babyModifier); // Paper } } diff --git a/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch b/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch index bd2fd32960..7f0cd9f31c 100644 --- a/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch +++ b/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch @@ -22,17 +22,17 @@ index 912611cf1aeccf5a82a789aab07d76723d4357cc..7d9976ce6bf86e6fdfd0c7770104cee0 + } } diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 7be189f7428886058982774028de6adbd384fafd..40bdcf4e75bb36385e82ba8b8f2471760072705a 100644 +index b0f3b30944b7741ef1d9af21e919ff2df9c510a3..ab8f67c11419cc788fc3cb814d2224e65217dd08 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java -@@ -326,8 +326,9 @@ public class EntityFishingHook extends Entity { - this.aq = MathHelper.nextInt(this.random, 20, 80); +@@ -338,8 +338,9 @@ public class EntityFishingHook extends IProjectile { + this.ap = MathHelper.nextInt(this.random, 20, 80); } } else { -- this.ap = MathHelper.nextInt(this.random, 100, 600); -+ this.ap = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - this.ap -= this.au * 20 * 5; -+ this.ap = Math.max(0, this.ap); // Paper - Don't allow negative values +- this.ao = MathHelper.nextInt(this.random, 100, 600); ++ this.ao = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper + this.ao -= this.av * 20 * 5; ++ this.ao = Math.max(0, this.ao); // Paper - Don't allow negative values; } } diff --git a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index b5c52ae769..10b2a01af5 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -31,43 +31,30 @@ index 2e869004c8c6b8bfbb002fb4eda04519d50390c8..8a6856e0fd7b9b515d98f45aaabefbc3 this.b.setJumping(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 19d68aa4585ccfc156e9db6024b7a99bbeca4de4..2a449ec40a725b01a7bf572ae119c2197944ecbc 100644 +index a25e9ce6d536c8c276750bfd56ac73a2dbaf7202..748193697235755ba778126dd693526ece0bf46d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1104,6 +1104,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1025,6 +1025,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.isInWater() || this.isInRain(); } -+ public boolean isInWaterOrRainOrBubble() { return ay(); } // Paper - OBFHELPER - public boolean ay() { - return this.isInWater() || this.isInRain() || this.l(); ++ public boolean isInWaterOrRainOrBubble() { return aC(); } // Paper - OBFHELPER + public boolean aC() { + return this.isInWater() || this.isInRain() || this.k(); } -diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 1cc66108d0f799eef6ee984e8f65a9a46e337785..538c2169cd53d364b941ad1251df3731f77b3a2c 100644 ---- a/src/main/java/net/minecraft/server/EntityEnderman.java -+++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -171,7 +171,7 @@ public class EntityEnderman extends EntityMonster { - @Override - protected void mobTick() { - if (this.ay()) { -- this.damageEntity(DamageSource.DROWN, 1.0F); -+ this.damageEntity(DamageSource.DROWN, 1.0F); // Paper - copied in patch 13 (allow nerfed mobs to jump, float and take water damage) - } - - if (this.world.isDay() && this.ticksLived >= this.bA + 600) { diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 0b06fa2b664830d40cdb93968bc2f8c98415d1bf..70cd0801dc62dc0b15a75869b375353db8a9ae46 100644 +index e5455d99e3f5607a5754e5760d42853a62dddb82..b9732287ba16d90bed33929348a223f6dbdbfb45 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -33,6 +33,7 @@ public abstract class EntityInsentient extends EntityLiving { private final EntityAIBodyControl c; protected NavigationAbstract navigation; public PathfinderGoalSelector goalSelector; + @Nullable public PathfinderGoalFloat goalFloat; // Paper public PathfinderGoalSelector targetSelector; private EntityLiving goalTarget; - private final EntitySenses bw; -@@ -648,7 +649,17 @@ public abstract class EntityInsentient extends EntityLiving { + private final EntitySenses bv; +@@ -719,7 +720,17 @@ public abstract class EntityInsentient extends EntityLiving { @Override protected final void doTick() { ++this.ticksFarFromPlayer; @@ -84,13 +71,13 @@ index 0b06fa2b664830d40cdb93968bc2f8c98415d1bf..70cd0801dc62dc0b15a75869b375353d + } + // Paper end this.world.getMethodProfiler().enter("sensing"); - this.bw.a(); + this.bv.a(); this.world.getMethodProfiler().exit(); diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index 0f0dc7277f28a96711ab81e6bbf2dd7d1c212f25..43908b0400933119de9bcfe4240853e4fce7ec6f 100644 +index d0281a98a318376922b5bd8fcad7ba7db2012b54..e2b23978e347fe63e8bc900b72da6cbaf27bf652 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -@@ -8,10 +8,12 @@ public class PathfinderGoalFloat extends PathfinderGoal { +@@ -8,15 +8,18 @@ public class PathfinderGoalFloat extends PathfinderGoal { public PathfinderGoalFloat(EntityInsentient entityinsentient) { this.a = entityinsentient; @@ -102,9 +89,7 @@ index 0f0dc7277f28a96711ab81e6bbf2dd7d1c212f25..43908b0400933119de9bcfe4240853e4 + public final boolean validConditions() { return this.a(); } // Paper - OBFHELPER @Override public boolean a() { - double d0 = (double) this.a.getHeadHeight() < 0.4D ? 0.2D : 0.4D; -@@ -19,6 +21,7 @@ public class PathfinderGoalFloat extends PathfinderGoal { - return this.a.isInWater() && this.a.co() > d0 || this.a.aH(); + return this.a.isInWater() && this.a.b((Tag) TagsFluid.WATER) > this.a.cw() || this.a.aN(); } + public void update() { this.e(); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch index 70a3cff149..5ea0976113 100644 --- a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch @@ -30,20 +30,23 @@ index 6d6a68cb1b952da8308ac9ce5b54694bc9ba0e30..2845686411615245137cfe1a155088a8 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 70cd0801dc62dc0b15a75869b375353db8a9ae46..23995b68a17b87b90962c4c12aa37e3a254073b5 100644 +index b9732287ba16d90bed33929348a223f6dbdbfb45..885b97f9397753e7561f113f588b4ca2d5edb0fe 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -630,11 +630,11 @@ public abstract class EntityInsentient extends EntityLiving { - if (entityhuman != null) { - double d0 = entityhuman.h(this); +@@ -698,14 +698,14 @@ public abstract class EntityInsentient extends EntityLiving { + int i = this.getEntityType().e().f(); + int j = i * i; -- if (d0 > 16384.0D) { // CraftBukkit - remove isTypeNotPersistent() check -+ if (d0 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances +- if (d0 > (double) j) { // CraftBukkit - remove isTypeNotPersistent() check ++ if (d0 > (double) world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances this.die(); } -- if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > 1024.0D) { // CraftBukkit - remove isTypeNotPersistent() check + int k = this.getEntityType().e().g(); + int l = k * k; + +- if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > (double) l) { // CraftBukkit - remove isTypeNotPersistent() check + if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > world.paperConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances this.die(); - } else if (d0 < 1024.0D) { + } else if (d0 < (double) l) { this.ticksFarFromPlayer = 0; diff --git a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch index 690cd70b6c..c08cad8b91 100644 --- a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch +++ b/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch @@ -20,10 +20,10 @@ index 2845686411615245137cfe1a155088a865a4d3a0..8ee2b9bb1bce698fce50ac1b3fc477fc + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a126a6d22ccee90d0aadb8513bda60455a703bf6..13a759bc823f12daba3de367255079095b2b6df3 100644 +index 8a7ce347c35e0527471b3b586a248d6497c3b75d..39b276166b1b20804821bd64fff3b7c942e0cfcf 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -142,6 +142,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -157,6 +157,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { }); // CraftBukkit end timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index c505513f05..63ab83a6ac 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -24,10 +24,10 @@ index 8ee2b9bb1bce698fce50ac1b3fc477fcafd0542c..d59b82b7bb1f6d1b231f4e394e0a67a3 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2a449ec40a725b01a7bf572ae119c2197944ecbc..0d617c8e09cf0adf0d7aa8c95fc69c641f91b795 100644 +index 748193697235755ba778126dd693526ece0bf46d..0f40d8505edda1bb01b5212e2d2fdf07fbfa302b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1819,6 +1819,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1762,6 +1762,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(itemstack, 0.0F); } @@ -36,7 +36,7 @@ index 2a449ec40a725b01a7bf572ae119c2197944ecbc..0d617c8e09cf0adf0d7aa8c95fc69c64 public EntityItem a(ItemStack itemstack, float f) { if (itemstack.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 4b4e71bf700f13d9719556d4c07316b93aac0fd2..2097ec535e8a4427fc08da02726044b837d5a716 100644 +index d3e25e3503670804fba67c922c63e0e7f5a9543b..8c51b3060114a24249962c2d6142166ac8600a0a 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -85,6 +85,17 @@ public class EntityFallingBlock extends Entity { @@ -55,10 +55,10 @@ index 4b4e71bf700f13d9719556d4c07316b93aac0fd2..2097ec535e8a4427fc08da02726044b8 + } + // Paper end if (!this.world.isClientSide) { - blockposition = new BlockPosition(this); + blockposition = this.getChunkCoordinates(); boolean flag = this.block.getBlock() instanceof BlockConcretePowder; diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index d042124362e02a6ec634a16610d4a1ed5ef83284..d9fd4448c707aca8e2040a5848387ce76bbee1df 100644 +index 5fca541ca8af4a8ed9ec6dacb3d551048b9efbf4..b5900e1cad8137954d5fa4fde10b4afb64fb6412 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -54,6 +54,12 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index d05ca8da1b..5610d325b3 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index 3f35a28ba15f4d0dfe1cb2b56f621e81b1fb8c99..cf00f35a5b7c2d2f6b6989e0855de8b882dcef50 100644 +index aab33df7a36eb69300fedfce733985d6c239ca01..550232cb3819138b3bae0fa1c51429485e8bc593 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -70,7 +70,7 @@ public class EULA { @@ -19,10 +19,10 @@ index 3f35a28ba15f4d0dfe1cb2b56f621e81b1fb8c99..cf00f35a5b7c2d2f6b6989e0855de8b8 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5429d8eee93980a01cdf008b57e88e1dccc1ef67..b6912f97c2240b0524735e0f8d1937f2e76dba5b 100644 +index a7579b01d27e367603ba643c390b316bcd9b492b..bcf84fb1edda703f263a96d5ae2f3c7a3707c1ae 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1348,7 +1348,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances + if (entityhuman != null) { + double d0 = entityhuman.h((Entity) this); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java -index 102b3a3c48799e44de760da48425fef9c5278771..08c2a22f7a01df21532e1949ea9d51f78a611cee 100644 +index f9ae1ffbff3a813226b2081c79abf3b92d07754d..29c0a9c36a1f6727fb9485ab41e04f7dc9db1fe5 100644 --- a/src/main/java/net/minecraft/server/EntitySilverfish.java +++ b/src/main/java/net/minecraft/server/EntitySilverfish.java -@@ -99,7 +99,7 @@ public class EntitySilverfish extends EntityMonster { +@@ -95,7 +95,7 @@ public class EntitySilverfish extends EntityMonster { if (d(entitytypes, generatoraccess, enummobspawn, blockposition, random)) { EntityHuman entityhuman = generatoraccess.a((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0D, true); @@ -44,11 +44,85 @@ index 102b3a3c48799e44de760da48425fef9c5278771..08c2a22f7a01df21532e1949ea9d51f7 } else { return false; } +diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java +index c469b5db81fb040fc27cd2e4f7cd61797f56a62d..48e8b005bd9589135eff03a110ecce8776ab208a 100644 +--- a/src/main/java/net/minecraft/server/IEntityAccess.java ++++ b/src/main/java/net/minecraft/server/IEntityAccess.java +@@ -75,8 +75,9 @@ public interface IEntityAccess { + } + } + +- @Nullable +- default EntityHuman a(double d0, double d1, double d2, double d3, @Nullable Predicate predicate) { ++ default EntityHuman findNearbyPlayer(Entity entity, double d0, @Nullable Predicate predicate) { return this.findNearbyPlayer(entity.locX(), entity.locY(), entity.locZ(), d0, predicate); } // Paper ++ @Nullable default EntityHuman findNearbyPlayer(double d0, double d1, double d2, double d3, @Nullable Predicate predicate) { return a(d0, d1, d2, d3, predicate); } // Paper - OBFHELPER ++ @Nullable default EntityHuman a(double d0, double d1, double d2, double d3, @Nullable Predicate predicate) { // Paper + double d4 = -1.0D; + EntityHuman entityhuman = null; + Iterator iterator = this.getPlayers().iterator(); +@@ -109,6 +110,27 @@ public interface IEntityAccess { + return this.a(d0, d1, d2, d3, predicate); + } + ++ // Paper end ++ default boolean isAffectsSpawningPlayerNearby(double d0, double d1, double d2, double d3) { ++ Iterator iterator = this.getPlayers().iterator(); ++ double d4; ++ do { ++ EntityHuman entityhuman; ++ do { ++ if (!iterator.hasNext()) { ++ return false; ++ } ++ ++ entityhuman = (EntityHuman) iterator.next(); ++ } while (!IEntitySelector.affectsSpawning.test(entityhuman)); ++ ++ d4 = entityhuman.g(d0, d1, d2); ++ } while (d3 >= 0.0D && d4 >= d3 * d3); ++ ++ return true; ++ } ++ // Paper end ++ + default boolean isPlayerNearby(double d0, double d1, double d2, double d3) { + Iterator iterator = this.getPlayers().iterator(); + +diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java +index 37ece74b4265a6f555d2550df7dade416bc7ef84..ed7566591bac72d17b40a940531b7feb1cb8f392 100644 +--- a/src/main/java/net/minecraft/server/IEntitySelector.java ++++ b/src/main/java/net/minecraft/server/IEntitySelector.java +@@ -24,6 +24,12 @@ public final class IEntitySelector { + return !entity.isSpectator(); + }; + ++ // Paper start ++ public static final Predicate affectsSpawning = (entity) -> { ++ return !entity.isSpectator() && entity.isAlive() && (entity instanceof EntityPlayer) && ((EntityPlayer) entity).affectsSpawning; ++ }; ++ // Paper end ++ + public static Predicate a(double d0, double d1, double d2, double d3) { + double d4 = d3 * d3; + +diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +index 4f7dc23d67e97f9a2b8983750299fc43b0ed6db9..a4a48dbee002e96a5644d9a033f9f233cc9a6b46 100644 +--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java ++++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +@@ -49,7 +49,7 @@ public abstract class MobSpawnerAbstract { + private boolean h() { + BlockPosition blockposition = this.b(); + +- return this.a().isPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange); ++ return this.a().isAffectsSpawningPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange); // Paper + } + + public void c() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 48d1397a6846c64dfa372390783ce66827153bf9..2d3f3a2b7f4e6acdf8043befb584fc0752b1ba3a 100644 +index a86883ad21710f5f550695dd4a8ef826e2e92240..f6da0875d944d89d047bb44c47b51337b15f91a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1625,7 +1625,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1665,7 +1665,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return getHandle().locale; diff --git a/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch index 4d5d2ed9a7..92005b1f0d 100644 --- a/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/0021-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 43dc791191cdf2aa3e5cb2768c25e6be4b2cf6b1..ef779879e33c2f64c325afd3cd411032fb0d63f9 100644 +index 09b4594ae6750252b4b13ed4735dad0d00e2aeec..a803d1093dfa7c7421eda913679766224fda6dcf 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -607,6 +607,10 @@ public class Chunk implements IChunkAccess { +@@ -608,6 +608,10 @@ public class Chunk implements IChunkAccess { } // CraftBukkit start diff --git a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch index a6d738ce95..976618f7f4 100644 --- a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 35f4dc75fbc7cccc80453f279a08b286ab32a25a..eb2b6ff8fd86233c434882c69a8890adc9861d4b 100644 +index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..cc15686573f3a54ff0145b3486679b772157d191 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -91,7 +91,7 @@ index 35f4dc75fbc7cccc80453f279a08b286ab32a25a..eb2b6ff8fd86233c434882c69a8890ad int newPower = Math.max(0, Math.min(15, this.viewingCount)); diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java -index 68737be5e67b52cb1f9f526b58b589ecba14dd6b..ea2d5cdd38b305563e9f979887eb455095928ec9 100644 +index b37a705e49f64b46c2256a1b6b077c67fa240b0f..9d03a9ae7fe85fdd0550f737246eef2688a51c8e 100644 --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java @@ -1,6 +1,6 @@ diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index c772b6e1b5..c13f34b580 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b6912f97c2240b0524735e0f8d1937f2e76dba5b..c61037c837e29544e3afeb0b23f422073d3f5166 100644 +index bcf84fb1edda703f263a96d5ae2f3c7a3707c1ae..a0055b2c27179fea9f09d6a70931a8f00d03413a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -160,7 +160,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public File bukkitDataPackFolder; -@@ -170,7 +170,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { @@ -101,10 +101,10 @@ index 5406f4c40f86e74f8ed4e7e986b23d19141ddc30..d778eac45de775cf4058621fadb55b1b if (i >= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4ab77e8dc0f918bd4f069a0f886d04dea473f046..f8c9e90d2e5bb60795f7957786e56168ff7bf11c 100644 +index 2b39fb903c1cf6ded8aa170f5bd25f4fadb1195a..db3b35eac5584b8319fc0d4cbb28408b2d0f620b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1166,6 +1166,11 @@ public class WorldServer extends World { +@@ -1088,6 +1088,11 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.navigators.add(((EntityInsentient) entity).getNavigation()); } entity.valid = true; // CraftBukkit @@ -117,10 +117,10 @@ index 4ab77e8dc0f918bd4f069a0f886d04dea473f046..f8c9e90d2e5bb60795f7957786e56168 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 9672dd7c2166bba88832b1743b97e16561fe434c..3e8ea3a94d0547afc7de4f7b5cd901e93028808d 100644 +index e867168be3c17548490f30944ca56a635cc3b054..19669d7354d8cfa723e614ac3b471e703ee7feee 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1008,4 +1008,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1016,4 +1016,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return spigot; } // Spigot end diff --git a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch index e20b49e3fd..a92359de73 100644 --- a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index fa6400dccd4df635d696e0858c0c164a0f19b4a4..e2f3cec7420edbd284b531ca7d1d121459fc098c 100644 +index 03c6a1c95daaa25208917d6985594eb5f182e8e1..ab0f9a9d69c801e47002039c41c7c3393fc2f403 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -194,7 +194,12 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -23,10 +23,10 @@ index fa6400dccd4df635d696e0858c0c164a0f19b4a4..e2f3cec7420edbd284b531ca7d1d1214 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 13a759bc823f12daba3de367255079095b2b6df3..12e57818687fe359e752f29f2c7d038c2e4a512f 100644 +index 39b276166b1b20804821bd64fff3b7c942e0cfcf..56d7cf4478a544677a1c537bcd1955913ab83ec5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -665,11 +665,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -718,11 +718,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.exit(); } catch (Throwable throwable) { @@ -45,7 +45,7 @@ index 13a759bc823f12daba3de367255079095b2b6df3..12e57818687fe359e752f29f2c7d038c } // Spigot start finally { -@@ -735,11 +737,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -788,11 +790,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { consumer.accept(entity); } catch (Throwable throwable) { diff --git a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch index 5eebd91e1b..2e1865aac7 100644 --- a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch @@ -29,10 +29,10 @@ index d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedbe247a0cd 100644 +index 15a7c8c01ad27ad25eec8cb59c20e9fe4e0f0ba6..71f2234fd430ee219da6b3d10b8e679aeac9455c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -406,9 +406,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -421,9 +421,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance *= 0.5F; } @@ -41,7 +41,7 @@ index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedb + // Extracted to own function + /* if (this.locY() < -64.0D) { - this.af(); + this.ai(); } + */ + this.performVoidDamage(); @@ -49,15 +49,15 @@ index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedb if (!this.world.isClientSide) { this.setFlag(0, this.fireTicks > 0); -@@ -418,6 +425,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -433,6 +440,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.getMethodProfiler().exit(); } + // Paper start + protected void performVoidDamage() { -+ if (this.locY < -64.0D || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER ++ if (this.locY() < -64.0D || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER + && world.paperConfig.doNetherTopVoidDamage() -+ && this.locY >= world.paperConfig.netherVoidTopDamageHeight)) { ++ && this.locY() >= world.paperConfig.netherVoidTopDamageHeight)) { + + this.doVoidDamage(); + } @@ -67,19 +67,19 @@ index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedb protected void E() { if (this.portalCooldown > 0) { --this.portalCooldown; -@@ -493,6 +511,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - this.fireTicks = 0; +@@ -508,6 +526,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.setFireTicks(0); } -+ protected final void doVoidDamage() { this.af(); } // Paper - OBFHELPER - protected void af() { ++ protected final void doVoidDamage() { this.ai(); } // Paper - OBFHELPER + protected void ai() { this.die(); } diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index e4d1f37f9f93a62602753e82caa128111abeec4d..c2843d5d607c3d19806b673c76289a8bee035e70 100644 +index cb25cf3bb7be041d9b135165b6f66b5c232a2553..9124d00521463157df6348b84260f91a47e1f076 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -@@ -210,9 +210,15 @@ public abstract class EntityMinecartAbstract extends Entity { +@@ -285,9 +285,15 @@ public abstract class EntityMinecartAbstract extends Entity { this.setDamage(this.getDamage() - 1.0F); } @@ -87,7 +87,7 @@ index e4d1f37f9f93a62602753e82caa128111abeec4d..c2843d5d607c3d19806b673c76289a8b + // Extracted to own function + /* if (this.locY() < -64.0D) { - this.af(); + this.ai(); } + */ + this.performVoidDamage(); diff --git a/Spigot-Server-Patches/0028-Check-online-mode-before-converting-and-renaming-pla.patch b/Spigot-Server-Patches/0028-Check-online-mode-before-converting-and-renaming-pla.patch index 3e7ef83690..d9176841a6 100644 --- a/Spigot-Server-Patches/0028-Check-online-mode-before-converting-and-renaming-pla.patch +++ b/Spigot-Server-Patches/0028-Check-online-mode-before-converting-and-renaming-pla.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Check online mode before converting and renaming player data diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index 97bac7d2579a8b895d76082c6575491b83411298..a0254d8e519fa8b19dc282f3abf33b8ebe4f0aba 100644 +index 240f9331dca65990f5e724b88050342831868e72..ef9719bf20db92a7e6690bccb00cc54293d392a9 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java -@@ -164,7 +164,7 @@ public class WorldNBTStorage implements IPlayerFileData { +@@ -50,7 +50,7 @@ public class WorldNBTStorage { File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat"); // Spigot Start boolean usingWrongFile = false; - if ( !file.exists() ) + if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first { - file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); + file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); if ( file.exists() ) diff --git a/Spigot-Server-Patches/0029-Always-tick-falling-blocks.patch b/Spigot-Server-Patches/0029-Always-tick-falling-blocks.patch index daf6c75abd..f663925974 100644 --- a/Spigot-Server-Patches/0029-Always-tick-falling-blocks.patch +++ b/Spigot-Server-Patches/0029-Always-tick-falling-blocks.patch @@ -5,7 +5,7 @@ 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 4423839697987e255e5a93bdd6742186dde2e4c4..f86404f83ae605159307a3ad2cca6c6c314a01af 100644 +index 2b00258ccd808e3332af5ab3f7e4967f03dd4aa3..78f0fb5d97b077673ec542cd70bbc3ffa13f916c 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; diff --git a/Spigot-Server-Patches/0030-Configurable-end-credits.patch b/Spigot-Server-Patches/0030-Configurable-end-credits.patch index b07c0149f9..8680df6f7d 100644 --- a/Spigot-Server-Patches/0030-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0030-Configurable-end-credits.patch @@ -20,23 +20,23 @@ index f7a0a33e49cadf9b2bd43f118c106937760da762..50dec5cb5e924301842300e8fc80cb67 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 26e32aa1dbd6de0ba971c32f8daef0d92d65b683..cd09b207c963d81c9302067e0294db57e3ffd0f7 100644 +index 2f3fe374070a3743931ac0c68c949cded4da085a..f768c6450f5224507fd6b2251de14cc59227d1a9 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - private long cj = SystemUtils.getMonotonicMillis(); + private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -- private boolean cm; -+ private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER - private final RecipeBookServer recipeBook; - private Vec3D co; - private int cp; -@@ -695,6 +695,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +- private boolean ck; ++ private boolean ck; private void setHasSeenCredits(boolean has) { this.ck = has; } // Paper - OBFHELPER + private final RecipeBookServer recipeBook = new RecipeBookServer(); + private Vec3D cm; + private int cn; +@@ -752,6 +752,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.getWorldServer().removePlayer(this); if (!this.viewingCredits) { this.viewingCredits = true; + if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits - this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cm ? 0.0F : 1.0F)); - this.cm = true; + this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.e, this.ck ? 0.0F : 1.0F)); + this.ck = true; } diff --git a/Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch b/Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch index 0a4db8807d..99d0d82ee8 100644 --- a/Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch +++ b/Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch @@ -5,27 +5,20 @@ Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index eb7b8d94c83c3f3be0a7f019dad7dd87da5347fe..a063d1bfaa1acd20a5de9701eef028a543235d5e 100644 +index 692625d9f80b6e98ba4bb6c94c71e6b59ba36d6a..bf156897acfe25c16a1b09a83a00ba3ab647a2dd 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java -@@ -151,7 +151,14 @@ public class Explosion { - int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D); - int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D); - int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D); +@@ -153,7 +153,7 @@ public class Explosion { + int i1 = MathHelper.floor(this.posY + (double) f2 + 1.0D); + int j1 = MathHelper.floor(this.posZ - (double) f2 - 1.0D); + int k1 = MathHelper.floor(this.posZ + (double) f2 + 1.0D); - List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1)); -+ // Paper start - Fix lag from explosions processing dead entities -+ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { -+ @Override -+ public boolean apply(Entity entity) { -+ return IEntitySelector.canAITarget().test(entity) && !entity.dead; -+ } -+ }); -+ // Paper end ++ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), (com.google.common.base.Predicate) entity -> IEntitySelector.canAITarget().test(entity) && !entity.dead); // Paper - Fix lag from explosions processing dead entities Vec3D vec3d = new Vec3D(this.posX, this.posY, this.posZ); for (int l1 = 0; l1 < list.size(); ++l1) { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index c75ed9ddc14e1fd3b57a7c989267bf5a0bb6157a..c1f462d9d3eefdab767bea28da484bfb1dfda06a 100644 +index ed7566591bac72d17b40a940531b7feb1cb8f392..d7e3580067bcbca09b66f05f02e8736863bd7ef5 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -14,6 +14,7 @@ public final class IEntitySelector { diff --git a/Spigot-Server-Patches/0032-Optimize-explosions.patch b/Spigot-Server-Patches/0032-Optimize-explosions.patch index 52e8789495..2524e78f79 100644 --- a/Spigot-Server-Patches/0032-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0032-Optimize-explosions.patch @@ -25,10 +25,10 @@ index 50dec5cb5e924301842300e8fc80cb671b6b9173..f038d3f7dc7d1034a3ee9f2384a85642 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index a063d1bfaa1acd20a5de9701eef028a543235d5e..5583860f152aadcbe74bf7b99e7efd8e47cefa35 100644 +index bf156897acfe25c16a1b09a83a00ba3ab647a2dd..842563f2030382659a62a3a63d9af9d5a58e3d85 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java -@@ -177,7 +177,7 @@ public class Explosion { +@@ -172,7 +172,7 @@ public class Explosion { d8 /= d11; d9 /= d11; d10 /= d11; @@ -37,7 +37,7 @@ index a063d1bfaa1acd20a5de9701eef028a543235d5e..5583860f152aadcbe74bf7b99e7efd8e double d13 = (1.0D - d7) * d12; // CraftBukkit start -@@ -384,4 +384,84 @@ public class Explosion { +@@ -391,4 +391,84 @@ public class Explosion { private Effect() {} } @@ -123,22 +123,22 @@ index a063d1bfaa1acd20a5de9701eef028a543235d5e..5583860f152aadcbe74bf7b99e7efd8e + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c61037c837e29544e3afeb0b23f422073d3f5166..a67c31a6021d881b49cfdb75f514404c342eea45 100644 +index a0055b2c27179fea9f09d6a70931a8f00d03413a..cc3718765ed54f8042a2687e409a51098ebc67a0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1184,6 +1184,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant trackedPlayers; @@ -49,7 +49,7 @@ index a75e0ec54e9dfd98c1bcbd13cb022ab05d8410b9..a13fd9b3404381879663c1f694a5d190 this.trackedPlayers = trackedPlayers; // CraftBukkit end this.m = Vec3D.a; -@@ -159,7 +175,25 @@ public class EntityTrackerEntry { +@@ -161,7 +177,25 @@ public class EntityTrackerEntry { } if (packet1 != null) { @@ -77,10 +77,10 @@ index a75e0ec54e9dfd98c1bcbd13cb022ab05d8410b9..a13fd9b3404381879663c1f694a5d190 this.c(); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 65134c87772cb6d4d732fc223929cfda7524dde2..eece2f689cce58a35d33c6e8d9d56ea4e9dfd88c 100644 +index d40d7f18a44bb70f8867617b5afec8492e1fbfcb..0bff7dbbb717b51208f581c129d1cc1ff417969f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1220,10 +1220,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1249,10 +1249,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final Entity tracker; private final int trackingDistance; private SectionPosition e; @@ -97,7 +97,7 @@ index 65134c87772cb6d4d732fc223929cfda7524dde2..eece2f689cce58a35d33c6e8d9d56ea4 this.tracker = entity; this.trackingDistance = i; this.e = SectionPosition.a(entity); -@@ -1305,7 +1309,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1334,7 +1338,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); // CraftBukkit end diff --git a/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch index 81f607b50f..6b397633d8 100644 --- a/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BeaconEffectEvent diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java -index 536afe531278e8f6f1ab730c875346c8a624486b..df2d6c3b070c2fc106fa2942959ef21b3511f0ee 100644 +index b9aa63e6c38f6b023da5e9865ba1f74f931cc7af..2858ea1f3eb44ea2cc6b11454b8e94bca4ab0568 100644 --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java @@ -14,6 +14,11 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil; @@ -20,7 +20,7 @@ index 536afe531278e8f6f1ab730c875346c8a624486b..df2d6c3b070c2fc106fa2942959ef21b public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable { -@@ -242,14 +247,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic +@@ -240,14 +245,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic } private void applyEffect(List list, MobEffectList effects, int i, int b0) { @@ -53,7 +53,7 @@ index 536afe531278e8f6f1ab730c875346c8a624486b..df2d6c3b070c2fc106fa2942959ef21b } } } -@@ -272,10 +294,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic +@@ -270,10 +292,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic int i = getLevel(); List list = getHumansInRange(); diff --git a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch index 12dd86313d..0b1d40e226 100644 --- a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch @@ -19,10 +19,10 @@ index 428deed56dae597291670bea8c8a6a67ce4d940f..a4da22ea65d5fdba38f8dc331919088f + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index cd09b207c963d81c9302067e0294db57e3ffd0f7..64635fe70f37cecdf4344661c28768f6ac16fdd2 100644 +index f768c6450f5224507fd6b2251de14cc59227d1a9..4027dc7159d3ef93b6123e548520b45534589933 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -72,6 +72,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -76,6 +76,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean e; public int ping; public boolean viewingCredits; @@ -30,7 +30,7 @@ index cd09b207c963d81c9302067e0294db57e3ffd0f7..64635fe70f37cecdf4344661c28768f6 // CraftBukkit start public String displayName; -@@ -355,7 +356,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -398,7 +399,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { --this.noDamageTicks; } diff --git a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch index 4d8b8b4b6f..c30c8fd378 100644 --- a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ea27e1fd62ff38fc92e914eb659e29ac836c2b45..8c0cabd9b3d5315c319a4ef7eda9fce688c22584 100644 +index 6a13f4a4d40177e5ef8c0ae00ca54d1ffb9b221c..54143a64c4c41d7bdc3476f676ea45143b3e98ca 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -635,9 +635,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -688,9 +688,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // Spigot start // Iterator iterator = this.tileEntityListTick.iterator(); int tilesThisCycle = 0; diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch index 973a105a91..78170682aa 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch @@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and improve setPosition to use raw diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c759dd0f9a66dc2fa30746132564a0981037f265..6f11111f413914856e6a3622512f00f8a49cdfa2 100644 +index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1e942e8ef 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -119,14 +119,14 @@ public abstract class PlayerList { +@@ -143,14 +143,14 @@ public abstract class PlayerList { // Spigot start - spawn location event Player bukkitPlayer = entityplayer.getBukkitEntity(); diff --git a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch index f03361ec15..6cfac5dd48 100644 --- a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch +++ b/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch @@ -20,10 +20,10 @@ index a4da22ea65d5fdba38f8dc331919088f9ca99aed..345ac63e281bb3372b2ae879d587d658 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 033cb78d91d522b356fea85e66b33de2224f8fe2..72fb92f7c379cb84425b6b03ddf8aad29388c0ae 100644 +index 1441d096d44ea653539ba20ccda94eb62ffc32df..eddf67805ad472cfdd45c1f3c6068b0530cae97d 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -267,6 +267,11 @@ public class BlockChest extends BlockChestAbstract implements I +@@ -268,6 +268,11 @@ public class BlockChest extends BlockChestAbstract implements I } private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) { diff --git a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch index 91fb60a590..5d4fc3d366 100644 --- a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch @@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 87119b4fe5ae27c63d272c8e436e3734eddd8f68..2e24d5ba85d7938a9ffe2339fa22c19ee5362b5f 100644 +index 890b0fc7baf51ed6896d979021b3956c5c279c40..b468182266c39b9defa1aa287290f75f7db44b9a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1570,6 +1570,29 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1614,6 +1614,29 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (!async && s.startsWith("/")) { @@ -48,10 +48,10 @@ index 87119b4fe5ae27c63d272c8e436e3734eddd8f68..2e24d5ba85d7938a9ffe2339fa22c19e } 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 99083a1f36f95a4fb3d67f903d02b84d6ebae3d2..697246492a4bf31e84ce3d9f4e35c46f54b7eb7d 100644 +index 40019f276abea084b15386f00bde1bfdd5fdae77..c63d1468d2908db75176c5926a46293f5b94b6b2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -720,6 +720,29 @@ public final class CraftServer implements Server { +@@ -744,6 +744,29 @@ public final class CraftServer implements Server { Validate.notNull(commandLine, "CommandLine cannot be null"); org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot diff --git a/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch index 99c268a3a9..e71531ace5 100644 --- a/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -19,15 +19,15 @@ index 345ac63e281bb3372b2ae879d587d658243581ba..62e793b71b313146b86b466421e7a5f8 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index 8e8526f371ec967862891e371faa0e4b9c2c11c3..3ecf732192f7f1bd20b9d766bedef08e64434fda 100644 +index 8e958367fb0873b26cb01c5a38e24650b0527be8..9c83389c56083d9febf604bf30da47c89330902e 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java -@@ -289,7 +289,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { - } +@@ -285,7 +285,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { + } - ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition); -- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot -+ boolean flag = generatoraccess.getMinecraftWorld().paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper + ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition); +- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, ((GeneratorAccessSeed) generatoraccess).getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot ++ boolean flag = generatoraccess.getMinecraftWorld().paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, ((GeneratorAccessSeed) generatoraccess).getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - if (random.nextInt(10) == 0 && flag && blockposition.getY() < 40) { - return a(entitytypes, generatoraccess, enummobspawn, blockposition, random); + if (random.nextInt(10) == 0 && flag && blockposition.getY() < 40) { + return a(entitytypes, generatoraccess, enummobspawn, blockposition, random); diff --git a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch index 713d410089..25ec127d7d 100644 --- a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0046-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 697246492a4bf31e84ce3d9f4e35c46f54b7eb7d..1cf8fd93a45fb76fc1638c7fd8751314d4c813e3 100644 +index c63d1468d2908db75176c5926a46293f5b94b6b2..15ee6ee6e96bb48f73cbb2944eeee8f726914e2d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1629,6 +1629,7 @@ public final class CraftServer implements Server { +@@ -1680,6 +1680,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0047-Be-a-bit-more-informative-in-maxHealth-exception.patch b/Spigot-Server-Patches/0047-Be-a-bit-more-informative-in-maxHealth-exception.patch index 734e22a132..b65a8a7549 100644 --- a/Spigot-Server-Patches/0047-Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/Spigot-Server-Patches/0047-Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 6146db18416785a06f86a3118329b33adde9c5f8..966d23add13a3139adead8f8969c0a4ff34929c6 100644 +index 28151d15372ea30d308fedda502427a4ba161cd0..20ada1ab2bea9fa5bde19cb4768d64f73a4154d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -106,7 +106,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -107,7 +107,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setHealth(double health) { health = (float) health; if ((health < 0) || (health > getMaxHealth())) { diff --git a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch index e78636a761..09675053d0 100644 --- a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index cf89622a8b56ddcff1ba09dfb3fbd1b4c3c4677e..fb97c51bb1a4cabc6b67d8f74a5f0b6e0fb6052c 100644 +index 89dae553392206abb8b3a7be6c807f97cb60ddac..fd3e6cda6a0e7154c50608ba9a4b70f3c43c8f2a 100644 --- a/src/main/java/net/minecraft/server/IChatBaseComponent.java +++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java -@@ -439,6 +439,7 @@ public interface IChatBaseComponent extends Message, Iterable tileEntityList = Lists.newArrayList(); public final List tileEntityListTick = Lists.newArrayList(); protected final List tileEntityListPending = Lists.newArrayList(); - protected final List tileEntityListUnload = Lists.newArrayList(); + protected final java.util.Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); public final Thread serverThread; - private int c; - protected int i = (new Random()).nextInt(); + private final boolean debugWorld; + private int d; diff --git a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch index 6202101695..df8c488a2d 100644 --- a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch @@ -7,10 +7,10 @@ Establishes base extension of profile systems for future edits too diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java new file mode 100644 -index 0000000000000000000000000000000000000000..00b7630ccb2be7a78ab5471c8e8bdcd5a92209a0 +index 0000000000000000000000000000000000000000..d73de9eb89c4e3a748907f2da21a3072cc6b7f41 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -@@ -0,0 +1,294 @@ +@@ -0,0 +1,296 @@ +package com.destroystokyo.paper.profile; + +import com.destroystokyo.paper.PaperConfig; @@ -194,13 +194,15 @@ index 0000000000000000000000000000000000000000..00b7630ccb2be7a78ab5471c8e8bdcd5 + public boolean complete(boolean textures, boolean onlineMode) { + MinecraftServer server = MinecraftServer.getServer(); + -+ boolean isCompleteFromCache = this.completeFromCache(false, onlineMode); ++ boolean isCompleteFromCache = this.completeFromCache(true, onlineMode); + if (onlineMode && (!isCompleteFromCache || textures && !hasTextures())) { + GameProfile result = server.getSessionService().fillProfileProperties(profile, true); + if (result != null) { + copyProfileProperties(result, this.profile, true); + } -+ server.getUserCache().saveProfile(this.profile); ++ if (this.profile.isComplete()) { ++ server.getUserCache().saveProfile(this.profile); ++ } + } + return profile.isComplete() && (!onlineMode || !textures || hasTextures()); + } From 8269101af0c6a48c8c51f4cef17e58eafc52ce1d Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Thu, 25 Jun 2020 04:00:35 -0700 Subject: [PATCH 06/95] more progress --- ...dd-configurable-portal-search-radius.patch | 26 +++--- .../0052-Add-velocity-warnings.patch | 8 +- ...ble-inter-world-teleportation-safety.patch | 8 +- .../0054-Add-exception-reporting-event.patch | 77 ++++++++--------- ...oreboards-for-non-players-by-default.patch | 8 +- ...working-with-arrows-stuck-in-living-.patch | 4 +- .../0058-Complete-resource-pack-API.patch | 10 +-- .../0059-Chunk-Save-Reattempt.patch | 10 +-- ...ading-permissions.yml-before-plugins.patch | 6 +- ...llow-Reloading-of-Custom-Permissions.patch | 4 +- .../0062-Remove-Metadata-on-reload.patch | 4 +- .../0063-Undead-horse-leashing.patch | 35 ++++++-- ...064-Handle-Item-Meta-Inconsistencies.patch | 42 +++++----- ...urable-Non-Player-Arrow-Despawn-Rate.patch | 6 +- .../0066-Add-World-Util-Methods.patch | 10 +-- ...7-Custom-replacement-for-eaten-items.patch | 8 +- ...th-absorb-values-and-repair-bad-data.patch | 16 ++-- ...070-Use-a-Shared-Random-for-Entities.patch | 14 ++-- ...le-spawn-chances-for-skeleton-horses.patch | 4 +- ...Location-getType-and-getBlockData-fo.patch | 53 ++++++------ ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 45 +++++----- ...Entity-AddTo-RemoveFrom-World-Events.patch | 6 +- ...75-Configurable-Chunk-Inhabited-Time.patch | 4 +- .../0076-EntityPathfindEvent.patch | 28 +++---- ...egionFileCache-and-make-configurable.patch | 4 +- ...8-Do-not-load-chunks-for-Pathfinding.patch | 83 +++++++++---------- ...0079-Add-PlayerUseUnknownEntityEvent.patch | 6 +- ...dDebugInfo-not-initialized-on-client.patch | 4 +- ...-Configurable-Grass-Spread-Tick-Rate.patch | 4 +- ...g-BlockPlaceEvent-triggering-physics.patch | 4 +- ...83-Remove-Debug-checks-from-DataBits.patch | 55 +++++------- ...nilla-per-world-scoreboard-coloring-.patch | 4 +- ...nd-for-setting-passengers-on-players.patch | 4 +- ...Remove-unused-World-Tile-Entity-List.patch | 24 +++--- .../0087-Don-t-tick-Skulls-unused-code.patch | 10 +-- .../0088-Configurable-Player-Collision.patch | 22 ++--- ...ent-to-allow-plugins-to-handle-clien.patch | 25 ++++-- .../0090-Configurable-RCON-IP-address.patch | 26 +++--- ...091-Prevent-Fire-from-loading-chunks.patch | 45 +++++----- ...92-Implement-PlayerLocaleChangeEvent.patch | 43 ++++------ ...ityRegainHealthEvent-isFastRegen-API.patch | 6 +- ...-to-configure-frosted_ice-properties.patch | 23 +++-- ...-possibility-for-getServer-singleton.patch | 24 +++--- ...item-frames-performance-and-bug-fixe.patch | 34 ++++---- ...-API-Replenishable-Lootables-Feature.patch | 42 ++++++---- .../0100-Optimize-UserCache-Thread-Safe.patch | 18 ++-- ...blocking-on-Network-Manager-creation.patch | 8 +- ...2-Optional-TNT-doesn-t-move-in-water.patch | 17 ++-- ...r-redstone-torch-rapid-clock-removal.patch | 38 ++++----- ...on-Wither-Death-sounds-to-same-world.patch | 42 +++++----- .../0106-Fix-Double-World-Add-issues.patch | 4 +- .../0107-Fix-Old-Sign-Conversion.patch | 24 +++--- ...e-profiles-that-have-no-UUID-and-no-.patch | 4 +- ...etting-for-proxy-online-mode-status.patch} | 8 +- ...mative-vehicle-moved-wrongly-message.patch | 19 ----- 55 files changed, 548 insertions(+), 562 deletions(-) rename Spigot-Server-Patches/{0110-Add-setting-for-proxy-online-mode-status.patch => 0109-Add-setting-for-proxy-online-mode-status.patch} (90%) delete mode 100644 Spigot-Server-Patches/0109-More-informative-vehicle-moved-wrongly-message.patch diff --git a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch index cf0740eeee..6851d93b28 100644 --- a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch @@ -21,35 +21,33 @@ index 62e793b71b313146b86b466421e7a5f894bef9df..cd47a4ca069df26969de3051c2aac805 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 94b74e0c0eb9495f9b2cb066c86bdedbe247a0cd..65a421ee6f704af88ba2170930d17b46a9531c28 100644 +index 71f2234fd430ee219da6b3d10b8e679aeac9455c..bfdb57ff56df5d025a7bba9558682089a557c7c9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2582,7 +2582,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2503,7 +2503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke blockposition = new BlockPosition(d0, this.locY(), d1); // CraftBukkit start -- EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver1, blockposition, 128); -+ EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver1, blockposition, world.paperConfig.portalSearchRadius); // Paper - use portal search radius +- EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver, blockposition, 128); ++ EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver, blockposition, worldserver.paperConfig.portalSearchRadius); // Paper - use portal search radius if (event == null) { return null; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 64635fe70f37cecdf4344661c28768f6ac16fdd2..540048627ef5716be2c9115b162a6eeaf9951ad9 100644 +index 4027dc7159d3ef93b6123e548520b45534589933..326cbeee1ba59b585a59c3c402cf6d920c88ac13 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -755,7 +755,9 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -817,7 +817,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // CraftBukkit start Location enter = this.getBukkitEntity().getLocation(); - Location exit = (worldserver1 == null) ? null : new Location(worldserver1.getWorld(), d0, d1, d2, f1, f); -- PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, 128, true, dimensionmanager.getType() == DimensionManager.THE_END ? 0 : 16); -+ int configuredSearchRadius = (worldserver1 == null ? worldserver : worldserver1).paperConfig.portalSearchRadius; -+ int configuredCreateRadius = (worldserver1 == null ? worldserver : worldserver1).paperConfig.portalCreateRadius; -+ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, configuredSearchRadius, true, dimensionmanager.getType() == DimensionManager.THE_END ? 0 : configuredCreateRadius); // Paper - configurable portal search radius + Location exit = (worldserver == null) ? null : new Location(worldserver.getWorld(), d0, d1, d2, f1, f); +- PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, 128, true, resourcekey == World.THE_END ? 0 : 16); ++ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, worldserver.paperConfig.portalSearchRadius, true, resourcekey == World.THE_END ? 0 : worldserver.paperConfig.portalCreateRadius); Bukkit.getServer().getPluginManager().callEvent(event); if (event.isCancelled() || event.getTo() == null) { return null; diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java -index 19c54f1dde60feb2e8deedc83940c778500401eb..f84dd6d9bec4c0f2f741bab20a4f45884594da2d 100644 +index 8eacfc66dc04bba89c8e1c03746c67068e07718b..f6ec165f9c7d83698100c85b1d4bf6b4cea0f458 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java @@ -45,7 +45,7 @@ public class PortalTravelAgent { @@ -63,10 +61,10 @@ index 19c54f1dde60feb2e8deedc83940c778500401eb..f84dd6d9bec4c0f2f741bab20a4f4588 @Nullable @@ -53,7 +53,7 @@ public class PortalTravelAgent { // CraftBukkit end - VillagePlace villageplace = this.world.B(); + VillagePlace villageplace = this.world.x(); - villageplace.a(this.world, blockposition, 128); + villageplace.a(this.world, blockposition, searchRadius); // Paper - This impacts the # of chunks searched for entries List list = (List) villageplace.b((villageplacetype) -> { - return villageplacetype == VillagePlaceType.u; + return villageplacetype == VillagePlaceType.v; }, blockposition, searchRadius, VillagePlace.Occupancy.ANY).collect(Collectors.toList()); // CraftBukkit - searchRadius diff --git a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch b/Spigot-Server-Patches/0052-Add-velocity-warnings.patch index 7b1125b288..285b90a42e 100644 --- a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0052-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 1cf8fd93a45fb76fc1638c7fd8751314d4c813e3..d5311eb017fa093c3068e7ea0c24026822b9d638 100644 +index 15ee6ee6e96bb48f73cbb2944eeee8f726914e2d..49889d8c1d1f9b9c79b1d526f4cd9a94944c1c72 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -234,6 +234,7 @@ public final class CraftServer implements Server { +@@ -258,6 +258,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; @@ -17,10 +17,10 @@ index 1cf8fd93a45fb76fc1638c7fd8751314d4c813e3..d5311eb017fa093c3068e7ea0c240268 static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 3e8ea3a94d0547afc7de4f7b5cd901e93028808d..7a6df77f196db8ccdaf589b680de9aab09b0ef32 100644 +index 19669d7354d8cfa723e614ac3b471e703ee7feee..613081685e233074728366b9ff16642c04774c91 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -408,10 +408,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -416,10 +416,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public void setVelocity(Vector velocity) { Preconditions.checkArgument(velocity != null, "velocity"); velocity.checkFinite(); diff --git a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch index d94fcaf886..b4466a814e 100644 --- a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch @@ -30,15 +30,15 @@ index cd47a4ca069df26969de3051c2aac80540093818..abbf59bb91021821876a8960e8f77fac + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c0937138a31077244e39b1154cd7838e26aa1205..c6c8d24e3b4c24ec5a6c7dd33afa3ab86d388ca1 100644 +index 682dd0d53f393c326e3da9b99fbff21953535161..15312df00ea7d88ca1733b5b8a5dd8f204728811 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -758,7 +758,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -762,7 +762,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.playerConnection.teleport(to); } else { -- server.getHandle().moveToWorld(entity, toWorld.getWorldProvider().getDimensionManager(), true, to, true); -+ server.getHandle().moveToWorld(entity, toWorld.getWorldProvider().getDimensionManager(), true, to, !toWorld.paperConfig.disableTeleportationSuffocationCheck); +- server.getHandle().moveToWorld(entity, toWorld, true, to, true); ++ server.getHandle().moveToWorld(entity, toWorld, true, to, !toWorld.paperConfig.disableTeleportationSuffocationCheck); // Paper } return true; } diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch index 06244eb003..89f5a203f8 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0054-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 ef779879e33c2f64c325afd3cd411032fb0d63f9..b85e21202eb8bb9446989aa1d6889eed784762a4 100644 +index a803d1093dfa7c7421eda913679766224fda6dcf..3ade9a83f750854cd5663a6a177fe27eaac73c39 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 ef779879e33c2f64c325afd3cd411032fb0d63f9..b85e21202eb8bb9446989aa1d6889eed import com.google.common.collect.Maps; import com.google.common.collect.Sets; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; -@@ -612,10 +613,15 @@ public class Chunk implements IChunkAccess { +@@ -613,10 +614,15 @@ public class Chunk implements IChunkAccess { this.tileEntities.remove(blockposition); // Paper end } else { @@ -80,10 +80,10 @@ index ef779879e33c2f64c325afd3cd411032fb0d63f9..b85e21202eb8bb9446989aa1d6889eed } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 83707fa6ae5cf4f564760ca0fb5e8c1932d4a91e..7464aeb4e2f2cbe177cfd2ac19c45aabac625632 100644 +index 7dd9c5eec53631d25ae511b1e57bdadfe28ce289..7abd3683f9cc21b90dc74739954de2decddf6478 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -15,6 +15,9 @@ import java.util.function.BooleanSupplier; +@@ -17,6 +17,9 @@ import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; import javax.annotation.Nullable; @@ -94,7 +94,7 @@ index 83707fa6ae5cf4f564760ca0fb5e8c1932d4a91e..7464aeb4e2f2cbe177cfd2ac19c45aab public class ChunkProviderServer extends IChunkProvider { diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index c9c2b0025159c8383998bfe374bcf995f75ed95f..1422503e11ac632c7b94640d59d9aaa0c5cb2f8f 100644 +index bf0ccfb9bf20422b90ef26370d113b49be7d730b..060887d765604e4be82913607bb6266a278f5db6 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -1,5 +1,6 @@ @@ -104,7 +104,7 @@ index c9c2b0025159c8383998bfe374bcf995f75ed95f..1422503e11ac632c7b94640d59d9aaa0 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.io.Files; -@@ -354,6 +355,7 @@ public class NameReferencingFileConverter { +@@ -353,6 +354,7 @@ public class NameReferencingFileConverter { root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file5)); } catch (Exception exception) { exception.printStackTrace(); @@ -112,7 +112,7 @@ index c9c2b0025159c8383998bfe374bcf995f75ed95f..1422503e11ac632c7b94640d59d9aaa0 } if (root != null) { -@@ -367,6 +369,7 @@ public class NameReferencingFileConverter { +@@ -366,6 +368,7 @@ public class NameReferencingFileConverter { NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2)); } catch (Exception exception) { exception.printStackTrace(); @@ -121,18 +121,10 @@ index c9c2b0025159c8383998bfe374bcf995f75ed95f..1422503e11ac632c7b94640d59d9aaa0 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index eece2f689cce58a35d33c6e8d9d56ea4e9dfd88c..6374bf8785f7d99ab8750deba79867433d31eb5f 100644 +index 0bff7dbbb717b51208f581c129d1cc1ff417969f..9816b64c0760f334e508194ccb3f6b3ab54f7695 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -728,6 +728,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.world.checkSession(); - } catch (ExceptionWorldConflict exceptionworldconflict) { - PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict); -+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exceptionworldconflict); // Paper - return false; - } - -@@ -756,6 +757,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -761,6 +761,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return true; } catch (Exception exception) { PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception); @@ -141,10 +133,10 @@ index eece2f689cce58a35d33c6e8d9d56ea4e9dfd88c..6374bf8785f7d99ab8750deba7986743 } } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 187c4e0f58b7de58dfd2194afb194cbed0a58957..c2312a227c60417c02fc028047e1e4562bbfccff 100644 +index 1ce85ab949213efb9eae6daddca6ac8fb15dd472..d2977022d163edc5518dd4737c30cffd3eff5954 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -241,6 +241,7 @@ public class RegionFile implements AutoCloseable { +@@ -246,6 +246,7 @@ public class RegionFile implements AutoCloseable { return true; } } catch (IOException ioexception) { @@ -152,7 +144,7 @@ index 187c4e0f58b7de58dfd2194afb194cbed0a58957..c2312a227c60417c02fc028047e1e456 return false; } } -@@ -309,6 +310,7 @@ public class RegionFile implements AutoCloseable { +@@ -318,6 +319,7 @@ public class RegionFile implements AutoCloseable { filechannel.write(bytebuffer); } catch (Throwable throwable1) { throwable = throwable1; @@ -161,10 +153,10 @@ index 187c4e0f58b7de58dfd2194afb194cbed0a58957..c2312a227c60417c02fc028047e1e456 } finally { if (filechannel != null) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 8ba344df6455307be88113e52d46b0d802f4443e..02157d051f3ecfc05f23ae8631cf01b6133ad159 100644 +index c3632b2607ace821b02895a1668bd6050f6c12d6..50be743513145bd2c8b9c65af219f60099cbb09f 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager; +@@ -14,6 +14,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; // CraftBukkit start @@ -172,16 +164,16 @@ index 8ba344df6455307be88113e52d46b0d802f4443e..02157d051f3ecfc05f23ae8631cf01b6 import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit end -@@ -86,6 +87,7 @@ public final class SpawnerCreature { - entityinsentient = (EntityInsentient) entity; - } catch (Exception exception) { - SpawnerCreature.LOGGER.warn("Failed to create mob", exception); -+ ServerInternalException.reportInternalException(exception); // Paper - return; - } - -@@ -214,6 +216,7 @@ public final class SpawnerCreature { - entity = biomebase_biomemeta.b.a(generatoraccess.getMinecraftWorld()); +@@ -263,6 +264,7 @@ public final class SpawnerCreature { + } + } catch (Exception exception) { + SpawnerCreature.LOGGER.warn("Failed to create mob", exception); ++ ServerInternalException.reportInternalException(exception); // Paper + return null; + } + } +@@ -368,6 +370,7 @@ public final class SpawnerCreature { + entity = biomebase_biomemeta.c.a(generatoraccess.getMinecraftWorld()); } catch (Exception exception) { SpawnerCreature.LOGGER.warn("Failed to create mob", exception); + ServerInternalException.reportInternalException(exception); // Paper @@ -189,7 +181,7 @@ index 8ba344df6455307be88113e52d46b0d802f4443e..02157d051f3ecfc05f23ae8631cf01b6 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index d5e9bae7097460b44f9061198cf54b421bf2b3cf..1bcf01c09a9ba5168d491797e13eeddcf8961b75 100644 +index 045c16654e60f2312e9b6f7b0de2c9e921321201..b1081e441023f5d24091321b1267b5651adeb331 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -1,5 +1,7 @@ @@ -200,8 +192,8 @@ index d5e9bae7097460b44f9061198cf54b421bf2b3cf..1bcf01c09a9ba5168d491797e13eeddc import java.util.Iterator; import javax.annotation.Nullable; -@@ -100,6 +102,7 @@ public class VillageSiege { - entityzombie.prepare(worldserver, worldserver.getDamageScaler(new BlockPosition(entityzombie)), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null); +@@ -101,6 +103,7 @@ public class VillageSiege implements MobSpawner { + entityzombie.prepare(worldserver, worldserver.getDamageScaler(entityzombie.getChunkCoordinates()), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null); } catch (Exception exception) { exception.printStackTrace(); + ServerInternalException.reportInternalException(exception); // Paper @@ -209,20 +201,21 @@ index d5e9bae7097460b44f9061198cf54b421bf2b3cf..1bcf01c09a9ba5168d491797e13eeddc } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9a9a7ae659dd1aea5111603852fbda9fad707be2..6e4329d21d7877e46369361e55954f2f9371bd6e 100644 +index 5197cdb3219638b499f0eb2a25f35e789983a3e8..f80b0b95ce650b01ecb10d3a2f7c66421ca29178 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2,6 +2,9 @@ package net.minecraft.server; +@@ -1,5 +1,10 @@ + package net.minecraft.server; - import co.aikar.timings.Timing; - import co.aikar.timings.Timings; ++import co.aikar.timings.Timing; ++import co.aikar.timings.Timings; +import com.destroystokyo.paper.event.server.ServerExceptionEvent; +import com.destroystokyo.paper.exception.ServerInternalException; +import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; + import com.mojang.serialization.Codec; import java.io.IOException; - import java.util.Collection; -@@ -665,8 +668,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -718,8 +723,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.exit(); } catch (Throwable throwable) { // Paper start - Prevent tile entity and entity crashes @@ -235,7 +228,7 @@ index 9a9a7ae659dd1aea5111603852fbda9fad707be2..6e4329d21d7877e46369361e55954f2f tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); continue; -@@ -737,8 +743,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -790,8 +798,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/0056-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch index 24ec7bf891..cb3b72b349 100644 --- a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch @@ -25,10 +25,10 @@ index abbf59bb91021821876a8960e8f77fac24457ec4..04430aae52205ee167662004e45c145b + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 65a421ee6f704af88ba2170930d17b46a9531c28..383805926e60f9f2f77e258e9d51ed079549713a 100644 +index bfdb57ff56df5d025a7bba9558682089a557c7c9..936919c357865b8933dc1395fffa844940099138 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2271,6 +2271,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2196,6 +2196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public ScoreboardTeamBase getScoreboardTeam() { @@ -37,10 +37,10 @@ index 65a421ee6f704af88ba2170930d17b46a9531c28..383805926e60f9f2f77e258e9d51ed07 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b3a1199d736798c295c695aea1152ac9d0a30d29..e763bf1a6486134fe222865d207359c8b868c008 100644 +index 8fc632b4b0d79efaced83ea9b39b5727f6f5ebef..d96f6736826896d2b7f482fba0c5125edf2ce3c0 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -535,6 +535,7 @@ public abstract class EntityLiving extends Entity { +@@ -641,6 +641,7 @@ public abstract class EntityLiving extends Entity { if (nbttagcompound.hasKeyOfType("Team", 8)) { String s = nbttagcompound.getString("Team"); ScoreboardTeam scoreboardteam = this.world.getScoreboard().getTeam(s); diff --git a/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch index 3611265103..e63b467a77 100644 --- a/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 966d23add13a3139adead8f8969c0a4ff34929c6..da86ee41499b02959755328544307aed39752483 100644 +index 20ada1ab2bea9fa5bde19cb4768d64f73a4154d2..8c3fa2335cfa1df94eb64bda5b12f1f5858dec27 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -623,4 +623,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -629,4 +629,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setMemory(MemoryKey memoryKey, T t) { getHandle().getBehaviorController().setMemory(CraftMemoryKey.fromMemoryKey(memoryKey), CraftMemoryMapper.toNms(t)); } diff --git a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch index 75a6bad4ce..88c0c54360 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2e24d5ba85d7938a9ffe2339fa22c19ee5362b5f..33482a85aa6c3600394684c83e03a4e84be7f1fa 100644 +index b468182266c39b9defa1aa287290f75f7db44b9a..a0806ddc407d21340c82fe4d00bb7ad120cc09d9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1335,7 +1335,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1380,7 +1380,11 @@ public class PlayerConnection implements PacketListenerPlayIn { // CraftBukkit start public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) { PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer()); @@ -22,10 +22,10 @@ index 2e24d5ba85d7938a9ffe2339fa22c19ee5362b5f..33482a85aa6c3600394684c83e03a4e8 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c6c8d24e3b4c24ec5a6c7dd33afa3ab86d388ca1..98c09d169a4ab7cf248b3306a92f45092bca04f8 100644 +index 15312df00ea7d88ca1733b5b8a5dd8f204728811..f2963832700db877af9d4efd5b277348303afe63 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -132,6 +132,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -136,6 +136,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double health = 20; private boolean scaledHealth = false; private double healthScale = 20; @@ -36,7 +36,7 @@ index c6c8d24e3b4c24ec5a6c7dd33afa3ab86d388ca1..98c09d169a4ab7cf248b3306a92f4509 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1729,6 +1733,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1769,6 +1773,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch index e4ae1be13d..24e5c9f56e 100644 --- a/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Chunk Save Reattempt We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index c2312a227c60417c02fc028047e1e4562bbfccff..cee1ea8f43e3135cd72a67c1c8067174feaf956e 100644 +index d2977022d163edc5518dd4737c30cffd3eff5954..26b55108ecf4cd48762b00da625b0ce1d2f42c67 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -241,7 +241,7 @@ public class RegionFile implements AutoCloseable { +@@ -246,7 +246,7 @@ public class RegionFile implements AutoCloseable { return true; } } catch (IOException ioexception) { @@ -19,10 +19,10 @@ index c2312a227c60417c02fc028047e1e4562bbfccff..cee1ea8f43e3135cd72a67c1c8067174 } } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index a164aee8805580069cc4b6daee7f2ad9137d34e0..fd46da95e0342c0004d82a36a164f3a18f9edac6 100644 +index 4d1de29e7c4bea266c544917fbe807a0b19462d6..4cff831de2128cd346f1f1627f0915d534b0d3bf 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java -@@ -85,6 +85,7 @@ public final class RegionFileCache implements AutoCloseable { +@@ -87,6 +87,7 @@ public final class RegionFileCache implements AutoCloseable { protected void write(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException { RegionFile regionfile = this.getFile(chunkcoordintpair, false); // CraftBukkit @@ -30,7 +30,7 @@ index a164aee8805580069cc4b6daee7f2ad9137d34e0..fd46da95e0342c0004d82a36a164f3a1 DataOutputStream dataoutputstream = regionfile.c(chunkcoordintpair); Throwable throwable = null; -@@ -108,6 +109,18 @@ public final class RegionFileCache implements AutoCloseable { +@@ -110,6 +111,18 @@ public final class RegionFileCache implements AutoCloseable { } diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index c70f3d90a8..44222f2870 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -30,10 +30,10 @@ index f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9..6ef5bb9f323da7cbf8cb24d094bf43c4 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d5311eb017fa093c3068e7ea0c24026822b9d638..8f6eb08a4fb74727259b864cad782bf1c5054bdd 100644 +index 49889d8c1d1f9b9c79b1d526f4cd9a94944c1c72..2fb96635d7f811fd77a807ae4a4cc1c0ae0af47a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -370,6 +370,7 @@ public final class CraftServer implements Server { +@@ -394,6 +394,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { helpMap.clear(); helpMap.initializeGeneralTopics(); @@ -41,7 +41,7 @@ index d5311eb017fa093c3068e7ea0c24026822b9d638..8f6eb08a4fb74727259b864cad782bf1 } Plugin[] plugins = pluginManager.getPlugins(); -@@ -389,7 +390,7 @@ public final class CraftServer implements Server { +@@ -413,7 +414,7 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index 234d830bce..126942160a 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-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 8f6eb08a4fb74727259b864cad782bf1c5054bdd..2ed74cd9fc48ce398e597dfc0bf333d085fe1437 100644 +index 2fb96635d7f811fd77a807ae4a4cc1c0ae0af47a..530c0fb05c4631e8946a7defdf9e5c535bc3ddc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2089,5 +2089,23 @@ public final class CraftServer implements Server { +@@ -2140,5 +2140,23 @@ public final class CraftServer implements Server { return null; } } diff --git a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch index a29b0ebb60..541a136a9d 100644 --- a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0062-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 2ed74cd9fc48ce398e597dfc0bf333d085fe1437..ddb16ca8b69adc6d7e7efda7a7fb906234c19cb4 100644 +index 530c0fb05c4631e8946a7defdf9e5c535bc3ddc2..f29253ba0fdf30d78dbec58a8c706e219653ddeb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -825,8 +825,18 @@ public final class CraftServer implements Server { +@@ -848,8 +848,18 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } diff --git a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch b/Spigot-Server-Patches/0063-Undead-horse-leashing.patch index 4c360f1693..6ee9eccf47 100644 --- a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/0063-Undead-horse-leashing.patch @@ -20,15 +20,36 @@ index 04430aae52205ee167662004e45c145b9d2e8bed..dd21221534542d0265fa7d2178ab69c2 + } } diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index b611ade24817a7d6a740bf5366816b6694d79713..c56efe035ac87e5ef49ad39d82499c7348ee8d2f 100644 +index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d396405fac 100644 --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -@@ -107,7 +107,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven - - @Override - public boolean a(EntityHuman entityhuman) { -- return super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; -+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper +@@ -106,6 +106,13 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven + this.bx = flag; } ++ // Paper start ++ @Override ++ public boolean canLeash(EntityHuman entityhuman) { ++ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper ++ } ++ // Paper end ++ @Override + protected void t(float f) { + if (f > 6.0F && this.fa()) { +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java +index 9715f10c790c0210435622ab9997ac40f98da185..f2cd6824790d7e76f8f10e2630bcd5ebbf2a4238 100644 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java ++++ b/src/main/java/net/minecraft/server/EntityInsentient.java +@@ -1283,6 +1283,11 @@ public abstract class EntityInsentient extends EntityLiving { + } + + public boolean a(EntityHuman entityhuman) { ++ // Paper start - allow overriding ++ return this.canLeash(entityhuman); ++ } ++ public boolean canLeash(EntityHuman entityhuman) { ++ // Paper end - allow overriding + return !this.isLeashed() && !(this instanceof IMonster); + } + diff --git a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch index d5bf43590c..dd8b0ecd94 100644 --- a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch @@ -18,21 +18,21 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index aa7501d366b15e7f7f64b7d98a1dccff99f731d2..db11c8ec692aaf37fc68fd39b95fcadacf5eda38 100644 +index 76091ab3f149decc0d3c848b79edd24e20cf181d..a360711ea14983e8df34caa5edda80a015e6db23 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader; - import com.mojang.brigadier.exceptions.CommandSyntaxException; +@@ -9,6 +9,8 @@ import com.mojang.serialization.Codec; + import com.mojang.serialization.codecs.RecordCodecBuilder; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; +import java.util.Collections; +import java.util.Comparator; import java.util.Locale; import java.util.Objects; - import java.util.Random; -@@ -67,6 +69,23 @@ public final class ItemStack { - return decimalformat; - } + import java.util.Optional; +@@ -66,6 +68,23 @@ public final class ItemStack { + private ShapeDetectorBlock n; + private boolean o; + // Paper start + private static final java.util.Comparator enchantSorter = java.util.Comparator.comparing(o -> o.getString("id")); @@ -54,15 +54,15 @@ index aa7501d366b15e7f7f64b7d98a1dccff99f731d2..db11c8ec692aaf37fc68fd39b95fcada public ItemStack(IMaterial imaterial) { this(imaterial, 1); } -@@ -104,6 +123,7 @@ public final class ItemStack { +@@ -108,6 +127,7 @@ public final class ItemStack { if (nbttagcompound.hasKeyOfType("tag", 10)) { // CraftBukkit start - make defensive copy as this data may be coming from the save thread this.tag = (NBTTagCompound) nbttagcompound.getCompound("tag").clone(); + processEnchantOrder(this.tag); // Paper - this.getItem().a(this.tag); + this.getItem().b(this.tag); // CraftBukkit end } -@@ -615,6 +635,7 @@ public final class ItemStack { +@@ -626,6 +646,7 @@ public final class ItemStack { // Paper end public void setTag(@Nullable NBTTagCompound nbttagcompound) { this.tag = nbttagcompound; @@ -70,7 +70,7 @@ index aa7501d366b15e7f7f64b7d98a1dccff99f731d2..db11c8ec692aaf37fc68fd39b95fcada if (this.getItem().usesDurability()) { this.setDamage(this.getDamage()); } -@@ -699,6 +720,7 @@ public final class ItemStack { +@@ -710,6 +731,7 @@ public final class ItemStack { nbttagcompound.setString("id", String.valueOf(IRegistry.ENCHANTMENT.getKey(enchantment))); nbttagcompound.setShort("lvl", (short) ((byte) i)); nbttaglist.add(nbttagcompound); @@ -79,7 +79,7 @@ index aa7501d366b15e7f7f64b7d98a1dccff99f731d2..db11c8ec692aaf37fc68fd39b95fcada public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 4a9132c7016b076ab35b5d66ce81bbd247e1a3ce..3dd912abe3fec22adb29d8edfd66b9f5f3bee4f6 100644 +index c59da5b36c158a25ab861b1aaee497b4119feb3e..bbee99c13e66b50401489fa4ea497980b1e50b18 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { @@ -194,7 +194,7 @@ index 4a9132c7016b076ab35b5d66ce81bbd247e1a3ce..3dd912abe3fec22adb29d8edfd66b9f5 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3dddc48906f8 100644 +index dac0bf9c482cdad7a4e94e41a70cd0765e3c5f18..c1a42d04429a4e9587a4907c29f6b917951e659c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -221,7 +221,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nonnull; -@@ -270,7 +273,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -269,7 +272,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private List lore; private Integer customModelData; private NBTTagCompound blockData; @@ -230,7 +230,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd private Multimap attributeModifiers; private int repairCost; private int hideFlag; -@@ -281,7 +284,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -280,7 +283,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private NBTTagCompound internalTag; @@ -239,7 +239,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only -@@ -302,7 +305,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -301,7 +304,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.blockData = meta.blockData; if (meta.enchantments != null) { // Spigot @@ -248,7 +248,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd } if (meta.hasAttributeModifiers()) { -@@ -398,13 +401,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -397,13 +400,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -264,7 +264,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd for (int i = 0; i < ench.size(); i++) { String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); -@@ -556,13 +559,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -555,13 +558,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -280,7 +280,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -814,14 +817,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -813,14 +816,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -297,7 +297,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1202,7 +1205,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1201,7 +1204,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -306,7 +306,7 @@ index cea4c7809758c6e271079546652635929985d143..b9435bbd51764f75b8d24171513f3ddd } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1431,4 +1434,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1430,4 +1433,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return HANDLED_TAGS; } } diff --git a/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch index a0208ed0c6..72d298de10 100644 --- a/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -30,12 +30,12 @@ index dd21221534542d0265fa7d2178ab69c236579cf7..7de7b74ff69bba1cbad24623d7eeff6c + } } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index a9f843aade2a9a5e7004632c72e5bb1b46d9ad65..2b14b2c3fa21e67ebd8f344a6ee066d67bf53044 100644 +index b0930e054ea99f921fc71db9f9342b1a64f3df43..44e23fa452c5f39ad7ff678064f5474813f7cea8 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java -@@ -266,7 +266,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { +@@ -245,7 +245,7 @@ public abstract class EntityArrow extends IProjectile { - protected void i() { + protected void h() { ++this.despawnCounter; - if (this.despawnCounter >= ((this instanceof EntityThrownTrident) ? world.spigotConfig.tridentDespawnRate : world.spigotConfig.arrowDespawnRate)) { // Spigot + if (this.despawnCounter >= (fromPlayer == PickupStatus.CREATIVE_ONLY ? world.paperConfig.creativeArrowDespawnRate : (fromPlayer == PickupStatus.DISALLOWED ? world.paperConfig.nonPlayerArrowDespawnRate : ((this instanceof EntityThrownTrident) ? world.spigotConfig.tridentDespawnRate : world.spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init? diff --git a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch index 48d9cf1d80..c50dd3fcd7 100644 --- a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6e4329d21d7877e46369361e55954f2f9371bd6e..7f1f0111373fa409e52894e59ac49d5278d0bd58 100644 +index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..2a18a905aef50d23d9e5544f4240b2f719abd8f1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -223,6 +223,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -283,6 +283,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return chunk == null ? null : chunk.getFluid(blockposition); } @@ -29,14 +29,14 @@ index 6e4329d21d7877e46369361e55954f2f9371bd6e..7f1f0111373fa409e52894e59ac49d52 @Override diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 3db276f176301ebf15d5a2ba44d0edb5c7ec6097..73730fe25c84a867b8d95525c9d76d60a5797396 100644 +index d039e715624d33fc3ec9e87d5ad992415e7dc6b9..d5c0d394feaf8bb991245dbdcc6252cf45eac13d 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java -@@ -19,6 +19,7 @@ public class WorldBorder { +@@ -21,6 +21,7 @@ public class WorldBorder { public WorldBorder() {} + public final boolean isInBounds(BlockPosition blockposition) { return this.a(blockposition); } // Paper - OBFHELPER public boolean a(BlockPosition blockposition) { - return (double) (blockposition.getX() + 1) > this.c() && (double) blockposition.getX() < this.e() && (double) (blockposition.getZ() + 1) > this.d() && (double) blockposition.getZ() < this.f(); + return (double) (blockposition.getX() + 1) > this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h(); } diff --git a/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch index 15692f8ef0..541513885b 100644 --- a/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index e763bf1a6486134fe222865d207359c8b868c008..e8e14ac6c6fcf5375976dfbe9ed97ad4619bfbee 100644 +index d96f6736826896d2b7f482fba0c5125edf2ce3c0..f1080e7d10d5105e3f4010489393f6150c7c4a75 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2900,9 +2900,10 @@ public abstract class EntityLiving extends Entity { +@@ -3069,9 +3069,10 @@ public abstract class EntityLiving extends Entity { this.b(this.activeItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; @@ -20,7 +20,7 @@ index e763bf1a6486134fe222865d207359c8b868c008..e8e14ac6c6fcf5375976dfbe9ed97ad4 world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -2917,9 +2918,20 @@ public abstract class EntityLiving extends Entity { +@@ -3086,9 +3087,20 @@ public abstract class EntityLiving extends Entity { itemstack = this.activeItem.a(this.world, this); } @@ -32,7 +32,7 @@ index e763bf1a6486134fe222865d207359c8b868c008..e8e14ac6c6fcf5375976dfbe9ed97ad4 + // Paper end this.a(this.getRaisedHand(), itemstack); // CraftBukkit end - this.dH(); + this.clearActiveItem(); + // Paper start - if the replacement is anything but the default, update the client inventory + if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { + ((EntityPlayer) this).getBukkitEntity().updateInventory(); diff --git a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 69a2fc25fe..ed71b1160a 100644 --- a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,13 +5,13 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index e8e14ac6c6fcf5375976dfbe9ed97ad4619bfbee..d6ef12f1d65e8ab8b1c41bcf06f022f3193df15f 100644 +index f1080e7d10d5105e3f4010489393f6150c7c4a75..374e4a3dcb656d6a84e05bb9260d3198a4243c05 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -496,7 +496,13 @@ public abstract class EntityLiving extends Entity { +@@ -602,7 +602,13 @@ public abstract class EntityLiving extends Entity { @Override - public void a(NBTTagCompound nbttagcompound) { + public void loadData(NBTTagCompound nbttagcompound) { - this.setAbsorptionHearts(nbttagcompound.getFloat("AbsorptionAmount")); + // Paper start - jvm keeps optimizing the setter + float absorptionAmount = nbttagcompound.getFloat("AbsorptionAmount"); @@ -21,9 +21,9 @@ index e8e14ac6c6fcf5375976dfbe9ed97ad4619bfbee..d6ef12f1d65e8ab8b1c41bcf06f022f3 + this.setAbsorptionHearts(absorptionAmount); + // Paper end if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) { - GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10)); + this.getAttributeMap().a(nbttagcompound.getList("Attributes", 10)); } -@@ -945,6 +951,10 @@ public abstract class EntityLiving extends Entity { +@@ -1051,6 +1057,10 @@ public abstract class EntityLiving extends Entity { } public void setHealth(float f) { @@ -34,7 +34,7 @@ index e8e14ac6c6fcf5375976dfbe9ed97ad4619bfbee..d6ef12f1d65e8ab8b1c41bcf06f022f3 // CraftBukkit start - Handle scaled health if (this instanceof EntityPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); -@@ -2743,7 +2753,7 @@ public abstract class EntityLiving extends Entity { +@@ -2911,7 +2921,7 @@ public abstract class EntityLiving extends Entity { } public void setAbsorptionHearts(float f) { @@ -44,10 +44,10 @@ index e8e14ac6c6fcf5375976dfbe9ed97ad4619bfbee..d6ef12f1d65e8ab8b1c41bcf06f022f3 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 98c09d169a4ab7cf248b3306a92f45092bca04f8..b2e6eeb60db96cab7b95048d9773c3e3f6da10dc 100644 +index f2963832700db877af9d4efd5b277348303afe63..5b3c8cc669eef72cec04d36de156405421cd21e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1548,6 +1548,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1589,6 +1589,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch index 9b37704a09..3329238321 100644 --- a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 383805926e60f9f2f77e258e9d51ed079549713a..d6fc93b5923096d3f092f561cbefdf26f2bbfb15 100644 +index 936919c357865b8933dc1395fffa844940099138..d4e673a70f28b9d29b3d1b16eaa06562b7a5d7bc 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -58,6 +58,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -59,6 +59,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } @@ -31,12 +31,12 @@ index 383805926e60f9f2f77e258e9d51ed079549713a..d6fc93b5923096d3f092f561cbefdf26 private CraftEntity bukkitEntity; public CraftEntity getBukkitEntity() { -@@ -192,7 +207,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - this.y = Vec3D.a; - this.av = 1.0F; - this.aw = 1.0F; +@@ -193,7 +208,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.x = Vec3D.a; + this.at = 1.0F; + this.au = 1.0F; - this.random = new Random(); + this.random = SHARED_RANDOM; // Paper this.fireTicks = -this.getMaxFireTicks(); + this.M = new Object2DoubleArrayMap(2); this.justCreated = true; - this.uniqueID = MathHelper.a(this.random); diff --git a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch index 966656b18a..a8b4c0db91 100644 --- a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch @@ -22,10 +22,10 @@ index 7de7b74ff69bba1cbad24623d7eeff6c79812bab..6ef0e1399e9ff260712db1a044068c12 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d744daeb7c678d9f073d848be50a0f6eee721f0e..4b355ecbdaa8471225eb979270f2abc086e27e18 100644 +index ac66ee26861ffa4795a00f328deefab5962fad88..9e8f22f41889c8592033925c180f46413cfaec14 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -449,7 +449,7 @@ public class WorldServer extends World { +@@ -475,7 +475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { blockposition = this.a(this.a(j, 0, k, 15)); if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); diff --git a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index 118ea94f04..9723792c8d 100644 --- a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -13,29 +13,30 @@ Replace all calls to the new place to the unnecessary forward. Optimize getType and getBlockData to manually inline and optimize the calls diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 3f09c24e1cd1bba2809b70b1fa6e89773537d834..7b05bb9edcd059a134cef12cc9fea570217bc601 100644 +index ee28d0335418a0053f8448ab5e12ebba5a9a3b2d..8b202b342f899a38b989b683bd8be4f5c4061f48 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -13,6 +13,14 @@ public class BaseBlockPosition implements Comparable { - private final int b; - @Deprecated - private final int c; +@@ -20,6 +20,15 @@ public class BaseBlockPosition implements Comparable { + private int b; + private int e; + + // Paper start + public boolean isValidLocation() { -+ return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256; ++ return getX() >= -30000000 && getZ() >= -30000000 && getX() < 30000000 && getZ() < 30000000 && getY() >= 0 && getY() < 256; + } + public boolean isInvalidYLocation() { + return b < 0 || b >= 256; + } + // Paper end - ++ public BaseBlockPosition(int i, int j, int k) { this.a = i; + this.b = j; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b85e21202eb8bb9446989aa1d6889eed784762a4..671bcc763c78114f38d2b9b0320d7b168a756e21 100644 +index 3ade9a83f750854cd5663a6a177fe27eaac73c39..dc65ad095f9ec281c13f04254311d9cea80f43f8 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -307,12 +307,27 @@ public class Chunk implements IChunkAccess { +@@ -308,12 +308,27 @@ public class Chunk implements IChunkAccess { return this.sections; } @@ -64,7 +65,7 @@ index b85e21202eb8bb9446989aa1d6889eed784762a4..671bcc763c78114f38d2b9b0320d7b16 + public IBlockData getBlockData_unused(int i, int j, int k) { + // Paper end - if (this.world.P() == WorldType.DEBUG_ALL_BLOCK_STATES) { + if (this.world.isDebugWorld()) { IBlockData iblockdata = null; diff --git a/src/main/java/net/minecraft/server/ChunkEmpty.java b/src/main/java/net/minecraft/server/ChunkEmpty.java @@ -93,10 +94,10 @@ index 82fdd3db6f698f8b77c8bbd1f17cb21980ecfeec..fd49438961451987bd102a85484be24b public IBlockData getType(BlockPosition blockposition) { return Blocks.VOID_AIR.getBlockData(); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 638b0e39798a3f75566fcf9ea48b81024e60b471..e72d1386feb59e4a4c27466da96ffd29222bea18 100644 +index 882c2733beaff1df68b892d44fc77cacf4364ff4..bd2290a4d4ec314b7afdb1f63d711f80803153cd 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -6,10 +6,10 @@ public class ChunkSection { +@@ -7,10 +7,10 @@ public class ChunkSection { public static final DataPalette GLOBAL_PALETTE = new DataPaletteGlobal<>(Block.REGISTRY_ID, Blocks.AIR.getBlockData()); private final int yPos; @@ -109,8 +110,8 @@ index 638b0e39798a3f75566fcf9ea48b81024e60b471..e72d1386feb59e4a4c27466da96ffd29 public ChunkSection(int i) { this(i, (short) 0, (short) 0, (short) 0); -@@ -23,8 +23,8 @@ public class ChunkSection { - this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); +@@ -24,8 +24,8 @@ public class ChunkSection { + this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::c, GameProfileSerializer::a, Blocks.AIR.getBlockData()); } - public IBlockData getType(int i, int j, int k) { @@ -121,10 +122,10 @@ index 638b0e39798a3f75566fcf9ea48b81024e60b471..e72d1386feb59e4a4c27466da96ffd29 public Fluid b(int i, int j, int k) { diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index d5f5a51872dfabdbb828b6c20d61893aed2efec7..3586fe065f21fbf1e71b602c372a690ef603f377 100644 +index 4c6979903d287f7f37d9029f6ce2551742f26164..bcf249aab7d8223f6d9b597fcb20c1aa523ab862 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -125,7 +125,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -124,7 +124,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { } public T a(int i, int j, int k) { @@ -134,10 +135,10 @@ index d5f5a51872dfabdbb828b6c20d61893aed2efec7..3586fe065f21fbf1e71b602c372a690e protected T a(int i) { diff --git a/src/main/java/net/minecraft/server/IChunkAccess.java b/src/main/java/net/minecraft/server/IChunkAccess.java -index 6f25c37658e8e4b31fec2d9e8b69616f073e0b30..2de4796946e79c5fc7a36a1e26cbcad7bca6e12a 100644 +index 91efe3e9d8da340b383847bc1ba29d26b7971cd2..3adb35b6abd0df9617e27e10fa3e0d365958ba42 100644 --- a/src/main/java/net/minecraft/server/IChunkAccess.java +++ b/src/main/java/net/minecraft/server/IChunkAccess.java -@@ -13,6 +13,7 @@ import org.apache.logging.log4j.LogManager; +@@ -12,6 +12,7 @@ import org.apache.logging.log4j.LogManager; public interface IChunkAccess extends IBlockAccess, IStructureAccess { @@ -146,10 +147,10 @@ index 6f25c37658e8e4b31fec2d9e8b69616f073e0b30..2de4796946e79c5fc7a36a1e26cbcad7 IBlockData setType(BlockPosition blockposition, IBlockData iblockdata, boolean flag); diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 39339fa27551b06a9bfd8ea67b1ec8c66726f488..51a5b9cb36c4325df8d1434dcf28d27abefdfede 100644 +index 070449198273e6c42e72c891882b82361d1c8dbd..5114ce15ad1be23ca83b3a3fcaba10a34fcb1a6f 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -94,16 +94,18 @@ public class ProtoChunk implements IChunkAccess { +@@ -95,16 +95,18 @@ public class ProtoChunk implements IChunkAccess { @Override public IBlockData getType(BlockPosition blockposition) { @@ -175,7 +176,7 @@ index 39339fa27551b06a9bfd8ea67b1ec8c66726f488..51a5b9cb36c4325df8d1434dcf28d27a @Override public Fluid getFluid(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/ProtoChunkExtension.java b/src/main/java/net/minecraft/server/ProtoChunkExtension.java -index 01bf28dc34dd69dbcee5f470cc71ec2fbb2fcc12..b740e82622e282bdf543a84a559af69dd5b8568c 100644 +index c5d7a013e65c2c81b14ceb2476c1c6dfe3239f0d..ee8df274d43be753887fb77e4203e2ee30ea02b3 100644 --- a/src/main/java/net/minecraft/server/ProtoChunkExtension.java +++ b/src/main/java/net/minecraft/server/ProtoChunkExtension.java @@ -26,6 +26,11 @@ public class ProtoChunkExtension extends ProtoChunk { @@ -191,17 +192,21 @@ index 01bf28dc34dd69dbcee5f470cc71ec2fbb2fcc12..b740e82622e282bdf543a84a559af69d @Override public Fluid getFluid(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7f1f0111373fa409e52894e59ac49d5278d0bd58..50c2c4b0dc6256d5fbc361ba9b89b4e17bef8acb 100644 +index 2a18a905aef50d23d9e5544f4240b2f719abd8f1..9067fcbf6d35931d31830b91f42f027076426bad 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -172,11 +172,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -179,7 +179,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public static boolean isValidLocation(BlockPosition blockposition) { -- return !isOutsideWorld(blockposition) && blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000; +- return !isOutsideWorld(blockposition) && e(blockposition); + return blockposition.isValidLocation(); } + public static boolean k(BlockPosition blockposition) { +@@ -195,7 +195,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + } + public static boolean isOutsideWorld(BlockPosition blockposition) { - return b(blockposition.getY()); + return blockposition.isInvalidYLocation(); diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 9ad19a252a..49923e401a 100644 --- a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/BlockPlant.java b/src/main/java/net/minecraft/server/BlockPlant.java -index ed1da4f4baf705f368247802cba42263030dba73..a6891b9fa7d01628de309e52b0cd8706d405ac36 100644 +index 47e370667926e59f036be3f2befe8820668cf892..a830305f0e334ad87e6b9ed94230ff611d997d7e 100644 --- a/src/main/java/net/minecraft/server/BlockPlant.java +++ b/src/main/java/net/minecraft/server/BlockPlant.java -@@ -16,7 +16,7 @@ public class BlockPlant extends Block { +@@ -14,7 +14,7 @@ public class BlockPlant extends Block { public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { // CraftBukkit start if (!iblockdata.canPlace(generatoraccess, blockposition)) { @@ -19,12 +19,12 @@ index ed1da4f4baf705f368247802cba42263030dba73..a6891b9fa7d01628de309e52b0cd8706 } } diff --git a/src/main/java/net/minecraft/server/BlockTallPlant.java b/src/main/java/net/minecraft/server/BlockTallPlant.java -index 42e86881bd891b176237eeb24492fe8050e36334..6cdce115814690f6e432aea54f69f32da2b4d206 100644 +index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c41013b8a5a8 100644 --- a/src/main/java/net/minecraft/server/BlockTallPlant.java +++ b/src/main/java/net/minecraft/server/BlockTallPlant.java -@@ -55,7 +55,7 @@ public class BlockTallPlant extends BlockPlant { - @Override - public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) { +@@ -67,7 +67,7 @@ public class BlockTallPlant extends BlockPlant { + + protected static void b(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) { // CraftBukkit start - if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) { + if (((WorldServer)world).hasPhysicsEvent && org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) { // Paper @@ -32,22 +32,22 @@ index 42e86881bd891b176237eeb24492fe8050e36334..6cdce115814690f6e432aea54f69f32d } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a67c31a6021d881b49cfdb75f514404c342eea45..4c7df81217c10d92d05e619ad760bc5d9a6a79cf 100644 +index cc3718765ed54f8042a2687e409a51098ebc67a0..3202c171cffed5c5cec74f6b082aedaeae1c7b9d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1150,6 +1150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper - if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit - this.methodProfiler.a(() -> { - return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager()); + + this.methodProfiler.a(() -> { + return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 50c2c4b0dc6256d5fbc361ba9b89b4e17bef8acb..9ce4d23aa0af877b383750bbb73b7a93a117d03f 100644 +index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70eacbe4617 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -370,7 +370,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -435,7 +435,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start iblockdata1.b(this, blockposition, j); // Don't call an event for the old block to limit event spam CraftWorld world = ((WorldServer) this).getWorld(); @@ -56,7 +56,7 @@ index 50c2c4b0dc6256d5fbc361ba9b89b4e17bef8acb..9ce4d23aa0af877b383750bbb73b7a93 BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata)); this.getServer().getPluginManager().callEvent(event); -@@ -482,7 +482,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -537,7 +537,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); @@ -66,14 +66,15 @@ index 50c2c4b0dc6256d5fbc361ba9b89b4e17bef8acb..9ce4d23aa0af877b383750bbb73b7a93 this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4b355ecbdaa8471225eb979270f2abc086e27e18..1e74e339de72ac34351e7bda6a2992c582d56f3f 100644 +index 9e8f22f41889c8592033925c180f46413cfaec14..cc96ce0cb2e75dd86b413da76e878d511cd4e039 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -75,6 +75,7 @@ public class WorldServer extends World { +@@ -83,6 +83,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { + public final Convertable.ConversionSession convertable; + public final UUID uuid; - // CraftBukkit start - private int tickPosition; + boolean hasPhysicsEvent = true; // Paper - - // Add env and gen to constructor - public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { ++ + public Chunk getChunkIfLoaded(int x, int z) { + return this.chunkProvider.getChunkAt(x, z, false); + } diff --git a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch index a41ea5de8e..f1d7930aff 100644 --- a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1e74e339de72ac34351e7bda6a2992c582d56f3f..02fe6706b855bb152effda5cedf1627f9a13db2a 100644 +index cc96ce0cb2e75dd86b413da76e878d511cd4e039..f6940921dec04eedc393578ec9827e6f8516611c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1134,7 +1134,7 @@ public class WorldServer extends World { +@@ -1057,7 +1057,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity instanceof EntityInsentient) { this.navigators.remove(((EntityInsentient) entity).getNavigation()); } @@ -17,7 +17,7 @@ index 1e74e339de72ac34351e7bda6a2992c582d56f3f..02fe6706b855bb152effda5cedf1627f entity.valid = false; // CraftBukkit } -@@ -1172,6 +1172,7 @@ public class WorldServer extends World { +@@ -1095,6 +1095,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end diff --git a/Spigot-Server-Patches/0075-Configurable-Chunk-Inhabited-Time.patch b/Spigot-Server-Patches/0075-Configurable-Chunk-Inhabited-Time.patch index 1f592a154c..3273ad6f68 100644 --- a/Spigot-Server-Patches/0075-Configurable-Chunk-Inhabited-Time.patch +++ b/Spigot-Server-Patches/0075-Configurable-Chunk-Inhabited-Time.patch @@ -30,10 +30,10 @@ index 6ef0e1399e9ff260712db1a044068c125b1316d3..5872e6b171416686b11678ac9f65706b + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 671bcc763c78114f38d2b9b0320d7b168a756e21..2c1570c89026a5dbbe76ab00c6a89919e566a5f6 100644 +index dc65ad095f9ec281c13f04254311d9cea80f43f8..c0b5d25f63741947c0d8ee32f317eb7fd3db4b65 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -976,7 +976,7 @@ public class Chunk implements IChunkAccess { +@@ -977,7 +977,7 @@ public class Chunk implements IChunkAccess { @Override public long getInhabitedTime() { diff --git a/Spigot-Server-Patches/0076-EntityPathfindEvent.patch b/Spigot-Server-Patches/0076-EntityPathfindEvent.patch index cd3e9cc2d2..87db80a591 100644 --- a/Spigot-Server-Patches/0076-EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/0076-EntityPathfindEvent.patch @@ -6,20 +6,20 @@ Subject: [PATCH] EntityPathfindEvent Fires when an Entity decides to start moving to a location. diff --git a/src/main/java/net/minecraft/server/Navigation.java b/src/main/java/net/minecraft/server/Navigation.java -index 3fdeda0cea0b1df2d1f1051f5654e06bcbccd410..abf450917e605972d84cb603b966feb013ae0002 100644 +index 3303edadf722557212ab973cb4f1684a0a8ae0f2..681465d8a74831461dce4615d2d19c7ed46bc299 100644 --- a/src/main/java/net/minecraft/server/Navigation.java +++ b/src/main/java/net/minecraft/server/Navigation.java @@ -60,7 +60,7 @@ public class Navigation extends NavigationAbstract { @Override public PathEntity a(Entity entity, int i) { -- return this.a(new BlockPosition(entity), i); -+ return this.a(new BlockPosition(entity), entity, i); // Paper - Forward target entity +- return this.a(entity.getChunkCoordinates(), i); ++ return this.a(entity.getChunkCoordinates(), entity, i); // Paper - Forward target entity } private int t() { diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index a600ee7654aa0898c17c8a433580d92ce447320c..5e7158ba1053ae77fc5c5811d49214e877a5fe30 100644 +index 6c65bab60d21b6c431855bc6516d4fd840a0efb8..0ed4b1d9c636a9051718f800ba5717e3ae46cdc9 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -8,7 +8,7 @@ import javax.annotation.Nullable; @@ -31,7 +31,7 @@ index a600ee7654aa0898c17c8a433580d92ce447320c..5e7158ba1053ae77fc5c5811d49214e8 protected final World b; @Nullable protected PathEntity c; -@@ -91,16 +91,26 @@ public abstract class NavigationAbstract { +@@ -94,16 +94,26 @@ public abstract class NavigationAbstract { @Nullable public PathEntity a(BlockPosition blockposition, int i) { @@ -46,8 +46,8 @@ index a600ee7654aa0898c17c8a433580d92ce447320c..5e7158ba1053ae77fc5c5811d49214e8 @Nullable public PathEntity a(Entity entity, int i) { -- return this.a(ImmutableSet.of(new BlockPosition(entity)), 16, true, i); -+ return this.a(ImmutableSet.of(new BlockPosition(entity)), entity, 16, true, i); // Paper +- return this.a(ImmutableSet.of(entity.getChunkCoordinates()), 16, true, i); ++ return this.a(ImmutableSet.of(entity.getChunkCoordinates()), entity, 16, true, i); // Paper } @Nullable @@ -60,8 +60,8 @@ index a600ee7654aa0898c17c8a433580d92ce447320c..5e7158ba1053ae77fc5c5811d49214e8 if (set.isEmpty()) { return null; } else if (this.a.locY() < 0.0D) { -@@ -110,6 +120,23 @@ public abstract class NavigationAbstract { - } else if (this.c != null && !this.c.b() && set.contains(this.q)) { +@@ -113,6 +123,23 @@ public abstract class NavigationAbstract { + } else if (this.c != null && !this.c.b() && set.contains(this.p)) { return this.c; } else { + // Paper start - Pathfind event @@ -82,18 +82,18 @@ index a600ee7654aa0898c17c8a433580d92ce447320c..5e7158ba1053ae77fc5c5811d49214e8 + } + // Paper end this.b.getMethodProfiler().enter("pathfind"); - float f = (float) this.p.getValue(); - BlockPosition blockposition = flag ? (new BlockPosition(this.a)).up() : new BlockPosition(this.a); + float f = (float) this.a.b(GenericAttributes.FOLLOW_RANGE); + BlockPosition blockposition = flag ? this.a.getChunkCoordinates().up() : this.a.getChunkCoordinates(); diff --git a/src/main/java/net/minecraft/server/NavigationFlying.java b/src/main/java/net/minecraft/server/NavigationFlying.java -index 5b057e96db5e12bace186f449ae5658b25123000..f16c6d1faac21478cc9b828c478f3f38a90615fc 100644 +index d9f0d446fceeba33fdf47e6ff88f888e6e17d019..0c33a0c9d59d79a39826b5ee14144604717ffebe 100644 --- a/src/main/java/net/minecraft/server/NavigationFlying.java +++ b/src/main/java/net/minecraft/server/NavigationFlying.java @@ -25,7 +25,7 @@ public class NavigationFlying extends NavigationAbstract { @Override public PathEntity a(Entity entity, int i) { -- return this.a(new BlockPosition(entity), i); -+ return this.a(new BlockPosition(entity), entity, i); // Paper - Forward target entity +- return this.a(entity.getChunkCoordinates(), i); ++ return this.a(entity.getChunkCoordinates(), entity, i); // Paper - Forward target entity } @Override diff --git a/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch index ec7d8d24fe..113e0a0b5c 100644 --- a/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch @@ -25,10 +25,10 @@ index 6ef5bb9f323da7cbf8cb24d094bf43c4735549b0..d500cd75a9229584a70bbdbda6de9bce + } } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index fd46da95e0342c0004d82a36a164f3a18f9edac6..5065ece393a47add3c4e888fd7fb3d9ba47acfed 100644 +index 4cff831de2128cd346f1f1627f0915d534b0d3bf..0305f3c93e8485552890dd5eca8e79277e2bb886 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java -@@ -25,7 +25,7 @@ public final class RegionFileCache implements AutoCloseable { +@@ -27,7 +27,7 @@ public final class RegionFileCache implements AutoCloseable { if (regionfile != null) { return regionfile; } else { diff --git a/Spigot-Server-Patches/0078-Do-not-load-chunks-for-Pathfinding.patch b/Spigot-Server-Patches/0078-Do-not-load-chunks-for-Pathfinding.patch index d9be283f5c..1a57e503cf 100644 --- a/Spigot-Server-Patches/0078-Do-not-load-chunks-for-Pathfinding.patch +++ b/Spigot-Server-Patches/0078-Do-not-load-chunks-for-Pathfinding.patch @@ -5,64 +5,61 @@ Subject: [PATCH] Do not load chunks for Pathfinding diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 5e7158ba1053ae77fc5c5811d49214e877a5fe30..39a0c45bb0e3d2fcfbcc07192f9e1e61570c922e 100644 +index 0ed4b1d9c636a9051718f800ba5717e3ae46cdc9..9330e65cbdf2f826528e3c891197fac7860306ec 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -28,7 +28,7 @@ public abstract class NavigationAbstract { - private BlockPosition q; - private int r; - private float s; -- private final Pathfinder t; -+ private final Pathfinder t; public Pathfinder getPathfinder() { return this.t; } // Paper - OBFHELPER +@@ -27,7 +27,7 @@ public abstract class NavigationAbstract { + private BlockPosition p; + private int q; + private float r; +- private final Pathfinder s; ++ private final Pathfinder s; public Pathfinder getPathfinder() { return this.s; } // Paper - OBFHELPER public NavigationAbstract(EntityInsentient entityinsentient, World world) { this.g = Vec3D.a; diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java -index 6199570618d4642b7ca7b2472852cec6af0202d9..67c63cfe333e328cbd00ada970bd81efebfe30b6 100644 +index 8ba6dd459a863717c91dd59f3f2ee5e3a5ed8170..b31d1f73ce0f067e352868b53eab7557c34b17eb 100644 --- a/src/main/java/net/minecraft/server/Pathfinder.java +++ b/src/main/java/net/minecraft/server/Pathfinder.java -@@ -19,7 +19,7 @@ public class Pathfinder { - private final Set b = Sets.newHashSet(); - private final PathPoint[] c = new PathPoint[32]; - private final int d; -- private final PathfinderAbstract e; -+ private final PathfinderAbstract e; public PathfinderAbstract getPathfinder() { return this.e; } // Paper - OBFHELPER +@@ -17,7 +17,7 @@ public class Pathfinder { + + private final PathPoint[] a = new PathPoint[32]; + private final int b; +- private final PathfinderAbstract c; ++ private final PathfinderAbstract c; public PathfinderAbstract getPathfinder() { return this.c; } // Paper - OBFHELPER + private final Path d = new Path(); public Pathfinder(PathfinderAbstract pathfinderabstract, int i) { - this.e = pathfinderabstract; diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java -index ef248ebcc4419609836c2025548aefb3afcf27d1..4240ca81cb6debecc54dcf9a550e9d916dfa8f9f 100644 +index 7249dd2e6d66b20398103301050ac96ca0c44386..d7f0df123ba716ca8587cbfab2c8e94961164909 100644 --- a/src/main/java/net/minecraft/server/PathfinderNormal.java +++ b/src/main/java/net/minecraft/server/PathfinderNormal.java -@@ -365,7 +365,8 @@ public class PathfinderNormal extends PathfinderAbstract { - PathType pathtype = c(iblockaccess, i, j, k); +@@ -468,7 +468,12 @@ public class PathfinderNormal extends PathfinderAbstract { + for (int j1 = -1; j1 <= 1; ++j1) { + if (l != 0 || j1 != 0) { + blockposition_mutableblockposition.d(i + l, j + i1, k + j1); +- IBlockData iblockdata = iblockaccess.getType(blockposition_mutableblockposition); ++ // Paper start ++ IBlockData iblockdata = iblockaccess.getTypeIfLoaded(blockposition_mutableblockposition); ++ if (iblockdata == null) { ++ pathtype = PathType.BLOCKED; ++ } else { ++ // Paper end - if (pathtype == PathType.OPEN && j >= 1) { -- Block block = iblockaccess.getType(new BlockPosition(i, j - 1, k)).getBlock(); -+ Block block = iblockaccess.getBlockIfLoaded(new BlockPosition(i, j - 1, k)); // Paper -+ if (block == null) return PathType.BLOCKED; // Paper - PathType pathtype1 = c(iblockaccess, i, j - 1, k); + if (iblockdata.a(Blocks.CACTUS)) { + return PathType.DANGER_CACTUS; +@@ -491,6 +496,7 @@ public class PathfinderNormal extends PathfinderAbstract { + if (fluid.a((Tag) TagsFluid.LAVA)) { + return PathType.LAVA; + } ++ } // Paper + } + } + } +@@ -500,7 +506,8 @@ public class PathfinderNormal extends PathfinderAbstract { + } - pathtype = pathtype1 != PathType.WALKABLE && pathtype1 != PathType.OPEN && pathtype1 != PathType.WATER && pathtype1 != PathType.LAVA ? PathType.WALKABLE : PathType.OPEN; -@@ -402,8 +403,12 @@ public class PathfinderNormal extends PathfinderAbstract { - for (int i1 = -1; i1 <= 1; ++i1) { - for (int j1 = -1; j1 <= 1; ++j1) { - if (l != 0 || j1 != 0) { -- Block block = iblockaccess.getType(blockposition_pooledblockposition.d(l + i, i1 + j, j1 + k)).getBlock(); -- -+ // Paper start -+ Block block = iblockaccess.getBlockIfLoaded(blockposition_pooledblockposition.d(l + i, i1 + j, j1 + k)); -+ if (block == null) { -+ pathtype = PathType.BLOCKED; -+ } else -+ // Paper end - if (block == Blocks.CACTUS) { - pathtype = PathType.DANGER_CACTUS; - } else if (block != Blocks.FIRE && block != Blocks.LAVA) { -@@ -440,7 +445,8 @@ public class PathfinderNormal extends PathfinderAbstract { - - protected static PathType c(IBlockAccess iblockaccess, int i, int j, int k) { - BlockPosition blockposition = new BlockPosition(i, j, k); + protected static PathType b(IBlockAccess iblockaccess, BlockPosition blockposition) { - IBlockData iblockdata = iblockaccess.getType(blockposition); + IBlockData iblockdata = iblockaccess.getTypeIfLoaded(blockposition); // Paper + if (iblockdata == null) return PathType.BLOCKED; // Paper diff --git a/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch index 6b440af862..228b7d410f 100644 --- a/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerUseUnknownEntityEvent diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java -index 680adbdeb03acb5471613b6ad9c2ecaba9c402c6..3f7697b39ce31174a14b1f62c6549ee3a2cfcec2 100644 +index 58546550cba0dc239980ef6c920bd5db55328693..51970a4f134e29f5d2bf681d83aeeda916fe9195 100644 --- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java +++ b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java @@ -5,7 +5,7 @@ import javax.annotation.Nullable; @@ -18,10 +18,10 @@ index 680adbdeb03acb5471613b6ad9c2ecaba9c402c6..3f7697b39ce31174a14b1f62c6549ee3 private Vec3D c; private EnumHand d; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 33482a85aa6c3600394684c83e03a4e84be7f1fa..f879b40ac64ecd8b5713bbd6c07247e270a46095 100644 +index a0806ddc407d21340c82fe4d00bb7ad120cc09d9..1c4ed037e30b367cda6d6500001b56ee502693c0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1912,6 +1912,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1954,6 +1954,16 @@ public class PlayerConnection implements PacketListenerPlayIn { } } } diff --git a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch index 511f55f7a8..ed2c6e14c1 100644 --- a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6f11111f413914856e6a3622512f00f8a49cdfa2..c0c774d17b81109eaaea2ad726629eca902cfd6c 100644 +index 80fec11079b71569dbfcfd399df325a1e942e8ef..42e7394326237fcb466ac9727b5ac732518cf1b9 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -150,6 +150,7 @@ public abstract class PlayerList { +@@ -173,6 +173,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); diff --git a/Spigot-Server-Patches/0081-Configurable-Grass-Spread-Tick-Rate.patch b/Spigot-Server-Patches/0081-Configurable-Grass-Spread-Tick-Rate.patch index f4c224ea37..cb86ec9a43 100644 --- a/Spigot-Server-Patches/0081-Configurable-Grass-Spread-Tick-Rate.patch +++ b/Spigot-Server-Patches/0081-Configurable-Grass-Spread-Tick-Rate.patch @@ -20,10 +20,10 @@ index 5872e6b171416686b11678ac9f65706b83b4e231..47f5f8055ed45914309ca9a295ac48b8 + } } diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java -index 9b25fc2f9e3990acf4e8e4b325fe7a67a4b4d804..2b19b6754acd1b5ed60faee154b5af2b6635645e 100644 +index 87f5aa46d6a3f8510f4359415f8405c56841619b..3262b43b5844c332502a3dd1358596998aba0a89 100644 --- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java +++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java -@@ -29,6 +29,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow { +@@ -31,6 +31,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow { @Override public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { diff --git a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index 6ede81f3d3..f6f9834a34 100644 --- a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9ce4d23aa0af877b383750bbb73b7a93a117d03f..1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14 100644 +index 66a4e068f43fad6d8f3858e6665ad70eacbe4617..b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -440,6 +440,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -495,6 +495,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} public void applyPhysics(BlockPosition blockposition, Block block) { diff --git a/Spigot-Server-Patches/0083-Remove-Debug-checks-from-DataBits.patch b/Spigot-Server-Patches/0083-Remove-Debug-checks-from-DataBits.patch index c8465b02d2..ff31c66ed5 100644 --- a/Spigot-Server-Patches/0083-Remove-Debug-checks-from-DataBits.patch +++ b/Spigot-Server-Patches/0083-Remove-Debug-checks-from-DataBits.patch @@ -9,46 +9,37 @@ Before: http://i.imgur.com/nQsMzAE.png After: http://i.imgur.com/nJ46crB.png diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index 2edd9b87146a3d1b6623b0efb17b28b524f18c2f..f9680b6830c77f31e1eb8b6845dd6d58d04f624a 100644 +index 2c3580c1c7bcd6afc83a45550c0f672a592e0c38..48cca2b9a1dbb071615625842123c0c47e281b29 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java -@@ -15,7 +15,7 @@ public class DataBits { - } - - public DataBits(int i, int j, long[] along) { -- Validate.inclusiveBetween(1L, 32L, (long) i); -+ //Validate.inclusiveBetween(1L, 32L, (long) i); // Paper - this.d = j; - this.b = i; - this.a = along; -@@ -28,8 +28,8 @@ public class DataBits { +@@ -53,8 +53,8 @@ public class DataBits { } public int a(int i, int j) { -- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); -- Validate.inclusiveBetween(0L, this.c, (long) j); -+ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper -+ //Validate.inclusiveBetween(0L, this.c, (long) j); // Paper - int k = i * this.b; - int l = k >> 6; - int i1 = (i + 1) * this.b - 1 >> 6; -@@ -50,8 +50,8 @@ public class DataBits { +- Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); +- Validate.inclusiveBetween(0L, this.d, (long) j); ++ //Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); // Paper ++ //Validate.inclusiveBetween(0L, this.d, (long) j); // Paper + int k = this.b(i); + long l = this.b[k]; + int i1 = (i - k * this.f) * this.c; +@@ -65,8 +65,8 @@ public class DataBits { } public void b(int i, int j) { -- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); -- Validate.inclusiveBetween(0L, this.c, (long) j); -+ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper -+ //Validate.inclusiveBetween(0L, this.c, (long) j); // Paper - int k = i * this.b; - int l = k >> 6; - int i1 = (i + 1) * this.b - 1 >> 6; -@@ -68,7 +68,7 @@ public class DataBits { +- Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); +- Validate.inclusiveBetween(0L, this.d, (long) j); ++ //Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); // Paper ++ //Validate.inclusiveBetween(0L, this.d, (long) j); // Paper + int k = this.b(i); + long l = this.b[k]; + int i1 = (i - k * this.f) * this.c; +@@ -75,7 +75,7 @@ public class DataBits { } public int a(int i) { -- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); -+ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper - int j = i * this.b; - int k = j >> 6; - int l = (i + 1) * this.b - 1 >> 6; +- Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); ++ //Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); // Paper + int j = this.b(i); + long k = this.b[j]; + int l = (i - j * this.f) * this.c; diff --git a/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 08baaa10a8..f6f7e8e4f6 100644 --- a/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -26,10 +26,10 @@ index 47f5f8055ed45914309ca9a295ac48b89f192320..b1d1a3c1f84e0d2153de257183687502 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f879b40ac64ecd8b5713bbd6c07247e270a46095..f9b77ec31b466687eaef2b952b01a2dcf38605c1 100644 +index 1c4ed037e30b367cda6d6500001b56ee502693c0..6fe5f581934647b6f3a51dd63080e720a574de4d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1648,7 +1648,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1692,7 +1692,16 @@ public class PlayerConnection implements PacketListenerPlayIn { return; } diff --git a/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch index 0a407b78c0..54bfd5eeb9 100644 --- a/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b2e6eeb60db96cab7b95048d9773c3e3f6da10dc..faff98ac698a5576ef4112a334e845a50d60b857 100644 +index 5b3c8cc669eef72cec04d36de156405421cd21e5..cff5600687d88e3eab06a00bdd7810fa35f3c7cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -767,6 +767,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -771,6 +771,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return true; } diff --git a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch index 6a7d7e006d..df5acb06a2 100644 --- a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch @@ -6,19 +6,19 @@ 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 1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14..6647b9aca46b7db5e2466984f14d787a1c5daa10 100644 +index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5ceea5efb18a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -36,7 +36,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - - protected static final Logger LOGGER = LogManager.getLogger(); +@@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + public static final ResourceKey THE_NETHER = ResourceKey.a(IRegistry.ae, new MinecraftKey("the_nether")); + public static final ResourceKey THE_END = ResourceKey.a(IRegistry.ae, new MinecraftKey("the_end")); private static final EnumDirection[] a = EnumDirection.values(); - public final List tileEntityList = Lists.newArrayList(); + //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list public final List tileEntityListTick = Lists.newArrayList(); protected final List tileEntityListPending = Lists.newArrayList(); protected final java.util.Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); -@@ -605,9 +605,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -660,9 +660,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { }, tileentity::getPosition}); } @@ -30,7 +30,7 @@ index 1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14..6647b9aca46b7db5e2466984f14d787a this.tileEntityListTick.add(tileentity); } -@@ -643,7 +643,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -698,7 +698,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { this.tileEntityListTick.removeAll(this.tileEntityListUnload); @@ -39,7 +39,7 @@ index 1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14..6647b9aca46b7db5e2466984f14d787a this.tileEntityListUnload.clear(); } -@@ -704,7 +704,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -759,7 +759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); // Spigot end @@ -48,7 +48,7 @@ index 1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14..6647b9aca46b7db5e2466984f14d787a if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition()); } -@@ -734,7 +734,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -789,7 +789,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 1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14..6647b9aca46b7db5e2466984f14d787a this.a(tileentity1); } // CraftBukkit end -@@ -1000,7 +1000,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -931,7 +931,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } else { if (tileentity != null) { this.tileEntityListPending.remove(tileentity); @@ -67,10 +67,10 @@ index 1bc4cfea913dd4663bf18ebb31ef24fe07e5ee14..6647b9aca46b7db5e2466984f14d787a } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 02fe6706b855bb152effda5cedf1627f9a13db2a..532b5a4743fb2216ba3c1b61206cde4391275c8c 100644 +index f6940921dec04eedc393578ec9827e6f8516611c..e2dfe047e64257b861fa0b168d2790605f09291c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1619,7 +1619,7 @@ public class WorldServer extends World { +@@ -1543,7 +1543,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size())); @@ -79,7 +79,7 @@ index 02fe6706b855bb152effda5cedf1627f9a13db2a..532b5a4743fb2216ba3c1b61206cde43 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"); -@@ -1782,7 +1782,7 @@ public class WorldServer extends World { +@@ -1682,7 +1682,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/0087-Don-t-tick-Skulls-unused-code.patch b/Spigot-Server-Patches/0087-Don-t-tick-Skulls-unused-code.patch index 067640d7e0..1c814d0fdf 100644 --- a/Spigot-Server-Patches/0087-Don-t-tick-Skulls-unused-code.patch +++ b/Spigot-Server-Patches/0087-Don-t-tick-Skulls-unused-code.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't tick Skulls - unused code diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 99442bb130220cf00e728e3a0da7fd6a04aa8994..177cceb77f8783fe93ba7e4342de9c589f155c1b 100644 +index 5528df3d07a2649a5248ff3b26720a2e2a4a0c25..4fae1b3274a96b871b39de083e9b28ab6129533f 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java @@ -24,7 +24,7 @@ import com.mojang.authlib.ProfileLookupCallback; @@ -15,14 +15,14 @@ index 99442bb130220cf00e728e3a0da7fd6a04aa8994..177cceb77f8783fe93ba7e4342de9c58 -public class TileEntitySkull extends TileEntity implements ITickable { +public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Paper - remove tickable - public GameProfile gameProfile; - private int b; -@@ -124,7 +124,7 @@ public class TileEntitySkull extends TileEntity implements ITickable { + @Nullable + private static UserCache userCache; +@@ -127,7 +127,7 @@ public class TileEntitySkull extends TileEntity implements ITickable { } - @Override + // Paper - remove override public void tick() { - Block block = this.getBlock().getBlock(); + IBlockData iblockdata = this.getBlock(); diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index a0776b8008..9864dde934 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -19,10 +19,10 @@ index d500cd75a9229584a70bbdbda6de9bce67b836e8..e4f0db64c061af684c28f50f0a37fbca + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4c7df81217c10d92d05e619ad760bc5d9a6a79cf..bd14edb06f7ce2560b600845df284e6c6860d699 100644 +index 3202c171cffed5c5cec74f6b082aedaeae1c7b9d..04429bb6f4d75800425087d8a5463ab9f4f4cef3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -454,6 +454,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant playersByName = new java.util.HashMap<>(); + @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule - public PlayerList(MinecraftServer minecraftserver, int i) { + public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) { this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this); -@@ -274,6 +275,13 @@ public abstract class PlayerList { +@@ -304,6 +305,13 @@ public abstract class PlayerList { } entityplayer.syncInventory(); @@ -80,9 +80,9 @@ index c0c774d17b81109eaaea2ad726629eca902cfd6c..0f09cacf6d67dab5bc7962f19fcf3eba + } + // Paper end // CraftBukkit - Moved from above, added world - PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), entityplayer.world.worldData.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ()); + PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), worldserver1.worldDataServer.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ()); } -@@ -392,6 +400,16 @@ public abstract class PlayerList { +@@ -421,6 +429,16 @@ public abstract class PlayerList { entityplayer.playerTick(); // SPIGOT-924 // CraftBukkit end @@ -99,7 +99,7 @@ index c0c774d17b81109eaaea2ad726629eca902cfd6c..0f09cacf6d67dab5bc7962f19fcf3eba this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1018,6 +1036,13 @@ public abstract class PlayerList { +@@ -1058,6 +1076,13 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/Spigot-Server-Patches/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/Spigot-Server-Patches/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index 84ebce0ad8..6b8655969d 100644 --- a/Spigot-Server-Patches/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/Spigot-Server-Patches/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -6,13 +6,22 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 963dbd0648ea9295fe603bc683ffef0d2e22d62d..d0b9c6e3dcae76d802e095731c78fb9693982f90 100644 +index bb54632f5036cf6eeaf7d0a08d2b7f57fad3e360..a3b48376b92aee548ec28eec1cdc978925b96df0 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java +@@ -14,7 +14,7 @@ public class HandshakeListener implements PacketHandshakingInListener { + // CraftBukkit end + private static final IChatBaseComponent a = new ChatComponentText("Ignoring status request"); + private final MinecraftServer b; +- private final NetworkManager c; ++ private final NetworkManager c; final NetworkManager getNetworkManager() { return this.c; } // Paper - OBFHELPER + + public HandshakeListener(MinecraftServer minecraftserver, NetworkManager networkmanager) { + this.b = minecraftserver; @@ -73,8 +73,33 @@ public class HandshakeListener implements PacketHandshakingInListener { - this.b.close(chatmessage); + this.c.close(chatmessage); } else { - this.b.setPacketListener(new LoginListener(this.a, this.b)); + this.c.setPacketListener(new LoginListener(this.b, this.c)); + // Paper start - handshake event + boolean proxyLogicEnabled = org.spigotmc.SpigotConfig.bungee; + boolean handledByEvent = false; @@ -23,15 +32,15 @@ index 963dbd0648ea9295fe603bc683ffef0d2e22d62d..d0b9c6e3dcae76d802e095731c78fb96 + // If we've failed somehow, let the client know so and go no further. + if (event.isFailed()) { + chatmessage = new ChatMessage(event.getFailMessage()); -+ this.b.sendPacket(new PacketLoginOutDisconnect(chatmessage)); -+ this.b.close(chatmessage); ++ this.getNetworkManager().sendPacket(new PacketLoginOutDisconnect(chatmessage)); ++ this.getNetworkManager().close(chatmessage); + return; + } + + packethandshakinginsetprotocol.hostname = event.getServerHostname(); -+ this.b.socketAddress = new java.net.InetSocketAddress(event.getSocketAddressHostname(), ((java.net.InetSocketAddress) this.b.getSocketAddress()).getPort()); -+ this.b.spoofedUUID = event.getUniqueId(); -+ this.b.spoofedProfile = gson.fromJson(event.getPropertiesJson(), com.mojang.authlib.properties.Property[].class); ++ this.getNetworkManager().socketAddress = new java.net.InetSocketAddress(event.getSocketAddressHostname(), ((java.net.InetSocketAddress) this.getNetworkManager().getSocketAddress()).getPort()); ++ this.getNetworkManager().spoofedUUID = event.getUniqueId(); ++ this.getNetworkManager().spoofedProfile = gson.fromJson(event.getPropertiesJson(), com.mojang.authlib.properties.Property[].class); + handledByEvent = true; // Hooray, we did it! + } + } diff --git a/Spigot-Server-Patches/0090-Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/0090-Configurable-RCON-IP-address.patch index a32a2c1d3c..0aa53ccbbf 100644 --- a/Spigot-Server-Patches/0090-Configurable-RCON-IP-address.patch +++ b/Spigot-Server-Patches/0090-Configurable-RCON-IP-address.patch @@ -6,22 +6,22 @@ Subject: [PATCH] Configurable RCON IP address For servers with multiple IP's, ability to bind to a specific interface. diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java -index ad1e3508a736504399b525a6ea322d3292b870b7..0c3ec8357039035e63fe9e97ea5ceb952330ef6e 100644 +index 9dcf91c0505c759d841791c37834360b82df8a7e..1122861a8f9c12668e7bd9d65e63fc9166a66d1a 100644 --- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java -@@ -54,6 +54,8 @@ public class DedicatedServerProperties extends PropertyManager.EditableProperty playerIdleTimeout; +@@ -55,6 +55,8 @@ public class DedicatedServerProperties extends PropertyManager.EditableProperty whiteList; + public final GeneratorSettings generatorSettings; + public final String rconIp; // Paper - Add rcon ip + // CraftBukkit start public DedicatedServerProperties(Properties properties, OptionSet optionset) { super(properties, optionset); -@@ -100,6 +102,10 @@ public class DedicatedServerProperties extends PropertyManager 0) { -@@ -208,10 +209,16 @@ public class BlockFire extends Block { +@@ -220,10 +221,16 @@ public class BlockFire extends BlockFireAbstract { } - private void a(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition -- int k = this.i(world.getType(blockposition)); + private void trySpread(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition +- int k = this.getBurnChance(world.getType(blockposition)); + // Paper start + final IBlockData iblockdata = world.getTypeIfLoaded(blockposition); + if (iblockdata == null) { + return; + } -+ int k = this.i(iblockdata); ++ int k = this.getBurnChance(iblockdata); + // Paper end if (random.nextInt(i) < k) { @@ -46,36 +46,35 @@ index 2909f78f87b3d8870740f166e82d5e97b0ebdd48..d32857c8724f97c7625208cf815c2752 // CraftBukkit start org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -251,7 +258,7 @@ public class BlockFire extends Block { +@@ -269,7 +276,7 @@ public class BlockFire extends BlockFireAbstract { for (int j = 0; j < i; ++j) { EnumDirection enumdirection = aenumdirection[j]; -- if (this.h(iblockaccess.getType(blockposition.shift(enumdirection)))) { -+ if (this.h(iblockaccess.getTypeIfLoaded(blockposition.shift(enumdirection)))) { // Paper - prevent chunk loads +- if (this.e(iblockaccess.getType(blockposition.shift(enumdirection)))) { ++ if (this.e(iblockaccess.getTypeIfLoaded(blockposition.shift(enumdirection)))) { // Paper - prevent chunk loads return true; } } -@@ -269,8 +276,12 @@ public class BlockFire extends Block { +@@ -287,7 +294,12 @@ public class BlockFire extends BlockFireAbstract { for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[k]; - IBlockData iblockdata = iworldreader.getType(blockposition.shift(enumdirection)); -- + // Paper start + IBlockData iblockdata = iworldreader.getTypeIfLoaded(blockposition.shift(enumdirection)); + if (iblockdata == null) { + continue; + } + // Paper end - i = Math.max(this.r(iblockdata), i); + + i = Math.max(this.getFlameChance(iblockdata), i); } +@@ -298,7 +310,7 @@ public class BlockFire extends BlockFireAbstract { -@@ -279,7 +290,7 @@ public class BlockFire extends Block { - } - - public boolean h(IBlockData iblockdata) { -- return this.r(iblockdata) > 0; -+ return iblockdata != null && this.r(iblockdata) > 0; // Paper - iblockdata can be nullable if chunk is unloaded now + @Override + protected boolean e(IBlockData iblockdata) { +- return this.getFlameChance(iblockdata) > 0; ++ return iblockdata != null && this.getFlameChance(iblockdata) > 0; // Paper - iblockdata can be nullable if chunk is unloaded now } @Override diff --git a/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch index 6a8bc47291..90aa802fc6 100644 --- a/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch @@ -5,25 +5,24 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 540048627ef5716be2c9115b162a6eeaf9951ad9..aca885db36a8c93e32b3a2e40c407e4fdd5c97e4 100644 +index 326cbeee1ba59b585a59c3c402cf6d920c88ac13..75757e00edfd11a4a7dc793d5d13355ea713dc01 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -37,7 +37,7 @@ import org.bukkit.inventory.MainHand; - public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1568,19 +1568,27 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + return s; + } - private static final Logger LOGGER = LogManager.getLogger(); -- public String locale = "en_us"; // CraftBukkit - lowercase +- public String locale = "en_us"; // CraftBukkit - add, lowercase + public String locale = null; // CraftBukkit - lowercase // Paper - default to null - public PlayerConnection playerConnection; - public final MinecraftServer server; - public final PlayerInteractManager playerInteractManager; -@@ -1467,13 +1467,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + public void a(PacketPlayInSettings packetplayinsettings) { + // CraftBukkit start + if (getMainHand() != packetplayinsettings.getMainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT); this.server.server.getPluginManager().callEvent(event); } -- if (!this.locale.equals(packetplayinsettings.b())) { -+ if (this.locale == null || !this.locale.equals(packetplayinsettings.b())) { // Paper - check for null - PlayerLocaleChangeEvent event = new PlayerLocaleChangeEvent(getBukkitEntity(), packetplayinsettings.b()); +- if (!this.locale.equals(packetplayinsettings.locale)) { ++ if (this.locale == null || !this.locale.equals(packetplayinsettings.locale)) { // Paper - check for null + PlayerLocaleChangeEvent event = new PlayerLocaleChangeEvent(getBukkitEntity(), packetplayinsettings.locale); this.server.server.getPluginManager().callEvent(event); } this.clientViewDistance = packetplayinsettings.viewDistance; @@ -31,19 +30,19 @@ index 540048627ef5716be2c9115b162a6eeaf9951ad9..aca885db36a8c93e32b3a2e40c407e4f + // Paper start - add PlayerLocaleChangeEvent + // Since the field is initialized to null, this event should always fire the first time the packet is received + String oldLocale = this.locale; - this.locale = packetplayinsettings.b(); ++ this.locale = packetplayinsettings.locale; + if (!this.locale.equals(oldLocale)) { + new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), oldLocale, this.locale).callEvent(); + } + // Paper end - this.ch = packetplayinsettings.d(); - this.ci = packetplayinsettings.e(); - this.getDataWatcher().set(EntityPlayer.bq, (byte) packetplayinsettings.f()); + this.cf = packetplayinsettings.d(); + this.cg = packetplayinsettings.e(); + this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index faff98ac698a5576ef4112a334e845a50d60b857..a85638fb4022361cb17cac0d666f26cdd1a5ef11 100644 +index cff5600687d88e3eab06a00bdd7810fa35f3c7cc..20cb63419a049ce9dcaf2f0c99274501ebf9aa8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1732,8 +1732,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1772,8 +1772,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { @@ -56,11 +55,3 @@ index faff98ac698a5576ef4112a334e845a50d60b857..a85638fb4022361cb17cac0d666f26cd } // Paper start -@@ -1820,7 +1822,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - } - } - -- @Override - public Set getHiddenPlayers() - { - Set ret = new HashSet(); diff --git a/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch index 9d9d47c7c0..e55c1e1ad4 100644 --- a/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d6ef12f1d65e8ab8b1c41bcf06f022f3193df15f..9ba0bf40f823003a5966244e7cdde4e3e11da9ec 100644 +index 374e4a3dcb656d6a84e05bb9260d3198a4243c05..9086712e1206a980a10c7cc36d3ae3a0b8f8bc79 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -924,10 +924,16 @@ public abstract class EntityLiving extends Entity { +@@ -1030,10 +1030,16 @@ public abstract class EntityLiving extends Entity { } public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) { @@ -28,7 +28,7 @@ index d6ef12f1d65e8ab8b1c41bcf06f022f3193df15f..9ba0bf40f823003a5966244e7cdde4e3 if (this.valid) { this.world.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index 01d702d5ca3b09460a53f612ffdcc08a69724d4f..c3a9a9bd458ade65211730237177b1dadb6d1269 100644 +index 59fe6bc503c8b0554330e8f800bee3b1562c3eb9..d618c3a0a7ce7b7e63f6844e22492b8ff333e1e4 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -69,7 +69,7 @@ public class FoodMetaData { diff --git a/Spigot-Server-Patches/0094-Add-ability-to-configure-frosted_ice-properties.patch b/Spigot-Server-Patches/0094-Add-ability-to-configure-frosted_ice-properties.patch index 44ec2804bf..d321b0ce3c 100644 --- a/Spigot-Server-Patches/0094-Add-ability-to-configure-frosted_ice-properties.patch +++ b/Spigot-Server-Patches/0094-Add-ability-to-configure-frosted_ice-properties.patch @@ -24,27 +24,24 @@ index b1d1a3c1f84e0d2153de257183687502c8f393d1..9e0c4895403a264f927292db2ac06b00 + } } diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index af17aba8b8573b4f946e79a00a1443e6edc425a1..5e414138e4e542c16508d679e571aac72c082e7b 100644 +index 00e19300f7f0c9873ca7abb0560f3a9308d2a73d..061b157f66999a733c3c4e990371b6f8d7860de2 100644 --- a/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java -@@ -13,6 +13,7 @@ public class BlockIceFrost extends BlockIce { +@@ -18,6 +18,7 @@ public class BlockIceFrost extends BlockIce { @Override - public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { + public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { + if (!worldserver.paperConfig.frostedIceEnabled) return; // Paper - add ability to disable frosted ice if ((random.nextInt(3) == 0 || this.a(worldserver, blockposition, 4)) && worldserver.getLightLevel(blockposition) > 11 - (Integer) iblockdata.get(BlockIceFrost.a) - iblockdata.b((IBlockAccess) worldserver, blockposition) && this.e(iblockdata, (World) worldserver, blockposition)) { - BlockPosition.PooledBlockPosition blockposition_pooledblockposition = BlockPosition.PooledBlockPosition.r(); - Throwable throwable = null; -@@ -28,7 +29,7 @@ public class BlockIceFrost extends BlockIce { - IBlockData iblockdata1 = worldserver.getType(blockposition_pooledblockposition); + BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); + EnumDirection[] aenumdirection = EnumDirection.values(); +@@ -30,12 +31,12 @@ public class BlockIceFrost extends BlockIce { + IBlockData iblockdata1 = worldserver.getType(blockposition_mutableblockposition); - if (iblockdata1.getBlock() == this && !this.e(iblockdata1, (World) worldserver, blockposition_pooledblockposition)) { -- worldserver.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, 20, 40)); -+ worldserver.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, worldserver.paperConfig.frostedIceDelayMin, worldserver.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay - } + if (iblockdata1.a((Block) this) && !this.e(iblockdata1, (World) worldserver, blockposition_mutableblockposition)) { +- worldserver.getBlockTickList().a(blockposition_mutableblockposition, this, MathHelper.nextInt(random, 20, 40)); ++ worldserver.getBlockTickList().a(blockposition_mutableblockposition, this, MathHelper.nextInt(random, worldserver.paperConfig.frostedIceDelayMin, worldserver.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay } - } catch (Throwable throwable1) { -@@ -50,7 +51,7 @@ public class BlockIceFrost extends BlockIce { } } else { diff --git a/Spigot-Server-Patches/0095-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0095-remove-null-possibility-for-getServer-singleton.patch index c9bf893e44..f811ba0e22 100644 --- a/Spigot-Server-Patches/0095-remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/0095-remove-null-possibility-for-getServer-singleton.patch @@ -6,26 +6,26 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bd14edb06f7ce2560b600845df284e6c6860d699..d4434f10b879d9e2119b8adb6757b771e9df04f7 100644 +index 04429bb6f4d75800425087d8a5463ab9f4f4cef3..17846ca9190c63671ad616c668aa1fe1367bcac1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -68,6 +68,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot +@@ -69,6 +69,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot - public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { + public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable { + private static MinecraftServer SERVER; // Paper public static final Logger LOGGER = LogManager.getLogger(); public static final File b = new File("usercache.json"); - private static final CompletableFuture i = CompletableFuture.completedFuture(Unit.INSTANCE); -@@ -178,6 +179,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcepackrepository, Proxy proxy, DataFixer datafixer, DataPackResources datapackresources, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory) { super("Server"); - this.ae = new ResourceManager(EnumResourcePackType.SERVER_DATA, this.serverThread); + SERVER = this; // Paper - better singleton - this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new); - this.craftingManager = new CraftingManager(); - this.tagRegistry = new TagRegistry(); -@@ -2189,7 +2191,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant l = Maps.newHashMap(); +@@ -36,6 +36,7 @@ public class WorldMap extends PersistentBase { + private final Map m = Maps.newHashMap(); public final Map decorations = Maps.newLinkedHashMap(); - private final Map m = Maps.newHashMap(); + private final Map n = Maps.newHashMap(); + private org.bukkit.craftbukkit.map.RenderData vanillaRender = new org.bukkit.craftbukkit.map.RenderData(); // Paper // CraftBukkit start public final CraftMapView mapView; -@@ -43,6 +44,7 @@ public class WorldMap extends PersistentBase { +@@ -48,6 +49,7 @@ public class WorldMap extends PersistentBase { // CraftBukkit start mapView = new CraftMapView(this); server = (CraftServer) org.bukkit.Bukkit.getServer(); @@ -50,14 +50,14 @@ index a56ac3da806035e853bb912ab874265ecbcd2753..2f1be1995d1a188da5be792abd7ac6f1 } @@ -115,6 +117,7 @@ public class WorldMap extends PersistentBase { - this.l.put(mapiconbanner.f(), mapiconbanner); - this.a(mapiconbanner.c(), (GeneratorAccess) null, mapiconbanner.f(), (double) mapiconbanner.a().getX(), (double) mapiconbanner.a().getZ(), 180.0D, mapiconbanner.d()); - } -+ vanillaRender.buffer = colors; // Paper + this.m.put(mapiconbanner.f(), mapiconbanner); + this.a(mapiconbanner.c(), (GeneratorAccess) null, mapiconbanner.f(), (double) mapiconbanner.a().getX(), (double) mapiconbanner.a().getZ(), 180.0D, mapiconbanner.d()); + } ++ this.vanillaRender.buffer = colors; // Paper - NBTTagList nbttaglist1 = nbttagcompound.getList("frames", 10); + NBTTagList nbttaglist1 = nbttagcompound.getList("frames", 10); -@@ -190,6 +193,7 @@ public class WorldMap extends PersistentBase { +@@ -195,6 +198,7 @@ public class WorldMap extends PersistentBase { this.b(); } @@ -65,7 +65,7 @@ index a56ac3da806035e853bb912ab874265ecbcd2753..2f1be1995d1a188da5be792abd7ac6f1 public void a(EntityHuman entityhuman, ItemStack itemstack) { if (!this.humans.containsKey(entityhuman)) { WorldMap.WorldMapHumanTracker worldmap_worldmaphumantracker = new WorldMap.WorldMapHumanTracker(entityhuman); -@@ -425,6 +429,21 @@ public class WorldMap extends PersistentBase { +@@ -430,6 +434,21 @@ public class WorldMap extends PersistentBase { public class WorldMapHumanTracker { @@ -87,7 +87,7 @@ index a56ac3da806035e853bb912ab874265ecbcd2753..2f1be1995d1a188da5be792abd7ac6f1 public final EntityHuman trackee; private boolean d = true; private int e; -@@ -441,9 +460,12 @@ public class WorldMap extends PersistentBase { +@@ -446,9 +465,12 @@ public class WorldMap extends PersistentBase { @Nullable public Packet a(ItemStack itemstack) { // CraftBukkit start @@ -102,10 +102,10 @@ index a56ac3da806035e853bb912ab874265ecbcd2753..2f1be1995d1a188da5be792abd7ac6f1 for ( org.bukkit.map.MapCursor cursor : render.cursors) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 532b5a4743fb2216ba3c1b61206cde4391275c8c..f3fe395d9e9b1332d51cd35b0cb20f606a4a481e 100644 +index e2dfe047e64257b861fa0b168d2790605f09291c..6fb4c273b4ce2bafe8ba42f1f9e8b0d7838e5804 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1090,6 +1090,7 @@ public class WorldServer extends World { +@@ -1013,6 +1013,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { { if ( iter.next().trackee == entity ) { diff --git a/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch index 9b607dcdb5..131c8db439 100644 --- a/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch @@ -520,10 +520,10 @@ index 0000000000000000000000000000000000000000..d50410532c27bd2aa932c2a3f5765ca1 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d6fc93b5923096d3f092f561cbefdf26f2bbfb15..f90627a7f4c399f0515690b2709eaf8c7e884313 100644 +index d4e673a70f28b9d29b3d1b16eaa06562b7a5d7bc..f873c1574e21c0d935db4d27be8afad6d9b403ee 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -74,6 +74,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke }; // Paper end @@ -532,7 +532,7 @@ index d6fc93b5923096d3f092f561cbefdf26f2bbfb15..f90627a7f4c399f0515690b2709eaf8c public CraftEntity getBukkitEntity() { diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index 34ceace23f82e2c0bbaaad01eaef0fd0045cf8e2..60efd439af8fa8ed46d81d703271aa945c19d77e 100644 +index 9a969d71b078ec67a442cc2df387ad633e0fb0f7..fca0fb871e276f3e571944e0354f3acd821e8e86 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -15,10 +15,11 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp @@ -550,8 +550,8 @@ index 34ceace23f82e2c0bbaaad01eaef0fd0045cf8e2..60efd439af8fa8ed46d81d703271aa94 @@ -169,12 +170,13 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp @Override - protected void b(NBTTagCompound nbttagcompound) { - super.b(nbttagcompound); + protected void saveData(NBTTagCompound nbttagcompound) { + super.saveData(nbttagcompound); + this.lootableData.saveNbt(nbttagcompound); // Paper if (this.lootTable != null) { nbttagcompound.setString("LootTable", this.lootTable.toString()); @@ -565,10 +565,10 @@ index 34ceace23f82e2c0bbaaad01eaef0fd0045cf8e2..60efd439af8fa8ed46d81d703271aa94 @@ -183,11 +185,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp @Override - protected void a(NBTTagCompound nbttagcompound) { - super.a(nbttagcompound); + protected void loadData(NBTTagCompound nbttagcompound) { + super.loadData(nbttagcompound); + this.lootableData.loadNbt(nbttagcompound); // Paper - this.items = NonNullList.a(this.getSize(), ItemStack.a); + this.items = NonNullList.a(this.getSize(), ItemStack.b); if (nbttagcompound.hasKeyOfType("LootTable", 8)) { this.lootTable = new MinecraftKey(nbttagcompound.getString("LootTable")); this.lootTableSeed = nbttagcompound.getLong("LootTableSeed"); @@ -577,7 +577,7 @@ index 34ceace23f82e2c0bbaaad01eaef0fd0045cf8e2..60efd439af8fa8ed46d81d703271aa94 ContainerUtil.b(nbttagcompound, this.items); } -@@ -213,10 +216,10 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -213,7 +216,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp } public void d(@Nullable EntityHuman entityhuman) { @@ -585,13 +585,17 @@ index 34ceace23f82e2c0bbaaad01eaef0fd0045cf8e2..60efd439af8fa8ed46d81d703271aa94 + if (this.lootableData.shouldReplenish(entityhuman) && this.world.getMinecraftServer() != null) { // Paper LootTable loottable = this.world.getMinecraftServer().getLootTableRegistry().getLootTable(this.lootTable); -- this.lootTable = null; + if (entityhuman instanceof EntityPlayer) { +@@ -221,6 +224,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp + } + + this.lootTable = null; + this.lootableData.processRefill(entityhuman); // Paper - LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).set(LootContextParameters.POSITION, new BlockPosition(this)).a(this.lootTableSeed); + LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).set(LootContextParameters.POSITION, this.getChunkCoordinates()).a(this.lootTableSeed); if (entityhuman != null) { diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index f5316a4045efdd6bffba226b4a6244961a8b245d..d4cbce3243fe1f4973c9c0ae0dbdab10e3390897 100644 +index 1eb43345bda9fa96d4f3383afb2fed1e998c9da6..5ebba482a65cfe6079484a99f016f968c59df8ee 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java @@ -6,8 +6,9 @@ import javax.annotation.Nullable; @@ -609,7 +613,7 @@ index f5316a4045efdd6bffba226b4a6244961a8b245d..d4cbce3243fe1f4973c9c0ae0dbdab10 @@ -23,16 +24,18 @@ public abstract class TileEntityLootable extends TileEntityContainer { } - protected boolean d(NBTTagCompound nbttagcompound) { + protected boolean b(NBTTagCompound nbttagcompound) { + this.lootableData.loadNbt(nbttagcompound); // Paper if (nbttagcompound.hasKeyOfType("LootTable", 8)) { this.lootTable = new MinecraftKey(nbttagcompound.getString("LootTable")); @@ -621,12 +625,12 @@ index f5316a4045efdd6bffba226b4a6244961a8b245d..d4cbce3243fe1f4973c9c0ae0dbdab10 } } - protected boolean e(NBTTagCompound nbttagcompound) { + protected boolean c(NBTTagCompound nbttagcompound) { + this.lootableData.saveNbt(nbttagcompound); // Paper if (this.lootTable == null) { return false; } else { -@@ -41,15 +44,15 @@ public abstract class TileEntityLootable extends TileEntityContainer { +@@ -41,12 +44,12 @@ public abstract class TileEntityLootable extends TileEntityContainer { nbttagcompound.setLong("LootTableSeed", this.lootTableSeed); } @@ -640,13 +644,17 @@ index f5316a4045efdd6bffba226b4a6244961a8b245d..d4cbce3243fe1f4973c9c0ae0dbdab10 + if (this.lootableData.shouldReplenish(entityhuman) && this.world.getMinecraftServer() != null) { // Paper LootTable loottable = this.world.getMinecraftServer().getLootTableRegistry().getLootTable(this.lootTable); -- this.lootTable = null; + if (entityhuman instanceof EntityPlayer) { +@@ -54,6 +57,7 @@ public abstract class TileEntityLootable extends TileEntityContainer { + } + + this.lootTable = null; + this.lootableData.processRefill(entityhuman); // Paper LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).set(LootContextParameters.POSITION, new BlockPosition(this.position)).a(this.lootTableSeed); if (entityhuman != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 2831419446f4bd531f614f59308c8f5b61933507..17d80b5c6e512e0c582b05c92bb795b004ba27c2 100644 +index da5a80267b189d75374375211a574ca5f18d96be..26cc40e57f5b73b9c32859bff37c4a3d94904c56 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -64,7 +64,7 @@ public class CraftBlockEntityState extends CraftBlockState diff --git a/Spigot-Server-Patches/0100-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0100-Optimize-UserCache-Thread-Safe.patch index fcaa937b23..c5a8e6ec8d 100644 --- a/Spigot-Server-Patches/0100-Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/0100-Optimize-UserCache-Thread-Safe.patch @@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d4434f10b879d9e2119b8adb6757b771e9df04f7..629304c403c596bf81dd8de919f0fcb5c77bd403 100644 +index 17846ca9190c63671ad616c668aa1fe1367bcac1..800ca2d57295c40853f5f1e58ce15e75f1a5afad 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -763,7 +763,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant f = new java.util.concurrent.LinkedBlockingDeque(); // CraftBukkit private final GameProfileRepository g; protected final Gson b; -@@ -108,7 +108,7 @@ public class UserCache { +@@ -97,7 +97,7 @@ public class UserCache { this.a(gameprofile, (Date) null); } @@ -46,7 +46,7 @@ index 65659996c3a137f55e5900bf5919983ff4e77724..d32bec70d0c03f8d0e8888e754463772 UUID uuid = gameprofile.getId(); if (date == null) { -@@ -121,8 +121,9 @@ public class UserCache { +@@ -110,8 +110,9 @@ public class UserCache { UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date); @@ -57,7 +57,7 @@ index 65659996c3a137f55e5900bf5919983ff4e77724..d32bec70d0c03f8d0e8888e754463772 this.d.remove(usercache_usercacheentry1.a().getName().toLowerCase(Locale.ROOT)); this.f.remove(gameprofile); -@@ -135,7 +136,7 @@ public class UserCache { +@@ -124,7 +125,7 @@ public class UserCache { } @Nullable @@ -66,7 +66,7 @@ index 65659996c3a137f55e5900bf5919983ff4e77724..d32bec70d0c03f8d0e8888e754463772 String s1 = s.toLowerCase(Locale.ROOT); UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.d.get(s1); -@@ -220,8 +221,15 @@ public class UserCache { +@@ -209,8 +210,15 @@ public class UserCache { } @@ -82,7 +82,7 @@ index 65659996c3a137f55e5900bf5919983ff4e77724..d32bec70d0c03f8d0e8888e754463772 BufferedWriter bufferedwriter = null; try { -@@ -235,6 +243,14 @@ public class UserCache { +@@ -224,6 +232,14 @@ public class UserCache { } finally { IOUtils.closeQuietly(bufferedwriter); } diff --git a/Spigot-Server-Patches/0101-Avoid-blocking-on-Network-Manager-creation.patch b/Spigot-Server-Patches/0101-Avoid-blocking-on-Network-Manager-creation.patch index d7136ee989..0ef8f2f371 100644 --- a/Spigot-Server-Patches/0101-Avoid-blocking-on-Network-Manager-creation.patch +++ b/Spigot-Server-Patches/0101-Avoid-blocking-on-Network-Manager-creation.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Avoid blocking on Network Manager creation Per Paper issue 294 diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index e7e216850894e764a3b5d92bf86d5a530a0fa503..37a22ba6f7a2ac54759428d23d5ea9787bb557f7 100644 +index 6e7c5756a2338f5e901fff0e75fa42a494a2e8ee..7abb122943b8a5ce0e888d16d1592a127bb9bb6f 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java +++ b/src/main/java/net/minecraft/server/ServerConnection.java -@@ -39,6 +39,15 @@ public class ServerConnection { +@@ -38,6 +38,15 @@ public class ServerConnection { public volatile boolean c; private final List listeningChannels = Collections.synchronizedList(Lists.newArrayList()); private final List connectedChannels = Collections.synchronizedList(Lists.newArrayList()); @@ -25,7 +25,7 @@ index e7e216850894e764a3b5d92bf86d5a530a0fa503..37a22ba6f7a2ac54759428d23d5ea978 public ServerConnection(MinecraftServer minecraftserver) { this.e = minecraftserver; -@@ -73,7 +82,7 @@ public class ServerConnection { +@@ -72,7 +81,7 @@ public class ServerConnection { channel.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new LegacyPingHandler(ServerConnection.this)).addLast("splitter", new PacketSplitter()).addLast("decoder", new PacketDecoder(EnumProtocolDirection.SERVERBOUND)).addLast("prepender", new PacketPrepender()).addLast("encoder", new PacketEncoder(EnumProtocolDirection.CLIENTBOUND)); NetworkManager networkmanager = new NetworkManager(EnumProtocolDirection.SERVERBOUND); @@ -34,7 +34,7 @@ index e7e216850894e764a3b5d92bf86d5a530a0fa503..37a22ba6f7a2ac54759428d23d5ea978 channel.pipeline().addLast("packet_handler", networkmanager); networkmanager.setPacketListener(new HandshakeListener(ServerConnection.this.e, networkmanager)); } -@@ -112,6 +121,7 @@ public class ServerConnection { +@@ -111,6 +120,7 @@ public class ServerConnection { synchronized (this.connectedChannels) { // Spigot Start diff --git a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch index be859d9db6..2e573991e6 100644 --- a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch @@ -32,24 +32,23 @@ index 6db1312035807c04b98408100fb0a5c04c07aff4..8cf3076f4e0d8d7e81158881c763f89e + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f90627a7f4c399f0515690b2709eaf8c7e884313..3f1dbca881ce19a633fc7c20d26d1a25b550edf7 100644 +index f873c1574e21c0d935db4d27be8afad6d9b403ee..2175ce0830701568024ed4d45164ba8ae0ec8548 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2721,6 +2721,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2647,6 +2647,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } - public boolean bM() { + public boolean bU() { + // Paper start + return this.pushedByWater(); + } -+ + public boolean pushedByWater() { + // Paper end return true; } diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 7f8b8f5a365d44f03cb4dd60a7403721f9859446..9c31edade247baac6811ef3ec98e88a332bcffba 100644 +index 0f4923bce392c8e46f6b256f47d23e15b08e6d62..00b95dcb80dd2510e7448c03f38cd84a50c6526a 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -80,7 +80,27 @@ public class EntityTNTPrimed extends Entity { @@ -64,7 +63,7 @@ index 7f8b8f5a365d44f03cb4dd60a7403721f9859446..9c31edade247baac6811ef3ec98e88a3 + */ + // Send position and velocity updates to nearby players on every tick while the TNT is in water. + // This does pretty well at keeping their clients in sync with the server. -+ PlayerChunkMap.EntityTracker ete = this.tracker; ++ PlayerChunkMap.EntityTracker ete = ((WorldServer)this.world).getChunkProvider().playerChunkMap.trackedEntities.get(this.getId()); + if (ete != null) { + PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this); + PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this); @@ -82,7 +81,7 @@ index 7f8b8f5a365d44f03cb4dd60a7403721f9859446..9c31edade247baac6811ef3ec98e88a3 private void explode() { @@ -149,4 +169,11 @@ public class EntityTNTPrimed extends Entity { - public Packet L() { + public Packet O() { return new PacketPlayOutSpawnEntity(this); } + @@ -94,10 +93,10 @@ index 7f8b8f5a365d44f03cb4dd60a7403721f9859446..9c31edade247baac6811ef3ec98e88a3 + // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index a13fd9b3404381879663c1f694a5d1903d1fd884..3ff7a7b4a853068eba2fb034246a58116a846523 100644 +index 10821c2b631b4c0e91abb0b05cfc696f1fda36c0..b5a76f37c27cde25b2561a23c7c0fe7bdd992fee 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -@@ -36,7 +36,7 @@ public class EntityTrackerEntry { +@@ -38,7 +38,7 @@ public class EntityTrackerEntry { private boolean q; private boolean r; // CraftBukkit start diff --git a/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch index 22ea8b2f2c..a1eba2ad11 100644 --- a/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch +++ b/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Faster redstone torch rapid clock removal Only resize the the redstone torch list once, since resizing arrays / lists is costly diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -index 98a255ae578d4cdc6c0081c5fe7991a8a9b574f2..4c3062ece97409056b614cf36fefea22ad22864d 100644 +index d88d435b7777f731bc0bb728ebe4d4cb31c6376e..a63a60348fe45f63deec6fcb27b6be09cd2f088c 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java @@ -11,7 +11,7 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit @@ -16,29 +16,29 @@ index 98a255ae578d4cdc6c0081c5fe7991a8a9b574f2..4c3062ece97409056b614cf36fefea22 - private static final Map> b = new WeakHashMap(); + // Paper - Move the mapped list to World - protected BlockRedstoneTorch(Block.Info block_info) { - super(block_info); -@@ -66,11 +66,16 @@ public class BlockRedstoneTorch extends BlockTorch { - } - - public static void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random, boolean flag) { -- List list = (List) BlockRedstoneTorch.b.get(world); -+ // Paper start -+ java.util.ArrayDeque redstoneUpdateInfos = world.redstoneUpdateInfos; - -- while (list != null && !list.isEmpty() && world.getTime() - ((BlockRedstoneTorch.RedstoneUpdateInfo) list.get(0)).b > 60L) { + protected BlockRedstoneTorch(BlockBase.Info blockbase_info) { + super(blockbase_info, ParticleParamRedstone.a); +@@ -58,11 +58,15 @@ public class BlockRedstoneTorch extends BlockTorch { + @Override + public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { + boolean flag = this.a((World) worldserver, blockposition, iblockdata); +- List list = (List) BlockRedstoneTorch.b.get(worldserver); +- +- while (list != null && !list.isEmpty() && worldserver.getTime() - ((BlockRedstoneTorch.RedstoneUpdateInfo) list.get(0)).b > 60L) { - list.remove(0); ++ // Paper start ++ java.util.ArrayDeque redstoneUpdateInfos = worldserver.redstoneUpdateInfos; + if (redstoneUpdateInfos != null) { + BlockRedstoneTorch.RedstoneUpdateInfo curr; -+ while ((curr = redstoneUpdateInfos.peek()) != null && world.getTime() - curr.getTime() > 60L) { ++ while ((curr = redstoneUpdateInfos.peek()) != null && worldserver.getTime() - curr.getTime() > 60L) { + redstoneUpdateInfos.poll(); + } } + // Paper end // CraftBukkit start - org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager(); -@@ -140,9 +145,12 @@ public class BlockRedstoneTorch extends BlockTorch { + org.bukkit.plugin.PluginManager manager = worldserver.getServer().getPluginManager(); +@@ -127,9 +131,12 @@ public class BlockRedstoneTorch extends BlockTorch { } private static boolean a(World world, BlockPosition blockposition, boolean flag) { @@ -54,7 +54,7 @@ index 98a255ae578d4cdc6c0081c5fe7991a8a9b574f2..4c3062ece97409056b614cf36fefea22 if (flag) { list.add(new BlockRedstoneTorch.RedstoneUpdateInfo(blockposition.immutableCopy(), world.getTime())); -@@ -150,9 +158,9 @@ public class BlockRedstoneTorch extends BlockTorch { +@@ -137,9 +144,9 @@ public class BlockRedstoneTorch extends BlockTorch { int i = 0; @@ -67,7 +67,7 @@ index 98a255ae578d4cdc6c0081c5fe7991a8a9b574f2..4c3062ece97409056b614cf36fefea22 if (blockredstonetorch_redstoneupdateinfo.a.equals(blockposition)) { ++i; if (i >= 8) { -@@ -167,7 +175,7 @@ public class BlockRedstoneTorch extends BlockTorch { +@@ -154,7 +161,7 @@ public class BlockRedstoneTorch extends BlockTorch { public static class RedstoneUpdateInfo { private final BlockPosition a; @@ -77,10 +77,10 @@ index 98a255ae578d4cdc6c0081c5fe7991a8a9b574f2..4c3062ece97409056b614cf36fefea22 public RedstoneUpdateInfo(BlockPosition blockposition, long i) { this.a = blockposition; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6647b9aca46b7db5e2466984f14d787a1c5daa10..5dd504ea0b0d0ca7e7cd8c33473177f95c54bd8c 100644 +index be3e6b398f20467f843fea8296ad5ceea5efb18a..3e6dc44ede30846b8c612b043c1bd625576980e8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -84,6 +84,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -89,6 +89,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { private org.spigotmc.TickLimiter tileLimiter; private int tileTickPosition; public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions diff --git a/Spigot-Server-Patches/0105-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/0105-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index 90eea7b3c9..b12ddb26a0 100644 --- a/Spigot-Server-Patches/0105-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/Spigot-Server-Patches/0105-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -6,38 +6,34 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world Also fix view distance lookup diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index d4fd58414c98a0ba10bbea7fc0ecef44e8ac8d60..87625776963d6143d570cda8e72fda6b3f50047f 100644 +index d335eb7898dc3a2b1553157d35050112f7b7a426..72a9430789301b264a36c5060ded31ccdc4a1ebf 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -572,8 +572,11 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - if (this.bA == 1) { +@@ -570,8 +570,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { + if (this.deathAnimationTicks == 1 && !this.isSilent()) { // CraftBukkit start - Use relative location for far away sounds - // this.world.b(1028, new BlockPosition(this), 0); + // this.world.b(1028, this.getChunkCoordinates(), 0); - int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; - for (EntityPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { -+ // Paper start -+ //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API -+ for (EntityPlayer player : ((WorldServer)world).getPlayers()) { ++ //int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API ++ for (EntityPlayer player : (List) ((WorldServer)world).getPlayers()) { + final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch -+ // Paper end double deltaX = this.locX() - player.locX(); double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index 2edf466ee24841cf1cc3b6a8c896ea82f09c17fd..2e95069c1907df951680f2a00441a72500c48430 100644 +index 1d725c152a2f96dd12fc3c4e25e142129a783e1b..9331f96f68f121b41ce74904d624520291b7c72e 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java -@@ -207,8 +207,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - - // CraftBukkit start - Use relative location for far away sounds - // this.world.b(1023, new BlockPosition(this), 0); -- int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; -- for (EntityPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { -+ // Paper start -+ //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API -+ for (EntityPlayer player : ((WorldServer)world).getPlayers()) { -+ final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch -+ // Paper end - double deltaX = this.locX() - player.locX(); - double deltaZ = this.locZ() - player.locZ(); - double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; +@@ -208,8 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity { + if (!this.isSilent()) { + // CraftBukkit start - Use relative location for far away sounds + // this.world.b(1023, new BlockPosition(this), 0); +- int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; +- for (EntityPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { ++ //int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API ++ for (EntityPlayer player : (List)this.world.getPlayers()) { ++ final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch + double deltaX = this.locX() - player.locX(); + double deltaZ = this.locZ() - player.locZ(); + double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch index b364401ac5..d884413c81 100644 --- a/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch @@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f3fe395d9e9b1332d51cd35b0cb20f606a4a481e..aae3d51288a257f42e773cde052bee52fc1ca238 100644 +index 6fb4c273b4ce2bafe8ba42f1f9e8b0d7838e5804..43b588709da17ae779e97d297955edd3425c2a68 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -997,6 +997,7 @@ public class WorldServer extends World { +@@ -920,6 +920,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot diff --git a/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch index 9a5e3b777b..2f5a4b5477 100644 --- a/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch @@ -9,15 +9,15 @@ Subject: [PATCH] Fix Old Sign Conversion This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index dad966825d988f275ed30c6f8f80d54d12d35c66..8c411ff074425138dd21f1577d8ecd19c355fb93 100644 +index 637632b1324e2cdc80cecc4a5a94dc9379312f30..05aae52e662f7effbfb358a5fa6e33c3c4d86001 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java -@@ -203,9 +203,11 @@ public class DefinedStructure { - definedstructure_blockinfo.c.setInt("x", blockposition1.getX()); - definedstructure_blockinfo.c.setInt("y", blockposition1.getY()); - definedstructure_blockinfo.c.setInt("z", blockposition1.getZ()); +@@ -242,9 +242,11 @@ public class DefinedStructure { + definedstructure_blockinfo.c.setLong("LootTableSeed", random.nextLong()); + } + + tileentity.isLoadingStructure = true; // Paper - tileentity.load(definedstructure_blockinfo.c); + tileentity.load(definedstructure_blockinfo.b, definedstructure_blockinfo.c); tileentity.a(definedstructureinfo.c()); tileentity.a(definedstructureinfo.d()); + tileentity.isLoadingStructure = false; // Paper @@ -25,7 +25,7 @@ index dad966825d988f275ed30c6f8f80d54d12d35c66..8c411ff074425138dd21f1577d8ecd19 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index e2f3cec7420edbd284b531ca7d1d121459fc098c..630b279158f26902ebdcc6e5c810b189ce49c910 100644 +index ab0f9a9d69c801e47002039c41c7c3393fc2f403..967aec7ce9a7fbbb42b51d1ed281db005e107c2c 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -20,6 +20,7 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -37,15 +37,15 @@ index e2f3cec7420edbd284b531ca7d1d121459fc098c..630b279158f26902ebdcc6e5c810b189 @Nullable protected World world; diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 4a48c09e96ec5c2002ba297870ee5f06191f95f2..03f6ddf0003f0ef44ede31cf7a3491580ff0b5de 100644 +index b7b7d8966ed3390cb828cdd08e4e12d75024d784..8e77c662f7d970d8ff86f6c5b9bccc598442594d 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java -@@ -55,13 +55,14 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -59,13 +59,14 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // } try { -- IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); -+ //IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - move down - the old format might throw a json error +- IChatMutableComponent ichatmutablecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); ++ //IChatMutableComponent ichatmutablecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - move down - the old format might throw a json error - if (oldSign) { + if (oldSign && !isLoadingStructure) { // Paper - saved structures will be in the new format, but will not have isConverted @@ -53,7 +53,7 @@ index 4a48c09e96ec5c2002ba297870ee5f06191f95f2..03f6ddf0003f0ef44ede31cf7a349158 continue; } // CraftBukkit end -+ IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - after old sign ++ IChatMutableComponent ichatmutablecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - after old sign if (this.world instanceof WorldServer) { try { diff --git a/Spigot-Server-Patches/0108-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/0108-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch index 4d9ee673c5..02a31384e5 100644 --- a/Spigot-Server-Patches/0108-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch +++ b/Spigot-Server-Patches/0108-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index d32bec70d0c03f8d0e8888e7544637729a1bef08..581199e6dcddb3692ccc6b6cf6c42fa5ef1f5e7e 100644 +index 4d3cbe3e517a75269d5c9cdd7f3751b81daee1c2..4f769211cf98c3da720a904da3dcdcd4c7611f0b 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java -@@ -86,7 +86,7 @@ public class UserCache { +@@ -75,7 +75,7 @@ public class UserCache { }; gameprofilerepository.findProfilesByNames(new String[]{s}, Agent.MINECRAFT, profilelookupcallback); diff --git a/Spigot-Server-Patches/0110-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch similarity index 90% rename from Spigot-Server-Patches/0110-Add-setting-for-proxy-online-mode-status.patch rename to Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch index 4d768029f5..fa408f1765 100644 --- a/Spigot-Server-Patches/0110-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch @@ -31,10 +31,10 @@ index 67f35fe66b33a4b461a310b6ce4fdedb5eaf1ac4..53f96a1576582fce83999a1f7e9a2624 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 1422503e11ac632c7b94640d59d9aaa0c5cb2f8f..d3c2e1bedfde39c19fe293941036641ea72c1bcd 100644 +index 060887d765604e4be82913607bb6266a278f5db6..c5957c2d6c54b076ebe7f9a432e30551d2b6febc 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -@@ -58,7 +58,8 @@ public class NameReferencingFileConverter { +@@ -56,7 +56,8 @@ public class NameReferencingFileConverter { return new String[i]; }); @@ -45,10 +45,10 @@ index 1422503e11ac632c7b94640d59d9aaa0c5cb2f8f..d3c2e1bedfde39c19fe293941036641e } 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 ddb16ca8b69adc6d7e7efda7a7fb906234c19cb4..a27783dcf3f7575b8527aefc60a15621520cbf19 100644 +index f29253ba0fdf30d78dbec58a8c706e219653ddeb..28b3c800683dd42b88d630c9ae83996b7b4f65df 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1399,7 +1399,8 @@ public final class CraftServer implements Server { +@@ -1458,7 +1458,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/0109-More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/0109-More-informative-vehicle-moved-wrongly-message.patch deleted file mode 100644 index 44c53269c3..0000000000 --- a/Spigot-Server-Patches/0109-More-informative-vehicle-moved-wrongly-message.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Thu, 28 Jul 2016 17:58:53 -0500 -Subject: [PATCH] More informative vehicle moved wrongly message - - -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f9b77ec31b466687eaef2b952b01a2dcf38605c1..c00ada6c10529fd50b0d7fbb1763b6e09287a1fc 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -365,7 +365,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - - if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot - flag1 = true; -- PlayerConnection.LOGGER.warn("{} moved wrongly!", entity.getDisplayName().getString()); -+ PlayerConnection.LOGGER.warn(entity.getName() + " (vehicle of " + this.player.getName() + ") moved wrongly!"); // Paper - More informative - } - Location curPos = this.getPlayer().getLocation(); // Spigot - From 2bf5db6cc9f07f17fa74d53b5a2b0014801359de Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Thu, 25 Jun 2020 05:04:34 -0700 Subject: [PATCH 07/95] even more work --- ...timise-BlockState-s-hashCode-equals.patch} | 79 +++++++------ ...nfigurable-packet-in-spam-threshold.patch} | 4 +- ...2-Configurable-flying-kick-messages.patch} | 8 +- .../0113-Chunk-registration-fixes.patch | 22 ++++ .../0114-Chunk-registration-fixes.patch | 22 ---- ...k-reference-on-Craft-Entity-removal.patch} | 4 +- ...to-fix-bad-Y-levels-on-player-login.patch} | 10 +- ...ion-to-remove-corrupt-tile-entities.patch} | 4 +- ...nt.patch => 0117-Add-EntityZapEvent.patch} | 53 +++++---- ...-from-ArmorStand-and-SpawnEgg-items.patch} | 10 +- ...19-Cache-user-authenticator-threads.patch} | 12 +- ....patch => 0120-Optimise-removeQueue.patch} | 14 +-- ...-Allow-Reloading-of-Command-Aliases.patch} | 4 +- ...-Add-source-to-PlayerExpChangeEvent.patch} | 10 +- ...-Don-t-let-fishinghooks-use-portals.patch} | 20 ++-- ... => 0124-Add-ProjectileCollideEvent.patch} | 75 +++++------- ...ent-Pathfinding-out-of-World-Border.patch} | 4 +- ...mize-World.isLoaded-BlockPosition-Z.patch} | 4 +- ...Bound-Treasure-Maps-to-World-Border.patch} | 24 ++-- ...igurable-Cartographer-Treasure-Maps.patch} | 18 +-- ... => 0129-Optimize-ItemStack.isEmpty.patch} | 8 +- ...o-control-if-armour-stands-can-move.patch} | 4 +- ...1-Properly-fix-item-duplication-bug.patch} | 8 +- ...=> 0132-String-based-Action-Bar-API.patch} | 4 +- ...-API-s.patch => 0133-Firework-API-s.patch} | 74 ++++-------- ... 0134-PlayerTeleportEndGatewayEvent.patch} | 4 +- ...ovide-E-TE-Chunk-count-stat-methods.patch} | 4 +- ...h => 0136-Enforce-Sync-Player-Saves.patch} | 4 +- ...low-entities-to-ride-themselves-572.patch} | 4 +- ...I-for-Reason-Source-Triggering-play.patch} | 109 ++++++++++-------- ...patch => 0139-Cap-Entity-Collisions.patch} | 8 +- ...-CraftScheduler-Async-Task-Debugger.patch} | 0 ...more-aggressive-in-the-chunk-unload-.patch | 47 ++++++++ ...more-aggressive-in-the-chunk-unload-.patch | 38 ------ 34 files changed, 349 insertions(+), 368 deletions(-) rename Spigot-Server-Patches/{0111-Optimise-BlockState-s-hashCode-equals.patch => 0110-Optimise-BlockState-s-hashCode-equals.patch} (73%) rename Spigot-Server-Patches/{0112-Configurable-packet-in-spam-threshold.patch => 0111-Configurable-packet-in-spam-threshold.patch} (93%) rename Spigot-Server-Patches/{0113-Configurable-flying-kick-messages.patch => 0112-Configurable-flying-kick-messages.patch} (92%) create mode 100644 Spigot-Server-Patches/0113-Chunk-registration-fixes.patch delete mode 100644 Spigot-Server-Patches/0114-Chunk-registration-fixes.patch rename Spigot-Server-Patches/{0115-Remove-FishingHook-reference-on-Craft-Entity-removal.patch => 0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch} (81%) rename Spigot-Server-Patches/{0116-Auto-fix-bad-Y-levels-on-player-login.patch => 0115-Auto-fix-bad-Y-levels-on-player-login.patch} (68%) rename Spigot-Server-Patches/{0117-Option-to-remove-corrupt-tile-entities.patch => 0116-Option-to-remove-corrupt-tile-entities.patch} (91%) rename Spigot-Server-Patches/{0118-Add-EntityZapEvent.patch => 0117-Add-EntityZapEvent.patch} (51%) rename Spigot-Server-Patches/{0119-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch => 0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch} (89%) rename Spigot-Server-Patches/{0120-Cache-user-authenticator-threads.patch => 0119-Cache-user-authenticator-threads.patch} (90%) rename Spigot-Server-Patches/{0121-Optimise-removeQueue.patch => 0120-Optimise-removeQueue.patch} (84%) rename Spigot-Server-Patches/{0122-Allow-Reloading-of-Command-Aliases.patch => 0121-Allow-Reloading-of-Command-Aliases.patch} (90%) rename Spigot-Server-Patches/{0123-Add-source-to-PlayerExpChangeEvent.patch => 0122-Add-source-to-PlayerExpChangeEvent.patch} (85%) rename Spigot-Server-Patches/{0124-Don-t-let-fishinghooks-use-portals.patch => 0123-Don-t-let-fishinghooks-use-portals.patch} (64%) rename Spigot-Server-Patches/{0125-Add-ProjectileCollideEvent.patch => 0124-Add-ProjectileCollideEvent.patch} (51%) rename Spigot-Server-Patches/{0126-Prevent-Pathfinding-out-of-World-Border.patch => 0125-Prevent-Pathfinding-out-of-World-Border.patch} (88%) rename Spigot-Server-Patches/{0127-Optimize-World.isLoaded-BlockPosition-Z.patch => 0126-Optimize-World.isLoaded-BlockPosition-Z.patch} (86%) rename Spigot-Server-Patches/{0128-Bound-Treasure-Maps-to-World-Border.patch => 0127-Bound-Treasure-Maps-to-World-Border.patch} (54%) rename Spigot-Server-Patches/{0129-Configurable-Cartographer-Treasure-Maps.patch => 0128-Configurable-Cartographer-Treasure-Maps.patch} (83%) rename Spigot-Server-Patches/{0130-Optimize-ItemStack.isEmpty.patch => 0129-Optimize-ItemStack.isEmpty.patch} (65%) rename Spigot-Server-Patches/{0131-Add-API-methods-to-control-if-armour-stands-can-move.patch => 0130-Add-API-methods-to-control-if-armour-stands-can-move.patch} (93%) rename Spigot-Server-Patches/{0132-Properly-fix-item-duplication-bug.patch => 0131-Properly-fix-item-duplication-bug.patch} (80%) rename Spigot-Server-Patches/{0133-String-based-Action-Bar-API.patch => 0132-String-based-Action-Bar-API.patch} (88%) rename Spigot-Server-Patches/{0134-Firework-API-s.patch => 0133-Firework-API-s.patch} (61%) rename Spigot-Server-Patches/{0135-PlayerTeleportEndGatewayEvent.patch => 0134-PlayerTeleportEndGatewayEvent.patch} (89%) rename Spigot-Server-Patches/{0136-Provide-E-TE-Chunk-count-stat-methods.patch => 0135-Provide-E-TE-Chunk-count-stat-methods.patch} (93%) rename Spigot-Server-Patches/{0137-Enforce-Sync-Player-Saves.patch => 0136-Enforce-Sync-Player-Saves.patch} (86%) rename Spigot-Server-Patches/{0138-Don-t-allow-entities-to-ride-themselves-572.patch => 0137-Don-t-allow-entities-to-ride-themselves-572.patch} (83%) rename Spigot-Server-Patches/{0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch => 0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch} (75%) rename Spigot-Server-Patches/{0140-Cap-Entity-Collisions.patch => 0139-Cap-Entity-Collisions.patch} (89%) rename Spigot-Server-Patches/{0141-Remove-CraftScheduler-Async-Task-Debugger.patch => 0140-Remove-CraftScheduler-Async-Task-Debugger.patch} (100%) create mode 100644 Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch delete mode 100644 Spigot-Server-Patches/0142-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch diff --git a/Spigot-Server-Patches/0111-Optimise-BlockState-s-hashCode-equals.patch b/Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch similarity index 73% rename from Spigot-Server-Patches/0111-Optimise-BlockState-s-hashCode-equals.patch rename to Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch index 6df5b76c40..d5f1dddce7 100644 --- a/Spigot-Server-Patches/0111-Optimise-BlockState-s-hashCode-equals.patch +++ b/Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch @@ -8,40 +8,8 @@ object identity checks safely. Use a simpler optimized hashcode -diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java -index 0ce77d9230f3d1c53df7c5b72a380a2fa0c6d882..00e67b567f00824b25b45e5ff5ecd62c87ea0309 100644 ---- a/src/main/java/net/minecraft/server/IBlockState.java -+++ b/src/main/java/net/minecraft/server/IBlockState.java -@@ -28,23 +28,13 @@ public abstract class IBlockState> - } - - public boolean equals(Object object) { -- if (this == object) { -- return true; -- } else if (!(object instanceof IBlockState)) { -- return false; -- } else { -- IBlockState blockstate = (IBlockState) object; -- -- return this.a.equals(blockstate.a) && this.b.equals(blockstate.b); -- } -+ return this == object; // Paper - only one instance per configuration - } - -+ private static final java.util.concurrent.atomic.AtomicInteger hashId = new java.util.concurrent.atomic.AtomicInteger(1); // Paper - only one instance per configuration -+ private final int hashCode = 92821 * hashId.getAndIncrement(); // Paper - only one instance per configuration - public final int hashCode() { -- if (this.c == null) { -- this.c = this.c(); -- } -- -- return this.c; -+ return this.hashCode; // Paper - only one instance per configuration - } - - public int c() { diff --git a/src/main/java/net/minecraft/server/BlockStateBoolean.java b/src/main/java/net/minecraft/server/BlockStateBoolean.java -index d8738447d794f6967307daa1271473903b76a632..7ca302b522df081755120c597a08d589193c57a6 100644 +index 8df150f4cabb3dd98cb66c9d1af7fae035a6a6fe..4ca8db630434915de4eaeac6c4ecd60714d7f5d9 100644 --- a/src/main/java/net/minecraft/server/BlockStateBoolean.java +++ b/src/main/java/net/minecraft/server/BlockStateBoolean.java @@ -30,8 +30,7 @@ public class BlockStateBoolean extends IBlockState { @@ -55,7 +23,7 @@ index d8738447d794f6967307daa1271473903b76a632..7ca302b522df081755120c597a08d589 return true; } else if (object instanceof BlockStateBoolean && super.equals(object)) { diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java -index 1486d460c8ec3d117b4dc3d28b2c3f1b632e187b..7cdadc6b6abd069f9a1bc000a8f116f73b90e029 100644 +index 8162c11d14b8e88c2b572f9ddf6b7a15977047f8..8dc620b22bb904aa6a82e2127aa9da861986525c 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java @@ -49,8 +49,7 @@ public class BlockStateEnum & INamable> extends IBlockState @@ -69,7 +37,7 @@ index 1486d460c8ec3d117b4dc3d28b2c3f1b632e187b..7cdadc6b6abd069f9a1bc000a8f116f7 return true; } else if (object instanceof BlockStateEnum && super.equals(object)) { diff --git a/src/main/java/net/minecraft/server/BlockStateInteger.java b/src/main/java/net/minecraft/server/BlockStateInteger.java -index 6f35c365f9086a2289e17b4d8e73757ad2c7f87b..0499a71705f3bdac6c94a8dc340cc15e96d9586e 100644 +index 5bd7a236b948666ca31e53cb3a8aa0dc147e274b..36b84446e96faefad3b783f73df74e0f3bce8255 100644 --- a/src/main/java/net/minecraft/server/BlockStateInteger.java +++ b/src/main/java/net/minecraft/server/BlockStateInteger.java @@ -38,8 +38,7 @@ public class BlockStateInteger extends IBlockState { @@ -82,3 +50,44 @@ index 6f35c365f9086a2289e17b4d8e73757ad2c7f87b..0499a71705f3bdac6c94a8dc340cc15e if (this == object) { return true; } else if (object instanceof BlockStateInteger && super.equals(object)) { +diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java +index 88f1f201240ef0479c4f0f93f4caca454bbe7e9e..4eea3a4fca4cea96109e54473335fd3660e2f6d6 100644 +--- a/src/main/java/net/minecraft/server/IBlockState.java ++++ b/src/main/java/net/minecraft/server/IBlockState.java +@@ -21,7 +21,7 @@ public abstract class IBlockState> { + return DataResult.error("Unable to read property: " + this + " with value: " + s1); + }); + }, this::a); +- this.e = this.d.xmap(this::b, IBlockState.a::b); ++ this.e = this.d.xmap(this::b, (IBlockState.a param) -> { return param.b(); }); // Paper - decompile fix + this.a = oclass; + this.b = s; + } +@@ -61,23 +61,17 @@ public abstract class IBlockState> { + } + + public boolean equals(Object object) { +- if (this == object) { +- return true; +- } else if (!(object instanceof IBlockState)) { +- return false; +- } else { +- IBlockState iblockstate = (IBlockState) object; +- +- return this.a.equals(iblockstate.a) && this.b.equals(iblockstate.b); +- } ++ return this == object; // Paper - only one instance per configuration + } + ++ private static final java.util.concurrent.atomic.AtomicInteger hashId = new java.util.concurrent.atomic.AtomicInteger(1); // Paper - only one instance per configuration ++ private final int hashCode = 92821 * hashId.getAndIncrement(); // Paper - only one instance per configuration + public final int hashCode() { + if (this.c == null) { + this.c = this.b(); + } + +- return this.c; ++ return this.hashCode; // Paper - only one instance per configuration + } + + public int b() { diff --git a/Spigot-Server-Patches/0112-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch similarity index 93% rename from Spigot-Server-Patches/0112-Configurable-packet-in-spam-threshold.patch rename to Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch index 03383c0c01..55191777ec 100644 --- a/Spigot-Server-Patches/0112-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch @@ -23,10 +23,10 @@ index 53f96a1576582fce83999a1f7e9a2624506ed51f..010b17d2e7a27ace6ff8b15edff577c4 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c00ada6c10529fd50b0d7fbb1763b6e09287a1fc..6a6739bba0ad9a5fadac7a49e698c2435200c1fc 100644 +index 6fe5f581934647b6f3a51dd63080e720a574de4d..98bd46adf77a7f9c3cf82d85ce1646fc75066a08 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1204,13 +1204,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1240,13 +1240,14 @@ public class PlayerConnection implements PacketListenerPlayIn { // Spigot start - limit place/interactions private int limitedPackets; private long lastLimitedPacket = -1; diff --git a/Spigot-Server-Patches/0113-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch similarity index 92% rename from Spigot-Server-Patches/0113-Configurable-flying-kick-messages.patch rename to Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch index fa29bc96ad..566c3f320b 100644 --- a/Spigot-Server-Patches/0113-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch @@ -21,14 +21,14 @@ index 010b17d2e7a27ace6ff8b15edff577c4164d2e81..5a83fc21cb6801d597a01fb4a83d3048 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6a6739bba0ad9a5fadac7a49e698c2435200c1fc..7ed21a99e9025837bc5c38efa542df85dc2eb248 100644 +index 98bd46adf77a7f9c3cf82d85ce1646fc75066a08..4c59b6beb0db3fd9d42e2f53519c40f211ef8bfb 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -147,7 +147,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - if (this.B) { + if (this.B && !this.player.isSleeping()) { if (++this.C > 80) { PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString()); -- this.disconnect(new ChatMessage("multiplayer.disconnect.flying", new Object[0])); +- this.disconnect(new ChatMessage("multiplayer.disconnect.flying")); + this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message return; } @@ -37,7 +37,7 @@ index 6a6739bba0ad9a5fadac7a49e698c2435200c1fc..7ed21a99e9025837bc5c38efa542df85 if (this.D && this.player.getRootVehicle().getRidingPassenger() == this.player) { if (++this.E > 80) { PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString()); -- this.disconnect(new ChatMessage("multiplayer.disconnect.flying", new Object[0])); +- this.disconnect(new ChatMessage("multiplayer.disconnect.flying")); + this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage); // Paper - use configurable kick message return; } diff --git a/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch new file mode 100644 index 0000000000..4f58339a29 --- /dev/null +++ b/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 21 Sep 2016 22:54:28 -0400 +Subject: [PATCH] Chunk registration fixes + +World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is treated + +Keep them consistent + +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 43b588709da17ae779e97d297955edd3425c2a68..6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -729,7 +729,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + if (entity.ck()) { + this.getMethodProfiler().enter("chunkCheck"); + int i = MathHelper.floor(entity.locX() / 16.0D); +- int j = MathHelper.floor(entity.locY() / 16.0D); ++ int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior + int k = MathHelper.floor(entity.locZ() / 16.0D); + + if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) { diff --git a/Spigot-Server-Patches/0114-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0114-Chunk-registration-fixes.patch deleted file mode 100644 index 027a158447..0000000000 --- a/Spigot-Server-Patches/0114-Chunk-registration-fixes.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Wed, 21 Sep 2016 22:54:28 -0400 -Subject: [PATCH] Chunk registration fixes - -World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is treated - -Keep them consistent - -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index aae3d51288a257f42e773cde052bee52fc1ca238..e428b3cb8c8ca5a662a0e867bf74d08775f1bacd 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -696,7 +696,7 @@ public class WorldServer extends World { - public void chunkCheck(Entity entity) { - this.getMethodProfiler().enter("chunkCheck"); - int i = MathHelper.floor(entity.locX() / 16.0D); -- int j = MathHelper.floor(entity.locY() / 16.0D); -+ int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior; - int k = MathHelper.floor(entity.locZ() / 16.0D); - - if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) { diff --git a/Spigot-Server-Patches/0115-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch similarity index 81% rename from Spigot-Server-Patches/0115-Remove-FishingHook-reference-on-Craft-Entity-removal.patch rename to Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch index 541110605b..ae755561c9 100644 --- a/Spigot-Server-Patches/0115-Remove-FishingHook-reference-on-Craft-Entity-removal.patch +++ b/Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove FishingHook reference on Craft Entity removal diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index 257ce11664e7388ec004f8fad62ad2fce2aeb791..d45bba0c97961eff6b5107ade63f897263eeff47 100644 +index 591650712199f904af2c66b0d7e36ce31d87e1a3..f7b5320fc6c8a9dec40c69907c020d96fd3bfa00 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -@@ -66,4 +66,15 @@ public class CraftFishHook extends AbstractProjectile implements FishHook { +@@ -48,4 +48,15 @@ public class CraftFishHook extends CraftProjectile implements FishHook { Validate.isTrue(chance >= 0 && chance <= 1, "The bite chance must be between 0 and 1."); this.biteChance = chance; } diff --git a/Spigot-Server-Patches/0116-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0115-Auto-fix-bad-Y-levels-on-player-login.patch similarity index 68% rename from Spigot-Server-Patches/0116-Auto-fix-bad-Y-levels-on-player-login.patch rename to Spigot-Server-Patches/0115-Auto-fix-bad-Y-levels-on-player-login.patch index 1f124f3728..99847f1efa 100644 --- a/Spigot-Server-Patches/0116-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0115-Auto-fix-bad-Y-levels-on-player-login.patch @@ -6,14 +6,14 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index aca885db36a8c93e32b3a2e40c407e4fdd5c97e4..83ffee35fb2f7de14dbaf06f62d2019eaf68814c 100644 +index 75757e00edfd11a4a7dc793d5d13355ea713dc01..a5c921f9e1c07fd1eb969063727019a6d8bce5b6 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -197,6 +197,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -206,6 +206,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override - public void a(NBTTagCompound nbttagcompound) { - super.a(nbttagcompound); + public void loadData(NBTTagCompound nbttagcompound) { + super.loadData(nbttagcompound); + if (this.locY() > 300) this.setPositionRaw(locX(), 257, locZ()); // Paper - bring down to a saner Y level if out of world if (nbttagcompound.hasKeyOfType("playerGameType", 99)) { if (this.getMinecraftServer().getForceGamemode()) { - this.playerInteractManager.setGameMode(this.getMinecraftServer().getGamemode()); + this.playerInteractManager.a(this.getMinecraftServer().getGamemode(), EnumGamemode.NOT_SET); diff --git a/Spigot-Server-Patches/0117-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0116-Option-to-remove-corrupt-tile-entities.patch similarity index 91% rename from Spigot-Server-Patches/0117-Option-to-remove-corrupt-tile-entities.patch rename to Spigot-Server-Patches/0116-Option-to-remove-corrupt-tile-entities.patch index d1ed807692..bc6c0cfd22 100644 --- a/Spigot-Server-Patches/0117-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0116-Option-to-remove-corrupt-tile-entities.patch @@ -19,10 +19,10 @@ index 8cf3076f4e0d8d7e81158881c763f89ebda7e678..721eceeffc843da8b9da1ccc2d07f3bc + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2c1570c89026a5dbbe76ab00c6a89919e566a5f6..87e94693f6db07d1273854ad55e5f263f2f2239e 100644 +index c0b5d25f63741947c0d8ee32f317eb7fd3db4b65..fdc02b512f2d4bc968977564d520bc7ec7189c69 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -636,6 +636,12 @@ public class Chunk implements IChunkAccess { +@@ -637,6 +637,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/0118-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0117-Add-EntityZapEvent.patch similarity index 51% rename from Spigot-Server-Patches/0118-Add-EntityZapEvent.patch rename to Spigot-Server-Patches/0117-Add-EntityZapEvent.patch index 1a72bb4223..da2cc743d0 100644 --- a/Spigot-Server-Patches/0118-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0117-Add-EntityZapEvent.patch @@ -5,44 +5,43 @@ Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index 5c24e22c7d0eb1f10b45fc782151f1d7606d5383..8d277566e9df010b6f86385bc8f018e4c8c2d3bf 100644 +index 1d580d9cbdca9ceafccd35e20f6f075a582a0ac6..cd0a94794e8969937f7f8408e0fb46c1684abc00 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java -@@ -164,6 +164,12 @@ public class EntityPig extends EntityAnimal { - entitypigzombie.setCustomNameVisible(this.getCustomNameVisible()); - } +@@ -208,6 +208,11 @@ public class EntityPig extends EntityAnimal implements ISteerable, ISaddleable { + } -+ // Paper start -+ if (CraftEventFactory.callEntityZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { -+ return; -+ } -+ // Paper end -+ - // CraftBukkit start - if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { - return; + entitypigzombie.setPersistent(); ++ // Paper start ++ if (CraftEventFactory.callEntityZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { ++ return; ++ } ++ // Paper end + // CraftBukkit start + if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { + return; diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index f72347050302e4cb99d4c9b71b7e8acab545ea59..5e3835851d8c5e804542c256a54187e4ed05bace 100644 +index f7f76bca254dc7bc5792e449feeaa113a96c93e4..d0b04707e830fbaf3a6bfe92637e4432172fd9c7 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -681,6 +681,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - public void onLightningStrike(EntityLightning entitylightning) { - EntityWitch entitywitch = (EntityWitch) EntityTypes.WITCH.a(this.world); +@@ -714,6 +714,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + EntityVillager.LOGGER.info("Villager {} was struck by lightning {}.", this, entitylightning); + EntityWitch entitywitch = (EntityWitch) EntityTypes.WITCH.a(this.world); -+ // Paper start -+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, entitylightning, entitywitch).isCancelled()) { -+ return; -+ } -+ // Paper end ++ // Paper start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, entitylightning, entitywitch).isCancelled()) { ++ return; ++ } ++ // Paper end + - entitywitch.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch); - entitywitch.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entitywitch)), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null); - entitywitch.setNoAI(this.isNoAI()); + entitywitch.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch); + entitywitch.prepare(this.world, this.world.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 37b0776ed580995024008e81254b8a8516641e3f..26e29e0f37b9d4f23b4928c5aeef1da184efe3fc 100644 +index 1952e6dadbf3b26de98263279e0188c806d8ff52..f3385622b57a17eadcb0882cd7e138cf36640ae5 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1053,6 +1053,14 @@ public class CraftEventFactory { +@@ -1051,6 +1051,14 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0119-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch similarity index 89% rename from Spigot-Server-Patches/0119-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch rename to Spigot-Server-Patches/0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index 96c2424f9f..0e52d401fa 100644 --- a/Spigot-Server-Patches/0119-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/Spigot-Server-Patches/0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -30,14 +30,13 @@ index 721eceeffc843da8b9da1ccc2d07f3bcc901db76..bff2e9d26dc8057c3950d1b57ee2e746 + } } diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index e64722f63bab6bc1ce97ca63d4fde7599f6c1296..6683f7c5f31b88187961335c5f708b8a4f77b5af 100644 +index 7c308e0912fb60f8dcdfb36c8a8c8718231858bc..40ab0a1e5b8e31f1ef3b2444366784a65f034341 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java -@@ -233,6 +233,15 @@ public class EntityFallingBlock extends Entity { +@@ -233,6 +233,13 @@ public class EntityFallingBlock extends Entity { @Override - protected void a(NBTTagCompound nbttagcompound) { - this.block = GameProfileSerializer.d(nbttagcompound.getCompound("BlockState")); -+ + protected void loadData(NBTTagCompound nbttagcompound) { + this.block = GameProfileSerializer.c(nbttagcompound.getCompound("BlockState")); + // Paper start - Block FallingBlocks with Command Blocks + // Check mappings on update - dc = "repeating_command_block" - dd = "chain_command_block" + final Block b = this.block.getBlock(); @@ -45,7 +44,6 @@ index e64722f63bab6bc1ce97ca63d4fde7599f6c1296..6683f7c5f31b88187961335c5f708b8a + this.block = Blocks.STONE.getBlockData(); + } + // Paper end -+ this.ticksLived = nbttagcompound.getInt("Time"); if (nbttagcompound.hasKeyOfType("HurtEntities", 99)) { this.hurtEntities = nbttagcompound.getBoolean("HurtEntities"); diff --git a/Spigot-Server-Patches/0120-Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch similarity index 90% rename from Spigot-Server-Patches/0120-Cache-user-authenticator-threads.patch rename to Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch index a6db0fb77d..fc11e84aa3 100644 --- a/Spigot-Server-Patches/0120-Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 83ffee35fb2f7de14dbaf06f62d2019eaf68814c..482d7b7cb6b89d79b2ce54338130481f9f1c8c24 100644 +index a5c921f9e1c07fd1eb969063727019a6d8bce5b6..8ff3f34cc09e369d423370b9d713424b27b2dfcf 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -4,7 +4,9 @@ import com.google.common.collect.Lists; import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; - import io.netty.util.concurrent.Future; + import com.mojang.serialization.DataResult; +import java.util.ArrayDeque; // Paper import java.util.Collection; +import java.util.Deque; // Paper @@ -27,7 +27,7 @@ index 83ffee35fb2f7de14dbaf06f62d2019eaf68814c..482d7b7cb6b89d79b2ce54338130481f private final AdvancementDataPlayer advancementDataPlayer; private final ServerStatisticManager serverStatisticManager; private float lastHealthScored = Float.MIN_VALUE; -@@ -371,13 +373,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -414,13 +416,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { while (!this.removeQueue.isEmpty()) { int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); int[] aint = new int[i]; @@ -50,7 +50,7 @@ index 83ffee35fb2f7de14dbaf06f62d2019eaf68814c..482d7b7cb6b89d79b2ce54338130481f this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } -@@ -1327,7 +1336,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1434,7 +1443,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit @@ -63,6 +63,6 @@ index 83ffee35fb2f7de14dbaf06f62d2019eaf68814c..482d7b7cb6b89d79b2ce54338130481f + this.removeQueue.addAll(entityplayer.removeQueue); + } + // Paper end - this.cm = entityplayer.cm; - this.cr = entityplayer.cr; + this.ck = entityplayer.ck; + this.cp = entityplayer.cp; this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft()); diff --git a/Spigot-Server-Patches/0121-Optimise-removeQueue.patch b/Spigot-Server-Patches/0120-Optimise-removeQueue.patch similarity index 84% rename from Spigot-Server-Patches/0121-Optimise-removeQueue.patch rename to Spigot-Server-Patches/0120-Optimise-removeQueue.patch index f3dfb500c6..58e4428a99 100644 --- a/Spigot-Server-Patches/0121-Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/0120-Optimise-removeQueue.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimise removeQueue diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index c6fd50daa842aae7558ae14196483b544c377c29..19e72da6d9a8bf43d1d25c1be3aa23c75dd6e5d7 100644 +index 01e981209ec832b3da368091ed109f42464c1c33..7c016afc904d6d6958abf73fd0d87a25c9fa41ad 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -97,6 +97,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -96,6 +96,12 @@ public class LoginListener implements PacketLoginInListener { } @@ -21,7 +21,7 @@ index c6fd50daa842aae7558ae14196483b544c377c29..19e72da6d9a8bf43d1d25c1be3aa23c7 // Spigot start public void initUUID() { -@@ -175,8 +181,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -174,8 +180,8 @@ public class LoginListener implements PacketLoginInListener { this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e)); } else { // Spigot start @@ -32,7 +32,7 @@ index c6fd50daa842aae7558ae14196483b544c377c29..19e72da6d9a8bf43d1d25c1be3aa23c7 @Override public void run() { try { -@@ -187,7 +193,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -186,7 +192,8 @@ public class LoginListener implements PacketLoginInListener { server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex); } } @@ -42,7 +42,7 @@ index c6fd50daa842aae7558ae14196483b544c377c29..19e72da6d9a8bf43d1d25c1be3aa23c7 // Spigot end } -@@ -204,7 +211,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -203,7 +210,8 @@ public class LoginListener implements PacketLoginInListener { this.loginKey = packetlogininencryptionbegin.a(privatekey); this.g = LoginListener.EnumProtocolState.AUTHENTICATING; this.networkManager.a(this.loginKey); @@ -52,9 +52,9 @@ index c6fd50daa842aae7558ae14196483b544c377c29..19e72da6d9a8bf43d1d25c1be3aa23c7 public void run() { GameProfile gameprofile = LoginListener.this.i; -@@ -251,10 +259,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -250,10 +258,8 @@ public class LoginListener implements PacketLoginInListener { - return LoginListener.this.server.Y() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; + return LoginListener.this.server.U() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; } - }; - diff --git a/Spigot-Server-Patches/0122-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch similarity index 90% rename from Spigot-Server-Patches/0122-Allow-Reloading-of-Command-Aliases.patch rename to Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch index 9052d5858c..10de1d4552 100644 --- a/Spigot-Server-Patches/0122-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0121-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 a27783dcf3f7575b8527aefc60a15621520cbf19..3cb57c3b8ca8f29437bea52e9cf3512985f56eb5 100644 +index 28b3c800683dd42b88d630c9ae83996b7b4f65df..a0d1e57ff34dfb36913ff937575bb3c1ad444f54 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2118,5 +2118,24 @@ public final class CraftServer implements Server { +@@ -2169,5 +2169,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/Spigot-Server-Patches/0123-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0122-Add-source-to-PlayerExpChangeEvent.patch similarity index 85% rename from Spigot-Server-Patches/0123-Add-source-to-PlayerExpChangeEvent.patch rename to Spigot-Server-Patches/0122-Add-source-to-PlayerExpChangeEvent.patch index 8ef90a2803..b0aa783f3e 100644 --- a/Spigot-Server-Patches/0123-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/0122-Add-source-to-PlayerExpChangeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index f72bb0c13806c3fadcbbf345f3533c115a200a7f..0447800d9dc341af647a928abd8b79938eddbd6f 100644 +index 2e25aba27993608ed7ee1cfb7ae8ee60bc74feda..c13a47382d0a7456fa5035a64f42a6ed5e9f1c8e 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -@@ -193,7 +193,7 @@ public class EntityExperienceOrb extends Entity { +@@ -188,7 +188,7 @@ public class EntityExperienceOrb extends Entity { } if (this.value > 0) { @@ -18,10 +18,10 @@ index f72bb0c13806c3fadcbbf345f3533c115a200a7f..0447800d9dc341af647a928abd8b7993 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 26e29e0f37b9d4f23b4928c5aeef1da184efe3fc..d9997278d335901138ff8bd29faaf88d4e0f36cf 100644 +index f3385622b57a17eadcb0882cd7e138cf36640ae5..b4da37eb1566c4f92d4e3dc6310cd1cc8ccbca7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -117,6 +117,7 @@ import org.bukkit.entity.ThrownPotion; +@@ -115,6 +115,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 26e29e0f37b9d4f23b4928c5aeef1da184efe3fc..d9997278d335901138ff8bd29faaf88d import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -1012,6 +1013,17 @@ public class CraftEventFactory { +@@ -1010,6 +1011,17 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0124-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch similarity index 64% rename from Spigot-Server-Patches/0124-Don-t-let-fishinghooks-use-portals.patch rename to Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch index 1837e84c0f..ac295acd3f 100644 --- a/Spigot-Server-Patches/0124-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch @@ -5,26 +5,26 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3f1dbca881ce19a633fc7c20d26d1a25b550edf7..8a2093ac5a6d47c795523a1aab87e46f10b1699e 100644 +index 2175ce0830701568024ed4d45164ba8ae0ec8548..33262be7f883afeca6a8662ffcb5c44a4800e657 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -161,7 +161,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -163,7 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public boolean ac; public boolean impulse; public int portalCooldown; -- protected boolean af; -+ protected boolean af; public final boolean inPortal() { return this.af; } // Paper - OBFHELPER - protected int ag; - public DimensionManager dimension; - protected BlockPosition ai; +- protected boolean inPortal; ++ protected boolean inPortal; public final boolean inPortal() { return this.inPortal; } // Paper - OBFHELPER + protected int portalTicks; + protected BlockPosition ah; + protected Vec3D ai; diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 40bdcf4e75bb36385e82ba8b8f2471760072705a..39e3bd37956d7e0a4d5f784a581e17a77b71f78b 100644 +index ab8f67c11419cc788fc3cb814d2224e65217dd08..13b46c59b9a017bfa985ad74f80eca77608d1891 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java -@@ -160,6 +160,12 @@ public class EntityFishingHook extends Entity { +@@ -191,6 +191,12 @@ public class EntityFishingHook extends IProjectile { this.setMot(this.getMot().a(0.92D)); - this.Z(); + this.ac(); + + // Paper start - These shouldn't be going through portals + if (this.inPortal()) { diff --git a/Spigot-Server-Patches/0125-Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/0124-Add-ProjectileCollideEvent.patch similarity index 51% rename from Spigot-Server-Patches/0125-Add-ProjectileCollideEvent.patch rename to Spigot-Server-Patches/0124-Add-ProjectileCollideEvent.patch index 998300bfa5..005ff56f0e 100644 --- a/Spigot-Server-Patches/0125-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0124-Add-ProjectileCollideEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ProjectileCollideEvent diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 2b14b2c3fa21e67ebd8f344a6ee066d67bf53044..634e2bd3049d65bbef4ef12e2264049a6980fd71 100644 +index 44e23fa452c5f39ad7ff678064f5474813f7cea8..c552962a9a2c8dac6794ef6698943c7d91ea45c4 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java -@@ -187,6 +187,17 @@ public abstract class EntityArrow extends Entity implements IProjectile { +@@ -160,6 +160,17 @@ public abstract class EntityArrow extends IProjectile { } } @@ -27,12 +27,12 @@ index 2b14b2c3fa21e67ebd8f344a6ee066d67bf53044..634e2bd3049d65bbef4ef12e2264049a this.a((MovingObjectPosition) object); this.impulse = true; diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java -index 078cc252313faca997e3a716fed5c5d2261c086c..6756c79b31aa04a110eeedd3c44b11abc34f4b5f 100644 +index 17ab9401dbd6c67488a79abeeed24e37c126b729..5c737d605219bcb0c509f10e62550981f7cdb03f 100644 --- a/src/main/java/net/minecraft/server/EntityFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireball.java -@@ -67,7 +67,16 @@ public abstract class EntityFireball extends Entity { - ++this.g; - MovingObjectPosition movingobjectposition = ProjectileHelper.a(this, true, this.g >= 25, this.shooter, RayTrace.BlockCollisionOption.COLLIDER); +@@ -57,7 +57,16 @@ public abstract class EntityFireball extends IProjectile { + + MovingObjectPosition movingobjectposition = ProjectileHelper.a(this, this::a, RayTrace.BlockCollisionOption.COLLIDER); - if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { + // Paper start - Call ProjectileCollideEvent @@ -48,55 +48,38 @@ index 078cc252313faca997e3a716fed5c5d2261c086c..6756c79b31aa04a110eeedd3c44b11ab this.a(movingobjectposition); // CraftBukkit start - Fire ProjectileHitEvent -diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 39e3bd37956d7e0a4d5f784a581e17a77b71f78b..807ec3394db7bef29bf92f2c200fd76f96df03ab 100644 ---- a/src/main/java/net/minecraft/server/EntityFishingHook.java -+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java -@@ -214,7 +214,16 @@ public class EntityFishingHook extends Entity { - return !entity.isSpectator() && (entity.isInteractable() || entity instanceof EntityItem) && (entity != this.owner || this.g >= 5); - }, RayTrace.BlockCollisionOption.COLLIDER, true); - -- if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { -+ // Paper start - Call ProjectileCollideEvent -+ if (movingobjectposition instanceof MovingObjectPositionEntity) { -+ com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileCollideEvent(this, (MovingObjectPositionEntity)movingobjectposition); -+ if (event.isCancelled()) { -+ movingobjectposition = null; -+ } -+ } -+ // Paper end -+ -+ if (movingobjectposition != null && movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { // Paper - add null check in case cancelled - org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // CraftBukkit - Call event - if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) { - this.hooked = ((MovingObjectPositionEntity) movingobjectposition).getEntity(); diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 2e4c9d42677d3e48a8f8ad559a723fc4eeec07e3..724b78b5d2d7f4ce8de31c763d2d95b986c1b7f6 100644 +index 9ca6b747050bf9db9b787a5190c3f4fd138beabc..2283307676e5f89a8d49be40b7ccae55f7881cf6 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java -@@ -99,7 +99,16 @@ public abstract class EntityProjectile extends Entity implements IProjectile { - this.ap = null; +@@ -41,12 +41,22 @@ public abstract class EntityProjectile extends IProjectile { } -- if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { -+ // Paper start - Call ProjectileCollideEvent -+ if (movingobjectposition instanceof MovingObjectPositionEntity) { -+ com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileCollideEvent(this, (MovingObjectPositionEntity)movingobjectposition); -+ if (event.isCancelled()) { -+ movingobjectposition = null; + if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && !flag) { ++ // Paper start - Call ProjectileCollideEvent ++ if (movingobjectposition instanceof MovingObjectPositionEntity) { ++ com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileCollideEvent(this, (MovingObjectPositionEntity)movingobjectposition); ++ if (event.isCancelled()) { ++ movingobjectposition = null; ++ } + } -+ } -+ // Paper end -+ -+ if (movingobjectposition != null && movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { // Paper - add null check in case cancelled - if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition()).getBlock() == Blocks.NETHER_PORTAL) { - this.c(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition()); - } else { ++ if (movingobjectposition != null) { ++ // Paper end + this.a(movingobjectposition); + // CraftBukkit start + if (this.dead) { + org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); + } + // CraftBukkit end ++ } // Paper + } + + Vec3D vec3d = this.getMot(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d9997278d335901138ff8bd29faaf88d4e0f36cf..f1a4de57282f3553f34245122bf15130420f558b 100644 +index b4da37eb1566c4f92d4e3dc6310cd1cc8ccbca7a..dc4fc5b300bb319be3d483aa7206bb0134343068 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1157,6 +1157,16 @@ public class CraftEventFactory { +@@ -1155,6 +1155,16 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } diff --git a/Spigot-Server-Patches/0126-Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/0125-Prevent-Pathfinding-out-of-World-Border.patch similarity index 88% rename from Spigot-Server-Patches/0126-Prevent-Pathfinding-out-of-World-Border.patch rename to Spigot-Server-Patches/0125-Prevent-Pathfinding-out-of-World-Border.patch index 8b69127385..39a11f46f2 100644 --- a/Spigot-Server-Patches/0126-Prevent-Pathfinding-out-of-World-Border.patch +++ b/Spigot-Server-Patches/0125-Prevent-Pathfinding-out-of-World-Border.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Pathfinding out of World Border This prevents Entities from trying to run outside of the World Border diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 39a0c45bb0e3d2fcfbcc07192f9e1e61570c922e..bdd092e49da13960cd8a65e989a351d65cb620f7 100644 +index 9330e65cbdf2f826528e3c891197fac7860306ec..b06c76a369f1dc9de8d782272c3ff0573af89361 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -123,7 +123,7 @@ public abstract class NavigationAbstract { +@@ -126,7 +126,7 @@ public abstract class NavigationAbstract { // Paper start - Pathfind event boolean copiedSet = false; for (BlockPosition possibleTarget : set) { diff --git a/Spigot-Server-Patches/0127-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch similarity index 86% rename from Spigot-Server-Patches/0127-Optimize-World.isLoaded-BlockPosition-Z.patch rename to Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch index 8eb7ae2704..d06ad5610a 100644 --- a/Spigot-Server-Patches/0127-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5dd504ea0b0d0ca7e7cd8c33473177f95c54bd8c..203c4173ff2467a027da059b2d473ec1a90bb88b 100644 +index 3e6dc44ede30846b8c612b043c1bd625576980e8..cfd03f29e6c46c66bf3ad9253c88e27b30f313c1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -225,6 +225,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -285,6 +285,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return chunk == null ? null : chunk.getFluid(blockposition); } diff --git a/Spigot-Server-Patches/0128-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch similarity index 54% rename from Spigot-Server-Patches/0128-Bound-Treasure-Maps-to-World-Border.patch rename to Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch index faf6834800..c10ce5e97c 100644 --- a/Spigot-Server-Patches/0128-Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch @@ -11,23 +11,23 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 0f248b6de3b822642389eba2ce3569a6538bdece..e8ce2ecf23e58d82febf6b9441e0004e69cdc858 100644 +index 68510457b527e61bf60bf1e7dfd664578172c00a..3880559505af742f1ab36f7959dc7fbd1e5da1b3 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java -@@ -108,6 +108,7 @@ public abstract class StructureGenerator +@@ -138,6 +138,7 @@ public abstract class StructureGenerator + int i2 = l + k * k1; + int j2 = i1 + k * l1; + ChunkCoordIntPair chunkcoordintpair = this.a(structuresettingsfeature, j, seededrandom, i2, j2); ++ if (!iworldreader.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper + IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS); + StructureStart structurestart = structuremanager.a(SectionPosition.a(ichunkaccess.getPos(), 0), this, ichunkaccess); - if (flag1 || flag2) { - ChunkCoordIntPair chunkcoordintpair = this.a(chunkgenerator, seededrandom, j, k, i1, j1); -+ if (!world.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper - StructureStart structurestart = world.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS).a(this.b()); - - if (structurestart != null && structurestart.e()) { diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 73730fe25c84a867b8d95525c9d76d60a5797396..4c20db5a3f9e159997a9851691aca421241d6d95 100644 +index d5c0d394feaf8bb991245dbdcc6252cf45eac13d..0ef92a320d132b443e76276b2c34a4626cf187db 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java -@@ -24,6 +24,18 @@ public class WorldBorder { - return (double) (blockposition.getX() + 1) > this.c() && (double) blockposition.getX() < this.e() && (double) (blockposition.getZ() + 1) > this.d() && (double) blockposition.getZ() < this.f(); +@@ -26,6 +26,18 @@ public class WorldBorder { + return (double) (blockposition.getX() + 1) > this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h(); } + // Paper start @@ -43,5 +43,5 @@ index 73730fe25c84a867b8d95525c9d76d60a5797396..4c20db5a3f9e159997a9851691aca421 + // Paper end + public boolean isInBounds(ChunkCoordIntPair chunkcoordintpair) { - return (double) chunkcoordintpair.f() > this.c() && (double) chunkcoordintpair.d() < this.e() && (double) chunkcoordintpair.g() > this.d() && (double) chunkcoordintpair.e() < this.f(); + return (double) chunkcoordintpair.f() > this.e() && (double) chunkcoordintpair.d() < this.g() && (double) chunkcoordintpair.g() > this.f() && (double) chunkcoordintpair.e() < this.h(); } diff --git a/Spigot-Server-Patches/0129-Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/0128-Configurable-Cartographer-Treasure-Maps.patch similarity index 83% rename from Spigot-Server-Patches/0129-Configurable-Cartographer-Treasure-Maps.patch rename to Spigot-Server-Patches/0128-Configurable-Cartographer-Treasure-Maps.patch index d512045073..f46bdadca6 100644 --- a/Spigot-Server-Patches/0129-Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/0128-Configurable-Cartographer-Treasure-Maps.patch @@ -28,13 +28,13 @@ index bff2e9d26dc8057c3950d1b57ee2e7469e7f943c..f164844f339793860e773c499443ce16 + } } diff --git a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java b/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java -index 5fe0da76bd172c2c552b2dd210e89be214c4385c..f7220f057e313ad137fe01397e43c4a42afbccc1 100644 +index 32a98e758b9df48005ddc5283eacdc5123a32c39..30f21e3ff7eed3c7291e01b94cc0f66fd48756d0 100644 --- a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java +++ b/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java -@@ -42,6 +42,15 @@ public class LootItemFunctionExplorationMap extends LootItemFunctionConditional +@@ -48,6 +48,15 @@ public class LootItemFunctionExplorationMap extends LootItemFunctionConditional if (blockposition != null) { - WorldServer worldserver = loottableinfo.c(); + WorldServer worldserver = loottableinfo.getWorld(); + // Paper start + if (!worldserver.paperConfig.enableTreasureMaps) { + /* @@ -44,20 +44,20 @@ index 5fe0da76bd172c2c552b2dd210e89be214c4385c..f7220f057e313ad137fe01397e43c4a4 + return itemstack; + } + // Paper end - BlockPosition blockposition1 = worldserver.a(this.d, blockposition, this.g, this.h); + BlockPosition blockposition1 = worldserver.a(this.e, blockposition, this.h, this.i); if (blockposition1 != null) { diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java -index 3bcf0b385d1f707176dae9c3ee49370e2e6dd481..4764ffef77bf0a73018017a07103186a9ce55b8f 100644 +index 532460e7549192dfe6170e2bf489edb46b8b5737..d0c2ec4050458e26d1bd85cc09b1a3fdca8488c6 100644 --- a/src/main/java/net/minecraft/server/VillagerTrades.java +++ b/src/main/java/net/minecraft/server/VillagerTrades.java -@@ -92,7 +92,8 @@ public class VillagerTrades { +@@ -91,7 +91,8 @@ public class VillagerTrades { return null; } else { WorldServer worldserver = (WorldServer) entity.world; -- BlockPosition blockposition = worldserver.a(this.b, new BlockPosition(entity), 100, true); -+ if (!worldserver.paperConfig.enableTreasureMaps) return null; //Paper -+ BlockPosition blockposition = worldserver.a(this.b, new BlockPosition(entity), 100, !worldserver.paperConfig.treasureMapsAlreadyDiscovered); //Paper +- BlockPosition blockposition = worldserver.a(this.b, entity.getChunkCoordinates(), 100, true); ++ if (!worldserver.paperConfig.enableTreasureMaps) return null; // Paper ++ BlockPosition blockposition = worldserver.a(this.b, entity.getChunkCoordinates(), 100, !worldserver.paperConfig.treasureMapsAlreadyDiscovered); // Paper if (blockposition != null) { ItemStack itemstack = ItemWorldMap.createFilledMapView(worldserver, blockposition.getX(), blockposition.getZ(), (byte) 2, true, true); diff --git a/Spigot-Server-Patches/0130-Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/0129-Optimize-ItemStack.isEmpty.patch similarity index 65% rename from Spigot-Server-Patches/0130-Optimize-ItemStack.isEmpty.patch rename to Spigot-Server-Patches/0129-Optimize-ItemStack.isEmpty.patch index 0f34b8cd1e..6c4eed7d3a 100644 --- a/Spigot-Server-Patches/0130-Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/0129-Optimize-ItemStack.isEmpty.patch @@ -6,15 +6,15 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index db11c8ec692aaf37fc68fd39b95fcadacf5eda38..854cffe6c98956cbafa2ead9b831e39209a76c8d 100644 +index a360711ea14983e8df34caa5edda80a015e6db23..c4d034c6a6ff176bc954c00c328512bdf67455a6 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -150,7 +150,7 @@ public final class ItemStack { +@@ -154,7 +154,7 @@ public final class ItemStack { } public boolean isEmpty() { -- return this == ItemStack.a ? true : (this.getItem() != null && this.getItem() != Items.AIR ? this.count <= 0 : true); -+ return this == ItemStack.a || this.item == null || this.item == Items.AIR || this.count <= 0; // Paper +- return this == ItemStack.b ? true : (this.getItem() != null && this.getItem() != Items.AIR ? this.count <= 0 : true); ++ return this == ItemStack.NULL_ITEM || this.item == null || this.item == Items.AIR || this.count <= 0; // Paper } public ItemStack cloneAndSubtract(int i) { diff --git a/Spigot-Server-Patches/0131-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/0130-Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 93% rename from Spigot-Server-Patches/0131-Add-API-methods-to-control-if-armour-stands-can-move.patch rename to Spigot-Server-Patches/0130-Add-API-methods-to-control-if-armour-stands-can-move.patch index 18dc2682d1..c05365d971 100644 --- a/Spigot-Server-Patches/0131-Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/0130-Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index ed6092f65a57b696d1343b5b6c061422bd1220b1..176af6c889fa29d5df7c822f888cdc26f81110e6 100644 +index 073c3e17eee996f2a9b620bbc13c59d6e342fd6c..3571ef9ac1299702ad274aad43070abf959bf9d9 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -43,6 +43,7 @@ public class EntityArmorStand extends EntityLiving { @@ -18,7 +18,7 @@ index ed6092f65a57b696d1343b5b6c061422bd1220b1..176af6c889fa29d5df7c822f888cdc26 super(entitytypes, world); @@ -817,4 +818,13 @@ public class EntityArmorStand extends EntityLiving { - return this.getEntityType().k().a(f); + return this.getEntityType().l().a(f); } + + // Paper start diff --git a/Spigot-Server-Patches/0132-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch similarity index 80% rename from Spigot-Server-Patches/0132-Properly-fix-item-duplication-bug.patch rename to Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch index 777cb2cbff..2791f467ad 100644 --- a/Spigot-Server-Patches/0132-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 482d7b7cb6b89d79b2ce54338130481f9f1c8c24..bf32997c422d478699c32ce0539a65c35fbf0d12 100644 +index 8ff3f34cc09e369d423370b9d713424b27b2dfcf..f4275e2ba2659d3087395105da9446225d3a904c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1795,7 +1795,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1933,7 +1933,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { @@ -19,10 +19,10 @@ index 482d7b7cb6b89d79b2ce54338130481f9f1c8c24..bf32997c422d478699c32ce0539a65c3 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7ed21a99e9025837bc5c38efa542df85dc2eb248..d6f5f176d4b5a39ddea4a9dc31a2322cc7d9d2d0 100644 +index 4c59b6beb0db3fd9d42e2f53519c40f211ef8bfb..f802bcb386b67e6c59aee68d6bfa507461f522cf 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2526,7 +2526,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2568,7 +2568,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } public final boolean isDisconnected() { diff --git a/Spigot-Server-Patches/0133-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch similarity index 88% rename from Spigot-Server-Patches/0133-String-based-Action-Bar-API.patch rename to Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch index ca1000312b..062d9f5804 100644 --- a/Spigot-Server-Patches/0133-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] String based Action Bar API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a85638fb4022361cb17cac0d666f26cdd1a5ef11..a4afce71be0707c43700b73ae0107074448e3d4a 100644 +index 20cb63419a049ce9dcaf2f0c99274501ebf9aa8c..527c116c23a505eead00e73a39ce9f932eb4ad8d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -215,6 +215,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -219,6 +219,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper start diff --git a/Spigot-Server-Patches/0134-Firework-API-s.patch b/Spigot-Server-Patches/0133-Firework-API-s.patch similarity index 61% rename from Spigot-Server-Patches/0134-Firework-API-s.patch rename to Spigot-Server-Patches/0133-Firework-API-s.patch index 48fc515adb..e8539eaf0f 100644 --- a/Spigot-Server-Patches/0134-Firework-API-s.patch +++ b/Spigot-Server-Patches/0133-Firework-API-s.patch @@ -5,29 +5,20 @@ Subject: [PATCH] Firework API's diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java -index 4f51b9b654e4a9c9ee43261edb241bcf3c346be2..278ef79d8962cc5d337e34891c7ea3a606336cbb 100644 +index fd34a0f2dcfe300763f31eda4d53951d66d875f7..5ac7957016d1ca6bc78ced0bcf3767d358677f45 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java -@@ -3,6 +3,8 @@ package net.minecraft.server; - import java.util.Iterator; - import java.util.List; - import java.util.OptionalInt; -+import java.util.UUID; -+ - import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit - - public class EntityFireworks extends Entity implements IProjectile { -@@ -12,7 +14,8 @@ public class EntityFireworks extends Entity implements IProjectile { +@@ -13,7 +13,8 @@ public class EntityFireworks extends IProjectile { public static final DataWatcherObject SHOT_AT_ANGLE = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); private int ticksFlown; public int expectedLifespan; - private EntityLiving ridingEntity; + private EntityLiving ridingEntity; public final EntityLiving getBoostedEntity() { return this.ridingEntity; } // Paper - OBFHELPER -+ public UUID spawningEntity; // Paper ++ public java.util.UUID spawningEntity; // Paper public EntityFireworks(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -268,6 +271,11 @@ public class EntityFireworks extends Entity implements IProjectile { +@@ -258,6 +259,11 @@ public class EntityFireworks extends IProjectile { } nbttagcompound.setBoolean("ShotAtAngle", (Boolean) this.datawatcher.get(EntityFireworks.SHOT_AT_ANGLE)); @@ -39,7 +30,7 @@ index 4f51b9b654e4a9c9ee43261edb241bcf3c346be2..278ef79d8962cc5d337e34891c7ea3a6 } @Override -@@ -283,7 +291,11 @@ public class EntityFireworks extends Entity implements IProjectile { +@@ -274,7 +280,11 @@ public class EntityFireworks extends IProjectile { if (nbttagcompound.hasKey("ShotAtAngle")) { this.datawatcher.set(EntityFireworks.SHOT_AT_ANGLE, nbttagcompound.getBoolean("ShotAtAngle")); } @@ -53,25 +44,25 @@ index 4f51b9b654e4a9c9ee43261edb241bcf3c346be2..278ef79d8962cc5d337e34891c7ea3a6 @Override diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 313076d6d8aa130451c4d6cc2795d34fd39f3e5d..7be41c8698e86727978db7d72b3dd3fbfe6b7272 100644 +index a2549cf1253f472d58ce68e4414448561a7a5ba4..1592e94c78611a4b968bfb24daf68570e778fadd 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java -@@ -199,6 +199,7 @@ public class ItemCrossbow extends ItemProjectileWeapon { +@@ -183,6 +183,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable if (flag1) { - object = new EntityFireworks(world, itemstack1, entityliving.locX(), entityliving.getHeadY() - 0.15000000596046448D, entityliving.locZ(), true); + object = new EntityFireworks(world, itemstack1, entityliving, entityliving.locX(), entityliving.getHeadY() - 0.15000000596046448D, entityliving.locZ(), true); + ((EntityFireworks) object).spawningEntity = entityliving.getUniqueID(); // Paper } else { object = a(world, entityliving, itemstack, itemstack1); if (flag || f3 != 0.0F) { diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index 058c016b7b12cea106916dbd81a231d29c67bc0f..92dac35ec4eefe0d5794d8205bc872d23a62e3cb 100644 +index 12ae2d9b747b69533fab2487ad55626c50c1d620..6cc243025f5bdac9be39f8a88a018893a9941dba 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java @@ -18,6 +18,7 @@ public class ItemFireworks extends Item { Vec3D vec3d = itemactioncontext.getPos(); EnumDirection enumdirection = itemactioncontext.getClickedFace(); - EntityFireworks entityfireworks = new EntityFireworks(world, vec3d.x + (double) enumdirection.getAdjacentX() * 0.15D, vec3d.y + (double) enumdirection.getAdjacentY() * 0.15D, vec3d.z + (double) enumdirection.getAdjacentZ() * 0.15D, itemstack); + EntityFireworks entityfireworks = new EntityFireworks(world, itemactioncontext.getEntity(), vec3d.x + (double) enumdirection.getAdjacentX() * 0.15D, vec3d.y + (double) enumdirection.getAdjacentY() * 0.15D, vec3d.z + (double) enumdirection.getAdjacentZ() * 0.15D, itemstack); + entityfireworks.spawningEntity = itemactioncontext.getEntity().getUniqueID(); // Paper world.addEntity(entityfireworks); @@ -90,57 +81,36 @@ index 058c016b7b12cea106916dbd81a231d29c67bc0f..92dac35ec4eefe0d5794d8205bc872d2 itemstack.subtract(1); } diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 75604dbc69d0a416dc9d56ae3f795ed03e120af8..98deaba12ceb25f59d1b56420fb544a64b417ddd 100644 +index c16ff6723d3fd191b990002d40dc021d7870555d..9c445902e6adc05773497bc4444203ca364e4f5c 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -136,7 +136,7 @@ public class NBTTagCompound implements NBTBase { - return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); +@@ -145,6 +145,7 @@ public class NBTTagCompound implements NBTBase { + return GameProfileSerializer.a(this.get(s)); } -- public boolean b(String s) { -+ public final boolean hasUUID(String s) { return this.b(s); } public boolean b(String s) { // Paper - OBFHELPER - return this.hasKeyOfType(s + "Most", 99) && this.hasKeyOfType(s + "Least", 99); - } ++ public final boolean hasUUID(String s) { return this.b(s); } // Paper - OBFHELPER + public boolean b(String s) { + NBTBase nbtbase = this.get(s); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -index 475b7b004b7b30ee9e7d0dad92c4691ecd4afbdc..de74e7214a02a07e3ebdd099036c70bbc84c60e1 100644 +index d984a7a78e9f8536abf7c30df9aa59dbfc7984ce..2dfa24e52ae9c46291090d367b1ee4e25a71c213 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -@@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity; - - import java.util.Random; - import net.minecraft.server.EntityFireworks; -+import net.minecraft.server.EntityLiving; - import net.minecraft.server.ItemStack; - import net.minecraft.server.Items; - import org.bukkit.Material; -@@ -9,8 +10,11 @@ import org.bukkit.craftbukkit.CraftServer; - import org.bukkit.craftbukkit.inventory.CraftItemStack; - import org.bukkit.entity.EntityType; - import org.bukkit.entity.Firework; -+import org.bukkit.entity.LivingEntity; - import org.bukkit.inventory.meta.FireworkMeta; - -+import java.util.UUID; -+ - public class CraftFirework extends CraftEntity implements Firework { - - private final Random random = new Random(); -@@ -78,4 +82,17 @@ public class CraftFirework extends CraftEntity implements Firework { +@@ -78,4 +78,17 @@ public class CraftFirework extends CraftProjectile implements Firework { public void setShotAtAngle(boolean shotAtAngle) { getHandle().getDataWatcher().set(EntityFireworks.SHOT_AT_ANGLE, shotAtAngle); } + + // Paper start + @Override -+ public UUID getSpawningEntity() { ++ public java.util.UUID getSpawningEntity() { + return getHandle().spawningEntity; + } + + @Override -+ public LivingEntity getBoostedEntity() { -+ EntityLiving boostedEntity = getHandle().getBoostedEntity(); -+ return boostedEntity != null ? (LivingEntity) boostedEntity.getBukkitEntity() : null; ++ public org.bukkit.entity.LivingEntity getBoostedEntity() { ++ net.minecraft.server.EntityLiving boostedEntity = getHandle().getBoostedEntity(); ++ return boostedEntity != null ? (org.bukkit.entity.LivingEntity) boostedEntity.getBukkitEntity() : null; + } + // Paper end } diff --git a/Spigot-Server-Patches/0135-PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0134-PlayerTeleportEndGatewayEvent.patch similarity index 89% rename from Spigot-Server-Patches/0135-PlayerTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0134-PlayerTeleportEndGatewayEvent.patch index 0478b625bf..c8310132f8 100644 --- a/Spigot-Server-Patches/0135-PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/0134-PlayerTeleportEndGatewayEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent Allows you to access the Gateway being used in a teleport event diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index b907a3c4d8dcf0d6dadb98807779fdfe1d706a52..78fba79378173dc2c4290e048c3497e206332458 100644 +index 06880e05cb17bcf9daef72cdbbbbbb8b62e2c584..71134f7f636611065f8cf8e3b82caf299bce0af8 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -@@ -133,7 +133,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick +@@ -151,7 +151,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick location.setPitch(player.getLocation().getPitch()); location.setYaw(player.getLocation().getYaw()); diff --git a/Spigot-Server-Patches/0136-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 93% rename from Spigot-Server-Patches/0136-Provide-E-TE-Chunk-count-stat-methods.patch rename to Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch index 28a446b8df..432e46ac7b 100644 --- a/Spigot-Server-Patches/0136-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1e4f45ef7e10156d6a48d907490009123028bff2..4ca9ddacb7da760b31d405e77b691ef6d8ff534a 100644 +index e13decf74e6dd9610253a5c923462d7bdff285c8..426b25c709a8e87f409156e252ea7597c154a50b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -278,6 +278,48 @@ public class CraftWorld implements World { +@@ -279,6 +279,48 @@ public class CraftWorld implements World { private int waterAnimalSpawn = -1; private int ambientSpawn = -1; diff --git a/Spigot-Server-Patches/0137-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch similarity index 86% rename from Spigot-Server-Patches/0137-Enforce-Sync-Player-Saves.patch rename to Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch index ba5eace7d2..aaeb34f775 100644 --- a/Spigot-Server-Patches/0137-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch @@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0f09cacf6d67dab5bc7962f19fcf3eba85ada4ff..18c81bdcf206ecaa331cc5186a29ad321870b57f 100644 +index 32be0e35918398f2fd5f62c2cb87c4597985b7b3..414e23fc24e90829b71def39b186f1913ce8300d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -918,11 +918,13 @@ public abstract class PlayerList { +@@ -960,11 +960,13 @@ public abstract class PlayerList { } public void savePlayers() { diff --git a/Spigot-Server-Patches/0138-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch similarity index 83% rename from Spigot-Server-Patches/0138-Don-t-allow-entities-to-ride-themselves-572.patch rename to Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch index 9ce22e7cdc..ebc1f711d6 100644 --- a/Spigot-Server-Patches/0138-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8a2093ac5a6d47c795523a1aab87e46f10b1699e..63649936525efd33f50c602f6d723085edb2896e 100644 +index 33262be7f883afeca6a8662ffcb5c44a4800e657..8bac1e7d8ad004fc7d248ed21382ca9042dfa9b7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2031,6 +2031,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1951,6 +1951,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } protected boolean addPassenger(Entity entity) { // CraftBukkit diff --git a/Spigot-Server-Patches/0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 75% rename from Spigot-Server-Patches/0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index aef7659aec..d941696ba6 100644 --- a/Spigot-Server-Patches/0139-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -8,10 +8,10 @@ Adds lots of information about why this orb exists. Replaces isFromBottle() with logic that persists entity reloads too. diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 5de881371a485957fd8fadc7540a2b549b20dd65..5f261b9b92de4ca8638f41fa2947016cf590cf05 100644 +index 3cc572b0ce757160c7ab4733b98d8ca84f9f325a..247d9300a755aa22c2ca3bcef86b3b25f3ed75ee 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -511,13 +511,13 @@ public class Block implements IMaterial { +@@ -236,13 +236,13 @@ public class Block extends BlockBase implements IMaterial { } } @@ -28,7 +28,7 @@ index 5de881371a485957fd8fadc7540a2b549b20dd65..5f261b9b92de4ca8638f41fa2947016c } diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java -index 2d2cd09ad1126b3b6b7a979b8e4dd450806d58d3..ed88e208d00f3b19b5c5916cf87513ab511a5fb1 100644 +index 5bdb0c3a7a04a55cd5ddff8e375497e402408811..fe9a083b724a8657cac8462b3f44d3cc12a4db58 100644 --- a/src/main/java/net/minecraft/server/ContainerGrindstone.java +++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java @@ -81,7 +81,7 @@ public class ContainerGrindstone extends Container { @@ -40,11 +40,24 @@ index 2d2cd09ad1126b3b6b7a979b8e4dd450806d58d3..ed88e208d00f3b19b5c5916cf87513ab } world.triggerEffect(1042, blockposition, 0); +diff --git a/src/main/java/net/minecraft/server/EntityAnimal.java b/src/main/java/net/minecraft/server/EntityAnimal.java +index 34db358bb1cac095593a5d2b1085ab26e85070b1..8b50bc593993ab60ab06b7b7307a7b78e04fa628 100644 +--- a/src/main/java/net/minecraft/server/EntityAnimal.java ++++ b/src/main/java/net/minecraft/server/EntityAnimal.java +@@ -227,7 +227,7 @@ public abstract class EntityAnimal extends EntityAgeable { + if (world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { + // CraftBukkit start - use event experience + if (experience > 0) { +- world.addEntity(new EntityExperienceOrb(world, this.locX(), this.locY(), this.locZ(), experience)); ++ world.addEntity(new EntityExperienceOrb(world, this.locX(), this.locY(), this.locZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper + } + // CraftBukkit end + } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 87625776963d6143d570cda8e72fda6b3f50047f..138e2ea56a91e519a34fd3be9c0ab111a4b17544 100644 +index 72a9430789301b264a36c5060ded31ccdc4a1ebf..05b7cdb33b45a4f503cd7fe4130b54d59e7b6452 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -616,7 +616,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { +@@ -612,7 +612,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { int j = EntityExperienceOrb.getOrbValue(i); i -= j; @@ -54,7 +67,7 @@ index 87625776963d6143d570cda8e72fda6b3f50047f..138e2ea56a91e519a34fd3be9c0ab111 } diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 0447800d9dc341af647a928abd8b79938eddbd6f..d4275e733d9996d121efd95ae1ff4676a1ebfbb5 100644 +index c13a47382d0a7456fa5035a64f42a6ed5e9f1c8e..d9a0cd1e90445ff7a1d9e7cef2f71e27bd3686cb 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -16,9 +16,59 @@ public class EntityExperienceOrb extends Entity { @@ -117,7 +130,7 @@ index 0447800d9dc341af647a928abd8b79938eddbd6f..d4275e733d9996d121efd95ae1ff4676 this.setPosition(d0, d1, d2); this.yaw = (float) (this.random.nextDouble() * 360.0D); this.setMot((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D); -@@ -158,6 +208,7 @@ public class EntityExperienceOrb extends Entity { +@@ -153,6 +203,7 @@ public class EntityExperienceOrb extends Entity { nbttagcompound.setShort("Health", (short) this.e); nbttagcompound.setShort("Age", (short) this.c); nbttagcompound.setShort("Value", (short) this.value); @@ -125,7 +138,7 @@ index 0447800d9dc341af647a928abd8b79938eddbd6f..d4275e733d9996d121efd95ae1ff4676 } @Override -@@ -165,6 +216,7 @@ public class EntityExperienceOrb extends Entity { +@@ -160,6 +211,7 @@ public class EntityExperienceOrb extends Entity { this.e = nbttagcompound.getShort("Health"); this.c = nbttagcompound.getShort("Age"); this.value = nbttagcompound.getShort("Value"); @@ -134,23 +147,36 @@ index 0447800d9dc341af647a928abd8b79938eddbd6f..d4275e733d9996d121efd95ae1ff4676 @Override diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 807ec3394db7bef29bf92f2c200fd76f96df03ab..73f5961aa331aa94fbbc57c5b4db9bc43ee5cdde 100644 +index 13b46c59b9a017bfa985ad74f80eca77608d1891..03c6a81346857392aacb22a0947bdc6391a260f2 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java -@@ -401,7 +401,7 @@ public class EntityFishingHook extends Entity { +@@ -454,7 +454,7 @@ public class EntityFishingHook extends IProjectile { this.world.addEntity(entityitem); // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop() if (playerFishEvent.getExpToDrop() > 0) { -- this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX(), this.owner.locY() + 0.5D, this.owner.locZ() + 0.5D, playerFishEvent.getExpToDrop())); -+ this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX(), this.owner.locY() + 0.5D, this.owner.locZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.owner, this)); // Paper +- entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX(), entityhuman.locY() + 0.5D, entityhuman.locZ() + 0.5D, playerFishEvent.getExpToDrop())); ++ entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX(), entityhuman.locY() + 0.5D, entityhuman.locZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.getOwner(), this)); // Paper } // CraftBukkit end - if (itemstack1.getItem().a(TagsItem.FISHES)) { + if (itemstack1.getItem().a((Tag) TagsItem.FISHES)) { +diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java +index c0c0187447976050ea57ae0c4bd62ba7f14c0f6b..95874526516291607a44ae2213d4d6d65edfe18d 100644 +--- a/src/main/java/net/minecraft/server/EntityFox.java ++++ b/src/main/java/net/minecraft/server/EntityFox.java +@@ -1234,7 +1234,7 @@ public class EntityFox extends EntityAnimal { + if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { + // CraftBukkit start - use event experience + if (experience > 0) { +- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience)); ++ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityfox)); // Paper + } + // CraftBukkit end + } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 9ba0bf40f823003a5966244e7cdde4e3e11da9ec..78785c11166e3541ee9ad1615c5e6fa46cfea523 100644 +index 9086712e1206a980a10c7cc36d3ae3a0b8f8bc79..7e4b79fcee2b5e9a2c24e0372cda7d71f38b22e3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1379,7 +1379,8 @@ public abstract class EntityLiving extends Entity { +@@ -1488,7 +1488,8 @@ public abstract class EntityLiving extends Entity { int j = EntityExperienceOrb.getOrbValue(i); i -= j; @@ -161,10 +187,10 @@ index 9ba0bf40f823003a5966244e7cdde4e3e11da9ec..78785c11166e3541ee9ad1615c5e6fa4 this.expToDrop = 0; } diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java -index 0bfc0a773da3e26cb0188adc8369215dcc953b62..ba2f90cc6ae617fe9bb8e08656b64ded924afa60 100644 +index 7a80b341ee7734cc289abdff8755834447cbef75..2d3ca8c424f2088027d51066d634c48723e96214 100644 --- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java +++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java -@@ -43,7 +43,7 @@ public class EntityThrownExpBottle extends EntityProjectileThrowable { +@@ -44,7 +44,7 @@ public class EntityThrownExpBottle extends EntityProjectileThrowable { int j = EntityExperienceOrb.getOrbValue(i); i -= j; @@ -174,10 +200,10 @@ index 0bfc0a773da3e26cb0188adc8369215dcc953b62..ba2f90cc6ae617fe9bb8e08656b64ded this.die(); diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index c73cc9ae4b1f1f24e017b336b4e0e52275807c8b..76296119a197a433747ee2481079b36aebdb085c 100644 +index 13c8fab8a57eb3f90abb4bbc5a6c5b5f8bdad0d2..dd745894614982fad6277e77b98bed75fc2a2f55 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java -@@ -510,7 +510,7 @@ public class EntityTurtle extends EntityAnimal { +@@ -499,7 +499,7 @@ public class EntityTurtle extends EntityAnimal { Random random = this.animal.getRandom(); if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { @@ -187,10 +213,10 @@ index c73cc9ae4b1f1f24e017b336b4e0e52275807c8b..76296119a197a433747ee2481079b36a } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 5e3835851d8c5e804542c256a54187e4ed05bace..6ca4fa43c41ad555c093b90cf08cfdb1e73fda22 100644 +index d0b04707e830fbaf3a6bfe92637e4432172fd9c7..00183a7f6e2000ce045ce50454f1296c4c93b148 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -509,7 +509,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -532,7 +532,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation } if (merchantrecipe.isRewardExp()) { @@ -200,10 +226,10 @@ index 5e3835851d8c5e804542c256a54187e4ed05bace..6ca4fa43c41ad555c093b90cf08cfdb1 } diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -index 530c69996470ad79b93254ed39aa1b101c007c89..2ad8dba5c0f8424becacda44232813c5f4451fd4 100644 +index e3a80bddc59c8f148a6a195deb3e8fa85fba4c7b..a0841cfaf950508b73b43a5fadbc1796015e5dbb 100644 --- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java +++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -@@ -147,7 +147,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { +@@ -144,7 +144,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { if (merchantrecipe.isRewardExp()) { int i = 3 + this.random.nextInt(4); @@ -212,24 +238,11 @@ index 530c69996470ad79b93254ed39aa1b101c007c89..2ad8dba5c0f8424becacda44232813c5 } } -diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java -index 1ab2668e910dca6c02d03b88b27fe709cbee785c..2b708761d0401ead80d8ff832decc8d725c5f61c 100644 ---- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java -+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java -@@ -117,7 +117,7 @@ public class PathfinderGoalBreed extends PathfinderGoal { - if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { - // CraftBukkit start - use event experience - if (experience > 0) { -- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience)); -+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper - } - // CraftBukkit end - } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index f6c6ea4aaf16fae057c356bc4f42fb3a86c63f91..dff3eb118856bb4b79e4378b5c39100d65a09767 100644 +index 136bb85aace4efc34e1fe804bbccc78bf7495b41..ee59d76d31b8b8cfd39d612b1e6040891f2256f4 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -374,7 +374,7 @@ public class PlayerInteractManager { +@@ -377,7 +377,7 @@ public class PlayerInteractManager { // Drop event experience if (flag && event != null) { @@ -252,30 +265,30 @@ index d2698e847cfcbc4d2f91b4f5d66b38b47f86c10e..edc4a5c34e8064d900668d132b3496e3 public SlotFurnaceResult(EntityHuman entityhuman, IInventory iinventory, int i, int j, int k) { diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 8dc47452a453023e332303575b36732417abd84e..560e2f42b702c5c4870640ad7da3aa48c3f4b1eb 100644 +index ba42ca08ca61832cb07bebcfa0b1e5422d7b30e9..623cd63711c6cb79dce7a46056e193fdb13334a5 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java -@@ -554,7 +554,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I - while (i > 0) { - j = EntityExperienceOrb.getOrbValue(i); - i -= j; -- entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX(), entityhuman.locY() + 0.5D, entityhuman.locZ() + 0.5D, j)); -+ entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX(), entityhuman.locY() + 0.5D, entityhuman.locZ() + 0.5D, j, org.bukkit.entity.ExperienceOrb.SpawnReason.FURNACE, entityhuman)); // Paper +@@ -573,7 +573,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I + int k = EntityExperienceOrb.getOrbValue(j); + + j -= k; +- world.addEntity(new EntityExperienceOrb(world, vec3d.x, vec3d.y, vec3d.z, k)); ++ world.addEntity(new EntityExperienceOrb(world, vec3d.x, vec3d.y, vec3d.z, k, org.bukkit.entity.ExperienceOrb.SpawnReason.FURNACE, entityhuman)); // Paper } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4ca9ddacb7da760b31d405e77b691ef6d8ff534a..13a83f285126123811a148453ccaea6f9bf197b4 100644 +index 426b25c709a8e87f409156e252ea7597c154a50b..876a62a456c8ff938cca4944b0b40a135dd6ac1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1797,7 +1797,7 @@ public class CraftWorld implements World { +@@ -1805,7 +1805,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)) { - entity = new EntityExperienceOrb(world, x, y, z, 0); + entity = new EntityExperienceOrb(world, x, y, z, 0, org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM, null, null); // Paper } else if (LightningStrike.class.isAssignableFrom(clazz)) { - entity = new EntityLightning(world, x, y, z, false); + entity = EntityTypes.LIGHTNING_BOLT.a(world); } else if (Firework.class.isAssignableFrom(clazz)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java index 1b512cc45c7a185b8a7950ff9882e1f2af171cc8..fbad0456757cadea4d7f50c63dbb07bad7e8baa9 100644 diff --git a/Spigot-Server-Patches/0140-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch similarity index 89% rename from Spigot-Server-Patches/0140-Cap-Entity-Collisions.patch rename to Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch index 6fd28f793a..f6a1745082 100644 --- a/Spigot-Server-Patches/0140-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch @@ -27,10 +27,10 @@ index f164844f339793860e773c499443ce160d0a6830..751551f173338217f6682532a9a5e1a2 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 63649936525efd33f50c602f6d723085edb2896e..0b971ad8addd65850162e46707c15fbc1ba9b8b9 100644 +index 8bac1e7d8ad004fc7d248ed21382ca9042dfa9b7..400e6d5784d1d92678bf26fa3dbffbe2e0424a65 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -189,6 +189,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; @@ -39,10 +39,10 @@ index 63649936525efd33f50c602f6d723085edb2896e..0b971ad8addd65850162e46707c15fbc // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 78785c11166e3541ee9ad1615c5e6fa46cfea523..f4d68a5f0a6d28f278596cb6787d070bacd792a4 100644 +index 7e4b79fcee2b5e9a2c24e0372cda7d71f38b22e3..0799f3b025c25204fddfd818b314ec1452a1ba1a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2626,8 +2626,11 @@ public abstract class EntityLiving extends Entity { +@@ -2778,8 +2778,11 @@ public abstract class EntityLiving extends Entity { } } diff --git a/Spigot-Server-Patches/0141-Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/0140-Remove-CraftScheduler-Async-Task-Debugger.patch similarity index 100% rename from Spigot-Server-Patches/0141-Remove-CraftScheduler-Async-Task-Debugger.patch rename to Spigot-Server-Patches/0140-Remove-CraftScheduler-Async-Task-Debugger.patch diff --git a/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch new file mode 100644 index 0000000000..b2d49c6fc2 --- /dev/null +++ b/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -0,0 +1,47 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Brokkonaut +Date: Tue, 7 Feb 2017 16:55:35 -0600 +Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue + + +diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java +index 9816b64c0760f334e508194ccb3f6b3ab54f7695..cec1baadf5e8e0459837522ca434327491005e8c 100644 +--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java ++++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +@@ -75,7 +75,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private final PlayerMap playerMap; + public final Int2ObjectMap trackedEntities; + private final Long2ByteMap z; +- private final Queue A; ++ private final Queue A; private final Queue getUnloadQueueTasks() { return this.A; } // Paper - OBFHELPER + private int viewDistance; + + // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() +@@ -133,7 +133,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + this.playerMap = new PlayerMap(); + this.trackedEntities = new Int2ObjectOpenHashMap(); + this.z = new Long2ByteOpenHashMap(); +- this.A = Queues.newConcurrentLinkedQueue(); ++ this.A = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper - need constant-time size() + this.definedStructureManager = definedstructuremanager; + this.w = convertable_conversionsession.a(worldserver.getDimensionKey()); + this.world = worldserver; +@@ -391,7 +391,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + // Spigot start + org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; + activityAccountant.startActivity(0.5); +- int targetSize = (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR); ++ int targetSize = Math.min(this.unloadQueue.size() - 100, (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive + // Spigot end + while (longiterator.hasNext()) { // Spigot + long j = longiterator.nextLong(); +@@ -413,7 +413,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + + Runnable runnable; + +- while ((booleansupplier.getAsBoolean() || this.A.size() > 2000) && (runnable = (Runnable) this.A.poll()) != null) { ++ int queueTarget = Math.min(this.getUnloadQueueTasks().size() - 100, (int) (this.getUnloadQueueTasks().size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Target this queue as well ++ while ((booleansupplier.getAsBoolean() || this.getUnloadQueueTasks().size() > queueTarget) && (runnable = (Runnable)this.getUnloadQueueTasks().poll()) != null) { // Paper - Target this queue as well + runnable.run(); + } + diff --git a/Spigot-Server-Patches/0142-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0142-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch deleted file mode 100644 index 05402127f0..0000000000 --- a/Spigot-Server-Patches/0142-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Brokkonaut -Date: Tue, 7 Feb 2017 16:55:35 -0600 -Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue - - -diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 6374bf8785f7d99ab8750deba79867433d31eb5f..0edba596754c6d5379c3c1eb0469aee447b7113f 100644 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java -+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -132,7 +132,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.u = new AtomicInteger(); - this.playerMap = new PlayerMap(); - this.trackedEntities = new Int2ObjectOpenHashMap(); -- this.z = Queues.newConcurrentLinkedQueue(); -+ this.z = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper - this.definedStructureManager = definedstructuremanager; - this.w = worldserver.getWorldProvider().getDimensionManager().a(file); - this.world = worldserver; -@@ -390,7 +390,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - // Spigot start - org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; - activityAccountant.startActivity(0.5); -- int targetSize = (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR); -+ int targetSize = Math.min(this.unloadQueue.size() - 100, (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive - // Spigot end - while (longiterator.hasNext()) { // Spigot - long j = longiterator.nextLong(); -@@ -412,7 +412,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - - Runnable runnable; - -- while ((booleansupplier.getAsBoolean() || this.z.size() > 2000) && (runnable = (Runnable) this.z.poll()) != null) { -+ int queueTarget = Math.min(this.z.size() - 100, (int) (this.z.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Target this queue as well -+ while ((booleansupplier.getAsBoolean() || this.z.size() > queueTarget) && (runnable = (Runnable) this.z.poll()) != null) { // Paper - Target this queue as well - runnable.run(); - } - From 8ac3123f9fa1e6a89fe880194adb4b18effa7fae Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Thu, 25 Jun 2020 06:11:48 -0700 Subject: [PATCH 08/95] even even more work --- ...> 0142-Do-not-let-armorstands-drown.patch} | 16 ++-- ...e-async-calls-to-restart-the-server.patch} | 22 ++--- ...roperty-to-disable-book-size-limits.patch} | 0 ...e-parrots-stay-on-shoulders-despite.patch} | 8 +- ...-option-to-prevent-player-names-fro.patch} | 4 +- ...leAppender-for-console-improvements.patch} | 60 ++++++------ ...rable-option-to-disable-creeper-lin.patch} | 4 +- ....patch => 0149-Item-canEntityPickup.patch} | 10 +- ...layerPickupItemEvent-setFlyAtPlayer.patch} | 8 +- ...> 0151-PlayerAttemptPickupItemEvent.patch} | 4 +- ...tch => 0152-Add-UnknownCommandEvent.patch} | 10 +- ...tch => 0153-Basic-PlayerProfile-API.patch} | 83 +++++++++-------- ... 0154-Shoulder-Entities-Release-API.patch} | 8 +- ...patch => 0155-Profile-Lookup-Events.patch} | 13 ++- ...layer-logins-during-server-shutdown.patch} | 4 +- ...patch => 0157-Entity-fromMobSpawner.patch} | 14 +-- ...8-Improve-the-Saddle-API-for-Horses.patch} | 4 +- ...plement-ensureServerConversions-API.patch} | 4 +- ...> 0160-Implement-getI18NDisplayName.patch} | 27 ++++-- ...=> 0161-ProfileWhitelistVerifyEvent.patch} | 15 ++- ...ch => 0162-Fix-this-stupid-bullshit.patch} | 4 +- ...wns-should-honor-nametags-and-leash.patch} | 4 +- ...mer-when-spawner-event-is-cancelled.patch} | 2 +- ...5-Fix-MC-117075-TE-Unload-Lag-Spike.patch} | 4 +- ...a-custom-authentication-servers-dow.patch} | 6 +- ...atch => 0167-LivingEntity-setKiller.patch} | 12 +-- ...ms-to-redirect-System.out-err-to-lo.patch} | 6 +- ...-prefixes-using-Log4J-configuration.patch} | 2 +- ...Include-Log4J2-SLF4J-implementation.patch} | 2 +- ...-Log4J-Configuration-Plugin-Loggers.patch} | 0 ...t.patch => 0172-Add-PlayerJumpEvent.patch} | 8 +- ...-handle-PacketPlayInKeepAlive-async.patch} | 7 +- ...t-protocol-version-and-virtual-host.patch} | 18 +--- ...t-serverside-behavior-of-keepalives.patch} | 18 ++-- ...Effects-only-to-players-who-can-see.patch} | 20 ++-- ...maximum-exp-value-when-merging-orbs.patch} | 4 +- .../0178-Add-PlayerArmorChangeEvent.patch | 43 +++++++++ .../0179-Add-PlayerArmorChangeEvent.patch | 43 --------- ...om-being-processed-when-the-player-.patch} | 6 +- ...-implementations-for-captured-block.patch} | 12 +-- ...get-a-BlockState-without-a-snapshot.patch} | 6 +- ...patch => 0182-AsyncTabCompleteEvent.patch} | 32 +++---- ...83-Avoid-NPE-in-PathfinderGoalTempt.patch} | 2 +- ...=> 0184-PlayerPickupExperienceEvent.patch} | 12 +-- ...tch => 0185-ExperienceOrbMergeEvent.patch} | 4 +- ...-Ability-to-apply-mending-to-XP-API.patch} | 14 +-- ...max-squid-spawn-height-configurable.patch} | 4 +- .../0188-PreCreatureSpawnEvent.patch | 92 +++++++++++++++++++ ...-PlayerNaturallySpawnCreaturesEvent.patch} | 22 ++--- .../0189-PreCreatureSpawnEvent.patch | 87 ------------------ ...Add-setPlayerProfile-API-for-Skulls.patch} | 0 ...> 0191-Fill-Profile-Property-Events.patch} | 7 +- ...layerAdvancementCriterionGrantEvent.patch} | 6 +- ...ch => 0193-Add-ArmorStand-Item-Meta.patch} | 4 +- ...Extend-Player-Interact-cancellation.patch} | 23 +++-- ... 0195-Tameable-getOwnerUniqueId-API.patch} | 4 +- ...-crits-helps-mitigate-hacked-client.patch} | 4 +- ...ing-location-from-InventoryEnderChe.patch} | 2 +- ...sted-Ice-from-loading-holding-chunks.patch | 31 +++++++ ...e-Explicit-Network-Manager-Flushing.patch} | 4 +- ...sted-Ice-from-loading-holding-chunks.patch | 30 ------ ...t-extended-PaperServerListPingEvent.patch} | 18 ++-- ... 0201-Improved-Async-Task-Scheduler.patch} | 0 ...-PlayerProfile-in-AsyncPreLoginEven.patch} | 8 +- 64 files changed, 486 insertions(+), 469 deletions(-) rename Spigot-Server-Patches/{0143-Do-not-let-armorstands-drown.patch => 0142-Do-not-let-armorstands-drown.patch} (70%) rename Spigot-Server-Patches/{0144-Properly-handle-async-calls-to-restart-the-server.patch => 0143-Properly-handle-async-calls-to-restart-the-server.patch} (93%) rename Spigot-Server-Patches/{0145-Add-system-property-to-disable-book-size-limits.patch => 0144-Add-system-property-to-disable-book-size-limits.patch} (100%) rename Spigot-Server-Patches/{0146-Add-option-to-make-parrots-stay-on-shoulders-despite.patch => 0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch} (89%) rename Spigot-Server-Patches/{0147-Add-configuration-option-to-prevent-player-names-fro.patch => 0146-Add-configuration-option-to-prevent-player-names-fro.patch} (91%) rename Spigot-Server-Patches/{0148-Use-TerminalConsoleAppender-for-console-improvements.patch => 0147-Use-TerminalConsoleAppender-for-console-improvements.patch} (91%) rename Spigot-Server-Patches/{0149-provide-a-configurable-option-to-disable-creeper-lin.patch => 0148-provide-a-configurable-option-to-disable-creeper-lin.patch} (91%) rename Spigot-Server-Patches/{0150-Item-canEntityPickup.patch => 0149-Item-canEntityPickup.patch} (85%) rename Spigot-Server-Patches/{0151-PlayerPickupItemEvent-setFlyAtPlayer.patch => 0150-PlayerPickupItemEvent-setFlyAtPlayer.patch} (88%) rename Spigot-Server-Patches/{0152-PlayerAttemptPickupItemEvent.patch => 0151-PlayerAttemptPickupItemEvent.patch} (91%) rename Spigot-Server-Patches/{0153-Add-UnknownCommandEvent.patch => 0152-Add-UnknownCommandEvent.patch} (83%) rename Spigot-Server-Patches/{0154-Basic-PlayerProfile-API.patch => 0153-Basic-PlayerProfile-API.patch} (90%) rename Spigot-Server-Patches/{0155-Shoulder-Entities-Release-API.patch => 0154-Shoulder-Entities-Release-API.patch} (92%) rename Spigot-Server-Patches/{0156-Profile-Lookup-Events.patch => 0155-Profile-Lookup-Events.patch} (90%) rename Spigot-Server-Patches/{0157-Block-player-logins-during-server-shutdown.patch => 0156-Block-player-logins-during-server-shutdown.patch} (85%) rename Spigot-Server-Patches/{0158-Entity-fromMobSpawner.patch => 0157-Entity-fromMobSpawner.patch} (85%) rename Spigot-Server-Patches/{0159-Improve-the-Saddle-API-for-Horses.patch => 0158-Improve-the-Saddle-API-for-Horses.patch} (94%) rename Spigot-Server-Patches/{0160-Implement-ensureServerConversions-API.patch => 0159-Implement-ensureServerConversions-API.patch} (86%) rename Spigot-Server-Patches/{0161-Implement-getI18NDisplayName.patch => 0160-Implement-getI18NDisplayName.patch} (64%) rename Spigot-Server-Patches/{0162-ProfileWhitelistVerifyEvent.patch => 0161-ProfileWhitelistVerifyEvent.patch} (82%) rename Spigot-Server-Patches/{0163-Fix-this-stupid-bullshit.patch => 0162-Fix-this-stupid-bullshit.patch} (91%) rename Spigot-Server-Patches/{0164-Ocelot-despawns-should-honor-nametags-and-leash.patch => 0163-Ocelot-despawns-should-honor-nametags-and-leash.patch} (85%) rename Spigot-Server-Patches/{0165-Reset-spawner-timer-when-spawner-event-is-cancelled.patch => 0164-Reset-spawner-timer-when-spawner-event-is-cancelled.patch} (93%) rename Spigot-Server-Patches/{0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch => 0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch} (87%) rename Spigot-Server-Patches/{0167-Allow-specifying-a-custom-authentication-servers-dow.patch => 0166-Allow-specifying-a-custom-authentication-servers-dow.patch} (91%) rename Spigot-Server-Patches/{0168-LivingEntity-setKiller.patch => 0167-LivingEntity-setKiller.patch} (82%) rename Spigot-Server-Patches/{0169-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch => 0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch} (88%) rename Spigot-Server-Patches/{0170-Handle-plugin-prefixes-using-Log4J-configuration.patch => 0169-Handle-plugin-prefixes-using-Log4J-configuration.patch} (97%) rename Spigot-Server-Patches/{0171-Include-Log4J2-SLF4J-implementation.patch => 0170-Include-Log4J2-SLF4J-implementation.patch} (88%) rename Spigot-Server-Patches/{0172-Improve-Log4J-Configuration-Plugin-Loggers.patch => 0171-Improve-Log4J-Configuration-Plugin-Loggers.patch} (100%) rename Spigot-Server-Patches/{0173-Add-PlayerJumpEvent.patch => 0172-Add-PlayerJumpEvent.patch} (90%) rename Spigot-Server-Patches/{0174-handle-PacketPlayInKeepAlive-async.patch => 0173-handle-PacketPlayInKeepAlive-async.patch} (85%) rename Spigot-Server-Patches/{0175-Expose-client-protocol-version-and-virtual-host.patch => 0174-Expose-client-protocol-version-and-virtual-host.patch} (86%) rename Spigot-Server-Patches/{0176-revert-serverside-behavior-of-keepalives.patch => 0175-revert-serverside-behavior-of-keepalives.patch} (93%) rename Spigot-Server-Patches/{0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch => 0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch} (89%) rename Spigot-Server-Patches/{0178-Option-for-maximum-exp-value-when-merging-orbs.patch => 0177-Option-for-maximum-exp-value-when-merging-orbs.patch} (95%) create mode 100644 Spigot-Server-Patches/0178-Add-PlayerArmorChangeEvent.patch delete mode 100644 Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch rename Spigot-Server-Patches/{0180-Prevent-logins-from-being-processed-when-the-player-.patch => 0179-Prevent-logins-from-being-processed-when-the-player-.patch} (83%) rename Spigot-Server-Patches/{0181-use-CB-BlockState-implementations-for-captured-block.patch => 0180-use-CB-BlockState-implementations-for-captured-block.patch} (87%) rename Spigot-Server-Patches/{0182-API-to-get-a-BlockState-without-a-snapshot.patch => 0181-API-to-get-a-BlockState-without-a-snapshot.patch} (94%) rename Spigot-Server-Patches/{0183-AsyncTabCompleteEvent.patch => 0182-AsyncTabCompleteEvent.patch} (83%) rename Spigot-Server-Patches/{0184-Avoid-NPE-in-PathfinderGoalTempt.patch => 0183-Avoid-NPE-in-PathfinderGoalTempt.patch} (90%) rename Spigot-Server-Patches/{0185-PlayerPickupExperienceEvent.patch => 0184-PlayerPickupExperienceEvent.patch} (70%) rename Spigot-Server-Patches/{0186-ExperienceOrbMergeEvent.patch => 0185-ExperienceOrbMergeEvent.patch} (91%) rename Spigot-Server-Patches/{0187-Ability-to-apply-mending-to-XP-API.patch => 0186-Ability-to-apply-mending-to-XP-API.patch} (87%) rename Spigot-Server-Patches/{0188-Make-max-squid-spawn-height-configurable.patch => 0187-Make-max-squid-spawn-height-configurable.patch} (92%) create mode 100644 Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch rename Spigot-Server-Patches/{0190-PlayerNaturallySpawnCreaturesEvent.patch => 0189-PlayerNaturallySpawnCreaturesEvent.patch} (82%) delete mode 100644 Spigot-Server-Patches/0189-PreCreatureSpawnEvent.patch rename Spigot-Server-Patches/{0191-Add-setPlayerProfile-API-for-Skulls.patch => 0190-Add-setPlayerProfile-API-for-Skulls.patch} (100%) rename Spigot-Server-Patches/{0192-Fill-Profile-Property-Events.patch => 0191-Fill-Profile-Property-Events.patch} (90%) rename Spigot-Server-Patches/{0193-PlayerAdvancementCriterionGrantEvent.patch => 0192-PlayerAdvancementCriterionGrantEvent.patch} (83%) rename Spigot-Server-Patches/{0194-Add-ArmorStand-Item-Meta.patch => 0193-Add-ArmorStand-Item-Meta.patch} (98%) rename Spigot-Server-Patches/{0195-Extend-Player-Interact-cancellation.patch => 0194-Extend-Player-Interact-cancellation.patch} (73%) rename Spigot-Server-Patches/{0196-Tameable-getOwnerUniqueId-API.patch => 0195-Tameable-getOwnerUniqueId-API.patch} (88%) rename Spigot-Server-Patches/{0197-Toggleable-player-crits-helps-mitigate-hacked-client.patch => 0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch} (91%) rename Spigot-Server-Patches/{0198-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch => 0197-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch} (92%) create mode 100644 Spigot-Server-Patches/0198-Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename Spigot-Server-Patches/{0200-Disable-Explicit-Network-Manager-Flushing.patch => 0199-Disable-Explicit-Network-Manager-Flushing.patch} (90%) delete mode 100644 Spigot-Server-Patches/0199-Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename Spigot-Server-Patches/{0201-Implement-extended-PaperServerListPingEvent.patch => 0200-Implement-extended-PaperServerListPingEvent.patch} (95%) rename Spigot-Server-Patches/{0202-Improved-Async-Task-Scheduler.patch => 0201-Improved-Async-Task-Scheduler.patch} (100%) rename Spigot-Server-Patches/{0203-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch => 0202-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch} (89%) diff --git a/Spigot-Server-Patches/0143-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0142-Do-not-let-armorstands-drown.patch similarity index 70% rename from Spigot-Server-Patches/0143-Do-not-let-armorstands-drown.patch rename to Spigot-Server-Patches/0142-Do-not-let-armorstands-drown.patch index 2be226b132..7d674d774b 100644 --- a/Spigot-Server-Patches/0143-Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/0142-Do-not-let-armorstands-drown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 176af6c889fa29d5df7c822f888cdc26f81110e6..992d7bfb0fd26540fbdeaf8d7845e8c2c81d608b 100644 +index 3571ef9ac1299702ad274aad43070abf959bf9d9..0232ffba7b18174e0ce44d91285541a9869d07b9 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -826,5 +826,10 @@ public class EntityArmorStand extends EntityLiving { @@ -20,22 +20,22 @@ index 176af6c889fa29d5df7c822f888cdc26f81110e6..992d7bfb0fd26540fbdeaf8d7845e8c2 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f4d68a5f0a6d28f278596cb6787d070bacd792a4..28d873d8fe7bb79d2a84eb9bf234ac8ba0223813 100644 +index 0799f3b025c25204fddfd818b314ec1452a1ba1a..34f2821a64c7893ff0a8c33ae4b77ce883227f0c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -227,6 +227,7 @@ public abstract class EntityLiving extends Entity { +@@ -244,6 +244,7 @@ public abstract class EntityLiving extends Entity { super.a(d0, flag, iblockdata, blockposition); } -+ public boolean canBreatheUnderwater() { return this.cB(); } // Paper - OBFHELPER - public boolean cB() { ++ public boolean canBreatheUnderwater() { return this.cL(); } // Paper - OBFHELPER + public boolean cL() { return this.getMonsterType() == EnumMonsterType.UNDEAD; } -@@ -266,7 +267,7 @@ public abstract class EntityLiving extends Entity { +@@ -287,7 +288,7 @@ public abstract class EntityLiving extends Entity { if (this.isAlive()) { - if (this.a(TagsFluid.WATER) && this.world.getType(new BlockPosition(this.locX(), this.getHeadY(), this.locZ())).getBlock() != Blocks.BUBBLE_COLUMN) { -- if (!this.cB() && !MobEffectUtil.c(this) && !flag1) { + if (this.a((Tag) TagsFluid.WATER) && !this.world.getType(new BlockPosition(this.locX(), this.getHeadY(), this.locZ())).a(Blocks.BUBBLE_COLUMN)) { +- if (!this.cL() && !MobEffectUtil.c(this) && !flag1) { + if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden this.setAirTicks(this.l(this.getAirTicks())); if (this.getAirTicks() == -20) { diff --git a/Spigot-Server-Patches/0144-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch similarity index 93% rename from Spigot-Server-Patches/0144-Properly-handle-async-calls-to-restart-the-server.patch rename to Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch index 7781480243..647a8d42dd 100644 --- a/Spigot-Server-Patches/0144-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch @@ -30,18 +30,18 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 629304c403c596bf81dd8de919f0fcb5c77bd403..80d8b0b0eac47b8d8e62db60da9daf0da8671fb3 100644 +index 800ca2d57295c40853f5f1e58ce15e75f1a5afad..8e47f5f5dcf217169107913cc0c8332ce881c644 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -88,6 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant worldServer = Maps.newLinkedHashMap(); // CraftBukkit - keep order, k+v already use identity methods +@@ -90,6 +90,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant, WorldServer> worldServer; private PlayerList playerList; - private volatile boolean isRunning = true; + private volatile boolean isRunning; + private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart private boolean isStopped; private int ticks; protected final Proxy proxy; -@@ -723,7 +724,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0.5F || this.isInWater()) || this.abilities.isFlying || this.isSleeping()) { @@ -39,10 +39,10 @@ index 0e8ba05455161883c86df6606104fab3529c3c0c..ad79e4521cee699de86a94885b273563 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d6f5f176d4b5a39ddea4a9dc31a2322cc7d9d2d0..26f894c752d623ed082f97fdbffe5a6680a941b7 100644 +index f802bcb386b67e6c59aee68d6bfa507461f522cf..ace3f3e30224c09bdb296e4ac2974fb0bd3e7dbc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1773,6 +1773,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1817,6 +1817,13 @@ public class PlayerConnection implements PacketListenerPlayIn { switch (packetplayinentityaction.c()) { case PRESS_SHIFT_KEY: this.player.setSneaking(true); diff --git a/Spigot-Server-Patches/0147-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch similarity index 91% rename from Spigot-Server-Patches/0147-Add-configuration-option-to-prevent-player-names-fro.patch rename to Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch index 4cbe763be8..f76895be12 100644 --- a/Spigot-Server-Patches/0147-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,10 +20,10 @@ index 5a83fc21cb6801d597a01fb4a83d30488f30bdb6..295b8390cbc31fc1fcb225f80ec2ff8f + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3cb57c3b8ca8f29437bea52e9cf3512985f56eb5..9eb4acf93c65a1473e385be317e5d93cd4571d41 100644 +index a0d1e57ff34dfb36913ff937575bb3c1ad444f54..2cbf143d1a01a34c67b75ab1f7cd35f4a3a2f751 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2137,5 +2137,10 @@ public final class CraftServer implements Server { +@@ -2188,5 +2188,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/Spigot-Server-Patches/0148-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch similarity index 91% rename from Spigot-Server-Patches/0148-Use-TerminalConsoleAppender-for-console-improvements.patch rename to Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch index 2e701fd660..d8a1a418cd 100644 --- a/Spigot-Server-Patches/0148-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -19,7 +19,7 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 3554314526b3f33ad02df2adfd42d45118d75526..aeaceac771644ece5365d07be77f4481ced2fe13 100644 +index 7bc5bf271e435e1e0d85af133f1352f319f462b5..2acc2a98bd8df6d81b5865b768265a210597b57b 100644 --- a/pom.xml +++ b/pom.xml @@ -44,10 +44,27 @@ @@ -144,10 +144,10 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 4b1f8c53737f998fa57859146d5ddb999cdc8d41..d34f772fae3543cec6a130831b1f3eaa67934944 100644 +index b091db5901d75769e406c454b205f102c82ca021..49b5c226dcbd4ef7d2a3418ef2c7e98bb689ccfb 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -86,6 +86,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -62,6 +62,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer if (!org.bukkit.craftbukkit.Main.useConsole) { return; } @@ -157,7 +157,7 @@ index 4b1f8c53737f998fa57859146d5ddb999cdc8d41..d34f772fae3543cec6a130831b1f3eaa jline.console.ConsoleReader bufferedreader = reader; // MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return -@@ -125,6 +128,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -101,6 +104,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer DedicatedServer.LOGGER.error("Exception handling console input", ioexception); } @@ -166,7 +166,7 @@ index 4b1f8c53737f998fa57859146d5ddb999cdc8d41..d34f772fae3543cec6a130831b1f3eaa } }; -@@ -136,6 +141,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -112,6 +117,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler()); @@ -176,7 +176,7 @@ index 4b1f8c53737f998fa57859146d5ddb999cdc8d41..d34f772fae3543cec6a130831b1f3eaa final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger()); for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) { if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) { -@@ -144,6 +152,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -120,6 +128,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start(); @@ -186,7 +186,7 @@ index 4b1f8c53737f998fa57859146d5ddb999cdc8d41..d34f772fae3543cec6a130831b1f3eaa System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 80d8b0b0eac47b8d8e62db60da9daf0da8671fb3..ed32242bd169e9f28607942aa31aa48a5799b215 100644 +index 8e47f5f5dcf217169107913cc0c8332ce881c644..f2cdf60fd96f94e09a17ad1bdec522d282ccf3e9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -57,7 +57,7 @@ import org.apache.commons.lang3.Validate; @@ -194,11 +194,11 @@ index 80d8b0b0eac47b8d8e62db60da9daf0da8671fb3..ed32242bd169e9f28607942aa31aa48a import org.apache.logging.log4j.Logger; // CraftBukkit start -import jline.console.ConsoleReader; -+import joptsimple.OptionSet; ++// Paper + import joptsimple.OptionSet; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.CraftServer; - import org.bukkit.craftbukkit.Main; -@@ -161,7 +161,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -212,7 +212,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant collection = this.getEffects(); diff --git a/Spigot-Server-Patches/0150-Item-canEntityPickup.patch b/Spigot-Server-Patches/0149-Item-canEntityPickup.patch similarity index 85% rename from Spigot-Server-Patches/0150-Item-canEntityPickup.patch rename to Spigot-Server-Patches/0149-Item-canEntityPickup.patch index cfb76ecb2f..2f36a0331f 100644 --- a/Spigot-Server-Patches/0150-Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/0149-Item-canEntityPickup.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 1732c1ae9537957c51da5e484b55febb6e9f0091..b5816dc89ede5f5f1780d3086d9b1a41fba2b19d 100644 +index f2cd6824790d7e76f8f10e2630bcd5ebbf2a4238..3997dc6d979bf5a027861397b948aa4e8486fc58 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -521,6 +521,11 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -539,6 +539,11 @@ public abstract class EntityInsentient extends EntityLiving { EntityItem entityitem = (EntityItem) iterator.next(); - if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.p()) { + if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.p() && this.i(entityitem.getItemStack())) { + // Paper Start + if (!entityitem.canMobPickup) { + continue; + } + // Paper End - this.a(entityitem); + this.b(entityitem); } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 208dad2a34de2b898c3811af6e5363009f97a55f..97c6a8b6bd0bf9738428c2fda24b9e2586a783dd 100644 +index ca1cc67fea6f1607a2d3d7869a0a023616c02ff7..159552192c2a6d62fb205ed5973f89a16e619d94 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -20,6 +20,7 @@ public class EntityItem extends Entity { diff --git a/Spigot-Server-Patches/0151-PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-Server-Patches/0150-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 88% rename from Spigot-Server-Patches/0151-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to Spigot-Server-Patches/0150-PlayerPickupItemEvent-setFlyAtPlayer.patch index 5e6f47cbab..b3d01ce2d6 100644 --- a/Spigot-Server-Patches/0151-PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/Spigot-Server-Patches/0150-PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 97c6a8b6bd0bf9738428c2fda24b9e2586a783dd..8747dc7075ebe178f3b9ad3cb56f52847fd194b5 100644 +index 159552192c2a6d62fb205ed5973f89a16e619d94..2546a706ef107fd94e4c17c10091d6c0a7241a70 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java -@@ -322,6 +322,7 @@ public class EntityItem extends Entity { +@@ -331,6 +331,7 @@ public class EntityItem extends Entity { // CraftBukkit start - fire PlayerPickupItemEvent int canHold = entityhuman.inventory.canHold(itemstack); int remaining = i - canHold; @@ -16,7 +16,7 @@ index 97c6a8b6bd0bf9738428c2fda24b9e2586a783dd..8747dc7075ebe178f3b9ad3cb56f5284 if (this.pickupDelay <= 0 && canHold > 0) { itemstack.setCount(canHold); -@@ -329,8 +330,14 @@ public class EntityItem extends Entity { +@@ -338,8 +339,14 @@ public class EntityItem extends Entity { PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); playerEvent.setCancelled(!entityhuman.canPickUpLoot); this.world.getServer().getPluginManager().callEvent(playerEvent); @@ -31,7 +31,7 @@ index 97c6a8b6bd0bf9738428c2fda24b9e2586a783dd..8747dc7075ebe178f3b9ad3cb56f5284 return; } -@@ -354,7 +361,11 @@ public class EntityItem extends Entity { +@@ -363,7 +370,11 @@ public class EntityItem extends Entity { // CraftBukkit end if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) { diff --git a/Spigot-Server-Patches/0152-PlayerAttemptPickupItemEvent.patch b/Spigot-Server-Patches/0151-PlayerAttemptPickupItemEvent.patch similarity index 91% rename from Spigot-Server-Patches/0152-PlayerAttemptPickupItemEvent.patch rename to Spigot-Server-Patches/0151-PlayerAttemptPickupItemEvent.patch index ee15d11ed1..59b70943db 100644 --- a/Spigot-Server-Patches/0152-PlayerAttemptPickupItemEvent.patch +++ b/Spigot-Server-Patches/0151-PlayerAttemptPickupItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 8747dc7075ebe178f3b9ad3cb56f52847fd194b5..5efcc50ab9e8a99d88a9d2e7f15ecbcc4439b93e 100644 +index 2546a706ef107fd94e4c17c10091d6c0a7241a70..cc173445caa0a064e724bc29b4955232a1dc1816 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -9,6 +9,7 @@ import javax.annotation.Nullable; @@ -16,7 +16,7 @@ index 8747dc7075ebe178f3b9ad3cb56f52847fd194b5..5efcc50ab9e8a99d88a9d2e7f15ecbcc public class EntityItem extends Entity { -@@ -324,6 +325,22 @@ public class EntityItem extends Entity { +@@ -333,6 +334,22 @@ public class EntityItem extends Entity { int remaining = i - canHold; boolean flyAtPlayer = false; // Paper diff --git a/Spigot-Server-Patches/0153-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch similarity index 83% rename from Spigot-Server-Patches/0153-Add-UnknownCommandEvent.patch rename to Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch index 2dfe5a6c90..e6d9d23db3 100644 --- a/Spigot-Server-Patches/0153-Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch @@ -5,18 +5,18 @@ 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 681a84e5b3e7594a43fac0d47f1df2eef310bf81..f01bd38d0b600a69224f610fd77a542ec6d1c322 100644 +index 08bc47fdec472c73493cc1a75bd0d84287b1c811..1d7549e03bc43f1867662acf12ae3cb82a951478 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -80,6 +80,7 @@ import net.minecraft.server.WorldServer; +@@ -104,6 +104,7 @@ import net.minecraft.server.WorldNBTStorage; + import net.minecraft.server.WorldServer; import net.minecraft.server.WorldSettings; - import net.minecraft.server.WorldType; import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.StringUtils; import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -@@ -151,6 +152,7 @@ import org.bukkit.craftbukkit.util.Versioning; +@@ -175,6 +176,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 681a84e5b3e7594a43fac0d47f1df2eef310bf81..f01bd38d0b600a69224f610fd77a542e import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerChatTabCompleteEvent; import org.bukkit.event.server.BroadcastMessageEvent; -@@ -751,7 +753,13 @@ public final class CraftServer implements Server { +@@ -775,7 +777,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch similarity index 90% rename from Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch rename to Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch index df8c488a2d..a14be80b42 100644 --- a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch @@ -309,23 +309,24 @@ index 0000000000000000000000000000000000000000..d73de9eb89c4e3a748907f2da21a3072 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java new file mode 100644 -index 0000000000000000000000000000000000000000..25836b975b51af701d4b9523ab398fbf157b82fd +index 0000000000000000000000000000000000000000..ef9f55afd6bffa8c02c6820295223e5465eed91e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java -@@ -0,0 +1,30 @@ +@@ -0,0 +1,31 @@ +package com.destroystokyo.paper.profile; + -+import com.mojang.authlib.Agent; -+import com.mojang.authlib.GameProfileRepository; -+import com.mojang.authlib.UserAuthentication; ++import com.mojang.authlib.*; +import com.mojang.authlib.minecraft.MinecraftSessionService; +import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; ++import com.mojang.authlib.yggdrasil.YggdrasilEnvironment; + +import java.net.Proxy; + +public class PaperAuthenticationService extends YggdrasilAuthenticationService { ++ private final Environment environment; + public PaperAuthenticationService(Proxy proxy, String clientToken) { + super(proxy, clientToken); ++ this.environment = (Environment)EnvironmentParser.getEnvironmentFromProperties().orElse(YggdrasilEnvironment.PROD);; + } + + @Override @@ -335,30 +336,31 @@ index 0000000000000000000000000000000000000000..25836b975b51af701d4b9523ab398fbf + + @Override + public MinecraftSessionService createMinecraftSessionService() { -+ return new PaperMinecraftSessionService(this); ++ return new PaperMinecraftSessionService(this, this.environment); + } + + @Override + public GameProfileRepository createProfileRepository() { -+ return new PaperGameProfileRepository(this); ++ return new PaperGameProfileRepository(this, this.environment); + } +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java new file mode 100644 -index 0000000000000000000000000000000000000000..3bcdb8f93f1930ee53395470ffb3833e2bd75222 +index 0000000000000000000000000000000000000000..582c169c85ac66f1f9430f79042e4655f776c157 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java -@@ -0,0 +1,17 @@ +@@ -0,0 +1,18 @@ +package com.destroystokyo.paper.profile; + +import com.mojang.authlib.Agent; ++import com.mojang.authlib.Environment; +import com.mojang.authlib.ProfileLookupCallback; +import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; +import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository; + +public class PaperGameProfileRepository extends YggdrasilGameProfileRepository { -+ public PaperGameProfileRepository(YggdrasilAuthenticationService authenticationService) { -+ super(authenticationService); ++ public PaperGameProfileRepository(YggdrasilAuthenticationService authenticationService, Environment environment) { ++ super(authenticationService, environment); + } + + @Override @@ -368,12 +370,13 @@ index 0000000000000000000000000000000000000000..3bcdb8f93f1930ee53395470ffb3833e +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java new file mode 100644 -index 0000000000000000000000000000000000000000..4b2a67423f57b70d316115e4525e3841a415b1cc +index 0000000000000000000000000000000000000000..93d73c27340645c7502acafdc0b2cfbc1a759dd8 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java -@@ -0,0 +1,29 @@ +@@ -0,0 +1,30 @@ +package com.destroystokyo.paper.profile; + ++import com.mojang.authlib.Environment; +import com.mojang.authlib.GameProfile; +import com.mojang.authlib.minecraft.MinecraftProfileTexture; +import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; @@ -382,8 +385,8 @@ index 0000000000000000000000000000000000000000..4b2a67423f57b70d316115e4525e3841 +import java.util.Map; + +public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionService { -+ protected PaperMinecraftSessionService(YggdrasilAuthenticationService authenticationService) { -+ super(authenticationService); ++ protected PaperMinecraftSessionService(YggdrasilAuthenticationService authenticationService, Environment environment) { ++ super(authenticationService, environment); + } + + @Override @@ -419,7 +422,7 @@ index 0000000000000000000000000000000000000000..3aceb0ea8a1a3ed94dd8a9e954c52ecd + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 16302c4ac6d3e40318a762cea0afcf3f94715216..148917547bb7a626d1b2bacce7385607043db7e2 100644 +index da7a325d070e194cd1664ed20dcb3a762c9a517a..797654c653ec6dc4d46b457cf8a6121b29eca7aa 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -1,8 +1,11 @@ @@ -445,21 +448,25 @@ index 16302c4ac6d3e40318a762cea0afcf3f94715216..148917547bb7a626d1b2bacce7385607 /** * Calculates distance between 2 entities * @param e1 -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ed32242bd169e9f28607942aa31aa48a5799b215..54f80cb8e1b771f2a493543e04f8bc8346a391dc 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1304,7 +1304,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant() { @Override -@@ -178,7 +179,16 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa +@@ -181,7 +182,16 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa } else if (MinecraftServer.getServer() == null) { callback.apply(gameprofile); } else { @@ -496,7 +503,7 @@ index 177cceb77f8783fe93ba7e4342de9c589f155c1b..83faa9dc5f74df4609cab34a66e4feed if (profile != null && Iterables.getFirst(profile.getProperties().get("textures"), (Object) null) != null) { callback.apply(profile); -@@ -187,7 +197,10 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa +@@ -190,7 +200,10 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa Callable callable = new Callable() { @Override public GameProfile call() { @@ -509,7 +516,7 @@ index 177cceb77f8783fe93ba7e4342de9c589f155c1b..83faa9dc5f74df4609cab34a66e4feed @Override public void run() { diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index 581199e6dcddb3692ccc6b6cf6c42fa5ef1f5e7e..39d2f83531d539fb96824c2e6a9018c12ea75272 100644 +index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f7262546666e32883 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -43,7 +43,7 @@ public class UserCache { @@ -521,7 +528,7 @@ index 581199e6dcddb3692ccc6b6cf6c42fa5ef1f5e7e..39d2f83531d539fb96824c2e6a9018c1 private final Map e = new java.util.concurrent.ConcurrentHashMap<>(); // Paper private final Deque f = new java.util.concurrent.LinkedBlockingDeque(); // CraftBukkit private final GameProfileRepository g; -@@ -104,6 +104,7 @@ public class UserCache { +@@ -93,6 +93,7 @@ public class UserCache { return UserCache.c; } @@ -529,7 +536,7 @@ index 581199e6dcddb3692ccc6b6cf6c42fa5ef1f5e7e..39d2f83531d539fb96824c2e6a9018c1 public void a(GameProfile gameprofile) { this.a(gameprofile, (Date) null); } -@@ -165,6 +166,13 @@ public class UserCache { +@@ -154,6 +155,13 @@ public class UserCache { return usercache_usercacheentry == null ? null : usercache_usercacheentry.a(); } @@ -543,7 +550,7 @@ index 581199e6dcddb3692ccc6b6cf6c42fa5ef1f5e7e..39d2f83531d539fb96824c2e6a9018c1 @Nullable public GameProfile getProfile(UUID uuid) { UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.e.get(uuid); -@@ -273,7 +281,7 @@ public class UserCache { +@@ -262,7 +270,7 @@ public class UserCache { class UserCacheEntry { @@ -553,10 +560,10 @@ index 581199e6dcddb3692ccc6b6cf6c42fa5ef1f5e7e..39d2f83531d539fb96824c2e6a9018c1 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f01bd38d0b600a69224f610fd77a542ec6d1c322..95f4abddf57eb8c59cb5a5410b8d551d39f94fd7 100644 +index 1d7549e03bc43f1867662acf12ae3cb82a951478..07a4ce8c71d52f4a6f1f9c97b9cb143c72db8af9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -200,6 +200,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -224,6 +224,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot @@ -566,7 +573,7 @@ index f01bd38d0b600a69224f610fd77a542ec6d1c322..95f4abddf57eb8c59cb5a5410b8d551d public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2154,5 +2157,24 @@ public final class CraftServer implements Server { +@@ -2205,5 +2208,24 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0155-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0154-Shoulder-Entities-Release-API.patch similarity index 92% rename from Spigot-Server-Patches/0155-Shoulder-Entities-Release-API.patch rename to Spigot-Server-Patches/0154-Shoulder-Entities-Release-API.patch index b7180c1141..c7748f0853 100644 --- a/Spigot-Server-Patches/0155-Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/0154-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index ad79e4521cee699de86a94885b27356339bcb866..8e5edd2c9b7cc9a441969efeb666061515188486 100644 +index 0dc2ffcfceeffed2cb949d31c4f976bce639f110..69c0a4c7bfb1c753d544dcd074ad832d3e5ef3a0 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1901,20 +1901,44 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1779,20 +1779,44 @@ public abstract class EntityHuman extends EntityLiving { } @@ -58,10 +58,10 @@ index ad79e4521cee699de86a94885b27356339bcb866..8e5edd2c9b7cc9a441969efeb6660615 @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 2c20a7b924e055794f6d3a296db754129052c3fe..191bb7345e06cbad7bef416e4e849df3727bdac0 100644 +index 9e0bd99122832d3dc25a79569d9e134d0d072fa4..d67fd3bf1048afae0bb78a95724ddf53337d9a2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -518,6 +518,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -485,6 +485,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { getHandle().getCooldownTracker().setCooldown(CraftMagicNumbers.getItem(material), ticks); } diff --git a/Spigot-Server-Patches/0156-Profile-Lookup-Events.patch b/Spigot-Server-Patches/0155-Profile-Lookup-Events.patch similarity index 90% rename from Spigot-Server-Patches/0156-Profile-Lookup-Events.patch rename to Spigot-Server-Patches/0155-Profile-Lookup-Events.patch index f2898230e9..a9a4210f19 100644 --- a/Spigot-Server-Patches/0156-Profile-Lookup-Events.patch +++ b/Spigot-Server-Patches/0155-Profile-Lookup-Events.patch @@ -7,28 +7,27 @@ Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in p profiles that had to be looked up. diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java -index 3bcdb8f93f1930ee53395470ffb3833e2bd75222..bb9894318e1ff75f0c5611a65d3e4d9969eab1fb 100644 +index 582c169c85ac66f1f9430f79042e4655f776c157..08fdb681a68e8be6e4062af0630957ce3e524806 100644 --- a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java -@@ -1,17 +1,68 @@ +@@ -1,11 +1,16 @@ package com.destroystokyo.paper.profile; +import com.destroystokyo.paper.event.profile.LookupProfileEvent; +import com.destroystokyo.paper.event.profile.PreLookupProfileEvent; +import com.google.common.collect.Sets; import com.mojang.authlib.Agent; + import com.mojang.authlib.Environment; +import com.mojang.authlib.GameProfile; import com.mojang.authlib.ProfileLookupCallback; import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository; +import java.util.Set; -+ public class PaperGameProfileRepository extends YggdrasilGameProfileRepository { -+ - public PaperGameProfileRepository(YggdrasilAuthenticationService authenticationService) { - super(authenticationService); - } + public PaperGameProfileRepository(YggdrasilAuthenticationService authenticationService, Environment environment) { + super(authenticationService, environment); +@@ -13,6 +18,50 @@ public class PaperGameProfileRepository extends YggdrasilGameProfileRepository { @Override public void findProfilesByNames(String[] names, Agent agent, ProfileLookupCallback callback) { diff --git a/Spigot-Server-Patches/0157-Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/0156-Block-player-logins-during-server-shutdown.patch similarity index 85% rename from Spigot-Server-Patches/0157-Block-player-logins-during-server-shutdown.patch rename to Spigot-Server-Patches/0156-Block-player-logins-during-server-shutdown.patch index 6c06f31282..980f5758e7 100644 --- a/Spigot-Server-Patches/0157-Block-player-logins-during-server-shutdown.patch +++ b/Spigot-Server-Patches/0156-Block-player-logins-during-server-shutdown.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 19e72da6d9a8bf43d1d25c1be3aa23c75dd6e5d7..234451ebc89fe47cffebdcbbc96a5163620b6124 100644 +index 7c016afc904d6d6958abf73fd0d87a25c9fa41ad..975499bca45acb4ba3196c48e3739310275cfc8b 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -49,6 +49,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -48,6 +48,12 @@ public class LoginListener implements PacketLoginInListener { } public void tick() { diff --git a/Spigot-Server-Patches/0158-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch similarity index 85% rename from Spigot-Server-Patches/0158-Entity-fromMobSpawner.patch rename to Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch index 91c632cc24..4d76c81b4c 100644 --- a/Spigot-Server-Patches/0158-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0b971ad8addd65850162e46707c15fbc1ba9b8b9..7c6bf0b91cdf59f6dcf155ee8abfbab61938cc8b 100644 +index 400e6d5784d1d92678bf26fa3dbffbe2e0424a65..3e5b6c2a0ce6df2620d5f6505fcd25e6ea622744 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -189,6 +189,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; @@ -16,7 +16,7 @@ index 0b971ad8addd65850162e46707c15fbc1ba9b8b9..7c6bf0b91cdf59f6dcf155ee8abfbab6 protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1622,6 +1623,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1583,6 +1584,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -27,7 +27,7 @@ index 0b971ad8addd65850162e46707c15fbc1ba9b8b9..7c6bf0b91cdf59f6dcf155ee8abfbab6 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1742,6 +1747,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1705,6 +1710,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (!originTag.isEmpty()) { origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); } @@ -37,7 +37,7 @@ index 0b971ad8addd65850162e46707c15fbc1ba9b8b9..7c6bf0b91cdf59f6dcf155ee8abfbab6 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index b249af20c4712a89e5f340eb922291557099058a..ab5d83d34d9314a253353d6d01fdcd2bed964933 100644 +index 2b7f020e00fc1ea456d0155e7e383969aee318b7..5fda5be52ee7dbf29ac791d0f49326dd74ff2d08 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -140,6 +140,7 @@ public abstract class MobSpawnerAbstract { @@ -49,10 +49,10 @@ index b249af20c4712a89e5f340eb922291557099058a..ab5d83d34d9314a253353d6d01fdcd2b if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) { Entity vehicle = entity.getVehicle(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 7a6df77f196db8ccdaf589b680de9aab09b0ef32..2d84f8410a7b8ff88d9dbab64741dcdf40fc1612 100644 +index 613081685e233074728366b9ff16642c04774c91..66edc6ae67084959503ffa0df2c04174fb29b8d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1046,5 +1046,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1054,5 +1054,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { Location origin = getHandle().origin; return origin == null ? null : origin.clone(); } diff --git a/Spigot-Server-Patches/0159-Improve-the-Saddle-API-for-Horses.patch b/Spigot-Server-Patches/0158-Improve-the-Saddle-API-for-Horses.patch similarity index 94% rename from Spigot-Server-Patches/0159-Improve-the-Saddle-API-for-Horses.patch rename to Spigot-Server-Patches/0158-Improve-the-Saddle-API-for-Horses.patch index ddb33b7d96..ce97598407 100644 --- a/Spigot-Server-Patches/0159-Improve-the-Saddle-API-for-Horses.patch +++ b/Spigot-Server-Patches/0158-Improve-the-Saddle-API-for-Horses.patch @@ -7,10 +7,10 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa and access their saddle state separately from an interface shared with Armor. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 09016e35473069ac61572c4edf97c06077b0cf3b..9952db3eb5ba94547f5e786c473fb59dfec616ab 100644 +index 339656c623a5af7fbf1a7e81952dec1dd3c18205..8c59b9ce12d4148b209c3824d44f6e9c736de16c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -@@ -6,6 +6,7 @@ import net.minecraft.server.EntityHorseAbstract; +@@ -6,6 +6,7 @@ import net.minecraft.server.GenericAttributes; import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse; diff --git a/Spigot-Server-Patches/0160-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch similarity index 86% rename from Spigot-Server-Patches/0160-Implement-ensureServerConversions-API.patch rename to Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch index e1ebc0e4ea..99f50fd14d 100644 --- a/Spigot-Server-Patches/0160-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 01ab19434a39a7062c813b1696e8d35cb2712b46..8b219b5fa2746d73d6d3acb0b61d13218a2c6ea8 100644 +index b2fadd5a3c2d35e1d6f3c02dd5cf450ff1f31d36..71e289b5a7777e307b937f243d4f2204d17d8845 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -335,4 +335,10 @@ public final class CraftItemFactory implements ItemFactory { +@@ -321,4 +321,10 @@ public final class CraftItemFactory implements ItemFactory { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { return ((CraftMetaItem) meta).updateMaterial(material); } diff --git a/Spigot-Server-Patches/0161-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch similarity index 64% rename from Spigot-Server-Patches/0161-Implement-getI18NDisplayName.patch rename to Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch index 60bfe74154..4e1aee285d 100644 --- a/Spigot-Server-Patches/0161-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch @@ -8,27 +8,36 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java -index c0c13798f84029565e623fdd8cb85ffcd3504559..6012739331add8a77c6684b58a669f39bf183f5b 100644 +index ea7cb9943dc6da7a05e0841985eb1be4b6bc5169..c83ba9d9869f8ba51df17963d530536d2a08c263 100644 --- a/src/main/java/net/minecraft/server/LocaleLanguage.java +++ b/src/main/java/net/minecraft/server/LocaleLanguage.java -@@ -65,10 +65,12 @@ public class LocaleLanguage { +@@ -29,7 +29,7 @@ public abstract class LocaleLanguage { + + private static LocaleLanguage c() { + Builder builder = ImmutableMap.builder(); +- BiConsumer biconsumer = builder::put; ++ BiConsumer biconsumer = builder::put; // Paper - decompile fix + + try { + InputStream inputstream = LocaleLanguage.class.getResourceAsStream("/assets/minecraft/lang/en_us.json"); +@@ -91,10 +91,12 @@ public abstract class LocaleLanguage { } + public static LocaleLanguage getInstance() { return a(); } // Paper - OBFHELPER public static LocaleLanguage a() { - return LocaleLanguage.c; + return LocaleLanguage.d; } -+ public synchronized String translateKey(String key) { return a(key); } // Paper - OBFHELPER - public synchronized String a(String s) { - return this.c(s); - } ++ public String translateKey(String key) { return a(key); } // Paper - OBFHELPER + public abstract String a(String s); + + public abstract boolean b(String s); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 8b219b5fa2746d73d6d3acb0b61d13218a2c6ea8..23d7756456fdd650914a3a49c653182a68924a5c 100644 +index 71e289b5a7777e307b937f243d4f2204d17d8845..8d694e3a659a405fc5f6729ce512be81316229a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -340,5 +340,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -326,5 +326,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0162-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch similarity index 82% rename from Spigot-Server-Patches/0162-ProfileWhitelistVerifyEvent.patch rename to Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch index 22b195fadf..a27e3a6867 100644 --- a/Spigot-Server-Patches/0162-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch @@ -5,22 +5,19 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6b669f0f632418d36617c980b01cfcd0ef7487c2..46ea6d8e487d0c051780b0bdb06622e515cd987f 100644 +index 21f583302e9d8da8c9a9651ce40c64dc8abfa512..70339603aa3e256470be241bf033f3471e2090ea 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -509,9 +509,9 @@ public abstract class PlayerList { - - // return chatmessage; +@@ -541,7 +541,7 @@ public abstract class PlayerList { if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot -- } else if (!this.isWhitelisted(gameprofile)) { -+ } else if (!this.isWhitelisted(gameprofile, event)) { // Paper - chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted", new Object[0]); + } else if (!this.isWhitelisted(gameprofile)) { + chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); - event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot + //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { IpBanEntry ipbanentry = this.l.get(socketaddress); -@@ -880,9 +880,25 @@ public abstract class PlayerList { +@@ -922,9 +922,25 @@ public abstract class PlayerList { this.server.getCommandDispatcher().a(entityplayer); } @@ -46,4 +43,4 @@ index 6b669f0f632418d36617c980b01cfcd0ef7487c2..46ea6d8e487d0c051780b0bdb06622e5 + // Paper end public boolean isOp(GameProfile gameprofile) { - return this.operators.d(gameprofile) || this.server.a(gameprofile) && this.server.getWorldServer(DimensionManager.OVERWORLD).getWorldData().t() || this.u; + return this.operators.d(gameprofile) || this.server.a(gameprofile) && this.server.getSaveData().n() || this.v; diff --git a/Spigot-Server-Patches/0163-Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/0162-Fix-this-stupid-bullshit.patch similarity index 91% rename from Spigot-Server-Patches/0163-Fix-this-stupid-bullshit.patch rename to Spigot-Server-Patches/0162-Fix-this-stupid-bullshit.patch index 9f78361c93..12d66c24e4 100644 --- a/Spigot-Server-Patches/0163-Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/0162-Fix-this-stupid-bullshit.patch @@ -9,12 +9,12 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c3641ca48bfe4051f6450c891ccd4dd023257cb5..9b4f01120d473a4fea993a5df952e265b33cde0b 100644 +index b77b051137f66106bac396debe0c0542ac86e257..05b647fbb360910b2961c9276c2928fe71dad90c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -218,10 +218,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -21); + deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/Spigot-Server-Patches/0164-Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/0163-Ocelot-despawns-should-honor-nametags-and-leash.patch similarity index 85% rename from Spigot-Server-Patches/0164-Ocelot-despawns-should-honor-nametags-and-leash.patch rename to Spigot-Server-Patches/0163-Ocelot-despawns-should-honor-nametags-and-leash.patch index 459cbd7c04..6909dbae0d 100644 --- a/Spigot-Server-Patches/0164-Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/Spigot-Server-Patches/0163-Ocelot-despawns-should-honor-nametags-and-leash.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java -index 06241145537d311b1994a2d672ca975177d03a53..d9a7b8ac1eac58e02607f4df0c9413239fcec3a4 100644 +index a88f15546e5cad8da5b342162c05228bdbbf5aad..9c1f019f911a1b91bbfa431e1558dec790624050 100644 --- a/src/main/java/net/minecraft/server/EntityOcelot.java +++ b/src/main/java/net/minecraft/server/EntityOcelot.java @@ -81,7 +81,7 @@ public class EntityOcelot extends EntityAnimal { @@ -16,4 +16,4 @@ index 06241145537d311b1994a2d672ca975177d03a53..d9a7b8ac1eac58e02607f4df0c941323 + return !this.isTrusting() && !this.hasCustomName() && !this.isLeashed() /*&& this.ticksLived > 2400*/; // CraftBukkit // Paper - honor name and leash } - @Override + public static AttributeProvider.Builder eL() { diff --git a/Spigot-Server-Patches/0165-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/Spigot-Server-Patches/0164-Reset-spawner-timer-when-spawner-event-is-cancelled.patch similarity index 93% rename from Spigot-Server-Patches/0165-Reset-spawner-timer-when-spawner-event-is-cancelled.patch rename to Spigot-Server-Patches/0164-Reset-spawner-timer-when-spawner-event-is-cancelled.patch index 931728e67c..14e130675b 100644 --- a/Spigot-Server-Patches/0165-Reset-spawner-timer-when-spawner-event-is-cancelled.patch +++ b/Spigot-Server-Patches/0164-Reset-spawner-timer-when-spawner-event-is-cancelled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index ab5d83d34d9314a253353d6d01fdcd2bed964933..c38295a09d99221cb196f9785ce674fe11120825 100644 +index 5fda5be52ee7dbf29ac791d0f49326dd74ff2d08..efd4d2844c4ad638837a1fd971927758908e7db1 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -142,6 +142,7 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 87% rename from Spigot-Server-Patches/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 00698ecb31..6d4d4e2c69 100644 --- a/Spigot-Server-Patches/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 203c4173ff2467a027da059b2d473ec1a90bb88b..d8509ccdb01be022d5aa216b05fd97faeebd53a9 100644 +index cfd03f29e6c46c66bf3ad9253c88e27b30f313c1..b1d4f955a59313d7274e39870c9a7300fe012d08 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -648,7 +648,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -703,7 +703,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.enter("blockEntities"); timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { diff --git a/Spigot-Server-Patches/0167-Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch similarity index 91% rename from Spigot-Server-Patches/0167-Allow-specifying-a-custom-authentication-servers-dow.patch rename to Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch index 20b70895ae..cb8773c582 100644 --- a/Spigot-Server-Patches/0167-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -27,10 +27,10 @@ index 295b8390cbc31fc1fcb225f80ec2ff8f0df44321..5884b04f7e84048a9710736bd1423714 + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 234451ebc89fe47cffebdcbbc96a5163620b6124..758fe774897245148befeb26ddd65cf4c1a8301b 100644 +index 975499bca45acb4ba3196c48e3739310275cfc8b..723c73a8056d34136c64cd038f274d3d94749314 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -247,6 +247,10 @@ public class LoginListener implements PacketLoginInListener { +@@ -246,6 +246,10 @@ public class LoginListener implements PacketLoginInListener { LoginListener.this.i = LoginListener.this.a(gameprofile); LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; } else { @@ -38,6 +38,6 @@ index 234451ebc89fe47cffebdcbbc96a5163620b6124..758fe774897245148befeb26ddd65cf4 + if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) { + LoginListener.this.disconnect(new ChatComponentText(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage)); + } else // Paper end - LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down", new Object[0])); + LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down")); LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable"); } diff --git a/Spigot-Server-Patches/0168-LivingEntity-setKiller.patch b/Spigot-Server-Patches/0167-LivingEntity-setKiller.patch similarity index 82% rename from Spigot-Server-Patches/0168-LivingEntity-setKiller.patch rename to Spigot-Server-Patches/0167-LivingEntity-setKiller.patch index 5c8b4eb3c0..9152a9d30c 100644 --- a/Spigot-Server-Patches/0168-LivingEntity-setKiller.patch +++ b/Spigot-Server-Patches/0167-LivingEntity-setKiller.patch @@ -5,23 +5,23 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 28d873d8fe7bb79d2a84eb9bf234ac8ba0223813..ca2620548c7c80beab09554b96d8e55e499614f8 100644 +index 34f2821a64c7893ff0a8c33ae4b77ce883227f0c..7ec1a572efd99928e8aae9b75c0eed73430aa337 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -80,7 +80,7 @@ public abstract class EntityLiving extends Entity { +@@ -86,7 +86,7 @@ public abstract class EntityLiving extends Entity { public float aL; - public float aM; + @Nullable public EntityHuman killer; - protected int lastDamageByPlayerTime; + public int lastDamageByPlayerTime; // Paper - protected -> public protected boolean killed; protected int ticksFarFromPlayer; - protected float aR; + protected float aQ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index da86ee41499b02959755328544307aed39752483..1760dfa7a312b63d7608d890c977452ad995d7ae 100644 +index 8c3fa2335cfa1df94eb64bda5b12f1f5858dec27..1f33b2d7db6ab1c0f07f3e87cb046eda40f6c698 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -318,6 +318,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -319,6 +319,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return getHandle().killer == null ? null : (Player) getHandle().killer.getBukkitEntity(); } diff --git a/Spigot-Server-Patches/0169-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch similarity index 88% rename from Spigot-Server-Patches/0169-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch rename to Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index b74a6a9374..ff1195fa4c 100644 --- a/Spigot-Server-Patches/0169-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -12,7 +12,7 @@ results in a separate line, even though it should not result in a line break. Log4j's implementation handles it correctly. diff --git a/pom.xml b/pom.xml -index aeaceac771644ece5365d07be77f4481ced2fe13..25e327c38cc3aa1f9ad9275faba481bdb4240e25 100644 +index 2acc2a98bd8df6d81b5865b768265a210597b57b..55cdd9061b2c70abe8458de497dd61e1f734bc9f 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,11 @@ @@ -28,10 +28,10 @@ index aeaceac771644ece5365d07be77f4481ced2fe13..25e327c38cc3aa1f9ad9275faba481bd org.ow2.asm asm diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index d34f772fae3543cec6a130831b1f3eaa67934944..ec257ba31f012d3d3576bbff41326df13ede6776 100644 +index 49b5c226dcbd4ef7d2a3418ef2c7e98bb689ccfb..f6544e4fb0eacce7f3579998e8ec0743b7f46c65 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -155,8 +155,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -131,8 +131,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer */ // Paper end diff --git a/Spigot-Server-Patches/0170-Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch similarity index 97% rename from Spigot-Server-Patches/0170-Handle-plugin-prefixes-using-Log4J-configuration.patch rename to Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch index 373a195cbb..3ea82627d1 100644 --- a/Spigot-Server-Patches/0170-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index 25e327c38cc3aa1f9ad9275faba481bdb4240e25..daeb60a93cf0bbd1f6b731b9502a80c93b2e090b 100644 +index 55cdd9061b2c70abe8458de497dd61e1f734bc9f..0cdfa5367766b3883433d39fec4d6dcb8aa14cdf 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ diff --git a/Spigot-Server-Patches/0171-Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch similarity index 88% rename from Spigot-Server-Patches/0171-Include-Log4J2-SLF4J-implementation.patch rename to Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch index 60c71fa5d6..c92069b986 100644 --- a/Spigot-Server-Patches/0171-Include-Log4J2-SLF4J-implementation.patch +++ b/Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Include Log4J2 SLF4J implementation diff --git a/pom.xml b/pom.xml -index daeb60a93cf0bbd1f6b731b9502a80c93b2e090b..8ad07cf6e03cbc5354d2dd2b149b51bbb5067a9d 100644 +index 0cdfa5367766b3883433d39fec4d6dcb8aa14cdf..8150756361174fd46df8f73943ab48c55a523c0c 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,12 @@ diff --git a/Spigot-Server-Patches/0172-Improve-Log4J-Configuration-Plugin-Loggers.patch b/Spigot-Server-Patches/0171-Improve-Log4J-Configuration-Plugin-Loggers.patch similarity index 100% rename from Spigot-Server-Patches/0172-Improve-Log4J-Configuration-Plugin-Loggers.patch rename to Spigot-Server-Patches/0171-Improve-Log4J-Configuration-Plugin-Loggers.patch diff --git a/Spigot-Server-Patches/0173-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch similarity index 90% rename from Spigot-Server-Patches/0173-Add-PlayerJumpEvent.patch rename to Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch index f46cc03fa4..e7ff6a253c 100644 --- a/Spigot-Server-Patches/0173-Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 26f894c752d623ed082f97fdbffe5a6680a941b7..2fd9f9ceddd108f0d733ea481d5b5c7d4506329c 100644 +index ace3f3e30224c09bdb296e4ac2974fb0bd3e7dbc..a7ab77707b5cd9ca65c012c3b18bc0c6db7fa7ee 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,8 @@ import org.bukkit.inventory.CraftingInventory; @@ -17,10 +17,10 @@ index 26f894c752d623ed082f97fdbffe5a6680a941b7..2fd9f9ceddd108f0d733ea481d5b5c7d import co.aikar.timings.MinecraftTimings; // Paper // CraftBukkit end -@@ -925,7 +927,34 @@ public class PlayerConnection implements PacketListenerPlayIn { - } +@@ -945,7 +947,34 @@ public class PlayerConnection implements PacketListenerPlayIn { + boolean flag = d8 > 0.0D; - if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) { + if (this.player.isOnGround() && !packetplayinflying.b() && flag) { - this.player.jump(); + // Paper start - Add player jump event + Player player = this.getPlayer(); diff --git a/Spigot-Server-Patches/0174-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch similarity index 85% rename from Spigot-Server-Patches/0174-handle-PacketPlayInKeepAlive-async.patch rename to Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch index da0e511ec9..ac33db3f18 100644 --- a/Spigot-Server-Patches/0174-handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2fd9f9ceddd108f0d733ea481d5b5c7d4506329c..7512764532fc3403cf1daa31079fe739820facde 100644 +index a7ab77707b5cd9ca65c012c3b18bc0c6db7fa7ee..79888d559e7d62216d48516ebb7da138395c2f2a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2487,14 +2487,18 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2529,14 +2529,18 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInKeepAlive packetplayinkeepalive) { @@ -30,10 +30,9 @@ index 2fd9f9ceddd108f0d733ea481d5b5c7d4506329c..7512764532fc3403cf1daa31079fe739 this.player.ping = (this.player.ping * 3 + i) / 4; this.awaitingKeepAlive = false; } else if (!this.isExemptPlayer()) { -- this.disconnect(new ChatMessage("disconnect.timeout", new Object[0])); + // Paper start - This needs to be handled on the main thread for plugins + minecraftServer.scheduleOnMain(() -> { -+ this.disconnect(new ChatMessage("disconnect.timeout")); + this.disconnect(new ChatMessage("disconnect.timeout")); + }); + // Paper end } diff --git a/Spigot-Server-Patches/0175-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch similarity index 86% rename from Spigot-Server-Patches/0175-Expose-client-protocol-version-and-virtual-host.patch rename to Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch index 8ae0d610ad..887cc01a21 100644 --- a/Spigot-Server-Patches/0175-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch @@ -61,18 +61,10 @@ index 0000000000000000000000000000000000000000..5caca6439d2135e34880d501397fe2ea + +} diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index d0b9c6e3dcae76d802e095731c78fb9693982f90..8928d93e49bec174e86a2b451ac40f3946193009 100644 +index a3b48376b92aee548ec28eec1cdc978925b96df0..8049f54f049122b065ea30e7e831c33486a83b7e 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java -@@ -15,6 +15,7 @@ public class HandshakeListener implements PacketHandshakingInListener { - - private final MinecraftServer a; - private final NetworkManager b; -+ private NetworkManager getNetworkManager() { return b; } // Paper - OBFHELPER - - public HandshakeListener(MinecraftServer minecraftserver, NetworkManager networkmanager) { - this.a = minecraftserver; -@@ -129,6 +130,10 @@ public class HandshakeListener implements PacketHandshakingInListener { +@@ -133,6 +133,10 @@ public class HandshakeListener implements PacketHandshakingInListener { throw new UnsupportedOperationException("Invalid intention " + packethandshakinginsetprotocol.b()); } @@ -84,7 +76,7 @@ index d0b9c6e3dcae76d802e095731c78fb9693982f90..8928d93e49bec174e86a2b451ac40f39 @Override diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 3ccf1663669c79a63a6b3a9f6dc17a6e25e91915..e2d8ed88f05bf8cb214329ea27ac2b67f43e071a 100644 +index c2fdccfb9192aa7ec55fd67c169cba71a695075c..33900c22d4123e0f8333b9bdb9601d302e26c972 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -60,6 +60,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -111,10 +103,10 @@ index 4f008e4723d2cb0bcabb2d5621203d63c40c4923..8545146fb1f093f821e3b966d9337049 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a4afce71be0707c43700b73ae0107074448e3d4a..3d4a1065fbe38239743e485d078b76b47981baf1 100644 +index 527c116c23a505eead00e73a39ce9f932eb4ad8d..09ac19363ecfdebe2b124fdf68a95265ae085cfe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -182,6 +182,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -186,6 +186,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/Spigot-Server-Patches/0176-revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch similarity index 93% rename from Spigot-Server-Patches/0176-revert-serverside-behavior-of-keepalives.patch rename to Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch index a7aa14f47b..d8e6c8a91d 100644 --- a/Spigot-Server-Patches/0176-revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch @@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7512764532fc3403cf1daa31079fe739820facde..7d0fa2efe876d5de8b4bafd2be1a1323ea630410 100644 +index 79888d559e7d62216d48516ebb7da138395c2f2a..b2eac041c3ff7d8a7c4524dac381ab95045f28af 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -70,7 +70,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -37,7 +37,7 @@ index 7512764532fc3403cf1daa31079fe739820facde..7d0fa2efe876d5de8b4bafd2be1a1323 public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { this.minecraftServer = minecraftserver; -@@ -182,18 +183,26 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -182,18 +183,25 @@ public class PlayerConnection implements PacketListenerPlayIn { } this.minecraftServer.getMethodProfiler().enter("keepAlive"); @@ -45,6 +45,12 @@ index 7512764532fc3403cf1daa31079fe739820facde..7d0fa2efe876d5de8b4bafd2be1a1323 - - if (i - this.lastKeepAlive >= 25000L) { // CraftBukkit - if (this.awaitingKeepAlive) { +- this.disconnect(new ChatMessage("disconnect.timeout")); +- } else { +- this.awaitingKeepAlive = true; +- this.lastKeepAlive = i; +- this.h = i; +- this.sendPacket(new PacketPlayOutKeepAlive(this.h)); + // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings + // This should effectively place the keepalive handling back to "as it was" before 1.12.2 + long currentTime = SystemUtils.getMonotonicMillis(); @@ -53,12 +59,7 @@ index 7512764532fc3403cf1daa31079fe739820facde..7d0fa2efe876d5de8b4bafd2be1a1323 + if (this.isPendingPing()) { + if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected + PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info - this.disconnect(new ChatMessage("disconnect.timeout", new Object[0])); -- } else { -- this.awaitingKeepAlive = true; -- this.lastKeepAlive = i; -- this.h = i; -- this.sendPacket(new PacketPlayOutKeepAlive(this.h)); ++ this.disconnect(new ChatMessage("disconnect.timeout", new Object[0])); + } + } else { + if (elapsedTime >= 15000L) { // 15 seconds @@ -66,7 +67,6 @@ index 7512764532fc3403cf1daa31079fe739820facde..7d0fa2efe876d5de8b4bafd2be1a1323 + this.setLastPing(currentTime); + this.setKeepAliveID(currentTime); + this.sendPacket(new PacketPlayOutKeepAlive(this.getKeepAliveID())); -+ } } + // Paper end diff --git a/Spigot-Server-Patches/0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 89% rename from Spigot-Server-Patches/0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch index 3b4cf3e485..1935a953ac 100644 --- a/Spigot-Server-Patches/0177-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 8e5edd2c9b7cc9a441969efeb666061515188486..542f935b4e7a027b3df82f037fcd6523286c5106 100644 +index 69c0a4c7bfb1c753d544dcd074ad832d3e5ef3a0..eaed020982bd19dab72872849170fa62d75699eb 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1023,6 +1023,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1002,6 +1002,15 @@ public abstract class EntityHuman extends EntityLiving { return vec3d; } @@ -23,9 +23,9 @@ index 8e5edd2c9b7cc9a441969efeb666061515188486..542f935b4e7a027b3df82f037fcd6523 + // Paper end + public void attack(Entity entity) { - if (entity.bA()) { + if (entity.bH()) { if (!entity.t(this)) { -@@ -1047,7 +1056,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1026,7 +1035,7 @@ public abstract class EntityHuman extends EntityLiving { int i = b0 + EnchantmentManager.b((EntityLiving) this); if (this.isSprinting() && flag) { @@ -34,16 +34,16 @@ index 8e5edd2c9b7cc9a441969efeb666061515188486..542f935b4e7a027b3df82f037fcd6523 ++i; flag1 = true; } -@@ -1122,7 +1131,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1101,7 +1110,7 @@ public abstract class EntityHuman extends EntityLiving { } } - this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); + sendSoundEffect(this, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility - this.ea(); + this.ew(); } -@@ -1150,15 +1159,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1129,15 +1138,15 @@ public abstract class EntityHuman extends EntityLiving { } if (flag2) { @@ -62,7 +62,7 @@ index 8e5edd2c9b7cc9a441969efeb666061515188486..542f935b4e7a027b3df82f037fcd6523 } } -@@ -1210,7 +1219,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1189,7 +1198,7 @@ public abstract class EntityHuman extends EntityLiving { this.applyExhaustion(world.spigotConfig.combatExhaustion); // Spigot - Change to use configurable value } else { @@ -72,10 +72,10 @@ index 8e5edd2c9b7cc9a441969efeb666061515188486..542f935b4e7a027b3df82f037fcd6523 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d8509ccdb01be022d5aa216b05fd97faeebd53a9..4e41b4262971401d90a96cd7710890e5048d5b63 100644 +index b1d4f955a59313d7274e39870c9a7300fe012d08..ad1841f16ea3ecfbd9c6047483a4b7bd061c1981 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -585,6 +585,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -640,6 +640,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.playSound(entityhuman, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, soundeffect, soundcategory, f, f1); } diff --git a/Spigot-Server-Patches/0178-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0177-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 95% rename from Spigot-Server-Patches/0178-Option-for-maximum-exp-value-when-merging-orbs.patch rename to Spigot-Server-Patches/0177-Option-for-maximum-exp-value-when-merging-orbs.patch index 8e9e680006..83363b03e3 100644 --- a/Spigot-Server-Patches/0178-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0177-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -20,10 +20,10 @@ index 39ab5457569684bc66cd67f5f9d2505ef9f304ab..d2582d981f859b55ba5086540963c01e + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f1a4de57282f3553f34245122bf15130420f558b..d012376c134886cdf692bfe29e6154a618f932ea 100644 +index dc4fc5b300bb319be3d483aa7206bb0134343068..ee7f71c0fe2cf075ab2e821391cd94f920dc494b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -550,16 +550,32 @@ public class CraftEventFactory { +@@ -548,16 +548,32 @@ public class CraftEventFactory { EntityExperienceOrb xp = (EntityExperienceOrb) entity; double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/Spigot-Server-Patches/0178-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0178-Add-PlayerArmorChangeEvent.patch new file mode 100644 index 0000000000..cc14fa55c0 --- /dev/null +++ b/Spigot-Server-Patches/0178-Add-PlayerArmorChangeEvent.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: pkt77 +Date: Fri, 10 Nov 2017 23:46:34 -0500 +Subject: [PATCH] Add PlayerArmorChangeEvent + + +diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java +index 7ec1a572efd99928e8aae9b75c0eed73430aa337..26832d31cc64d26a9ca61a3bad21424ed366c74c 100644 +--- a/src/main/java/net/minecraft/server/EntityLiving.java ++++ b/src/main/java/net/minecraft/server/EntityLiving.java +@@ -1,5 +1,6 @@ + package net.minecraft.server; + ++import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent; // Paper + import com.google.common.base.Objects; + import com.google.common.collect.ImmutableList; + import com.google.common.collect.ImmutableMap; +@@ -2523,6 +2524,13 @@ public abstract class EntityLiving extends Entity { + ItemStack itemstack1 = this.getEquipment(enumitemslot); + + if (!ItemStack.matches(itemstack1, itemstack)) { ++ // Paper start - PlayerArmorChangeEvent ++ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { ++ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); ++ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); ++ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); ++ } ++ // Paper end + if (map == null) { + map = Maps.newEnumMap(EnumItemSlot.class); + } +diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java +index 02a7ae6785b0539e4aa567fca377d727184fd019..60b235f16f5e762d635efa1578b715db445513a5 100644 +--- a/src/main/java/net/minecraft/server/EnumItemSlot.java ++++ b/src/main/java/net/minecraft/server/EnumItemSlot.java +@@ -16,6 +16,7 @@ public enum EnumItemSlot { + this.j = s; + } + ++ public EnumItemSlot.Function getType() { return this.a(); } // Paper - OBFHELPER + public EnumItemSlot.Function a() { + return this.g; + } diff --git a/Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch deleted file mode 100644 index b867534ca7..0000000000 --- a/Spigot-Server-Patches/0179-Add-PlayerArmorChangeEvent.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: pkt77 -Date: Fri, 10 Nov 2017 23:46:34 -0500 -Subject: [PATCH] Add PlayerArmorChangeEvent - - -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ca2620548c7c80beab09554b96d8e55e499614f8..f5da67fd8908f027835b837a8b847e27c3638790 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1,5 +1,6 @@ - package net.minecraft.server; - -+import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent; - import com.google.common.base.Objects; - import com.google.common.collect.ImmutableList; - import com.google.common.collect.ImmutableSet; -@@ -2339,6 +2340,13 @@ public abstract class EntityLiving extends Entity { - ItemStack itemstack1 = this.getEquipment(enumitemslot); - - if (!ItemStack.matches(itemstack1, itemstack)) { -+ // Paper start - PlayerArmorChangeEvent -+ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { -+ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); -+ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); -+ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); -+ } -+ // Paper end - ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); - if (!itemstack.isEmpty()) { - this.getAttributeMap().a(itemstack.a(enumitemslot)); -diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java -index 02a7ae6785b0539e4aa567fca377d727184fd019..60b235f16f5e762d635efa1578b715db445513a5 100644 ---- a/src/main/java/net/minecraft/server/EnumItemSlot.java -+++ b/src/main/java/net/minecraft/server/EnumItemSlot.java -@@ -16,6 +16,7 @@ public enum EnumItemSlot { - this.j = s; - } - -+ public EnumItemSlot.Function getType() { return this.a(); } // Paper - OBFHELPER - public EnumItemSlot.Function a() { - return this.g; - } diff --git a/Spigot-Server-Patches/0180-Prevent-logins-from-being-processed-when-the-player-.patch b/Spigot-Server-Patches/0179-Prevent-logins-from-being-processed-when-the-player-.patch similarity index 83% rename from Spigot-Server-Patches/0180-Prevent-logins-from-being-processed-when-the-player-.patch rename to Spigot-Server-Patches/0179-Prevent-logins-from-being-processed-when-the-player-.patch index 9d33fdb2ea..f3a5b4b02f 100644 --- a/Spigot-Server-Patches/0180-Prevent-logins-from-being-processed-when-the-player-.patch +++ b/Spigot-Server-Patches/0179-Prevent-logins-from-being-processed-when-the-player-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 758fe774897245148befeb26ddd65cf4c1a8301b..1fb609dcfc61adfc63f0d32dc87a5e144a5013cf 100644 +index 723c73a8056d34136c64cd038f274d3d94749314..3cc12e7b75b8ed21a0ea44f8453553cf856fb786 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -56,7 +56,11 @@ public class LoginListener implements PacketLoginInListener { +@@ -55,7 +55,11 @@ public class LoginListener implements PacketLoginInListener { } // Paper end if (this.g == LoginListener.EnumProtocolState.READY_TO_ACCEPT) { @@ -20,5 +20,5 @@ index 758fe774897245148befeb26ddd65cf4c1a8301b..1fb609dcfc61adfc63f0d32dc87a5e14 + } + // Paper end } else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) { - EntityPlayer entityplayer = this.server.getPlayerList().a(this.i.getId()); + EntityPlayer entityplayer = this.server.getPlayerList().getPlayer(this.i.getId()); diff --git a/Spigot-Server-Patches/0181-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch similarity index 87% rename from Spigot-Server-Patches/0181-use-CB-BlockState-implementations-for-captured-block.patch rename to Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch index ca68041251..bae6f78aee 100644 --- a/Spigot-Server-Patches/0181-use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4e41b4262971401d90a96cd7710890e5048d5b63..6603392f475f0bfe7af259a54ba9bb3469c18541 100644 +index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd042f704c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -66,7 +66,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -71,7 +71,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; @@ -30,8 +30,8 @@ index 4e41b4262971401d90a96cd7710890e5048d5b63..6603392f475f0bfe7af259a54ba9bb34 public Map capturedTileEntities = new HashMap<>(); public List captureDrops; public long ticksPerAnimalSpawns; -@@ -258,7 +258,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - public boolean setTypeAndData(BlockPosition blockposition, IBlockData iblockdata, int i) { +@@ -323,7 +323,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { - CapturedBlockState blockstate = capturedBlockStates.get(blockposition); @@ -39,7 +39,7 @@ index 4e41b4262971401d90a96cd7710890e5048d5b63..6603392f475f0bfe7af259a54ba9bb34 if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, blockposition, i); this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); -@@ -278,7 +278,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -343,7 +343,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(blockposition)) { @@ -48,7 +48,7 @@ index 4e41b4262971401d90a96cd7710890e5048d5b63..6603392f475f0bfe7af259a54ba9bb34 this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); captured = true; } -@@ -546,7 +546,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -601,7 +601,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public IBlockData getType(BlockPosition blockposition) { // CraftBukkit start - tree generation if (captureTreeGeneration) { diff --git a/Spigot-Server-Patches/0182-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 94% rename from Spigot-Server-Patches/0182-API-to-get-a-BlockState-without-a-snapshot.patch rename to Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch index 6f6ca899dc..0df5427f98 100644 --- a/Spigot-Server-Patches/0182-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 630b279158f26902ebdcc6e5c810b189ce49c910..958279249fdadfe5c2808d2a046636f06c3bd500 100644 +index 967aec7ce9a7fbbb42b51d1ed281db005e107c2c..54285237ed5a096b2e46cabd78f7dcd5128133a8 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -231,7 +231,12 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -39,7 +39,7 @@ index 630b279158f26902ebdcc6e5c810b189ce49c910..958279249fdadfe5c2808d2a046636f0 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 5a1629a19f082235f91913736d78509d44f8fd67..dd0bccd6995a79c52ec20cf45df27bb7ed06a5e6 100644 +index 562d9daa34540c0e3d99b799dd6f01bf87329006..5ce381ad88daf5f95b19871356ab5852097c5956 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -308,6 +308,20 @@ public class CraftBlock implements Block { @@ -64,7 +64,7 @@ index 5a1629a19f082235f91913736d78509d44f8fd67..dd0bccd6995a79c52ec20cf45df27bb7 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 17d80b5c6e512e0c582b05c92bb795b004ba27c2..f6401e2cde9d56547cee7f8d9e4b2a58764ee895 100644 +index 26cc40e57f5b73b9c32859bff37c4a3d94904c56..feeae1a9eb309ae4101783b191bb2bffe9aeb7d3 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 diff --git a/Spigot-Server-Patches/0183-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch similarity index 83% rename from Spigot-Server-Patches/0183-AsyncTabCompleteEvent.patch rename to Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch index cd18e4ad58..e110ca2f19 100644 --- a/Spigot-Server-Patches/0183-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch @@ -14,10 +14,10 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7d0fa2efe876d5de8b4bafd2be1a1323ea630410..c256e798d12098881cb5bfb655eab5b63f1614e7 100644 +index b2eac041c3ff7d8a7c4524dac381ab95045f28af..fa5c640239451579fba35ad7b0979739e0b7b16f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -524,10 +524,10 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -527,10 +527,10 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInTabComplete packetplayintabcomplete) { @@ -30,7 +30,7 @@ index 7d0fa2efe876d5de8b4bafd2be1a1323ea630410..c256e798d12098881cb5bfb655eab5b6 return; } // CraftBukkit end -@@ -537,12 +537,37 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -540,12 +540,35 @@ public class PlayerConnection implements PacketListenerPlayIn { stringreader.skip(); } @@ -46,19 +46,20 @@ index 7d0fa2efe876d5de8b4bafd2be1a1323ea630410..c256e798d12098881cb5bfb655eab5b6 + // If the event isn't handled, we can assume that we have no completions, and so we'll ask the server + if (!event.isHandled()) { + if (!event.isCancelled()) { -+ // Paper end - async tab completion -+ this.minecraftServer.scheduleOnMain(() -> { // Paper - This needs to be on main -+ ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); - this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { - if (((Suggestions) suggestions).isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer -- this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestions)); // CraftBukkit - decompile error +- this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { +- if (suggestions.isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer +- this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), suggestions)); - }); -+ this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestions)); // CraftBukkit - decompile error -+ }); -+ }); // Paper - This needs to be on main ++ this.minecraftServer.scheduleOnMain(() -> { // Paper - This needs to be on main ++ ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); ++ ++ this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { ++ if (suggestions.isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer ++ this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), suggestions)); ++ }); ++ }); + } -+ // Paper start - async tab completion + } else if (!completions.isEmpty()) { + com.mojang.brigadier.suggestion.SuggestionsBuilder builder = new com.mojang.brigadier.suggestion.SuggestionsBuilder(packetplayintabcomplete.c(), stringreader.getTotalLength()); + @@ -67,15 +68,14 @@ index 7d0fa2efe876d5de8b4bafd2be1a1323ea630410..c256e798d12098881cb5bfb655eab5b6 + player.playerConnection.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), builder.buildFuture().join())); + } + // Paper end - async tab completion -+ } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 95f4abddf57eb8c59cb5a5410b8d551d39f94fd7..3697b3298feaec30c305e3da011790f2406e12d7 100644 +index 07a4ce8c71d52f4a6f1f9c97b9cb143c72db8af9..cf93d5451a68e812811b32add1a76ed1ee6f3c27 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1710,7 +1710,7 @@ public final class CraftServer implements Server { +@@ -1761,7 +1761,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0184-Avoid-NPE-in-PathfinderGoalTempt.patch b/Spigot-Server-Patches/0183-Avoid-NPE-in-PathfinderGoalTempt.patch similarity index 90% rename from Spigot-Server-Patches/0184-Avoid-NPE-in-PathfinderGoalTempt.patch rename to Spigot-Server-Patches/0183-Avoid-NPE-in-PathfinderGoalTempt.patch index 3fbc4202da..2e8bf42958 100644 --- a/Spigot-Server-Patches/0184-Avoid-NPE-in-PathfinderGoalTempt.patch +++ b/Spigot-Server-Patches/0183-Avoid-NPE-in-PathfinderGoalTempt.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Avoid NPE in PathfinderGoalTempt diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java -index eafdcb916af55978672c139b7ccdf5feba383264..d37a2fa0ab3cbf4b76be90079c083e208843fe6e 100644 +index 351152ae32e162fa912d60e929abeec783140106..b115f40b0b11e89184960a5cce5b8295030469e9 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java @@ -55,7 +55,7 @@ public class PathfinderGoalTempt extends PathfinderGoal { diff --git a/Spigot-Server-Patches/0185-PlayerPickupExperienceEvent.patch b/Spigot-Server-Patches/0184-PlayerPickupExperienceEvent.patch similarity index 70% rename from Spigot-Server-Patches/0185-PlayerPickupExperienceEvent.patch rename to Spigot-Server-Patches/0184-PlayerPickupExperienceEvent.patch index 00a43cac85..1120cd9b70 100644 --- a/Spigot-Server-Patches/0185-PlayerPickupExperienceEvent.patch +++ b/Spigot-Server-Patches/0184-PlayerPickupExperienceEvent.patch @@ -6,15 +6,15 @@ Subject: [PATCH] PlayerPickupExperienceEvent Allows plugins to cancel a player picking up an experience orb diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index d4275e733d9996d121efd95ae1ff4676a1ebfbb5..b3edb69a967058392f5027fbdc7fadff7e1dc6e2 100644 +index d9a0cd1e90445ff7a1d9e7cef2f71e27bd3686cb..e7fb982913f391bafd608c4626086cd9cab7fad7 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -@@ -222,7 +222,7 @@ public class EntityExperienceOrb extends Entity { +@@ -217,7 +217,7 @@ public class EntityExperienceOrb extends Entity { @Override public void pickup(EntityHuman entityhuman) { if (!this.world.isClientSide) { -- if (this.d == 0 && entityhuman.bC == 0) { -+ if (this.d == 0 && entityhuman.bC == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(((EntityPlayer) entityhuman).getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - entityhuman.bC = 2; +- if (this.d == 0 && entityhuman.bB == 0) { ++ if (this.d == 0 && entityhuman.bB == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(((EntityPlayer) entityhuman).getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper + entityhuman.bB = 2; entityhuman.receive(this, 1); - Entry entry = EnchantmentManager.b(Enchantments.MENDING, (EntityLiving) entityhuman); + Entry entry = EnchantmentManager.a(Enchantments.MENDING, (EntityLiving) entityhuman, ItemStack::f); diff --git a/Spigot-Server-Patches/0186-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0185-ExperienceOrbMergeEvent.patch similarity index 91% rename from Spigot-Server-Patches/0186-ExperienceOrbMergeEvent.patch rename to Spigot-Server-Patches/0185-ExperienceOrbMergeEvent.patch index 7a67c40952..769320160c 100644 --- a/Spigot-Server-Patches/0186-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0185-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 d012376c134886cdf692bfe29e6154a618f932ea..6d7236d3dcdb70cc1f33f462d08e78720045ccd0 100644 +index ee7f71c0fe2cf075ab2e821391cd94f920dc494b..8551d3c9ba808bb9a77897a9866249bc0845c3b2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -560,7 +560,7 @@ public class CraftEventFactory { +@@ -558,7 +558,7 @@ public class CraftEventFactory { if (e instanceof EntityExperienceOrb) { EntityExperienceOrb loopItem = (EntityExperienceOrb) e; // Paper start diff --git a/Spigot-Server-Patches/0187-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch similarity index 87% rename from Spigot-Server-Patches/0187-Ability-to-apply-mending-to-XP-API.patch rename to Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch index 8eff7f4dc9..26b317150a 100644 --- a/Spigot-Server-Patches/0187-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch @@ -10,10 +10,10 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java -index 1822178e8dd67bb063f5eab60335de9852b9a71c..d96c03a1a164799f49fdb3309594e7592a8d2206 100644 +index cea65c1d80a7bd303cf28a6fe2bd73d542a19557..92ceb8bb7d7c47e395dfdcfe6d01f807c048ddc1 100644 --- a/src/main/java/net/minecraft/server/EnchantmentManager.java +++ b/src/main/java/net/minecraft/server/EnchantmentManager.java -@@ -246,6 +246,11 @@ public class EnchantmentManager { +@@ -251,6 +251,11 @@ public class EnchantmentManager { return getEnchantmentLevel(Enchantments.CHANNELING, itemstack) > 0; } @@ -24,12 +24,12 @@ index 1822178e8dd67bb063f5eab60335de9852b9a71c..d96c03a1a164799f49fdb3309594e759 + } @Nullable public static Entry b(Enchantment enchantment, EntityLiving entityliving) { - Map map = enchantment.a(entityliving); + return a(enchantment, entityliving, (itemstack) -> { diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index b3edb69a967058392f5027fbdc7fadff7e1dc6e2..87c6b77ce3b1446893a0d617b63f925a403e09cc 100644 +index e7fb982913f391bafd608c4626086cd9cab7fad7..7f2d8de12473c5413bbfc10ea0947d6a30802645 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -@@ -254,10 +254,12 @@ public class EntityExperienceOrb extends Entity { +@@ -249,10 +249,12 @@ public class EntityExperienceOrb extends Entity { } } @@ -43,10 +43,10 @@ index b3edb69a967058392f5027fbdc7fadff7e1dc6e2..87c6b77ce3b1446893a0d617b63f925a return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3d4a1065fbe38239743e485d078b76b47981baf1..5b088b21da2ca3945de9c5dcc4370114f930d739 100644 +index 09ac19363ecfdebe2b124fdf68a95265ae085cfe..734274db8f8c53d7e5310f2c16b1c64a42a6277c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1017,8 +1017,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1058,8 +1058,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().getId()); } diff --git a/Spigot-Server-Patches/0188-Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/0187-Make-max-squid-spawn-height-configurable.patch similarity index 92% rename from Spigot-Server-Patches/0188-Make-max-squid-spawn-height-configurable.patch rename to Spigot-Server-Patches/0187-Make-max-squid-spawn-height-configurable.patch index 5a0f752d27..a12846c612 100644 --- a/Spigot-Server-Patches/0188-Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/0187-Make-max-squid-spawn-height-configurable.patch @@ -21,10 +21,10 @@ index d2582d981f859b55ba5086540963c01ed49e4c15..92e6891502ef6dc276ed5b371124f24d + } } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 8c4f3b2c2e6e4e354562e32931b3fbf3d705a278..1c1ff2069d6daaf866a3e80a9b3ce78b19941384 100644 +index 915a2736447b651ac892254ed6429bad5a56954e..9c9ec8226ab43beaae0ef4abc97632b503e2120c 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java -@@ -171,7 +171,8 @@ public class EntitySquid extends EntityWaterAnimal { +@@ -169,7 +169,8 @@ public class EntitySquid extends EntityWaterAnimal { } public static boolean b(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { diff --git a/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch new file mode 100644 index 0000000000..e07c6528c5 --- /dev/null +++ b/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch @@ -0,0 +1,92 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 14 Jan 2018 17:01:31 -0500 +Subject: [PATCH] PreCreatureSpawnEvent + +Adds an event to fire before an Entity is created, so that plugins that need to cancel +CreatureSpawnEvent can do so from this event instead. + +Cancelling CreatureSpawnEvent rapidly causes a lot of garbage collection and CPU waste +as it's done after the Entity object has been fully created. + +Mob Limiting plugins and blanket "ban this type of monster" plugins should use this event +instead and save a lot of server resources. + +See: https://github.com/PaperMC/Paper/issues/917 + +diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +index efd4d2844c4ad638837a1fd971927758908e7db1..45cd44335427a818a580158d57025289f37079bf 100644 +--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java ++++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +@@ -105,6 +105,27 @@ public abstract class MobSpawnerAbstract { + double d5 = j >= 3 ? nbttaglist.h(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; + + if (world.b(((EntityTypes) optional.get()).a(d3, d4, d5)) && EntityPositionTypes.a((EntityTypes) optional.get(), world.getMinecraftWorld(), EnumMobSpawn.SPAWNER, new BlockPosition(d3, d4, d5), world.getRandom())) { ++ // Paper start ++ EntityTypes entityType = optional.get(); ++ String key = EntityTypes.getName(entityType).getKey(); ++ ++ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); ++ if (type != null) { ++ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; ++ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( ++ MCUtil.toLocation(world, d3, d4, d5), ++ type, ++ org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER ++ ); ++ if (!event.callEvent()) { ++ flag = true; ++ if (event.shouldAbortSpawn()) { ++ break; ++ } ++ continue; ++ } ++ } ++ // Paper end + Entity entity = EntityTypes.a(nbttagcompound, world, (entity1) -> { + entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch); + return entity1; +diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java +index 50be743513145bd2c8b9c65af219f60099cbb09f..4b1a5e92cc05df06edd6d2d7eab5ca70b70ede79 100644 +--- a/src/main/java/net/minecraft/server/SpawnerCreature.java ++++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +@@ -180,7 +180,12 @@ public final class SpawnerCreature { + j1 = biomebase_biomemeta.d + worldserver.random.nextInt(1 + biomebase_biomemeta.e - biomebase_biomemeta.d); + } + +- if (a(worldserver, enumcreaturetype, structuremanager, chunkgenerator, biomebase_biomemeta, blockposition_mutableblockposition, d2) && spawnercreature_c.test(biomebase_biomemeta.c, blockposition_mutableblockposition, ichunkaccess)) { ++ // Paper start ++ Boolean doSpawning = a(worldserver, enumcreaturetype, structuremanager, chunkgenerator, biomebase_biomemeta, blockposition_mutableblockposition, d2); ++ if (doSpawning == null) { ++ return; ++ } ++ if (doSpawning.booleanValue() && spawnercreature_c.test(biomebase_biomemeta.c, blockposition_mutableblockposition, ichunkaccess)) { // Paper end + EntityInsentient entityinsentient = a(worldserver, biomebase_biomemeta.c); + + if (entityinsentient == null) { +@@ -234,8 +239,24 @@ public final class SpawnerCreature { + } + } + +- private static boolean a(WorldServer worldserver, EnumCreatureType enumcreaturetype, StructureManager structuremanager, ChunkGenerator chunkgenerator, BiomeBase.BiomeMeta biomebase_biomemeta, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, double d0) { ++ private static Boolean a(WorldServer worldserver, EnumCreatureType enumcreaturetype, StructureManager structuremanager, ChunkGenerator chunkgenerator, BiomeBase.BiomeMeta biomebase_biomemeta, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, double d0) { // Paper + EntityTypes entitytypes = biomebase_biomemeta.c; ++ // Paper start ++ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; ++ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityTypes.getName(entitytypes).getKey()); ++ if (type != null) { ++ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( ++ MCUtil.toLocation(worldserver, blockposition_mutableblockposition), ++ type, SpawnReason.NATURAL ++ ); ++ if (!event.callEvent()) { ++ if (event.shouldAbortSpawn()) { ++ return null; ++ } ++ return false; // TODO is this handled correctly? ++ } ++ } ++ // Paper end + + if (entitytypes.e() == EnumCreatureType.MISC) { + return false; diff --git a/Spigot-Server-Patches/0190-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch similarity index 82% rename from Spigot-Server-Patches/0190-PlayerNaturallySpawnCreaturesEvent.patch rename to Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch index c21361276e..cf0949b6b7 100644 --- a/Spigot-Server-Patches/0190-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,27 +9,27 @@ 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 7464aeb4e2f2cbe177cfd2ac19c45aabac625632..261eff5bdb4f4dfae2f66eecad79b21fef69ea8f 100644 +index 7abd3683f9cc21b90dc74739954de2decddf6478..6921def2dc8dd7f2b8ba9d46ab697a9f9b62cf4e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -599,6 +599,15 @@ public class ChunkProviderServer extends IChunkProvider { - - this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings +@@ -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 + //Paper start - call player naturally spawn event + int chunkRange = world.spigotConfig.mobSpawnRange; + chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; + chunkRange = Math.min(chunkRange, 8); -+ for (EntityPlayer entityPlayer : this.world.players) { ++ for (EntityPlayer entityPlayer : this.world.getPlayers()) { + entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange); + entityPlayer.playerNaturallySpawnedEvent.callEvent(); + }; + // Paper end - this.playerChunkMap.f().forEach((playerchunk) -> { - Optional optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); + this.playerChunkMap.f().forEach((playerchunk) -> { // Paper - no... just no... + Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index bf32997c422d478699c32ce0539a65c35fbf0d12..88692d9eaea57a4d172d537a6cf2a3bffe058d54 100644 +index f4275e2ba2659d3087395105da9446225d3a904c..00b19cce68abf405117c5e2d55ba86fc10e7db34 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1,5 +1,6 @@ @@ -39,7 +39,7 @@ index bf32997c422d478699c32ce0539a65c35fbf0d12..88692d9eaea57a4d172d537a6cf2a3bf import com.google.common.collect.Lists; import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; -@@ -89,6 +90,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -93,6 +94,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean sentListPacket = false; public Integer clientViewDistance; // CraftBukkit end @@ -48,10 +48,10 @@ index bf32997c422d478699c32ce0539a65c35fbf0d12..88692d9eaea57a4d172d537a6cf2a3bf public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 0edba596754c6d5379c3c1eb0469aee447b7113f..7804cc0f6a02d14f4adbe05b37e8470a382c0d26 100644 +index cec1baadf5e8e0459837522ca434327491005e8c..ebe18750e19030b7e7eceb8190fc8d78dc0c3a90 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -882,12 +882,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -912,12 +912,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; diff --git a/Spigot-Server-Patches/0189-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0189-PreCreatureSpawnEvent.patch deleted file mode 100644 index db46076d7d..0000000000 --- a/Spigot-Server-Patches/0189-PreCreatureSpawnEvent.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sun, 14 Jan 2018 17:01:31 -0500 -Subject: [PATCH] PreCreatureSpawnEvent - -Adds an event to fire before an Entity is created, so that plugins that need to cancel -CreatureSpawnEvent can do so from this event instead. - -Cancelling CreatureSpawnEvent rapidly causes a lot of garbage collection and CPU waste -as it's done after the Entity object has been fully created. - -Mob Limiting plugins and blanket "ban this type of monster" plugins should use this event -instead and save a lot of server resources. - -See: https://github.com/PaperMC/Paper/issues/917 - -diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index c38295a09d99221cb196f9785ce674fe11120825..43c491f71b7739c782b46ee77ff8debe44213f11 100644 ---- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -@@ -105,6 +105,27 @@ public abstract class MobSpawnerAbstract { - double d5 = j >= 3 ? nbttaglist.h(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; - - if (world.a(((EntityTypes) optional.get()).a(d3, d4, d5)) && EntityPositionTypes.a((EntityTypes) optional.get(), world.getMinecraftWorld(), EnumMobSpawn.SPAWNER, new BlockPosition(d3, d4, d5), world.getRandom())) { -+ // Paper start -+ EntityTypes entityType = optional.get(); -+ String key = EntityTypes.getName(entityType).getKey(); -+ -+ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); -+ if (type != null) { -+ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; -+ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( -+ MCUtil.toLocation(world, d3, d4, d5), -+ type, -+ org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER -+ ); -+ if (!event.callEvent()) { -+ flag = true; -+ if (event.shouldAbortSpawn()) { -+ break; -+ } -+ continue; -+ } -+ } -+ // Paper end - Entity entity = EntityTypes.a(nbttagcompound, world, (entity1) -> { - entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch); - return entity1; -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 02157d051f3ecfc05f23ae8631cf01b6133ad159..224443e03c9e55af2744eebd7e754e2a1b3fa296 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -38,7 +38,7 @@ public final class SpawnerCreature { - BiomeBase.BiomeMeta biomebase_biomemeta = null; - GroupDataEntity groupdataentity = null; - int l1 = MathHelper.f(Math.random() * 4.0D); -- int i2 = 0; -+ int i2 = 0; // Paper - force diff on name change - int j2 = 0; - - while (true) { -@@ -77,6 +77,25 @@ public final class SpawnerCreature { - if (a(entitypositiontypes_surface, (IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition, entitytypes) && EntityPositionTypes.a(entitytypes, worldserver, EnumMobSpawn.NATURAL, blockposition_mutableblockposition, worldserver.random) && worldserver.a(entitytypes.a((double) f, (double) k, (double) f1))) { - EntityInsentient entityinsentient; - -+ // Paper start -+ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; -+ EntityTypes cls = biomebase_biomemeta.b; -+ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityTypes.getName(cls).getKey()); -+ if (type != null) { -+ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( -+ MCUtil.toLocation(worldserver, blockposition_mutableblockposition), -+ type, SpawnReason.NATURAL -+ ); -+ if (!event.callEvent()) { -+ if (event.shouldAbortSpawn()) { -+ return; -+ } -+ ++i2; -+ continue; -+ } -+ } -+ // Paper end -+ - try { - Entity entity = entitytypes.a((World) worldserver); - diff --git a/Spigot-Server-Patches/0191-Add-setPlayerProfile-API-for-Skulls.patch b/Spigot-Server-Patches/0190-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from Spigot-Server-Patches/0191-Add-setPlayerProfile-API-for-Skulls.patch rename to Spigot-Server-Patches/0190-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/Spigot-Server-Patches/0192-Fill-Profile-Property-Events.patch b/Spigot-Server-Patches/0191-Fill-Profile-Property-Events.patch similarity index 90% rename from Spigot-Server-Patches/0192-Fill-Profile-Property-Events.patch rename to Spigot-Server-Patches/0191-Fill-Profile-Property-Events.patch index b70eaeb177..30643d081c 100644 --- a/Spigot-Server-Patches/0192-Fill-Profile-Property-Events.patch +++ b/Spigot-Server-Patches/0191-Fill-Profile-Property-Events.patch @@ -11,18 +11,19 @@ If Mojang API does need to be hit, event fire so you can get the results. This is useful for implementing a ProfileCache for Player Skulls diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java -index 4b2a67423f57b70d316115e4525e3841a415b1cc..61cfdf73c8a5b0dcf2f9903ebbb2f4132ba1f0dd 100644 +index 93d73c27340645c7502acafdc0b2cfbc1a759dd8..5c7d2ee19243d0911a3a00af3ae42078a2ccba94 100644 --- a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java -@@ -1,5 +1,7 @@ +@@ -1,6 +1,8 @@ package com.destroystokyo.paper.profile; + import com.mojang.authlib.Environment; +import com.destroystokyo.paper.event.profile.FillProfileEvent; +import com.destroystokyo.paper.event.profile.PreFillProfileEvent; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; -@@ -19,7 +21,15 @@ public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionServi +@@ -20,7 +22,15 @@ public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionServi @Override public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) { diff --git a/Spigot-Server-Patches/0193-PlayerAdvancementCriterionGrantEvent.patch b/Spigot-Server-Patches/0192-PlayerAdvancementCriterionGrantEvent.patch similarity index 83% rename from Spigot-Server-Patches/0193-PlayerAdvancementCriterionGrantEvent.patch rename to Spigot-Server-Patches/0192-PlayerAdvancementCriterionGrantEvent.patch index c1c57794e6..28973e775a 100644 --- a/Spigot-Server-Patches/0193-PlayerAdvancementCriterionGrantEvent.patch +++ b/Spigot-Server-Patches/0192-PlayerAdvancementCriterionGrantEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index ca661f3933dad81150654551de4679fe2baeb138..c41e1384724ab150f43dc43fe2a453c9b1262e48 100644 +index 12fc641299342a317177cf0ab876186fb8a2b760..57b9d13447a4f7804827c1bd41121c3069c696bd 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -@@ -276,6 +276,12 @@ public class AdvancementDataPlayer { +@@ -279,6 +279,12 @@ public class AdvancementDataPlayer { boolean flag1 = advancementprogress.isDone(); if (advancementprogress.a(s)) { @@ -19,5 +19,5 @@ index ca661f3933dad81150654551de4679fe2baeb138..c41e1384724ab150f43dc43fe2a453c9 + } + // Paper end this.d(advancement); - this.i.add(advancement); + this.j.add(advancement); flag = true; diff --git a/Spigot-Server-Patches/0194-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch similarity index 98% rename from Spigot-Server-Patches/0194-Add-ArmorStand-Item-Meta.patch rename to Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch index bd6648dd47..c9871a8cb5 100644 --- a/Spigot-Server-Patches/0194-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch @@ -267,10 +267,10 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..3723faccac00afe19e59d71008ba1604 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index b9435bbd51764f75b8d24171513f3dddc48906f8..b87d2581754fde163a7b5532b9d5e21b48d3e243 100644 +index c1a42d04429a4e9587a4907c29f6b917951e659c..e5a2779a0460500c7d58f97c605549a366b5f0ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1428,7 +1428,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1427,7 +1427,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaTropicalFishBucket.VARIANT.NBT, CraftMetaCrossbow.CHARGED.NBT, CraftMetaCrossbow.CHARGED_PROJECTILES.NBT, diff --git a/Spigot-Server-Patches/0195-Extend-Player-Interact-cancellation.patch b/Spigot-Server-Patches/0194-Extend-Player-Interact-cancellation.patch similarity index 73% rename from Spigot-Server-Patches/0195-Extend-Player-Interact-cancellation.patch rename to Spigot-Server-Patches/0194-Extend-Player-Interact-cancellation.patch index 74811bc0fb..7ddec9164d 100644 --- a/Spigot-Server-Patches/0195-Extend-Player-Interact-cancellation.patch +++ b/Spigot-Server-Patches/0194-Extend-Player-Interact-cancellation.patch @@ -13,10 +13,10 @@ Update adjacent blocks of doors, double plants, pistons and beds when cancelling interaction. diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index dff3eb118856bb4b79e4378b5c39100d65a09767..e2e5c17c24c8f5e9807ca879b1025d13cb195226 100644 +index ee59d76d31b8b8cfd39d612b1e6040891f2256f4..36cf4c332054a350ae193637f895a45a8b04da9b 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -137,6 +137,11 @@ public class PlayerInteractManager { +@@ -148,6 +148,11 @@ public class PlayerInteractManager { PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, blockposition, enumdirection, this.player.inventory.getItemInHand(), EnumHand.MAIN_HAND); if (event.isCancelled()) { // Let the client know the block still exists @@ -28,15 +28,22 @@ index dff3eb118856bb4b79e4378b5c39100d65a09767..e2e5c17c24c8f5e9807ca879b1025d13 this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition)); // Update any tile entity data for this block TileEntity tileentity = this.world.getTileEntity(blockposition); -@@ -449,7 +454,25 @@ public class PlayerInteractManager { - ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down())); +@@ -446,13 +451,32 @@ public class PlayerInteractManager { + interactResult = event.useItemInHand() == Event.Result.DENY; + + if (event.useInteractedBlock() == Event.Result.DENY) { ++ + // If we denied a door from opening, we need to send a correcting update to the client, as it already opened the door. + if (iblockdata.getBlock() instanceof BlockDoor) { + boolean bottom = iblockdata.get(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER; + entityplayer.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down())); } else if (iblockdata.getBlock() instanceof BlockCake) { - ((EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake + entityplayer.getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake + // Paper start - extend Player Interact cancellation // TODO: consider merging this into the extracted method + } else if (iblockdata.getBlock() instanceof BlockStructure) { -+ ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutCloseWindow()); ++ entityplayer.playerConnection.sendPacket(new PacketPlayOutCloseWindow()); + } else if (iblockdata.getBlock() instanceof BlockCommand) { -+ ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutCloseWindow()); ++ entityplayer.playerConnection.sendPacket(new PacketPlayOutCloseWindow()); + } else if (iblockdata.getBlock() instanceof BlockFlowerPot) { + // Send a block change to air and then send back the correct block, just to make the client happy + PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(this.world, blockposition); @@ -51,6 +58,6 @@ index dff3eb118856bb4b79e4378b5c39100d65a09767..e2e5c17c24c8f5e9807ca879b1025d13 + } } + // Paper end - extend Player Interact cancellation - ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-2867 + entityplayer.getBukkitEntity().updateInventory(); // SPIGOT-2867 enuminteractionresult = (event.useItemInHand() != Event.Result.ALLOW) ? EnumInteractionResult.SUCCESS : EnumInteractionResult.PASS; } else if (this.gamemode == EnumGamemode.SPECTATOR) { diff --git a/Spigot-Server-Patches/0196-Tameable-getOwnerUniqueId-API.patch b/Spigot-Server-Patches/0195-Tameable-getOwnerUniqueId-API.patch similarity index 88% rename from Spigot-Server-Patches/0196-Tameable-getOwnerUniqueId-API.patch rename to Spigot-Server-Patches/0195-Tameable-getOwnerUniqueId-API.patch index d27adf73e1..2951cd45d3 100644 --- a/Spigot-Server-Patches/0196-Tameable-getOwnerUniqueId-API.patch +++ b/Spigot-Server-Patches/0195-Tameable-getOwnerUniqueId-API.patch @@ -7,7 +7,7 @@ This is faster if all you need is the UUID, as .getOwner() will cause an OfflinePlayer to be loaded from disk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 9952db3eb5ba94547f5e786c473fb59dfec616ab..1aea5f3f05794b444ca592cf518e29f76ccbd397 100644 +index 8c59b9ce12d4148b209c3824d44f6e9c736de16c..218a2190d1203ca0fbc2a5ad87e145f436aac314 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -90,6 +90,9 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac @@ -21,7 +21,7 @@ index 9952db3eb5ba94547f5e786c473fb59dfec616ab..1aea5f3f05794b444ca592cf518e29f7 return getHandle().getOwnerUUID(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java -index bff9854f3088649e6718ba8096abb170915f9d84..286d1194f2d46a8715a095ecaed276f657e5214b 100644 +index 58d9cd8172dcb8d3df93355d8ff51053b7469c45..6a642155cf387f7d0e2cf9bdf1a78c62aef8205b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -17,6 +17,9 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat diff --git a/Spigot-Server-Patches/0197-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 91% rename from Spigot-Server-Patches/0197-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to Spigot-Server-Patches/0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch index d9c9f0df75..2e13a03729 100644 --- a/Spigot-Server-Patches/0197-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/Spigot-Server-Patches/0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -21,10 +21,10 @@ index 92e6891502ef6dc276ed5b371124f24d5237b26b..77cdbfadf9c3eddb6a02460c321fa816 private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 542f935b4e7a027b3df82f037fcd6523286c5106..55d08d77480fda81e0155aa1e0287fddc827b67a 100644 +index eaed020982bd19dab72872849170fa62d75699eb..5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1063,6 +1063,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1042,6 +1042,7 @@ public abstract class EntityHuman extends EntityLiving { boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.isClimbing() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && entity instanceof EntityLiving; diff --git a/Spigot-Server-Patches/0198-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch b/Spigot-Server-Patches/0197-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch similarity index 92% rename from Spigot-Server-Patches/0198-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch rename to Spigot-Server-Patches/0197-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch index 87e6aa309d..2745dde43a 100644 --- a/Spigot-Server-Patches/0198-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch +++ b/Spigot-Server-Patches/0197-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java -index 5a9ac3960de199b166ba481794529f8801cdebb7..fd31b9a6dcf6aba4041f9f08e49a9b464b956843 100644 +index ce74a5ff2905042e54615439b8e5369d6a921a27..bf8c5436b6cc9f661e7b607fa4696e7ae55b3a13 100644 --- a/src/main/java/net/minecraft/server/InventoryEnderChest.java +++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java @@ -5,7 +5,7 @@ import org.bukkit.inventory.InventoryHolder; diff --git a/Spigot-Server-Patches/0198-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/0198-Prevent-Frosted-Ice-from-loading-holding-chunks.patch new file mode 100644 index 0000000000..5dc72b2612 --- /dev/null +++ b/Spigot-Server-Patches/0198-Prevent-Frosted-Ice-from-loading-holding-chunks.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 10 Mar 2018 16:33:15 -0500 +Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks + + +diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java +index 061b157f66999a733c3c4e990371b6f8d7860de2..77f5f835c60c181a0a2d6fc782d756338bc2ccb0 100644 +--- a/src/main/java/net/minecraft/server/BlockIceFrost.java ++++ b/src/main/java/net/minecraft/server/BlockIceFrost.java +@@ -28,7 +28,8 @@ public class BlockIceFrost extends BlockIce { + EnumDirection enumdirection = aenumdirection[j]; + + blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, enumdirection); +- IBlockData iblockdata1 = worldserver.getType(blockposition_mutableblockposition); ++ IBlockData iblockdata1 = worldserver.getTypeIfLoaded(blockposition_mutableblockposition); // Paper ++ if (iblockdata1 == null) { continue; } // Paper + + if (iblockdata1.a((Block) this) && !this.e(iblockdata1, (World) worldserver, blockposition_mutableblockposition)) { + worldserver.getBlockTickList().a(blockposition_mutableblockposition, this, MathHelper.nextInt(random, worldserver.paperConfig.frostedIceDelayMin, worldserver.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay +@@ -71,7 +72,9 @@ public class BlockIceFrost extends BlockIce { + EnumDirection enumdirection = aenumdirection[l]; + + blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, enumdirection); +- if (iblockaccess.getType(blockposition_mutableblockposition).a((Block) this)) { ++ // Paper start ++ IBlockData type = iblockaccess.getTypeIfLoaded(blockposition_mutableblockposition); ++ if (type != null && type.a((Block) this)) { // Paper end + ++j; + if (j >= i) { + return false; diff --git a/Spigot-Server-Patches/0200-Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/0199-Disable-Explicit-Network-Manager-Flushing.patch similarity index 90% rename from Spigot-Server-Patches/0200-Disable-Explicit-Network-Manager-Flushing.patch rename to Spigot-Server-Patches/0199-Disable-Explicit-Network-Manager-Flushing.patch index dfe29e706d..d7aad36191 100644 --- a/Spigot-Server-Patches/0200-Disable-Explicit-Network-Manager-Flushing.patch +++ b/Spigot-Server-Patches/0199-Disable-Explicit-Network-Manager-Flushing.patch @@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index e2d8ed88f05bf8cb214329ea27ac2b67f43e071a..08e314af7cbd6523bbd0bd5a5ad0a0fff2f080be 100644 +index 33900c22d4123e0f8333b9bdb9601d302e26c972..8cb29ddc0d5a5951ea35e1a16c023efb9b0be42d 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -63,6 +63,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -23,7 +23,7 @@ index e2d8ed88f05bf8cb214329ea27ac2b67f43e071a..08e314af7cbd6523bbd0bd5a5ad0a0ff // Paper end public NetworkManager(EnumProtocolDirection enumprotocoldirection) { -@@ -231,7 +232,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -230,7 +231,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } if (this.channel != null) { diff --git a/Spigot-Server-Patches/0199-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/0199-Prevent-Frosted-Ice-from-loading-holding-chunks.patch deleted file mode 100644 index bb2a2bba47..0000000000 --- a/Spigot-Server-Patches/0199-Prevent-Frosted-Ice-from-loading-holding-chunks.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sat, 10 Mar 2018 16:33:15 -0500 -Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks - - -diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index 5e414138e4e542c16508d679e571aac72c082e7b..638a0aa5ae80da2df9e640060272b83c6fc986ae 100644 ---- a/src/main/java/net/minecraft/server/BlockIceFrost.java -+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java -@@ -26,8 +26,8 @@ public class BlockIceFrost extends BlockIce { - EnumDirection enumdirection = aenumdirection[j]; - - blockposition_pooledblockposition.g(blockposition).c(enumdirection); -- IBlockData iblockdata1 = worldserver.getType(blockposition_pooledblockposition); -- -+ IBlockData iblockdata1 = worldserver.getTypeIfLoaded(blockposition_pooledblockposition); // Paper - don't load chunks -+ if (iblockdata1 == null) continue; // Paper - if (iblockdata1.getBlock() == this && !this.e(iblockdata1, (World) worldserver, blockposition_pooledblockposition)) { - worldserver.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, worldserver.paperConfig.frostedIceDelayMin, worldserver.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay - } -@@ -89,7 +89,7 @@ public class BlockIceFrost extends BlockIce { - EnumDirection enumdirection = aenumdirection[l]; - - blockposition_pooledblockposition.g(blockposition).c(enumdirection); -- if (iblockaccess.getType(blockposition_pooledblockposition).getBlock() == this) { -+ if (((World) iblockaccess).getBlockIfLoaded(blockposition_pooledblockposition) == this) { // Paper - don't load chunks - ++j; - if (j >= i) { - boolean flag = false; diff --git a/Spigot-Server-Patches/0201-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch similarity index 95% rename from Spigot-Server-Patches/0201-Implement-extended-PaperServerListPingEvent.patch rename to Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch index a59630a807..a2619661a6 100644 --- a/Spigot-Server-Patches/0201-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch @@ -177,30 +177,30 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 54f80cb8e1b771f2a493543e04f8bc8346a391dc..e7ee0e9b9b68f1fe31e189fbfd7e5b175a288a50 100644 +index 82e0def9becf8ecb68b2629531852808ad5a40a3..445d691b5051b4aefe480bea33a7bd6855009ecf 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1,6 +1,9 @@ - package net.minecraft.server; +@@ -2,6 +2,9 @@ package net.minecraft.server; import com.google.common.base.Splitter; + import com.google.common.collect.ImmutableList; +import co.aikar.timings.Timings; +import com.destroystokyo.paper.event.server.PaperServerListPingEvent; +import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; import com.google.common.collect.Maps; - import com.google.gson.JsonElement; -@@ -1095,7 +1098,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { - this.Z = i; + import com.google.common.collect.Sets; +@@ -1118,7 +1121,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { + this.T = i; this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount())); - GameProfile[] agameprofile = new GameProfile[Math.min(this.getPlayerCount(), 12)]; + GameProfile[] agameprofile = new GameProfile[Math.min(this.getPlayerCount(), org.spigotmc.SpigotConfig.playerSample)]; // Paper - int j = MathHelper.nextInt(this.q, 0, this.getPlayerCount() - agameprofile.length); + int j = MathHelper.nextInt(this.r, 0, this.getPlayerCount() - agameprofile.length); for (int k = 0; k < agameprofile.length; ++k) { diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index 658ea609cb4927b29a3d5303006f2adf2847e06b..4bb21c48bd50353370ec3c3546a00a5d20e4b9d8 100644 +index d9d9999e79f888d9d9ac0ef9ae5b3db67ac405ed..da804a9904c0bf7219729e9b9aca1bfc72dd10d6 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -37,6 +37,8 @@ public class PacketStatusListener implements PacketStatusInListener { diff --git a/Spigot-Server-Patches/0202-Improved-Async-Task-Scheduler.patch b/Spigot-Server-Patches/0201-Improved-Async-Task-Scheduler.patch similarity index 100% rename from Spigot-Server-Patches/0202-Improved-Async-Task-Scheduler.patch rename to Spigot-Server-Patches/0201-Improved-Async-Task-Scheduler.patch diff --git a/Spigot-Server-Patches/0203-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/0202-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 89% rename from Spigot-Server-Patches/0203-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to Spigot-Server-Patches/0202-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 9081b53c9b..1e599aa258 100644 --- a/Spigot-Server-Patches/0203-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/0202-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 1fb609dcfc61adfc63f0d32dc87a5e144a5013cf..1b43f921646e3c1bfdca22ef7d3719c72aaf4520 100644 +index 3cc12e7b75b8ed21a0ea44f8453553cf856fb786..80a21dbc05ed3007f2e827f7a320131244c3044b 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -1,5 +1,7 @@ @@ -16,8 +16,8 @@ index 1fb609dcfc61adfc63f0d32dc87a5e144a5013cf..1b43f921646e3c1bfdca22ef7d3719c7 +import com.destroystokyo.paper.profile.PlayerProfile; import com.mojang.authlib.GameProfile; import com.mojang.authlib.exceptions.AuthenticationUnavailableException; - import io.netty.channel.ChannelFuture; -@@ -19,6 +21,7 @@ import org.apache.logging.log4j.LogManager; + import java.math.BigInteger; +@@ -18,6 +20,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; // CraftBukkit start @@ -25,7 +25,7 @@ index 1fb609dcfc61adfc63f0d32dc87a5e144a5013cf..1b43f921646e3c1bfdca22ef7d3719c7 import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent; -@@ -287,8 +290,16 @@ public class LoginListener implements PacketLoginInListener { +@@ -286,8 +289,16 @@ public class LoginListener implements PacketLoginInListener { java.util.UUID uniqueId = i.getId(); final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; From 03a53a63b68a0d3f11f39ba58a1c0496a50a4940 Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Thu, 25 Jun 2020 16:09:55 +0200 Subject: [PATCH 09/95] even even even more work --- SHIT_TO_CHECK.md | 6 + .../0002-Paper-config-files.patch | 10 +- Spigot-Server-Patches/0004-MC-Utils.patch | 8 +- Spigot-Server-Patches/0009-Timings-v2.patch | 30 +- ...ient-crashes-server-lists-and-Mojang.patch | 8 +- ...023-Further-improve-server-tick-loop.patch | 14 +- .../0032-Optimize-explosions.patch | 4 +- ...44-Ensure-commands-are-not-ran-async.patch | 4 +- .../0046-Expose-server-CommandMap.patch | 4 +- ...e-informative-in-maxHealth-exception.patch | 4 +- .../0052-Add-velocity-warnings.patch | 4 +- ...working-with-arrows-stuck-in-living-.patch | 4 +- ...ading-permissions.yml-before-plugins.patch | 6 +- ...llow-Reloading-of-Custom-Permissions.patch | 4 +- .../0062-Remove-Metadata-on-reload.patch | 4 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 4 +- .../0088-Configurable-Player-Collision.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 8 +- .../0100-Optimize-UserCache-Thread-Safe.patch | 4 +- ...setting-for-proxy-online-mode-status.patch | 4 +- ...1-Allow-Reloading-of-Command-Aliases.patch | 4 +- ...PI-for-Reason-Source-Triggering-play.patch | 6 +- ...le-async-calls-to-restart-the-server.patch | 10 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- ...oleAppender-for-console-improvements.patch | 24 +- .../0152-Add-UnknownCommandEvent.patch | 8 +- .../0153-Basic-PlayerProfile-API.patch | 12 +- ...mplement-ensureServerConversions-API.patch | 4 +- .../0160-Implement-getI18NDisplayName.patch | 4 +- .../0167-LivingEntity-setKiller.patch | 4 +- .../0182-AsyncTabCompleteEvent.patch | 4 +- ...nt-extended-PaperServerListPingEvent.patch | 4 +- ...=> 0203-Player.setPlayerProfile-API.patch} | 32 +-- ...h => 0204-Fix-Dragon-Server-Crashes.patch} | 2 +- ...patch => 0205-getPlayerUniqueId-API.patch} | 4 +- ...ake-player-data-saving-configurable.patch} | 8 +- ...e-legacy-ping-handler-more-reliable.patch} | 0 ...erverListPingEvent-for-legacy-pings.patch} | 0 ...9-Flag-to-disable-the-channel-limit.patch} | 6 +- ...-method-to-open-already-placed-sign.patch} | 4 +- ...rable-sprint-interruption-on-attack.patch} | 4 +- ...allowed-colored-signs-to-be-created.patch} | 6 +- ...t.patch => 0213-EndermanEscapeEvent.patch} | 50 ++-- ...h => 0214-Enderman.teleportRandomly.patch} | 10 +- ...215-Block-Enderpearl-Travel-Exploit.patch} | 20 +- ...d.spawnParticle-API-and-add-Builder.patch} | 12 +- ...h => 0217-EndermanAttackPlayerEvent.patch} | 12 +- ...tch => 0218-WitchConsumePotionEvent.patch} | 6 +- ...patch => 0219-WitchThrowPotionEvent.patch} | 4 +- ...tem-entities-with-World.spawnEntity.patch} | 2 +- ...patch => 0221-WitchReadyPotionEvent.patch} | 10 +- ...222-ItemStack-getMaxItemUseDuration.patch} | 8 +- ...ement-EntityTeleportEndGatewayEvent.patch} | 6 +- ...d-flag-on-cancel-of-Explosion-Event.patch} | 6 +- ...ch => 0225-Fix-CraftEntity-hashCode.patch} | 4 +- ...e-Alternative-LootPool-Luck-Formula.patch} | 22 +- ...ls-when-failing-to-save-player-data.patch} | 6 +- ...-shield-blocking-delay-configurable.patch} | 14 +- ...nt-consumeArrow-and-getArrowItem-AP.patch} | 26 +- ...patch => 0230-PlayerReadyArrowEvent.patch} | 8 +- ...-EntityShootBowEvent-for-Illusioner.patch} | 6 +- ...lement-EntityKnockbackByEntityEvent.patch} | 4 +- ...patch => 0233-Expand-Explosions-API.patch} | 4 +- ...vingEntity-Hand-Raised-Item-Use-API.patch} | 24 +- ...-API.patch => 0235-RangedEntity-API.patch} | 0 ...o-disable-ender-dragon-legacy-check.patch} | 22 +- ...-Implement-World.getEntity-UUID-API.patch} | 4 +- ...0238-InventoryCloseEvent-Reason-API.patch} | 50 ++-- ...0239-Configurable-Bed-Search-Radius.patch} | 17 +- ...I.patch => 0240-Vex-getSummoner-API.patch} | 8 +- ...ventory-when-cancelling-PlayerInter.patch} | 4 +- ...e-the-Entity-Random-seed-for-squids.patch} | 4 +- ...illa-entity-warnings-for-duplicates.patch} | 4 +- ...-if-stack-size-above-max-stack-size.patch} | 6 +- ...45-Use-asynchronous-Log4j-2-loggers.patch} | 2 +- ...-more-information-to-Entity.toString.patch | 20 ++ ...es-option-to-debug-dupe-uuid-issues.patch} | 42 +-- ...-more-information-to-Entity.toString.patch | 20 -- ...ts.patch => 0248-EnderDragon-Events.patch} | 12 +- ...atch => 0249-PlayerElytraBoostEvent.patch} | 4 +- .../0250-Improve-BlockPosition-inlining.patch | 75 +++++ .../0251-Improve-BlockPosition-inlining.patch | 257 ------------------ ...patch => 0251-Optimize-RegistryID.c.patch} | 10 +- ...-armor-stands-from-doing-entity-loo.patch} | 13 +- ...-Vanished-players-don-t-have-rights.patch} | 89 +++--- ...anytime-entities-change-to-guarante.patch} | 6 +- ...d-some-Debug-to-Chunk-Entity-slices.patch} | 12 +- ...atch => 0256-EntityTransformedEvent.patch} | 68 ++--- ...tch => 0257-SkeletonHorse-Additions.patch} | 32 +-- ...event-Saving-Bad-entities-to-chunks.patch} | 14 +- ...n-t-call-getItemMeta-on-hasItemMeta.patch} | 4 +- ...ad-Entities-in-entityList-iteration.patch} | 47 ++-- ...1-Implement-Expanded-ArmorStand-API.patch} | 10 +- .../0262-AnvilDamageEvent.patch | 28 ++ ...ent.patch => 0263-Add-TNTPrimeEvent.patch} | 30 +- .../0263-AnvilDamageEvent.patch | 27 -- ...d-make-tab-spam-limits-configurable.patch} | 6 +- ...h => 0265-Add-hand-to-bucket-events.patch} | 123 ++++++--- ...-Experience-should-save-as-Integers.patch} | 10 +- ...ent-rendering-skulls-from-same-user.patch} | 28 +- ...d-Early-Warning-Feature-to-WatchDog.patch} | 10 +- ...0269-Make-EnderDragon-implement-Mob.patch} | 0 ...0-Use-ConcurrentHashMap-in-JsonList.patch} | 69 +++-- ...1-Use-a-Queue-for-Queueing-Commands.patch} | 10 +- ...le-Entities-from-a-chunk-without-sn.patch} | 6 +- ...llow-disabling-armour-stand-ticking.patch} | 126 +-------- ...timize-BlockPosition-helper-methods.patch} | 4 +- ...tore-vanlla-default-mob-spawn-range.patch} | 2 +- ...-124320.patch => 0276-Fix-MC-124320.patch} | 16 +- ...tch => 0277-Slime-Pathfinder-Events.patch} | 40 +-- ...e-speed-for-water-flowing-over-lava.patch} | 12 +- ...278-Optimize-CraftBlockData-Creation.patch | 59 ---- ... => 0279-Optimize-RegistryMaterials.patch} | 28 +- ...ch => 0280-Add-PhantomPreSpawnEvent.patch} | 12 +- ....patch => 0281-Add-More-Creeper-API.patch} | 8 +- ...=> 0282-Inventory-removeItemAnySlot.patch} | 2 +- ...oadChunk-int-int-false-load-unconve.patch} | 4 +- ...ray-tracing-methods-to-LivingEntity.patch} | 8 +- ...-attack-cooldown-methods-for-Player.patch} | 26 +- ....patch => 0286-Improve-death-events.patch} | 114 ++++---- ...w-chests-to-be-placed-with-NBT-data.patch} | 6 +- ...I.patch => 0288-Mob-Pathfinding-API.patch} | 28 +- ...nt-chunk-loading-from-Fluid-Flowing.patch} | 10 +- ...for-CanPlaceOn-and-CanDestroy-NBT-v.patch} | 38 +-- ...nt-Mob-AI-Rules-from-Loading-Chunks.patch} | 24 +- ...wning-from-loading-generating-chunks.patch | 32 +++ ...-Biome-Mob-Lookups-for-Mob-Spawning.patch} | 28 +- ...t-furnace-cook-speed-multiplier-API.patch} | 20 +- ...h => 0295-Optimize-Server-World-Map.patch} | 72 +++-- ...wning-from-loading-generating-chunks.patch | 32 --- ....patch => 0296-PreSpawnerSpawnEvent.patch} | 2 +- ...rseException-in-Entity-and-TE-names.patch} | 31 +-- ...=> 0298-Honor-EntityAgeable.ageLock.patch} | 4 +- ...le-connection-throttle-kick-message.patch} | 14 +- ...> 0300-Hook-into-CB-plugin-rewrites.patch} | 32 +-- ...01-Allow-setting-the-vex-s-summoner.patch} | 4 +- ...I.patch => 0302-Add-sun-related-API.patch} | 16 +- ...Turtle-API.patch => 0303-Turtle-API.patch} | 92 +++---- ...ther-worlds-for-shooter-of-projectil.patch | 36 +++ ...ator-target-events-and-improve-impl.patch} | 8 +- ...-Add-Velocity-IP-Forwarding-Support.patch} | 34 +-- ...PI.patch => 0307-Add-more-Witch-API.patch} | 92 ++++--- ...vent-players-from-moving-into-unloa.patch} | 12 +- ...owned-for-Villager-Aggression-Config.patch | 19 -- .../0309-Here-s-Johnny.patch | 38 --- ...9-Reset-players-airTicks-on-respawn.patch} | 12 +- ...after-profile-lookups-if-not-needed.patch} | 6 +- ...r-Thread-Pool-and-Thread-Priorities.patch} | 31 +-- ...ther-worlds-for-shooter-of-projectil.patch | 33 --- ...=> 0312-Optimize-World-Time-Updates.patch} | 4 +- ...tore-custom-InventoryHolder-support.patch} | 4 +- ...=> 0314-Use-Vanilla-Minecart-Speeds.patch} | 4 +- ...0315-Fix-SpongeAbsortEvent-handling.patch} | 8 +- ...-allow-digging-into-unloaded-chunks.patch} | 54 ++-- ...mits.patch => 0317-Book-Size-Limits.patch} | 12 +- ...ult-permission-message-configurable.patch} | 12 +- ...revent-rayTrace-from-loading-chunks.patch} | 4 +- ...-Large-Packets-disconnecting-client.patch} | 8 +- ...ntity-dismount-during-teleportation.patch} | 34 +-- ...I.patch => 0322-Add-more-Zombie-API.patch} | 38 +-- ...0323-Add-PlayerConnectionCloseEvent.patch} | 10 +- ...revent-Enderman-from-loading-chunks.patch} | 6 +- ...replace-OfflinePlayer-getLastPlayed.patch} | 22 +- ...tch => 0326-Fix-PlayerEditBookEvent.patch} | 4 +- ...ehicle-tracking-issue-on-disconnect.patch} | 8 +- ...nRetractEvent-for-all-empty-pistons.patch} | 8 +- ...remove-from-being-called-on-Players.patch} | 4 +- ...ent.patch => 0330-BlockDestroyEvent.patch} | 12 +- ...m-Shapeless-Custom-Crafting-Recipes.patch} | 0 ...h => 0332-Fix-sign-edit-memory-leak.patch} | 14 +- ...-world-storage-in-CraftOfflinePlayer.patch | 62 ----- ... 0333-Limit-Client-Sign-length-more.patch} | 4 +- ...onvertSigns-boolean-every-sign-save.patch} | 8 +- ...Manager-and-add-advanced-packet-sup.patch} | 32 +-- ...e-Oversized-Tile-Entities-in-chunks.patch} | 12 +- ...-Fix-Whitelist-On-Off-inconsistency.patch} | 39 +-- ...t-tick-at-start-of-drowning-process.patch} | 10 +- ...39-Allow-Saving-of-Oversized-Chunks.patch} | 18 +- ...ggleEvent-when-whitelist-is-toggled.patch} | 6 +- ...41-Add-LivingEntity-getTargetEntity.patch} | 36 +-- ...ngth-when-serialising-BungeeCord-te.patch} | 6 +- ...=> 0343-Entity-getEntitySpawnReason.patch} | 22 +- ...ty-Metadata-for-all-tracked-players.patch} | 8 +- ...45-Implement-PlayerPostRespawnEvent.patch} | 22 +- ...for-pickupDelay-breaks-picking-up-i.patch} | 4 +- ...-and-setters-for-EntityItem-owner-a.patch} | 0 ...ts.patch => 0348-Server-Tick-Events.patch} | 8 +- ...349-PlayerDeathEvent-getItemsToKeep.patch} | 6 +- ...Optimize-Captured-TileEntity-Lookup.patch} | 6 +- ...API.patch => 0351-Add-Heightmap-API.patch} | 8 +- ...> 0352-Mob-Spawner-API-Enhancements.patch} | 2 +- ...layer-View-Distance-API-placeholders.patch | 62 +++++ ...-to-changed-postToMainThread-method.patch} | 4 +- ...-item-frames-are-modified-MC-123450.patch} | 6 +- ...sPrimaryThread-and-MinecraftServer-.patch} | 10 +- ...-entity-loss-due-to-unloaded-chunks.patch} | 38 +-- ... 0358-Duplicate-UUID-Resolve-Option.patch} | 40 +-- ...59-improve-CraftWorld-isChunkLoaded.patch} | 4 +- ...e-Keep-Spawn-Loaded-range-per-world.patch} | 31 +-- ...ityAreaEffectCloud-from-going-negat.patch} | 4 +- ....patch => 0362-ChunkMapDistance-CME.patch} | 6 +- ...0363-Implement-CraftBlockSoundGroup.patch} | 50 ++-- ...d.patch => 0364-Chunk-debug-command.patch} | 24 +- ...layer-View-Distance-API-placeholders.patch | 61 ----- ...ptions-from-dispenser-entity-spawns.patch} | 2 +- ...ets-from-world-player-list-not-serve.patch | 0 .../0298-Support-Overriding-World-Seeds.patch | 0 .../0302-Avoid-dimension-id-collisions.patch | 0 ...mit-lightning-strike-effect-distance.patch | 0 .../0326-Optimize-redstone-algorithm.patch | 0 .../1.16}/0356-Fire-event-on-GS4-query.patch | 0 ...x-some-generation-concurrency-issues.patch | 0 .../1.16}/0378-incremental-chunk-saving.patch | 0 work/Bukkit | 2 +- work/CraftBukkit | 2 +- 215 files changed, 1750 insertions(+), 2211 deletions(-) create mode 100644 SHIT_TO_CHECK.md rename Spigot-Server-Patches/{0204-Player.setPlayerProfile-API.patch => 0203-Player.setPlayerProfile-API.patch} (86%) rename Spigot-Server-Patches/{0205-Fix-Dragon-Server-Crashes.patch => 0204-Fix-Dragon-Server-Crashes.patch} (92%) rename Spigot-Server-Patches/{0206-getPlayerUniqueId-API.patch => 0205-getPlayerUniqueId-API.patch} (91%) rename Spigot-Server-Patches/{0207-Make-player-data-saving-configurable.patch => 0206-Make-player-data-saving-configurable.patch} (86%) rename Spigot-Server-Patches/{0208-Make-legacy-ping-handler-more-reliable.patch => 0207-Make-legacy-ping-handler-more-reliable.patch} (100%) rename Spigot-Server-Patches/{0209-Call-PaperServerListPingEvent-for-legacy-pings.patch => 0208-Call-PaperServerListPingEvent-for-legacy-pings.patch} (100%) rename Spigot-Server-Patches/{0210-Flag-to-disable-the-channel-limit.patch => 0209-Flag-to-disable-the-channel-limit.patch} (88%) rename Spigot-Server-Patches/{0211-Add-method-to-open-already-placed-sign.patch => 0210-Add-method-to-open-already-placed-sign.patch} (88%) rename Spigot-Server-Patches/{0212-Configurable-sprint-interruption-on-attack.patch => 0211-Configurable-sprint-interruption-on-attack.patch} (92%) rename Spigot-Server-Patches/{0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch => 0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch} (79%) rename Spigot-Server-Patches/{0214-EndermanEscapeEvent.patch => 0213-EndermanEscapeEvent.patch} (62%) rename Spigot-Server-Patches/{0215-Enderman.teleportRandomly.patch => 0214-Enderman.teleportRandomly.patch} (80%) rename Spigot-Server-Patches/{0216-Block-Enderpearl-Travel-Exploit.patch => 0215-Block-Enderpearl-Travel-Exploit.patch} (63%) rename Spigot-Server-Patches/{0217-Expand-World.spawnParticle-API-and-add-Builder.patch => 0216-Expand-World.spawnParticle-API-and-add-Builder.patch} (89%) rename Spigot-Server-Patches/{0218-EndermanAttackPlayerEvent.patch => 0217-EndermanAttackPlayerEvent.patch} (73%) rename Spigot-Server-Patches/{0219-WitchConsumePotionEvent.patch => 0218-WitchConsumePotionEvent.patch} (89%) rename Spigot-Server-Patches/{0220-WitchThrowPotionEvent.patch => 0219-WitchThrowPotionEvent.patch} (84%) rename Spigot-Server-Patches/{0221-Allow-spawning-Item-entities-with-World.spawnEntity.patch => 0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch} (93%) rename Spigot-Server-Patches/{0222-WitchReadyPotionEvent.patch => 0221-WitchReadyPotionEvent.patch} (71%) rename Spigot-Server-Patches/{0223-ItemStack-getMaxItemUseDuration.patch => 0222-ItemStack-getMaxItemUseDuration.patch} (83%) rename Spigot-Server-Patches/{0224-Implement-EntityTeleportEndGatewayEvent.patch => 0223-Implement-EntityTeleportEndGatewayEvent.patch} (84%) rename Spigot-Server-Patches/{0225-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch => 0224-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch} (88%) rename Spigot-Server-Patches/{0226-Fix-CraftEntity-hashCode.patch => 0225-Fix-CraftEntity-hashCode.patch} (91%) rename Spigot-Server-Patches/{0227-Configurable-Alternative-LootPool-Luck-Formula.patch => 0226-Configurable-Alternative-LootPool-Luck-Formula.patch} (89%) rename Spigot-Server-Patches/{0228-Print-Error-details-when-failing-to-save-player-data.patch => 0227-Print-Error-details-when-failing-to-save-player-data.patch} (78%) rename Spigot-Server-Patches/{0229-Make-shield-blocking-delay-configurable.patch => 0228-Make-shield-blocking-delay-configurable.patch} (81%) rename Spigot-Server-Patches/{0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch => 0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch} (85%) rename Spigot-Server-Patches/{0231-PlayerReadyArrowEvent.patch => 0230-PlayerReadyArrowEvent.patch} (83%) rename Spigot-Server-Patches/{0232-Fire-EntityShootBowEvent-for-Illusioner.patch => 0231-Fire-EntityShootBowEvent-for-Illusioner.patch} (82%) rename Spigot-Server-Patches/{0233-Implement-EntityKnockbackByEntityEvent.patch => 0232-Implement-EntityKnockbackByEntityEvent.patch} (90%) rename Spigot-Server-Patches/{0234-Expand-Explosions-API.patch => 0233-Expand-Explosions-API.patch} (89%) rename Spigot-Server-Patches/{0235-LivingEntity-Hand-Raised-Item-Use-API.patch => 0234-LivingEntity-Hand-Raised-Item-Use-API.patch} (74%) rename Spigot-Server-Patches/{0236-RangedEntity-API.patch => 0235-RangedEntity-API.patch} (100%) rename Spigot-Server-Patches/{0237-Add-config-to-disable-ender-dragon-legacy-check.patch => 0236-Add-config-to-disable-ender-dragon-legacy-check.patch} (71%) rename Spigot-Server-Patches/{0238-Implement-World.getEntity-UUID-API.patch => 0237-Implement-World.getEntity-UUID-API.patch} (84%) rename Spigot-Server-Patches/{0239-InventoryCloseEvent-Reason-API.patch => 0238-InventoryCloseEvent-Reason-API.patch} (83%) rename Spigot-Server-Patches/{0240-Configurable-Bed-Search-Radius.patch => 0239-Configurable-Bed-Search-Radius.patch} (90%) rename Spigot-Server-Patches/{0241-Vex-getSummoner-API.patch => 0240-Vex-getSummoner-API.patch} (85%) rename Spigot-Server-Patches/{0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch => 0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch} (89%) rename Spigot-Server-Patches/{0243-Don-t-change-the-Entity-Random-seed-for-squids.patch => 0242-Don-t-change-the-Entity-Random-seed-for-squids.patch} (82%) rename Spigot-Server-Patches/{0244-Re-add-vanilla-entity-warnings-for-duplicates.patch => 0243-Re-add-vanilla-entity-warnings-for-duplicates.patch} (86%) rename Spigot-Server-Patches/{0245-Avoid-item-merge-if-stack-size-above-max-stack-size.patch => 0244-Avoid-item-merge-if-stack-size-above-max-stack-size.patch} (83%) rename Spigot-Server-Patches/{0246-Use-asynchronous-Log4j-2-loggers.patch => 0245-Use-asynchronous-Log4j-2-loggers.patch} (95%) create mode 100644 Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch rename Spigot-Server-Patches/{0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch => 0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch} (74%) delete mode 100644 Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch rename Spigot-Server-Patches/{0249-EnderDragon-Events.patch => 0248-EnderDragon-Events.patch} (86%) rename Spigot-Server-Patches/{0250-PlayerElytraBoostEvent.patch => 0249-PlayerElytraBoostEvent.patch} (90%) create mode 100644 Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch delete mode 100644 Spigot-Server-Patches/0251-Improve-BlockPosition-inlining.patch rename Spigot-Server-Patches/{0252-Optimize-RegistryID.c.patch => 0251-Optimize-RegistryID.c.patch} (84%) rename Spigot-Server-Patches/{0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch => 0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch} (77%) rename Spigot-Server-Patches/{0254-Vanished-players-don-t-have-rights.patch => 0253-Vanished-players-don-t-have-rights.patch} (65%) rename Spigot-Server-Patches/{0255-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch => 0254-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch} (79%) rename Spigot-Server-Patches/{0256-Add-some-Debug-to-Chunk-Entity-slices.patch => 0255-Add-some-Debug-to-Chunk-Entity-slices.patch} (86%) rename Spigot-Server-Patches/{0257-EntityTransformedEvent.patch => 0256-EntityTransformedEvent.patch} (50%) rename Spigot-Server-Patches/{0258-SkeletonHorse-Additions.patch => 0257-SkeletonHorse-Additions.patch} (76%) rename Spigot-Server-Patches/{0259-Prevent-Saving-Bad-entities-to-chunks.patch => 0258-Prevent-Saving-Bad-entities-to-chunks.patch} (89%) rename Spigot-Server-Patches/{0260-Don-t-call-getItemMeta-on-hasItemMeta.patch => 0259-Don-t-call-getItemMeta-on-hasItemMeta.patch} (95%) rename Spigot-Server-Patches/{0261-Ignore-Dead-Entities-in-entityList-iteration.patch => 0260-Ignore-Dead-Entities-in-entityList-iteration.patch} (75%) rename Spigot-Server-Patches/{0262-Implement-Expanded-ArmorStand-API.patch => 0261-Implement-Expanded-ArmorStand-API.patch} (94%) create mode 100644 Spigot-Server-Patches/0262-AnvilDamageEvent.patch rename Spigot-Server-Patches/{0264-Add-TNTPrimeEvent.patch => 0263-Add-TNTPrimeEvent.patch} (85%) delete mode 100644 Spigot-Server-Patches/0263-AnvilDamageEvent.patch rename Spigot-Server-Patches/{0265-Break-up-and-make-tab-spam-limits-configurable.patch => 0264-Break-up-and-make-tab-spam-limits-configurable.patch} (95%) rename Spigot-Server-Patches/{0266-Add-hand-to-bucket-events.patch => 0265-Add-hand-to-bucket-events.patch} (50%) rename Spigot-Server-Patches/{0267-MC-135506-Experience-should-save-as-Integers.patch => 0266-MC-135506-Experience-should-save-as-Integers.patch} (76%) rename Spigot-Server-Patches/{0268-Fix-client-rendering-skulls-from-same-user.patch => 0267-Fix-client-rendering-skulls-from-same-user.patch} (86%) rename Spigot-Server-Patches/{0269-Add-Early-Warning-Feature-to-WatchDog.patch => 0268-Add-Early-Warning-Feature-to-WatchDog.patch} (96%) rename Spigot-Server-Patches/{0270-Make-EnderDragon-implement-Mob.patch => 0269-Make-EnderDragon-implement-Mob.patch} (100%) rename Spigot-Server-Patches/{0271-Use-ConcurrentHashMap-in-JsonList.patch => 0270-Use-ConcurrentHashMap-in-JsonList.patch} (69%) rename Spigot-Server-Patches/{0272-Use-a-Queue-for-Queueing-Commands.patch => 0271-Use-a-Queue-for-Queueing-Commands.patch} (80%) rename Spigot-Server-Patches/{0273-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch => 0272-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch} (85%) rename Spigot-Server-Patches/{0274-Allow-disabling-armour-stand-ticking.patch => 0273-Allow-disabling-armour-stand-ticking.patch} (53%) rename Spigot-Server-Patches/{0275-Optimize-BlockPosition-helper-methods.patch => 0274-Optimize-BlockPosition-helper-methods.patch} (95%) rename Spigot-Server-Patches/{0277-Restore-vanlla-default-mob-spawn-range.patch => 0275-Restore-vanlla-default-mob-spawn-range.patch} (88%) rename Spigot-Server-Patches/{0279-Fix-MC-124320.patch => 0276-Fix-MC-124320.patch} (80%) rename Spigot-Server-Patches/{0280-Slime-Pathfinder-Events.patch => 0277-Slime-Pathfinder-Events.patch} (84%) rename Spigot-Server-Patches/{0281-Configurable-speed-for-water-flowing-over-lava.patch => 0278-Configurable-speed-for-water-flowing-over-lava.patch} (89%) delete mode 100644 Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch rename Spigot-Server-Patches/{0282-Optimize-RegistryMaterials.patch => 0279-Optimize-RegistryMaterials.patch} (53%) rename Spigot-Server-Patches/{0283-Add-PhantomPreSpawnEvent.patch => 0280-Add-PhantomPreSpawnEvent.patch} (90%) rename Spigot-Server-Patches/{0284-Add-More-Creeper-API.patch => 0281-Add-More-Creeper-API.patch} (92%) rename Spigot-Server-Patches/{0285-Inventory-removeItemAnySlot.patch => 0282-Inventory-removeItemAnySlot.patch} (96%) rename Spigot-Server-Patches/{0286-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch => 0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch} (87%) rename Spigot-Server-Patches/{0287-Add-ray-tracing-methods-to-LivingEntity.patch => 0284-Add-ray-tracing-methods-to-LivingEntity.patch} (92%) rename Spigot-Server-Patches/{0288-Expose-attack-cooldown-methods-for-Player.patch => 0285-Expose-attack-cooldown-methods-for-Player.patch} (65%) rename Spigot-Server-Patches/{0289-Improve-death-events.patch => 0286-Improve-death-events.patch} (82%) rename Spigot-Server-Patches/{0290-Allow-chests-to-be-placed-with-NBT-data.patch => 0287-Allow-chests-to-be-placed-with-NBT-data.patch} (85%) rename Spigot-Server-Patches/{0291-Mob-Pathfinding-API.patch => 0288-Mob-Pathfinding-API.patch} (90%) rename Spigot-Server-Patches/{0292-Prevent-chunk-loading-from-Fluid-Flowing.patch => 0289-Prevent-chunk-loading-from-Fluid-Flowing.patch} (92%) rename Spigot-Server-Patches/{0293-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch => 0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch} (93%) rename Spigot-Server-Patches/{0294-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch => 0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch} (78%) create mode 100644 Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch rename Spigot-Server-Patches/{0296-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch => 0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch} (69%) rename Spigot-Server-Patches/{0297-Implement-furnace-cook-speed-multiplier-API.patch => 0294-Implement-furnace-cook-speed-multiplier-API.patch} (86%) rename Spigot-Server-Patches/{0299-Optimize-Server-World-Map.patch => 0295-Optimize-Server-World-Map.patch} (71%) delete mode 100644 Spigot-Server-Patches/0295-Prevent-mob-spawning-from-loading-generating-chunks.patch rename Spigot-Server-Patches/{0300-PreSpawnerSpawnEvent.patch => 0296-PreSpawnerSpawnEvent.patch} (94%) rename Spigot-Server-Patches/{0301-Catch-JsonParseException-in-Entity-and-TE-names.patch => 0297-Catch-JsonParseException-in-Entity-and-TE-names.patch} (69%) rename Spigot-Server-Patches/{0303-Honor-EntityAgeable.ageLock.patch => 0298-Honor-EntityAgeable.ageLock.patch} (77%) rename Spigot-Server-Patches/{0304-Configurable-connection-throttle-kick-message.patch => 0299-Configurable-connection-throttle-kick-message.patch} (75%) rename Spigot-Server-Patches/{0305-Hook-into-CB-plugin-rewrites.patch => 0300-Hook-into-CB-plugin-rewrites.patch} (87%) rename Spigot-Server-Patches/{0306-Allow-setting-the-vex-s-summoner.patch => 0301-Allow-setting-the-vex-s-summoner.patch} (89%) rename Spigot-Server-Patches/{0307-Add-sun-related-API.patch => 0302-Add-sun-related-API.patch} (79%) rename Spigot-Server-Patches/{0310-Turtle-API.patch => 0303-Turtle-API.patch} (61%) create mode 100644 Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename Spigot-Server-Patches/{0313-Call-player-spectator-target-events-and-improve-impl.patch => 0305-Call-player-spectator-target-events-and-improve-impl.patch} (94%) rename Spigot-Server-Patches/{0314-Add-Velocity-IP-Forwarding-Support.patch => 0306-Add-Velocity-IP-Forwarding-Support.patch} (91%) rename Spigot-Server-Patches/{0315-Add-more-Witch-API.patch => 0307-Add-more-Witch-API.patch} (60%) rename Spigot-Server-Patches/{0317-Add-option-to-prevent-players-from-moving-into-unloa.patch => 0308-Add-option-to-prevent-players-from-moving-into-unloa.patch} (90%) delete mode 100644 Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch delete mode 100644 Spigot-Server-Patches/0309-Here-s-Johnny.patch rename Spigot-Server-Patches/{0318-Reset-players-airTicks-on-respawn.patch => 0309-Reset-players-airTicks-on-respawn.patch} (71%) rename Spigot-Server-Patches/{0319-Don-t-sleep-after-profile-lookups-if-not-needed.patch => 0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch} (87%) rename Spigot-Server-Patches/{0320-Improve-Server-Thread-Pool-and-Thread-Priorities.patch => 0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch} (79%) delete mode 100644 Spigot-Server-Patches/0312-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename Spigot-Server-Patches/{0321-Optimize-World-Time-Updates.patch => 0312-Optimize-World-Time-Updates.patch} (94%) rename Spigot-Server-Patches/{0322-Restore-custom-InventoryHolder-support.patch => 0313-Restore-custom-InventoryHolder-support.patch} (92%) rename Spigot-Server-Patches/{0323-Use-Vanilla-Minecart-Speeds.patch => 0314-Use-Vanilla-Minecart-Speeds.patch} (87%) rename Spigot-Server-Patches/{0324-Fix-SpongeAbsortEvent-handling.patch => 0315-Fix-SpongeAbsortEvent-handling.patch} (88%) rename Spigot-Server-Patches/{0325-Don-t-allow-digging-into-unloaded-chunks.patch => 0316-Don-t-allow-digging-into-unloaded-chunks.patch} (64%) rename Spigot-Server-Patches/{0328-Book-Size-Limits.patch => 0317-Book-Size-Limits.patch} (90%) rename Spigot-Server-Patches/{0329-Make-the-default-permission-message-configurable.patch => 0318-Make-the-default-permission-message-configurable.patch} (83%) rename Spigot-Server-Patches/{0331-Prevent-rayTrace-from-loading-chunks.patch => 0319-Prevent-rayTrace-from-loading-chunks.patch} (90%) rename Spigot-Server-Patches/{0332-Handle-Large-Packets-disconnecting-client.patch => 0320-Handle-Large-Packets-disconnecting-client.patch} (93%) rename Spigot-Server-Patches/{0327-force-entity-dismount-during-teleportation.patch => 0321-force-entity-dismount-during-teleportation.patch} (83%) rename Spigot-Server-Patches/{0330-Add-more-Zombie-API.patch => 0322-Add-more-Zombie-API.patch} (81%) rename Spigot-Server-Patches/{0334-Add-PlayerConnectionCloseEvent.patch => 0323-Add-PlayerConnectionCloseEvent.patch} (92%) rename Spigot-Server-Patches/{0335-Prevent-Enderman-from-loading-chunks.patch => 0324-Prevent-Enderman-from-loading-chunks.patch} (86%) rename Spigot-Server-Patches/{0336-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch => 0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch} (88%) rename Spigot-Server-Patches/{0337-Fix-PlayerEditBookEvent.patch => 0326-Fix-PlayerEditBookEvent.patch} (91%) rename Spigot-Server-Patches/{0338-Workaround-for-vehicle-tracking-issue-on-disconnect.patch => 0327-Workaround-for-vehicle-tracking-issue-on-disconnect.patch} (80%) rename Spigot-Server-Patches/{0339-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch => 0328-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch} (91%) rename Spigot-Server-Patches/{0340-Block-Entity-remove-from-being-called-on-Players.patch => 0329-Block-Entity-remove-from-being-called-on-Players.patch} (89%) rename Spigot-Server-Patches/{0341-BlockDestroyEvent.patch => 0330-BlockDestroyEvent.patch} (77%) rename Spigot-Server-Patches/{0342-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch => 0331-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch} (100%) rename Spigot-Server-Patches/{0343-Fix-sign-edit-memory-leak.patch => 0332-Fix-sign-edit-memory-leak.patch} (74%) delete mode 100644 Spigot-Server-Patches/0333-Lazy-init-world-storage-in-CraftOfflinePlayer.patch rename Spigot-Server-Patches/{0344-Limit-Client-Sign-length-more.patch => 0333-Limit-Client-Sign-length-more.patch} (94%) rename Spigot-Server-Patches/{0345-Don-t-check-ConvertSigns-boolean-every-sign-save.patch => 0334-Don-t-check-ConvertSigns-boolean-every-sign-save.patch} (80%) rename Spigot-Server-Patches/{0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => 0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (92%) rename Spigot-Server-Patches/{0347-Handle-Oversized-Tile-Entities-in-chunks.patch => 0336-Handle-Oversized-Tile-Entities-in-chunks.patch} (83%) rename Spigot-Server-Patches/{0348-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch => 0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch} (52%) rename Spigot-Server-Patches/{0349-Set-Zombie-last-tick-at-start-of-drowning-process.patch => 0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch} (72%) rename Spigot-Server-Patches/{0350-Allow-Saving-of-Oversized-Chunks.patch => 0339-Allow-Saving-of-Oversized-Chunks.patch} (94%) rename Spigot-Server-Patches/{0351-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => 0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (75%) rename Spigot-Server-Patches/{0352-Add-LivingEntity-getTargetEntity.patch => 0341-Add-LivingEntity-getTargetEntity.patch} (84%) rename Spigot-Server-Patches/{0353-Use-proper-max-length-when-serialising-BungeeCord-te.patch => 0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch} (91%) rename Spigot-Server-Patches/{0354-Entity-getEntitySpawnReason.patch => 0343-Entity-getEntitySpawnReason.patch} (85%) rename Spigot-Server-Patches/{0355-Update-entity-Metadata-for-all-tracked-players.patch => 0344-Update-entity-Metadata-for-all-tracked-players.patch} (86%) rename Spigot-Server-Patches/{0357-Implement-PlayerPostRespawnEvent.patch => 0345-Implement-PlayerPostRespawnEvent.patch} (63%) rename Spigot-Server-Patches/{0358-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => 0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (90%) rename Spigot-Server-Patches/{0359-Implement-getters-and-setters-for-EntityItem-owner-a.patch => 0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch} (100%) rename Spigot-Server-Patches/{0360-Server-Tick-Events.patch => 0348-Server-Tick-Events.patch} (81%) rename Spigot-Server-Patches/{0361-PlayerDeathEvent-getItemsToKeep.patch => 0349-PlayerDeathEvent-getItemsToKeep.patch} (92%) rename Spigot-Server-Patches/{0362-Optimize-Captured-TileEntity-Lookup.patch => 0350-Optimize-Captured-TileEntity-Lookup.patch} (86%) rename Spigot-Server-Patches/{0363-Add-Heightmap-API.patch => 0351-Add-Heightmap-API.patch} (88%) rename Spigot-Server-Patches/{0364-Mob-Spawner-API-Enhancements.patch => 0352-Mob-Spawner-API-Enhancements.patch} (98%) create mode 100644 Spigot-Server-Patches/0353-Per-Player-View-Distance-API-placeholders.patch rename Spigot-Server-Patches/{0366-Fix-CB-call-to-changed-postToMainThread-method.patch => 0354-Fix-CB-call-to-changed-postToMainThread-method.patch} (82%) rename Spigot-Server-Patches/{0367-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => 0355-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (86%) rename Spigot-Server-Patches/{0368-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch => 0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch} (84%) rename Spigot-Server-Patches/{0369-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch => 0357-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch} (53%) rename Spigot-Server-Patches/{0370-Duplicate-UUID-Resolve-Option.patch => 0358-Duplicate-UUID-Resolve-Option.patch} (89%) rename Spigot-Server-Patches/{0371-improve-CraftWorld-isChunkLoaded.patch => 0359-improve-CraftWorld-isChunkLoaded.patch} (90%) rename Spigot-Server-Patches/{0372-Configurable-Keep-Spawn-Loaded-range-per-world.patch => 0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (89%) rename Spigot-Server-Patches/{0374-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch => 0361-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch} (87%) rename Spigot-Server-Patches/{0375-ChunkMapDistance-CME.patch => 0362-ChunkMapDistance-CME.patch} (93%) rename Spigot-Server-Patches/{0376-Implement-CraftBlockSoundGroup.patch => 0363-Implement-CraftBlockSoundGroup.patch} (63%) rename Spigot-Server-Patches/{0377-Chunk-debug-command.patch => 0364-Chunk-debug-command.patch} (95%) delete mode 100644 Spigot-Server-Patches/0365-Per-Player-View-Distance-API-placeholders.patch rename Spigot-Server-Patches/{0379-Catch-exceptions-from-dispenser-entity-spawns.patch => 0366-Catch-exceptions-from-dispenser-entity-spawns.patch} (93%) rename {Spigot-Server-Patches => removed/1.16}/0276-Send-nearby-packets-from-world-player-list-not-serve.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0298-Support-Overriding-World-Seeds.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0302-Avoid-dimension-id-collisions.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0311-Limit-lightning-strike-effect-distance.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0326-Optimize-redstone-algorithm.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0356-Fire-event-on-GS4-query.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0373-Fix-some-generation-concurrency-issues.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0378-incremental-chunk-saving.patch (100%) diff --git a/SHIT_TO_CHECK.md b/SHIT_TO_CHECK.md new file mode 100644 index 0000000000..6077d66cd2 --- /dev/null +++ b/SHIT_TO_CHECK.md @@ -0,0 +1,6 @@ +# Shit to check + +* Mini: "Allow disabling armour stand ticking": Not sure if the equipment update actually works, vanilla shifted a bunch of shit +* Mini: "Optimize World Server Map": Figure out how to fill PaperWorldMap, it needs a dim key which doesnt exist anymore? +* Mini: "MC-50319": fix if still works +* Mini: I definetly dropped a patch I didnt want to drop, we need to go thru in the end and see if all patches are still in, lol diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 1995587bd2..edc9aad0d9 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -635,10 +635,10 @@ index 74ad1325727bdc41ed5b2e67058aeaa4fe6db4f2..03dc3dd41015dc210d2781c207261fc3 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 9c13f39e85b019440cb59bbd736ad9920e2151da..174c63f2c93693aa06a3574dc6dea91c98ea1e25 100644 +index 9aa648bb5ec42730f6ce85902b91a079084e7f8e..d9dda69118a5319da28cf3011fe5d8a64da08a5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -792,6 +792,7 @@ public final class CraftServer implements Server { +@@ -793,6 +793,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -646,7 +646,7 @@ index 9c13f39e85b019440cb59bbd736ad9920e2151da..174c63f2c93693aa06a3574dc6dea91c for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -819,6 +820,7 @@ public final class CraftServer implements Server { +@@ -820,6 +821,7 @@ public final class CraftServer implements Server { world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns(); } world.spigotConfig.init(); // Spigot @@ -654,7 +654,7 @@ index 9c13f39e85b019440cb59bbd736ad9920e2151da..174c63f2c93693aa06a3574dc6dea91c } pluginManager.clearPlugins(); -@@ -826,6 +828,7 @@ public final class CraftServer implements Server { +@@ -827,6 +829,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -662,7 +662,7 @@ index 9c13f39e85b019440cb59bbd736ad9920e2151da..174c63f2c93693aa06a3574dc6dea91c overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2051,4 +2054,35 @@ public final class CraftServer implements Server { +@@ -2055,4 +2058,35 @@ public final class CraftServer implements Server { { return spigot; } diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 3d64c33748..0bd0c2f86a 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -3807,10 +3807,10 @@ index 0000000000000000000000000000000000000000..da7a325d070e194cd1664ed20dcb3a76 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f5346ebbc338b002a9997e13e3bfba2d31457d90..aeb2e95e4c350f0b539466fc56ac41c8280aba20 100644 +index 3cb0957d8b57c930d74fc25aa5e1a0eaaf33e747..0aed429bfa996b1b01dbe2c876c6ad489ab7fa4a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -764,6 +764,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable { -@@ -118,8 +118,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcePackRepository; private final ScoreboardServer scoreboardServer; @Nullable -@@ -710,6 +710,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { -@@ -1023,14 +1044,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -1216,7 +1216,7 @@ index aeb2e95e4c350f0b539466fc56ac41c8280aba20..a7579b01d27e367603ba643c390b316b } this.methodProfiler.enter("snooper"); -@@ -1043,6 +1062,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public File bukkitDataPackFolder; -@@ -153,7 +153,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant getMaxHealth())) { diff --git a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch b/Spigot-Server-Patches/0052-Add-velocity-warnings.patch index 285b90a42e..e4ddb4ad16 100644 --- a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0052-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 15ee6ee6e96bb48f73cbb2944eeee8f726914e2d..49889d8c1d1f9b9c79b1d526f4cd9a94944c1c72 100644 +index 8091c4538a97fbc8f2495183ef952aecde659342..af17df4810ef30eba640028dd0b2047ed387eff0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -258,6 +258,7 @@ public final class CraftServer implements Server { +@@ -259,6 +259,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; diff --git a/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch index e63b467a77..35b6db371e 100644 --- a/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 20ada1ab2bea9fa5bde19cb4768d64f73a4154d2..8c3fa2335cfa1df94eb64bda5b12f1f5858dec27 100644 +index 7e95ef170c418594f5469431c052e64107c08ab5..d5b165e8275c012d775b77b8440489716a6c3c08 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -629,4 +629,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -636,4 +636,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setMemory(MemoryKey memoryKey, T t) { getHandle().getBehaviorController().setMemory(CraftMemoryKey.fromMemoryKey(memoryKey), CraftMemoryMapper.toNms(t)); } diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index 44222f2870..4a9869fd1b 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -30,10 +30,10 @@ index f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9..6ef5bb9f323da7cbf8cb24d094bf43c4 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 49889d8c1d1f9b9c79b1d526f4cd9a94944c1c72..2fb96635d7f811fd77a807ae4a4cc1c0ae0af47a 100644 +index af17df4810ef30eba640028dd0b2047ed387eff0..3b61bb5da6adc04eed934885be7ece2b3f4ea74c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -394,6 +394,7 @@ public final class CraftServer implements Server { +@@ -395,6 +395,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { helpMap.clear(); helpMap.initializeGeneralTopics(); @@ -41,7 +41,7 @@ index 49889d8c1d1f9b9c79b1d526f4cd9a94944c1c72..2fb96635d7f811fd77a807ae4a4cc1c0 } Plugin[] plugins = pluginManager.getPlugins(); -@@ -413,7 +414,7 @@ public final class CraftServer implements Server { +@@ -414,7 +415,7 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index 126942160a..8d2c6f913e 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-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 2fb96635d7f811fd77a807ae4a4cc1c0ae0af47a..530c0fb05c4631e8946a7defdf9e5c535bc3ddc2 100644 +index 3b61bb5da6adc04eed934885be7ece2b3f4ea74c..e1c39accfbdd1ac4bcfdfa9bc159f6d62a36fb50 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2140,5 +2140,23 @@ public final class CraftServer implements Server { +@@ -2144,5 +2144,23 @@ public final class CraftServer implements Server { return null; } } diff --git a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch index 541a136a9d..79a205c301 100644 --- a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0062-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 530c0fb05c4631e8946a7defdf9e5c535bc3ddc2..f29253ba0fdf30d78dbec58a8c706e219653ddeb 100644 +index e1c39accfbdd1ac4bcfdfa9bc159f6d62a36fb50..c8073b635ff03e2d76b1def6fd3144b88a385722 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -848,8 +848,18 @@ public final class CraftServer implements Server { +@@ -849,8 +849,18 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 49923e401a..b369db1166 100644 --- a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -32,10 +32,10 @@ index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c410 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cc3718765ed54f8042a2687e409a51098ebc67a0..3202c171cffed5c5cec74f6b082aedaeae1c7b9d 100644 +index fe47aa345b93105547e216f683491943866ccd3f..2455bbee53b4fe3084a785471fde7c4a3354dd4b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1172,6 +1172,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable { @@ -17,7 +17,7 @@ index 04429bb6f4d75800425087d8a5463ab9f4f4cef3..17846ca9190c63671ad616c668aa1fe1 public static final Logger LOGGER = LogManager.getLogger(); public static final File b = new File("usercache.json"); public static final WorldSettings c = new WorldSettings("Demo World", EnumGamemode.SURVIVAL, false, EnumDifficulty.NORMAL, false, new GameRules(), DataPackConfiguration.a); -@@ -176,6 +177,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcepackrepository, Proxy proxy, DataFixer datafixer, DataPackResources datapackresources, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory) { super("Server"); @@ -25,7 +25,7 @@ index 04429bb6f4d75800425087d8a5463ab9f4f4cef3..17846ca9190c63671ad616c668aa1fe1 this.m = new GameProfilerSwitcher(SystemUtils.a, this::ag); this.methodProfiler = GameProfilerDisabled.a; this.serverPing = new ServerPing(); -@@ -2033,7 +2035,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant, WorldServer> worldServer; private PlayerList playerList; private volatile boolean isRunning; @@ -41,7 +41,7 @@ index 800ca2d57295c40853f5f1e58ce15e75f1a5afad..8e47f5f5dcf217169107913cc0c8332c private boolean isStopped; private int ticks; protected final Proxy proxy; -@@ -739,7 +740,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -214,7 +214,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { this.T = i; this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount())); diff --git a/Spigot-Server-Patches/0204-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch similarity index 86% rename from Spigot-Server-Patches/0204-Player.setPlayerProfile-API.patch rename to Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch index 8f5e841145..8525a40dc1 100644 --- a/Spigot-Server-Patches/0204-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch @@ -6,23 +6,23 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 55d08d77480fda81e0155aa1e0287fddc827b67a..fda1b3d91b14080bf04a02c1340c63a6eb37911d 100644 +index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..a781ac0cf8766e915c10ebd3823cbe5b0d1c5230 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -66,7 +66,7 @@ public abstract class EntityHuman extends EntityLiving { - protected int bO; - protected final float bP = 0.02F; - private int bS; -- private final GameProfile bT; -+ private GameProfile bT; public final void setProfile(final GameProfile profile) { this.bT = profile; } // Paper - OBFHELPER - private ItemStack bV; - private final ItemCooldown bW; +@@ -65,7 +65,7 @@ public abstract class EntityHuman extends EntityLiving { + protected int bN; + protected final float bO = 0.02F; + private int g; +- private final GameProfile bQ; ++ private final GameProfile bQ; public final void setProfile(final GameProfile profile) { this.bQ = profile; } // Paper - OBFHELPER + private ItemStack bS; + private final ItemCooldown bT; @Nullable diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 1b43f921646e3c1bfdca22ef7d3719c72aaf4520..1c4ac7bf7ac4d864ba6efd46d8c562c238dad2bc 100644 +index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92be8a8c01f 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -37,7 +37,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -36,7 +36,7 @@ public class LoginListener implements PacketLoginInListener { public final NetworkManager networkManager; private LoginListener.EnumProtocolState g; private int h; @@ -31,7 +31,7 @@ index 1b43f921646e3c1bfdca22ef7d3719c72aaf4520..1c4ac7bf7ac4d864ba6efd46d8c562c2 private final String j; private SecretKey loginKey; private EntityPlayer l; -@@ -291,12 +291,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -290,12 +290,12 @@ public class LoginListener implements PacketLoginInListener { final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; // Paper start @@ -48,7 +48,7 @@ index 1b43f921646e3c1bfdca22ef7d3719c72aaf4520..1c4ac7bf7ac4d864ba6efd46d8c562c2 uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5b088b21da2ca3945de9c5dcc4370114f930d739..d571248f597cbad63d26bc1bdf91cc263f88947f 100644 +index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928fa06ee119 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ @@ -60,7 +60,7 @@ index 5b088b21da2ca3945de9c5dcc4370114f930d739..d571248f597cbad63d26bc1bdf91cc26 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -1175,8 +1177,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1216,8 +1218,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -75,7 +75,7 @@ index 5b088b21da2ca3945de9c5dcc4370114f930d739..d571248f597cbad63d26bc1bdf91cc26 PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1217,8 +1224,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1258,8 +1265,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -90,7 +90,7 @@ index 5b088b21da2ca3945de9c5dcc4370114f930d739..d571248f597cbad63d26bc1bdf91cc26 getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1227,6 +1239,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1268,6 +1280,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } diff --git a/Spigot-Server-Patches/0205-Fix-Dragon-Server-Crashes.patch b/Spigot-Server-Patches/0204-Fix-Dragon-Server-Crashes.patch similarity index 92% rename from Spigot-Server-Patches/0205-Fix-Dragon-Server-Crashes.patch rename to Spigot-Server-Patches/0204-Fix-Dragon-Server-Crashes.patch index 3de215fd61..018a36e91b 100644 --- a/Spigot-Server-Patches/0205-Fix-Dragon-Server-Crashes.patch +++ b/Spigot-Server-Patches/0204-Fix-Dragon-Server-Crashes.patch @@ -7,7 +7,7 @@ If the dragon tries to find "ground" and hits a hole, or off edge, it will infinitely keep looking for non air and eventually crash. diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -index c42de9771e96f0b1bc8fbe9fe76572ab18d5d98c..40a8beff556873a5db108e44fd053e8de80e36a6 100644 +index d70a45f2530d9dd5e10aa48f20db33a97bbe952e..fbc2ec88f7c71c853c492301986a23dafc8fa7a6 100644 --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java @@ -54,7 +54,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded diff --git a/Spigot-Server-Patches/0206-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch similarity index 91% rename from Spigot-Server-Patches/0206-getPlayerUniqueId-API.patch rename to Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch index 1646869da0..3777a5b872 100644 --- a/Spigot-Server-Patches/0206-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0205-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 3697b3298feaec30c305e3da011790f2406e12d7..0ec84609896dd53a0c2c232f45e5c8f83558a37c 100644 +index f51a59f5c1a0c8e34921fbf79c86f999c9951ee6..98475ce12d6b370b69466f1869d8be07d5130806 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1403,6 +1403,26 @@ public final class CraftServer implements Server { +@@ -1466,6 +1466,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0207-Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch similarity index 86% rename from Spigot-Server-Patches/0207-Make-player-data-saving-configurable.patch rename to Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch index e096021ccb..a2139ce940 100644 --- a/Spigot-Server-Patches/0207-Make-player-data-saving-configurable.patch +++ b/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch @@ -23,14 +23,14 @@ index 5884b04f7e84048a9710736bd14237140ebf2cf7..ba341e0174cdc3b5b8bc83b743027018 + } } diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index a0254d8e519fa8b19dc282f3abf33b8ebe4f0aba..e60e10c57d5acaecb70e89c83c34f1f8870091c2 100644 +index ef9719bf20db92a7e6690bccb00cc54293d392a9..ae43d8d2af0daa68f13528d25bac1d94964662bc 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java -@@ -138,6 +138,7 @@ public class WorldNBTStorage implements IPlayerFileData { +@@ -27,6 +27,7 @@ public class WorldNBTStorage { + } - @Override public void save(EntityHuman entityhuman) { + if(!com.destroystokyo.paper.PaperConfig.savePlayerData) return; // Paper - Make player data saving configurable try { NBTTagCompound nbttagcompound = entityhuman.save(new NBTTagCompound()); - File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat.tmp"); + File file = File.createTempFile(entityhuman.getUniqueIDString() + "-", ".dat", this.playerDir); diff --git a/Spigot-Server-Patches/0208-Make-legacy-ping-handler-more-reliable.patch b/Spigot-Server-Patches/0207-Make-legacy-ping-handler-more-reliable.patch similarity index 100% rename from Spigot-Server-Patches/0208-Make-legacy-ping-handler-more-reliable.patch rename to Spigot-Server-Patches/0207-Make-legacy-ping-handler-more-reliable.patch diff --git a/Spigot-Server-Patches/0209-Call-PaperServerListPingEvent-for-legacy-pings.patch b/Spigot-Server-Patches/0208-Call-PaperServerListPingEvent-for-legacy-pings.patch similarity index 100% rename from Spigot-Server-Patches/0209-Call-PaperServerListPingEvent-for-legacy-pings.patch rename to Spigot-Server-Patches/0208-Call-PaperServerListPingEvent-for-legacy-pings.patch diff --git a/Spigot-Server-Patches/0210-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch similarity index 88% rename from Spigot-Server-Patches/0210-Flag-to-disable-the-channel-limit.patch rename to Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch index 6422b74f23..edee7f024d 100644 --- a/Spigot-Server-Patches/0210-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d571248f597cbad63d26bc1bdf91cc263f88947f..f5c722644a1955c9bc68c89fdbb84526f9bbb7a0 100644 +index 4f0dabdb6683402d9fd0ea789381928fa06ee119..ec0cb22d53733bed33019b257ac06ca9dc80d19e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -137,6 +137,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -141,6 +141,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index d571248f597cbad63d26bc1bdf91cc263f88947f..f5c722644a1955c9bc68c89fdbb84526 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1444,7 +1445,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1485,7 +1486,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0211-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0210-Add-method-to-open-already-placed-sign.patch similarity index 88% rename from Spigot-Server-Patches/0211-Add-method-to-open-already-placed-sign.patch rename to Spigot-Server-Patches/0210-Add-method-to-open-already-placed-sign.patch index 159ab07d69..4d1123236d 100644 --- a/Spigot-Server-Patches/0211-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0210-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 191bb7345e06cbad7bef416e4e849df3727bdac0..20f0783025516048851aedef0a70759c2953ae47 100644 +index d67fd3bf1048afae0bb78a95724ddf53337d9a2f..42bc39381c4fc5ff81bdd312afd1644dcc5d40c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -617,4 +617,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -584,4 +584,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { entity.remove(); } } diff --git a/Spigot-Server-Patches/0212-Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch similarity index 92% rename from Spigot-Server-Patches/0212-Configurable-sprint-interruption-on-attack.patch rename to Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch index 4ccc72a2c6..b50568c135 100644 --- a/Spigot-Server-Patches/0212-Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch @@ -20,10 +20,10 @@ index 77cdbfadf9c3eddb6a02460c321fa816d1bab8ac..171c8e3031cf4bf4da062663089cc0cb + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index fda1b3d91b14080bf04a02c1340c63a6eb37911d..14a0e3d41ccd896da3b1126a403b0b684cada907 100644 +index a781ac0cf8766e915c10ebd3823cbe5b0d1c5230..59f7fced6213c218cd19863be99964eb496b6fe6 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1112,7 +1112,11 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1091,7 +1091,11 @@ public abstract class EntityHuman extends EntityLiving { } this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D)); diff --git a/Spigot-Server-Patches/0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch similarity index 79% rename from Spigot-Server-Patches/0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch rename to Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index fa360cc099..f1d904040f 100644 --- a/Spigot-Server-Patches/0213-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c256e798d12098881cb5bfb655eab5b63f1614e7..a357b6167405be4034cf3dad4124827e04278366 100644 +index fa5c640239451579fba35ad7b0979739e0b7b16f..e78306cb187b5f08e32888ebd55c4c486fc8dad2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2502,7 +2502,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2541,7 +2541,7 @@ public class PlayerConnection implements PacketListenerPlayIn { String[] lines = new String[4]; for (int i = 0; i < astring.length; ++i) { -- lines[i] = EnumChatFormat.b(new ChatComponentText(EnumChatFormat.b(astring[i])).getString()); +- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a(astring[i])).getString()); + lines[i] = SharedConstants.a(astring[i]); //Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. } SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); diff --git a/Spigot-Server-Patches/0214-EndermanEscapeEvent.patch b/Spigot-Server-Patches/0213-EndermanEscapeEvent.patch similarity index 62% rename from Spigot-Server-Patches/0214-EndermanEscapeEvent.patch rename to Spigot-Server-Patches/0213-EndermanEscapeEvent.patch index 925873536f..1002240ce3 100644 --- a/Spigot-Server-Patches/0214-EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/0213-EndermanEscapeEvent.patch @@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player You may cancel this, enabling ranged attacks to damage the enderman for example. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 538c2169cd53d364b941ad1251df3731f77b3a2c..2893f75bdff91e810431c64899b64047c372aa62 100644 +index 37a4bce1cd24e04b70367484c1ad3beae047ab08..888e66520548a47dbfa1c452b0d3fa5dcbe2002c 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -19,7 +19,7 @@ index 538c2169cd53d364b941ad1251df3731f77b3a2c..2893f75bdff91e810431c64899b64047 import java.util.Random; import java.util.UUID; import java.util.function.Predicate; -@@ -56,6 +57,12 @@ public class EntityEnderman extends EntityMonster { +@@ -56,6 +57,12 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { setGoalTarget(entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true); } @@ -32,37 +32,37 @@ index 538c2169cd53d364b941ad1251df3731f77b3a2c..2893f75bdff91e810431c64899b64047 @Override public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { if (!super.setGoalTarget(entityliving, reason, fireEvent)) { -@@ -177,7 +184,7 @@ public class EntityEnderman extends EntityMonster { - if (this.world.isDay() && this.ticksLived >= this.bA + 600) { - float f = this.aI(); +@@ -209,7 +216,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { + if (this.world.isDay() && this.ticksLived >= this.bz + 600) { + float f = this.aO(); -- if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { -+ if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper +- if (f > 0.5F && this.world.f(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { ++ if (f > 0.5F && this.world.f(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper this.setGoalTarget((EntityLiving) null); - this.eq(); + this.eM(); } -@@ -277,17 +284,19 @@ public class EntityEnderman extends EntityMonster { - } else if (!(damagesource instanceof EntityDamageSourceIndirect) && damagesource != DamageSource.FIREWORKS) { - boolean flag = super.damageEntity(damagesource, f); - -- if (!this.world.p_() && damagesource.ignoresArmor() && this.random.nextInt(10) != 0) { -+ if (!this.world.p_() && damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && this.tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper - this.eq(); - } - - return flag; - } else { +@@ -307,17 +314,19 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { + if (this.isInvulnerable(damagesource)) { + return false; + } else if (damagesource instanceof EntityDamageSourceIndirect) { + if (this.tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start for (int i = 0; i < 64; ++i) { - if (this.eq()) { + if (this.eM()) { return true; } } + } // Paper end return false; - } -@@ -422,7 +431,7 @@ public class EntityEnderman extends EntityMonster { + } else { + boolean flag = super.damageEntity(damagesource, f); + +- if (!this.world.s_() && this.random.nextInt(10) != 0) { ++ if (!this.world.s_() && this.random.nextInt(10) != 0 && this.tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper + this.eM(); + } + +@@ -459,7 +468,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { static class PathfinderGoalPlayerWhoLookedAtTarget extends PathfinderGoalNearestAttackableTarget { @@ -71,12 +71,12 @@ index 538c2169cd53d364b941ad1251df3731f77b3a2c..2893f75bdff91e810431c64899b64047 private EntityHuman j; private int k; private int l; -@@ -481,7 +490,7 @@ public class EntityEnderman extends EntityMonster { +@@ -522,7 +531,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { } else { if (this.c != null && !this.i.isPassenger()) { - if (this.i.f((EntityHuman) this.c)) { + if (this.i.g((EntityHuman) this.c)) { - if (this.c.h((Entity) this.i) < 16.0D) { + if (this.c.h((Entity) this.i) < 16.0D && this.getEnderman().tryEscape(EndermanEscapeEvent.Reason.STARE)) { - this.i.eq(); + this.i.eM(); } diff --git a/Spigot-Server-Patches/0215-Enderman.teleportRandomly.patch b/Spigot-Server-Patches/0214-Enderman.teleportRandomly.patch similarity index 80% rename from Spigot-Server-Patches/0215-Enderman.teleportRandomly.patch rename to Spigot-Server-Patches/0214-Enderman.teleportRandomly.patch index 4121c3f53e..a068e22b2d 100644 --- a/Spigot-Server-Patches/0215-Enderman.teleportRandomly.patch +++ b/Spigot-Server-Patches/0214-Enderman.teleportRandomly.patch @@ -6,16 +6,16 @@ Subject: [PATCH] Enderman.teleportRandomly() Ability to trigger the vanilla "teleport randomly" mechanic of an enderman. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 2893f75bdff91e810431c64899b64047c372aa62..f279c9b1482d3b3d632a762affff425139920b66 100644 +index 888e66520548a47dbfa1c452b0d3fa5dcbe2002c..67a678eceea5304d8ad1eaaee62c57c1088096f5 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -193,6 +193,7 @@ public class EntityEnderman extends EntityMonster { +@@ -225,6 +225,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { super.mobTick(); } -+ public final boolean teleportRandomly() { return this.eq(); } // Paper - OBFHELPER - protected boolean eq() { - if (!this.world.p_() && this.isAlive()) { ++ public final boolean teleportRandomly() { return this.eM(); } // Paper - OBFHELPER + protected boolean eM() { + if (!this.world.s_() && this.isAlive()) { double d0 = this.locX() + (this.random.nextDouble() - 0.5D) * 64.0D; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java index 970efabd37d380ee1028c80a8e967e0f7aee9760..0c5f35934617529e92c02729687b524c3796128c 100644 diff --git a/Spigot-Server-Patches/0216-Block-Enderpearl-Travel-Exploit.patch b/Spigot-Server-Patches/0215-Block-Enderpearl-Travel-Exploit.patch similarity index 63% rename from Spigot-Server-Patches/0216-Block-Enderpearl-Travel-Exploit.patch rename to Spigot-Server-Patches/0215-Block-Enderpearl-Travel-Exploit.patch index 3f7e943452..d3f007cb38 100644 --- a/Spigot-Server-Patches/0216-Block-Enderpearl-Travel-Exploit.patch +++ b/Spigot-Server-Patches/0215-Block-Enderpearl-Travel-Exploit.patch @@ -26,15 +26,15 @@ index 171c8e3031cf4bf4da062663089cc0cb4552fab6..9c52e31f4cf1e64a37c65c021da219fc + log("Disable Unloaded Chunk Enderpearl Exploit: " + (disableEnderpearlExploit ? "enabled" : "disabled")); + } } -diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 724b78b5d2d7f4ce8de31c763d2d95b986c1b7f6..9eed1dce3e48683b751ebbaac0487a046354622e 100644 ---- a/src/main/java/net/minecraft/server/EntityProjectile.java -+++ b/src/main/java/net/minecraft/server/EntityProjectile.java -@@ -201,6 +201,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile { - if (nbttagcompound.hasKeyOfType("owner", 10)) { - this.shooterId = GameProfileSerializer.b(nbttagcompound.getCompound("owner")); +diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java +index 8ce491fc155450a94582f94c78c8c296f8eeb864..cdf80e50de0840002f62f4c1df4fbcc4e13675d7 100644 +--- a/src/main/java/net/minecraft/server/IProjectile.java ++++ b/src/main/java/net/minecraft/server/IProjectile.java +@@ -48,6 +48,7 @@ public abstract class IProjectile extends Entity { + protected void loadData(NBTTagCompound nbttagcompound) { + if (nbttagcompound.b("Owner")) { + this.shooter = nbttagcompound.a("Owner"); ++ if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooter = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit } -+ if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooterId = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit - - } + this.d = nbttagcompound.getBoolean("LeftOwner"); diff --git a/Spigot-Server-Patches/0217-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 89% rename from Spigot-Server-Patches/0217-Expand-World.spawnParticle-API-and-add-Builder.patch rename to Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch index f01c7fe61d..73173219f4 100644 --- a/Spigot-Server-Patches/0217-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,19 +10,19 @@ 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 e428b3cb8c8ca5a662a0e867bf74d08775f1bacd..a834a77b2de8f7287be69fd5d002ff43261a9a85 100644 +index 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2c6943de6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -56,7 +56,7 @@ public class WorldServer extends World { +@@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { public final Int2ObjectMap entitiesById = new Int2ObjectLinkedOpenHashMap(); private final Map entitiesByUUID = Maps.newHashMap(); private final Queue entitiesToAdd = Queues.newArrayDeque(); - private final List players = Lists.newArrayList(); + public final List players = Lists.newArrayList(); // Paper - private -> public + public final ChunkProviderServer chunkProvider; // Paper - public boolean tickingEntities; private final MinecraftServer server; - private final WorldNBTStorage dataManager; -@@ -1392,12 +1392,17 @@ public class WorldServer extends World { +@@ -1311,12 +1311,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 e428b3cb8c8ca5a662a0e867bf74d08775f1bacd..a834a77b2de8f7287be69fd5d002ff43 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 13a83f285126123811a148453ccaea6f9bf197b4..1a3ca48485ebce128ae1288e6a50308c76ee0452 100644 +index 876a62a456c8ff938cca4944b0b40a135dd6ac1c..aa497699fc0fab80b3da1ff4dd08840260cb22d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2287,11 +2287,17 @@ public class CraftWorld implements World { +@@ -2295,11 +2295,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/0218-EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/0217-EndermanAttackPlayerEvent.patch similarity index 73% rename from Spigot-Server-Patches/0218-EndermanAttackPlayerEvent.patch rename to Spigot-Server-Patches/0217-EndermanAttackPlayerEvent.patch index 3642aff6fe..0328ba25f6 100644 --- a/Spigot-Server-Patches/0218-EndermanAttackPlayerEvent.patch +++ b/Spigot-Server-Patches/0217-EndermanAttackPlayerEvent.patch @@ -8,21 +8,21 @@ Allow control over whether or not an enderman aggros a player. This allows you to override/extend the pumpkin/stare logic. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index f279c9b1482d3b3d632a762affff425139920b66..b7c67f0cdb3d02c7a2dbe85f9a432836cb34bb6e 100644 +index 67a678eceea5304d8ad1eaaee62c57c1088096f5..7c13e5b711706c8aaa363d80350597a52920f12b 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -141,7 +141,15 @@ public class EntityEnderman extends EntityMonster { - this.setCarried(iblockdata); +@@ -168,7 +168,15 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { + this.a((WorldServer) this.world, nbttagcompound); } + // Paper start - OBFHELPER - ok not really, but verify this on updates - private boolean f(EntityHuman entityhuman) { -+ boolean shouldAttack = f_real(entityhuman); + private boolean g(EntityHuman entityhuman) { ++ boolean shouldAttack = g_real(entityhuman); + com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) entityhuman.getBukkitEntity()); + event.setCancelled(!shouldAttack); + return event.callEvent(); + } -+ private boolean f_real(EntityHuman entityhuman) { ++ private boolean g_real(EntityHuman entityhuman) { + // Paper end ItemStack itemstack = (ItemStack) entityhuman.inventory.armor.get(3); diff --git a/Spigot-Server-Patches/0219-WitchConsumePotionEvent.patch b/Spigot-Server-Patches/0218-WitchConsumePotionEvent.patch similarity index 89% rename from Spigot-Server-Patches/0219-WitchConsumePotionEvent.patch rename to Spigot-Server-Patches/0218-WitchConsumePotionEvent.patch index a76d06b132..164db395a9 100644 --- a/Spigot-Server-Patches/0219-WitchConsumePotionEvent.patch +++ b/Spigot-Server-Patches/0218-WitchConsumePotionEvent.patch @@ -6,12 +6,12 @@ Subject: [PATCH] WitchConsumePotionEvent Fires when a witch consumes the potion in their hand diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index ddff0b57869c3511346510a91336045ec1469bdc..aa90111716c69379df250f06957a2db5178bbe92 100644 +index e146957d219960d0b6371b9460e73fb0ea150dde..a364ab990883bcdf84d8d92385a738200630864d 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java -@@ -88,7 +88,11 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { +@@ -85,7 +85,11 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { - this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a); + this.setSlot(EnumItemSlot.MAINHAND, ItemStack.b); if (itemstack.getItem() == Items.POTION) { - List list = PotionUtil.getEffects(itemstack); + // Paper start diff --git a/Spigot-Server-Patches/0220-WitchThrowPotionEvent.patch b/Spigot-Server-Patches/0219-WitchThrowPotionEvent.patch similarity index 84% rename from Spigot-Server-Patches/0220-WitchThrowPotionEvent.patch rename to Spigot-Server-Patches/0219-WitchThrowPotionEvent.patch index d1d7c110e2..19bc42b807 100644 --- a/Spigot-Server-Patches/0220-WitchThrowPotionEvent.patch +++ b/Spigot-Server-Patches/0219-WitchThrowPotionEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] WitchThrowPotionEvent Fired when a witch throws a potion at a player diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index aa90111716c69379df250f06957a2db5178bbe92..1f2759e95e6a8382c5d27899b05a993beee25f5a 100644 +index a364ab990883bcdf84d8d92385a738200630864d..75d014ad49c701e4c693be4e2f8e7dc6d592fa5f 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -185,9 +185,16 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { @@ -27,4 +27,4 @@ index aa90111716c69379df250f06957a2db5178bbe92..1f2759e95e6a8382c5d27899b05a993b + // Paper end entitypotion.pitch -= -20.0F; entitypotion.shoot(d0, d1 + (double) (f1 * 0.2F), d2, 0.75F, 8.0F); - this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_THROW, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); + if (!this.isSilent()) { diff --git a/Spigot-Server-Patches/0221-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch similarity index 93% rename from Spigot-Server-Patches/0221-Allow-spawning-Item-entities-with-World.spawnEntity.patch rename to Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 69f7bafb33..1826d7235b 100644 --- a/Spigot-Server-Patches/0221-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,7 +8,7 @@ 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 1a3ca48485ebce128ae1288e6a50308c76ee0452..28a94e473482b414b50ca793564acd409a5dc133 100644 +index aa497699fc0fab80b3da1ff4dd08840260cb22d3..61780597747e67581531ae436249ddd1c32bae82 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1489,6 +1489,10 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0222-WitchReadyPotionEvent.patch b/Spigot-Server-Patches/0221-WitchReadyPotionEvent.patch similarity index 71% rename from Spigot-Server-Patches/0222-WitchReadyPotionEvent.patch rename to Spigot-Server-Patches/0221-WitchReadyPotionEvent.patch index 9461975855..b609ec17fe 100644 --- a/Spigot-Server-Patches/0222-WitchReadyPotionEvent.patch +++ b/Spigot-Server-Patches/0221-WitchReadyPotionEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 1f2759e95e6a8382c5d27899b05a993beee25f5a..be6ecfb08aaba3fc5d96e918b7540fc75c92e89e 100644 +index 75d014ad49c701e4c693be4e2f8e7dc6d592fa5f..a6142ef24bc5bfa15a0ec84fbd8267ffab4e25bf 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java -@@ -121,7 +121,11 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { +@@ -118,7 +118,11 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { } if (potionregistry != null) { @@ -18,6 +18,6 @@ index 1f2759e95e6a8382c5d27899b05a993beee25f5a..be6ecfb08aaba3fc5d96e918b7540fc7 + org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion)); + this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); + // Paper end - this.by = this.getItemInMainHand().k(); - this.t(true); - this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); + this.bx = this.getItemInMainHand().k(); + this.v(true); + if (!this.isSilent()) { diff --git a/Spigot-Server-Patches/0223-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch similarity index 83% rename from Spigot-Server-Patches/0223-ItemStack-getMaxItemUseDuration.patch rename to Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch index 68d6b72767..fed6fc5c02 100644 --- a/Spigot-Server-Patches/0223-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch @@ -6,19 +6,19 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 854cffe6c98956cbafa2ead9b831e39209a76c8d..641a52b968ef04a142b32703b61c8b75643b36a6 100644 +index c4d034c6a6ff176bc954c00c328512bdf67455a6..7b2010ec4955fb5788c60178c6e306ea3098e9ba 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -548,6 +548,7 @@ public final class ItemStack { +@@ -552,6 +552,7 @@ public final class ItemStack { this.getItem().b(this, world, entityhuman); } + public int getItemUseMaxDuration() { return k(); } // Paper - OBFHELPER public int k() { - return this.getItem().f_(this); + return this.getItem().e_(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 3dd912abe3fec22adb29d8edfd66b9f5f3bee4f6..a41be8fdaebe7cf61537c638392b3dc7c7f5b371 100644 +index bbee99c13e66b50401489fa4ea497980b1e50b18..4f72b8874f9575c5fc7949c39b4d489809bba097 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -174,6 +174,13 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0224-Implement-EntityTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0223-Implement-EntityTeleportEndGatewayEvent.patch similarity index 84% rename from Spigot-Server-Patches/0224-Implement-EntityTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0223-Implement-EntityTeleportEndGatewayEvent.patch index 2d432ec5a8..4cf75627a4 100644 --- a/Spigot-Server-Patches/0224-Implement-EntityTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/0223-Implement-EntityTeleportEndGatewayEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index 78fba79378173dc2c4290e048c3497e206332458..c71f76004ed934e9e921efc4cb637f2e77af92d2 100644 +index 4686880e1f37841ae0217654ed6aa8f813ad90a6..ea61a473d8e47428ed5cd4541a5855f0e2c50815 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -@@ -145,8 +145,19 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick +@@ -163,8 +163,19 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick } // CraftBukkit end @@ -23,7 +23,7 @@ index 78fba79378173dc2c4290e048c3497e206332458..c71f76004ed934e9e921efc4cb637f2e + return; + } -- entity.enderTeleportAndLoad((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D); +- entity1.enderTeleportAndLoad((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D); + entity.enderTeleportAndLoad(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ()); + // Paper end - EntityTeleportEndGatewayEvent } diff --git a/Spigot-Server-Patches/0225-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/Spigot-Server-Patches/0224-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 88% rename from Spigot-Server-Patches/0225-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to Spigot-Server-Patches/0224-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index eb594324e8..4f67347235 100644 --- a/Spigot-Server-Patches/0225-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/Spigot-Server-Patches/0224-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event Otherwise the creeper infinite explodes diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 374cf28fb42b13152f58fd63c4f0cb25eae6a2d9..b89530079751c13894527f21572cc37e3a5548b8 100644 +index af9ac84c2caf42d0714d6050ee7db7e39a47878b..e4c1a7c152b2c1202c77e5d5d1c386d84007bc97 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -12,7 +12,7 @@ public class EntityCreeper extends EntityMonster { @@ -15,10 +15,10 @@ index 374cf28fb42b13152f58fd63c4f0cb25eae6a2d9..b89530079751c13894527f21572cc37e private static final DataWatcherObject POWERED = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); - private static final DataWatcherObject d = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); + private static final DataWatcherObject d = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); private static final DataWatcherObject isIgnitedDW = d; // Paper OBFHELPER - private int bw; + private int bv; private int fuseTicks; public int maxFuseTicks = 30; -@@ -219,6 +219,7 @@ public class EntityCreeper extends EntityMonster { +@@ -217,6 +217,7 @@ public class EntityCreeper extends EntityMonster { this.createEffectCloud(); } else { fuseTicks = 0; diff --git a/Spigot-Server-Patches/0226-Fix-CraftEntity-hashCode.patch b/Spigot-Server-Patches/0225-Fix-CraftEntity-hashCode.patch similarity index 91% rename from Spigot-Server-Patches/0226-Fix-CraftEntity-hashCode.patch rename to Spigot-Server-Patches/0225-Fix-CraftEntity-hashCode.patch index b1800dac50..6e4af9b3f9 100644 --- a/Spigot-Server-Patches/0226-Fix-CraftEntity-hashCode.patch +++ b/Spigot-Server-Patches/0225-Fix-CraftEntity-hashCode.patch @@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle() However, replaced it too to make it clearer of intent. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 2d84f8410a7b8ff88d9dbab64741dcdf40fc1612..5f16dea1a543607e76f7ef70fe44e9a3f12e9132 100644 +index 66edc6ae67084959503ffa0df2c04174fb29b8d8..51f027e8f98240fec989ea877095031bab087bda 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -724,14 +724,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -732,14 +732,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return false; } final CraftEntity other = (CraftEntity) obj; diff --git a/Spigot-Server-Patches/0227-Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 89% rename from Spigot-Server-Patches/0227-Configurable-Alternative-LootPool-Luck-Formula.patch rename to Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch index ca7762f858..f9025282c6 100644 --- a/Spigot-Server-Patches/0227-Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch @@ -53,21 +53,21 @@ index ba341e0174cdc3b5b8bc83b7430270181ea92793..26ab855dcf38446a3d8577108bd16fdb + } } diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java -index 3ed6a1e785f68c4bb6c5afe024c43150915968a3..03398ce8fdcc68cf5aa7caa3c8fd51c9e8e178eb 100644 +index ee9069c744df63cbb7f21dd9d28d6d554593674c..ca18d3156fd2b10f8ee48ff02f6f47e6e649200b 100644 --- a/src/main/java/net/minecraft/server/LootSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java @@ -11,8 +11,8 @@ import org.apache.commons.lang3.ArrayUtils; public abstract class LootSelectorEntry extends LootEntryAbstract { +- protected final int c; - protected final int e; -- protected final int f; -+ protected final int e; public int getWeight() { return e; } // Paper - OBFHELPER -+ protected final int f; public int getQuality() { return f; } // Paper - OBFHELPER - protected final LootItemFunction[] g; - private final BiFunction c; ++ protected final int c; public int getWeight() { return c; } // Paper - OBFHELPER ++ protected final int e; public int getQuality() { return e; } // Paper - OBFHELPER + protected final LootItemFunction[] f; + private final BiFunction g; private final LootEntry h = new LootSelectorEntry.c() { -@@ -145,11 +145,38 @@ public abstract class LootSelectorEntry extends LootEntryAbstract { +@@ -143,11 +143,38 @@ public abstract class LootSelectorEntry extends LootEntryAbstract { public abstract class c implements LootEntry { @@ -77,7 +77,7 @@ index 3ed6a1e785f68c4bb6c5afe024c43150915968a3..03398ce8fdcc68cf5aa7caa3c8fd51c9 @Override public int a(float f) { -- return Math.max(MathHelper.d((float) LootSelectorEntry.this.e + (float) LootSelectorEntry.this.f * f), 0); +- return Math.max(MathHelper.d((float) LootSelectorEntry.this.c + (float) LootSelectorEntry.this.e * f), 0); + // Paper start - Offer an alternative loot formula to refactor how luck bonus applies + // SEE: https://luckformula.emc.gs for details and data + if (lastLuck != null && lastLuck == f) { @@ -104,7 +104,7 @@ index 3ed6a1e785f68c4bb6c5afe024c43150915968a3..03398ce8fdcc68cf5aa7caa3c8fd51c9 + return lastWeight; } } -+ private Float lastLuck = null; -+ private int lastWeight = 0; -+ // Paper end ++ private Float lastLuck = null; ++ private int lastWeight = 0; ++ // Paper end } diff --git a/Spigot-Server-Patches/0228-Print-Error-details-when-failing-to-save-player-data.patch b/Spigot-Server-Patches/0227-Print-Error-details-when-failing-to-save-player-data.patch similarity index 78% rename from Spigot-Server-Patches/0228-Print-Error-details-when-failing-to-save-player-data.patch rename to Spigot-Server-Patches/0227-Print-Error-details-when-failing-to-save-player-data.patch index 599b081cdc..763ac896a6 100644 --- a/Spigot-Server-Patches/0228-Print-Error-details-when-failing-to-save-player-data.patch +++ b/Spigot-Server-Patches/0227-Print-Error-details-when-failing-to-save-player-data.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Print Error details when failing to save player data diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index e60e10c57d5acaecb70e89c83c34f1f8870091c2..350ac42d6b45a1023f6254de7706818775b7957b 100644 +index ae43d8d2af0daa68f13528d25bac1d94964662bc..41a1b93a9e0f16ed9415dfeccd490496650163cb 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java -@@ -151,7 +151,7 @@ public class WorldNBTStorage implements IPlayerFileData { +@@ -38,7 +38,7 @@ public class WorldNBTStorage { - file.renameTo(file1); + SystemUtils.a(file1, file, file2); } catch (Exception exception) { - WorldNBTStorage.LOGGER.warn("Failed to save player data for {}", entityhuman.getDisplayName().getString()); + WorldNBTStorage.LOGGER.error("Failed to save player data for {}", entityhuman.getName(), exception); // Paper diff --git a/Spigot-Server-Patches/0229-Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/0228-Make-shield-blocking-delay-configurable.patch similarity index 81% rename from Spigot-Server-Patches/0229-Make-shield-blocking-delay-configurable.patch rename to Spigot-Server-Patches/0228-Make-shield-blocking-delay-configurable.patch index 84c8cf61a9..a8bb704890 100644 --- a/Spigot-Server-Patches/0229-Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/0228-Make-shield-blocking-delay-configurable.patch @@ -19,19 +19,19 @@ index 9c52e31f4cf1e64a37c65c021da219fc26dda137..33ce9a500430a01650e69a3568c8b03d + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f5da67fd8908f027835b837a8b847e27c3638790..1a1d608f5acfc92e3e55e53f63c9da6ab0aa6a0a 100644 +index 26832d31cc64d26a9ca61a3bad21424ed366c74c..2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3002,7 +3002,7 @@ public abstract class EntityLiving extends Entity { +@@ -3171,7 +3171,7 @@ public abstract class EntityLiving extends Entity { if (this.isHandRaised() && !this.activeItem.isEmpty()) { Item item = this.activeItem.getItem(); -- return item.e_(this.activeItem) != EnumAnimation.BLOCK ? false : item.f_(this.activeItem) - this.bl >= 5; -+ return item.e_(this.activeItem) != EnumAnimation.BLOCK ? false : item.f_(this.activeItem) - this.bl >= getShieldBlockingDelay(); // Paper - shieldBlockingDelay +- return item.d_(this.activeItem) != EnumAnimation.BLOCK ? false : item.e_(this.activeItem) - this.bk >= 5; ++ return item.d_(this.activeItem) != EnumAnimation.BLOCK ? false : item.e_(this.activeItem) - this.bk >= getShieldBlockingDelay(); // Paper - shieldBlockingDelay } else { return false; } -@@ -3241,4 +3241,15 @@ public abstract class EntityLiving extends Entity { +@@ -3423,4 +3423,15 @@ public abstract class EntityLiving extends Entity { public void broadcastItemBreak(EnumHand enumhand) { this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND); } @@ -48,10 +48,10 @@ index f5da67fd8908f027835b837a8b847e27c3638790..1a1d608f5acfc92e3e55e53f63c9da6a + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 1760dfa7a312b63d7608d890c977452ad995d7ae..a8e44e95d6115833f4e20e6bb007842bdc52f1ef 100644 +index 5e2642b33d36e0695d6adc879f9595030adaaf31..38eb8fbac1d5131249dd9ba8b9942b4c85de2c7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -644,5 +644,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -657,5 +657,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setArrowsStuck(int arrows) { getHandle().setArrowCount(arrows); } diff --git a/Spigot-Server-Patches/0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch similarity index 85% rename from Spigot-Server-Patches/0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch rename to Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index 5f08c8d0fe..474f9e78db 100644 --- a/Spigot-Server-Patches/0230-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -6,10 +6,10 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API Adds ability to get what arrow was shot, and control if it should be consumed. diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -index fb9656afde07a871216a4c5e414777603be590d1..3c95c0428b211b14db65be16a95446debda789e6 100644 +index 05ffe8af6a59e05d2c2e9567c675fd020d6b0723..84f83d48a8c41a26289ce0995aa9f5fd332c0ccb 100644 --- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java +++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -@@ -157,7 +157,7 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR +@@ -155,7 +155,7 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.world.getDifficulty().a() * 4)); // CraftBukkit start @@ -19,10 +19,10 @@ index fb9656afde07a871216a4c5e414777603be590d1..3c95c0428b211b14db65be16a95446de event.getProjectile().remove(); return; diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java -index 83aa70c295f93b1c19d81fb0b90876e62fe58c23..26899916d3f5274691386685d13d18f587e4ec28 100644 +index 987b59dfcd3a69886e2722477300d313340690bb..b3cb832be6db70922c5495476e89124d75c9ed6d 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java -@@ -36,6 +36,7 @@ public class ItemBow extends ItemProjectileWeapon { +@@ -26,6 +26,7 @@ public class ItemBow extends ItemProjectileWeapon implements ItemVanishable { if ((double) f >= 0.1D) { boolean flag1 = flag && itemstack1.getItem() == Items.ARROW; @@ -30,7 +30,7 @@ index 83aa70c295f93b1c19d81fb0b90876e62fe58c23..26899916d3f5274691386685d13d18f5 if (!world.isClientSide) { ItemArrow itemarrow = (ItemArrow) ((ItemArrow) (itemstack1.getItem() instanceof ItemArrow ? itemstack1.getItem() : Items.ARROW)); EntityArrow entityarrow = itemarrow.a(world, itemstack1, (EntityLiving) entityhuman); -@@ -61,7 +62,7 @@ public class ItemBow extends ItemProjectileWeapon { +@@ -51,7 +52,7 @@ public class ItemBow extends ItemProjectileWeapon implements ItemVanishable { entityarrow.setOnFire(100); } // CraftBukkit start @@ -39,7 +39,7 @@ index 83aa70c295f93b1c19d81fb0b90876e62fe58c23..26899916d3f5274691386685d13d18f5 if (event.isCancelled()) { event.getProjectile().remove(); return; -@@ -71,7 +72,8 @@ public class ItemBow extends ItemProjectileWeapon { +@@ -61,7 +62,8 @@ public class ItemBow extends ItemProjectileWeapon implements ItemVanishable { itemstack.damage(1, entityhuman, (entityhuman1) -> { entityhuman1.broadcastItemBreak(entityhuman.getRaisedHand()); }); @@ -49,20 +49,20 @@ index 83aa70c295f93b1c19d81fb0b90876e62fe58c23..26899916d3f5274691386685d13d18f5 entityarrow.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY; } -@@ -88,7 +90,7 @@ public class ItemBow extends ItemProjectileWeapon { +@@ -78,7 +80,7 @@ public class ItemBow extends ItemProjectileWeapon implements ItemVanishable { } - world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1.0F, 1.0F / (ItemBow.i.nextFloat() * 0.4F + 1.2F) + f * 0.5F); + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1.0F, 1.0F / (ItemBow.RANDOM.nextFloat() * 0.4F + 1.2F) + f * 0.5F); - if (!flag1 && !entityhuman.abilities.canInstantlyBuild) { + if (!flag1 && !entityhuman.abilities.canInstantlyBuild && consumeArrow) { // Paper itemstack1.subtract(1); if (itemstack1.isEmpty()) { entityhuman.inventory.f(itemstack1); diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 7be41c8698e86727978db7d72b3dd3fbfe6b7272..60a47bccca5bc77039c0bec94eb329b3f2f0937f 100644 +index 1592e94c78611a4b968bfb24daf68570e778fadd..31c80bb0a2e403c34fb9cd4b3ee4e903d90dc356 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java -@@ -221,7 +221,7 @@ public class ItemCrossbow extends ItemProjectileWeapon { +@@ -205,7 +205,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable ((IProjectile) object).shoot((double) vector3fa.a(), (double) vector3fa.b(), (double) vector3fa.c(), f1, f2); } // CraftBukkit start @@ -72,10 +72,10 @@ index 7be41c8698e86727978db7d72b3dd3fbfe6b7272..60a47bccca5bc77039c0bec94eb329b3 event.getProjectile().remove(); return; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6d7236d3dcdb70cc1f33f462d08e78720045ccd0..b9e011256f0c8f67808ebebb5e9dc63d3358849f 100644 +index 8551d3c9ba808bb9a77897a9866249bc0845c3b2..bd820d9661616c1b294fff0a7af7581a84ada25f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -52,6 +52,7 @@ import net.minecraft.server.GeneratorAccess; +@@ -50,6 +50,7 @@ import net.minecraft.server.GeneratorAccess; import net.minecraft.server.IBlockData; import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.IInventory; @@ -83,7 +83,7 @@ index 6d7236d3dcdb70cc1f33f462d08e78720045ccd0..b9e011256f0c8f67808ebebb5e9dc63d import net.minecraft.server.ItemActionContext; import net.minecraft.server.ItemStack; import net.minecraft.server.Items; -@@ -478,16 +479,16 @@ public class CraftEventFactory { +@@ -476,16 +477,16 @@ public class CraftEventFactory { /** * EntityShootBowEvent */ diff --git a/Spigot-Server-Patches/0231-PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch similarity index 83% rename from Spigot-Server-Patches/0231-PlayerReadyArrowEvent.patch rename to Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch index f3c28c9ab1..686dbb752d 100644 --- a/Spigot-Server-Patches/0231-PlayerReadyArrowEvent.patch +++ b/Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch @@ -7,11 +7,11 @@ Called when a player is firing a bow and the server is choosing an arrow to use. Plugins can skip selection of certain arrows and control which is used. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 14a0e3d41ccd896da3b1126a403b0b684cada907..6e9dd4d3717567f54ac706715d75bf53d48c5f7d 100644 +index 59f7fced6213c218cd19863be99964eb496b6fe6..4893daca7ea64504731cfab455e09b0a11c65857 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -2157,6 +2157,17 @@ public abstract class EntityHuman extends EntityLiving { - return (EntitySize) EntityHuman.b.getOrDefault(entitypose, EntityHuman.bp); +@@ -2045,6 +2045,17 @@ public abstract class EntityHuman extends EntityLiving { + return ImmutableList.of(EntityPose.STANDING, EntityPose.CROUCHING, EntityPose.SWIMMING); } + // Paper start @@ -28,7 +28,7 @@ index 14a0e3d41ccd896da3b1126a403b0b684cada907..6e9dd4d3717567f54ac706715d75bf53 @Override public ItemStack f(ItemStack itemstack) { if (!(itemstack.getItem() instanceof ItemProjectileWeapon)) { -@@ -2173,7 +2184,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2061,7 +2072,7 @@ public abstract class EntityHuman extends EntityLiving { for (int i = 0; i < this.inventory.getSize(); ++i) { ItemStack itemstack2 = this.inventory.getItem(i); diff --git a/Spigot-Server-Patches/0232-Fire-EntityShootBowEvent-for-Illusioner.patch b/Spigot-Server-Patches/0231-Fire-EntityShootBowEvent-for-Illusioner.patch similarity index 82% rename from Spigot-Server-Patches/0232-Fire-EntityShootBowEvent-for-Illusioner.patch rename to Spigot-Server-Patches/0231-Fire-EntityShootBowEvent-for-Illusioner.patch index d3093ac832..947d348539 100644 --- a/Spigot-Server-Patches/0232-Fire-EntityShootBowEvent-for-Illusioner.patch +++ b/Spigot-Server-Patches/0231-Fire-EntityShootBowEvent-for-Illusioner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fire EntityShootBowEvent for Illusioner diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -index 2ea0583a3e9f2f13d84673cc412a3f4c9bfaf6f7..81b7cd06f2e1f1f2ce75ba84d47cc18723c2bfb6 100644 +index 350c7f73e7c9dc43c57f6fb29b40760bf00826a3..76fd0513f3c89678809a28b9f1b22940fb5e5f23 100644 --- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java +++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -@@ -138,8 +138,18 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan +@@ -134,8 +134,18 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2); entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.world.getDifficulty().a() * 4)); @@ -22,7 +22,7 @@ index 2ea0583a3e9f2f13d84673cc412a3f4c9bfaf6f7..81b7cd06f2e1f1f2ce75ba84d47cc187 + if (event.getProjectile() == entityarrow.getBukkitEntity()) { + this.world.addEntity(entityarrow); + } - this.a(SoundEffects.ENTITY_SKELETON_SHOOT, 1.0F, 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); + this.playSound(SoundEffects.ENTITY_SKELETON_SHOOT, 1.0F, 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); - this.world.addEntity(entityarrow); + // Paper end } diff --git a/Spigot-Server-Patches/0233-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch similarity index 90% rename from Spigot-Server-Patches/0233-Implement-EntityKnockbackByEntityEvent.patch rename to Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch index 5e2f5954c3..1932c4e2b8 100644 --- a/Spigot-Server-Patches/0233-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1a1d608f5acfc92e3e55e53f63c9da6ab0aa6a0a..2a567dca19034ed9071ef09b5371eabb5fff557c 100644 +index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..324a98bf245f410983840ef9970e7215e84f7465 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1421,6 +1421,16 @@ public abstract class EntityLiving extends Entity { +@@ -1531,6 +1531,16 @@ public abstract class EntityLiving extends Entity { Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f); this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z); diff --git a/Spigot-Server-Patches/0234-Expand-Explosions-API.patch b/Spigot-Server-Patches/0233-Expand-Explosions-API.patch similarity index 89% rename from Spigot-Server-Patches/0234-Expand-Explosions-API.patch rename to Spigot-Server-Patches/0233-Expand-Explosions-API.patch index 7f70c39212..40adbd62bd 100644 --- a/Spigot-Server-Patches/0234-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0233-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 28a94e473482b414b50ca793564acd409a5dc133..8968bf92b6c2718cbf9519c724bc85d27de54e72 100644 +index 2aea66553dceadc504abcf5701f8c82b24d1bda7..648af70dcb89908c0d9bf259f208861ceee884ca 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 { +@@ -881,6 +881,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/0235-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 74% rename from Spigot-Server-Patches/0235-LivingEntity-Hand-Raised-Item-Use-API.patch rename to Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch index 98f1be53e8..3ed7f9cd81 100644 --- a/Spigot-Server-Patches/0235-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,36 +6,36 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2a567dca19034ed9071ef09b5371eabb5fff557c..d604728db71d4e61a11fb1ccb7f02b6f6b914a51 100644 +index 324a98bf245f410983840ef9970e7215e84f7465..3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -112,7 +112,7 @@ public abstract class EntityLiving extends Entity { +@@ -118,7 +118,7 @@ public abstract class EntityLiving extends Entity { private float bB; private int jumpTicks; private float bD; - protected ItemStack activeItem; + public ItemStack activeItem; // Paper - public + protected int bk; protected int bl; - protected int bm; private BlockPosition bE; -@@ -2980,10 +2980,12 @@ public abstract class EntityLiving extends Entity { +@@ -3149,10 +3149,12 @@ public abstract class EntityLiving extends Entity { return this.activeItem; } -+ public int getItemUseRemainingTime() { return this.dE(); } // Paper - OBFHELPER - public int dE() { - return this.bl; ++ public int getItemUseRemainingTime() { return this.dY(); } // Paper - OBFHELPER + public int dY() { + return this.bk; } -+ public int getHandRaisedTime() { return this.dF(); } // Paper - OBFHELPER - public int dF() { - return this.isHandRaised() ? this.activeItem.k() - this.dE() : 0; ++ public int getHandRaisedTime() { return this.dZ(); } // Paper - OBFHELPER + public int dZ() { + return this.isHandRaised() ? this.activeItem.k() - this.dY() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a8e44e95d6115833f4e20e6bb007842bdc52f1ef..3a87c6574bbad9e6c2d7573eb447194c931d7ec4 100644 +index 38eb8fbac1d5131249dd9ba8b9942b4c85de2c7f..bbe6188f50dd3c456dec5c3239bdcffbfceb3589 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -654,5 +654,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -667,5 +667,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setShieldBlockingDelay(int delay) { getHandle().setShieldBlockingDelay(delay); } diff --git a/Spigot-Server-Patches/0236-RangedEntity-API.patch b/Spigot-Server-Patches/0235-RangedEntity-API.patch similarity index 100% rename from Spigot-Server-Patches/0236-RangedEntity-API.patch rename to Spigot-Server-Patches/0235-RangedEntity-API.patch diff --git a/Spigot-Server-Patches/0237-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 71% rename from Spigot-Server-Patches/0237-Add-config-to-disable-ender-dragon-legacy-check.patch rename to Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch index 94736ffd2e..076008d167 100644 --- a/Spigot-Server-Patches/0237-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -19,30 +19,30 @@ index 33ce9a500430a01650e69a3568c8b03db325a936..cea15d50ed89430ee8d8cff9de21e1fc + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 06748118494f2cc8cd692511e3b0bfd269fd249c..687efa022df41c23b5ffcce2efc2edcd8bd12dd6 100644 +index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..785146bfb64fe1a467120d706aff7450cb9a8b96 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java @@ -28,10 +28,10 @@ public class EnderDragonBattle { private int h; private int i; private int j; -- private boolean k; -+ private boolean k; private void setDragonKilled(boolean dragonKilled) { this.k = dragonKilled; } // Paper - OBFHELPER - private boolean l; - public UUID m; // CraftBukkit PAIL private -> public, rename dragonUUID +- private boolean dragonKilled; ++ private boolean dragonKilled; private void setDragonKilled(boolean dragonKilled) { this.dragonKilled = dragonKilled; } // Paper - OBFHELPER + private boolean previouslyKilled; + public UUID dragonUUID; - private boolean n; + private boolean n; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER - public BlockPosition o; // CraftBukkit PAIL private -> public, rename portalLocation - public EnumDragonRespawn p; // CraftBukkit PAIL private -> public, rename respawnPhase + public BlockPosition exitPortalLocation; + public EnumDragonRespawn respawnPhase; private int q; @@ -41,6 +41,10 @@ public class EnderDragonBattle { - this.bossBattle = (BossBattleServer) (new BossBattleServer(new ChatMessage("entity.minecraft.ender_dragon", new Object[0]), BossBattle.BarColor.PINK, BossBattle.BarStyle.PROGRESS)).setPlayMusic(true).c(true); - this.e = Lists.newArrayList(); + this.bossBattle = (BossBattleServer) (new BossBattleServer(new ChatMessage("entity.minecraft.ender_dragon"), BossBattle.BarColor.PINK, BossBattle.BarStyle.PROGRESS)).setPlayMusic(true).c(true); + this.gateways = Lists.newArrayList(); this.n = true; + // Paper start + setScanForLegacyFight(worldserver.paperConfig.scanForLegacyEnderDragon); + if (!scanForLegacyFight()) setDragonKilled(true); + // Paper end - this.d = worldserver; + this.world = worldserver; if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) { - if (nbttagcompound.b("DragonUUID")) { + if (nbttagcompound.b("Dragon")) { diff --git a/Spigot-Server-Patches/0238-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0237-Implement-World.getEntity-UUID-API.patch similarity index 84% rename from Spigot-Server-Patches/0238-Implement-World.getEntity-UUID-API.patch rename to Spigot-Server-Patches/0237-Implement-World.getEntity-UUID-API.patch index e0c5971e19..8f874ea40f 100644 --- a/Spigot-Server-Patches/0238-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0237-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 8968bf92b6c2718cbf9519c724bc85d27de54e72..a59172ff043e5220ffdd363582c38ae53c429f1a 100644 +index 648af70dcb89908c0d9bf259f208861ceee884ca..66c89831796db1bbdd6c83cba786b27ef339ec9b 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 { +@@ -1295,6 +1295,15 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0239-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch similarity index 83% rename from Spigot-Server-Patches/0239-InventoryCloseEvent-Reason-API.patch rename to Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch index 7a662125a1..7c795f7406 100644 --- a/Spigot-Server-Patches/0239-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch @@ -7,11 +7,11 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 6e9dd4d3717567f54ac706715d75bf53d48c5f7d..684978be7ccc401b71b0594828a7783b209a5210 100644 +index 4893daca7ea64504731cfab455e09b0a11c65857..1f3e5c384a66bb0767cc18bdbe99b942f30faa55 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -164,7 +164,7 @@ public abstract class EntityHuman extends EntityLiving { - this.dW(); +@@ -155,7 +155,7 @@ public abstract class EntityHuman extends EntityLiving { + this.es(); super.tick(); if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) { - this.closeInventory(); @@ -19,7 +19,7 @@ index 6e9dd4d3717567f54ac706715d75bf53d48c5f7d..684978be7ccc401b71b0594828a7783b this.activeContainer = this.defaultContainer; } -@@ -363,6 +363,13 @@ public abstract class EntityHuman extends EntityLiving { +@@ -350,6 +350,13 @@ public abstract class EntityHuman extends EntityLiving { return 20; } @@ -34,10 +34,10 @@ index 6e9dd4d3717567f54ac706715d75bf53d48c5f7d..684978be7ccc401b71b0594828a7783b this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 88692d9eaea57a4d172d537a6cf2a3bffe058d54..f35d23340665ab323732915efc0c0ad7fe4d964d 100644 +index 00b19cce68abf405117c5e2d55ba86fc10e7db34..dc99c7730e72e1a52219fbe0b3b039899899f49d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -368,7 +368,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -411,7 +411,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // Paper end if (!this.world.isClientSide && !this.activeContainer.canUse(this)) { @@ -46,7 +46,7 @@ index 88692d9eaea57a4d172d537a6cf2a3bffe058d54..f35d23340665ab323732915efc0c0ad7 this.activeContainer = this.defaultContainer; } -@@ -542,7 +542,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -585,7 +585,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { @@ -55,7 +55,7 @@ index 88692d9eaea57a4d172d537a6cf2a3bffe058d54..f35d23340665ab323732915efc0c0ad7 } String deathMessage = event.getDeathMessage(); -@@ -1057,7 +1057,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1164,7 +1164,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return OptionalInt.empty(); } else { if (this.activeContainer != this.defaultContainer) { @@ -64,7 +64,7 @@ index 88692d9eaea57a4d172d537a6cf2a3bffe058d54..f35d23340665ab323732915efc0c0ad7 } this.nextContainerCounter(); -@@ -1117,7 +1117,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1224,7 +1224,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end if (this.activeContainer != this.defaultContainer) { @@ -73,7 +73,7 @@ index 88692d9eaea57a4d172d537a6cf2a3bffe058d54..f35d23340665ab323732915efc0c0ad7 } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1181,7 +1181,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1288,7 +1288,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void closeInventory() { @@ -85,26 +85,26 @@ index 88692d9eaea57a4d172d537a6cf2a3bffe058d54..f35d23340665ab323732915efc0c0ad7 + CraftEventFactory.handleInventoryCloseEvent(this, reason); // CraftBukkit + // Paper end this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId)); - this.m(); + this.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a357b6167405be4034cf3dad4124827e04278366..0c9e46a8973436a4438730a49986c88f12829be1 100644 +index e78306cb187b5f08e32888ebd55c4c486fc8dad2..2cbb0e0e1046efeff7f417d0c976754bd0e7959b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2040,7 +2040,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2079,7 +2079,7 @@ public class PlayerConnection implements PacketListenerPlayIn { PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer()); if (this.player.isFrozen()) return; // CraftBukkit - CraftEventFactory.handleInventoryCloseEvent(this.player); // CraftBukkit + CraftEventFactory.handleInventoryCloseEvent(this.player, org.bukkit.event.inventory.InventoryCloseEvent.Reason.PLAYER); // CraftBukkit // Paper - this.player.m(); + this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 46ea6d8e487d0c051780b0bdb06622e515cd987f..950afb131bbea53e46393fa19b0bfbb9d5c647f5 100644 +index 70339603aa3e256470be241bf033f3471e2090ea..ef1ea58c252d063ce282d244236a510655538a11 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -390,7 +390,7 @@ public abstract class PlayerList { +@@ -419,7 +419,7 @@ public abstract class PlayerList { entityplayer.a(StatisticList.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it @@ -114,10 +114,10 @@ index 46ea6d8e487d0c051780b0bdb06622e515cd987f..950afb131bbea53e46393fa19b0bfbb9 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a834a77b2de8f7287be69fd5d002ff43261a9a85..d4e963c169f847acce882dfba067be0d64638ec4 100644 +index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf38772dc20766 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1045,7 +1045,7 @@ public class WorldServer extends World { +@@ -968,7 +968,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { for (TileEntity tileentity : chunk.getTileEntities().values()) { if (tileentity instanceof IInventory) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) { @@ -126,7 +126,7 @@ index a834a77b2de8f7287be69fd5d002ff43261a9a85..d4e963c169f847acce882dfba067be0d } } } -@@ -1103,7 +1103,7 @@ public class WorldServer extends World { +@@ -1026,7 +1026,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { @@ -136,10 +136,10 @@ index a834a77b2de8f7287be69fd5d002ff43261a9a85..d4e963c169f847acce882dfba067be0d } // 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 20f0783025516048851aedef0a70759c2953ae47..a6d75c0e07a25fdb59dde2e3eb2a0213c7112515 100644 +index 42bc39381c4fc5ff81bdd312afd1644dcc5d40c2..1eac3798acfc8a6859f102250bc8e49ed29d6e21 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -467,8 +467,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -434,8 +434,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { @@ -155,10 +155,10 @@ index 20f0783025516048851aedef0a70759c2953ae47..a6d75c0e07a25fdb59dde2e3eb2a0213 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f5c722644a1955c9bc68c89fdbb84526f9bbb7a0..368f786300573ff24a8dc46d96a6fb6bac26b35a 100644 +index ec0cb22d53733bed33019b257ac06ca9dc80d19e..5575c44d6f427661de1fec2c69932b446284c54d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -784,7 +784,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -788,7 +788,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { @@ -168,10 +168,10 @@ index f5c722644a1955c9bc68c89fdbb84526f9bbb7a0..368f786300573ff24a8dc46d96a6fb6b // 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 b9e011256f0c8f67808ebebb5e9dc63d3358849f..4a76402c01dfe6525bae8728da2dde6e5d673765 100644 +index bd820d9661616c1b294fff0a7af7581a84ada25f..3757a30e7b0ae1ec61211b2250bab47f70c776d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1301,12 +1301,22 @@ public class CraftEventFactory { +@@ -1299,12 +1299,22 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0240-Configurable-Bed-Search-Radius.patch b/Spigot-Server-Patches/0239-Configurable-Bed-Search-Radius.patch similarity index 90% rename from Spigot-Server-Patches/0240-Configurable-Bed-Search-Radius.patch rename to Spigot-Server-Patches/0239-Configurable-Bed-Search-Radius.patch index b56a18a87b..8219587132 100644 --- a/Spigot-Server-Patches/0240-Configurable-Bed-Search-Radius.patch +++ b/Spigot-Server-Patches/0239-Configurable-Bed-Search-Radius.patch @@ -30,24 +30,23 @@ index cea15d50ed89430ee8d8cff9de21e1fc7982e1d8..387e0dcb9f01ad947daaa19211331a96 + } } diff --git a/src/main/java/net/minecraft/server/BlockBed.java b/src/main/java/net/minecraft/server/BlockBed.java -index 7947563426f7f1cc9364d7b6f71256bf3beea463..e0bc6080ef29258473ec3ef7ffa7c246f08ac146 100644 +index 7604d79468ce8d7d1a4f45872a5db0c700419029..e7bd9061cceba284443b75cc5506e1b9f2ef42e8 100644 --- a/src/main/java/net/minecraft/server/BlockBed.java +++ b/src/main/java/net/minecraft/server/BlockBed.java -@@ -196,6 +196,9 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { +@@ -199,6 +199,8 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { public static Optional a(EntityTypes entitytypes, IWorldReader iworldreader, BlockPosition blockposition, int i) { EnumDirection enumdirection = (EnumDirection) iworldreader.getType(blockposition).get(BlockBed.FACING); + // Paper start - configurable bed search radius + if (entitytypes == EntityTypes.PLAYER) return findSafePosition(entitytypes, (World) iworldreader, enumdirection, blockposition); -+ int j = blockposition.getX(); int k = blockposition.getY(); int l = blockposition.getZ(); -@@ -225,7 +228,104 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { +@@ -228,7 +230,104 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { return Optional.empty(); } -- protected static Optional a(EntityTypes entitytypes, IWorldReader iworldreader, BlockPosition blockposition) { +- public static Optional a(EntityTypes entitytypes, IWorldReader iworldreader, BlockPosition blockposition) { + private static Optional findSafePosition(EntityTypes entitytypes, World world, EnumDirection updirection, BlockPosition blockposition){ + int radius = world.paperConfig.bedSearchRadius; + double angle = Math.PI / 2; @@ -143,15 +142,15 @@ index 7947563426f7f1cc9364d7b6f71256bf3beea463..e0bc6080ef29258473ec3ef7ffa7c246 + // Paper end + + // Paper start -- add maxBelow param -+ protected static Optional a(EntityTypes entitytypes, IWorldReader iworldreader, BlockPosition blockposition) { return isSafeRespawn(entitytypes, iworldreader, blockposition, 2); } -+ protected static Optional isSafeRespawn(EntityTypes entitytypes, IWorldReader iworldreader, BlockPosition blockposition, int maxBelow) { ++ public static Optional a(EntityTypes entitytypes, IWorldReader iworldreader, BlockPosition blockposition) { return isSafeRespawn(entitytypes, iworldreader, blockposition, 2); } ++ public static Optional isSafeRespawn(EntityTypes entitytypes, IWorldReader iworldreader, BlockPosition blockposition, int maxBelow) { + // Paper end VoxelShape voxelshape = iworldreader.getType(blockposition).getCollisionShape(iworldreader, blockposition); if (voxelshape.c(EnumDirection.EnumAxis.Y) > 0.4375D) { -@@ -233,7 +333,7 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { +@@ -236,7 +335,7 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { } else { - BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(blockposition); + BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.i(); - while (blockposition_mutableblockposition.getY() >= 0 && blockposition.getY() - blockposition_mutableblockposition.getY() <= 2 && iworldreader.getType(blockposition_mutableblockposition).getCollisionShape(iworldreader, blockposition_mutableblockposition).isEmpty()) { + while (blockposition_mutableblockposition.getY() >= 0 && blockposition.getY() - blockposition_mutableblockposition.getY() <= maxBelow && iworldreader.getType(blockposition_mutableblockposition).getCollisionShape(iworldreader, blockposition_mutableblockposition).isEmpty()) { // Paper -- configurable max distance to search below diff --git a/Spigot-Server-Patches/0241-Vex-getSummoner-API.patch b/Spigot-Server-Patches/0240-Vex-getSummoner-API.patch similarity index 85% rename from Spigot-Server-Patches/0241-Vex-getSummoner-API.patch rename to Spigot-Server-Patches/0240-Vex-getSummoner-API.patch index 07dedcc9c1..82527c6c53 100644 --- a/Spigot-Server-Patches/0241-Vex-getSummoner-API.patch +++ b/Spigot-Server-Patches/0240-Vex-getSummoner-API.patch @@ -6,15 +6,15 @@ Subject: [PATCH] Vex#getSummoner API Get's the NPC that summoned this Vex diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index cd9fb3aabfca254ca522d39a25e54ceda0b6f5fc..a46730460e5d9f6e52d63ba1950d1e7195fe87cd 100644 +index 1eb39fd5cc4fd3b070dcaf64c467da76f99456fc..ab4ac736f8fcda1ed6b58abe0a4ecba58d3b5d43 100644 --- a/src/main/java/net/minecraft/server/EntityVex.java +++ b/src/main/java/net/minecraft/server/EntityVex.java -@@ -92,6 +92,7 @@ public class EntityVex extends EntityMonster { +@@ -89,6 +89,7 @@ public class EntityVex extends EntityMonster { } -+ public EntityInsentient getOwner() { return l(); } // Paper - OBFHELPER - public EntityInsentient l() { ++ public EntityInsentient getOwner() { return eL(); } // Paper - OBFHELPER + public EntityInsentient eL() { return this.c; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java diff --git a/Spigot-Server-Patches/0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 89% rename from Spigot-Server-Patches/0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch index f3b5d4e6a0..a9f7b79235 100644 --- a/Spigot-Server-Patches/0242-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0c9e46a8973436a4438730a49986c88f12829be1..a46ef5e72d03a32e22cfd77b2581de70edcc686a 100644 +index 2cbb0e0e1046efeff7f417d0c976754bd0e7959b..8855a1de14f970ddac25d935a4b2e00c7e277908 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1950,6 +1950,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1988,6 +1988,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (event.isCancelled()) { diff --git a/Spigot-Server-Patches/0243-Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/0242-Don-t-change-the-Entity-Random-seed-for-squids.patch similarity index 82% rename from Spigot-Server-Patches/0243-Don-t-change-the-Entity-Random-seed-for-squids.patch rename to Spigot-Server-Patches/0242-Don-t-change-the-Entity-Random-seed-for-squids.patch index aba93c9b63..6b945b0334 100644 --- a/Spigot-Server-Patches/0243-Don-t-change-the-Entity-Random-seed-for-squids.patch +++ b/Spigot-Server-Patches/0242-Don-t-change-the-Entity-Random-seed-for-squids.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't change the Entity Random seed for squids diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 1c1ff2069d6daaf866a3e80a9b3ce78b19941384..92efe4e7f50fa10bcdff52fb51a9b814d995c8c9 100644 +index 9c9ec8226ab43beaae0ef4abc97632b503e2120c..c9c0b2ab265666986cdedf920955ee55ebbedaf3 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -21,7 +21,7 @@ public class EntitySquid extends EntityWaterAnimal { @@ -14,6 +14,6 @@ index 1c1ff2069d6daaf866a3e80a9b3ce78b19941384..92efe4e7f50fa10bcdff52fb51a9b814 super(entitytypes, world); - this.random.setSeed((long) this.getId()); + //this.random.setSeed((long) this.getId()); // Paper - this.bC = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; + this.bB = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; } diff --git a/Spigot-Server-Patches/0244-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch similarity index 86% rename from Spigot-Server-Patches/0244-Re-add-vanilla-entity-warnings-for-duplicates.patch rename to Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch index 7fca9a2130..ce7537874f 100644 --- a/Spigot-Server-Patches/0244-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d4e963c169f847acce882dfba067be0d64638ec4..1019f180397abef5ec28d00c432415a7270026e2 100644 +index dbc7db5c52752c52b3e84b370bbf38772dc20766..781b84535c105987d4b65e744977c87049b2a1a4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1035,7 +1035,8 @@ public class WorldServer extends World { +@@ -958,7 +958,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0245-Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/0244-Avoid-item-merge-if-stack-size-above-max-stack-size.patch similarity index 83% rename from Spigot-Server-Patches/0245-Avoid-item-merge-if-stack-size-above-max-stack-size.patch rename to Spigot-Server-Patches/0244-Avoid-item-merge-if-stack-size-above-max-stack-size.patch index 8c3350c02a..84e8774cb6 100644 --- a/Spigot-Server-Patches/0245-Avoid-item-merge-if-stack-size-above-max-stack-size.patch +++ b/Spigot-Server-Patches/0244-Avoid-item-merge-if-stack-size-above-max-stack-size.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 5efcc50ab9e8a99d88a9d2e7f15ecbcc4439b93e..e5c9bac88a59d52c9b2f05df3e4f373edbe009ca 100644 +index cc173445caa0a064e724bc29b4955232a1dc1816..aad23b2c6cd674e05e609c4c019205978c6741f2 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java -@@ -170,6 +170,10 @@ public class EntityItem extends Entity { +@@ -177,6 +177,10 @@ public class EntityItem extends Entity { private void mergeNearby() { - if (this.w()) { + if (this.z()) { + // Paper start - avoid item merge if stack size above max stack size + ItemStack stack = getItemStack(); + if (stack.getCount() >= stack.getMaxStackSize()) return; diff --git a/Spigot-Server-Patches/0246-Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch similarity index 95% rename from Spigot-Server-Patches/0246-Use-asynchronous-Log4j-2-loggers.patch rename to Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch index 7ddc8755fb..0b7f4c17f7 100644 --- a/Spigot-Server-Patches/0246-Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use asynchronous Log4j 2 loggers diff --git a/pom.xml b/pom.xml -index 8ad07cf6e03cbc5354d2dd2b149b51bbb5067a9d..fc2921e9783f2db63b71c6e244e24c9416cdbf76 100644 +index 8150756361174fd46df8f73943ab48c55a523c0c..f578acae6fbe1ad7a0c05b96ba489482687ec1df 100644 --- a/pom.xml +++ b/pom.xml @@ -77,6 +77,13 @@ diff --git a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch new file mode 100644 index 0000000000..561df855cc --- /dev/null +++ b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 19 Jul 2018 01:13:28 -0400 +Subject: [PATCH] add more information to Entity.toString() + +UUID, ticks lived, valid, dead + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 3e5b6c2a0ce6df2620d5f6505fcd25e6ea622744..3cb157cf4d1aa90b23f24b5090071d71c6bd2754 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -2430,7 +2430,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + + public String toString() { +- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getString(), this.id, this.world == null ? "~NULL~" : this.world.toString(), this.locX(), this.locY(), this.locZ()); ++ return String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getString(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.toString(), Double.valueOf(this.locX()), Double.valueOf(this.locY()), Double.valueOf(this.locZ()), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information + } + + public boolean isInvulnerable(DamageSource damagesource) { diff --git a/Spigot-Server-Patches/0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 74% rename from Spigot-Server-Patches/0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 8ea3b8bb72..dba29626a7 100644 --- a/Spigot-Server-Patches/0248-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fe730cd301e6bae46320355ee8cb67d406a72a9f..5fd57a3d30972d86c62025d63cd57b56a147cc94 100644 +index 3cb157cf4d1aa90b23f24b5090071d71c6bd2754..814c885313967f007584f6832111ec5b445e4088 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -77,6 +77,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; @@ -19,18 +19,18 @@ index fe730cd301e6bae46320355ee8cb67d406a72a9f..5fd57a3d30972d86c62025d63cd57b56 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 7804cc0f6a02d14f4adbe05b37e8470a382c0d26..4ee26ff08f7a058648ab54f0dcd81b466a9aced1 100644 +index 4ae3e91677ecf9c2104a229b4e8b229d18b87aa4..458802dc4b1f923b159168efff0546bb731da07b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1064,6 +1064,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - } else { - PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking()); +@@ -1093,6 +1093,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + } else { + PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking()); -+ entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker - this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); - playerchunkmap_entitytracker.track(this.world.getPlayers()); - if (entity instanceof EntityPlayer) { -@@ -1106,7 +1107,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ++ entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker + this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); + playerchunkmap_entitytracker.track(this.world.getPlayers()); + if (entity instanceof EntityPlayer) { +@@ -1134,7 +1135,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.a(); } @@ -40,10 +40,10 @@ index 7804cc0f6a02d14f4adbe05b37e8470a382c0d26..4ee26ff08f7a058648ab54f0dcd81b46 protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6603392f475f0bfe7af259a54ba9bb3469c18541..fb719c5e18bcfa0e424c67c6b23c5abedd234f79 100644 +index 6f91878fedd3bf8daedc16bcde7ac1fd042f704c..8148ecad0e313d2e6c0307915aaa670e7ad5a317 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -63,6 +63,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean pvpMode; public boolean keepSpawnInMemory = true; public org.bukkit.generator.ChunkGenerator generator; @@ -52,20 +52,20 @@ index 6603392f475f0bfe7af259a54ba9bb3469c18541..fb719c5e18bcfa0e424c67c6b23c5abe public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1019f180397abef5ec28d00c432415a7270026e2..5086a854b84b05e5b9c0f5677051d19dfa42f343 100644 +index 781b84535c105987d4b65e744977c87049b2a1a4..ac0bcde5ccc9ebb88922d8b82381b03675b87ae6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -76,6 +76,9 @@ public class WorldServer extends World { - // CraftBukkit start - private int tickPosition; +@@ -84,6 +84,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { + public final UUID uuid; + boolean hasPhysicsEvent = true; // Paper + private static Throwable getAddToWorldStackTrace(Entity entity) { + return new Throwable(entity + " Added to world at " + new java.util.Date()); + } - // Add env and gen to constructor - public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { -@@ -997,8 +1000,28 @@ public class WorldServer extends World { + public Chunk getChunkIfLoaded(int x, int z) { + return this.chunkProvider.getChunkAt(x, z, false); +@@ -920,8 +923,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -95,7 +95,7 @@ index 1019f180397abef5ec28d00c432415a7270026e2..5086a854b84b05e5b9c0f5677051d19d // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit return false; } else if (this.isUUIDTaken(entity)) { -@@ -1158,7 +1181,24 @@ public class WorldServer extends World { +@@ -1081,7 +1104,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch deleted file mode 100644 index 9a10692fca..0000000000 --- a/Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Thu, 19 Jul 2018 01:13:28 -0400 -Subject: [PATCH] add more information to Entity.toString() - -UUID, ticks lived, valid, dead - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7c6bf0b91cdf59f6dcf155ee8abfbab61938cc8b..fe730cd301e6bae46320355ee8cb67d406a72a9f 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2505,7 +2505,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - } - - public String toString() { -- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getText(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX(), this.locY(), this.locZ()); -+ return String.format(Locale.ROOT, "%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information - } - - public boolean isInvulnerable(DamageSource damagesource) { diff --git a/Spigot-Server-Patches/0249-EnderDragon-Events.patch b/Spigot-Server-Patches/0248-EnderDragon-Events.patch similarity index 86% rename from Spigot-Server-Patches/0249-EnderDragon-Events.patch rename to Spigot-Server-Patches/0248-EnderDragon-Events.patch index eb756a6109..b02fa9d772 100644 --- a/Spigot-Server-Patches/0249-EnderDragon-Events.patch +++ b/Spigot-Server-Patches/0248-EnderDragon-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EnderDragon Events diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -index 40a8beff556873a5db108e44fd053e8de80e36a6..18fdcd453af5dc22a5b0e3c41e77e3d3dbb70fea 100644 +index fbc2ec88f7c71c853c492301986a23dafc8fa7a6..274ebd7dab74ca9bff3d5ea941b7335bdf601db8 100644 --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java @@ -71,7 +71,11 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded @@ -29,10 +29,10 @@ index 40a8beff556873a5db108e44fd053e8de80e36a6..18fdcd453af5dc22a5b0e3c41e77e3d3 public void e() { if (this.d != null) { diff --git a/src/main/java/net/minecraft/server/DragonControllerStrafe.java b/src/main/java/net/minecraft/server/DragonControllerStrafe.java -index a2c36548caea7c6a0050bb3b18675567a61fb96e..a9d20ee3bbaf4dd77204df9c28a233a0d36cdbd2 100644 +index 7c94faa59c2b9887292c6d88fa2e3bb46e3e67c7..ac546ff959510a2d0120c24c90bf13ff83873161 100644 --- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java +++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java -@@ -68,7 +68,9 @@ public class DragonControllerStrafe extends AbstractDragonController { +@@ -71,7 +71,9 @@ public class DragonControllerStrafe extends AbstractDragonController { EntityDragonFireball entitydragonfireball = new EntityDragonFireball(this.a.world, this.a, d9, d10, d11); entitydragonfireball.setPositionRotation(d6, d7, d8, 0.0F, 0.0F); @@ -43,15 +43,15 @@ index a2c36548caea7c6a0050bb3b18675567a61fb96e..a9d20ee3bbaf4dd77204df9c28a233a0 if (this.d != null) { while (!this.d.b()) { diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java -index bc08b53fcdd411f15afb939702d68c98ed697479..db43ac1cc4ae959a432eedd3efee891b4e141c7f 100644 +index 743a08d18df8890a61eeb48984c0882bb353e15c..96fdf9d068c2df154dbc2fb7978b0ba7a030c834 100644 --- a/src/main/java/net/minecraft/server/EntityDragonFireball.java +++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java -@@ -41,8 +41,10 @@ public class EntityDragonFireball extends EntityFireball { +@@ -46,8 +46,10 @@ public class EntityDragonFireball extends EntityFireball { } } + if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(EntityLiving::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper - this.world.triggerEffect(2006, new BlockPosition(this), 0); + this.world.triggerEffect(2006, this.getChunkCoordinates(), this.isSilent() ? -1 : 1); this.world.addEntity(entityareaeffectcloud); + } else entityareaeffectcloud.die(); // Paper this.die(); diff --git a/Spigot-Server-Patches/0250-PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/0249-PlayerElytraBoostEvent.patch similarity index 90% rename from Spigot-Server-Patches/0250-PlayerElytraBoostEvent.patch rename to Spigot-Server-Patches/0249-PlayerElytraBoostEvent.patch index 3a30f49496..f53dfa1f00 100644 --- a/Spigot-Server-Patches/0250-PlayerElytraBoostEvent.patch +++ b/Spigot-Server-Patches/0249-PlayerElytraBoostEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerElytraBoostEvent diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index 92dac35ec4eefe0d5794d8205bc872d23a62e3cb..bd524a35bb11005adfed12f66465fa8466a155f0 100644 +index 6cc243025f5bdac9be39f8a88a018893a9941dba..885c03f62da3b14bf7aeb31f1ae6a95bc9f86de1 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java @@ -36,11 +36,16 @@ public class ItemFireworks extends Item { @@ -28,4 +28,4 @@ index 92dac35ec4eefe0d5794d8205bc872d23a62e3cb..bd524a35bb11005adfed12f66465fa84 + // Paper end } - return InteractionResultWrapper.success(entityhuman.b(enumhand)); + return InteractionResultWrapper.a(entityhuman.b(enumhand), world.s_()); diff --git a/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch b/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch new file mode 100644 index 0000000000..06283647f0 --- /dev/null +++ b/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch @@ -0,0 +1,75 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Techcable +Date: Wed, 30 Nov 2016 20:56:58 -0600 +Subject: [PATCH] Improve BlockPosition inlining + +Normally the JVM can inline virtual getters by having two sets of code, one is the 'optimized' code and the other is the 'deoptimized' code. +If a single type is used 99% of the time, then its worth it to inline, and to revert to 'deoptimized' the 1% of the time we encounter other types. +But if two types are encountered commonly, then the JVM can't inline them both, and the call overhead remains. + +This scenario also occurs with BlockPos and MutableBlockPos. +The variables in BlockPos are final, so MutableBlockPos can't modify them. +MutableBlockPos fixes this by adding custom mutable variables, and overriding the getters to access them. + +This approach with utility methods that operate on MutableBlockPos and BlockPos. +Specific examples are BlockPosition.up(), and World.isValidLocation(). +It makes these simple methods much slower than they need to be. + +This should result in an across the board speedup in anything that accesses blocks or does logic with positions. + +This is based upon conclusions drawn from inspecting the assenmbly generated bythe JIT compiler on my microbenchmarks. +They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. + +diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java +index 8b202b342f899a38b989b683bd8be4f5c4061f48..1842e69839a65e7b8d2c47fd30ec8f3179f04470 100644 +--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java ++++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java +@@ -39,7 +39,7 @@ public class BaseBlockPosition implements Comparable { + this(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); + } + +- public boolean equals(Object object) { ++ public final boolean equals(Object object) { // Paper + if (this == object) { + return true; + } else if (!(object instanceof BaseBlockPosition)) { +@@ -51,7 +51,7 @@ public class BaseBlockPosition implements Comparable { + } + } + +- public int hashCode() { ++ public final int hashCode() { // Paper + return (this.getY() + this.getZ() * 31) * 31 + this.getX(); + } + +@@ -59,15 +59,15 @@ public class BaseBlockPosition implements Comparable { + return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); + } + +- public int getX() { ++ public final int getX() { // Paper + return this.a; + } + +- public int getY() { ++ public final int getY() { // Paper + return this.b; + } + +- public int getZ() { ++ public final int getZ() { // Paper + return this.e; + } + +diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java +index b61651fcd6605cd8638ce14f15e41b878add3f1c..b25b84d017ee610d8f006536fdfa63e840474a9b 100644 +--- a/src/main/java/net/minecraft/server/BlockPosition.java ++++ b/src/main/java/net/minecraft/server/BlockPosition.java +@@ -81,6 +81,7 @@ public class BlockPosition extends BaseBlockPosition { + return a(this.getX(), this.getY(), this.getZ()); + } + ++ public static long asLong(int x, int y, int z) { return a(x, y, z); } // Paper - OBFHELPER + public static long a(int i, int j, int k) { + long l = 0L; + diff --git a/Spigot-Server-Patches/0251-Improve-BlockPosition-inlining.patch b/Spigot-Server-Patches/0251-Improve-BlockPosition-inlining.patch deleted file mode 100644 index 366f75128a..0000000000 --- a/Spigot-Server-Patches/0251-Improve-BlockPosition-inlining.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Techcable -Date: Wed, 30 Nov 2016 20:56:58 -0600 -Subject: [PATCH] Improve BlockPosition inlining - -Normally the JVM can inline virtual getters by having two sets of code, one is the 'optimized' code and the other is the 'deoptimized' code. -If a single type is used 99% of the time, then its worth it to inline, and to revert to 'deoptimized' the 1% of the time we encounter other types. -But if two types are encountered commonly, then the JVM can't inline them both, and the call overhead remains. - -This scenario also occurs with BlockPos and MutableBlockPos. -The variables in BlockPos are final, so MutableBlockPos can't modify them. -MutableBlockPos fixes this by adding custom mutable variables, and overriding the getters to access them. - -This approach with utility methods that operate on MutableBlockPos and BlockPos. -Specific examples are BlockPosition.up(), and World.isValidLocation(). -It makes these simple methods much slower than they need to be. - -This should result in an across the board speedup in anything that accesses blocks or does logic with positions. - -This is based upon conclusions drawn from inspecting the assenmbly generated bythe JIT compiler on my microbenchmarks. -They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. - -diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 7b05bb9edcd059a134cef12cc9fea570217bc601..a0450a7ddf21659c5636b3f298e6bf4f0a93fc4d 100644 ---- a/src/main/java/net/minecraft/server/BaseBlockPosition.java -+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -7,32 +7,30 @@ import javax.annotation.concurrent.Immutable; - public class BaseBlockPosition implements Comparable { - - public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0); -- @Deprecated -- private final int a; -- @Deprecated -- private final int b; -- @Deprecated -- private final int c; - // Paper start -- public boolean isValidLocation() { -- return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256; -+ protected int x; -+ protected int y; -+ protected int z; -+ -+ public final boolean isValidLocation() { -+ return x >= -30000000 && z >= -30000000 && x < 30000000 && z < 30000000 && y >= 0 && y < 256; - } -- public boolean isInvalidYLocation() { -- return b < 0 || b >= 256; -+ public final boolean isInvalidYLocation() { -+ return y < 0 || y >= 256; - } - // Paper end - - public BaseBlockPosition(int i, int j, int k) { -- this.a = i; -- this.b = j; -- this.c = k; -+ this.x = i; -+ this.y = j; -+ this.z = k; - } - - public BaseBlockPosition(double d0, double d1, double d2) { - this(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); - } - -- public boolean equals(Object object) { -+ public final boolean equals(Object object) { // Paper - if (this == object) { - return true; - } else if (!(object instanceof BaseBlockPosition)) { -@@ -40,29 +38,31 @@ public class BaseBlockPosition implements Comparable { - } else { - BaseBlockPosition baseblockposition = (BaseBlockPosition) object; - -- return this.getX() != baseblockposition.getX() ? false : (this.getY() != baseblockposition.getY() ? false : this.getZ() == baseblockposition.getZ()); -+ return x == baseblockposition.x && z == baseblockposition.z && y == baseblockposition.y; // Paper - } - } - -- public int hashCode() { -- return (this.getY() + this.getZ() * 31) * 31 + this.getX(); -+ public final int hashCode() { // Paper -+ return (this.y + this.z * 31) * 31 + this.x; // Paper - } - - public int compareTo(BaseBlockPosition baseblockposition) { - return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); - } - -- public int getX() { -- return this.a; -+ // Paper start -+ public final int getX() { -+ return this.x; - } - -- public int getY() { -- return this.b; -+ public final int getY() { -+ return this.y; - } - -- public int getZ() { -- return this.c; -+ public final int getZ() { -+ return this.z; - } -+ // Paper end - - public BaseBlockPosition down() { - return this.down(1); -@@ -75,13 +75,14 @@ public class BaseBlockPosition implements Comparable { - public BaseBlockPosition shift(EnumDirection enumdirection, int i) { - return i == 0 ? this : new BaseBlockPosition(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i); - } -+ // Paper end - - public BaseBlockPosition d(BaseBlockPosition baseblockposition) { - return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); - } - - public boolean a(BaseBlockPosition baseblockposition, double d0) { -- return this.distanceSquared((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ(), false) < d0 * d0; -+ return this.distanceSquared((double) baseblockposition.x, (double) baseblockposition.y, (double) baseblockposition.z, false) < d0 * d0; // Paper - } - - public boolean a(IPosition iposition, double d0) { -@@ -107,9 +108,9 @@ public class BaseBlockPosition implements Comparable { - } - - public int n(BaseBlockPosition baseblockposition) { -- float f = (float) Math.abs(baseblockposition.getX() - this.getX()); -- float f1 = (float) Math.abs(baseblockposition.getY() - this.getY()); -- float f2 = (float) Math.abs(baseblockposition.getZ() - this.getZ()); -+ float f = (float) Math.abs(baseblockposition.getX() - this.x); // Paper -+ float f1 = (float) Math.abs(baseblockposition.getY() - this.y); // Paper -+ float f2 = (float) Math.abs(baseblockposition.getZ() - this.z); // Paper - - return (int) (f + f1 + f2); - } -diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index f8ac39e1b019b0918996f745d99f6ed09db0fd11..ec0e8f970dba64561afd6477a5df2821d9a8889a 100644 ---- a/src/main/java/net/minecraft/server/BlockPosition.java -+++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -99,6 +99,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - return new BlockPosition(b(i), c(i), d(i)); - } - -+ public static long asLong(int x, int y, int z) { return a(x, y, z); } // Paper - OBFHELPER - public static long a(int i, int j, int k) { - long l = 0L; - -@@ -113,7 +114,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - } - - public long asLong() { -- return a(this.getX(), this.getY(), this.getZ()); -+ return a(this.x, this.y, this.z); // Paper - } - - public BlockPosition a(double d0, double d1, double d2) { -@@ -343,11 +344,13 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - } - - public static class MutableBlockPosition extends BlockPosition { -- -+ // Paper start - comment out -+ /* - protected int b; - protected int c; - protected int d; -- -+ */ -+ // Paper end - public MutableBlockPosition() { - this(0, 0, 0); - } -@@ -357,10 +360,13 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - } - - public MutableBlockPosition(int i, int j, int k) { -- super(0, 0, 0); -+ // Paper start -+ super(i, j, k); -+ /* - this.b = i; - this.c = j; -- this.d = k; -+ this.d = k;*/ -+ // Paper end - } - - public MutableBlockPosition(double d0, double d1, double d2) { -@@ -391,6 +397,9 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - return super.a(enumblockrotation).immutableCopy(); - } - -+ -+ /* -+ // Paper start - use parent getters - @Override - public int getX() { - return this.b; -@@ -404,13 +413,16 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - @Override - public int getZ() { - return this.d; -- } -+ }*/ -+ // Paper end - - public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return d(i, j, k);} // Paper - OBFHELPER - public BlockPosition.MutableBlockPosition d(int i, int j, int k) { -- this.b = i; -- this.c = j; -- this.d = k; -+ // Paper start - use xyz -+ this.x = i; -+ this.y = j; -+ this.z = k; -+ // Paper end - return this; - } - -@@ -440,26 +452,26 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - } - - public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { -- return this.d(this.b + enumdirection.getAdjacentX() * i, this.c + enumdirection.getAdjacentY() * i, this.d + enumdirection.getAdjacentZ() * i); -+ return this.d(this.x + enumdirection.getAdjacentX() * i, this.y + enumdirection.getAdjacentY() * i, this.z + enumdirection.getAdjacentZ() * i); - } - - public BlockPosition.MutableBlockPosition e(int i, int j, int k) { -- return this.d(this.b + i, this.c + j, this.d + k); -+ return this.d(this.x + i, this.y + j, this.z + k); - } - - public final void setX(final int x) { this.o(x); } // Paper - OBFHELPER - public void o(int i) { -- this.b = i; -+ this.x = i; // Paper change to x - } - - public final void setY(final int y) { this.p(y); } // Paper - OBFHELPER - public void p(int i) { -- this.c = i; -+ this.y = i; // Paper change to y - } - - public final void setZ(final int z) { this.q(z); } // Paper - OBFHELPER - public void q(int i) { -- this.d = i; -+ this.z = i; // Paper change to z - } - - @Override diff --git a/Spigot-Server-Patches/0252-Optimize-RegistryID.c.patch b/Spigot-Server-Patches/0251-Optimize-RegistryID.c.patch similarity index 84% rename from Spigot-Server-Patches/0252-Optimize-RegistryID.c.patch rename to Spigot-Server-Patches/0251-Optimize-RegistryID.c.patch index 7fc1445058..73cc0f8294 100644 --- a/Spigot-Server-Patches/0252-Optimize-RegistryID.c.patch +++ b/Spigot-Server-Patches/0251-Optimize-RegistryID.c.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize RegistryID.c() This is a frequent hotspot for world loading/saving. diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index e15d286710ed66a01bfb6b60f8735b837efb3fd7..e8a48b9a4c999281869dfb85577c2b44d6e30eb7 100644 +index 6cdd4d46d987132c3c241800b5d59cee2dfa25e2..f9692408a1d177ba4668261070d7610ecfb53a7b 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java @@ -14,12 +14,14 @@ public class RegistryID implements Registry { @@ -24,7 +24,7 @@ index e15d286710ed66a01bfb6b60f8735b837efb3fd7..e8a48b9a4c999281869dfb85577c2b44 } public int getId(@Nullable K k0) { -@@ -44,9 +46,14 @@ public class RegistryID implements Registry { +@@ -48,9 +50,14 @@ public class RegistryID implements Registry { } private int c() { @@ -39,7 +39,7 @@ index e15d286710ed66a01bfb6b60f8735b837efb3fd7..e8a48b9a4c999281869dfb85577c2b44 return this.e; } -@@ -60,6 +67,7 @@ public class RegistryID implements Registry { +@@ -64,6 +71,7 @@ public class RegistryID implements Registry { this.d = (K[]) (new Object[i]); // Paper - decompile fix this.e = 0; this.f = 0; @@ -47,7 +47,7 @@ index e15d286710ed66a01bfb6b60f8735b837efb3fd7..e8a48b9a4c999281869dfb85577c2b44 for (int j = 0; j < ak.length; ++j) { if (ak[j] != null) { -@@ -85,6 +93,7 @@ public class RegistryID implements Registry { +@@ -89,6 +97,7 @@ public class RegistryID implements Registry { this.b[k] = k0; this.c[k] = i; this.d[i] = k0; @@ -55,7 +55,7 @@ index e15d286710ed66a01bfb6b60f8735b837efb3fd7..e8a48b9a4c999281869dfb85577c2b44 ++this.f; if (i == this.e) { ++this.e; -@@ -149,6 +158,7 @@ public class RegistryID implements Registry { +@@ -153,6 +162,7 @@ public class RegistryID implements Registry { Arrays.fill(this.d, (Object) null); this.e = 0; this.f = 0; diff --git a/Spigot-Server-Patches/0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 77% rename from Spigot-Server-Patches/0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 50bfc2319b..547cd38154 100644 --- a/Spigot-Server-Patches/0253-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -19,13 +19,13 @@ index 387e0dcb9f01ad947daaa19211331a96742ce004..eaaa51e4bf761f41fd516402ce1ad0f9 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index fb719c5e18bcfa0e424c67c6b23c5abedd234f79..52d0b9e37b222274cccd2a7a872f61a6a72f2f06 100644 +index 8148ecad0e313d2e6c0307915aaa670e7ad5a317..66ce6afd46be67a131091d16b6a1221bbff333b5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -782,6 +782,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -836,6 +836,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + // Paper end } } - + // Paper start - Prevent armor stands from doing entity lookups + @Override + public boolean getCubes(@Nullable Entity entity, AxisAlignedBB axisAlignedBB) { @@ -33,7 +33,6 @@ index fb719c5e18bcfa0e424c67c6b23c5abedd234f79..52d0b9e37b222274cccd2a7a872f61a6 + return GeneratorAccess.super.getCubes(entity, axisAlignedBB); + } + // Paper end -+ - public boolean b(AxisAlignedBB axisalignedbb) { - int i = MathHelper.floor(axisalignedbb.minX); - int j = MathHelper.f(axisalignedbb.maxX); + + public Explosion explode(@Nullable Entity entity, double d0, double d1, double d2, float f, Explosion.Effect explosion_effect) { + return this.createExplosion(entity, (DamageSource) null, (ExplosionDamageCalculator) null, d0, d1, d2, f, false, explosion_effect); diff --git a/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch similarity index 65% rename from Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch rename to Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch index 273b9575ca..9871c118fc 100644 --- a/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch @@ -4,11 +4,23 @@ Date: Mon, 23 Jul 2018 14:22:26 +0200 Subject: [PATCH] Vanished players don't have rights +diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java +index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac5943b9df 100644 +--- a/src/main/java/net/minecraft/server/BlockBase.java ++++ b/src/main/java/net/minecraft/server/BlockBase.java +@@ -453,6 +453,7 @@ public abstract class BlockBase { + return this.a != null ? this.a.b : this.b(iblockaccess, blockposition, VoxelShapeCollision.a()); + } + ++ public final VoxelShape getCollisionShape(IBlockAccess iblockaccess, BlockPosition blockposition, VoxelShapeCollision voxelshapecollision) { return this.b(iblockaccess, blockposition, voxelshapecollision); } // Paper - OBFHELPER + public VoxelShape b(IBlockAccess iblockaccess, BlockPosition blockposition, VoxelShapeCollision voxelshapecollision) { + 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 5fd57a3d30972d86c62025d63cd57b56a147cc94..653e6d9a1640bedf08aaa5b436ac93e4cb1cb5b7 100644 +index 814c885313967f007584f6832111ec5b445e4088..e281ab94a1a69059db653789532735e8c5fd272a 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 +@@ -99,7 +99,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke private static double e = 1.0D; private final EntityTypes f; private int id; @@ -18,54 +30,53 @@ index 5fd57a3d30972d86c62025d63cd57b56a147cc94..653e6d9a1640bedf08aaa5b436ac93e4 protected int j; @Nullable diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java -index 278ef79d8962cc5d337e34891c7ea3a606336cbb..5c3731f68a31b73b886b872eba69de483f78a2aa 100644 +index 5ac7957016d1ca6bc78ced0bcf3767d358677f45..ca92579304d060e2b718aab6f3e3f006d52f93e5 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java -@@ -110,6 +110,16 @@ public class EntityFireworks extends Entity implements IProjectile { +@@ -118,7 +118,6 @@ public class EntityFireworks extends IProjectile { + this.move(EnumMoveType.SELF, vec3d); + this.setMot(vec3d); + } +- + MovingObjectPosition movingobjectposition = ProjectileHelper.a(this, this::a, RayTrace.BlockCollisionOption.COLLIDER); - vec3d = this.getMot(); - MovingObjectPosition movingobjectposition = ProjectileHelper.a(this, this.getBoundingBox().a(vec3d).g(1.0D), (entity) -> { + if (!this.noclip) { +diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java +index cdf80e50de0840002f62f4c1df4fbcc4e13675d7..f85d80d7bb3e4e92bb8d281dfe577f663ebe9da1 100644 +--- a/src/main/java/net/minecraft/server/IProjectile.java ++++ b/src/main/java/net/minecraft/server/IProjectile.java +@@ -129,8 +129,14 @@ public abstract class IProjectile extends Entity { + protected boolean a(Entity entity) { + if (!entity.isSpectator() && entity.isAlive() && entity.isInteractable()) { + Entity entity1 = this.getShooter(); +- + // Paper start - Cancel hit for vanished players -+ if (this.spawningEntity != null && entity instanceof EntityPlayer && this.world instanceof WorldServer) { -+ Entity spawningEntity = ((WorldServer) this.world).getEntity(this.spawningEntity); -+ if (spawningEntity instanceof EntityPlayer) { -+ org.bukkit.entity.Player collided = (org.bukkit.entity.Player) entity.getBukkitEntity(); -+ org.bukkit.entity.Player shooter = (org.bukkit.entity.Player) spawningEntity.getBukkitEntity(); -+ if (!shooter.canSee(collided)) return false; -+ } ++ if (entity1 instanceof EntityPlayer) { ++ org.bukkit.entity.Player collided = (org.bukkit.entity.Player) entity.getBukkitEntity(); ++ org.bukkit.entity.Player shooter = (org.bukkit.entity.Player) entity1.getBukkitEntity(); ++ if (!shooter.canSee(collided)) return false; + } + return entity1 == null || this.d || !entity1.isSameVehicle(entity); + // Paper end - return !entity.isSpectator() && entity.isAlive() && entity.isInteractable(); - }, RayTrace.BlockCollisionOption.COLLIDER, true); - -diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 181661fc8fe9d46cb36cfffac38c58f0d5003192..c5fddef030489bff0de9e0efb4f11c83bcfee628 100644 ---- a/src/main/java/net/minecraft/server/IBlockData.java -+++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -147,6 +147,7 @@ public class IBlockData extends BlockDataAbstract implements - return this.c != null ? this.c.g : this.b(iblockaccess, blockposition, VoxelShapeCollision.a()); - } - -+ public final VoxelShape getCollisionShape(IBlockAccess iblockaccess, BlockPosition blockposition, VoxelShapeCollision voxelshapecollision) { return this.b(iblockaccess, blockposition, voxelshapecollision); } // Paper - OBFHELPER - public VoxelShape b(IBlockAccess iblockaccess, BlockPosition blockposition, VoxelShapeCollision voxelshapecollision) { - return this.getBlock().b(this, iblockaccess, blockposition, voxelshapecollision); - } + } else { + return false; + } diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java -index ab875a7365693264ea8e5002d9d115e16320dbc8..aed353365bfdf1a133997f47cb458edc78af6c8b 100644 +index 6c7f677f68d89d7e08c07a0f24268c5a638b4076..33d38a9a8a55c7a26d9a584e8058f42556b6ed59 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java -@@ -136,7 +136,8 @@ public class ItemBlock extends Item { +@@ -139,7 +139,8 @@ public class ItemBlock extends Item { EntityHuman entityhuman = blockactioncontext.getEntity(); VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.a() : VoxelShapeCollision.a((Entity) entityhuman); // CraftBukkit start - store default return -- boolean defaultReturn = (!this.T_() || iblockdata.canPlace(blockactioncontext.getWorld(), blockactioncontext.getClickPosition())) && blockactioncontext.getWorld().a(iblockdata, blockactioncontext.getClickPosition(), voxelshapecollision); +- boolean defaultReturn = (!this.isCheckCollisions() || iblockdata.canPlace(blockactioncontext.getWorld(), blockactioncontext.getClickPosition())) && blockactioncontext.getWorld().a(iblockdata, blockactioncontext.getClickPosition(), voxelshapecollision); + World world = blockactioncontext.getWorld(); // Paper -+ boolean defaultReturn = (!this.T_() || iblockdata.canPlace(blockactioncontext.getWorld(), blockactioncontext.getClickPosition())) && world.checkEntityCollision(iblockdata, entityhuman, voxelshapecollision, blockactioncontext.getClickPosition(), true); // Paper ++ boolean defaultReturn = (!this.isCheckCollisions() || iblockdata.canPlace(blockactioncontext.getWorld(), blockactioncontext.getClickPosition())) && world.checkEntityCollision(iblockdata, entityhuman, voxelshapecollision, blockactioncontext.getClickPosition(), true); // Paper org.bukkit.entity.Player player = (blockactioncontext.getEntity() instanceof EntityPlayer) ? (org.bukkit.entity.Player) blockactioncontext.getEntity().getBukkitEntity() : null; BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), player, CraftBlockData.fromData(iblockdata), defaultReturn); diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java -index 0f64a3c0569a778cd5b8c60f253c77681a83308d..0f95bcbccb96f9d525583f6bb6c0c0ed7fb7561b 100644 +index e985b0efc20f7d271be1c7ffc2670ab89fc3a6a7..c2b8c9820663f95f58f0c3a62cd9ec99c835a82f 100644 --- a/src/main/java/net/minecraft/server/VoxelShape.java +++ b/src/main/java/net/minecraft/server/VoxelShape.java @@ -46,6 +46,7 @@ public abstract class VoxelShape { @@ -77,7 +88,7 @@ index 0f64a3c0569a778cd5b8c60f253c77681a83308d..0f95bcbccb96f9d525583f6bb6c0c0ed return (VoxelShape) (this.isEmpty() ? VoxelShapes.a() : new VoxelShapeArray(this.a, new DoubleListOffset(this.a(EnumDirection.EnumAxis.X), d0), new DoubleListOffset(this.a(EnumDirection.EnumAxis.Y), d1), new DoubleListOffset(this.a(EnumDirection.EnumAxis.Z), d2))); } diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index 0e30d8c9933dc6595b9715ef6dc99cc8910892cb..335142ec0dfad822cfe40877e99dec0f307e1a58 100644 +index 86f6f082fe2991ea9065b09c9680b76ca1cf7154..b6e2a3d8d0cf510f497c6f974356fafaf2adc13b 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java @@ -35,6 +35,7 @@ public final class VoxelShapes { @@ -97,10 +108,10 @@ index 0e30d8c9933dc6595b9715ef6dc99cc8910892cb..335142ec0dfad822cfe40877e99dec0f if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c(new IllegalArgumentException()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 52d0b9e37b222274cccd2a7a872f61a6a72f2f06..2db91e85bd5e95d15b607a96114f33b6e7687b19 100644 +index 66ce6afd46be67a131091d16b6a1221bbff333b5..f6cb503b8eb329cb6bfaa960f812da3c99ce45a8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -153,6 +153,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -170,6 +170,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } @@ -145,13 +156,13 @@ index 52d0b9e37b222274cccd2a7a872f61a6a72f2f06..2db91e85bd5e95d15b607a96114f33b6 + // Paper end + @Override - public boolean p_() { + 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 4a76402c01dfe6525bae8728da2dde6e5d673765..dccc187c6198ce2e8824b8460347586ccf5c6741 100644 +index 3757a30e7b0ae1ec61211b2250bab47f70c776d4..a349ce7f04d6f2b29a0de534a3f7616778026666 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1179,6 +1179,14 @@ public class CraftEventFactory { +@@ -1177,6 +1177,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/0255-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/0254-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch similarity index 79% rename from Spigot-Server-Patches/0255-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch rename to Spigot-Server-Patches/0254-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch index fd3744a599..3cf45230b2 100644 --- a/Spigot-Server-Patches/0255-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch +++ b/Spigot-Server-Patches/0254-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 87e94693f6db07d1273854ad55e5f263f2f2239e..f0a8142b7477fde211b522e3982e614fc94e20f8 100644 +index fdc02b512f2d4bc968977564d520bc7ec7189c69..a27f91e6c3d1f5dd0adf8a3b48a640cc63676114 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -518,6 +518,7 @@ public class Chunk implements IChunkAccess { +@@ -519,6 +519,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 87e94693f6db07d1273854ad55e5f263f2f2239e..f0a8142b7477fde211b522e3982e614f } @Override -@@ -545,6 +546,7 @@ public class Chunk implements IChunkAccess { +@@ -546,6 +547,7 @@ public class Chunk implements IChunkAccess { return; } entityCounts.decrement(entity.getMinecraftKeyString()); diff --git a/Spigot-Server-Patches/0256-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch similarity index 86% rename from Spigot-Server-Patches/0256-Add-some-Debug-to-Chunk-Entity-slices.patch rename to Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch index 0975e2af16..79423f7b9e 100644 --- a/Spigot-Server-Patches/0256-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0255-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 f0a8142b7477fde211b522e3982e614fc94e20f8..9f369f932ca0a63bde246420cfde7949f3e78ca2 100644 +index a27f91e6c3d1f5dd0adf8a3b48a640cc63676114..3ba19f75d24a1539c94f4fed9b8f90aecc918cdc 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -509,6 +509,25 @@ public class Chunk implements IChunkAccess { +@@ -510,6 +510,25 @@ public class Chunk implements IChunkAccess { if (k >= this.entitySlices.length) { k = this.entitySlices.length - 1; } @@ -38,7 +38,7 @@ index f0a8142b7477fde211b522e3982e614fc94e20f8..9f369f932ca0a63bde246420cfde7949 if (!entity.inChunk || entity.getCurrentChunk() != this) entityCounts.increment(entity.getMinecraftKeyString()); // Paper entity.inChunk = true; -@@ -518,6 +537,7 @@ public class Chunk implements IChunkAccess { +@@ -519,6 +538,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 f0a8142b7477fde211b522e3982e614fc94e20f8..9f369f932ca0a63bde246420cfde7949 this.markDirty(); // Paper } -@@ -542,6 +562,10 @@ public class Chunk implements IChunkAccess { +@@ -543,6 +563,10 @@ public class Chunk implements IChunkAccess { // Paper start if (entity.currentChunk != null && entity.currentChunk.get() == this) entity.setCurrentChunk(null); @@ -58,10 +58,10 @@ index f0a8142b7477fde211b522e3982e614fc94e20f8..9f369f932ca0a63bde246420cfde7949 return; } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 653e6d9a1640bedf08aaa5b436ac93e4cb1cb5b7..84d36ea84e25a701af22900af6cd3099adf6cd54 100644 +index e281ab94a1a69059db653789532735e8c5fd272a..6012891971265323603cb05ae444cca1bb058c89 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 +@@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } } }; diff --git a/Spigot-Server-Patches/0257-EntityTransformedEvent.patch b/Spigot-Server-Patches/0256-EntityTransformedEvent.patch similarity index 50% rename from Spigot-Server-Patches/0257-EntityTransformedEvent.patch rename to Spigot-Server-Patches/0256-EntityTransformedEvent.patch index 53a2e0a865..222965c2e8 100644 --- a/Spigot-Server-Patches/0257-EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/0256-EntityTransformedEvent.patch @@ -4,43 +4,47 @@ Date: Thu, 26 Jul 2018 15:30:03 -0400 Subject: [PATCH] EntityTransformedEvent +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java +index 3997dc6d979bf5a027861397b948aa4e8486fc58..a38a1f3447accd51dcd295fb28c4108cb87ad832 100644 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java ++++ b/src/main/java/net/minecraft/server/EntityInsentient.java +@@ -1244,6 +1244,7 @@ public abstract class EntityInsentient extends EntityLiving { + if (CraftEventFactory.callEntityTransformEvent(this, t0, EntityTransformEvent.TransformReason.DROWNED).isCancelled()) { + return null; + } ++ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), t0.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.DROWNED).callEvent()) return null; // Paper + this.world.addEntity(t0, CreatureSpawnEvent.SpawnReason.DROWNED); + // CraftBukkit end + this.die(); diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java -index 1d96ecb2fda1b567866f620b183a5811f75fa7f2..8b199971bd67a196168afb2e63d4c72919fec8d2 100644 +index 48d7e0f971d3147218e3be774a75cdb10d8b55a6..23ef033067e388b7b7b2a981df8655e240a30594 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java +++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java -@@ -112,6 +112,7 @@ public class EntityMushroomCow extends EntityCow { - if (CraftEventFactory.callEntityTransformEvent(this, entitycow, EntityTransformEvent.TransformReason.SHEARED).isCancelled()) { - return false; - } -+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entitycow.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.SHEARED).callEvent()) return false; // Paper - this.world.addEntity(entitycow, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED); - - this.die(); // CraftBukkit - from above -diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 6ca4fa43c41ad555c093b90cf08cfdb1e73fda22..6e0020ae0b4d2f2597843129b83fff0d194de337 100644 ---- a/src/main/java/net/minecraft/server/EntityVillager.java -+++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -699,6 +699,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) { - return; - } -+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entitywitch.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.LIGHTNING).callEvent()) return; // Paper - this.world.addEntity(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); - // CraftBukkit end - this.die(); -diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 83d5731b7f964136edf7cfabb96421e0788d067a..97a1dedf7460d513a560d722b2e0f1bf09fe669c 100644 ---- a/src/main/java/net/minecraft/server/EntityZombie.java -+++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -257,6 +257,7 @@ public class EntityZombie extends EntityMonster { +@@ -150,6 +150,7 @@ public class EntityMushroomCow extends EntityCow implements IShearable { + if (CraftEventFactory.callEntityTransformEvent(this, entitycow, EntityTransformEvent.TransformReason.SHEARED).isCancelled()) { return; } ++ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entitycow.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.SHEARED).callEvent()) return; // Paper + this.world.addEntity(entitycow, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED); + + this.die(); // CraftBukkit - from above +diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java +index 00183a7f6e2000ce045ce50454f1296c4c93b148..a23c8d54a30a1ed1a3ed4d158da08229f59ca4c5 100644 +--- a/src/main/java/net/minecraft/server/EntityVillager.java ++++ b/src/main/java/net/minecraft/server/EntityVillager.java +@@ -733,6 +733,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) { + return; + } ++ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entitywitch.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.LIGHTNING).callEvent()) return; // Paper + this.world.addEntity(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit end -+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entityzombie.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.DROWNED).callEvent()) return; // Paper - this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.DROWNED); // CraftBukkit - added spawn reason this.die(); - } -@@ -463,6 +464,7 @@ public class EntityZombie extends EntityMonster { +diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java +index b808477cea6bf704edfaf08a2d0366bf263e69aa..3f16f9b34a75db6dc977cb0dc1603db34dd8ddc3 100644 +--- a/src/main/java/net/minecraft/server/EntityZombie.java ++++ b/src/main/java/net/minecraft/server/EntityZombie.java +@@ -399,6 +399,7 @@ public class EntityZombie extends EntityMonster { if (CraftEventFactory.callEntityTransformEvent(this, entityzombievillager, EntityTransformEvent.TransformReason.INFECTION).isCancelled()) { return; } @@ -49,10 +53,10 @@ index 83d5731b7f964136edf7cfabb96421e0788d067a..97a1dedf7460d513a560d722b2e0f1bf this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java -index 5c2d132c3a495650c5c279065e6659a88de0421d..b1818d269a78b6cb5594dd2f21c91ab1452649f7 100644 +index 2fb6356940b57e112d1ef35bfd3aee9cd98e5754..9b920332bd397f9711f0c99702245d54b9d3841b 100644 --- a/src/main/java/net/minecraft/server/EntityZombieVillager.java +++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java -@@ -197,6 +197,7 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo +@@ -212,6 +212,7 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo ((ZombieVillager) getBukkitEntity()).setConversionTime(-1); // SPIGOT-5208: End conversion to stop event spam return; } diff --git a/Spigot-Server-Patches/0258-SkeletonHorse-Additions.patch b/Spigot-Server-Patches/0257-SkeletonHorse-Additions.patch similarity index 76% rename from Spigot-Server-Patches/0258-SkeletonHorse-Additions.patch rename to Spigot-Server-Patches/0257-SkeletonHorse-Additions.patch index fae66f94ea..4699e18102 100644 --- a/Spigot-Server-Patches/0258-SkeletonHorse-Additions.patch +++ b/Spigot-Server-Patches/0257-SkeletonHorse-Additions.patch @@ -5,33 +5,33 @@ Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index 621f2afee599e82806d54de15ff413674523815c..290cb9337c868fa3b9cbef0545886f44a00ef804 100644 +index 2aee4c592cbf7e083c522a35846735bdb7a2e448..43e605f682709708f5b79c70398691dc195ef925 100644 --- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java +++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java @@ -6,7 +6,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { - private final PathfinderGoalHorseTrap bF = new PathfinderGoalHorseTrap(this); - private boolean bG; -- private int bH; -+ private int bH; public int getTrapTime() { return this.bH; } // Paper - OBFHELPER + private final PathfinderGoalHorseTrap bD = new PathfinderGoalHorseTrap(this); + private boolean bE; +- private int bF; ++ private int bF; public int getTrapTime() { return this.bF; } // Paper - OBFHELPER public EntityHorseSkeleton(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -124,10 +124,12 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { +@@ -125,10 +125,12 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { return 0.96F; } -+ public boolean isTrap() { return this.eq(); } // Paper - OBFHELPER - public boolean eq() { - return this.bG; ++ public boolean isTrap() { return this.eN(); } // Paper - OBFHELPER + public boolean eN() { + return this.bE; } -+ public void setTrap(boolean trap) { this.r(trap); } // Paper - OBFHELPER - public void r(boolean flag) { - if (flag != this.bG) { - this.bG = flag; ++ public void setTrap(boolean trap) { this.t(trap); } // Paper - OBFHELPER + public void t(boolean flag) { + if (flag != this.bE) { + this.bE = flag; diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java -index dfe5a63583d8c14c82cc778ee004f2877e43776d..37626f925fb7838e41f7bfab352c9360b3786b4a 100644 +index d6b02adf9fe8287d600d76fb1c3be86fdee1fa77..b37e4aa37b35863d74cb6ef95562fba65486bdf9 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java @@ -15,6 +15,7 @@ public class PathfinderGoalHorseTrap extends PathfinderGoal { @@ -39,9 +39,9 @@ index dfe5a63583d8c14c82cc778ee004f2877e43776d..37626f925fb7838e41f7bfab352c9360 @Override public void e() { + if (!new com.destroystokyo.paper.event.entity.SkeletonHorseTrapEvent((org.bukkit.entity.SkeletonHorse) this.a.getBukkitEntity()).callEvent()) return; // Paper - DifficultyDamageScaler difficultydamagescaler = this.a.world.getDamageScaler(new BlockPosition(this.a)); + DifficultyDamageScaler difficultydamagescaler = this.a.world.getDamageScaler(this.a.getChunkCoordinates()); - this.a.r(false); + this.a.t(false); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java index e822c2200d6270ca538eadd9637b748fc3602cb6..2a7d1d4ec2c1ff16840614165c6f0c37dc534d87 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java diff --git a/Spigot-Server-Patches/0259-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch similarity index 89% rename from Spigot-Server-Patches/0259-Prevent-Saving-Bad-entities-to-chunks.patch rename to Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch index b6bda37c08..3abc5efc8b 100644 --- a/Spigot-Server-Patches/0259-Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch @@ -18,10 +18,10 @@ an invalid entity. This should reduce log occurrences of dupe uuid messages. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 13d99de2cd08de02215031a1f699110c13ef35ff..f54572773c25b6716a68166efa8d3fc8b22b6258 100644 +index 28039aa8421207ce04840cc90e03d21bc8b7269f..17b8c4445af2bd2ed907d05ed3c396d4290dc63d 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -300,6 +300,7 @@ public class ChunkRegionLoader { +@@ -301,6 +301,7 @@ public class ChunkRegionLoader { nbttagcompound1.set("TileEntities", nbttaglist1); NBTTagList nbttaglist2 = new NBTTagList(); @@ -29,7 +29,7 @@ index 13d99de2cd08de02215031a1f699110c13ef35ff..f54572773c25b6716a68166efa8d3fc8 if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.LEVELCHUNK) { Chunk chunk = (Chunk) ichunkaccess; -@@ -311,13 +312,28 @@ public class ChunkRegionLoader { +@@ -312,13 +313,28 @@ public class ChunkRegionLoader { while (iterator1.hasNext()) { Entity entity = (Entity) iterator1.next(); NBTTagCompound nbttagcompound4 = new NBTTagCompound(); @@ -59,7 +59,7 @@ index 13d99de2cd08de02215031a1f699110c13ef35ff..f54572773c25b6716a68166efa8d3fc8 } else { ProtoChunk protochunk = (ProtoChunk) ichunkaccess; -@@ -373,6 +389,19 @@ public class ChunkRegionLoader { +@@ -377,6 +393,19 @@ public class ChunkRegionLoader { nbttagcompound1.set("Structures", a(chunkcoordintpair, ichunkaccess.h(), ichunkaccess.v())); return nbttagcompound; } @@ -80,10 +80,10 @@ index 13d99de2cd08de02215031a1f699110c13ef35ff..f54572773c25b6716a68166efa8d3fc8 public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) { if (nbttagcompound != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 5086a854b84b05e5b9c0f5677051d19dfa42f343..426ca12970e0c75ba75eee6c3e3cdbf833730737 100644 +index ac0bcde5ccc9ebb88922d8b82381b03675b87ae6..d81d6f7b984dc3587baadc96fc33f087b3594dcc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1078,6 +1078,7 @@ public class WorldServer extends World { +@@ -1001,6 +1001,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { List[] aentityslice = chunk.getEntitySlices(); // Spigot int i = aentityslice.length; @@ -91,7 +91,7 @@ index 5086a854b84b05e5b9c0f5677051d19dfa42f343..426ca12970e0c75ba75eee6c3e3cdbf8 for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot Iterator iterator = entityslice.iterator(); -@@ -1090,11 +1091,25 @@ public class WorldServer extends World { +@@ -1013,11 +1014,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { throw (IllegalStateException) SystemUtils.c(new IllegalStateException("Removing entity while ticking!")); } diff --git a/Spigot-Server-Patches/0260-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 95% rename from Spigot-Server-Patches/0260-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch index 2916550284..ba7fb72e4a 100644 --- a/Spigot-Server-Patches/0260-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index a41be8fdaebe7cf61537c638392b3dc7c7f5b371..d5e8a7ee6de22d09e563ad1c124a18810a38a0c5 100644 +index 2146d1354c48b9a76b24bca321b578d401e1a0a8..3541fed804b9bbfbd8c658d6c03a74c3dd4acf25 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -553,7 +553,7 @@ public final class CraftItemStack extends ItemStack { +@@ -561,7 +561,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { diff --git a/Spigot-Server-Patches/0261-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch similarity index 75% rename from Spigot-Server-Patches/0261-Ignore-Dead-Entities-in-entityList-iteration.patch rename to Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch index f73a9fa204..fc445de048 100644 --- a/Spigot-Server-Patches/0261-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -23,18 +23,18 @@ index b839769ceae8932bb121a0b96fde1e7d129a1f63..5acad8e44f024d3ddf5ef4fd320460ac MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9f369f932ca0a63bde246420cfde7949f3e78ca2..c84d90a9a0c67b5ff518ce3fbc21344c808a3cf1 100644 +index 3ba19f75d24a1539c94f4fed9b8f90aecc918cdc..f7be161c8557ae3848227b1a61e27374770ad243 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -816,6 +816,7 @@ public class Chunk implements IChunkAccess { +@@ -818,6 +818,7 @@ public class Chunk implements IChunkAccess { - while (iterator.hasNext()) { - Entity entity1 = (Entity) iterator.next(); -+ if (entity1.shouldBeRemoved) continue; // Paper + for (int i1 = 0; i1 < l; ++i1) { + Entity entity1 = (Entity) list1.get(i1); ++ if (entity1.shouldBeRemoved) continue; // Paper - if (entity1.getBoundingBox().c(axisalignedbb) && entity1 != entity) { - if (predicate == null || predicate.test(entity1)) { -@@ -853,6 +854,7 @@ public class Chunk implements IChunkAccess { + if (entity1.getBoundingBox().c(axisalignedbb) && entity1 != entity) { + if (predicate == null || predicate.test(entity1)) { +@@ -854,6 +855,7 @@ public class Chunk implements IChunkAccess { while (iterator.hasNext()) { T entity = (T) iterator.next(); // CraftBukkit - decompile error @@ -42,7 +42,7 @@ index 9f369f932ca0a63bde246420cfde7949f3e78ca2..c84d90a9a0c67b5ff518ce3fbc21344c if ((entitytypes == null || entity.getEntityType() == entitytypes) && entity.getBoundingBox().c(axisalignedbb) && predicate.test(entity)) { list.add(entity); -@@ -874,6 +876,7 @@ public class Chunk implements IChunkAccess { +@@ -875,6 +877,7 @@ public class Chunk implements IChunkAccess { while (iterator.hasNext()) { T t0 = (T) iterator.next(); // CraftBukkit - decompile error @@ -51,10 +51,10 @@ index 9f369f932ca0a63bde246420cfde7949f3e78ca2..c84d90a9a0c67b5ff518ce3fbc21344c 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 84d36ea84e25a701af22900af6cd3099adf6cd54..6e87ff52df30f4de8cfb11d1dbfb71211d656831 100644 +index 6012891971265323603cb05ae444cca1bb058c89..9163916e6f600f2efa3e05f3df1d07ef9b60cd3a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -195,6 +195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -196,6 +196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end @@ -63,19 +63,10 @@ index 84d36ea84e25a701af22900af6cd3099adf6cd54..6e87ff52df30f4de8cfb11d1dbfb7121 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 426ca12970e0c75ba75eee6c3e3cdbf833730737..3067ab76d94c58fbfd52fac6754bf6d6d7f01d09 100644 +index d81d6f7b984dc3587baadc96fc33f087b3594dcc..ba0bb12dd5c5068d31c8a925e31804ddf2cec5da 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -908,7 +908,7 @@ public class WorldServer extends World { - - while (objectiterator.hasNext()) { - Entity entity = (Entity) objectiterator.next(); -- -+ if (entity.shouldBeRemoved) continue; // Paper - if (entity instanceof EntityInsentient) { - EntityInsentient entityinsentient = (EntityInsentient) entity; - -@@ -1230,6 +1230,7 @@ public class WorldServer extends World { +@@ -1153,6 +1153,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -83,7 +74,7 @@ index 426ca12970e0c75ba75eee6c3e3cdbf833730737..3067ab76d94c58fbfd52fac6754bf6d6 new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1242,6 +1243,7 @@ public class WorldServer extends World { +@@ -1165,6 +1166,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.removeEntityFromChunk(entity); this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); @@ -92,10 +83,10 @@ index 426ca12970e0c75ba75eee6c3e3cdbf833730737..3067ab76d94c58fbfd52fac6754bf6d6 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a59172ff043e5220ffdd363582c38ae53c429f1a..6c3cd51d92d2271cd216c42c18733d549fbe668d 100644 +index 66c89831796db1bbdd6c83cba786b27ef339ec9b..411d7a3f7d4d54fbf748888e24f2032c4d091250 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 { +@@ -1031,6 +1031,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; @@ -103,7 +94,7 @@ index a59172ff043e5220ffdd363582c38ae53c429f1a..6c3cd51d92d2271cd216c42c18733d54 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1046,6 +1047,7 @@ public class CraftWorld implements World { +@@ -1050,6 +1051,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; @@ -111,7 +102,7 @@ index a59172ff043e5220ffdd363582c38ae53c429f1a..6c3cd51d92d2271cd216c42c18733d54 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1072,6 +1074,7 @@ public class CraftWorld implements World { +@@ -1076,6 +1078,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { @@ -119,7 +110,7 @@ index a59172ff043e5220ffdd363582c38ae53c429f1a..6c3cd51d92d2271cd216c42c18733d54 Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { -@@ -1095,6 +1098,7 @@ public class CraftWorld implements World { +@@ -1099,6 +1102,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/0262-Implement-Expanded-ArmorStand-API.patch b/Spigot-Server-Patches/0261-Implement-Expanded-ArmorStand-API.patch similarity index 94% rename from Spigot-Server-Patches/0262-Implement-Expanded-ArmorStand-API.patch rename to Spigot-Server-Patches/0261-Implement-Expanded-ArmorStand-API.patch index 46045bd250..f305f31ce2 100644 --- a/Spigot-Server-Patches/0262-Implement-Expanded-ArmorStand-API.patch +++ b/Spigot-Server-Patches/0261-Implement-Expanded-ArmorStand-API.patch @@ -8,15 +8,15 @@ Add the following: - Enable/Disable slot interactions diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 992d7bfb0fd26540fbdeaf8d7845e8c2c81d608b..61d7d507aaac3e7e5a885387ae89c67dfb1c9844 100644 +index 0232ffba7b18174e0ce44d91285541a9869d07b9..a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -36,7 +36,7 @@ public class EntityArmorStand extends EntityLiving { private final NonNullList armorItems; private boolean armorStandInvisible; - public long bq; -- private int bB; -+ private int bB; public void setDisabledSlots(int i) { bB = i; } public int getDisabledSlots() { return bB; } // Paper - OBFHELPER + public long bp; +- private int bA; ++ private int bA; public void setDisabledSlots(int i) { bA = i; } public int getDisabledSlots() { return bA; } // Paper - OBFHELPER public Vector3f headPose; public Vector3f bodyPose; public Vector3f leftArmPose; @@ -26,7 +26,7 @@ index 992d7bfb0fd26540fbdeaf8d7845e8c2c81d608b..61d7d507aaac3e7e5a885387ae89c67d + public boolean isSlotDisabled(EnumItemSlot slot) { return this.d(slot); } // Paper - OBFHELPER private boolean d(EnumItemSlot enumitemslot) { - return (this.bB & 1 << enumitemslot.c()) != 0 || enumitemslot.a() == EnumItemSlot.Function.HAND && !this.hasArms(); + return (this.bA & 1 << enumitemslot.c()) != 0 || enumitemslot.a() == EnumItemSlot.Function.HAND && !this.hasArms(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index 124c3185bc5c344555f684629c8818130d80ab3d..d1d689e5d78c569313c4059c4652724605dc07d2 100644 diff --git a/Spigot-Server-Patches/0262-AnvilDamageEvent.patch b/Spigot-Server-Patches/0262-AnvilDamageEvent.patch new file mode 100644 index 0000000000..d8bc4d00aa --- /dev/null +++ b/Spigot-Server-Patches/0262-AnvilDamageEvent.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Fri, 20 Jul 2018 23:37:03 -0500 +Subject: [PATCH] AnvilDamageEvent + + +diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java +index 6b98557f59cb92db9987a58db58cfa3adbd6de48..24631b2bcb2a1d057c1fb6596ff401133c8b548a 100644 +--- a/src/main/java/net/minecraft/server/ContainerAnvil.java ++++ b/src/main/java/net/minecraft/server/ContainerAnvil.java +@@ -67,7 +67,16 @@ public class ContainerAnvil extends ContainerAnvilAbstract { + + if (!entityhuman.abilities.canInstantlyBuild && iblockdata.a((Tag) TagsBlock.ANVIL) && entityhuman.getRandom().nextFloat() < 0.12F) { + IBlockData iblockdata1 = BlockAnvil.c(iblockdata); +- ++ // Paper start ++ com.destroystokyo.paper.event.block.AnvilDamagedEvent event = new com.destroystokyo.paper.event.block.AnvilDamagedEvent(getBukkitView(), iblockdata1 != null ? org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(iblockdata1) : null); ++ if (!event.callEvent()) { ++ return; ++ } else if (event.getDamageState() == com.destroystokyo.paper.event.block.AnvilDamagedEvent.DamageState.BROKEN) { ++ iblockdata1 = null; ++ } else { ++ iblockdata1 = ((org.bukkit.craftbukkit.block.data.CraftBlockData) event.getDamageState().getMaterial().createBlockData()).getState().set(BlockAnvil.FACING, iblockdata.get(BlockAnvil.FACING)); ++ } ++ // Paper end + if (iblockdata1 == null) { + world.a(blockposition, false); + world.triggerEffect(1029, blockposition, 0); diff --git a/Spigot-Server-Patches/0264-Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch similarity index 85% rename from Spigot-Server-Patches/0264-Add-TNTPrimeEvent.patch rename to Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch index 10dd1a6d15..307b17b5b8 100644 --- a/Spigot-Server-Patches/0264-Add-TNTPrimeEvent.patch +++ b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index d32857c8724f97c7625208cf815c275264179209..b41de95a6390910ba8bb21bfa12ab61c85900218 100644 +index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf21750928302 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -15,17 +15,17 @@ index d32857c8724f97c7625208cf815c275264179209..b41de95a6390910ba8bb21bfa12ab61c +import com.destroystokyo.paper.event.block.TNTPrimeEvent; // Paper - TNTPrimeEvent import java.util.Map; import java.util.Random; - import java.util.Map.Entry; -@@ -237,7 +238,7 @@ public class BlockFire extends Block { - world.setTypeAndData(blockposition, (IBlockData) this.a((IBlockAccess) world, blockposition).set(BlockFire.AGE, l), 3); +@@ -249,7 +250,7 @@ public class BlockFire extends BlockFireAbstract { + + world.setTypeAndData(blockposition, this.a(world, blockposition, l), 3); } else { - world.a(blockposition, false); + if(iblockdata.getBlock() != Blocks.TNT) world.a(blockposition, false); // Paper - TNTPrimeEvent - We might be cancelling it below, move the setAir down } Block block = iblockdata.getBlock(); -@@ -245,6 +246,13 @@ public class BlockFire extends Block { +@@ -257,6 +258,13 @@ public class BlockFire extends BlockFireAbstract { if (block instanceof BlockTNT) { BlockTNT blocktnt = (BlockTNT) block; @@ -40,7 +40,7 @@ index d32857c8724f97c7625208cf815c275264179209..b41de95a6390910ba8bb21bfa12ab61c } } diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java -index 6cb82420b428fdc7bbcd4f22f1f65ba085a7f3c2..592fcd538a4e25d7779328d6d6cd8efda238b55d 100644 +index c6fe9c1f7ef06c4524533130b493ca5e72bd1693..7b601955f3fd36f06c838b896b455a606954d980 100644 --- a/src/main/java/net/minecraft/server/BlockTNT.java +++ b/src/main/java/net/minecraft/server/BlockTNT.java @@ -1,6 +1,7 @@ @@ -53,7 +53,7 @@ index 6cb82420b428fdc7bbcd4f22f1f65ba085a7f3c2..592fcd538a4e25d7779328d6d6cd8efd @@ -15,6 +16,11 @@ public class BlockTNT extends Block { public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { - if (iblockdata1.getBlock() != iblockdata.getBlock()) { + if (!iblockdata1.a(iblockdata.getBlock())) { if (world.isBlockIndirectlyPowered(blockposition)) { + // Paper start - TNTPrimeEvent + org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);; @@ -80,12 +80,12 @@ index 6cb82420b428fdc7bbcd4f22f1f65ba085a7f3c2..592fcd538a4e25d7779328d6d6cd8efd public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) { if (!world.isClientSide) { + // Paper start - TNTPrimeEvent -+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);; ++ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition); + org.bukkit.entity.Entity source = explosion.source != null ? explosion.source.getBukkitEntity() : null; + if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.EXPLOSION, source).callEvent()) + return; + // Paper end - EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); + EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, explosion.getSource()); entitytntprimed.setFuseTicks((short) (world.random.nextInt(entitytntprimed.getFuseTicks() / 4) + entitytntprimed.getFuseTicks() / 8)); @@ -71,6 +88,11 @@ public class BlockTNT extends Block { @@ -100,22 +100,22 @@ index 6cb82420b428fdc7bbcd4f22f1f65ba085a7f3c2..592fcd538a4e25d7779328d6d6cd8efd a(world, blockposition, (EntityLiving) entityhuman); world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 11); if (!entityhuman.isCreative()) { -@@ -101,6 +123,13 @@ public class BlockTNT extends Block { +@@ -100,6 +122,13 @@ public class BlockTNT extends Block { } // CraftBukkit end + // Paper start - TNTPrimeEvent + org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition); -+ if (!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.PROJECTILE, entityarrow.getBukkitEntity()).callEvent()) { ++ if (!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.PROJECTILE, iprojectile.getBukkitEntity()).callEvent()) { + return; + } + // Paper end + - a(world, blockposition, entity1 instanceof EntityLiving ? (EntityLiving) entity1 : null); + a(world, blockposition, entity instanceof EntityLiving ? (EntityLiving) entity : null); world.a(blockposition, false); } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 138e2ea56a91e519a34fd3be9c0ab111a4b17544..6a4ccaeb0fef2cabab87b33bf89b5a68608800e9 100644 +index 05b7cdb33b45a4f503cd7fe4130b54d59e7b6452..279807dc5045e765fe7496315494b2cb231d08f9 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -11,6 +11,7 @@ import org.bukkit.craftbukkit.block.CraftBlock; @@ -126,9 +126,9 @@ index 138e2ea56a91e519a34fd3be9c0ab111a4b17544..6a4ccaeb0fef2cabab87b33bf89b5a68 // PAIL: Fixme public class EntityEnderDragon extends EntityInsentient implements IMonster { -@@ -468,6 +469,11 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { +@@ -466,6 +467,11 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { }); - craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.a); + craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.b); } + // Paper start - TNTPrimeEvent + org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.x, blockposition.y, blockposition.z); diff --git a/Spigot-Server-Patches/0263-AnvilDamageEvent.patch b/Spigot-Server-Patches/0263-AnvilDamageEvent.patch deleted file mode 100644 index 80bbc3bcb4..0000000000 --- a/Spigot-Server-Patches/0263-AnvilDamageEvent.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath -Date: Fri, 20 Jul 2018 23:37:03 -0500 -Subject: [PATCH] AnvilDamageEvent - - -diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java -index 1d9ce5ef1cc0158e8218d4cf15bc1e84017e7620..286b930ddb7224fa3929cb0ef0b94f5f5205b104 100644 ---- a/src/main/java/net/minecraft/server/ContainerAnvil.java -+++ b/src/main/java/net/minecraft/server/ContainerAnvil.java -@@ -85,6 +85,16 @@ public class ContainerAnvil extends Container { - - if (!entityhuman.abilities.canInstantlyBuild && iblockdata.a(TagsBlock.ANVIL) && entityhuman.getRandom().nextFloat() < 0.12F) { - IBlockData iblockdata1 = BlockAnvil.e(iblockdata); -+ // Paper start -+ com.destroystokyo.paper.event.block.AnvilDamagedEvent event = new com.destroystokyo.paper.event.block.AnvilDamagedEvent(getBukkitView(), iblockdata1 != null ? org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(iblockdata1) : null); -+ if (!event.callEvent()) { -+ return; -+ } else if (event.getDamageState() == com.destroystokyo.paper.event.block.AnvilDamagedEvent.DamageState.BROKEN) { -+ iblockdata1 = null; -+ } else { -+ iblockdata1 = ((org.bukkit.craftbukkit.block.data.CraftBlockData) event.getDamageState().getMaterial().createBlockData()).getState().set(BlockAnvil.FACING, iblockdata.get(BlockAnvil.FACING)); -+ } -+ // Paper end - - if (iblockdata1 == null) { - world.a(blockposition, false); diff --git a/Spigot-Server-Patches/0265-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 95% rename from Spigot-Server-Patches/0265-Break-up-and-make-tab-spam-limits-configurable.patch rename to Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch index 4158686238..3f1bf012fe 100644 --- a/Spigot-Server-Patches/0265-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,7 +45,7 @@ index 26ab855dcf38446a3d8577108bd16fdbb76126b2..adef07d4d521b4aaa6f3389b04aa27e2 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a46ef5e72d03a32e22cfd77b2581de70edcc686a..e7ad580740bab3e102f32bd715c6b01a0e721e09 100644 +index 8855a1de14f970ddac25d935a4b2e00c7e277908..6884fcd0749eba2dc84f1447b338a879ff79f0c8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -56,7 +56,7 @@ index a46ef5e72d03a32e22cfd77b2581de70edcc686a..e7ad580740bab3e102f32bd715c6b01a // CraftBukkit end private int j; private final Int2ShortMap k = new Int2ShortOpenHashMap(); -@@ -207,6 +208,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -206,6 +207,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.minecraftServer.getMethodProfiler().exit(); // CraftBukkit start for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ; @@ -64,7 +64,7 @@ index a46ef5e72d03a32e22cfd77b2581de70edcc686a..e7ad580740bab3e102f32bd715c6b01a /* Use thread-safe field access instead if (this.chatThrottle > 0) { --this.chatThrottle; -@@ -526,7 +528,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -529,7 +531,7 @@ public class PlayerConnection implements PacketListenerPlayIn { public void a(PacketPlayInTabComplete packetplayintabcomplete) { // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async // CraftBukkit start diff --git a/Spigot-Server-Patches/0266-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch similarity index 50% rename from Spigot-Server-Patches/0266-Add-hand-to-bucket-events.patch rename to Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch index 2a6aeb13c4..1ee7ba868e 100644 --- a/Spigot-Server-Patches/0266-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch @@ -5,28 +5,28 @@ Subject: [PATCH] Add hand to bucket events diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java -index 6e385b53048da91a0f50bf02f6510de2a685baab..2c8bbf20ae7f9be2c57822833bb285b86ea1a901 100644 +index 28f97aea9c64678c6e6f821482ad47388af83089..30ee6df6b47c7cfa555a757a01270b986e4fdf9e 100644 --- a/src/main/java/net/minecraft/server/EntityCow.java +++ b/src/main/java/net/minecraft/server/EntityCow.java -@@ -61,7 +61,7 @@ public class EntityCow extends EntityAnimal { +@@ -58,7 +58,7 @@ public class EntityCow extends EntityAnimal { - if (itemstack.getItem() == Items.BUCKET && !entityhuman.abilities.canInstantlyBuild && !this.isBaby()) { + if (itemstack.getItem() == Items.BUCKET && !this.isBaby()) { // CraftBukkit start - Got milk? -- org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman.world, entityhuman, this.getChunkCoordinates(), this.getChunkCoordinates(), null, itemstack, Items.MILK_BUCKET); -+ org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman.world, entityhuman, this.getChunkCoordinates(), this.getChunkCoordinates(), null, itemstack, Items.MILK_BUCKET, enumhand); // Paper - add enumHand +- org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) entityhuman.world, entityhuman, this.getChunkCoordinates(), this.getChunkCoordinates(), null, itemstack, Items.MILK_BUCKET); ++ org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) entityhuman.world, entityhuman, this.getChunkCoordinates(), this.getChunkCoordinates(), null, itemstack, Items.MILK_BUCKET, enumhand); // Paper - add enumHand if (event.isCancelled()) { - return false; + return EnumInteractionResult.PASS; diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java -index 7c5c0498435e3fae6a7997e34f197d402daa3bd8..ffe4b9eb868ecd9582ba1d3fc3aef0f82372e852 100644 +index aada95b9d02d8ca0b870ec08875b5b719a543212..d68ee8d5dc5f8a75dc465f155acccb79c1ebe99c 100644 --- a/src/main/java/net/minecraft/server/ItemBucket.java +++ b/src/main/java/net/minecraft/server/ItemBucket.java @@ -41,7 +41,7 @@ public class ItemBucket extends Item { if (iblockdata.getBlock() instanceof IFluidSource) { // CraftBukkit start FluidType dummyFluid = ((IFluidSource) iblockdata.getBlock()).removeFluid(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); -- PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(world, entityhuman, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.a()); -+ PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(world, entityhuman, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.a(), enumhand); +- PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) world, entityhuman, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.a()); ++ PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) world, entityhuman, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.a(), enumhand); // Paper - add enumhand if (event.isCancelled()) { ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager) @@ -34,14 +34,14 @@ index 7c5c0498435e3fae6a7997e34f197d402daa3bd8..ffe4b9eb868ecd9582ba1d3fc3aef0f8 iblockdata = world.getType(blockposition); BlockPosition blockposition2 = iblockdata.getBlock() instanceof IFluidContainer && this.fluidType == FluidTypes.WATER ? blockposition : blockposition1; -- if (this.a(entityhuman, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack)) { // CraftBukkit -+ if (this.a(entityhuman, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack, enumhand)) { // CraftBukkit // Paper - add enumhand +- if (this.a(entityhuman, world, blockposition2, movingobjectpositionblock1, movingobjectpositionblock1.getDirection(), blockposition, itemstack)) { // CraftBukkit ++ if (this.a(entityhuman, world, blockposition2, movingobjectpositionblock1, movingobjectpositionblock1.getDirection(), blockposition, itemstack, enumhand)) { // CraftBukkit // Paper - add enumhand this.a(world, itemstack, blockposition2); if (entityhuman instanceof EntityPlayer) { CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition2, itemstack); -@@ -115,10 +115,12 @@ public class ItemBucket extends Item { +@@ -94,10 +94,12 @@ public class ItemBucket extends Item { + public void a(World world, ItemStack itemstack, BlockPosition blockposition) {} - // CraftBukkit start public boolean a(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPositionBlock movingobjectpositionblock) { - return a(entityhuman, world, blockposition, movingobjectpositionblock, null, null, null); + // Paper start - add enumHand @@ -54,28 +54,85 @@ index 7c5c0498435e3fae6a7997e34f197d402daa3bd8..ffe4b9eb868ecd9582ba1d3fc3aef0f8 // CraftBukkit end if (!(this.fluidType instanceof FluidTypeFlowing)) { return false; -@@ -128,11 +130,11 @@ public class ItemBucket extends Item { - boolean flag = iblockdata.a(this.fluidType); +@@ -110,7 +112,7 @@ public class ItemBucket extends Item { - if (!iblockdata.isAir() && !flag && (!(iblockdata.getBlock() instanceof IFluidContainer) || !((IFluidContainer) iblockdata.getBlock()).canPlace(world, blockposition, iblockdata, this.fluidType))) { -- return movingobjectpositionblock == null ? false : this.a(entityhuman, world, movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null, enumdirection, clicked, itemstack); // CraftBukkit -+ return movingobjectpositionblock == null ? false : this.a(entityhuman, world, movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit - } else { - // CraftBukkit start - if (entityhuman != null) { -- PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(world, entityhuman, blockposition, clicked, enumdirection, itemstack); -+ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(world, entityhuman, blockposition, clicked, enumdirection, itemstack, enumhand); - if (event.isCancelled()) { - ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity - ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 -diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index dccc187c6198ce2e8824b8460347586ccf5c6741..2e859c32b5a7d314e38221da75d785ff244224ad 100644 ---- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -381,6 +381,20 @@ public class CraftEventFactory { + // CraftBukkit start + if (flag1 && entityhuman != null) { +- PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent((WorldServer) world, entityhuman, blockposition, clicked, enumdirection, itemstack); ++ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent((WorldServer) world, entityhuman, blockposition, clicked, enumdirection, itemstack, enumhand); // Paper - add enumhand + if (event.isCancelled()) { + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity + ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index f6cb503b8eb329cb6bfaa960f812da3c99ce45a8..a47de606a82b840180bd203816955fb657cc7c6c 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -210,6 +210,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + } + // Paper end + ++ // Paper start - moved up from WorldServer ++ public BlockPosition getSpawn() { ++ BlockPosition blockposition = new BlockPosition(this.worldData.a(), this.worldData.b(), this.worldData.c()); ++ ++ if (!this.getWorldBorder().a(blockposition)) { ++ blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(this.getWorldBorder().getCenterX(), 0.0D, this.getWorldBorder().getCenterZ())); ++ } ++ ++ return blockposition; ++ } ++ // Paper end + @Override + 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 ba0bb12dd5c5068d31c8a925e31804ddf2cec5da..14ec04c6503cca58f64fc2a82a9fd715a06dcefb 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -1484,15 +1484,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { + this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition)); } - private static PlayerEvent getPlayerBucketEvent(boolean isFilling, World world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) { +- public BlockPosition getSpawn() { +- BlockPosition blockposition = new BlockPosition(this.worldData.a(), this.worldData.b(), this.worldData.c()); +- +- if (!this.getWorldBorder().a(blockposition)) { +- blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(this.getWorldBorder().getCenterX(), 0.0D, this.getWorldBorder().getCenterZ())); +- } +- +- return blockposition; +- } ++ // Paper - moved up to World ++ //public BlockPosition getSpawn() { ++ // BlockPosition blockposition = new BlockPosition(this.worldData.a(), this.worldData.b(), this.worldData.c()); ++ // ++ // if (!this.getWorldBorder().a(blockposition)) { ++ // blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(this.getWorldBorder().getCenterX(), 0.0D, this.getWorldBorder().getCenterZ())); ++ // } ++ // ++ // return blockposition; ++ //} ++ // Paper end + + public LongSet getForceLoadedChunks() { + ForcedChunk forcedchunk = (ForcedChunk) this.getWorldPersistentData().b(ForcedChunk::new, "chunks"); +diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +index a349ce7f04d6f2b29a0de534a3f7616778026666..46889e7b462673f5d03e6efc1114074da3165d47 100644 +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +@@ -220,7 +220,7 @@ public class CraftEventFactory { + public static Entity entityDamage; // For use in EntityDamageByEntityEvent + + // helper methods +- private static boolean canBuild(WorldServer world, Player player, int x, int z) { ++ private static boolean canBuild(World world, Player player, int x, int z) { + int spawnSize = Bukkit.getServer().getSpawnRadius(); + + if (world.getDimensionKey() != World.OVERWORLD) return true; +@@ -379,6 +379,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) { + // Paper start - add enumHand + return getPlayerBucketEvent(isFilling, world, who, changed, clicked, clickedFace, itemstack, item, null); + } @@ -93,7 +150,7 @@ index dccc187c6198ce2e8824b8460347586ccf5c6741..2e859c32b5a7d314e38221da75d785ff Player player = (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item); Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem()); -@@ -393,10 +407,10 @@ public class CraftEventFactory { +@@ -391,10 +405,10 @@ public class CraftEventFactory { PlayerEvent event; if (isFilling) { diff --git a/Spigot-Server-Patches/0267-MC-135506-Experience-should-save-as-Integers.patch b/Spigot-Server-Patches/0266-MC-135506-Experience-should-save-as-Integers.patch similarity index 76% rename from Spigot-Server-Patches/0267-MC-135506-Experience-should-save-as-Integers.patch rename to Spigot-Server-Patches/0266-MC-135506-Experience-should-save-as-Integers.patch index 7d74291ab1..d04dfa6a4b 100644 --- a/Spigot-Server-Patches/0267-MC-135506-Experience-should-save-as-Integers.patch +++ b/Spigot-Server-Patches/0266-MC-135506-Experience-should-save-as-Integers.patch @@ -5,11 +5,11 @@ Subject: [PATCH] MC-135506: Experience should save as Integers diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 87c6b77ce3b1446893a0d617b63f925a403e09cc..53c6c3389216c1fc5c0789b4a1621acb239cc9ec 100644 +index 7f2d8de12473c5413bbfc10ea0947d6a30802645..2396b4d6ffda648c24fc39cef22792c7d9247456 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -@@ -207,7 +207,7 @@ public class EntityExperienceOrb extends Entity { - public void b(NBTTagCompound nbttagcompound) { +@@ -202,7 +202,7 @@ public class EntityExperienceOrb extends Entity { + public void saveData(NBTTagCompound nbttagcompound) { nbttagcompound.setShort("Health", (short) this.e); nbttagcompound.setShort("Age", (short) this.c); - nbttagcompound.setShort("Value", (short) this.value); @@ -17,8 +17,8 @@ index 87c6b77ce3b1446893a0d617b63f925a403e09cc..53c6c3389216c1fc5c0789b4a1621acb this.savePaperNBT(nbttagcompound); // Paper } -@@ -215,7 +215,7 @@ public class EntityExperienceOrb extends Entity { - public void a(NBTTagCompound nbttagcompound) { +@@ -210,7 +210,7 @@ public class EntityExperienceOrb extends Entity { + public void loadData(NBTTagCompound nbttagcompound) { this.e = nbttagcompound.getShort("Health"); this.c = nbttagcompound.getShort("Age"); - this.value = nbttagcompound.getShort("Value"); diff --git a/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0267-Fix-client-rendering-skulls-from-same-user.patch similarity index 86% rename from Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch rename to Spigot-Server-Patches/0267-Fix-client-rendering-skulls-from-same-user.patch index 6d75986eeb..0cb0f59b6e 100644 --- a/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0267-Fix-client-rendering-skulls-from-same-user.patch @@ -12,24 +12,24 @@ This allows the client to render multiple skull textures from the same user, for when different skins were used when skull was made. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 641a52b968ef04a142b32703b61c8b75643b36a6..0b0c3c681c07cf8506df1b91b1feaf130891a440 100644 +index 7b2010ec4955fb5788c60178c6e306ea3098e9ba..95e801a9a7ca405ff7e80c920fa78493d0ef5374 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -54,7 +54,7 @@ public final class ItemStack { - // Paper end +@@ -60,7 +60,7 @@ public final class ItemStack { + private int g; @Deprecated private Item item; - private NBTTagCompound tag; + NBTTagCompound tag; // Paper -> package private - private boolean h; - private EntityItemFrame i; - private ShapeDetectorBlock j; + private boolean j; + private Entity k; + private ShapeDetectorBlock l; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index d9574a9ace96d8c5666e62a5aed96a67021b91d8..e810da87977b441cc329066e3cb158ef3bc62a66 100644 +index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..e3ba2e8db98c94ed10e96601addb0110a8385926 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java -@@ -250,9 +250,18 @@ public class PacketDataSerializer extends ByteBuf { - if (item.usesDurability() || item.o()) { +@@ -274,9 +274,18 @@ public class PacketDataSerializer extends ByteBuf { + if (item.usesDurability() || item.n()) { // Spigot start - filter itemstack = itemstack.cloneItemStack(); - CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); @@ -48,7 +48,7 @@ index d9574a9ace96d8c5666e62a5aed96a67021b91d8..e810da87977b441cc329066e3cb158ef } this.a(nbttagcompound); -@@ -272,7 +281,17 @@ public class PacketDataSerializer extends ByteBuf { +@@ -296,7 +305,17 @@ public class PacketDataSerializer extends ByteBuf { itemstack.setTag(this.l()); // CraftBukkit start if (itemstack.getTag() != null) { @@ -68,10 +68,10 @@ index d9574a9ace96d8c5666e62a5aed96a67021b91d8..e810da87977b441cc329066e3cb158ef // CraftBukkit end return itemstack; diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 3a1d0deb0dec880d73185690e2a7c769a2731479..1fcbbd698a7e1b9ae3e8b5fa0328b85c43019bea 100644 +index e336437207f9d6adbab69ef2785c129ff2ec1b36..72ff0a1e6428a1776f49c26e1715f5f2428ba242 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -58,6 +58,7 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -60,6 +60,7 @@ public class PacketPlayOutMapChunk implements Packet { if (this.f() || (i & 1 << j) != 0) { NBTTagCompound nbttagcompound = tileentity.b(); @@ -80,10 +80,10 @@ index 3a1d0deb0dec880d73185690e2a7c769a2731479..1fcbbd698a7e1b9ae3e8b5fa0328b85c this.g.add(nbttagcompound); } diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 83faa9dc5f74df4609cab34a66e4feed12990463..93030a7b24d53953b3672a23816dfc02d3c74caf 100644 +index 9a2efd38f28819355a271b9515ac98c3382c7383..fb7aa15c272678be7ec2a1d28891a62121695ed8 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java -@@ -142,9 +142,37 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa +@@ -145,9 +145,37 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa @Nullable @Override public PacketPlayOutTileEntityData getUpdatePacket() { diff --git a/Spigot-Server-Patches/0269-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 96% rename from Spigot-Server-Patches/0269-Add-Early-Warning-Feature-to-WatchDog.patch rename to Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch index 8f436a04a9..09a508e230 100644 --- a/Spigot-Server-Patches/0269-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,10 +36,10 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e7ee0e9b9b68f1fe31e189fbfd7e5b175a288a50..3b89f62ab0522d23f47fd59c2f06fa7d0eacb7af 100644 +index f5fa425308e4253d961f8f2bac5b961616dd8521..6a42e480940c4081622050c07961a2c56cfaa542 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -873,6 +873,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> { +@@ -12,6 +12,8 @@ import java.io.BufferedReader; + import java.io.BufferedWriter; + import java.io.File; + import java.io.IOException; ++import java.lang.reflect.ParameterizedType; // Paper ++import java.lang.reflect.Type; // Paper + import java.nio.charset.StandardCharsets; + import java.util.Collection; + import java.util.Iterator; +@@ -26,7 +28,22 @@ public abstract class JsonList> { protected static final Logger LOGGER = LogManager.getLogger(); - protected final Gson b; + private static final Gson b = (new GsonBuilder()).setPrettyPrinting().create(); private final File c; - private final Map d = Maps.newHashMap(); + // Paper - replace HashMap is ConcurrentHashMap + private final Map d = Maps.newConcurrentMap(); private final Map getBackingMap() { return this.d; } // Paper - OBFHELPER - private boolean e = true; - private static final ParameterizedType f = new ParameterizedType() { - public Type[] getActualTypeArguments() { -@@ -84,8 +85,13 @@ public class JsonList> { ++ private boolean e = true; ++ private static final ParameterizedType f = new ParameterizedType() { ++ public Type[] getActualTypeArguments() { ++ return new Type[]{JsonListEntry.class}; ++ } ++ ++ public Type getRawType() { ++ return List.class; ++ } ++ ++ public Type getOwnerType() { ++ return null; ++ } ++ }; + + public JsonList(File file) { + this.c = file; +@@ -49,8 +66,13 @@ public abstract class JsonList> { @Nullable public V get(K k0) { -- this.h(); +- this.g(); - return (V) this.d.get(this.a(k0)); // CraftBukkit - fix decompile error + // Paper start -+ // this.h(); ++ // this.g(); + // return (V) this.d.get(this.a(k0)); // CraftBukkit - fix decompile error + return (V) this.getBackingMap().computeIfPresent(this.getMappingKey(k0), (k, v) -> { + return v.hasExpired() ? null : v; @@ -54,7 +77,7 @@ index 734e7ecf630aa13a30d72ff96e57e5d0faf35013..8570e38f42e2f489e2899ac2f0c4a7b8 } public void remove(K k0) { -@@ -114,9 +120,11 @@ public class JsonList> { +@@ -79,9 +101,11 @@ public abstract class JsonList> { // CraftBukkit end public boolean isEmpty() { @@ -67,18 +90,18 @@ index 734e7ecf630aa13a30d72ff96e57e5d0faf35013..8570e38f42e2f489e2899ac2f0c4a7b8 protected String a(K k0) { return k0.toString(); } -@@ -125,8 +133,9 @@ public class JsonList> { +@@ -90,8 +114,9 @@ public abstract class JsonList> { return this.d.containsKey(this.a(k0)); } -+ private void removeStaleEntries() { h(); } // Paper - OBFHELPER - private void h() { ++ private void removeStaleEntries() { g(); } // Paper - OBFHELPER + private void g() { - List list = Lists.newArrayList(); + /*List list = Lists.newArrayList(); Iterator iterator = this.d.values().iterator(); while (iterator.hasNext()) { -@@ -143,8 +152,10 @@ public class JsonList> { +@@ -108,8 +133,10 @@ public abstract class JsonList> { K k0 = (K) iterator.next(); // CraftBukkit - decompile error this.d.remove(this.a(k0)); @@ -89,22 +112,22 @@ index 734e7ecf630aa13a30d72ff96e57e5d0faf35013..8570e38f42e2f489e2899ac2f0c4a7b8 + // Paper end } - protected JsonListEntry a(JsonObject jsonobject) { -@@ -156,6 +167,7 @@ public class JsonList> { + protected abstract JsonListEntry a(JsonObject jsonobject); +@@ -119,6 +146,7 @@ public abstract class JsonList> { } public void save() throws IOException { + this.removeStaleEntries(); // Paper - remove expired values before saving - Collection collection = this.d.values(); - String s = this.b.toJson(collection); - BufferedWriter bufferedwriter = null; + JsonArray jsonarray = new JsonArray(); + + this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 950afb131bbea53e46393fa19b0bfbb9d5c647f5..939cec9121c051c5459084e4078740a7607803f3 100644 +index ef1ea58c252d063ce282d244236a510655538a11..8c1d836538c678feca56076753e8781eadcd6d1d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -512,7 +512,7 @@ public abstract class PlayerList { - } else if (!this.isWhitelisted(gameprofile, event)) { // Paper - chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted", new Object[0]); +@@ -542,7 +542,7 @@ public abstract class PlayerList { + } else if (!this.isWhitelisted(gameprofile)) { + chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted - } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { + } else if (getIPBans().isBanned(socketaddress) && getIPBans().get(socketaddress) != null && !getIPBans().get(socketaddress).hasExpired()) { // Paper - fix NPE with temp ip bans diff --git a/Spigot-Server-Patches/0272-Use-a-Queue-for-Queueing-Commands.patch b/Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch similarity index 80% rename from Spigot-Server-Patches/0272-Use-a-Queue-for-Queueing-Commands.patch rename to Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch index bd5a8bbf6f..2eddd0e535 100644 --- a/Spigot-Server-Patches/0272-Use-a-Queue-for-Queueing-Commands.patch +++ b/Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch @@ -6,19 +6,19 @@ Subject: [PATCH] Use a Queue for Queueing Commands Lists are bad as Queues mmmkay. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index ec257ba31f012d3d3576bbff41326df13ede6776..349a0ea213f7f45e927d439985e121e8fa66c041 100644 +index f6544e4fb0eacce7f3579998e8ec0743b7f46c65..715063432bb3a18421f7ac00723f6695f8a56a8c 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -44,7 +44,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -38,7 +38,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer private static final Logger LOGGER = LogManager.getLogger(); - private static final Pattern i = Pattern.compile("^[a-fA-F0-9]{40}$"); + private static final Pattern k = Pattern.compile("^[a-fA-F0-9]{40}$"); - private final List serverCommandQueue = Collections.synchronizedList(Lists.newArrayList()); -+ private final java.util.Queue serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue(); // Paper - use a proper queue ++ private final java.util.Queue serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue<>(); // Paper - use a proper queue private RemoteStatusListener remoteStatusListener; public final RemoteControlCommandListener remoteControlCommandListener; private RemoteControlListener remoteControlListener; -@@ -454,8 +454,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -395,8 +395,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer public void handleCommandQueue() { MinecraftTimings.serverCommandTimer.startTiming(); // Spigot diff --git a/Spigot-Server-Patches/0273-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-Server-Patches/0272-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 85% rename from Spigot-Server-Patches/0273-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to Spigot-Server-Patches/0272-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index d5aa53b9a3..0d6ca14a7c 100644 --- a/Spigot-Server-Patches/0273-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/Spigot-Server-Patches/0272-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index a843c66dfa032d041e6df498746a66bd2cb4506e..a53bb7295c5d510f2976ff3787d68857548e11cc 100644 +index e34ecdeb21f262046fe5d4cf9f1d6ecd57d72ba9..2bd7d7959ce2845dbc09e198122e3574593dca58 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -126,9 +126,16 @@ public class CraftChunk implements Chunk { +@@ -128,9 +128,16 @@ public class CraftChunk implements Chunk { @Override public BlockState[] getTileEntities() { @@ -25,7 +25,7 @@ index a843c66dfa032d041e6df498746a66bd2cb4506e..a53bb7295c5d510f2976ff3787d68857 int index = 0; net.minecraft.server.Chunk chunk = getHandle(); -@@ -140,7 +147,7 @@ public class CraftChunk implements Chunk { +@@ -142,7 +149,7 @@ public class CraftChunk implements Chunk { } BlockPosition position = (BlockPosition) obj; diff --git a/Spigot-Server-Patches/0274-Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch similarity index 53% rename from Spigot-Server-Patches/0274-Allow-disabling-armour-stand-ticking.patch rename to Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch index 0ef295a7b3..b792c77dbf 100644 --- a/Spigot-Server-Patches/0274-Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch @@ -20,7 +20,7 @@ index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..bc3df01aab3e79be9c2836820e0eacc6 + } } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 61d7d507aaac3e7e5a885387ae89c67dfb1c9844..42b9a339e9c35db596ec78881c32c801c2d739f4 100644 +index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afdbd76b709 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -44,6 +44,12 @@ public class EntityArmorStand extends EntityLiving { @@ -37,11 +37,11 @@ index 61d7d507aaac3e7e5a885387ae89c67dfb1c9844..42b9a339e9c35db596ec78881c32c801 public EntityArmorStand(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -55,6 +61,7 @@ public class EntityArmorStand extends EntityLiving { - this.rightArmPose = EntityArmorStand.bu; - this.leftLegPose = EntityArmorStand.bv; - this.rightLegPose = EntityArmorStand.bw; + this.rightArmPose = EntityArmorStand.bt; + this.leftLegPose = EntityArmorStand.bu; + this.rightLegPose = EntityArmorStand.bv; + if (world != null) this.canTick = world.paperConfig.armorStandTick; // Paper - armour stand ticking - this.H = 0.0F; + this.G = 0.0F; } @@ -135,6 +142,7 @@ public class EntityArmorStand extends EntityLiving { @@ -136,125 +136,11 @@ index 61d7d507aaac3e7e5a885387ae89c67dfb1c9844..42b9a339e9c35db596ec78881c32c801 public void setRightLegPose(Vector3f vector3f) { this.rightLegPose = vector3f; - this.datawatcher.set(EntityArmorStand.bp, vector3f); + this.datawatcher.set(EntityArmorStand.bo, vector3f); + this.noTickPoseDirty = true; // Paper - Allow updates when not ticking } public Vector3f r() { -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d604728db71d4e61a11fb1ccb7f02b6f6b914a51..0c3a776e207d84943fd90482a650d0c74b5ca65d 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2329,52 +2329,7 @@ public abstract class EntityLiving extends Entity { - } - } - -- EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); -- int k = aenumitemslot.length; -- -- for (int l = 0; l < k; ++l) { -- EnumItemSlot enumitemslot = aenumitemslot[l]; -- ItemStack itemstack; -- -- switch (enumitemslot.a()) { -- case HAND: -- itemstack = (ItemStack) this.bu.get(enumitemslot.b()); -- break; -- case ARMOR: -- itemstack = (ItemStack) this.bv.get(enumitemslot.b()); -- break; -- default: -- continue; -- } -- -- ItemStack itemstack1 = this.getEquipment(enumitemslot); -- -- if (!ItemStack.matches(itemstack1, itemstack)) { -- // Paper start - PlayerArmorChangeEvent -- if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { -- final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); -- final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); -- new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); -- } -- // Paper end -- ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); -- if (!itemstack.isEmpty()) { -- this.getAttributeMap().a(itemstack.a(enumitemslot)); -- } -- -- if (!itemstack1.isEmpty()) { -- this.getAttributeMap().b(itemstack1.a(enumitemslot)); -- } -- -- switch (enumitemslot.a()) { -- case HAND: -- this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); -- break; -- case ARMOR: -- this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); -- } -- } -- } -+ updateEntityEquipment(); // Paper - split into own method - - if (this.ticksLived % 20 == 0) { - this.getCombatTracker().g(); -@@ -2475,6 +2430,55 @@ public abstract class EntityLiving extends Entity { - } - } - -+ // Paper start - split into own method from above -+ public void updateEntityEquipment() { -+ EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); -+ int k = aenumitemslot.length; -+ for (int l = 0; l < k; ++l) { -+ EnumItemSlot enumitemslot = aenumitemslot[l]; -+ ItemStack itemstack; -+ -+ switch (enumitemslot.a()) { -+ case HAND: -+ itemstack = (ItemStack) this.bu.get(enumitemslot.b()); -+ break; -+ case ARMOR: -+ itemstack = (ItemStack) this.bv.get(enumitemslot.b()); -+ break; -+ default: -+ continue; -+ } -+ -+ ItemStack itemstack1 = this.getEquipment(enumitemslot); -+ -+ if (!ItemStack.matches(itemstack1, itemstack)) { -+ // Paper start - PlayerArmorChangeEvent -+ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { -+ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); -+ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); -+ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); -+ } -+ // Paper end -+ ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); -+ if (!itemstack.isEmpty()) { -+ this.getAttributeMap().a(itemstack.a(enumitemslot)); -+ } -+ -+ if (!itemstack1.isEmpty()) { -+ this.getAttributeMap().b(itemstack1.a(enumitemslot)); -+ } -+ -+ switch (enumitemslot.a()) { -+ case HAND: -+ this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); -+ break; -+ case ARMOR: -+ this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); -+ } -+ } -+ } -+ } -+ - protected float f(float f, float f1) { - float f2 = MathHelper.g(f - this.aI); - diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index d1d689e5d78c569313c4059c4652724605dc07d2..ac105270d5c7e2070f52782fc7dbdcd381db33a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java diff --git a/Spigot-Server-Patches/0275-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch similarity index 95% rename from Spigot-Server-Patches/0275-Optimize-BlockPosition-helper-methods.patch rename to Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch index f54af3c8cc..03a4bea330 100644 --- a/Spigot-Server-Patches/0275-Optimize-BlockPosition-helper-methods.patch +++ b/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize BlockPosition helper methods Resolves #1338 diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index ec0e8f970dba64561afd6477a5df2821d9a8889a..a3a376e35eaf17b128048bd26a22eef713e7d535 100644 +index b25b84d017ee610d8f006536fdfa63e840474a9b..37570a3bbb9a36133d012350eca1685cca68c73b 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -135,57 +135,74 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -113,57 +113,74 @@ public class BlockPosition extends BaseBlockPosition { } public BlockPosition up() { diff --git a/Spigot-Server-Patches/0277-Restore-vanlla-default-mob-spawn-range.patch b/Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch similarity index 88% rename from Spigot-Server-Patches/0277-Restore-vanlla-default-mob-spawn-range.patch rename to Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch index 85bd7774f6..85e9776191 100644 --- a/Spigot-Server-Patches/0277-Restore-vanlla-default-mob-spawn-range.patch +++ b/Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Restore vanlla default mob-spawn-range diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 98ed975a6241395b6119d5b3a62d24329aa1f05b..37ef07338e0e7ebb778b4446c8e7a630f597c7be 100644 +index 5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a..f0ad5fa235adfd165b8e56be7352568a3b3ae54a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -165,7 +165,7 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0279-Fix-MC-124320.patch b/Spigot-Server-Patches/0276-Fix-MC-124320.patch similarity index 80% rename from Spigot-Server-Patches/0279-Fix-MC-124320.patch rename to Spigot-Server-Patches/0276-Fix-MC-124320.patch index 58b2720629..7e383aa390 100644 --- a/Spigot-Server-Patches/0279-Fix-MC-124320.patch +++ b/Spigot-Server-Patches/0276-Fix-MC-124320.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Fix MC-124320 diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 5f261b9b92de4ca8638f41fa2947016cf590cf05..b9b750c3695699520c736d57cbd88c8d52254c7a 100644 +index 247d9300a755aa22c2ca3bcef86b3b25f3ed75ee..bbd2e1be0f401d7e267dcfa2c905f42c2a475dd7 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -170,6 +170,7 @@ public class Block implements IMaterial { - return tag.isTagged(this); +@@ -93,6 +93,7 @@ public class Block extends BlockBase implements IMaterial { + return this == block; } + public static IBlockData getValidBlockForPosition(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) { return Block.b(iblockdata, generatoraccess, blockposition); } // Paper - OBFHELPER @@ -17,11 +17,11 @@ index 5f261b9b92de4ca8638f41fa2947016cf590cf05..b9b750c3695699520c736d57cbd88c8d IBlockData iblockdata1 = iblockdata; BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index b7c67f0cdb3d02c7a2dbe85f9a432836cb34bb6e..d86f76f30be54767d0243df716fe743e24db6726 100644 +index 7c13e5b711706c8aaa363d80350597a52920f12b..8da3b10cd6db379cf5d9d667154dd8911813284b 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -354,8 +354,9 @@ public class EntityEnderman extends EntityMonster { - if (block.a(TagsBlock.ENDERMAN_HOLDABLE) && flag) { +@@ -391,8 +391,9 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { + if (block.a((Tag) TagsBlock.ENDERMAN_HOLDABLE) && flag) { // CraftBukkit start - Pickup event if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { - this.enderman.setCarried(iblockdata); @@ -31,7 +31,7 @@ index b7c67f0cdb3d02c7a2dbe85f9a432836cb34bb6e..d86f76f30be54767d0243df716fe743e } // CraftBukkit end } -@@ -365,6 +366,7 @@ public class EntityEnderman extends EntityMonster { +@@ -402,6 +403,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { static class PathfinderGoalEndermanPlaceBlock extends PathfinderGoal { @@ -39,7 +39,7 @@ index b7c67f0cdb3d02c7a2dbe85f9a432836cb34bb6e..d86f76f30be54767d0243df716fe743e private final EntityEnderman a; public PathfinderGoalEndermanPlaceBlock(EntityEnderman entityenderman) { -@@ -387,7 +389,7 @@ public class EntityEnderman extends EntityMonster { +@@ -424,7 +426,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { IBlockData iblockdata = world.getType(blockposition); BlockPosition blockposition1 = blockposition.down(); IBlockData iblockdata1 = world.getType(blockposition1); diff --git a/Spigot-Server-Patches/0280-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch similarity index 84% rename from Spigot-Server-Patches/0280-Slime-Pathfinder-Events.patch rename to Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch index dac983bd17..ba88f01bb1 100644 --- a/Spigot-Server-Patches/0280-Slime-Pathfinder-Events.patch +++ b/Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Slime Pathfinder Events diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd6b217d6d 100644 +index 9c83389c56083d9febf604bf30da47c89330902e..a4642cc7390b08580d00689a853d59e3e1ef6496 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -3,6 +3,14 @@ package net.minecraft.server; @@ -23,18 +23,18 @@ index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd // CraftBukkit start import java.util.ArrayList; import java.util.List; -@@ -71,6 +79,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { - super.b(nbttagcompound); +@@ -65,6 +73,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { + super.saveData(nbttagcompound); nbttagcompound.setInt("Size", this.getSize() - 1); - nbttagcompound.setBoolean("wasOnGround", this.bx); + nbttagcompound.setBoolean("wasOnGround", this.bw); + nbttagcompound.setBoolean("Paper.canWander", this.canWander); // Paper } @Override -@@ -84,6 +93,11 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -78,6 +87,11 @@ public class EntitySlime extends EntityInsentient implements IMonster { this.setSize(i + 1, false); - super.a(nbttagcompound); - this.bx = nbttagcompound.getBoolean("wasOnGround"); + super.loadData(nbttagcompound); + this.bw = nbttagcompound.getBoolean("wasOnGround"); + // Paper start - check exists before loading or this will be loaded as false + if (nbttagcompound.hasKey("Paper.canWander")) { + this.canWander = nbttagcompound.getBoolean("Paper.canWander"); @@ -42,8 +42,8 @@ index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd + // Paper end } - public boolean ev() { -@@ -357,7 +371,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { + public boolean eR() { +@@ -358,7 +372,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { @Override public boolean a() { @@ -52,21 +52,21 @@ index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd } @Override -@@ -378,7 +392,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -379,7 +393,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { @Override public boolean a() { -- return (this.a.isInWater() || this.a.aH()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; -+ return (this.a.isInWater() || this.a.aH()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper +- return (this.a.isInWater() || this.a.aN()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; ++ return (this.a.isInWater() || this.a.aN()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper } @Override -@@ -404,14 +418,18 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -405,14 +419,18 @@ public class EntitySlime extends EntityInsentient implements IMonster { @Override public boolean a() { -- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aH() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; -+ return this.a.canWander && this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aH() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; +- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aN() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; ++ return this.a.canWander && this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aN() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; } @Override @@ -82,7 +82,7 @@ index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd } ((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.b, false); -@@ -432,7 +450,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -433,7 +451,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { public boolean a() { EntityLiving entityliving = this.a.getGoalTarget(); @@ -99,7 +99,7 @@ index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd } @Override -@@ -445,7 +471,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -446,7 +472,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { public boolean b() { EntityLiving entityliving = this.a.getGoalTarget(); @@ -116,9 +116,9 @@ index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd } @Override -@@ -453,6 +487,13 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -454,6 +488,13 @@ public class EntitySlime extends EntityInsentient implements IMonster { this.a.a((Entity) this.a.getGoalTarget(), 10.0F, 10.0F); - ((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.eq()); + ((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.eM()); } + + // Paper start - clear timer and target when goal resets @@ -130,7 +130,7 @@ index 3ecf732192f7f1bd20b9d766bedef08e64434fda..2efc18df945bcaa6eba59f561733b9fd } static class ControllerMoveSlime extends ControllerMove { -@@ -511,4 +552,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -512,4 +553,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { } } } diff --git a/Spigot-Server-Patches/0281-Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch similarity index 89% rename from Spigot-Server-Patches/0281-Configurable-speed-for-water-flowing-over-lava.patch rename to Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch index 78b5705a11..32045df15b 100644 --- a/Spigot-Server-Patches/0281-Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch @@ -20,14 +20,14 @@ index bc3df01aab3e79be9c2836820e0eacc69ea6c1f4..487b0d5cd608e84a793eba5fdbd50a9f + } } diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java -index f56e14e1e2fd974e409a324572c2d17e1533da41..6d351f0979ecfa8e500edf8dd03b4a455fd5d180 100644 +index f00b403e1e12acbb8eb6ad55da219b257219a8f4..a28ac8b00b22a8c7afc2b64f9720a4e32b653e5f 100644 --- a/src/main/java/net/minecraft/server/BlockFluids.java +++ b/src/main/java/net/minecraft/server/BlockFluids.java -@@ -70,11 +70,28 @@ public class BlockFluids extends Block implements IFluidSource { +@@ -76,11 +76,28 @@ public class BlockFluids extends Block implements IFluidSource { @Override public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { if (this.a(world, blockposition, iblockdata)) { -- world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.a((IWorldReader) world)); +- world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.b.a((IWorldReader) world)); + world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.getFlowSpeed(world, blockposition)); // Paper } @@ -45,7 +45,7 @@ index f56e14e1e2fd974e409a324572c2d17e1533da41..6d351f0979ecfa8e500edf8dd03b4a45 + return world.paperConfig.waterOverLavaFlowSpeed; + } + } -+ return this.a(world); ++ return this.b.a(world); + } + // Paper end + @@ -53,11 +53,11 @@ index f56e14e1e2fd974e409a324572c2d17e1533da41..6d351f0979ecfa8e500edf8dd03b4a45 @Override public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { if (iblockdata.getFluid().isSource() || iblockdata1.getFluid().isSource()) { -@@ -87,7 +104,7 @@ public class BlockFluids extends Block implements IFluidSource { +@@ -93,7 +110,7 @@ public class BlockFluids extends Block implements IFluidSource { @Override public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) { if (this.a(world, blockposition, iblockdata)) { -- world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.a((IWorldReader) world)); +- world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.b.a((IWorldReader) world)); + world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.getFlowSpeed(world, blockposition)); // Paper } diff --git a/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch b/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch deleted file mode 100644 index 7bda590b2c..0000000000 --- a/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: miclebrick -Date: Thu, 23 Aug 2018 11:45:32 -0400 -Subject: [PATCH] Optimize CraftBlockData Creation - -Avoids a hashmap lookup by cacheing a reference to the CraftBlockData -and cloning it when one is needed. - -diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index c5fddef030489bff0de9e0efb4f11c83bcfee628..cca2bf1045c1305a9defa5241909b50711b85d4c 100644 ---- a/src/main/java/net/minecraft/server/IBlockData.java -+++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableMap; - import com.mojang.datafixers.Dynamic; - import com.mojang.datafixers.types.DynamicOps; - import com.mojang.datafixers.util.Pair; -+import org.bukkit.craftbukkit.block.data.CraftBlockData; -+ - import java.util.Arrays; - import java.util.Iterator; - import java.util.List; -@@ -38,6 +40,15 @@ public class IBlockData extends BlockDataAbstract implements - return (Block) this.a; - } - -+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time -+ private CraftBlockData cachedCraftBlockData; -+ -+ public CraftBlockData createCraftBlockData() { -+ if(cachedCraftBlockData == null) cachedCraftBlockData = CraftBlockData.createData(this); -+ return (CraftBlockData) cachedCraftBlockData.clone(); -+ } -+ // Paper end -+ - public Material getMaterial() { - return this.getBlock().k(this); - } -diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 683b17a0c9f09d90c2fc30aad6516b4d01d2f34f..a0746a1694a01996eab44a91b078ba14996f3d13 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -549,7 +549,17 @@ public class CraftBlockData implements BlockData { - return craft; - } - -+ // Paper start - optimize creating BlockData to not need a map lookup -+ static { -+ // Initialize cached data for all IBlockData instances after registration -+ Block.REGISTRY_ID.iterator().forEachRemaining(IBlockData::createCraftBlockData); -+ } - public static CraftBlockData fromData(IBlockData data) { -+ return data.createCraftBlockData(); -+ } -+ -+ public static CraftBlockData createData(IBlockData data) { -+ // Paper end - return MAP.getOrDefault(data.getBlock().getClass(), CraftBlockData::new).apply(data); - } - } diff --git a/Spigot-Server-Patches/0282-Optimize-RegistryMaterials.patch b/Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch similarity index 53% rename from Spigot-Server-Patches/0282-Optimize-RegistryMaterials.patch rename to Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch index 78841bbe8b..4b245994fa 100644 --- a/Spigot-Server-Patches/0282-Optimize-RegistryMaterials.patch +++ b/Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch @@ -8,25 +8,37 @@ Use larger initial sizes to increase bucket capacity on the BiMap BiMap.get was seen to be using a good bit of CPU time. diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java -index 2d6a7b3a47895a32903eaf132eb44820c2623c4c..8477febca23b575da21023b4d7c18bb679cf3b30 100644 +index c60140a283df47edf23fe4f54a2c1d2fca7593f8..7189204ee57343b3381e8c83eb5a5281a0e0962f 100644 --- a/src/main/java/net/minecraft/server/RegistryMaterials.java +++ b/src/main/java/net/minecraft/server/RegistryMaterials.java -@@ -16,8 +16,8 @@ import org.apache.logging.log4j.Logger; +@@ -25,9 +25,9 @@ import org.apache.logging.log4j.Logger; public class RegistryMaterials extends IRegistryWritable { protected static final Logger LOGGER = LogManager.getLogger(); - protected final RegistryID b = new RegistryID<>(256); - protected final BiMap c = HashBiMap.create(); +- private final BiMap, T> bb = HashBiMap.create(); + protected final RegistryID b = new RegistryID<>(2048); // Paper - use bigger expected size to reduce collisions + protected final BiMap c = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions ++ private final BiMap, T> bb = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions + private final Set> bc = Sets.newIdentityHashSet(); protected Object[] d; - private int V; - -@@ -101,6 +101,6 @@ public class RegistryMaterials extends IRegistryWritable { + private int bd; +@@ -124,7 +124,7 @@ public class RegistryMaterials extends IRegistryWritable { this.d = collection.toArray(new Object[collection.size()]); } -- return this.d[random.nextInt(this.d.length)]; -+ return (T) this.d[random.nextInt(this.d.length)]; // Paper - Decompile fix +- return SystemUtils.a(this.d, random); ++ return (T) SystemUtils.a(this.d, random); // Paper - Decompile fix } - } + + @Override +@@ -164,7 +164,7 @@ public class RegistryMaterials extends IRegistryWritable { + Iterator iterator = registrymaterials.b.iterator(); + + while (iterator.hasNext()) { +- T t0 = iterator.next(); ++ T t0 = (T) iterator.next(); // Paper - Decompile fix + + builder.add(Pair.of(registrymaterials.c(t0).get(), t0)); + } diff --git a/Spigot-Server-Patches/0283-Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/0280-Add-PhantomPreSpawnEvent.patch similarity index 90% rename from Spigot-Server-Patches/0283-Add-PhantomPreSpawnEvent.patch rename to Spigot-Server-Patches/0280-Add-PhantomPreSpawnEvent.patch index 7598814be8..1fa24c5c4d 100644 --- a/Spigot-Server-Patches/0283-Add-PhantomPreSpawnEvent.patch +++ b/Spigot-Server-Patches/0280-Add-PhantomPreSpawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PhantomPreSpawnEvent diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index b62a8227b264b768f6ed5d1ef191b68c604e18a5..82323bf4acc140d279c399cc64fa393a0db90136 100644 +index 457be7b726ccfdd7723a8eb5da69af96abc86870..47d82722e15c5b91a86af1a09807ccc37a1b37be 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java -@@ -130,6 +130,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -125,6 +125,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { } this.setSize(nbttagcompound.getInt("Size")); @@ -20,7 +20,7 @@ index b62a8227b264b768f6ed5d1ef191b68c604e18a5..82323bf4acc140d279c399cc64fa393a } @Override -@@ -139,6 +144,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -134,6 +139,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { nbttagcompound.setInt("AY", this.d.getY()); nbttagcompound.setInt("AZ", this.d.getZ()); nbttagcompound.setInt("Size", this.getSize()); @@ -32,7 +32,7 @@ index b62a8227b264b768f6ed5d1ef191b68c604e18a5..82323bf4acc140d279c399cc64fa393a } @Override -@@ -185,6 +195,14 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -180,6 +190,14 @@ public class EntityPhantom extends EntityFlying implements IMonster { return entitysize.a(f); } @@ -48,10 +48,10 @@ index b62a8227b264b768f6ed5d1ef191b68c604e18a5..82323bf4acc140d279c399cc64fa393a private final PathfinderTargetCondition b; diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java -index add566ea4f476e0c4750c0f9a1080a99ea74e5d1..f488c22ed64a9fa1ce7746942b2a9ff4bc296703 100644 +index c1ea64e2a474d58139a217d271c44f219b9ef0b6..39c5350373f6a5ad30f41e8886573d6b315924c6 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java +++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java -@@ -52,8 +52,17 @@ public class MobSpawnerPhantom { +@@ -53,8 +53,17 @@ public class MobSpawnerPhantom implements MobSpawner { int k = 1 + random.nextInt(difficultydamagescaler.a().a() + 1); for (int l = 0; l < k; ++l) { diff --git a/Spigot-Server-Patches/0284-Add-More-Creeper-API.patch b/Spigot-Server-Patches/0281-Add-More-Creeper-API.patch similarity index 92% rename from Spigot-Server-Patches/0284-Add-More-Creeper-API.patch rename to Spigot-Server-Patches/0281-Add-More-Creeper-API.patch index 018f0f8a28..e6f7752c89 100644 --- a/Spigot-Server-Patches/0284-Add-More-Creeper-API.patch +++ b/Spigot-Server-Patches/0281-Add-More-Creeper-API.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Add More Creeper API diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index b89530079751c13894527f21572cc37e3a5548b8..45dfc8104a75f9893c6ee03d507cac80b893249c 100644 +index e4c1a7c152b2c1202c77e5d5d1c386d84007bc97..5e7f3af37b7cb068183fc2a7637b4c770fd5f936 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -14,7 +14,7 @@ public class EntityCreeper extends EntityMonster { private static final DataWatcherObject POWERED = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); private static final DataWatcherObject d = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); private static final DataWatcherObject isIgnitedDW = d; // Paper OBFHELPER - private int bw; + private int bv; - private int fuseTicks; + public int fuseTicks; // Paper - public public int maxFuseTicks = 30; public int explosionRadius = 3; - private int bA; -@@ -256,7 +256,18 @@ public class EntityCreeper extends EntityMonster { + private int bz; +@@ -254,7 +254,18 @@ public class EntityCreeper extends EntityMonster { } public void ignite() { diff --git a/Spigot-Server-Patches/0285-Inventory-removeItemAnySlot.patch b/Spigot-Server-Patches/0282-Inventory-removeItemAnySlot.patch similarity index 96% rename from Spigot-Server-Patches/0285-Inventory-removeItemAnySlot.patch rename to Spigot-Server-Patches/0282-Inventory-removeItemAnySlot.patch index 7abcfeaa9a..7950dac2d1 100644 --- a/Spigot-Server-Patches/0285-Inventory-removeItemAnySlot.patch +++ b/Spigot-Server-Patches/0282-Inventory-removeItemAnySlot.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Inventory#removeItemAnySlot diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index acc2a57ff295aa56a0fd47339299489d0617ddc7..47827fbf1b80f88ffff8a252df10d70758c68703 100644 +index 98aea6b2917faa73ac2f1a070545449a4a195cf2..a04213325b8266623b076f1233539512a0a0207f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -223,10 +223,16 @@ public class CraftInventory implements Inventory { diff --git a/Spigot-Server-Patches/0286-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 87% rename from Spigot-Server-Patches/0286-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index ee5898d3ec..4bf53b3ebc 100644 --- a/Spigot-Server-Patches/0286-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ad951812835b1fa786e964c533efc4547c57b7a2..4e7b11af047c267ce87549e0ba178d7223c03b63 100644 +index 411d7a3f7d4d54fbf748888e24f2032c4d091250..e446bd936dd198b227e483cf8e234a73035daa76 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -499,7 +499,7 @@ public class CraftWorld implements World { +@@ -500,7 +500,7 @@ public class CraftWorld implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/Spigot-Server-Patches/0287-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 92% rename from Spigot-Server-Patches/0287-Add-ray-tracing-methods-to-LivingEntity.patch rename to Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch index 07fcc4eab0..51df1d92fa 100644 --- a/Spigot-Server-Patches/0287-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 0c3a776e207d84943fd90482a650d0c74b5ca65d..516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6 100644 +index 3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927..4f80c46e327006a3d9028ca25db8554fba7b57ea 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3258,6 +3258,23 @@ public abstract class EntityLiving extends Entity { +@@ -3436,6 +3436,23 @@ public abstract class EntityLiving extends Entity { this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND); } // Paper start @@ -33,10 +33,10 @@ index 0c3a776e207d84943fd90482a650d0c74b5ca65d..516631b4f4b8d7a9dd5d9d558d199f71 public int getShieldBlockingDelay() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 3a87c6574bbad9e6c2d7573eb447194c931d7ec4..9e082d4514eb57667cb50a390bef7ab72b94e838 100644 +index bbe6188f50dd3c456dec5c3239bdcffbfceb3589..2e7bacff55f57fda8b5644fb9d7934a615e5f550 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -196,6 +196,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -199,6 +199,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return blocks.get(0); } diff --git a/Spigot-Server-Patches/0288-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch similarity index 65% rename from Spigot-Server-Patches/0288-Expose-attack-cooldown-methods-for-Player.patch rename to Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index cae32fafa1..11bffc82a9 100644 --- a/Spigot-Server-Patches/0288-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch @@ -5,32 +5,32 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 684978be7ccc401b71b0594828a7783b209a5210..f41975165a6a66479bc8fc1811c1d271bb2a6113 100644 +index 1f3e5c384a66bb0767cc18bdbe99b942f30faa55..0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -2123,14 +2123,17 @@ public abstract class EntityHuman extends EntityLiving { - this.datawatcher.set(EntityHuman.bt, nbttagcompound); +@@ -2006,14 +2006,17 @@ public abstract class EntityHuman extends EntityLiving { + this.datawatcher.set(EntityHuman.bs, nbttagcompound); } -+ public float getCooldownPeriod() { return this.ex(); } // Paper - OBFHELPER - public float ex() { - return (float) (1.0D / this.getAttributeInstance(GenericAttributes.ATTACK_SPEED).getValue() * 20.0D); ++ public float getCooldownPeriod() { return this.eR(); } // Paper - OBFHELPER + public float eR() { + return (float) (1.0D / this.b(GenericAttributes.ATTACK_SPEED) * 20.0D); } -+ public float getCooledAttackStrength(float adjustTicks) { return s(adjustTicks); } // Paper - OBFHELPER - public float s(float f) { - return MathHelper.a(((float) this.aB + f) / this.ex(), 0.0F, 1.0F); ++ public float getCooledAttackStrength(float adjustTicks) { return getAttackCooldown(adjustTicks); } // Paper - OBFHELPER + public float getAttackCooldown(float f) { + return MathHelper.a(((float) this.aA + f) / this.eR(), 0.0F, 1.0F); } + public void resetCooldown() { this.ey(); } // Paper - OBFHELPER - public void ey() { - this.aB = 0; + public void resetAttackCooldown() { + this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 368f786300573ff24a8dc46d96a6fb6bac26b35a..fefe3b67ae62daedeb214d53d0c1f9d806356792 100644 +index 5575c44d6f427661de1fec2c69932b446284c54d..3ec69b90b5e49407fc986741f189b6ea108a2118 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1904,6 +1904,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1944,6 +1944,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } diff --git a/Spigot-Server-Patches/0289-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch similarity index 82% rename from Spigot-Server-Patches/0289-Improve-death-events.patch rename to Spigot-Server-Patches/0286-Improve-death-events.patch index a6a830704f..61b9e06d3c 100644 --- a/Spigot-Server-Patches/0289-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -15,10 +15,10 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java -index 6daa400d277bdaa441bf5719a273eacbe64feff9..38fe29f8a290550d1e5fa5451aadaf0f28cc4034 100644 +index 6281f7900afab3ef1c9ba3c034b91cbfa1900f50..3c2f8407906879c8dca07b538f59f4bbd31b278f 100644 --- a/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java -@@ -175,6 +175,7 @@ public class CombatTracker { +@@ -192,6 +192,7 @@ public class CombatTracker { this.h = null; } @@ -27,27 +27,27 @@ index 6daa400d277bdaa441bf5719a273eacbe64feff9..38fe29f8a290550d1e5fa5451aadaf0f 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 6e87ff52df30f4de8cfb11d1dbfb71211d656831..0f74ec89b3e85c918c95f9d8fef6d68403ed1107 100644 +index 9163916e6f600f2efa3e05f3df1d07ef9b60cd3a..698619c25714d6bb296084298de4f2e39f8f9c63 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1504,6 +1504,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return false; +@@ -1461,6 +1461,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } + // CraftBukkit end + public void runKillTrigger(Entity entity, int kills, DamageSource damageSource) { this.a(entity, kills, damageSource); } // Paper - OBFHELPER public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -2419,6 +2420,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2344,6 +2345,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance = 0.0F; } -+ public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER - public void b(EntityLiving entityliving) {} ++ public void onKill(EntityLiving entityLiving) { this.a_(entityLiving); } // Paper - OBFHELPER + public void a_(EntityLiving entityliving) {} protected void k(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 42b9a339e9c35db596ec78881c32c801c2d739f4..8ad131e4fc20efc61b938a5f6ab64379da23bf0d 100644 +index d5c09152acc93b25d626284071599afdbd76b709..51e9f4a6e09474a7489d2872a800308ee3f02e46 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -701,7 +701,8 @@ public class EntityArmorStand extends EntityLiving { @@ -61,10 +61,10 @@ index 42b9a339e9c35db596ec78881c32c801c2d739f4..8ad131e4fc20efc61b938a5f6ab64379 } diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java -index 2be6c7bde9597d6d6d0c9ad63665b9aa74c74964..82a32d5dbf162b8c67c701d0c9647ddca103ddef 100644 +index 95874526516291607a44ae2213d4d6d65edfe18d..e6275a9fe6cd988fe4661966fd48149c3e73408c 100644 --- a/src/main/java/net/minecraft/server/EntityFox.java +++ b/src/main/java/net/minecraft/server/EntityFox.java -@@ -571,15 +571,25 @@ public class EntityFox extends EntityAnimal { +@@ -576,15 +576,25 @@ public class EntityFox extends EntityAnimal { } @Override @@ -85,7 +85,7 @@ index 2be6c7bde9597d6d6d0c9ad63665b9aa74c74964..82a32d5dbf162b8c67c701d0c9647ddc if (!itemstack.isEmpty()) { this.a(itemstack); - this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a); + this.setSlot(EnumItemSlot.MAINHAND, ItemStack.b); } - super.d(damagesource); @@ -94,10 +94,10 @@ index 2be6c7bde9597d6d6d0c9ad63665b9aa74c74964..82a32d5dbf162b8c67c701d0c9647ddc public static boolean a(EntityFox entityfox, EntityLiving entityliving) { diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java -index 80717ad9ac3d45fb2d25fac4fa1b61446aebd453..53aac5bccd2b1a36941a6744bbeece6a2f724cda 100644 +index c2a3bd8f25e91f79723074d93f6a646a8ce76d8c..4934e71225fe1242615660a379e797e212040ed3 100644 --- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java -@@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract { +@@ -50,11 +50,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract { this.a((IMaterial) Blocks.CHEST); } @@ -116,42 +116,42 @@ index 80717ad9ac3d45fb2d25fac4fa1b61446aebd453..53aac5bccd2b1a36941a6744bbeece6a + // Paper end + @Override - public void b(NBTTagCompound nbttagcompound) { - super.b(nbttagcompound); + public void saveData(NBTTagCompound nbttagcompound) { + super.saveData(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f005d8daac6 100644 +index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7e429d1b0 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -89,7 +89,7 @@ public abstract class EntityLiving extends Entity { +@@ -95,7 +95,7 @@ public abstract class EntityLiving extends Entity { + protected float aS; protected float aT; protected float aU; - protected float aV; -- protected int aW; -+ protected int aW; protected int getKillCount() { return this.aW; } // Paper - OBFHELPER +- protected int aV; ++ protected int aV; protected int getKillCount() { return this.aV; } // Paper - OBFHELPER public float lastDamage; protected boolean jumping; - public float aZ; -@@ -131,6 +131,7 @@ public abstract class EntityLiving extends Entity { - public boolean collides = true; + public float aY; +@@ -139,6 +139,7 @@ public abstract class EntityLiving extends Entity { + public Set collidableExemptions = new HashSet<>(); public boolean canPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper + public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event @Override public float getBukkitYaw() { -@@ -1139,13 +1140,17 @@ public abstract class EntityLiving extends Entity { - - if (this.getHealth() <= 0.0F) { +@@ -1248,13 +1249,17 @@ public abstract class EntityLiving extends Entity { + if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback + if (this.dk()) { if (!this.f(damagesource)) { - SoundEffect soundeffect = this.getSoundDeath(); + // Paper start - moved into CraftEventFactory event caller for cancellable death event + //SoundEffect soundeffect = this.getSoundDeath(); - if (flag1 && soundeffect != null) { -- this.a(soundeffect, this.getSoundVolume(), this.dn()); +- this.playSound(soundeffect, this.getSoundVolume(), this.dG()); - } +// if (flag1 && soundeffect != null) { -+// this.a(soundeffect, this.getSoundVolume(), this.dn()); ++// this.playSound(soundeffect, this.getSoundVolume(), this.dG()); +// } + this.silentDeath = !flag1; // mark entity as dying silently + // Paper end @@ -161,15 +161,15 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 } } else if (flag1) { this.c(damagesource); -@@ -1283,6 +1288,7 @@ public abstract class EntityLiving extends Entity { +@@ -1392,6 +1397,7 @@ public abstract class EntityLiving extends Entity { Entity entity = damagesource.getEntity(); EntityLiving entityliving = this.getKillingEntity(); + /* // Paper - move down to make death event cancellable - if (this.aW >= 0 && entityliving != null) { - entityliving.a(this, this.aW, damagesource); + if (this.aV >= 0 && entityliving != null) { + entityliving.a(this, this.aV, damagesource); } -@@ -1294,16 +1300,36 @@ public abstract class EntityLiving extends Entity { +@@ -1403,16 +1409,36 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.entityWakeup(); } @@ -177,7 +177,7 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 this.killed = true; - this.getCombatTracker().g(); -+ //this.getCombatTracker().g(); ++ //this.getCombatTracker().g(); // Paper if (!this.world.isClientSide) { - this.d(damagesource); + org.bukkit.event.entity.EntityDeathEvent deathEvent = this.d(damagesource); @@ -198,7 +198,7 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 + } + // Paper end + - this.f(entityliving); + this.g(entityliving); } + if (this.killed) { // Paper @@ -208,16 +208,16 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 } } -@@ -1311,7 +1337,7 @@ public abstract class EntityLiving extends Entity { +@@ -1420,7 +1446,7 @@ public abstract class EntityLiving extends Entity { if (!this.world.isClientSide) { boolean flag = false; - if (entityliving instanceof EntityWither) { + if (this.killed && entityliving instanceof EntityWither) { // Paper if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { - BlockPosition blockposition = new BlockPosition(this); + BlockPosition blockposition = this.getChunkCoordinates(); IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); -@@ -1332,7 +1358,8 @@ public abstract class EntityLiving extends Entity { +@@ -1441,7 +1467,8 @@ public abstract class EntityLiving extends Entity { } } @@ -227,12 +227,12 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 Entity entity = damagesource.getEntity(); int i; -@@ -1345,22 +1372,26 @@ public abstract class EntityLiving extends Entity { +@@ -1454,22 +1481,26 @@ public abstract class EntityLiving extends Entity { boolean flag = this.lastDamageByPlayerTime > 0; this.dropInventory(); // CraftBukkit - from below + org.bukkit.event.entity.EntityDeathEvent deathEvent; // Paper - if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { + if (this.cV() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { this.a(damagesource, flag); this.dropDeathLoot(damagesource, i, flag); // CraftBukkit start - Call death event @@ -257,7 +257,7 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 // CraftBukkit start public int getExpReward() { -@@ -1439,6 +1470,7 @@ public abstract class EntityLiving extends Entity { +@@ -1549,6 +1580,7 @@ public abstract class EntityLiving extends Entity { return SoundEffects.ENTITY_GENERIC_HURT; } @@ -265,7 +265,7 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 @Nullable protected SoundEffect getSoundDeath() { return SoundEffects.ENTITY_GENERIC_DEATH; -@@ -1924,10 +1956,12 @@ public abstract class EntityLiving extends Entity { +@@ -2068,10 +2100,12 @@ public abstract class EntityLiving extends Entity { } @@ -274,15 +274,15 @@ index 516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6..8ac03288dc328ccd4ec7ef9080b61f00 return 1.0F; } -+ public float getSoundPitch() { return dn();} // Paper - OBFHELPER - protected float dn() { ++ public float getSoundPitch() { return dG();} // Paper - OBFHELPER + protected float dG() { return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f35d23340665ab323732915efc0c0ad7fe4d964d..f43584f0e31a1c3d0e9b4356b7021cd79226d8b5 100644 +index dc99c7730e72e1a52219fbe0b3b039899899f49d..7a0391dc2861d604f1f3acc53eb9e1134c33c64f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -76,6 +76,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -80,6 +80,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int ping; public boolean viewingCredits; private int containerUpdateDelay; // Paper @@ -293,7 +293,7 @@ index f35d23340665ab323732915efc0c0ad7fe4d964d..f43584f0e31a1c3d0e9b4356b7021cd7 // CraftBukkit start public String displayName; -@@ -539,6 +543,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -582,6 +586,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { String deathmessage = defaultMessage.getString(); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); @@ -309,7 +309,7 @@ index f35d23340665ab323732915efc0c0ad7fe4d964d..f43584f0e31a1c3d0e9b4356b7021cd7 // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { -@@ -677,8 +690,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -733,8 +746,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } @@ -330,10 +330,10 @@ index f35d23340665ab323732915efc0c0ad7fe4d964d..f43584f0e31a1c3d0e9b4356b7021cd7 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -index 90fdf89c811620d3c26486cd55c8cdb14ce9654c..b761a41dcd899b6556f07d3b835ce7e56da3cfbb 100644 +index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e3a88f515 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -@@ -821,6 +821,22 @@ public enum CraftSound { +@@ -996,6 +996,22 @@ public enum CraftSound { WEATHER_RAIN_ABOVE("weather.rain.above"); private final String minecraftKey; @@ -357,10 +357,10 @@ index 90fdf89c811620d3c26486cd55c8cdb14ce9654c..b761a41dcd899b6556f07d3b835ce7e5 this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fefe3b67ae62daedeb214d53d0c1f9d806356792..5445554b18c22b85cf9b3427c22d693a24bc596b 100644 +index 3ec69b90b5e49407fc986741f189b6ea108a2118..e112a87792a76ccbc25caa1253c54db601de76aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1697,7 +1697,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1738,7 +1738,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -376,12 +376,12 @@ index fefe3b67ae62daedeb214d53d0c1f9d806356792..5445554b18c22b85cf9b3427c22d693a + // Paper end } - public void injectScaledMaxHealth(Collection collection, boolean force) { + 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 2e859c32b5a7d314e38221da75d785ff244224ad..6ea8650d23b9fa8826142f0de3556db14c301f61 100644 +index 46889e7b462673f5d03e6efc1114074da3165d47..3ba376b077bde759ac62ca1641962598637edd59 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -757,9 +757,16 @@ public class CraftEventFactory { +@@ -755,9 +755,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()); @@ -398,7 +398,7 @@ index 2e859c32b5a7d314e38221da75d785ff244224ad..6ea8650d23b9fa8826142f0de3556db1 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -775,8 +782,15 @@ public class CraftEventFactory { +@@ -773,8 +780,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -414,7 +414,7 @@ index 2e859c32b5a7d314e38221da75d785ff244224ad..6ea8650d23b9fa8826142f0de3556db1 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -793,6 +807,31 @@ public class CraftEventFactory { +@@ -791,6 +805,31 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0290-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 85% rename from Spigot-Server-Patches/0290-Allow-chests-to-be-placed-with-NBT-data.patch rename to Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch index 84600cf4ed..230ef63e3b 100644 --- a/Spigot-Server-Patches/0290-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 0b0c3c681c07cf8506df1b91b1feaf130891a440..d953cdef14a9b62833a35a4fe94a22b5e9b19c2d 100644 +index 95e801a9a7ca405ff7e80c920fa78493d0ef5374..a075a41d954836864a5186b383e967a9ac262df8 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -240,6 +240,7 @@ public final class ItemStack { +@@ -244,6 +244,7 @@ public final class ItemStack { enuminteractionresult = EnumInteractionResult.FAIL; // cancel placement // PAIL: Remove this when MC-99075 fixed placeEvent.getPlayer().updateInventory(); @@ -17,7 +17,7 @@ index 0b0c3c681c07cf8506df1b91b1feaf130891a440..d953cdef14a9b62833a35a4fe94a22b5 for (BlockState blockstate : blocks) { blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index eb2b6ff8fd86233c434882c69a8890adc9861d4b..9a5f2da8c073f9b249edac98b0990615a9efb0e2 100644 +index cc15686573f3a54ff0145b3486679b772157d191..aaa40c8a8013806f41f15fcc4682e1ca4d44e956 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -292,7 +292,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic diff --git a/Spigot-Server-Patches/0291-Mob-Pathfinding-API.patch b/Spigot-Server-Patches/0288-Mob-Pathfinding-API.patch similarity index 90% rename from Spigot-Server-Patches/0291-Mob-Pathfinding-API.patch rename to Spigot-Server-Patches/0288-Mob-Pathfinding-API.patch index 23c2b858be..6f0d89713c 100644 --- a/Spigot-Server-Patches/0291-Mob-Pathfinding-API.patch +++ b/Spigot-Server-Patches/0288-Mob-Pathfinding-API.patch @@ -153,10 +153,10 @@ index 0000000000000000000000000000000000000000..af1bac9680028130e99c5e7130f258c1 + } +} diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index bdd092e49da13960cd8a65e989a351d65cb620f7..f06764973feaa29ccbb4731b65372c544dcf3032 100644 +index b06c76a369f1dc9de8d782272c3ff0573af89361..cca6242e38fc286eea810eb8f2e4d1ab5429b9df 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -80,7 +80,7 @@ public abstract class NavigationAbstract { +@@ -78,7 +78,7 @@ public abstract class NavigationAbstract { } @Nullable @@ -165,16 +165,16 @@ index bdd092e49da13960cd8a65e989a351d65cb620f7..f06764973feaa29ccbb4731b65372c54 return this.a(new BlockPosition(d0, d1, d2), i); } -@@ -100,7 +100,7 @@ public abstract class NavigationAbstract { +@@ -103,7 +103,7 @@ public abstract class NavigationAbstract { } @Nullable - public PathEntity a(Entity entity, int i) { + public final PathEntity calculateDestination(Entity entity) { return a(entity, 0); } public PathEntity a(Entity entity, int i) { - return this.a(ImmutableSet.of(new BlockPosition(entity)), entity, 16, true, i); // Paper + return this.a(ImmutableSet.of(entity.getChunkCoordinates()), entity, 16, true, i); // Paper } -@@ -164,6 +164,7 @@ public abstract class NavigationAbstract { +@@ -168,6 +168,7 @@ public abstract class NavigationAbstract { return pathentity != null && this.a(pathentity, d0); } @@ -182,7 +182,7 @@ index bdd092e49da13960cd8a65e989a351d65cb620f7..f06764973feaa29ccbb4731b65372c54 public boolean a(@Nullable PathEntity pathentity, double d0) { if (pathentity == null) { this.c = null; -@@ -191,7 +192,7 @@ public abstract class NavigationAbstract { +@@ -195,7 +196,7 @@ public abstract class NavigationAbstract { } } @@ -191,7 +191,7 @@ index bdd092e49da13960cd8a65e989a351d65cb620f7..f06764973feaa29ccbb4731b65372c54 public PathEntity k() { return this.c; } -@@ -281,6 +282,7 @@ public abstract class NavigationAbstract { +@@ -311,6 +312,7 @@ public abstract class NavigationAbstract { return !this.m(); } @@ -200,7 +200,7 @@ index bdd092e49da13960cd8a65e989a351d65cb620f7..f06764973feaa29ccbb4731b65372c54 this.c = null; } diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java -index 312352ef848e20c210b1d32e3c362f94d78e2cca..dcb4e250803b8605f9bfb6d590c4e316dfee97d1 100644 +index 662932360bc7a9391fde99a88b60aac47f29467e..9154c01a22bc7b6d2dd390bb7b6e21ef52c8006c 100644 --- a/src/main/java/net/minecraft/server/PathEntity.java +++ b/src/main/java/net/minecraft/server/PathEntity.java @@ -5,13 +5,14 @@ import javax.annotation.Nullable; @@ -234,13 +234,13 @@ index 312352ef848e20c210b1d32e3c362f94d78e2cca..dcb4e250803b8605f9bfb6d590c4e316 return this.a(entity, this.e); } -- public Vec3D g() { -+ public Vec3D getNext() { return g(); } public Vec3D g() { // Paper - OBFHELPER - PathPoint pathpoint = (PathPoint) this.a.get(this.e); +- public BaseBlockPosition g() { ++ public BaseBlockPosition getNext() { return g(); } public BaseBlockPosition g() { // Paper - OBFHELPER + PathPoint pathpoint = this.h(); - return new Vec3D((double) pathpoint.a, (double) pathpoint.b, (double) pathpoint.c); + return new BaseBlockPosition(pathpoint.a, pathpoint.b, pathpoint.c); diff --git a/src/main/java/net/minecraft/server/PathPoint.java b/src/main/java/net/minecraft/server/PathPoint.java -index b1db95daa976f61da07a37ec1787ef49785e016a..18cdd2a6f290bf1f00db58efdb9a42f81c8e109b 100644 +index b69d6bc433711e94e3fbfa2a89c091209c95484d..e9fb295bdf727cd4543cbe5a18447ceba3d41ee0 100644 --- a/src/main/java/net/minecraft/server/PathPoint.java +++ b/src/main/java/net/minecraft/server/PathPoint.java @@ -2,9 +2,9 @@ package net.minecraft.server; @@ -257,7 +257,7 @@ index b1db95daa976f61da07a37ec1787ef49785e016a..18cdd2a6f290bf1f00db58efdb9a42f8 public int d = -1; public float e; diff --git a/src/main/java/net/minecraft/server/PathfinderAbstract.java b/src/main/java/net/minecraft/server/PathfinderAbstract.java -index af3b09f59a38020c1a45403526fca81c1da144d5..477b762e9c0c51cb3f387f70ba7ec9d35dc04132 100644 +index fca9ed99d6c11badb85e0c06cd6872dca85d6f8d..5cfcac3bc29e3f3d139b10209f5082cba292a434 100644 --- a/src/main/java/net/minecraft/server/PathfinderAbstract.java +++ b/src/main/java/net/minecraft/server/PathfinderAbstract.java @@ -11,9 +11,9 @@ public abstract class PathfinderAbstract { diff --git a/Spigot-Server-Patches/0292-Prevent-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/0289-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 92% rename from Spigot-Server-Patches/0292-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to Spigot-Server-Patches/0289-Prevent-chunk-loading-from-Fluid-Flowing.patch index 6aad0026a5..d90ae0901c 100644 --- a/Spigot-Server-Patches/0292-Prevent-chunk-loading-from-Fluid-Flowing.patch +++ b/Spigot-Server-Patches/0289-Prevent-chunk-loading-from-Fluid-Flowing.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent chunk loading from Fluid Flowing diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java -index 3099a5e654d343fba1a61d6be3477df0866feb47..376dca1889f1eca4ce9993e0e067a94eb293103d 100644 +index 663731a5e7ad3990d1ffac3e0a3028dba37f2b07..d72a88e9275eb00eed35b6467538a46e5cee32d5 100644 --- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java +++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java -@@ -178,7 +178,8 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -154,7 +154,8 @@ public abstract class FluidTypeFlowing extends FluidType { EnumDirection enumdirection = (EnumDirection) entry.getKey(); Fluid fluid1 = (Fluid) entry.getValue(); BlockPosition blockposition1 = blockposition.shift(enumdirection); @@ -18,7 +18,7 @@ index 3099a5e654d343fba1a61d6be3477df0866feb47..376dca1889f1eca4ce9993e0e067a94e if (this.a(generatoraccess, blockposition, iblockdata, enumdirection, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.getType())) { // CraftBukkit start -@@ -205,7 +206,8 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -181,7 +182,8 @@ public abstract class FluidTypeFlowing extends FluidType { while (iterator.hasNext()) { EnumDirection enumdirection = (EnumDirection) iterator.next(); BlockPosition blockposition1 = blockposition.shift(enumdirection); @@ -28,7 +28,7 @@ index 3099a5e654d343fba1a61d6be3477df0866feb47..376dca1889f1eca4ce9993e0e067a94e Fluid fluid = iblockdata1.getFluid(); if (fluid.getType().a((FluidType) this) && this.a(enumdirection, (IBlockAccess) iworldreader, blockposition, iblockdata, blockposition1, iblockdata1)) { -@@ -322,11 +324,18 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -298,11 +300,18 @@ public abstract class FluidTypeFlowing extends FluidType { if (enumdirection1 != enumdirection) { BlockPosition blockposition2 = blockposition.shift(enumdirection1); short short0 = a(blockposition1, blockposition2); @@ -51,7 +51,7 @@ index 3099a5e654d343fba1a61d6be3477df0866feb47..376dca1889f1eca4ce9993e0e067a94e IBlockData iblockdata1 = (IBlockData) pair.getFirst(); Fluid fluid = (Fluid) pair.getSecond(); -@@ -398,11 +407,16 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -374,11 +383,16 @@ public abstract class FluidTypeFlowing extends FluidType { EnumDirection enumdirection = (EnumDirection) iterator.next(); BlockPosition blockposition1 = blockposition.shift(enumdirection); short short0 = a(blockposition, blockposition1); diff --git a/Spigot-Server-Patches/0293-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 93% rename from Spigot-Server-Patches/0293-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index e4b9c71829..badd4ad964 100644 --- a/Spigot-Server-Patches/0293-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java -index 005ebec266032dd873cc2e7d8919d9bd018457f7..97d85f8451a7a6cd17ac272492da52c55161789d 100644 +index b986a8e318733bdae766202bef93d4d25f18b58d..1f74602ff13a9f89c8dc40170353a79a41085649 100644 --- a/src/main/java/net/minecraft/server/ArgumentBlock.java +++ b/src/main/java/net/minecraft/server/ArgumentBlock.java -@@ -43,7 +43,7 @@ public class ArgumentBlock { +@@ -45,7 +45,7 @@ public class ArgumentBlock { private final boolean j; private final Map, Comparable> k = Maps.newLinkedHashMap(); // CraftBukkit - stable private final Map l = Maps.newHashMap(); @@ -17,7 +17,7 @@ index 005ebec266032dd873cc2e7d8919d9bd018457f7..97d85f8451a7a6cd17ac272492da52c5 private BlockStateList n; private IBlockData o; @Nullable -@@ -72,11 +72,13 @@ public class ArgumentBlock { +@@ -74,11 +74,13 @@ public class ArgumentBlock { return this.p; } @@ -32,10 +32,10 @@ index 005ebec266032dd873cc2e7d8919d9bd018457f7..97d85f8451a7a6cd17ac272492da52c5 this.s = this::l; if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad818679473e20382f 100644 +index e5a2779a0460500c7d58f97c605549a366b5f0ce..7e0cdc3a1dde2c2e9cf5a9a80bc42010c6695f9e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -86,6 +86,12 @@ import org.bukkit.persistence.PersistentDataContainer; +@@ -85,6 +85,12 @@ import org.bukkit.persistence.PersistentDataContainer; import static org.spigotmc.ValidateUtils.*; // Spigot end @@ -48,7 +48,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 /** * Children must include the following: * -@@ -267,6 +273,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -266,6 +272,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Specific(Specific.To.NBT) static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag"); static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues"); @@ -59,7 +59,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 private IChatBaseComponent displayName; private IChatBaseComponent locName; -@@ -279,6 +289,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -278,6 +288,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private int hideFlag; private boolean unbreakable; private int damage; @@ -70,7 +70,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 private static final Set HANDLED_TAGS = Sets.newHashSet(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); -@@ -316,6 +330,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -315,6 +329,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.hideFlag = meta.hideFlag; this.unbreakable = meta.unbreakable; this.damage = meta.damage; @@ -86,7 +86,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 this.unhandledTags.putAll(meta.unhandledTags); this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); -@@ -392,6 +415,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -391,6 +414,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { persistentDataContainer.put(key, compound.get(key)); } } @@ -118,7 +118,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 Set keys = tag.getKeys(); for (String key : keys) { -@@ -529,6 +577,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -528,6 +576,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { setDamage(damage); } @@ -153,7 +153,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 String internal = SerializableMeta.getString(map, "internal", true); if (internal != null) { ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal)); -@@ -657,6 +733,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -656,6 +732,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (hasDamage()) { itemTag.setInt(DAMAGE.NBT, damage); } @@ -177,7 +177,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 for (Map.Entry e : unhandledTags.entrySet()) { itemTag.set(e.getKey(), e.getValue()); -@@ -673,6 +766,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -672,6 +765,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -199,7 +199,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 NBTTagList createStringList(List list) { if (list == null || list.isEmpty()) { return null; -@@ -756,7 +864,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -755,7 +863,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -208,7 +208,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 } @Override -@@ -1156,7 +1264,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1155,7 +1263,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hideFlag == that.hideFlag) && (this.isUnbreakable() == that.isUnbreakable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) @@ -221,7 +221,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 } /** -@@ -1191,6 +1303,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1190,6 +1302,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (hasDamage() ? this.damage : 0); hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); hash = 61 * hash + version; @@ -232,7 +232,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 return hash; } -@@ -1215,6 +1331,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1214,6 +1330,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.unbreakable = this.unbreakable; clone.damage = this.damage; clone.version = this.version; @@ -247,7 +247,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1272,6 +1396,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1271,6 +1395,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { builder.put(DAMAGE.BUKKIT, damage); } @@ -272,7 +272,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 final Map internalTags = new HashMap(unhandledTags); serializeInternal(internalTags); if (!internalTags.isEmpty()) { -@@ -1435,7 +1577,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1434,7 +1576,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaArmorStand.NO_BASE_PLATE.NBT, CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SMALL.NBT, @@ -283,7 +283,7 @@ index b87d2581754fde163a7b5532b9d5e21b48d3e243..706f1bd66c79dddc26794cad81867947 // Paper end )); } -@@ -1460,4 +1604,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1459,4 +1603,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } // Paper end diff --git a/Spigot-Server-Patches/0294-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 78% rename from Spigot-Server-Patches/0294-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to Spigot-Server-Patches/0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index 175b21d02a..147617e735 100644 --- a/Spigot-Server-Patches/0294-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java -index bf8ca9b32aa8d7d797c430cbb98466ae9dcf738f..7ccb3d5c065d39b3a859d87a8462b6542fe40f3b 100644 +index ed29186791ac615c7d23ef8e7b8aea6a3ab8222d..29efbdd2ca77833e6be59e5b5b4c38633e43588d 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java @@ -12,11 +12,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget { @@ -26,10 +26,10 @@ index bf8ca9b32aa8d7d797c430cbb98466ae9dcf738f..7ccb3d5c065d39b3a859d87a8462b654 @Nullable private BlockPosition a(BlockPosition blockposition, IBlockAccess iblockaccess) { -- if (iblockaccess.getType(blockposition).getBlock() == this.g) { +- if (iblockaccess.getType(blockposition).a(this.g)) { + Block block = world.getBlockIfLoaded(blockposition); // Paper + if (block == null) return null; // Paper -+ if (block == this.g) { // Paper ++ if (block.a(this.g)) { // Paper return blockposition; } else { BlockPosition[] ablockposition = new BlockPosition[]{blockposition.down(), blockposition.west(), blockposition.east(), blockposition.north(), blockposition.south(), blockposition.down().down()}; @@ -37,8 +37,8 @@ index bf8ca9b32aa8d7d797c430cbb98466ae9dcf738f..7ccb3d5c065d39b3a859d87a8462b654 for (int j = 0; j < i; ++j) { BlockPosition blockposition1 = ablockposition1[j]; -- if (iblockaccess.getType(blockposition1).getBlock() == this.g) { -+ if (world.getBlockIfLoaded(blockposition1) == this.g) { // Paper +- if (iblockaccess.getType(blockposition1).a(this.g)) { ++ if (iblockaccess.getBlockIfLoaded(blockposition1).a(this.g)) { // Paper return blockposition1; } } @@ -49,13 +49,13 @@ index bf8ca9b32aa8d7d797c430cbb98466ae9dcf738f..7ccb3d5c065d39b3a859d87a8462b654 - IChunkAccess ichunkaccess = iworldreader.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4, ChunkStatus.FULL, false); + IChunkAccess ichunkaccess = iworldreader.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4); // Paper - return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).getBlock() == this.g && ichunkaccess.getType(blockposition.up()).isAir() && ichunkaccess.getType(blockposition.up(2)).isAir(); + return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a(this.g) && ichunkaccess.getType(blockposition.up()).isAir() && ichunkaccess.getType(blockposition.up(2)).isAir(); } diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -index d4cd50918b63e4ff503536fabb9d60b880473d23..d6a3b993394b34ddebc55a952d09df490884558d 100644 +index 39b08086d111f614286675fd4a993da12cf24ccc..dc89c707b10c5544eca06a634a625bce0dd778f0 100644 --- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java +++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -@@ -109,6 +109,7 @@ public class RandomPositionGenerator { +@@ -116,6 +116,7 @@ public class RandomPositionGenerator { } blockposition2 = new BlockPosition((double) k1 + entitycreature.locX(), (double) l1 + entitycreature.locY(), (double) i2 + entitycreature.locZ()); @@ -63,13 +63,13 @@ index d4cd50918b63e4ff503536fabb9d60b880473d23..d6a3b993394b34ddebc55a952d09df49 if (blockposition2.getY() >= 0 && blockposition2.getY() <= entitycreature.world.getBuildHeight() && (!flag3 || entitycreature.a(blockposition2)) && (!flag2 || navigationabstract.a(blockposition2))) { if (flag1) { blockposition2 = a(blockposition2, random.nextInt(l + 1) + i1, entitycreature.world.getBuildHeight(), (blockposition3) -> { -@@ -116,7 +117,8 @@ public class RandomPositionGenerator { +@@ -123,7 +124,8 @@ public class RandomPositionGenerator { }); } -- if (flag || !entitycreature.world.getFluid(blockposition2).a(TagsFluid.WATER)) { +- if (flag || !entitycreature.world.getFluid(blockposition2).a((Tag) TagsFluid.WATER)) { + Fluid fluid = entitycreature.world.getFluidIfLoaded(blockposition2); // Paper -+ if (flag || (fluid != null && !fluid.a(TagsFluid.WATER))) { // Paper - PathType pathtype = PathfinderNormal.b(entitycreature.world, blockposition2.getX(), blockposition2.getY(), blockposition2.getZ()); ++ if (flag || (fluid != null && !fluid.a((Tag) TagsFluid.WATER))) { // Paper + PathType pathtype = PathfinderNormal.a((IBlockAccess) entitycreature.world, blockposition2.i()); if (entitycreature.a(pathtype) == 0.0F) { diff --git a/Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch new file mode 100644 index 0000000000..f504111a10 --- /dev/null +++ b/Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 12 Sep 2018 21:12:57 -0400 +Subject: [PATCH] Prevent mob spawning from loading/generating chunks + +also prevents if out of world border bounds + +diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java +index 4b1a5e92cc05df06edd6d2d7eab5ca70b70ede79..32d45b54fc4e67555a7f016ac72787a8ad4818f3 100644 +--- a/src/main/java/net/minecraft/server/SpawnerCreature.java ++++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +@@ -139,9 +139,9 @@ public final class SpawnerCreature { + StructureManager structuremanager = worldserver.getStructureManager(); + ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); + int i = blockposition.getY(); +- IBlockData iblockdata = ichunkaccess.getType(blockposition); ++ IBlockData iblockdata = worldserver.getTypeIfLoadedAndInBounds(blockposition); // Paper - don't load chunks for mob spawn + +- if (!iblockdata.isOccluding(ichunkaccess, blockposition)) { ++ if (iblockdata != null && !iblockdata.isOccluding(ichunkaccess, blockposition)) { // Paper - don't load chunks for mob spawn + BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); + int j = 0; + int k = 0; +@@ -170,7 +170,7 @@ public final class SpawnerCreature { + if (entityhuman != null) { + double d2 = entityhuman.g(d0, (double) i, d1); + +- if (a(worldserver, ichunkaccess, blockposition_mutableblockposition, d2)) { ++ if (a(worldserver, ichunkaccess, blockposition_mutableblockposition, d2) && worldserver.isLoadedAndInBounds(blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn + if (biomebase_biomemeta == null) { + biomebase_biomemeta = a(worldserver, structuremanager, chunkgenerator, enumcreaturetype, worldserver.random, (BlockPosition) blockposition_mutableblockposition); + if (biomebase_biomemeta == null) { diff --git a/Spigot-Server-Patches/0296-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 69% rename from Spigot-Server-Patches/0296-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index c7ccaeee33..b4461e819f 100644 --- a/Spigot-Server-Patches/0296-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -6,19 +6,19 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Uses an EnumMap as well as a Set paired List for O(1) contains calls. diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 253890e53702f9ba1c6628cc860a4ca10756626a..0102a170dc333fb4af01efa0aaa66df85271f1e0 100644 +index ae0ac8d383ca11a683465d8c83a8b8a66e567079..4c656f434f2637a6af4cdb9efe3414de81e4ea9b 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -40,7 +40,7 @@ public abstract class BiomeBase { - protected final Map>> r = Maps.newHashMap(); +@@ -69,7 +69,7 @@ public class BiomeBase { + protected final Map>> r; protected final List> s = Lists.newArrayList(); - protected final Map, WorldGenFeatureConfiguration> t = Maps.newHashMap(); -- private final Map> v = Maps.newHashMap(); -+ private final java.util.EnumMap> v = Maps.newEnumMap(EnumCreatureType.class); // Paper - private final ThreadLocal w = ThreadLocal.withInitial(() -> { - return (Long2FloatLinkedOpenHashMap) SystemUtils.a(() -> { - Long2FloatLinkedOpenHashMap long2floatlinkedopenhashmap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) { -@@ -92,7 +92,7 @@ public abstract class BiomeBase { + private final Map, StructureFeature> u; +- private final Map> v; ++ private final Map> v = Maps.newEnumMap(EnumCreatureType.class); // Paper + private final Map, BiomeBase.e> w = Maps.newHashMap(); + private final List x; + private final ThreadLocal y = ThreadLocal.withInitial(() -> { +@@ -127,7 +127,7 @@ public class BiomeBase { for (j = 0; j < i; ++j) { EnumCreatureType enumcreaturetype = aenumcreaturetype[j]; @@ -27,8 +27,8 @@ index 253890e53702f9ba1c6628cc860a4ca10756626a..0102a170dc333fb4af01efa0aaa66df8 } } else { -@@ -327,6 +327,38 @@ public abstract class BiomeBase { - return this.m; +@@ -433,6 +433,38 @@ public class BiomeBase { + return this.l; } + // Paper start - keep track of data in a pair set to give O(1) contains calls - we have to hook removals incase plugins mess with it @@ -63,6 +63,6 @@ index 253890e53702f9ba1c6628cc860a4ca10756626a..0102a170dc333fb4af01efa0aaa66df8 + } + // Paper end + - public static class a { + public static class d { - @Nullable + public static final Codec a = RecordCodecBuilder.create((instance) -> { diff --git a/Spigot-Server-Patches/0297-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/0294-Implement-furnace-cook-speed-multiplier-API.patch similarity index 86% rename from Spigot-Server-Patches/0297-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-Server-Patches/0294-Implement-furnace-cook-speed-multiplier-API.patch index a2cb14df35..9acaf329a6 100644 --- a/Spigot-Server-Patches/0297-Implement-furnace-cook-speed-multiplier-API.patch +++ b/Spigot-Server-Patches/0294-Implement-furnace-cook-speed-multiplier-API.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Implement furnace cook speed multiplier API Signed-off-by: Tassu diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 560e2f42b702c5c4870640ad7da3aa48c3f4b1eb..d5432bfeb727baadd8614384d3e50314de5f8dc4 100644 +index 623cd63711c6cb79dce7a46056e193fdb13334a5..f4f50fb8375fec3f6868bbccc50bc78a5cd81965 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java -@@ -8,6 +8,7 @@ import java.util.Map; - import java.util.Map.Entry; +@@ -10,6 +10,7 @@ import java.util.List; + import java.util.Map; import javax.annotation.Nullable; // CraftBukkit start +import java.util.List; import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.craftbukkit.inventory.CraftItemStack; -@@ -26,6 +27,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I +@@ -28,6 +29,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I protected NonNullList items; public int burnTime; private int ticksForCurrentFuel; @@ -25,8 +25,8 @@ index 560e2f42b702c5c4870640ad7da3aa48c3f4b1eb..d5432bfeb727baadd8614384d3e50314 public int cookTime; public int cookTimeTotal; protected final IContainerProperties b; -@@ -212,6 +214,11 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I - this.n.put(minecraftkey, j); +@@ -228,6 +230,11 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I + this.n.put(new MinecraftKey(s), nbttagcompound1.getInt(s)); } + // Paper start - cook speed API @@ -37,15 +37,15 @@ index 560e2f42b702c5c4870640ad7da3aa48c3f4b1eb..d5432bfeb727baadd8614384d3e50314 } @Override -@@ -220,6 +227,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I +@@ -236,6 +243,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I nbttagcompound.setShort("BurnTime", (short) this.burnTime); nbttagcompound.setShort("CookTime", (short) this.cookTime); nbttagcompound.setShort("CookTimeTotal", (short) this.cookTimeTotal); + nbttagcompound.setDouble("Paper.CookSpeedMultiplier", this.cookSpeedMultiplier); // Paper - cook speed multiplier API ContainerUtil.a(nbttagcompound, this.items); - nbttagcompound.setShort("RecipesUsedSize", (short) this.n.size()); - int i = 0; -@@ -283,8 +291,8 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + +@@ -295,8 +303,8 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I } if (this.isBurning() && this.canBurn(irecipe)) { diff --git a/Spigot-Server-Patches/0299-Optimize-Server-World-Map.patch b/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch similarity index 71% rename from Spigot-Server-Patches/0299-Optimize-Server-World-Map.patch rename to Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch index 88931df1f5..8c39dc1f94 100644 --- a/Spigot-Server-Patches/0299-Optimize-Server-World-Map.patch +++ b/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch @@ -21,13 +21,15 @@ known NMS used methods, but we can add more if naughty plugins are found later. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldMap.java b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java new file mode 100644 -index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed44833726544f2c6011 +index 0000000000000000000000000000000000000000..0f0c5330c364909c85cc8cf58fb5c478ffdaeb25 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java -@@ -0,0 +1,191 @@ +@@ -0,0 +1,193 @@ +package com.destroystokyo.paper; + +import net.minecraft.server.DimensionManager; ++import net.minecraft.server.ResourceKey; ++import net.minecraft.server.World; +import net.minecraft.server.WorldServer; + +import javax.annotation.Nonnull; @@ -40,7 +42,7 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 +import java.util.Map; +import java.util.Set; + -+public class PaperWorldMap extends HashMap { ++public class PaperWorldMap extends HashMap, WorldServer> { + private final List worlds = new ArrayList<>(); + private final List worldsIterable = new ArrayList() { + @Override @@ -80,10 +82,10 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + @Override + public WorldServer get(Object key) { + // Will hit the below method -+ return key instanceof DimensionManager ? get((DimensionManager) key) : null; ++ return key instanceof ResourceKey ? get((ResourceKey) key) : null; + } -+ -+ public WorldServer get(DimensionManager key) { ++ // TODO figure out what to do with dimension ids ++ public WorldServer get(ResourceKey key) { + int id = key.getDimensionID()+1; + return worlds.size() > id ? worlds.get(id) : null; + } @@ -98,7 +100,7 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + } + + @Override -+ public WorldServer put(DimensionManager key, WorldServer value) { ++ public WorldServer put(ResourceKey key, WorldServer value) { + while (worlds.size() <= key.getDimensionID()+1) { + worlds.add(null); + } @@ -111,8 +113,8 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + } + + @Override -+ public void putAll(Map m) { -+ for (Entry e : m.entrySet()) { ++ public void putAll(Map, ? extends WorldServer> m) { ++ for (Entry, ? extends WorldServer> e : m.entrySet()) { + put(e.getKey(), e.getValue()); + } + } @@ -142,17 +144,17 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + + @Override + public boolean containsValue(Object value) { -+ return value instanceof WorldServer && get(((WorldServer) value).worldProvider.getDimensionManager()) != null; ++ return value instanceof WorldServer && get(((WorldServer) value).getDimensionKey()) != null; + } + + @Nonnull + @Override -+ public Set keySet() { -+ return new AbstractSet() { ++ public Set> keySet() { ++ return new AbstractSet>() { + @Override -+ public Iterator iterator() { ++ public Iterator> iterator() { + Iterator iterator = worldsIterable.iterator(); -+ return new Iterator() { ++ return new Iterator>() { + + @Override + public boolean hasNext() { @@ -160,8 +162,8 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + } + + @Override -+ public DimensionManager next() { -+ return iterator.next().worldProvider.getDimensionManager(); ++ public ResourceKey next() { ++ return iterator.next().getDimensionKey(); + } + + @Override @@ -184,12 +186,12 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + } + + @Override -+ public Set> entrySet() { -+ return new AbstractSet>() { ++ public Set, WorldServer>> entrySet() { ++ return new AbstractSet, WorldServer>>() { + @Override -+ public Iterator> iterator() { ++ public Iterator, WorldServer>> iterator() { + Iterator iterator = worldsIterable.iterator(); -+ return new Iterator>() { ++ return new Iterator, WorldServer>>() { + + @Override + public boolean hasNext() { @@ -197,9 +199,9 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + } + + @Override -+ public Entry next() { ++ public Entry, WorldServer> next() { + WorldServer entry = iterator.next(); -+ return new SimpleEntry<>(entry.worldProvider.getDimensionManager(), entry); ++ return new SimpleEntry<>(entry.getDimensionKey(), entry); + } + + @Override @@ -217,32 +219,24 @@ index 0000000000000000000000000000000000000000..6bb2f98b4574bff7ac50ed4483372654 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 85f989829b5ad1d7681b57cf68519a4806b26ea1..bbda856c148588402731c03cd166acd2e1f4eee3 100644 +index 6a42e480940c4081622050c07961a2c56cfaa542..16a8300a202e0b33b6de472a72ebf74653bafc20 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -88,7 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant worldServer = Maps.newLinkedHashMap(); // CraftBukkit - keep order, k+v already use identity methods -+ public final Map worldServer = new com.destroystokyo.paper.PaperWorldMap(); // Paper; + private int serverPort; + public final IRegistryCustom.Dimension f; +- public final Map, WorldServer> worldServer; ++ public final Map, WorldServer> worldServer = new com.destroystokyo.paper.PaperWorldMap(); // Paper; private PlayerList playerList; - private volatile boolean isRunning = true; + private volatile boolean isRunning; private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart -@@ -459,7 +459,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Wed, 12 Sep 2018 21:12:57 -0400 -Subject: [PATCH] Prevent mob spawning from loading/generating chunks - -also prevents if out of world border bounds - -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 224443e03c9e55af2744eebd7e754e2a1b3fa296..fdac5bb3a2d4a73035e1d914979b87fc224b6b20 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -25,9 +25,9 @@ public final class SpawnerCreature { - int l = blockposition1.getZ(); - - if (k >= 1) { -- IBlockData iblockdata = chunk.getType(blockposition1); -+ IBlockData iblockdata = worldserver.getTypeIfLoadedAndInBounds(blockposition1); // Paper - don't load chunks for mob spawn - -- if (!iblockdata.isOccluding(chunk, blockposition1)) { -+ if (iblockdata != null && !iblockdata.isOccluding(chunk, blockposition1)) { // Paper - don't load chunks for mob spawn - BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); - int i1 = 0; - -@@ -55,7 +55,7 @@ public final class SpawnerCreature { - if (entityhuman != null) { - double d0 = entityhuman.g((double) f, (double) k, (double) f1); - -- if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D)) { -+ if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D) && worldserver.isLoadedAndInBounds(blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn - ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition_mutableblockposition); - - if (Objects.equals(chunkcoordintpair, chunk.getPos()) || worldserver.getChunkProvider().a(chunkcoordintpair)) { diff --git a/Spigot-Server-Patches/0300-PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch similarity index 94% rename from Spigot-Server-Patches/0300-PreSpawnerSpawnEvent.patch rename to Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch index 3b94d0fa02..7126767ccf 100644 --- a/Spigot-Server-Patches/0300-PreSpawnerSpawnEvent.patch +++ b/Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch @@ -9,7 +9,7 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for spawners. diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 43c491f71b7739c782b46ee77ff8debe44213f11..cb7cb789b82461093fbbb4c8ae6d03fcbfe57383 100644 +index 45cd44335427a818a580158d57025289f37079bf..e2f5354709819e56f9bc66b8c8d5e095bc8387b4 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -111,11 +111,11 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/0301-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 69% rename from Spigot-Server-Patches/0301-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch index 0547b7b897..26c0bd7f92 100644 --- a/Spigot-Server-Patches/0301-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -13,10 +13,10 @@ Shulkers) may need to be changed in order for it to re-save properly No more crashing though. diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -index 786712297435fed5247abd577efd092bcb9c44cb..ef2a496eda45ae5ee8fe52ef09e77c2906069d2e 100644 +index 850e79b764513bd68a28b675e075f804f59b75a8..7e13b1cf6d92c3e0f2dab1ba1d42bd4f250e256c 100644 --- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -@@ -59,7 +59,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { +@@ -60,7 +60,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { this.command = nbttagcompound.getString("Command"); this.successCount = nbttagcompound.getInt("SuccessCount"); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { @@ -25,24 +25,11 @@ index 786712297435fed5247abd577efd092bcb9c44cb..ef2a496eda45ae5ee8fe52ef09e77c29 } if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0f74ec89b3e85c918c95f9d8fef6d68403ed1107..4609e402b419ed21e17ad34d02dca55b47c1c95e 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1680,7 +1680,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - this.Z(); - this.setYawPitch(this.yaw, this.pitch); - if (nbttagcompound.hasKeyOfType("CustomName", 8)) { -- this.setCustomName(IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName"))); -+ this.setCustomName(MCUtil.getBaseComponentFromNbt("CustomName", nbttagcompound)); // Paper - Catch ParseException - } - - this.setCustomNameVisible(nbttagcompound.getBoolean("CustomNameVisible")); diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 148917547bb7a626d1b2bacce7385607043db7e2..49178cbcebe7e7af9e9a2485ae11058fd1c6b20f 100644 +index 797654c653ec6dc4d46b457cf8a6121b29eca7aa..2eacc5de340ca5558d9a0cba9baa26bbebef714d 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java -@@ -518,4 +518,19 @@ public final class MCUtil { +@@ -506,4 +506,19 @@ public final class MCUtil { return null; } } @@ -63,12 +50,12 @@ index 148917547bb7a626d1b2bacce7385607043db7e2..49178cbcebe7e7af9e9a2485ae11058f + } } diff --git a/src/main/java/net/minecraft/server/TileEntityBanner.java b/src/main/java/net/minecraft/server/TileEntityBanner.java -index 93911a825154d04dd3f1495b1bab5a3ab2aea30b..d35604edb21441032bce87d658b76b39fea917fc 100644 +index 4f886c4145325d8fd8217ae3f681632f0396689f..5397d8a69a0326cf73fe0ee1175d1871cac3769d 100644 --- a/src/main/java/net/minecraft/server/TileEntityBanner.java +++ b/src/main/java/net/minecraft/server/TileEntityBanner.java @@ -60,7 +60,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity { - public void load(NBTTagCompound nbttagcompound) { - super.load(nbttagcompound); + public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { + super.load(iblockdata, nbttagcompound); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { - this.a = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName")); + this.a = MCUtil.getBaseComponentFromNbt("CustomName", nbttagcompound); // Paper - Catch ParseException @@ -76,11 +63,11 @@ index 93911a825154d04dd3f1495b1bab5a3ab2aea30b..d35604edb21441032bce87d658b76b39 if (this.hasWorld()) { diff --git a/src/main/java/net/minecraft/server/TileEntityContainer.java b/src/main/java/net/minecraft/server/TileEntityContainer.java -index 473ec2cbde5b31398f57bf9ab7034139572fa666..ab6b86e4e9f99a60140187c06480cf511327a710 100644 +index 8f94b9c52c3842b9c32280499aee1b551dc16095..74390aebd353c969353a6efc0904bafe30774d65 100644 --- a/src/main/java/net/minecraft/server/TileEntityContainer.java +++ b/src/main/java/net/minecraft/server/TileEntityContainer.java @@ -17,7 +17,7 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento - super.load(nbttagcompound); + super.load(iblockdata, nbttagcompound); this.chestLock = ChestLock.b(nbttagcompound); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { - this.customName = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName")); diff --git a/Spigot-Server-Patches/0303-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch similarity index 77% rename from Spigot-Server-Patches/0303-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch index 85785a67e9..f25452fae7 100644 --- a/Spigot-Server-Patches/0303-Honor-EntityAgeable.ageLock.patch +++ b/Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Honor EntityAgeable.ageLock diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java -index cec938436d2fb4ba9cafa57af7b447b2a0df0f9f..3d27f0964a5808af5fd6d1519c91071e50bc239d 100644 +index 8665ac06c6d2eb70127f1a12cb8c44de569a97f9..d861a96b4cb5a5480deb93708207002da782bb51 100644 --- a/src/main/java/net/minecraft/server/EntityAgeable.java +++ b/src/main/java/net/minecraft/server/EntityAgeable.java -@@ -101,6 +101,7 @@ public abstract class EntityAgeable extends EntityCreature { +@@ -73,6 +73,7 @@ public abstract class EntityAgeable extends EntityCreature { } public void setAge(int i, boolean flag) { diff --git a/Spigot-Server-Patches/0304-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch similarity index 75% rename from Spigot-Server-Patches/0304-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch index 2537b2ac2d..1ba9b14279 100644 --- a/Spigot-Server-Patches/0304-Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable connection throttle kick message diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 559e6b42ba5bf0ea92cccbabd2ef1d4c27b03064..092bff78ab5288ede0cdeaa94a59190b79aea239 100644 +index 214b577b326bc794fa3721deb6171228dd4f25e6..19c5d2047040c43711339a0206bd01df8e03b5ea 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -274,6 +274,11 @@ public class PaperConfig { +@@ -272,6 +272,11 @@ public class PaperConfig { authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } @@ -21,15 +21,15 @@ index 559e6b42ba5bf0ea92cccbabd2ef1d4c27b03064..092bff78ab5288ede0cdeaa94a59190b private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 8928d93e49bec174e86a2b451ac40f3946193009..0532f975b7af5b3f2916c26141221cd3701765d0 100644 +index 8049f54f049122b065ea30e7e831c33486a83b7e..401e89079934929ddf29b126e9c4908d93321df8 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java -@@ -38,7 +38,7 @@ public class HandshakeListener implements PacketHandshakingInListener { +@@ -37,7 +37,7 @@ public class HandshakeListener implements PacketHandshakingInListener { synchronized (throttleTracker) { if (throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - throttleTracker.get(address) < connectionThrottle) { throttleTracker.put(address, currentTime); - chatmessage = new ChatMessage("Connection throttled! Please wait before reconnecting."); -+ chatmessage = new ChatMessage(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message - this.b.sendPacket(new PacketLoginOutDisconnect(chatmessage)); - this.b.close(chatmessage); ++ chatmessage = new ChatMessage(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message + this.c.sendPacket(new PacketLoginOutDisconnect(chatmessage)); + this.c.close(chatmessage); return; diff --git a/Spigot-Server-Patches/0305-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch similarity index 87% rename from Spigot-Server-Patches/0305-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch index 7ce2295ff8..fc0c5bd6f9 100644 --- a/Spigot-Server-Patches/0305-Hook-into-CB-plugin-rewrites.patch +++ b/Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch @@ -7,21 +7,8 @@ Allows us to do fun stuff like rewrite the OBC util fastutil location to our own relocation. Also lets us rewrite NMS calls for when we're debugging in an IDE pre-relocate. -diff --git a/pom.xml b/pom.xml -index fc2921e9783f2db63b71c6e244e24c9416cdbf76..64bd667e8b11263e483364efc3414396819a255c 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -87,7 +87,7 @@ - - org.ow2.asm - asm -- 7.3.1 -+ 8.0.1 - compile - - diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 9b4a0f0678a7e8e347ef062ad15562484a74452b..4ae41fd2557dcc2a8e31d39ed978b2b26093dd06 100644 +index ac48431777b70c200f9e4113c8a0c03957126e90..6ef2baa62cdc36c2363973f4b9235085cfb8aba6 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -6,7 +6,9 @@ import java.io.FileOutputStream; @@ -93,12 +80,9 @@ index 9b4a0f0678a7e8e347ef062ad15562484a74452b..4ae41fd2557dcc2a8e31d39ed978b2b2 public static void main(String[] args) { OptionParser parser = new OptionParser(); -@@ -128,17 +171,92 @@ public class Commodore - ClassReader cr = new ClassReader( b ); - ClassWriter cw = new ClassWriter( cr, 0 ); +@@ -130,15 +173,86 @@ public class Commodore -- cr.accept( new ClassVisitor( Opcodes.ASM7, cw ) -+ cr.accept( new ClassVisitor( Opcodes.ASM8, cw) // Paper + cr.accept( new ClassVisitor( Opcodes.ASM8, cw ) { + // Paper start - Rewrite plugins + @Override @@ -160,8 +144,6 @@ index 9b4a0f0678a7e8e347ef062ad15562484a74452b..4ae41fd2557dcc2a8e31d39ed978b2b2 + super.visitFrame( type, nLocal, local, nStack, stack ); + } + -+ -+ + @Override + public void visitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index) + { @@ -170,8 +152,6 @@ index 9b4a0f0678a7e8e347ef062ad15562484a74452b..4ae41fd2557dcc2a8e31d39ed978b2b2 + super.visitLocalVariable( name, descriptor, signature, start, end, index ); + } + // Paper end -+ -+ @Override public void visitFieldInsn(int opcode, String owner, String name, String desc) @@ -184,10 +164,10 @@ index 9b4a0f0678a7e8e347ef062ad15562484a74452b..4ae41fd2557dcc2a8e31d39ed978b2b2 + } + // Paper end + - if ( modern ) + if ( owner.equals( "org/bukkit/block/Biome" ) ) { - if ( owner.equals( "org/bukkit/Material" ) ) -@@ -237,6 +355,14 @@ public class Commodore + switch ( name ) +@@ -260,6 +374,14 @@ public class Commodore return; } diff --git a/Spigot-Server-Patches/0306-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch similarity index 89% rename from Spigot-Server-Patches/0306-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch index 48073d132f..1ec7fb6b26 100644 --- a/Spigot-Server-Patches/0306-Allow-setting-the-vex-s-summoner.patch +++ b/Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow setting the vex's summoner diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index a46730460e5d9f6e52d63ba1950d1e7195fe87cd..cf274666c70695ef597b2f5651c18c60702c2dc1 100644 +index ab4ac736f8fcda1ed6b58abe0a4ecba58d3b5d43..99a98e37ebd292f8fb1c3613348bd6dd51e9191b 100644 --- a/src/main/java/net/minecraft/server/EntityVex.java +++ b/src/main/java/net/minecraft/server/EntityVex.java -@@ -133,6 +133,7 @@ public class EntityVex extends EntityMonster { +@@ -130,6 +130,7 @@ public class EntityVex extends EntityMonster { this.a(1, flag); } diff --git a/Spigot-Server-Patches/0307-Add-sun-related-API.patch b/Spigot-Server-Patches/0302-Add-sun-related-API.patch similarity index 79% rename from Spigot-Server-Patches/0307-Add-sun-related-API.patch rename to Spigot-Server-Patches/0302-Add-sun-related-API.patch index b6b1d73cac..6ef848fd8e 100644 --- a/Spigot-Server-Patches/0307-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0302-Add-sun-related-API.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index b5816dc89ede5f5f1780d3086d9b1a41fba2b19d..bed15873b675bbd05c0149d655f9fb165bbbc73e 100644 +index a38a1f3447accd51dcd295fb28c4108cb87ad832..df98f2244a161c0e66e80f92c91760409734dc69 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1341,6 +1341,7 @@ public abstract class EntityInsentient extends EntityLiving { - return flag; +@@ -1509,6 +1509,7 @@ public abstract class EntityInsentient extends EntityLiving { + } -+ public boolean isInDaylight() { return this.en(); } // Paper - OBFHELPER - protected boolean en() { ++ public boolean isInDaylight() { return this.eH(); } // Paper - OBFHELPER + protected boolean eH() { if (this.world.isDay() && !this.world.isClientSide) { - float f = this.aI(); + float f = this.aO(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4e7b11af047c267ce87549e0ba178d7223c03b63..07729667f5c66bbcb85fc59cb5fa3c218efa2ec8 100644 +index e446bd936dd198b227e483cf8e234a73035daa76..fb7e4e2f02b62f7cfeec6a619a4c2943cc071c46 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 { +@@ -862,6 +862,13 @@ public class CraftWorld implements World { } } diff --git a/Spigot-Server-Patches/0310-Turtle-API.patch b/Spigot-Server-Patches/0303-Turtle-API.patch similarity index 61% rename from Spigot-Server-Patches/0310-Turtle-API.patch rename to Spigot-Server-Patches/0303-Turtle-API.patch index 96bf18cff1..3052a291a7 100644 --- a/Spigot-Server-Patches/0310-Turtle-API.patch +++ b/Spigot-Server-Patches/0303-Turtle-API.patch @@ -5,80 +5,64 @@ Subject: [PATCH] Turtle API diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 76296119a197a433747ee2481079b36aebdb085c..dd02cb3485021c3afd23c2985a71e93c6b0ab07d 100644 +index dd745894614982fad6277e77b98bed75fc2a2f55..5862e2026b685df80de45c529f1367382a2a60b0 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java -@@ -27,51 +27,63 @@ public class EntityTurtle extends EntityAnimal { - this.H = 1.0F; +@@ -27,10 +27,12 @@ public class EntityTurtle extends EntityAnimal { + this.G = 1.0F; } -+ public final void setHome(BlockPosition pos) { g(pos); } // Paper - OBFHELPER - public void g(BlockPosition blockposition) { - this.datawatcher.set(EntityTurtle.bx, blockposition); ++ public final void setHome(BlockPosition pos) { setHomePos(pos); } // Paper - OBFHELPER + public void setHomePos(BlockPosition blockposition) { + this.datawatcher.set(EntityTurtle.bw, blockposition); + } +- ++ // TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them ++ public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER + private BlockPosition getHomePos() { + return (BlockPosition) this.datawatcher.get(EntityTurtle.bw); + } +@@ -51,27 +53,33 @@ public class EntityTurtle extends EntityAnimal { + this.datawatcher.set(EntityTurtle.bx, flag); } -+ public final BlockPosition getHome() { return this.es(); } // Paper - OBFHELPER - private BlockPosition es() { - return (BlockPosition) this.datawatcher.get(EntityTurtle.bx); - } - -+ public final void setTravelPos(BlockPosition pos) { this.h(pos); } // Paper - OBFHELPER - private void h(BlockPosition blockposition) { - this.datawatcher.set(EntityTurtle.bA, blockposition); - } - -+ public final BlockPosition getTravelPos() { return this.et(); } // Paper - OBFHELPER - private BlockPosition et() { - return (BlockPosition) this.datawatcher.get(EntityTurtle.bA); - } - -+ public final boolean hasEgg() { return this.eq(); } // Paper - OBFHELPER - public boolean eq() { ++ public final boolean isDigging() { return this.eM(); } // Paper - OBFHELPER + public boolean eM() { return (Boolean) this.datawatcher.get(EntityTurtle.by); } -+ public final void setHasEgg(boolean hasEgg) { this.r(hasEgg); } // Paper - OBFHELPER - private void r(boolean flag) { ++ public final void setDigging(boolean digging) { this.u(digging); } // Paper - OBFHELPER + private void u(boolean flag) { + this.bC = flag ? 1 : 0; this.datawatcher.set(EntityTurtle.by, flag); } -+ public final boolean isDigging() { return this.er(); } // Paper - OBFHELPER - public boolean er() { - return (Boolean) this.datawatcher.get(EntityTurtle.bz); ++ public final boolean isGoingHome() { return this.eV(); } // Paper - OBFHELPER + private boolean eV() { + return (Boolean) this.datawatcher.get(EntityTurtle.bA); } -+ public final void setDigging(boolean digging) { this.s(digging); } // Paper - OBFHELPER - private void s(boolean flag) { - this.bD = flag ? 1 : 0; - this.datawatcher.set(EntityTurtle.bz, flag); ++ public final void setGoingHome(boolean goingHome) { this.v(goingHome); } // Paper - OBFHELPER + private void v(boolean flag) { + this.datawatcher.set(EntityTurtle.bA, flag); } -+ public final boolean isGoingHome() { return this.eu(); } // Paper - OBFHELPER - private boolean eu() { ++ public final boolean isTravelling() { return this.eW(); } // Paper - OBFHELPER + private boolean eW() { return (Boolean) this.datawatcher.get(EntityTurtle.bB); } -+ public final void setGoingHome(boolean goingHome) { this.t(goingHome); } // Paper - OBFHELPER - private void t(boolean flag) { ++ public final void setTravelling(boolean travelling) { this.w(travelling); } // Paper - OBFHELPER + private void w(boolean flag) { this.datawatcher.set(EntityTurtle.bB, flag); } - -+ public final boolean isTravelling() { return this.ez(); } // Paper - OBFHELPER - private boolean ez() { - return (Boolean) this.datawatcher.get(EntityTurtle.bC); - } - -+ public final void setTravelling(boolean travelling) { this.u(travelling); } // Paper - OBFHELPER - private void u(boolean flag) { - this.datawatcher.set(EntityTurtle.bC, flag); - } -@@ -443,14 +455,17 @@ public class EntityTurtle extends EntityAnimal { +@@ -438,14 +446,17 @@ public class EntityTurtle extends EntityAnimal { if (!this.g.isInWater() && this.k()) { - if (this.g.bD < 1) { -- this.g.s(true); + if (this.g.bC < 1) { +- this.g.u(true); + this.g.setDigging(new com.destroystokyo.paper.event.entity.TurtleStartDiggingEvent((org.bukkit.entity.Turtle) this.g.getBukkitEntity(), MCUtil.toLocation(this.g.world, this.e)).callEvent()); // Paper - } else if (this.g.bD > 200) { + } else if (this.g.bC > 200) { World world = this.g.world; // CraftBukkit start @@ -92,13 +76,13 @@ index 76296119a197a433747ee2481079b36aebdb085c..dd02cb3485021c3afd23c2985a71e93c + world.setTypeAndData(this.e.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, layEggEvent.getEggCount()), 3); } // CraftBukkit end - this.g.r(false); -@@ -585,7 +600,7 @@ public class EntityTurtle extends EntityAnimal { + this.g.setHasEgg(false); +@@ -574,7 +585,7 @@ public class EntityTurtle extends EntityAnimal { @Override public boolean a() { -- return this.a.isBaby() ? false : (this.a.eq() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.es().a((IPosition) this.a.getPositionVector(), 64.0D))); -+ return this.a.isBaby() ? false : (this.a.eq() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.es().a((IPosition) this.a.getPositionVector(), 64.0D))) && new com.destroystokyo.paper.event.entity.TurtleGoHomeEvent((org.bukkit.entity.Turtle) this.a.getBukkitEntity()).callEvent(); // Paper +- return this.a.isBaby() ? false : (this.a.hasEgg() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.getHomePos().a((IPosition) this.a.getPositionVector(), 64.0D))); ++ return this.a.isBaby() ? false : (this.a.hasEgg() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.getHomePos().a((IPosition) this.a.getPositionVector(), 64.0D))) && new com.destroystokyo.paper.event.entity.TurtleGoHomeEvent((org.bukkit.entity.Turtle) this.a.getBukkitEntity()).callEvent(); // Paper } @Override diff --git a/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch new file mode 100644 index 0000000000..32df6d42f5 --- /dev/null +++ b/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 17 Oct 2018 19:17:27 -0400 +Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles + +Say a player shoots an arrow through a nether portal, the game +would lose the shooter for determining things such as Player Kills, +because the entity is in another world. + +If the projectile fails to find the shooter in the current world, check +other worlds. + +diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java +index f85d80d7bb3e4e92bb8d281dfe577f663ebe9da1..ceecb0520a63d2eff5f4cadf45fa49f56eaea8dd 100644 +--- a/src/main/java/net/minecraft/server/IProjectile.java ++++ b/src/main/java/net/minecraft/server/IProjectile.java +@@ -29,7 +29,18 @@ public abstract class IProjectile extends Entity { + + @Nullable + public Entity getShooter() { +- return this.shooter != null && this.world instanceof WorldServer ? ((WorldServer) this.world).getEntity(this.shooter) : (this.c != 0 ? this.world.getEntity(this.c) : null); ++ // Paper start - MC-50319 - shooter might be in another world (arrows through portals) ++ Entity entity = this.shooter != null && this.world instanceof WorldServer ? ((WorldServer) this.world).getEntity(this.shooter) : (this.c != 0 ? this.world.getEntity(this.c) : null); ++ if (entity == null) { ++ for (WorldServer world : world.getMinecraftServer().getWorlds()) { ++ entity = world.getEntity(this.shooter); ++ if (entity != null) { ++ break; ++ } ++ } ++ } ++ return entity; ++ // Paper end + } + + @Override diff --git a/Spigot-Server-Patches/0313-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch similarity index 94% rename from Spigot-Server-Patches/0313-Call-player-spectator-target-events-and-improve-impl.patch rename to Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch index 1a9a7a8a82..5e91efce62 100644 --- a/Spigot-Server-Patches/0313-Call-player-spectator-target-events-and-improve-impl.patch +++ b/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f43584f0e31a1c3d0e9b4356b7021cd79226d8b5..3175b0735f3b5f4d7e3e02dc083d32262d463de7 100644 +index 7a0391dc2861d604f1f3acc53eb9e1134c33c64f..9972ee33433914ef9abc5075f274e58d46a9192f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1586,15 +1586,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1694,15 +1694,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } @@ -88,10 +88,10 @@ index f43584f0e31a1c3d0e9b4356b7021cd79226d8b5..3175b0735f3b5f4d7e3e02dc083d3226 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e7ad580740bab3e102f32bd715c6b01a0e721e09..577268fed52bfc2657ef03099cbebeb0adabdf94 100644 +index 6884fcd0749eba2dc84f1447b338a879ff79f0c8..54e70688c94343ba3988eb775993c61bbc807bcc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1110,6 +1110,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1132,6 +1132,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } // CraftBukkit start - Delegate to teleport(Location) diff --git a/Spigot-Server-Patches/0314-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch similarity index 91% rename from Spigot-Server-Patches/0314-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch index 5c21db0604..6978ec5f38 100644 --- a/Spigot-Server-Patches/0314-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch @@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13 login plugin message packet. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 092bff78ab5288ede0cdeaa94a59190b79aea239..79cf4e598fedf75e5ee943acb7930cb265dd11f6 100644 +index 19c5d2047040c43711339a0206bd01df8e03b5ea..29cab8730a5e61aeb8bf4d69ccad192c1ff975f4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -8,6 +8,7 @@ import java.io.IOException; @@ -25,7 +25,7 @@ index 092bff78ab5288ede0cdeaa94a59190b79aea239..79cf4e598fedf75e5ee943acb7930cb2 import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -245,7 +246,7 @@ public class PaperConfig { +@@ -243,7 +244,7 @@ public class PaperConfig { } public static boolean isProxyOnlineMode() { @@ -34,9 +34,9 @@ index 092bff78ab5288ede0cdeaa94a59190b79aea239..79cf4e598fedf75e5ee943acb7930cb2 } public static int packetInSpamThreshold = 300; -@@ -336,4 +337,21 @@ public class PaperConfig { - } +@@ -315,4 +316,21 @@ public class PaperConfig { } + tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit); } + + public static boolean velocitySupport; @@ -130,10 +130,10 @@ index 0000000000000000000000000000000000000000..fdd8708f974700c7cde6e436c2f189d9 + } +} diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 1c4ac7bf7ac4d864ba6efd46d8c562c238dad2bc..47cf105019b3ea28f413274d234a34cdb41941dd 100644 +index e0f0a1e91a037f93b239e779aa8fd92be8a8c01f..57520943befea80b334ccf2385057b88131ddd8e 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -42,6 +42,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -41,6 +41,7 @@ public class LoginListener implements PacketLoginInListener { private SecretKey loginKey; private EntityPlayer l; public String hostname = ""; // CraftBukkit - add field @@ -141,7 +141,7 @@ index 1c4ac7bf7ac4d864ba6efd46d8c562c238dad2bc..47cf105019b3ea28f413274d234a34cd public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) { this.g = LoginListener.EnumProtocolState.HELLO; -@@ -193,6 +194,14 @@ public class LoginListener implements PacketLoginInListener { +@@ -192,6 +193,14 @@ public class LoginListener implements PacketLoginInListener { this.g = LoginListener.EnumProtocolState.KEY; this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e)); } else { @@ -156,7 +156,7 @@ index 1c4ac7bf7ac4d864ba6efd46d8c562c238dad2bc..47cf105019b3ea28f413274d234a34cd // Spigot start // Paper start - Cache authenticator threads authenticatorPool.execute(new Runnable() { -@@ -285,6 +294,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -284,6 +293,12 @@ public class LoginListener implements PacketLoginInListener { public class LoginHandler { public void fireEvents() throws Exception { @@ -169,7 +169,7 @@ index 1c4ac7bf7ac4d864ba6efd46d8c562c238dad2bc..47cf105019b3ea28f413274d234a34cd String playerName = i.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); java.util.UUID uniqueId = i.getId(); -@@ -332,6 +347,35 @@ public class LoginListener implements PacketLoginInListener { +@@ -331,6 +346,35 @@ public class LoginListener implements PacketLoginInListener { // Spigot end public void a(PacketLoginInCustomPayload packetloginincustompayload) { @@ -202,11 +202,11 @@ index 1c4ac7bf7ac4d864ba6efd46d8c562c238dad2bc..47cf105019b3ea28f413274d234a34cd + return; + } + // Paper end - this.disconnect(new ChatMessage("multiplayer.disconnect.unexpected_query_response", new Object[0])); + this.disconnect(new ChatMessage("multiplayer.disconnect.unexpected_query_response")); } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 08e314af7cbd6523bbd0bd5a5ad0a0fff2f080be..046196d54df35ceafb8bc477e740e1dc834345d5 100644 +index 8cb29ddc0d5a5951ea35e1a16c023efb9b0be42d..2916119507ec5ecd9266569b0003d0504a79f6c4 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -219,10 +219,10 @@ index 08e314af7cbd6523bbd0bd5a5ad0a0fff2f080be..046196d54df35ceafb8bc477e740e1dc public java.util.UUID spoofedUUID; public com.mojang.authlib.properties.Property[] spoofedProfile; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index e810da87977b441cc329066e3cb158ef3bc62a66..c9a2d42d4fed56db4a1177b0d52292fe591a2540 100644 +index e3ba2e8db98c94ed10e96601addb0110a8385926..6d3db25dd9bf33b08cb6945d8db3c32420efb7e3 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java -@@ -140,6 +140,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -164,6 +164,7 @@ public class PacketDataSerializer extends ByteBuf { return this.d(oenum.ordinal()); } @@ -230,7 +230,7 @@ index e810da87977b441cc329066e3cb158ef3bc62a66..c9a2d42d4fed56db4a1177b0d52292fe public int i() { int i = 0; int j = 0; -@@ -180,6 +181,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -204,6 +205,7 @@ public class PacketDataSerializer extends ByteBuf { return this; } @@ -238,7 +238,7 @@ index e810da87977b441cc329066e3cb158ef3bc62a66..c9a2d42d4fed56db4a1177b0d52292fe public UUID k() { return new UUID(this.readLong(), this.readLong()); } -@@ -298,6 +300,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -322,6 +324,7 @@ public class PacketDataSerializer extends ByteBuf { } } @@ -281,10 +281,10 @@ index ae74dc9e183e66062455cf2a18ab43ae87976046..7eb230f1b27eddf48f1b12fc78877a36 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 3c43f318c4cff914128e2f7060516ce7ebb6e1c9..7b53ebb6d7cf241c6b89ec04acd0bcc25e1c105a 100644 +index 5cb1eab09a56617c97eb01f902ad4d268eacd7cb..5db8ccb0d30e2927c33b04ff51ebebd0dfe96a63 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -648,7 +648,7 @@ public final class CraftServer implements Server { +@@ -673,7 +673,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/0315-Add-more-Witch-API.patch b/Spigot-Server-Patches/0307-Add-more-Witch-API.patch similarity index 60% rename from Spigot-Server-Patches/0315-Add-more-Witch-API.patch rename to Spigot-Server-Patches/0307-Add-more-Witch-API.patch index b4e2d91dc2..34eb5813ce 100644 --- a/Spigot-Server-Patches/0315-Add-more-Witch-API.patch +++ b/Spigot-Server-Patches/0307-Add-more-Witch-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Witch API diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index be6ecfb08aaba3fc5d96e918b7540fc75c92e89e..7b6b1ad17b600b688d16c4208f4e2ac17b36a257 100644 +index a6142ef24bc5bfa15a0ec84fbd8267ffab4e25bf..e8d8935b8ef2db0d4405ee1ff8e2f0f2e17a91b3 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -1,5 +1,11 @@ @@ -24,28 +24,28 @@ index be6ecfb08aaba3fc5d96e918b7540fc75c92e89e..7b6b1ad17b600b688d16c4208f4e2ac1 public class EntityWitch extends EntityRaider implements IRangedEntity { private static final UUID b = UUID.fromString("5CD17E52-A79A-43D3-A529-90FDE04B181E"); -- private static final AttributeModifier bw = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); -+ private static final AttributeModifier bw = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); private static final AttributeModifier DRINKING_SPEED = bw; // Paper - OBFHELPER - private static final DataWatcherObject bx = DataWatcher.a(EntityWitch.class, DataWatcherRegistry.i); -- private int by; -+ private int by; public int getPotionUseTimeLeft() { return by; } public void setPotionUseTimeLeft(int timeLeft) { by = timeLeft; } // Paper - OBFHELPER - private PathfinderGoalNearestHealableRaider bz; - private PathfinderGoalNearestAttackableTargetWitch bA; +- private static final AttributeModifier bv = new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION); ++ private static final AttributeModifier bv = new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION); private static final AttributeModifier DRINKING_SPEED = bv; // Paper - OBFHELPER + private static final DataWatcherObject bw = DataWatcher.a(EntityWitch.class, DataWatcherRegistry.i); +- private int bx; ++ private int bx; public int getPotionUseTimeLeft() { return bx; } public void setPotionUseTimeLeft(int timeLeft) { bx = timeLeft; } // Paper - OBFHELPER + private PathfinderGoalNearestHealableRaider by; + private PathfinderGoalNearestAttackableTargetWitch bz; @@ -56,10 +62,12 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { return SoundEffects.ENTITY_WITCH_DEATH; } -+ public void setDrinkingPotion(boolean drinkingPotion) { t(drinkingPotion); } // Paper - OBFHELPER - public void t(boolean flag) { - this.getDataWatcher().set(EntityWitch.bx, flag); ++ public void setDrinkingPotion(boolean drinkingPotion) { v(drinkingPotion); } // Paper - OBFHELPER + public void v(boolean flag) { + this.getDataWatcher().set(EntityWitch.bw, flag); } -+ public boolean isDrinkingPotion() { return l(); } // Paper - OBFHELPER - public boolean l() { - return (Boolean) this.getDataWatcher().get(EntityWitch.bx); ++ public boolean isDrinkingPotion() { return m(); } // Paper - OBFHELPER + public boolean m() { + return (Boolean) this.getDataWatcher().get(EntityWitch.bw); } -@@ -121,18 +129,20 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { +@@ -118,21 +126,22 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { } if (potionregistry != null) { @@ -53,48 +53,56 @@ index be6ecfb08aaba3fc5d96e918b7540fc75c92e89e..7b6b1ad17b600b688d16c4208f4e2ac1 - ItemStack potion = PotionUtil.a(new ItemStack(Items.POTION), potionregistry); - org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion)); - this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); -+ // Paper start - move all this down into its own method -+// ItemStack potion = PotionUtil.a(new ItemStack(Items.POTION), potionregistry); -+// org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion)); -+// this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); -+// // Paper end -+// this.bB = this.getItemInMainHand().k(); -+// this.s(true); -+// this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); -+// AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); -+// -+// attributeinstance.removeModifier(EntityWitch.bz); -+// attributeinstance.addModifier(EntityWitch.bz); -+ this.setDrinkingPotion(PotionUtil.addPotionToItemStack(new ItemStack(Items.POTION), potionregistry)); - // Paper end -- this.by = this.getItemInMainHand().k(); -- this.t(true); -- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); -- AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); +- // Paper end +- this.bx = this.getItemInMainHand().k(); +- this.v(true); +- if (!this.isSilent()) { +- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); +- } - -- attributeinstance.removeModifier(EntityWitch.bw); -- attributeinstance.addModifier(EntityWitch.bw); +- AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); +- +- attributemodifiable.removeModifier(EntityWitch.bv); +- attributemodifiable.b(EntityWitch.bv); ++ //// Paper start ++ //ItemStack potion = PotionUtil.a(new ItemStack(Items.POTION), potionregistry); ++ //org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion)); ++ //this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); ++ //// Paper end ++ //this.bx = this.getItemInMainHand().k(); ++ //this.v(true); ++ //if (!this.isSilent()) { ++ // this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); ++ //} ++ // ++ //AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); ++ // ++ //attributemodifiable.removeModifier(EntityWitch.bv); ++ //attributemodifiable.b(EntityWitch.bv); ++ this.setDrinkingPotion(PotionUtil.addPotionToItemStack(new ItemStack(Items.POTION), potionregistry)); } } -@@ -144,6 +154,18 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { +@@ -144,6 +153,20 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { super.movementTick(); } -+ // Paper start ++ // Paper start - moved to its own method + public void setDrinkingPotion(ItemStack potion) { + setSlot(EnumItemSlot.MAINHAND, CraftItemStack.asNMSCopy(WitchReadyPotionEvent.process((Witch) getBukkitEntity(), CraftItemStack.asCraftMirror(potion)))); + setPotionUseTimeLeft(getItemInMainHand().getItemUseMaxDuration()); + setDrinkingPotion(true); -+ world.sendSoundEffect(null, locX(), locY(), locZ(), SoundEffects.ENTITY_WITCH_DRINK, getSoundCategory(), 1.0F, 0.8F + random.nextFloat() * 0.4F); -+ AttributeInstance attributeinstance = getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); -+ attributeinstance.removeModifier(EntityWitch.DRINKING_SPEED); -+ attributeinstance.addModifier(EntityWitch.DRINKING_SPEED); ++ if (!this.isSilent()) { ++ this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); ++ } ++ AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); ++ attributemodifiable.removeModifier(EntityWitch.bv); ++ attributemodifiable.b(EntityWitch.bv); + } + // Paper end + @Override - public SoundEffect eq() { + public SoundEffect eM() { return SoundEffects.ENTITY_WITCH_CELEBRATE; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java index bae107e76e4c8df446d4a7be8dda291d820074d7..b43a2bbd5bfd613887a7ae1519f6e729faf9bcc2 100644 diff --git a/Spigot-Server-Patches/0317-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 90% rename from Spigot-Server-Patches/0317-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch index 5cc408b283..189701cc38 100644 --- a/Spigot-Server-Patches/0317-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b8789c8ecc5a6e4117bb7ce0d5487a6e5774b67f..0862a1d629435dea92178fb5473068f23a15adf2 100644 +index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b49a1a6f5017c9e183a7d08b16e89899c25a9717 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -427,4 +427,9 @@ public class PaperWorldConfig { +@@ -405,4 +405,9 @@ public class PaperWorldConfig { waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5); log("Water over lava flow speed: " + waterOverLavaFlowSpeed); } @@ -20,10 +20,10 @@ index b8789c8ecc5a6e4117bb7ce0d5487a6e5774b67f..0862a1d629435dea92178fb5473068f2 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 577268fed52bfc2657ef03099cbebeb0adabdf94..82b98839e554e02e196113d551881a524a3b1658 100644 +index 54e70688c94343ba3988eb775993c61bbc807bcc..ff4ba9b60c60fa77f26a04a065436063270984d1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -351,6 +351,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -350,6 +350,13 @@ public class PlayerConnection implements PacketListenerPlayIn { } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player @@ -37,7 +37,7 @@ index 577268fed52bfc2657ef03099cbebeb0adabdf94..82b98839e554e02e196113d551881a52 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) { // CraftBukkit end PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8); -@@ -900,9 +907,9 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -919,9 +926,9 @@ public class PlayerConnection implements PacketListenerPlayIn { double d1 = this.player.locY(); double d2 = this.player.locZ(); double d3 = this.player.locY(); @@ -49,7 +49,7 @@ index 577268fed52bfc2657ef03099cbebeb0adabdf94..82b98839e554e02e196113d551881a52 float f = packetplayinflying.a(this.player.yaw); float f1 = packetplayinflying.b(this.player.pitch); double d7 = d4 - this.l; -@@ -941,6 +948,12 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -960,6 +967,12 @@ public class PlayerConnection implements PacketListenerPlayIn { } else { speed = player.abilities.walkSpeed * 10f; } diff --git a/Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch deleted file mode 100644 index ccfa4c8ed2..0000000000 --- a/Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath -Date: Wed, 10 Oct 2018 21:22:44 -0500 -Subject: [PATCH] Check Drowned for Villager Aggression Config - - -diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java -index 70c06ca775a6955459f36b36dbb48ad3cd1bdef0..77885f67ffa907f7b6dced5d0040d9a9a73454f4 100644 ---- a/src/main/java/net/minecraft/server/EntityDrowned.java -+++ b/src/main/java/net/minecraft/server/EntityDrowned.java -@@ -29,7 +29,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { - this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D)); - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityDrowned.class})).a(EntityPigZombie.class)); - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::i)); -- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); -+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); // Paper - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); - this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bw)); - } diff --git a/Spigot-Server-Patches/0309-Here-s-Johnny.patch b/Spigot-Server-Patches/0309-Here-s-Johnny.patch deleted file mode 100644 index f608a431f2..0000000000 --- a/Spigot-Server-Patches/0309-Here-s-Johnny.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath -Date: Fri, 12 Oct 2018 01:37:22 -0500 -Subject: [PATCH] Here's Johnny! - - -diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java -index 73ecdd22ea1157abe00795d90c3e7b748650dbc8..c974c02e92345fdc43f4acc9b02d40c735b677df 100644 ---- a/src/main/java/net/minecraft/server/EntityVindicator.java -+++ b/src/main/java/net/minecraft/server/EntityVindicator.java -@@ -11,7 +11,7 @@ public class EntityVindicator extends EntityIllagerAbstract { - private static final Predicate b = (enumdifficulty) -> { - return enumdifficulty == EnumDifficulty.NORMAL || enumdifficulty == EnumDifficulty.HARD; - }; -- private boolean bw; -+ private boolean bw; public boolean isJohnny() { return bw; } public void setJohnny(boolean johnny) { bw = johnny; } // Paper - OBFHELPER - - public EntityVindicator(EntityTypes entitytypes, World world) { - super(entitytypes, world); -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java -index 951d47929893fce38183b81cf4ec6a7d4204acd1..5ff957ced7a86f4fa3a0751b4eed5a6fdc525da4 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java -@@ -25,4 +25,14 @@ public class CraftVindicator extends CraftIllager implements Vindicator { - public EntityType getType() { - return EntityType.VINDICATOR; - } -+ -+ // Paper start -+ public boolean isJohnny() { -+ return getHandle().isJohnny(); -+ } -+ -+ public void setJohnny(boolean johnny) { -+ getHandle().setJohnny(johnny); -+ } -+ // Paper end - } diff --git a/Spigot-Server-Patches/0318-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch similarity index 71% rename from Spigot-Server-Patches/0318-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch index b81bcd787a..b61fa994c8 100644 --- a/Spigot-Server-Patches/0318-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4609e402b419ed21e17ad34d02dca55b47c1c95e..ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a 100644 +index 698619c25714d6bb296084298de4f2e39f8f9c63..28714c10c2bf30fc51c591060bec87c330fc62c1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2332,6 +2332,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2257,6 +2257,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } -+ public int getMaxAirTicks() { return bw(); } // Paper - OBFHELPER - public int bw() { ++ public int getMaxAirTicks() { return bD(); } // Paper - OBFHELPER + public int bD() { return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3175b0735f3b5f4d7e3e02dc083d32262d463de7..8c1cd0673e4b070ebbc9ecf7d9d4acf01d33ba3b 100644 +index 9972ee33433914ef9abc5075f274e58d46a9192f..8de15e4856217fb4fc4fc44d9460437e0c8c65ee 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1887,6 +1887,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2025,6 +2025,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); diff --git a/Spigot-Server-Patches/0319-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 87% rename from Spigot-Server-Patches/0319-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch index dc184c36cf..01be147e24 100644 --- a/Spigot-Server-Patches/0319-Don-t-sleep-after-profile-lookups-if-not-needed.patch +++ b/Spigot-Server-Patches/0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch @@ -7,10 +7,10 @@ Mojang was sleeping even if we had no more requests to go after the current one finished, resulting in 100ms lost per profile lookup diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java -index 71e48e87b4280f8913d762e8b4fc9bea4c7f7d29..23f1447cfcef89683a9bc98f0f912d76a1f93012 100644 +index a3ab666b5fa89aad7ee167d9aeff2f62019a4a78..8e182fdd69dba6e1c52e2f6a893534d77fb3bfaa 100644 --- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java +++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java -@@ -42,6 +42,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { +@@ -43,6 +43,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { } final int page = 0; @@ -18,7 +18,7 @@ index 71e48e87b4280f8913d762e8b4fc9bea4c7f7d29..23f1447cfcef89683a9bc98f0f912d76 for (final List request : Iterables.partition(criteria, ENTRIES_PER_PAGE)) { int failCount = 0; -@@ -67,6 +68,12 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { +@@ -68,6 +69,12 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { LOGGER.debug("Couldn't find profile {}", name); callback.onProfileLookupFailed(new GameProfile(null, name), new ProfileNotFoundException("Server did not find the requested profile")); } diff --git a/Spigot-Server-Patches/0320-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 79% rename from Spigot-Server-Patches/0320-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 3e29ce9572..84edc47501 100644 --- a/Spigot-Server-Patches/0320-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -12,17 +12,17 @@ server threads Allow usage of a single thread executor by not using ForkJoin so single core CPU's. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bbda856c148588402731c03cd166acd2e1f4eee3..5d54825171d5214d504b3fad03342c0769ff50f9 100644 +index 16a8300a202e0b33b6de472a72ebf74653bafc20..ba9b0a7b8b34919eb67c611c11dacbd1805bb226 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1361,6 +1361,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Wed, 17 Oct 2018 19:17:27 -0400 -Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles - -Say a player shoots an arrow through a nether portal, the game -would lose the shooter for determining things such as Player Kills, -because the entity is in another world. - -If the projectile fails to find the shooter in the current world, check -other worlds. - -diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 9eed1dce3e48683b751ebbaac0487a046354622e..6c091b68087d60b0b916871eb0ce06c6a2776bf8 100644 ---- a/src/main/java/net/minecraft/server/EntityProjectile.java -+++ b/src/main/java/net/minecraft/server/EntityProjectile.java -@@ -209,6 +209,16 @@ public abstract class EntityProjectile extends Entity implements IProjectile { - public EntityLiving getShooter() { - if ((this.shooter == null || this.shooter.dead) && this.shooterId != null && this.world instanceof WorldServer) { - Entity entity = ((WorldServer) this.world).getEntity(this.shooterId); -+ // Paper start - MC-50319 - shooter might be in another world (arrows through portals) -+ if (entity == null) { -+ for (WorldServer world : world.getMinecraftServer().getWorlds()) { -+ entity = world.getEntity(this.shooterId); -+ if (entity != null) { -+ break; -+ } -+ } -+ } -+ // Paper end - - if (entity instanceof EntityLiving) { - this.shooter = (EntityLiving) entity; diff --git a/Spigot-Server-Patches/0321-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0312-Optimize-World-Time-Updates.patch similarity index 94% rename from Spigot-Server-Patches/0321-Optimize-World-Time-Updates.patch rename to Spigot-Server-Patches/0312-Optimize-World-Time-Updates.patch index aeb5e6709f..d5a65cc969 100644 --- a/Spigot-Server-Patches/0321-Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/0312-Optimize-World-Time-Updates.patch @@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5d54825171d5214d504b3fad03342c0769ff50f9..738ba4ee303b796cadf17b78791fad461545f1cc 100644 +index ba9b0a7b8b34919eb67c611c11dacbd1805bb226..f1098b1b62fd568579fd0e1fda63478f58036c8c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1169,12 +1169,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java -index 685a30f3f14232dba88e22ec86e2e66f7da86d0b..9edf937a652a5b463ff049c414f3230bb0ecd9ed 100644 +index e3e4837dab995dba3c509d0e192bbfed5a1b8bc1..362750bd85bc65c304f5fece344ecdeddebaf4ee 100644 --- a/src/main/java/net/minecraft/server/BlockSponge.java +++ b/src/main/java/net/minecraft/server/BlockSponge.java @@ -115,8 +115,11 @@ public class BlockSponge extends Block { diff --git a/Spigot-Server-Patches/0325-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0316-Don-t-allow-digging-into-unloaded-chunks.patch similarity index 64% rename from Spigot-Server-Patches/0325-Don-t-allow-digging-into-unloaded-chunks.patch rename to Spigot-Server-Patches/0316-Don-t-allow-digging-into-unloaded-chunks.patch index 98e536456f..e6ca3af0bb 100644 --- a/Spigot-Server-Patches/0325-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0316-Don-t-allow-digging-into-unloaded-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 82b98839e554e02e196113d551881a524a3b1658..f45c4d1fdf7e23d23999f9ce78dcd25d9c608f49 100644 +index ff4ba9b60c60fa77f26a04a065436063270984d1..64f7694b91e4b1a84cb1f38534056c14404124fb 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1273,6 +1273,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1296,6 +1296,11 @@ public class PlayerConnection implements PacketListenerPlayIn { case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: @@ -21,48 +21,48 @@ index 82b98839e554e02e196113d551881a524a3b1658..f45c4d1fdf7e23d23999f9ce78dcd25d return; default: diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index e2e5c17c24c8f5e9807ca879b1025d13cb195226..ed3f3362b640746649455f8dd2255ac2da03df7c 100644 +index 36cf4c332054a350ae193637f895a45a8b04da9b..a32490f0eb754b065ee34c41465176db78b1625d 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -69,8 +69,8 @@ public class PlayerInteractManager { +@@ -80,8 +80,8 @@ public class PlayerInteractManager { IBlockData iblockdata; - if (this.i) { -- iblockdata = this.world.getType(this.j); + if (this.j) { +- iblockdata = this.world.getType(this.k); - if (iblockdata.isAir()) { -+ iblockdata = this.world.getTypeIfLoaded(this.j); // Paper ++ iblockdata = this.world.getTypeIfLoaded(this.k); // Paper + if (iblockdata == null || iblockdata.isAir()) { // Paper - this.i = false; + this.j = false; } else { - float f = this.a(iblockdata, this.j, this.k); -@@ -81,7 +81,13 @@ public class PlayerInteractManager { + float f = this.a(iblockdata, this.k, this.l); +@@ -92,7 +92,13 @@ public class PlayerInteractManager { } } - } else if (this.e) { -- iblockdata = this.world.getType(this.g); + } else if (this.f) { +- iblockdata = this.world.getType(this.h); + // Paper start - don't want to do same logic as above, return instead -+ iblockdata = this.world.getTypeIfLoaded(this.g); ++ iblockdata = this.world.getTypeIfLoaded(this.h); + if (iblockdata == null) { -+ this.e = false; ++ this.f = false; + return; + } + // Paper end if (iblockdata.isAir()) { - this.world.a(this.player.getId(), this.g, -1); - this.l = -1; -@@ -253,10 +259,12 @@ public class PlayerInteractManager { + this.world.a(this.player.getId(), this.h, -1); + this.m = -1; +@@ -256,10 +262,12 @@ public class PlayerInteractManager { this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(blockposition, this.world.getType(blockposition), packetplayinblockdig_enumplayerdigtype, true, "stopped destroying")); } else if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.ABORT_DESTROY_BLOCK) { - this.e = false; -- if (!Objects.equals(this.g, blockposition)) { -+ if (!Objects.equals(this.g, blockposition) && !BlockPosition.ZERO.equals(this.g)) { // Paper - PlayerInteractManager.LOGGER.debug("Mismatch in destroy block pos: " + this.g + " " + blockposition); // CraftBukkit - SPIGOT-5457 sent by client when interact event cancelled -- this.world.a(this.player.getId(), this.g, -1); -- this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(this.g, this.world.getType(this.g), packetplayinblockdig_enumplayerdigtype, true, "aborted mismatched destroying")); -+ IBlockData type = this.world.getTypeIfLoaded(this.g); // Paper - don't load unloaded chunks for stale records here -+ if (type != null) this.world.a(this.player.getId(), this.g, -1); // Paper -+ if (type != null) this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(this.g, type, packetplayinblockdig_enumplayerdigtype, true, "aborted mismatched destroying")); // Paper -+ this.g = BlockPosition.ZERO; // Paper + this.f = false; +- if (!Objects.equals(this.h, blockposition)) { ++ if (!Objects.equals(this.h, blockposition) && !BlockPosition.ZERO.equals(this.h)) { + PlayerInteractManager.LOGGER.debug("Mismatch in destroy block pos: " + this.h + " " + blockposition); // CraftBukkit - SPIGOT-5457 sent by client when interact event cancelled +- this.world.a(this.player.getId(), this.h, -1); +- this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(this.h, this.world.getType(this.h), packetplayinblockdig_enumplayerdigtype, true, "aborted mismatched destroying")); ++ IBlockData type = this.world.getTypeIfLoaded(this.h); // Paper - don't load unloaded chunks for stale records here ++ if (type != null) this.world.a(this.player.getId(), this.h, -1); // Paper ++ if (type != null) this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(this.h, type, packetplayinblockdig_enumplayerdigtype, true, "aborted mismatched destroying")); // Paper ++ this.h = BlockPosition.ZERO; // Paper } this.world.a(this.player.getId(), blockposition, -1); diff --git a/Spigot-Server-Patches/0328-Book-Size-Limits.patch b/Spigot-Server-Patches/0317-Book-Size-Limits.patch similarity index 90% rename from Spigot-Server-Patches/0328-Book-Size-Limits.patch rename to Spigot-Server-Patches/0317-Book-Size-Limits.patch index deaa619d7e..7d5aa7cfc0 100644 --- a/Spigot-Server-Patches/0328-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0317-Book-Size-Limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 79cf4e598fedf75e5ee943acb7930cb265dd11f6..6d069c73d0058f58e908f351a849ec3a753f2d22 100644 +index 29cab8730a5e61aeb8bf4d69ccad192c1ff975f4..6f688cca9f769a6d7b1d1b9bc48e16632da3a847 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -354,4 +354,11 @@ public class PaperConfig { +@@ -333,4 +333,11 @@ public class PaperConfig { velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8); } } @@ -22,18 +22,18 @@ index 79cf4e598fedf75e5ee943acb7930cb265dd11f6..6d069c73d0058f58e908f351a849ec3a + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f45c4d1fdf7e23d23999f9ce78dcd25d9c608f49..07e7093aa99015e10e44e0a6e4805701094b601d 100644 +index 64f7694b91e4b1a84cb1f38534056c14404124fb..06d4f5f0a2410478ff3eb5b9a57d963e4c74893b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -14,6 +14,7 @@ import java.util.Iterator; - import java.util.Optional; +@@ -14,6 +14,7 @@ import java.util.Optional; import java.util.Set; + import java.util.stream.Stream; import javax.annotation.Nullable; +import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -795,6 +796,42 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -814,6 +815,42 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInBEdit packetplayinbedit) { diff --git a/Spigot-Server-Patches/0329-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0318-Make-the-default-permission-message-configurable.patch similarity index 83% rename from Spigot-Server-Patches/0329-Make-the-default-permission-message-configurable.patch rename to Spigot-Server-Patches/0318-Make-the-default-permission-message-configurable.patch index 1acf2eb727..e01e5e223a 100644 --- a/Spigot-Server-Patches/0329-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0318-Make-the-default-permission-message-configurable.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 6d069c73d0058f58e908f351a849ec3a753f2d22..dbd14399707cdd43f98af40191be8ff3e76edf43 100644 +index 6f688cca9f769a6d7b1d1b9bc48e16632da3a847..1aa7d0cfaf5697daeeb98e237387f27e76bca16f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -20,6 +20,7 @@ import java.util.regex.Pattern; +@@ -19,6 +19,7 @@ import java.util.regex.Pattern; import com.google.common.collect.Lists; import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.command.Command; - import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; -@@ -280,6 +281,11 @@ public class PaperConfig { + import org.bukkit.configuration.file.YamlConfiguration; +@@ -278,6 +279,11 @@ public class PaperConfig { connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage); } @@ -29,10 +29,10 @@ index 6d069c73d0058f58e908f351a849ec3a753f2d22..dbd14399707cdd43f98af40191be8ff3 private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7b53ebb6d7cf241c6b89ec04acd0bcc25e1c105a..811e676e4f9f1f8beb8eb9e20cef3ef03633a856 100644 +index 5db8ccb0d30e2927c33b04ff51ebebd0dfe96a63..4ac310fd1b502054dc291c5e52e7845ce43364ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2180,6 +2180,11 @@ public final class CraftServer implements Server { +@@ -2235,6 +2235,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0331-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0319-Prevent-rayTrace-from-loading-chunks.patch similarity index 90% rename from Spigot-Server-Patches/0331-Prevent-rayTrace-from-loading-chunks.patch rename to Spigot-Server-Patches/0319-Prevent-rayTrace-from-loading-chunks.patch index 8e75d4a3c4..125c3c3bc2 100644 --- a/Spigot-Server-Patches/0331-Prevent-rayTrace-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0319-Prevent-rayTrace-from-loading-chunks.patch @@ -7,10 +7,10 @@ ray tracing into an unloaded chunk should be treated as a miss this saves a ton of lag for when AI tries to raytrace near unloaded chunks. diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java -index 0dff023529ba9e44a7406ad6388cad35730917ba..29cdc00875aa5004132820f36e781c7bf4573162 100644 +index 077fcb67f6248156aaebe7545e370ade4311b9e4..a59df0e48a9bcbb32c51ec0013f634d474f68e52 100644 --- a/src/main/java/net/minecraft/server/IBlockAccess.java +++ b/src/main/java/net/minecraft/server/IBlockAccess.java -@@ -41,7 +41,15 @@ public interface IBlockAccess { +@@ -46,7 +46,15 @@ public interface IBlockAccess { // CraftBukkit start - moved block handling into separate method for use by Block#rayTrace default MovingObjectPositionBlock rayTraceBlock(RayTrace raytrace1, BlockPosition blockposition) { diff --git a/Spigot-Server-Patches/0332-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0320-Handle-Large-Packets-disconnecting-client.patch similarity index 93% rename from Spigot-Server-Patches/0332-Handle-Large-Packets-disconnecting-client.patch rename to Spigot-Server-Patches/0320-Handle-Large-Packets-disconnecting-client.patch index f6bdcd6bc4..8c099de176 100644 --- a/Spigot-Server-Patches/0332-Handle-Large-Packets-disconnecting-client.patch +++ b/Spigot-Server-Patches/0320-Handle-Large-Packets-disconnecting-client.patch @@ -7,7 +7,7 @@ If a players inventory is too big to send in a single packet, split the inventory set into multiple packets instead. diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 046196d54df35ceafb8bc477e740e1dc834345d5..d4aad8a5b7dd8ee837fa7f9b70271e0554bb04e1 100644 +index 2916119507ec5ecd9266569b0003d0504a79f6c4..cd97b6a24010165d9435a5c62b6f896278674418 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -97,6 +97,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -80,10 +80,10 @@ index 63c4dbd327beb7b6ab42eb44650d68accd3b0de6..b0cfef52cbb5e23beae528668e4e98ce + // Paper end } diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 1fcbbd698a7e1b9ae3e8b5fa0328b85c43019bea..a0b87f89df77ba8ac6ce3f135d4f3a34ed2b3543 100644 +index 72ff0a1e6428a1776f49c26e1715f5f2428ba242..6e1426127fc5b5ddc205603b8d03b98a046f9741 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -79,7 +79,7 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -82,7 +82,7 @@ public class PacketPlayOutMapChunk implements Packet { int i = packetdataserializer.i(); @@ -93,7 +93,7 @@ index 1fcbbd698a7e1b9ae3e8b5fa0328b85c43019bea..a0b87f89df77ba8ac6ce3f135d4f3a34 } else { this.f = new byte[i]; diff --git a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -index f7c3655671cb75a7e78796bcddc3cfd9817e2b90..631234324d5c53015b3cef21b20bb3211e335af8 100644 +index ac42c913246f1aa9425fdf6eca48adf29e917c90..901a5df3f7d3f9ee60485ec1044a05e8aff89ccb 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java @@ -9,6 +9,15 @@ public class PacketPlayOutWindowItems implements Packet { diff --git a/Spigot-Server-Patches/0327-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0321-force-entity-dismount-during-teleportation.patch similarity index 83% rename from Spigot-Server-Patches/0327-force-entity-dismount-during-teleportation.patch rename to Spigot-Server-Patches/0321-force-entity-dismount-during-teleportation.patch index 1bb99efc20..7313539082 100644 --- a/Spigot-Server-Patches/0327-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0321-force-entity-dismount-during-teleportation.patch @@ -20,16 +20,16 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a..3d44188e68df31d188f25820000e2c39aa5b6ce0 100644 +index 28714c10c2bf30fc51c591060bec87c330fc62c1..777d2a6aac7dd1b74124b7a8af87b258a27f4726 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2033,12 +2033,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1949,12 +1949,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } -- public void stopRiding() { +- public void bb() { + // Paper start -+ public void stopRiding() { stopRiding(false); } ++ public void bb() { stopRiding(false); } + public void stopRiding(boolean suppressCancellation) { + // Paper end if (this.vehicle != null) { @@ -41,7 +41,7 @@ index ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a..3d44188e68df31d188f25820000e2c39 } } -@@ -2089,7 +2092,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2009,7 +2012,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return true; // CraftBukkit } @@ -53,7 +53,7 @@ index ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a..3d44188e68df31d188f25820000e2c39 if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2099,7 +2105,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2019,7 +2025,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) getBukkitEntity(), @@ -62,7 +62,7 @@ index ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a..3d44188e68df31d188f25820000e2c39 ); Bukkit.getPluginManager().callEvent(event); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); -@@ -2110,7 +2116,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2030,7 +2036,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end // Spigot start @@ -72,18 +72,18 @@ index ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a..3d44188e68df31d188f25820000e2c39 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index f41975165a6a66479bc8fc1811c1d271bb2a6113..61c9e030a105ee78a7e59fbf36cf7a77f87a0e88 100644 +index 0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612..8af8676888e4deff66094053d14203c2f5b20ab1 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -968,9 +968,11 @@ public abstract class EntityHuman extends EntityLiving { +@@ -942,9 +942,11 @@ public abstract class EntityHuman extends EntityLiving { return -0.35D; } - @Override -- public void stopRiding() { -- super.stopRiding(); +- public void bb() { +- super.bb(); + // Paper start -+ @Override public void stopRiding() { stopRiding(false); } ++ @Override public void bb() { stopRiding(false); } + @Override public void stopRiding(boolean suppressCancellation) { + // Paper end + super.stopRiding(suppressCancellation); // Paper - suppress @@ -91,11 +91,11 @@ index f41975165a6a66479bc8fc1811c1d271bb2a6113..61c9e030a105ee78a7e59fbf36cf7a77 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 8ac03288dc328ccd4ec7ef9080b61f005d8daac6..347d4abdecddf0c92f81b2958fbaccc22cf16b26 100644 +index 7105192a5cd8666ac46dcd8a524709d7e429d1b0..1481cbafa1b4e48822d9e0fa2735b9829440fca3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2738,11 +2738,13 @@ public abstract class EntityLiving extends Entity { - return ((Byte) this.datawatcher.get(EntityLiving.ao) & 4) != 0; +@@ -2886,11 +2886,13 @@ public abstract class EntityLiving extends Entity { + return ((Byte) this.datawatcher.get(EntityLiving.an) & 4) != 0; } - @Override @@ -112,10 +112,10 @@ index 8ac03288dc328ccd4ec7ef9080b61f005d8daac6..347d4abdecddf0c92f81b2958fbaccc2 this.a(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8c1cd0673e4b070ebbc9ecf7d9d4acf01d33ba3b..ab5e502a293c514bc0a71bb47b921a6a23a3c95a 100644 +index 8de15e4856217fb4fc4fc44d9460437e0c8c65ee..6f5045177af7a59aa0ce6982fd6a2f37e9462ff4 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1023,11 +1023,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1132,11 +1132,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } diff --git a/Spigot-Server-Patches/0330-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0322-Add-more-Zombie-API.patch similarity index 81% rename from Spigot-Server-Patches/0330-Add-more-Zombie-API.patch rename to Spigot-Server-Patches/0322-Add-more-Zombie-API.patch index 93f734c026..80105a9fa1 100644 --- a/Spigot-Server-Patches/0330-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0322-Add-more-Zombie-API.patch @@ -5,31 +5,31 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index bed15873b675bbd05c0149d655f9fb165bbbc73e..6d53254f8381f3a957673930c7fdf42d4b9d2f36 100644 +index df98f2244a161c0e66e80f92c91760409734dc69..081baca9a101d188e4810d04f69811d52de7a107 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1260,6 +1260,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1423,6 +1423,8 @@ public abstract class EntityInsentient extends EntityLiving { this.datawatcher.set(EntityInsentient.b, flag ? (byte) (b0 | 2) : (byte) (b0 & -3)); } + public boolean isArmsRaisedZombie() { return (this.datawatcher.get(EntityInsentient.b) & 4) != 0; } // Paper - OBFHELPER -+ public void setArmsRaisedZombie(boolean flag) { this.q(flag); } // Paper - OBFHELPER - public void q(boolean flag) { ++ public void setArmsRaisedZombie(boolean flag) { this.setAggressive(flag); } // Paper - OBFHELPER + public void setAggressive(boolean flag) { byte b0 = (Byte) this.datawatcher.get(EntityInsentient.b); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 97a1dedf7460d513a560d722b2e0f1bf09fe669c..d64c03f006af1c829862d02d1fc4fde007dd9a5b 100644 +index 3f16f9b34a75db6dc977cb0dc1603db34dd8ddc3..18705e1e2a04ec2790b104a290b9edc8e9fb4f1a 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 { - private int bC; + private int bA; public int drownedConversionTime; private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field + private boolean shouldBurnInDay = true; // Paper public EntityZombie(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -80,6 +81,7 @@ public class EntityZombie extends EntityMonster { +@@ -74,6 +75,7 @@ public class EntityZombie extends EntityMonster { this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false); } @@ -37,7 +37,7 @@ index 97a1dedf7460d513a560d722b2e0f1bf09fe669c..d64c03f006af1c829862d02d1fc4fde0 public boolean isDrownConverting() { return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING); } -@@ -212,6 +214,13 @@ public class EntityZombie extends EntityMonster { +@@ -206,6 +208,13 @@ public class EntityZombie extends EntityMonster { this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); } @@ -48,15 +48,15 @@ index 97a1dedf7460d513a560d722b2e0f1bf09fe669c..d64c03f006af1c829862d02d1fc4fde0 + } + // Paper end + - protected void ev() { - this.b(EntityTypes.DROWNED); - this.world.a((EntityHuman) null, 1040, new BlockPosition(this), 0); -@@ -292,10 +301,17 @@ public class EntityZombie extends EntityMonster { - } + protected void eQ() { + this.c(EntityTypes.DROWNED); + if (!this.isSilent()) { +@@ -225,10 +234,17 @@ public class EntityZombie extends EntityMonster { + } -+ public boolean shouldBurnInDay() { return K_(); } // Paper - OBFHELPER - protected boolean K_() { ++ public boolean shouldBurnInDay() { return U_(); } // Paper - OBFHELPER + protected boolean U_() { - return true; + return shouldBurnInDay; } @@ -70,15 +70,15 @@ index 97a1dedf7460d513a560d722b2e0f1bf09fe669c..d64c03f006af1c829862d02d1fc4fde0 @Override public boolean damageEntity(DamageSource damagesource, float f) { if (super.damageEntity(damagesource, f)) { -@@ -413,6 +429,7 @@ public class EntityZombie extends EntityMonster { - nbttagcompound.setBoolean("CanBreakDoors", this.ey()); - nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bC : -1); +@@ -348,6 +364,7 @@ public class EntityZombie extends EntityMonster { + nbttagcompound.setBoolean("CanBreakDoors", this.eV()); + nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bA : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); + nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper } @Override -@@ -427,7 +444,11 @@ public class EntityZombie extends EntityMonster { +@@ -362,7 +379,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/0334-Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/0323-Add-PlayerConnectionCloseEvent.patch similarity index 92% rename from Spigot-Server-Patches/0334-Add-PlayerConnectionCloseEvent.patch rename to Spigot-Server-Patches/0323-Add-PlayerConnectionCloseEvent.patch index 0197eb474f..56d5df397c 100644 --- a/Spigot-Server-Patches/0334-Add-PlayerConnectionCloseEvent.patch +++ b/Spigot-Server-Patches/0323-Add-PlayerConnectionCloseEvent.patch @@ -34,10 +34,10 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent is undefined. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 47cf105019b3ea28f413274d234a34cdb41941dd..f1222fcb2bd52b8781d0f92c94e1472fa7b1e493 100644 +index 57520943befea80b334ccf2385057b88131ddd8e..8c5c57ecd98a286a4992a36effae95596b37fc8a 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -35,9 +35,9 @@ public class LoginListener implements PacketLoginInListener { +@@ -34,9 +34,9 @@ public class LoginListener implements PacketLoginInListener { private final byte[] e = new byte[4]; private final MinecraftServer server; public final NetworkManager networkManager; @@ -50,11 +50,11 @@ index 47cf105019b3ea28f413274d234a34cdb41941dd..f1222fcb2bd52b8781d0f92c94e1472f private SecretKey loginKey; private EntityPlayer l; diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index d4aad8a5b7dd8ee837fa7f9b70271e0554bb04e1..b1dededc15cce686ead74a99bee64c89ac1de22c 100644 +index cd97b6a24010165d9435a5c62b6f896278674418..64d61eca4bbb4a9e18d78c8d2a55114134f56b6f 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -336,6 +336,26 @@ public class NetworkManager extends SimpleChannelInboundHandler> { - this.i().a(new ChatMessage("multiplayer.disconnect.generic", new Object[0])); +@@ -335,6 +335,26 @@ public class NetworkManager extends SimpleChannelInboundHandler> { + this.i().a(new ChatMessage("multiplayer.disconnect.generic")); } this.packetQueue.clear(); // Free up packet queue. + // Paper start - Add PlayerConnectionCloseEvent diff --git a/Spigot-Server-Patches/0335-Prevent-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/0324-Prevent-Enderman-from-loading-chunks.patch similarity index 86% rename from Spigot-Server-Patches/0335-Prevent-Enderman-from-loading-chunks.patch rename to Spigot-Server-Patches/0324-Prevent-Enderman-from-loading-chunks.patch index 40f98fe856..b94647d3de 100644 --- a/Spigot-Server-Patches/0335-Prevent-Enderman-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0324-Prevent-Enderman-from-loading-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent Enderman from loading chunks diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index d86f76f30be54767d0243df716fe743e24db6726..212636dcb2107816340f40784f9f89a7daf50ad2 100644 +index 8da3b10cd6db379cf5d9d667154dd8911813284b..b61de33513989a9097e2729f0bd733dda687644d 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -344,7 +344,8 @@ public class EntityEnderman extends EntityMonster { +@@ -381,7 +381,8 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { int j = MathHelper.floor(this.enderman.locY() + random.nextDouble() * 3.0D); int k = MathHelper.floor(this.enderman.locZ() - 2.0D + random.nextDouble() * 4.0D); BlockPosition blockposition = new BlockPosition(i, j, k); @@ -18,7 +18,7 @@ index d86f76f30be54767d0243df716fe743e24db6726..212636dcb2107816340f40784f9f89a7 Block block = iblockdata.getBlock(); Vec3D vec3d = new Vec3D((double) MathHelper.floor(this.enderman.locX()) + 0.5D, (double) j + 0.5D, (double) MathHelper.floor(this.enderman.locZ()) + 0.5D); Vec3D vec3d1 = new Vec3D((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D); -@@ -386,7 +387,8 @@ public class EntityEnderman extends EntityMonster { +@@ -423,7 +424,8 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { int j = MathHelper.floor(this.a.locY() + random.nextDouble() * 2.0D); int k = MathHelper.floor(this.a.locZ() - 1.0D + random.nextDouble() * 2.0D); BlockPosition blockposition = new BlockPosition(i, j, k); diff --git a/Spigot-Server-Patches/0336-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 88% rename from Spigot-Server-Patches/0336-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to Spigot-Server-Patches/0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 0d2b0e25fd..7c8b0c5b65 100644 --- a/Spigot-Server-Patches/0336-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ab5e502a293c514bc0a71bb47b921a6a23a3c95a..98d480165ff3446317b4c9358a936cd7276cf908 100644 +index 6f5045177af7a59aa0ce6982fd6a2f37e9462ff4..cafe8de58abb56bbf0b33c0aa35acf638eb2ee97 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -76,6 +76,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -80,6 +80,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int ping; public boolean viewingCredits; private int containerUpdateDelay; // Paper @@ -28,10 +28,10 @@ index ab5e502a293c514bc0a71bb47b921a6a23a3c95a..98d480165ff3446317b4c9358a936cd7 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 917ea676d9ce2ea0b10e3a75b7f35f011c3599f6..6d7eb21fb05b2771084ab634ff4d32997b62ee9e 100644 +index 8c1d836538c678feca56076753e8781eadcd6d1d..a6606eff5ac89c54bdcbee0d3bf124d737d9735b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -94,6 +94,7 @@ public abstract class PlayerList { +@@ -97,6 +97,7 @@ public abstract class PlayerList { } public void a(NetworkManager networkmanager, EntityPlayer entityplayer) { @@ -40,10 +40,10 @@ index 917ea676d9ce2ea0b10e3a75b7f35f011c3599f6..6d7eb21fb05b2771084ab634ff4d3299 UserCache usercache = this.server.getUserCache(); GameProfile gameprofile1 = usercache.getProfile(gameprofile.getId()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index 0e8a21b80371dd5ce833da3daf12fdcd9aabae9f..32e02af96e8f8db68509022f742a1239c9b7b4c7 100644 +index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c0235250ed6e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -@@ -260,6 +260,61 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa +@@ -244,6 +244,61 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa return getData() != null; } @@ -106,10 +106,10 @@ index 0e8a21b80371dd5ce833da3daf12fdcd9aabae9f..32e02af96e8f8db68509022f742a1239 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5445554b18c22b85cf9b3427c22d693a24bc596b..2b18f158b14ca3968f4382fc1436e04d155e04a4 100644 +index e112a87792a76ccbc25caa1253c54db601de76aa..346629cba5ff956229e386caa5449fd068a16c60 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -138,6 +138,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 5445554b18c22b85cf9b3427c22d693a24bc596b..2b18f158b14ca3968f4382fc1436e04d // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1348,6 +1349,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1389,6 +1390,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 5445554b18c22b85cf9b3427c22d693a24bc596b..2b18f158b14ca3968f4382fc1436e04d public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1370,6 +1383,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1411,6 +1424,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index 5445554b18c22b85cf9b3427c22d693a24bc596b..2b18f158b14ca3968f4382fc1436e04d if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1384,6 +1399,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1425,6 +1440,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); diff --git a/Spigot-Server-Patches/0337-Fix-PlayerEditBookEvent.patch b/Spigot-Server-Patches/0326-Fix-PlayerEditBookEvent.patch similarity index 91% rename from Spigot-Server-Patches/0337-Fix-PlayerEditBookEvent.patch rename to Spigot-Server-Patches/0326-Fix-PlayerEditBookEvent.patch index 27d2476933..9fa41f0874 100644 --- a/Spigot-Server-Patches/0337-Fix-PlayerEditBookEvent.patch +++ b/Spigot-Server-Patches/0326-Fix-PlayerEditBookEvent.patch @@ -10,10 +10,10 @@ it impossible to properly cancel the event or modify the book meta cancelled writing diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 07e7093aa99015e10e44e0a6e4805701094b601d..da99aed8e7a94c43f9e1bcbf711ad19f41ecc634 100644 +index 06d4f5f0a2410478ff3eb5b9a57d963e4c74893b..782cfec6247d52a0e3aa12f21247f3aab1bb3c47 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -871,9 +871,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -890,9 +890,11 @@ public class PlayerConnection implements PacketListenerPlayIn { itemstack2.a("pages", (NBTBase) nbttaglist); this.player.a(packetplayinbedit.d(), CraftEventFactory.handleEditBookEvent(player, enumitemslot, itemstack1, itemstack2)); // CraftBukkit } else { diff --git a/Spigot-Server-Patches/0338-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0327-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 80% rename from Spigot-Server-Patches/0338-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to Spigot-Server-Patches/0327-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index 855b157d7a..c33559cdb0 100644 --- a/Spigot-Server-Patches/0338-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/Spigot-Server-Patches/0327-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 98d480165ff3446317b4c9358a936cd7276cf908..2f09034fd9ee037987de06bbd130b379089ff306 100644 +index cafe8de58abb56bbf0b33c0aa35acf638eb2ee97..d137fd0b0543fb59aeaa40329c552edf689276e2 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1291,6 +1291,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - public void n() { - this.cq = true; +@@ -1398,6 +1398,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + public void p() { + this.co = true; this.ejectPassengers(); + + // Paper start - Workaround an issue where the vehicle doesn't track the passenger disconnection dismount. diff --git a/Spigot-Server-Patches/0339-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch b/Spigot-Server-Patches/0328-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch similarity index 91% rename from Spigot-Server-Patches/0339-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch rename to Spigot-Server-Patches/0328-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch index bd4dfeec9b..d40aa8bc37 100644 --- a/Spigot-Server-Patches/0339-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch +++ b/Spigot-Server-Patches/0328-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch @@ -24,10 +24,10 @@ Instead we opt to remove the check entirely so that the event fires for all piston types. diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index 1170a28107bee73c32cedd6a0a3d1d7c65129b10..b29525c40dc8e3ae747b8ddf5a3bd79b7cc0b792 100644 +index d4e2c68d32aa7113cf344a154777f2314ca03cca..c068a4115e3b82f4886d822d2472e8b522946674 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java -@@ -122,7 +122,7 @@ public class BlockPiston extends BlockDirectional { +@@ -112,7 +112,7 @@ public class BlockPiston extends BlockDirectional { } // CraftBukkit start @@ -36,7 +36,7 @@ index 1170a28107bee73c32cedd6a0a3d1d7c65129b10..b29525c40dc8e3ae747b8ddf5a3bd79b org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.of(), CraftBlock.notchToBlockFace(enumdirection)); world.getServer().getPluginManager().callEvent(event); -@@ -130,7 +130,7 @@ public class BlockPiston extends BlockDirectional { +@@ -120,7 +120,7 @@ public class BlockPiston extends BlockDirectional { if (event.isCancelled()) { return; } @@ -44,4 +44,4 @@ index 1170a28107bee73c32cedd6a0a3d1d7c65129b10..b29525c40dc8e3ae747b8ddf5a3bd79b + //} // Paper // PAIL: checkME - what happened to setTypeAndData? // CraftBukkit end - world.playBlockAction(blockposition, this, b0, enumdirection.b()); + world.playBlockAction(blockposition, this, b0, enumdirection.c()); diff --git a/Spigot-Server-Patches/0340-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0329-Block-Entity-remove-from-being-called-on-Players.patch similarity index 89% rename from Spigot-Server-Patches/0340-Block-Entity-remove-from-being-called-on-Players.patch rename to Spigot-Server-Patches/0329-Block-Entity-remove-from-being-called-on-Players.patch index 8c99ab2b44..713a6809cc 100644 --- a/Spigot-Server-Patches/0340-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0329-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2b18f158b14ca3968f4382fc1436e04d155e04a4..a614db834dfe8096ec0a7e6bc6e0348bfb300a1d 100644 +index 346629cba5ff956229e386caa5449fd068a16c60..addce5ab16b975b3c6690ae09aef88dfbfb454b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1949,6 +1949,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1989,6 +1989,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } diff --git a/Spigot-Server-Patches/0341-BlockDestroyEvent.patch b/Spigot-Server-Patches/0330-BlockDestroyEvent.patch similarity index 77% rename from Spigot-Server-Patches/0341-BlockDestroyEvent.patch rename to Spigot-Server-Patches/0330-BlockDestroyEvent.patch index 3c3f0d5790..b1debf0a1b 100644 --- a/Spigot-Server-Patches/0341-BlockDestroyEvent.patch +++ b/Spigot-Server-Patches/0330-BlockDestroyEvent.patch @@ -11,10 +11,10 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 29594e5fcddfd47d543813a2bf12234d9cbd29fd..3d13efc50b06748b94d6bb4a5a2f9ade1699a726 100644 +index a47de606a82b840180bd203816955fb657cc7c6c..366e4c6f3d83fd038c08f92d97d500e47d8e2104 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -453,8 +453,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -529,8 +529,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return false; } else { Fluid fluid = this.getFluid(blockposition); @@ -31,8 +31,8 @@ index 29594e5fcddfd47d543813a2bf12234d9cbd29fd..3d13efc50b06748b94d6bb4a5a2f9ade + } + // Paper end -- this.triggerEffect(2001, blockposition, Block.getCombinedId(iblockdata)); -+ if (playEffect) this.triggerEffect(2001, blockposition, Block.getCombinedId(iblockdata)); // Paper - if (flag) { - TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? this.getTileEntity(blockposition) : null; +- if (!(iblockdata.getBlock() instanceof BlockFireAbstract)) { ++ if (playEffect && !(iblockdata.getBlock() instanceof BlockFireAbstract)) { // Paper + this.triggerEffect(2001, blockposition, Block.getCombinedId(iblockdata)); + } diff --git a/Spigot-Server-Patches/0342-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/Spigot-Server-Patches/0331-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 100% rename from Spigot-Server-Patches/0342-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to Spigot-Server-Patches/0331-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch diff --git a/Spigot-Server-Patches/0343-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0332-Fix-sign-edit-memory-leak.patch similarity index 74% rename from Spigot-Server-Patches/0343-Fix-sign-edit-memory-leak.patch rename to Spigot-Server-Patches/0332-Fix-sign-edit-memory-leak.patch index c84015f126..4fea6bbb43 100644 --- a/Spigot-Server-Patches/0343-Fix-sign-edit-memory-leak.patch +++ b/Spigot-Server-Patches/0332-Fix-sign-edit-memory-leak.patch @@ -6,31 +6,31 @@ Subject: [PATCH] Fix sign edit memory leak when a player edits a sign, a reference to their Entity is never cleand up. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index da99aed8e7a94c43f9e1bcbf711ad19f41ecc634..a2ef24d7eb10f2bebfc095ff6707d1fab171b284 100644 +index 782cfec6247d52a0e3aa12f21247f3aab1bb3c47..76d67b6b0afa590e7e0f838aa7abb4efadfda045 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2547,7 +2547,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2586,7 +2586,7 @@ public class PlayerConnection implements PacketListenerPlayIn { TileEntitySign tileentitysign = (TileEntitySign) tileentity; - if (!tileentitysign.d() || tileentitysign.f() != this.player) { + if (!tileentitysign.d() || tileentitysign.signEditor == null || !tileentitysign.signEditor.equals(this.player.getUniqueID())) { - this.minecraftServer.warning("Player " + this.player.getDisplayName().getString() + " just tried to change non-editable sign"); + PlayerConnection.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getDisplayName().getString()); this.sendPacket(tileentity.getUpdatePacket()); // CraftBukkit return; diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 03f6ddf0003f0ef44ede31cf7a3491580ff0b5de..a934020190da937adaf2a0599259f85d3cbda269 100644 +index 8e77c662f7d970d8ff86f6c5b9bccc598442594d..2746cb4d4950b303f4d6b4822223d26b51ebe5a4 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java -@@ -10,6 +10,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -11,6 +11,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // private EntityHuman c; - private final String[] g = new String[4]; + private final IChatFormatted[] g; private EnumColor color; + public java.util.UUID signEditor; // Paper public TileEntitySign() { super(TileEntityTypes.SIGN); -@@ -108,7 +109,10 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -112,7 +113,10 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // } public void a(EntityHuman entityhuman) { diff --git a/Spigot-Server-Patches/0333-Lazy-init-world-storage-in-CraftOfflinePlayer.patch b/Spigot-Server-Patches/0333-Lazy-init-world-storage-in-CraftOfflinePlayer.patch deleted file mode 100644 index 6b1e4eb6ef..0000000000 --- a/Spigot-Server-Patches/0333-Lazy-init-world-storage-in-CraftOfflinePlayer.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Tue, 11 Dec 2018 22:25:07 -0500 -Subject: [PATCH] Lazy init world storage in CraftOfflinePlayer - -Allows access to some offline player properties even when there are no -worlds loaded. This is typically a rare occurrence but probably one that -should be covered as best we can. - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index 58e10381c898afc676b64cb02a16fbcedf151041..0e8a21b80371dd5ce833da3daf12fdcd9aabae9f 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -@@ -29,12 +29,12 @@ import org.bukkit.plugin.Plugin; - public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializable { - private final GameProfile profile; - private final CraftServer server; -- private final WorldNBTStorage storage; -+ private WorldNBTStorage storage; // Paper - lazy init - - protected CraftOfflinePlayer(CraftServer server, GameProfile profile) { - this.server = server; - this.profile = profile; -- this.storage = (WorldNBTStorage) (server.console.getWorldServer(DimensionManager.OVERWORLD).getDataManager()); -+ //this.storage = (WorldNBTStorage) (server.console.getWorldServer(DimensionManager.OVERWORLD).getDataManager()); // Paper - lazy init - - } - -@@ -181,8 +181,23 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa - return hash; - } - -+ // Paper - lazy -+ private WorldNBTStorage getStorageLazy() { -+ if (this.storage == null) { -+ net.minecraft.server.WorldServer worldServer = server.console.getWorldServer(DimensionManager.OVERWORLD); -+ if (worldServer == null) { -+ throw new IllegalStateException("Cannot get world storage when there are no worlds loaded!"); -+ } else { -+ this.storage = (WorldNBTStorage) worldServer.getDataManager(); -+ } -+ } -+ -+ return this.storage; -+ } -+ // Paper end -+ - private NBTTagCompound getData() { -- return storage.getPlayerData(getUniqueId().toString()); -+ return getStorageLazy().getPlayerData(getUniqueId().toString()); - } - - private NBTTagCompound getBukkitData() { -@@ -199,7 +214,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa - } - - private File getDataFile() { -- return new File(storage.getPlayerDir(), getUniqueId() + ".dat"); -+ return new File(getStorageLazy().getPlayerDir(), getUniqueId() + ".dat"); - } - - @Override diff --git a/Spigot-Server-Patches/0344-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0333-Limit-Client-Sign-length-more.patch similarity index 94% rename from Spigot-Server-Patches/0344-Limit-Client-Sign-length-more.patch rename to Spigot-Server-Patches/0333-Limit-Client-Sign-length-more.patch index 04e94a9a86..8f91800e6f 100644 --- a/Spigot-Server-Patches/0344-Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/0333-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a2ef24d7eb10f2bebfc095ff6707d1fab171b284..c215cb599da70403a46b09c1cdb01e02aadc96b7 100644 +index 76d67b6b0afa590e7e0f838aa7abb4efadfda045..0296dfc4e944de9156715c93a33b699c2d7cf63a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -103,6 +103,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -33,7 +33,7 @@ index a2ef24d7eb10f2bebfc095ff6707d1fab171b284..c215cb599da70403a46b09c1cdb01e02 private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { -@@ -2563,6 +2564,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2602,6 +2603,15 @@ public class PlayerConnection implements PacketListenerPlayIn { String[] lines = new String[4]; for (int i = 0; i < astring.length; ++i) { diff --git a/Spigot-Server-Patches/0345-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/Spigot-Server-Patches/0334-Don-t-check-ConvertSigns-boolean-every-sign-save.patch similarity index 80% rename from Spigot-Server-Patches/0345-Don-t-check-ConvertSigns-boolean-every-sign-save.patch rename to Spigot-Server-Patches/0334-Don-t-check-ConvertSigns-boolean-every-sign-save.patch index 5b34219b56..e334dde496 100644 --- a/Spigot-Server-Patches/0345-Don-t-check-ConvertSigns-boolean-every-sign-save.patch +++ b/Spigot-Server-Patches/0334-Don-t-check-ConvertSigns-boolean-every-sign-save.patch @@ -7,18 +7,18 @@ property lookups arent super cheap. they synchronize, validate and check security managers. diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index a934020190da937adaf2a0599259f85d3cbda269..0e9a90b70f84b8da530814ac0b9b4b5fef458729 100644 +index 2746cb4d4950b303f4d6b4822223d26b51ebe5a4..c4b0d8720e71c7bf2cac7ed962b8fd33cf0b49b3 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java -@@ -11,6 +11,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // - private final String[] g = new String[4]; +@@ -12,6 +12,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // + private final IChatFormatted[] g; private EnumColor color; public java.util.UUID signEditor; // Paper + private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); // Paper public TileEntitySign() { super(TileEntityTypes.SIGN); -@@ -28,7 +29,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -32,7 +33,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // } // CraftBukkit start diff --git a/Spigot-Server-Patches/0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 92% rename from Spigot-Server-Patches/0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to Spigot-Server-Patches/0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index 3dd3be3280..916220447e 100644 --- a/Spigot-Server-Patches/0346-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -28,7 +28,7 @@ and then catch exceptions and close if they fire. Part of this commit was authored by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index b1dededc15cce686ead74a99bee64c89ac1de22c..32886109d03f9991446381160d5406056d2bf860 100644 +index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40e4902f29 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -64,6 +64,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -50,8 +50,8 @@ index b1dededc15cce686ead74a99bee64c89ac1de22c..32886109d03f9991446381160d540605 this.channel.attr(NetworkManager.c).set(enumprotocol); this.channel.config().setAutoRead(true); NetworkManager.LOGGER.debug("Enabled auto read"); -@@ -158,19 +163,82 @@ public class NetworkManager extends SimpleChannelInboundHandler> { - NetworkManager.LOGGER.debug("Set listener of {} to {}", this, packetlistener); +@@ -157,19 +162,82 @@ public class NetworkManager extends SimpleChannelInboundHandler> { + Validate.notNull(packetlistener, "packetListener", new Object[0]); this.packetListener = packetlistener; } + // Paper start @@ -138,7 +138,7 @@ index b1dededc15cce686ead74a99bee64c89ac1de22c..32886109d03f9991446381160d540605 } private void dispatchPacket(Packet packet, @Nullable GenericFutureListener> genericFutureListener) { this.b(packet, genericFutureListener); } // Paper - OBFHELPER -@@ -184,51 +252,116 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -183,51 +251,116 @@ public class NetworkManager extends SimpleChannelInboundHandler> { this.channel.config().setAutoRead(false); } @@ -265,7 +265,7 @@ index b1dededc15cce686ead74a99bee64c89ac1de22c..32886109d03f9991446381160d540605 public void a() { this.o(); -@@ -257,9 +390,21 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -256,9 +389,21 @@ public class NetworkManager extends SimpleChannelInboundHandler> { return this.socketAddress; } @@ -287,7 +287,7 @@ index b1dededc15cce686ead74a99bee64c89ac1de22c..32886109d03f9991446381160d540605 // Spigot End if (this.channel.isOpen()) { this.channel.close(); // We can't wait as this may be called from an event loop. -@@ -327,7 +472,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -326,7 +471,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { public void handleDisconnection() { if (this.channel != null && !this.channel.isOpen()) { if (this.o) { @@ -296,9 +296,9 @@ index b1dededc15cce686ead74a99bee64c89ac1de22c..32886109d03f9991446381160d540605 } else { this.o = true; if (this.j() != null) { -@@ -335,7 +480,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -334,7 +479,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } else if (this.i() != null) { - this.i().a(new ChatMessage("multiplayer.disconnect.generic", new Object[0])); + this.i().a(new ChatMessage("multiplayer.disconnect.generic")); } - this.packetQueue.clear(); // Free up packet queue. + clearPacketQueue(); // Paper @@ -331,18 +331,18 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..c5edf8c4b01cc7ddac06797133e6fd13 return false; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6d7eb21fb05b2771084ab634ff4d32997b62ee9e..133a6eb9785baa0720ae254636d1ecafb5ee0217 100644 +index a6606eff5ac89c54bdcbee0d3bf124d737d9735b..7b3ac5620d5556a55838f1d57b3cbc11955a5712 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -143,6 +143,7 @@ public abstract class PlayerList { +@@ -166,6 +166,7 @@ public abstract class PlayerList { + boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); - // CraftBukkit - getType() // Spigot - view distance + networkmanager.queueImmunity = true; // Paper - playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), WorldData.c(worlddata.getSeed()), worlddata.isHardcore(), worldserver.worldProvider.getDimensionManager().getType(), this.getMaxPlayers(), worlddata.getType(), worldserver.spigotConfig.viewDistance, flag1, !flag)); + playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); -@@ -152,6 +153,7 @@ public abstract class PlayerList { +@@ -175,6 +176,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23))); // Paper - fix this rule not being initialized on the client @@ -351,10 +351,10 @@ index 6d7eb21fb05b2771084ab634ff4d32997b62ee9e..133a6eb9785baa0720ae254636d1ecaf entityplayer.getStatisticManager().c(); entityplayer.B().a(entityplayer); diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index 37a22ba6f7a2ac54759428d23d5ea9787bb557f7..ceecb78ff879e4d6a3295b05d04deb01b7fb1da6 100644 +index 7abb122943b8a5ce0e888d16d1592a127bb9bb6f..8055a8aab682cfd81fc45f587d3578e25a2128f0 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java +++ b/src/main/java/net/minecraft/server/ServerConnection.java -@@ -41,10 +41,12 @@ public class ServerConnection { +@@ -40,10 +40,12 @@ public class ServerConnection { private final List connectedChannels = Collections.synchronizedList(Lists.newArrayList()); // Paper start - prevent blocking on adding a new network manager while the server is ticking private final java.util.Queue pending = new java.util.concurrent.ConcurrentLinkedQueue<>(); @@ -367,7 +367,7 @@ index 37a22ba6f7a2ac54759428d23d5ea9787bb557f7..ceecb78ff879e4d6a3295b05d04deb01 } } // Paper end -@@ -79,6 +81,7 @@ public class ServerConnection { +@@ -78,6 +80,7 @@ public class ServerConnection { ; } diff --git a/Spigot-Server-Patches/0347-Handle-Oversized-Tile-Entities-in-chunks.patch b/Spigot-Server-Patches/0336-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 83% rename from Spigot-Server-Patches/0347-Handle-Oversized-Tile-Entities-in-chunks.patch rename to Spigot-Server-Patches/0336-Handle-Oversized-Tile-Entities-in-chunks.patch index 8303b56472..0adb9b89ea 100644 --- a/Spigot-Server-Patches/0347-Handle-Oversized-Tile-Entities-in-chunks.patch +++ b/Spigot-Server-Patches/0336-Handle-Oversized-Tile-Entities-in-chunks.patch @@ -9,10 +9,10 @@ creating too large of a packet to sed. Co authored by Spottedleaf diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index a0b87f89df77ba8ac6ce3f135d4f3a34ed2b3543..23223f3f45210cf23f44f9012f292db80df781a0 100644 +index 6e1426127fc5b5ddc205603b8d03b98a046f9741..900f16efde29ace3f073b1cbc01df8bafc360a9a 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -23,6 +23,15 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -24,6 +24,15 @@ public class PacketPlayOutMapChunk implements Packet { public PacketPlayOutMapChunk() {} @@ -25,18 +25,18 @@ index a0b87f89df77ba8ac6ce3f135d4f3a34ed2b3543..23223f3f45210cf23f44f9012f292db8 + return extraPackets; + } + // Paper end - public PacketPlayOutMapChunk(Chunk chunk, int i) { + public PacketPlayOutMapChunk(Chunk chunk, int i, boolean flag) { ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); -@@ -49,6 +58,7 @@ public class PacketPlayOutMapChunk implements Packet { - this.c = this.a(new PacketDataSerializer(this.j()), chunk, i); +@@ -51,6 +60,7 @@ public class PacketPlayOutMapChunk implements Packet { + this.c = this.a(new PacketDataSerializer(this.k()), chunk, i); this.g = Lists.newArrayList(); iterator = chunk.getTileEntities().entrySet().iterator(); + int totalTileEntities = 0; // Paper while (iterator.hasNext()) { entry = (Entry) iterator.next(); -@@ -57,6 +67,15 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -59,6 +69,15 @@ public class PacketPlayOutMapChunk implements Packet { int j = blockposition.getY() >> 4; if (this.f() || (i & 1 << j) != 0) { diff --git a/Spigot-Server-Patches/0348-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch similarity index 52% rename from Spigot-Server-Patches/0348-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch rename to Spigot-Server-Patches/0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index 5e8d349191..135948b87f 100644 --- a/Spigot-Server-Patches/0348-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -10,32 +10,11 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 -diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java -index 8570e38f42e2f489e2899ac2f0c4a7b8dda3bb75..c97be42dd7b4c6ea2cadcc97f47185c7f02e2cce 100644 ---- a/src/main/java/net/minecraft/server/JsonList.java -+++ b/src/main/java/net/minecraft/server/JsonList.java -@@ -64,6 +64,7 @@ public class JsonList> { - return this.e; - } - -+ public void setEnabled(boolean flag) { this.a(flag); } // Paper - OBFHeLPER - public void a(boolean flag) { - this.e = flag; - } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 133a6eb9785baa0720ae254636d1ecafb5ee0217..566aad94dc986fa1d8a2e139e79a24d567c3c6ef 100644 +index 7b3ac5620d5556a55838f1d57b3cbc11955a5712..ce2cf5f9432c9e20d351914646a78974d1f17b03 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -62,7 +62,7 @@ public abstract class PlayerList { - // private final Map p; - // CraftBukkit end - public IPlayerFileData playerFileData; -- private boolean hasWhitelist; -+ //private boolean hasWhitelist; - protected final int maxPlayers; - private int viewDistance; - private EnumGamemode t; -@@ -889,9 +889,9 @@ public abstract class PlayerList { +@@ -931,9 +931,9 @@ public abstract class PlayerList { } public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) { boolean isOp = this.operators.d(gameprofile); @@ -47,17 +26,3 @@ index 133a6eb9785baa0720ae254636d1ecafb5ee0217..566aad94dc986fa1d8a2e139e79a24d5 event.callEvent(); if (!event.isWhitelisted()) { if (loginEvent != null) { -@@ -1022,11 +1022,11 @@ public abstract class PlayerList { - } - - public boolean getHasWhitelist() { -- return this.hasWhitelist; -+ return this.whitelist.isEnabled(); // Paper - } - - public void setHasWhitelist(boolean flag) { -- this.hasWhitelist = flag; -+ this.whitelist.setEnabled(flag); // Paper - } - - public List b(String s) { diff --git a/Spigot-Server-Patches/0349-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch similarity index 72% rename from Spigot-Server-Patches/0349-Set-Zombie-last-tick-at-start-of-drowning-process.patch rename to Spigot-Server-Patches/0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch index a7e687c118..a3745587c3 100644 --- a/Spigot-Server-Patches/0349-Set-Zombie-last-tick-at-start-of-drowning-process.patch +++ b/Spigot-Server-Patches/0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch @@ -6,14 +6,14 @@ Subject: [PATCH] Set Zombie last tick at start of drowning process Fixes GH-1887 diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index d64c03f006af1c829862d02d1fc4fde007dd9a5b..e8b9a21baf74645cc07cd9daf741bf9f65deff08 100644 +index 18705e1e2a04ec2790b104a290b9edc8e9fb4f1a..9bb54d13a318199bbce3d5b32db3710f822daa40 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -168,6 +168,7 @@ public class EntityZombie extends EntityMonster { - ++this.bC; - if (this.bC >= 600) { +@@ -162,6 +162,7 @@ public class EntityZombie extends EntityMonster { + ++this.bA; + if (this.bA >= 600) { this.startDrownedConversion(300); + this.lastTick = MinecraftServer.currentTick; // Paper - Make sure this is set at start of process - GH-1887 } } else { - this.bC = -1; + this.bA = -1; diff --git a/Spigot-Server-Patches/0350-Allow-Saving-of-Oversized-Chunks.patch b/Spigot-Server-Patches/0339-Allow-Saving-of-Oversized-Chunks.patch similarity index 94% rename from Spigot-Server-Patches/0350-Allow-Saving-of-Oversized-Chunks.patch rename to Spigot-Server-Patches/0339-Allow-Saving-of-Oversized-Chunks.patch index 93dccd951b..4eef91158a 100644 --- a/Spigot-Server-Patches/0350-Allow-Saving-of-Oversized-Chunks.patch +++ b/Spigot-Server-Patches/0339-Allow-Saving-of-Oversized-Chunks.patch @@ -51,7 +51,7 @@ index db66d4ac7dc1bede8b674cd9ad8f56dd989b6693..2322c0c8c5aacebb6317eab8ce424555 a((NBTBase) nbttagcompound, dataoutput); } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index cee1ea8f43e3135cd72a67c1c8067174feaf956e..6b543f89d4e32fb79bfe9aa7b815e4117dbea602 100644 +index 26b55108ecf4cd48762b00da625b0ce1d2f42c67..f781bb12a1c37d8b3088d0f638eae80d5b80aca4 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -17,6 +17,8 @@ import java.nio.file.Files; @@ -69,18 +69,18 @@ index cee1ea8f43e3135cd72a67c1c8067174feaf956e..6b543f89d4e32fb79bfe9aa7b815e411 private final RegionFileBitSet freeSectors; + public final File file; - public RegionFile(File file, File file1) throws IOException { - this(file.toPath(), file1.toPath(), RegionFileCompression.b); + public RegionFile(File file, File file1, boolean flag) throws IOException { + this(file.toPath(), file1.toPath(), RegionFileCompression.b, flag); } - public RegionFile(java.nio.file.Path java_nio_file_path, java.nio.file.Path java_nio_file_path1, RegionFileCompression regionfilecompression) throws IOException { + public RegionFile(java.nio.file.Path java_nio_file_path, java.nio.file.Path java_nio_file_path1, RegionFileCompression regionfilecompression, boolean flag) throws IOException { + this.file = java_nio_file_path.toFile(); // Paper this.f = ByteBuffer.allocateDirect(8192); + initOversizedState(); this.freeSectors = new RegionFileBitSet(); this.e = regionfilecompression; if (!Files.isDirectory(java_nio_file_path1, new LinkOption[0])) { -@@ -384,6 +389,74 @@ public class RegionFile implements AutoCloseable { +@@ -389,6 +394,74 @@ public class RegionFile implements AutoCloseable { void run() throws IOException; } @@ -156,10 +156,10 @@ index cee1ea8f43e3135cd72a67c1c8067174feaf956e..6b543f89d4e32fb79bfe9aa7b815e411 private final ChunkCoordIntPair b; diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 5065ece393a47add3c4e888fd7fb3d9ba47acfed..942b7d323936a872d83c536c1901b4b436aa7e7c 100644 +index 0305f3c93e8485552890dd5eca8e79277e2bb886..02bd568af727633a6e834d5328683a9ff67b9dd7 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java -@@ -42,6 +42,74 @@ public final class RegionFileCache implements AutoCloseable { +@@ -44,6 +44,74 @@ public final class RegionFileCache implements AutoCloseable { } } @@ -234,7 +234,7 @@ index 5065ece393a47add3c4e888fd7fb3d9ba47acfed..942b7d323936a872d83c536c1901b4b4 @Nullable public NBTTagCompound read(ChunkCoordIntPair chunkcoordintpair) throws IOException { // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing -@@ -51,6 +119,12 @@ public final class RegionFileCache implements AutoCloseable { +@@ -53,6 +121,12 @@ public final class RegionFileCache implements AutoCloseable { } // CraftBukkit end DataInputStream datainputstream = regionfile.a(chunkcoordintpair); @@ -247,7 +247,7 @@ index 5065ece393a47add3c4e888fd7fb3d9ba47acfed..942b7d323936a872d83c536c1901b4b4 Throwable throwable = null; NBTTagCompound nbttagcompound; -@@ -91,6 +165,7 @@ public final class RegionFileCache implements AutoCloseable { +@@ -93,6 +167,7 @@ public final class RegionFileCache implements AutoCloseable { try { NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream); diff --git a/Spigot-Server-Patches/0351-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 75% rename from Spigot-Server-Patches/0351-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to Spigot-Server-Patches/0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index 430d5da7e4..a94c7e1b1e 100644 --- a/Spigot-Server-Patches/0351-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 566aad94dc986fa1d8a2e139e79a24d567c3c6ef..6c0bd57a75f7fc65f412054529793273940d9ff4 100644 +index ce2cf5f9432c9e20d351914646a78974d1f17b03..e4651eb2a94080bfa431b0b775ae8019fc922538 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1026,6 +1026,7 @@ public abstract class PlayerList { +@@ -1049,6 +1049,7 @@ public abstract class PlayerList { } public void setHasWhitelist(boolean flag) { + new com.destroystokyo.paper.event.server.WhitelistToggleEvent(flag).callEvent(); - this.whitelist.setEnabled(flag); // Paper + this.hasWhitelist = flag; } diff --git a/Spigot-Server-Patches/0352-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch similarity index 84% rename from Spigot-Server-Patches/0352-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch index 9266f64728..d39459ba8e 100644 --- a/Spigot-Server-Patches/0352-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index 3e90b57b6fd5dcb6cb1325861306e2ff84d0cccb..1a466e92956e1eee5c0a7d30f89177e4b189fcb8 100644 +index 02c09f39848399a86d46bd17569b4f01a7b5ab1f..ed9b2f9adfecdc6d1b9925579ec510657adde11f 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -108,6 +108,7 @@ public class AxisAlignedBB { +@@ -112,6 +112,7 @@ public class AxisAlignedBB { return this.b(vec3d.x, vec3d.y, vec3d.z); } @@ -16,7 +16,7 @@ index 3e90b57b6fd5dcb6cb1325861306e2ff84d0cccb..1a466e92956e1eee5c0a7d30f89177e4 public AxisAlignedBB b(double d0, double d1, double d2) { double d3 = this.minX; double d4 = this.minY; -@@ -137,6 +138,12 @@ public class AxisAlignedBB { +@@ -141,6 +142,12 @@ public class AxisAlignedBB { return new AxisAlignedBB(d3, d4, d5, d6, d7, d8); } @@ -29,15 +29,15 @@ index 3e90b57b6fd5dcb6cb1325861306e2ff84d0cccb..1a466e92956e1eee5c0a7d30f89177e4 public AxisAlignedBB grow(double d0, double d1, double d2) { double d3 = this.minX - d0; double d4 = this.minY - d1; -@@ -196,6 +203,7 @@ public class AxisAlignedBB { +@@ -200,6 +207,7 @@ public class AxisAlignedBB { return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2; } -+ public final boolean contains(Vec3D vec3d) { return c(vec3d); } // Paper - OBFHELPER - public boolean c(Vec3D vec3d) { ++ public final boolean contains(Vec3D vec3d) { return d(vec3d); } // Paper - OBFHELPER + public boolean d(Vec3D vec3d) { return this.e(vec3d.x, vec3d.y, vec3d.z); } -@@ -229,6 +237,7 @@ public class AxisAlignedBB { +@@ -233,6 +241,7 @@ public class AxisAlignedBB { return this.g(-d0); } @@ -46,10 +46,10 @@ index 3e90b57b6fd5dcb6cb1325861306e2ff84d0cccb..1a466e92956e1eee5c0a7d30f89177e4 double[] adouble = new double[]{1.0D}; double d0 = vec3d1.x - vec3d.x; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3d44188e68df31d188f25820000e2c39aa5b6ce0..9368c4afa7bbb336894d73069b3c0858231d1e81 100644 +index 777d2a6aac7dd1b74124b7a8af87b258a27f4726..84aa003d90b64c0a37e155f38041c7908860b7f9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1476,6 +1476,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1427,6 +1427,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.c(f - 90.0F, f1); } @@ -57,19 +57,19 @@ index 3d44188e68df31d188f25820000e2c39aa5b6ce0..9368c4afa7bbb336894d73069b3c0858 public final Vec3D j(float f) { if (f == 1.0F) { return new Vec3D(this.locX(), this.getHeadY(), this.locZ()); -@@ -2132,6 +2133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2052,6 +2053,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.getPassengers().size() < 1; } -+ public final float getCollisionBorderSize() { return aV(); } // Paper - OBFHELPER - public float aV() { ++ public final float getCollisionBorderSize() { return bc(); } // Paper - OBFHELPER + public float bc() { return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 347d4abdecddf0c92f81b2958fbaccc22cf16b26..0a31f2e931bba74ecda40c3792718a530acec3af 100644 +index 1481cbafa1b4e48822d9e0fa2735b9829440fca3..79cf31d6fcd0e82ee146c489448a93a6e55e4190 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3311,6 +3311,37 @@ public abstract class EntityLiving extends Entity { +@@ -3489,6 +3489,37 @@ public abstract class EntityLiving extends Entity { return world.rayTrace(raytrace); } @@ -108,7 +108,7 @@ index 347d4abdecddf0c92f81b2958fbaccc22cf16b26..0a31f2e931bba74ecda40c3792718a53 public int getShieldBlockingDelay() { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index c1f462d9d3eefdab767bea28da484bfb1dfda06a..498f381099b2cf9460104688e12afc5f586e057a 100644 +index d7e3580067bcbca09b66f05f02e8736863bd7ef5..28f10ab2e427872c04bc97ebc392cf6d58854cf9 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -18,6 +18,7 @@ public final class IEntitySelector { @@ -117,13 +117,13 @@ index c1f462d9d3eefdab767bea28da484bfb1dfda06a..498f381099b2cf9460104688e12afc5f }; + public static Predicate notSpectator() { return f; } // Paper - OBFHELPER public static final Predicate f = (entity) -> { - return !entity.isSpectator(); + return !(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative() && entity.world.getDifficulty() != EnumDifficulty.PEACEFUL; }; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 9e082d4514eb57667cb50a390bef7ab72b94e838..7d101d9630848b68b15acc5efdc16ae51dc1f132 100644 +index 2e7bacff55f57fda8b5644fb9d7934a615e5f550..39b8ab223bc708e5ee3dc967e489fdc76d944416 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -216,6 +216,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -219,6 +219,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, ((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getBlockPosition()), net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getDirection())); } diff --git a/Spigot-Server-Patches/0353-Use-proper-max-length-when-serialising-BungeeCord-te.patch b/Spigot-Server-Patches/0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch similarity index 91% rename from Spigot-Server-Patches/0353-Use-proper-max-length-when-serialising-BungeeCord-te.patch rename to Spigot-Server-Patches/0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch index feae128d09..2918d2ee68 100644 --- a/Spigot-Server-Patches/0353-Use-proper-max-length-when-serialising-BungeeCord-te.patch +++ b/Spigot-Server-Patches/0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Use proper max length when serialising BungeeCord text diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -index 0ab611564edc3cd9322e0dbe21832510e9c35bbf..f7b2095bb75ac4533133cf6ad547ccf53492f215 100644 +index 6ae26f8c3637e0c9e56ed3e14aaac0e3f781cb43..b9b2ddc1acadb96a0c750aeba0c0f6928f74e2fe 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -@@ -3,7 +3,7 @@ package net.minecraft.server; - import java.io.IOException; +@@ -4,7 +4,7 @@ import java.io.IOException; + import java.util.UUID; public class PacketPlayOutChat implements Packet { - diff --git a/Spigot-Server-Patches/0354-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch similarity index 85% rename from Spigot-Server-Patches/0354-Entity-getEntitySpawnReason.patch rename to Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch index 295ba32c56..519ccc919f 100644 --- a/Spigot-Server-Patches/0354-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch @@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9368c4afa7bbb336894d73069b3c0858231d1e81..ae0f5e5a71502c432a4dcaa42a3fc9eeffe28e72 100644 +index 84aa003d90b64c0a37e155f38041c7908860b7f9..8144433d6c309d49b624e88623a3dd376f7c62b3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } }; List entitySlice = null; @@ -21,7 +21,7 @@ index 9368c4afa7bbb336894d73069b3c0858231d1e81..ae0f5e5a71502c432a4dcaa42a3fc9ee // Paper end public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper -@@ -1629,6 +1630,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1590,6 +1591,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -31,7 +31,7 @@ index 9368c4afa7bbb336894d73069b3c0858231d1e81..ae0f5e5a71502c432a4dcaa42a3fc9ee // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); -@@ -1755,6 +1759,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1718,6 +1722,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -59,12 +59,12 @@ index 9368c4afa7bbb336894d73069b3c0858231d1e81..ae0f5e5a71502c432a4dcaa42a3fc9ee } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6c0bd57a75f7fc65f412054529793273940d9ff4..c673f3579f868b4a25a46815877289c568e7763b 100644 +index e4651eb2a94080bfa431b0b775ae8019fc922538..4b8dd6c1a9c796ded5ee0a63ccecebca9ac2b8ca 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -240,7 +240,7 @@ public abstract class PlayerList { +@@ -263,7 +263,7 @@ public abstract class PlayerList { // CraftBukkit start - WorldServer finalWorldServer = worldserver; + WorldServer finalWorldServer = worldserver1; Entity entity = EntityTypes.a(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { - return !finalWorldServer.addEntitySerialized(entity1) ? null : entity1; + return !finalWorldServer.addEntitySerialized(entity1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.MOUNT) ? null : entity1; // Paper @@ -72,10 +72,10 @@ index 6c0bd57a75f7fc65f412054529793273940d9ff4..c673f3579f868b4a25a46815877289c5 }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 271a1ef3d0aae7c1d0b373963504e70f2843cd24..0decbee892c532c0188b373728d8458c8cbbc0d9 100644 +index 14ec04c6503cca58f64fc2a82a9fd715a06dcefb..a72f16cbcbc226854043bfec07e1e57dbe33c62c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1000,6 +1000,7 @@ public class WorldServer extends World { +@@ -923,6 +923,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -84,10 +84,10 @@ index 271a1ef3d0aae7c1d0b373963504e70f2843cd24..0decbee892c532c0188b373728d8458c if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 5f16dea1a543607e76f7ef70fe44e9a3f12e9132..d16d3fe58e6a45e3023946174d2e137a0670e455 100644 +index 51f027e8f98240fec989ea877095031bab087bda..821417610fdb23791bd83e263977026b9d09e31a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1052,5 +1052,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1060,5 +1060,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean fromMobSpawner() { return getHandle().spawnedViaMobSpawner; } diff --git a/Spigot-Server-Patches/0355-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0344-Update-entity-Metadata-for-all-tracked-players.patch similarity index 86% rename from Spigot-Server-Patches/0355-Update-entity-Metadata-for-all-tracked-players.patch rename to Spigot-Server-Patches/0344-Update-entity-Metadata-for-all-tracked-players.patch index 2dfc05f151..ff83ee17da 100644 --- a/Spigot-Server-Patches/0355-Update-entity-Metadata-for-all-tracked-players.patch +++ b/Spigot-Server-Patches/0344-Update-entity-Metadata-for-all-tracked-players.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Update entity Metadata for all tracked players diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 3ff7a7b4a853068eba2fb034246a58116a846523..3a88c9a67062eb73ad8257ea786efca7e7e99f65 100644 +index b5a76f37c27cde25b2561a23c7c0fe7bdd992fee..9b89c0c8a3f1dada4e9b2aaeed0b92e56229b7ca 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -@@ -387,6 +387,12 @@ public class EntityTrackerEntry { +@@ -392,6 +392,12 @@ public class EntityTrackerEntry { return PacketPlayOutEntity.a(this.xLoc, this.yLoc, this.zLoc); } @@ -22,10 +22,10 @@ index 3ff7a7b4a853068eba2fb034246a58116a846523..3a88c9a67062eb73ad8257ea786efca7 this.f.accept(packet); if (this.tracker instanceof EntityPlayer) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c215cb599da70403a46b09c1cdb01e02aadc96b7..266aa79420238d144a07022aab4a3ced5b0707e4 100644 +index 0296dfc4e944de9156715c93a33b699c2d7cf63a..4a718ab0cccef1eef2bcf6fdc5942ba820858dc1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2007,7 +2007,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2045,7 +2045,14 @@ public class PlayerConnection implements PacketListenerPlayIn { if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) { // Refresh the current entity metadata diff --git a/Spigot-Server-Patches/0357-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0345-Implement-PlayerPostRespawnEvent.patch similarity index 63% rename from Spigot-Server-Patches/0357-Implement-PlayerPostRespawnEvent.patch rename to Spigot-Server-Patches/0345-Implement-PlayerPostRespawnEvent.patch index e5cf9f570d..085f34bbd9 100644 --- a/Spigot-Server-Patches/0357-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0345-Implement-PlayerPostRespawnEvent.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c673f3579f868b4a25a46815877289c568e7763b..559a411627ed7b018f00b90e8dfc1b470af4a531 100644 +index 4b8dd6c1a9c796ded5ee0a63ccecebca9ac2b8ca..8d067082ad52397d11822277438f00a43d7f3e09 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -627,9 +627,14 @@ public abstract class PlayerList { - - // this.a(entityplayer1, entityplayer, worldserver); // CraftBukkit - removed +@@ -665,9 +665,14 @@ public abstract class PlayerList { + // this.a(entityplayer1, entityplayer, worldserver1); // CraftBukkit - removed + boolean flag2 = false; + // Paper start + boolean isBedSpawn = false; @@ -20,19 +20,19 @@ index c673f3579f868b4a25a46815877289c568e7763b..559a411627ed7b018f00b90e8dfc1b47 // CraftBukkit start - fire PlayerRespawnEvent if (location == null) { - boolean isBedSpawn = false; -+ //boolean isBedSpawn = false; Paper - moved up - CraftWorld cworld = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld); - if (cworld != null && blockposition != null) { - Optional optional = EntityHuman.getBed(cworld.getHandle(), blockposition, flag1); -@@ -662,6 +667,7 @@ public abstract class PlayerList { ++ // boolean isBedSpawn = false; // Paper - moved up + WorldServer worldserver1 = this.server.getWorldServer(entityplayer.getSpawnDimension()); + if (worldserver1 != null) { + Optional optional; +@@ -708,6 +713,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 + isRespawn = true; // Paper } else { - location.setWorld(server.getWorldServer(dimensionmanager).getWorld()); + location.setWorld(worldserver.getWorld()); } -@@ -723,6 +729,13 @@ public abstract class PlayerList { +@@ -765,6 +771,13 @@ public abstract class PlayerList { if (entityplayer.playerConnection.isDisconnected()) { this.savePlayerFile(entityplayer); } diff --git a/Spigot-Server-Patches/0358-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 90% rename from Spigot-Server-Patches/0358-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to Spigot-Server-Patches/0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch index 1fecfc7491..761fcc4931 100644 --- a/Spigot-Server-Patches/0358-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch +++ b/Spigot-Server-Patches/0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch @@ -6,7 +6,7 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items vanilla checks for == 0 diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index e5c9bac88a59d52c9b2f05df3e4f373edbe009ca..ef2cf6565b5935b1f1a80f12670609017aebb2c8 100644 +index aad23b2c6cd674e05e609c4c019205978c6741f2..465550656356394074ebf4cc8d6188455daded88 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -60,6 +60,7 @@ public class EntityItem extends Entity { @@ -17,7 +17,7 @@ index e5c9bac88a59d52c9b2f05df3e4f373edbe009ca..ef2cf6565b5935b1f1a80f1267060901 if (this.age != -32768) this.age += elapsedTicks; this.lastTick = MinecraftServer.currentTick; // CraftBukkit end -@@ -146,6 +147,7 @@ public class EntityItem extends Entity { +@@ -147,6 +148,7 @@ public class EntityItem extends Entity { // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; diff --git a/Spigot-Server-Patches/0359-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 100% rename from Spigot-Server-Patches/0359-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch diff --git a/Spigot-Server-Patches/0360-Server-Tick-Events.patch b/Spigot-Server-Patches/0348-Server-Tick-Events.patch similarity index 81% rename from Spigot-Server-Patches/0360-Server-Tick-Events.patch rename to Spigot-Server-Patches/0348-Server-Tick-Events.patch index 3eb33d48c7..e3877e97ef 100644 --- a/Spigot-Server-Patches/0360-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0348-Server-Tick-Events.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 738ba4ee303b796cadf17b78791fad461545f1cc..992c03d799f9dbbb9f63559d787124b04b00283e 100644 +index f1098b1b62fd568579fd0e1fda63478f58036c8c..5d62daec9afe60cfb0069b6ed867d1d2530389a8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1092,6 +1092,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 07729667f5c66bbcb85fc59cb5fa3c218efa2ec8..2a3d133e51326b0088af2ce53e09bf2fe4b0c3c6 100644 +index fb7e4e2f02b62f7cfeec6a619a4c2943cc071c46..199103ab72b0666b23f78961dd7435c3ff210339 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -339,6 +339,29 @@ public class CraftWorld implements World { +@@ -340,6 +340,29 @@ public class CraftWorld implements World { return getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING); } diff --git a/Spigot-Server-Patches/0364-Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/0352-Mob-Spawner-API-Enhancements.patch similarity index 98% rename from Spigot-Server-Patches/0364-Mob-Spawner-API-Enhancements.patch rename to Spigot-Server-Patches/0352-Mob-Spawner-API-Enhancements.patch index a36af687a1..513265985f 100644 --- a/Spigot-Server-Patches/0364-Mob-Spawner-API-Enhancements.patch +++ b/Spigot-Server-Patches/0352-Mob-Spawner-API-Enhancements.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Mob Spawner API Enhancements diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index cb7cb789b82461093fbbb4c8ae6d03fcbfe57383..41001b02a654194c4a8e25ad5f7af8fdd91090b2 100644 +index e2f5354709819e56f9bc66b8c8d5e095bc8387b4..921abae4914c7b3f28d387f7a682d991293c4798 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -47,6 +47,7 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/0353-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0353-Per-Player-View-Distance-API-placeholders.patch new file mode 100644 index 0000000000..947adc711f --- /dev/null +++ b/Spigot-Server-Patches/0353-Per-Player-View-Distance-API-placeholders.patch @@ -0,0 +1,62 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Mon, 6 May 2019 01:29:25 -0400 +Subject: [PATCH] Per-Player View Distance API placeholders + +I hope to look at this more in-depth soon. It appears doable. +However this should not block the update. + +diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java +index 279807dc5045e765fe7496315494b2cb231d08f9..ac12d782539a5f502e8996eb39eb2ddbab46f756 100644 +--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java ++++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java +@@ -576,9 +576,10 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { + if (this.deathAnimationTicks == 1 && !this.isSilent()) { + // CraftBukkit start - Use relative location for far away sounds + // this.world.b(1028, this.getChunkCoordinates(), 0); +- //int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API ++ int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API + for (EntityPlayer player : (List) ((WorldServer)world).getPlayers()) { +- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch ++ // final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch ++ // Paper end + double deltaX = this.locX() - player.locX(); + double deltaZ = this.locZ() - player.locZ(); + double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; +diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java +index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa309d5e08 100644 +--- a/src/main/java/net/minecraft/server/EntityWither.java ++++ b/src/main/java/net/minecraft/server/EntityWither.java +@@ -208,9 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity { + if (!this.isSilent()) { + // CraftBukkit start - Use relative location for far away sounds + // this.world.b(1023, new BlockPosition(this), 0); +- //int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API ++ int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API + for (EntityPlayer player : (List)this.world.getPlayers()) { +- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch ++ // final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch + double deltaX = this.locX() - player.locX(); + double deltaZ = this.locZ() - player.locZ(); + double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index addce5ab16b975b3c6690ae09aef88dfbfb454b8..4bef2d3c8318da57e5721d728953f8d5ac6b0ff6 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -1998,6 +1998,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + super.remove(); + } + } ++ ++ @Override ++ public int getViewDistance() { ++ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO ++ } ++ ++ @Override ++ public void setViewDistance(int viewDistance) { ++ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO ++ } + // Paper end + + // Spigot start diff --git a/Spigot-Server-Patches/0366-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0354-Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 82% rename from Spigot-Server-Patches/0366-Fix-CB-call-to-changed-postToMainThread-method.patch rename to Spigot-Server-Patches/0354-Fix-CB-call-to-changed-postToMainThread-method.patch index 977e0e6456..c91eeeb6b6 100644 --- a/Spigot-Server-Patches/0366-Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/Spigot-Server-Patches/0354-Fix-CB-call-to-changed-postToMainThread-method.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 266aa79420238d144a07022aab4a3ced5b0707e4..a5700a955b6d7927228a14128860b49e79e61f03 100644 +index 4a718ab0cccef1eef2bcf6fdc5942ba820858dc1..35536527a01e72841e358c643631b2739dd0bf26 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -286,7 +286,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -285,7 +285,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.networkManager.getClass(); // CraftBukkit - Don't wait diff --git a/Spigot-Server-Patches/0367-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/Spigot-Server-Patches/0355-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 86% rename from Spigot-Server-Patches/0367-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to Spigot-Server-Patches/0355-Fix-sounds-when-item-frames-are-modified-MC-123450.patch index b74fb1507e..2be27fd3c8 100644 --- a/Spigot-Server-Patches/0367-Fix-sounds-when-item-frames-are-modified-MC-123450.patch +++ b/Spigot-Server-Patches/0355-Fix-sounds-when-item-frames-are-modified-MC-123450.patch @@ -6,16 +6,16 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450) This also fixes the adding sound playing when the item frame direction is changed. diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java -index 9b1e07452f9e7e9a6d069d6e62112a487ff288d4..f8a2f32f1d93e3cdbc7c40783beef05f5f05794f 100644 +index 38e9d49fe5698a0526f3edb15c6e016e43abae2b..2c5cb36c3c060a98d58622a96fbda4fef7160905 100644 --- a/src/main/java/net/minecraft/server/EntityItemFrame.java +++ b/src/main/java/net/minecraft/server/EntityItemFrame.java -@@ -224,7 +224,7 @@ public class EntityItemFrame extends EntityHanging { +@@ -247,7 +247,7 @@ public class EntityItemFrame extends EntityHanging { } this.getDataWatcher().set(EntityItemFrame.ITEM, itemstack); - if (!itemstack.isEmpty() && playSound) { // CraftBukkit + if (!itemstack.isEmpty() && flag && playSound) { // CraftBukkit // Paper - only play sound when update flag is set - this.a(SoundEffects.ENTITY_ITEM_FRAME_ADD_ITEM, 1.0F, 1.0F); + this.playSound(SoundEffects.ENTITY_ITEM_FRAME_ADD_ITEM, 1.0F, 1.0F); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java diff --git a/Spigot-Server-Patches/0368-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch similarity index 84% rename from Spigot-Server-Patches/0368-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch rename to Spigot-Server-Patches/0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 24bf94882c..31538b25e4 100644 --- a/Spigot-Server-Patches/0368-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled synchronously when the server gets shut down. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 992c03d799f9dbbb9f63559d787124b04b00283e..eabca3975af61b669fd31a23cb7c27883db7833e 100644 +index 5d62daec9afe60cfb0069b6ed867d1d2530389a8..d1a237a5185fa3bf0308540d9cf8d0686dbbf748 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2221,7 +2221,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant, 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 a699c5e0b240fac3066e874e7d52f061d01e0c5a..55c0b5dc30cff8de5a83a97ae17fec7624cbe3d9 100644 +index c14d51f1ec37d7b40172ce8cc1c66a7a4f4a3bd5..4e926d5f483ad0d0fae5ceddf0b279128c030a5e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -3,6 +3,8 @@ package net.minecraft.server; - import com.google.common.annotations.VisibleForTesting; +@@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableList; + import com.google.common.collect.Iterables; import co.aikar.timings.TimingHistory; // Paper import co.aikar.timings.Timings; // Paper + @@ -209,7 +209,7 @@ index a699c5e0b240fac3066e874e7d52f061d01e0c5a..55c0b5dc30cff8de5a83a97ae17fec76 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -1062,8 +1064,24 @@ public class WorldServer extends World { +@@ -989,8 +991,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0371-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0359-improve-CraftWorld-isChunkLoaded.patch similarity index 90% rename from Spigot-Server-Patches/0371-improve-CraftWorld-isChunkLoaded.patch rename to Spigot-Server-Patches/0359-improve-CraftWorld-isChunkLoaded.patch index 38c1e0435f..33ea97aab4 100644 --- a/Spigot-Server-Patches/0371-improve-CraftWorld-isChunkLoaded.patch +++ b/Spigot-Server-Patches/0359-improve-CraftWorld-isChunkLoaded.patch @@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query the chunk status and get a response now, vs having to wait diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2a3d133e51326b0088af2ce53e09bf2fe4b0c3c6..568eca9d3c499e33290aa8ab8548d9c64c97ce5f 100644 +index 199103ab72b0666b23f78961dd7435c3ff210339..edc8abd6569fdb897a549081784c180167118789 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -405,13 +405,13 @@ public class CraftWorld implements World { +@@ -406,13 +406,13 @@ public class CraftWorld implements World { @Override public boolean isChunkLoaded(int x, int z) { diff --git a/Spigot-Server-Patches/0372-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 89% rename from Spigot-Server-Patches/0372-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 1aeb58ac84..8211a97509 100644 --- a/Spigot-Server-Patches/0372-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 572679e4d1ca0d84a08a5c48542fa40d426461e5..071e5e7f729d6c3ffb70506e7ef32eebee1e9118 100644 +index 2debafdc1bb539a49c3f0723b696ea56e9b3eb16..91c9a027dd7aef8253f3d707c95e4ed917d32580 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -481,4 +481,10 @@ public class PaperWorldConfig { +@@ -449,4 +449,10 @@ public class PaperWorldConfig { break; } } @@ -21,10 +21,10 @@ index 572679e4d1ca0d84a08a5c48542fa40d426461e5..071e5e7f729d6c3ffb70506e7ef32eeb + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eabca3975af61b669fd31a23cb7c27883db7833e..257adcf4d5387fc18d5c48e0fa221f68539ad8f9 100644 +index d1a237a5185fa3bf0308540d9cf8d0686dbbf748..531031221346d2ed46bd25793c6c2b81029860d4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -586,6 +586,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant pendingChunkUpdates = Sets.newHashSet(); @@ -61,7 +61,7 @@ index ae661297774f51c8b61fc08ca43e13ba368d0021..83da76fdc495225b563cecbdb71422ae } else { if (!this.l.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 6e9f402fb0faccc222b4289deb36e2d85a66eb7c..980044b9a81232e7d0eab8e4947db6ca1f845c1c 100644 +index ca41e420a1ab22f097dd0b98e156fd51434733d8..5efd611859648ed3c1bcda70728ea6106bd4bf4c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -18,6 +18,7 @@ public class PlayerChunk { diff --git a/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0363-Implement-CraftBlockSoundGroup.patch similarity index 63% rename from Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch rename to Spigot-Server-Patches/0363-Implement-CraftBlockSoundGroup.patch index 9609100498..5869a0140b 100644 --- a/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/0363-Implement-CraftBlockSoundGroup.patch @@ -48,58 +48,46 @@ index 0000000000000000000000000000000000000000..99f99330d01fc61ce8ede9f225b0c42b + return CraftSound.getSoundByEffect(soundEffectType.getFallSound()); + } +} -diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index cca2bf1045c1305a9defa5241909b50711b85d4c..321eae23c575528788b1b575f17593580d6ba737 100644 ---- a/src/main/java/net/minecraft/server/IBlockData.java -+++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -276,6 +276,7 @@ public class IBlockData extends BlockDataAbstract implements - return this.getBlock().isTicking(this); - } - -+ public final SoundEffectType getStepSound() { return this.r(); } // Paper - OBFHELPER - public SoundEffectType r() { - return this.getBlock().getStepSound(this); - } diff --git a/src/main/java/net/minecraft/server/SoundEffectType.java b/src/main/java/net/minecraft/server/SoundEffectType.java -index b774d2d8d903acc1ce4c5bd9240b2e96779e1d53..adf0913a0ecc3eaf330bee303d9cc7fb4bc51dee 100644 +index 957799e034ad8bc7201815b849244b7a809fb666..2301b38ac3b488809d2f624055ad3e23663d3fdb 100644 --- a/src/main/java/net/minecraft/server/SoundEffectType.java +++ b/src/main/java/net/minecraft/server/SoundEffectType.java -@@ -27,10 +27,10 @@ public class SoundEffectType { - public static final SoundEffectType w = new SoundEffectType(1.0F, 1.0F, SoundEffects.BLOCK_LANTERN_BREAK, SoundEffects.BLOCK_LANTERN_STEP, SoundEffects.BLOCK_LANTERN_PLACE, SoundEffects.BLOCK_LANTERN_HIT, SoundEffects.BLOCK_LANTERN_FALL); - public final float x; - public final float y; -- private final SoundEffect z; -+ private final SoundEffect z; public final SoundEffect getBreakSound() { return this.z; } // Paper - OBFHELPER - private final SoundEffect A; - private final SoundEffect B; -- private final SoundEffect C; -+ private final SoundEffect C; public final SoundEffect getHitSound() { return this.C; } // Paper - OBFHELPER - private final SoundEffect D; +@@ -51,10 +51,10 @@ public class SoundEffectType { + public static final SoundEffectType U = new SoundEffectType(1.0F, 1.0F, SoundEffects.BLOCK_GILDED_BLACKSTONE_BREAK, SoundEffects.BLOCK_GILDED_BLACKSTONE_STEP, SoundEffects.BLOCK_GILDED_BLACKSTONE_PLACE, SoundEffects.BLOCK_GILDED_BLACKSTONE_HIT, SoundEffects.BLOCK_GILDED_BLACKSTONE_FALL); + public final float V; + public final float W; +- private final SoundEffect X; ++ private final SoundEffect X; public final SoundEffect getBreakSound() { return this.X; } // Paper - OBFHELPER + private final SoundEffect Y; + private final SoundEffect Z; +- private final SoundEffect aa; ++ private final SoundEffect aa; public final SoundEffect getHitSound() { return this.aa; } // Paper - OBFHELPER + private final SoundEffect ab; public SoundEffectType(float f, float f1, SoundEffect soundeffect, SoundEffect soundeffect1, SoundEffect soundeffect2, SoundEffect soundeffect3, SoundEffect soundeffect4) { -@@ -51,14 +51,17 @@ public class SoundEffectType { - return this.y; +@@ -75,14 +75,17 @@ public class SoundEffectType { + return this.W; } + public final SoundEffect getStepSound() { return this.d(); } // Paper - OBFHELPER public SoundEffect d() { - return this.A; + return this.Y; } + public final SoundEffect getPlaceSound() { return this.e(); } // Paper - OBFHELPER public SoundEffect e() { - return this.B; + return this.Z; } + public final SoundEffect getFallSound() { return this.g(); } // Paper - OBFHELPER public SoundEffect g() { - return this.D; + return this.ab; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index dd0bccd6995a79c52ec20cf45df27bb7ed06a5e6..16349e8e796c5e7e4e43fb355d4d641df7f41dc9 100644 +index 20a294723869756495b4bd5c23846be4049d52a6..2e24b75d2b56dc40d05200ddded817d6ae06803c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -704,4 +704,11 @@ public class CraftBlock implements Block { +@@ -717,4 +717,11 @@ public class CraftBlock implements Block { AxisAlignedBB aabb = shape.getBoundingBox(); return new BoundingBox(getX() + aabb.minX, getY() + aabb.minY, getZ() + aabb.minZ, getX() + aabb.maxX, getY() + aabb.maxY, getZ() + aabb.maxZ); } diff --git a/Spigot-Server-Patches/0377-Chunk-debug-command.patch b/Spigot-Server-Patches/0364-Chunk-debug-command.patch similarity index 95% rename from Spigot-Server-Patches/0377-Chunk-debug-command.patch rename to Spigot-Server-Patches/0364-Chunk-debug-command.patch index ad712dc109..86c21d406e 100644 --- a/Spigot-Server-Patches/0377-Chunk-debug-command.patch +++ b/Spigot-Server-Patches/0364-Chunk-debug-command.patch @@ -185,20 +185,20 @@ index 5acad8e44f024d3ddf5ef4fd320460ac516e0fb8..af810987846efcd2bffbd23c31481b2d * Ported from MinecraftForge - author: LexManos - License: LGPLv2.1 */ diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 261eff5bdb4f4dfae2f66eecad79b21fef69ea8f..8a8fb6acaabc5fc179a23ce3e23ddb54e1ee23a4 100644 +index 6921def2dc8dd7f2b8ba9d46ab697a9f9b62cf4e..9f4c79629c981d496b96cf8a7a4c8e058f102b8b 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -22,7 +22,7 @@ import org.apache.logging.log4j.Logger; +@@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; + public class ChunkProviderServer extends IChunkProvider { - private static final int b = (int) Math.pow(17.0D, 2.0D); -- private static final List c = ChunkStatus.a(); -+ private static final List c = ChunkStatus.a(); static final List getPossibleChunkStatuses() { return ChunkProviderServer.c; } // Paper - OBFHELPER +- private static final List b = ChunkStatus.a(); ++ private static final List b = ChunkStatus.a(); static final List getPossibleChunkStatuses() { return ChunkProviderServer.b; } // Paper - OBFHELPER private final ChunkMapDistance chunkMapDistance; - public final ChunkGenerator chunkGenerator; + public final ChunkGenerator chunkGenerator; private final WorldServer world; diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 49178cbcebe7e7af9e9a2485ae11058fd1c6b20f..ece411feee81f96ae0462cf7643ec450cafad7a7 100644 +index 2eacc5de340ca5558d9a0cba9baa26bbebef714d..5658b2a3c4601d07545b08b0a7179c8f3b051bd4 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -5,7 +5,13 @@ import com.destroystokyo.paper.profile.CraftPlayerProfile; @@ -227,7 +227,7 @@ index 49178cbcebe7e7af9e9a2485ae11058fd1c6b20f..ece411feee81f96ae0462cf7643ec450 import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.LinkedBlockingQueue; -@@ -533,4 +542,170 @@ public final class MCUtil { +@@ -521,4 +530,170 @@ public final class MCUtil { return null; } @@ -399,7 +399,7 @@ index 49178cbcebe7e7af9e9a2485ae11058fd1c6b20f..ece411feee81f96ae0462cf7643ec450 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 980044b9a81232e7d0eab8e4947db6ca1f845c1c..47e3e618c9e683e6975fb64e1094dc7078574dae 100644 +index 5efd611859648ed3c1bcda70728ea6106bd4bf4c..d806b6acbcfbf141f4c1436bd5a163fbf11bf4e6 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -27,7 +27,7 @@ public class PlayerChunk { @@ -412,10 +412,10 @@ index 980044b9a81232e7d0eab8e4947db6ca1f845c1c..47e3e618c9e683e6975fb64e1094dc70 private int dirtyCount; private int r; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 1d255ce3833a0ea735bedbb33ae8259751346ab2..34f470779fa5d1cf9638431253024481236c073b 100644 +index 936be3fd8954933ac218f62a172df6878d128ec9..684d84e3c5caf1a0c816895c4930d056b2ba8be5 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -58,7 +58,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -59,7 +59,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final Long2ObjectLinkedOpenHashMap updatingChunks = new Long2ObjectLinkedOpenHashMap(); public volatile Long2ObjectLinkedOpenHashMap visibleChunks; private final Long2ObjectLinkedOpenHashMap pendingUnload; @@ -424,7 +424,7 @@ index 1d255ce3833a0ea735bedbb33ae8259751346ab2..34f470779fa5d1cf9638431253024481 public final WorldServer world; private final LightEngineThreaded lightEngine; private final IAsyncTaskHandler executor; -@@ -71,7 +71,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -72,7 +72,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final Mailbox> mailboxWorldGen; private final Mailbox> mailboxMain; public final WorldLoadListener worldLoadListener; diff --git a/Spigot-Server-Patches/0365-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0365-Per-Player-View-Distance-API-placeholders.patch deleted file mode 100644 index 28c3c8c34f..0000000000 --- a/Spigot-Server-Patches/0365-Per-Player-View-Distance-API-placeholders.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Mon, 6 May 2019 01:29:25 -0400 -Subject: [PATCH] Per-Player View Distance API placeholders - -I hope to look at this more in-depth soon. It appears doable. -However this should not block the update. - -diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 6a4ccaeb0fef2cabab87b33bf89b5a68608800e9..5bf99e0028b886a6ba1d2f39f8dc4cd3c9aa0943 100644 ---- a/src/main/java/net/minecraft/server/EntityEnderDragon.java -+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -579,9 +579,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - // CraftBukkit start - Use relative location for far away sounds - // this.world.b(1028, new BlockPosition(this), 0); - // Paper start -- //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API -+ int viewDistance = this.world.getWorld().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API - for (EntityPlayer player : ((WorldServer)world).getPlayers()) { -- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch -+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch - // Paper end - double deltaX = this.locX() - player.locX(); - double deltaZ = this.locZ() - player.locZ(); -diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index 2e95069c1907df951680f2a00441a72500c48430..2f466af4d56d6f87c9d98226276b041ba2e89ac5 100644 ---- a/src/main/java/net/minecraft/server/EntityWither.java -+++ b/src/main/java/net/minecraft/server/EntityWither.java -@@ -208,9 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity { - // CraftBukkit start - Use relative location for far away sounds - // this.world.b(1023, new BlockPosition(this), 0); - // Paper start -- //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API -+ int viewDistance = this.world.getWorld().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API - for (EntityPlayer player : ((WorldServer)world).getPlayers()) { -- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch -+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch - // Paper end - double deltaX = this.locX() - player.locX(); - double deltaZ = this.locZ() - player.locZ(); -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a614db834dfe8096ec0a7e6bc6e0348bfb300a1d..71d5ebe8c6ea2d52886c28e0fdc55e5993238709 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1958,6 +1958,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - super.remove(); - } - } -+ -+ @Override -+ public int getViewDistance() { -+ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO -+ } -+ -+ @Override -+ public void setViewDistance(int viewDistance) { -+ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO -+ } - // Paper end - - // Spigot start diff --git a/Spigot-Server-Patches/0379-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch similarity index 93% rename from Spigot-Server-Patches/0379-Catch-exceptions-from-dispenser-entity-spawns.patch rename to Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch index 7fccaa308e..be995a8f41 100644 --- a/Spigot-Server-Patches/0379-Catch-exceptions-from-dispenser-entity-spawns.patch +++ b/Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Catch exceptions from dispenser entity spawns diff --git a/src/main/java/net/minecraft/server/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java -index 5a8c4dc6ba370af2da15949c1b514317a85e743b..b6b7e3c6c973886e35bde0bf10787b62c7f015ca 100644 +index aa6af83512e2baea4e3d942b7f7407ad05ea0f24..5432c24919bb5c32ca1eec4c9861ad127f72a60a 100644 --- a/src/main/java/net/minecraft/server/IDispenseBehavior.java +++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java @@ -163,7 +163,14 @@ public interface IDispenseBehavior { diff --git a/Spigot-Server-Patches/0276-Send-nearby-packets-from-world-player-list-not-serve.patch b/removed/1.16/0276-Send-nearby-packets-from-world-player-list-not-serve.patch similarity index 100% rename from Spigot-Server-Patches/0276-Send-nearby-packets-from-world-player-list-not-serve.patch rename to removed/1.16/0276-Send-nearby-packets-from-world-player-list-not-serve.patch diff --git a/Spigot-Server-Patches/0298-Support-Overriding-World-Seeds.patch b/removed/1.16/0298-Support-Overriding-World-Seeds.patch similarity index 100% rename from Spigot-Server-Patches/0298-Support-Overriding-World-Seeds.patch rename to removed/1.16/0298-Support-Overriding-World-Seeds.patch diff --git a/Spigot-Server-Patches/0302-Avoid-dimension-id-collisions.patch b/removed/1.16/0302-Avoid-dimension-id-collisions.patch similarity index 100% rename from Spigot-Server-Patches/0302-Avoid-dimension-id-collisions.patch rename to removed/1.16/0302-Avoid-dimension-id-collisions.patch diff --git a/Spigot-Server-Patches/0311-Limit-lightning-strike-effect-distance.patch b/removed/1.16/0311-Limit-lightning-strike-effect-distance.patch similarity index 100% rename from Spigot-Server-Patches/0311-Limit-lightning-strike-effect-distance.patch rename to removed/1.16/0311-Limit-lightning-strike-effect-distance.patch diff --git a/Spigot-Server-Patches/0326-Optimize-redstone-algorithm.patch b/removed/1.16/0326-Optimize-redstone-algorithm.patch similarity index 100% rename from Spigot-Server-Patches/0326-Optimize-redstone-algorithm.patch rename to removed/1.16/0326-Optimize-redstone-algorithm.patch diff --git a/Spigot-Server-Patches/0356-Fire-event-on-GS4-query.patch b/removed/1.16/0356-Fire-event-on-GS4-query.patch similarity index 100% rename from Spigot-Server-Patches/0356-Fire-event-on-GS4-query.patch rename to removed/1.16/0356-Fire-event-on-GS4-query.patch diff --git a/Spigot-Server-Patches/0373-Fix-some-generation-concurrency-issues.patch b/removed/1.16/0373-Fix-some-generation-concurrency-issues.patch similarity index 100% rename from Spigot-Server-Patches/0373-Fix-some-generation-concurrency-issues.patch rename to removed/1.16/0373-Fix-some-generation-concurrency-issues.patch diff --git a/Spigot-Server-Patches/0378-incremental-chunk-saving.patch b/removed/1.16/0378-incremental-chunk-saving.patch similarity index 100% rename from Spigot-Server-Patches/0378-incremental-chunk-saving.patch rename to removed/1.16/0378-incremental-chunk-saving.patch diff --git a/work/Bukkit b/work/Bukkit index 32fcd349d4..6f3c5f4a5a 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 32fcd349d4074c564116bbeb4b481332460902ee +Subproject commit 6f3c5f4a5a0867ef265df9d58b48bdc43079e3dd diff --git a/work/CraftBukkit b/work/CraftBukkit index 2b00831c95..3f0c333870 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 2b00831c95f8dda096ad22ae88bc615d9dd31ea1 +Subproject commit 3f0c333870ba74705e98d19322174d6f0c10c900 From c300745c8bce24f1f7628eb439a6964cdb1b52a8 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Thu, 25 Jun 2020 16:38:24 -0700 Subject: [PATCH 10/95] even even even even more work --- SHIT_TO_CHECK.md | 2 + ...ptions-from-dispenser-entity-spawns.patch} | 0 ...66-Fix-World-isChunkGenerated-calls.patch} | 71 ++- ...te-location-if-we-failed-to-read-it.patch} | 2 +- ...aletteBlock-instead-of-ReentrantLoc.patch} | 18 +- .../0369-incremental-chunk-saving.patch | 69 ++- ...4-Anti-Xray.patch => 0370-Anti-Xray.patch} | 138 ++--- ...l-Spawned-mobs-towards-natural-spaw.patch} | 28 +- ...urable-projectile-relative-velocity.patch} | 33 +- ...being-ticked-when-notifying-navigat.patch} | 6 +- ...h => 0374-offset-item-frame-ticking.patch} | 2 +- ...pper-searches-if-there-are-no-items.patch} | 14 +- ...6-Asynchronous-chunk-IO-and-loading.patch} | 480 ++++++++---------- ...tChunkIfLoadedImmediately-in-places.patch} | 51 +- ...ads.patch => 0378-Reduce-sync-loads.patch} | 26 +- ...ement-alternative-item-despawn-rate.patch} | 14 +- ...if-we-have-a-custom-Bukkit-generator.patch | 40 ++ ...-158900.patch => 0381-Fix-MC-158900.patch} | 4 +- ...ment-optional-per-player-mob-spawns.patch} | 336 ++++++------ ...event-consuming-the-wrong-itemstack.patch} | 16 +- ...ssanger-entities-once-from-spawners.patch} | 2 +- ... => 0385-Fix-nether-portal-creation.patch} | 0 .../0386-Generator-Settings.patch | 89 ++++ ...-161754.patch => 0387-Fix-MC-161754.patch} | 2 +- ...e-improvement-for-Chunk.getEntities.patch} | 4 +- ...anging-entities-that-are-not-ItemFr.patch} | 4 +- ...90-Expose-the-internal-current-tick.patch} | 4 +- ...sneak-when-changing-worlds-MC-10657.patch} | 8 +- ...-option-to-disable-pillager-patrols.patch} | 10 +- ...r-when-player-hand-set-to-empty-typ.patch} | 28 +- ...if-we-have-a-custom-Bukkit-generator.patch | 46 -- ...=> 0394-PlayerLaunchProjectileEvent.patch} | 80 ++- ...tMagicNumbers.isSupportedApiVersion.patch} | 2 +- ...nk-loads-when-villagers-try-to-find-.patch | 20 + ...656-Fix-Follow-Range-Initial-Target.patch} | 8 +- ...pers.patch => 0398-Optimize-Hoppers.patch} | 58 +-- ...ayerDeathEvent-shouldDropExperience.patch} | 8 +- .../0400-Generator-Settings.patch | 53 -- ...ading-chunks-checking-hive-position.patch} | 4 +- ...hunks-from-Hoppers-and-other-things.patch} | 11 +- ...ializing-mismatching-chunk-coordina.patch} | 16 +- ...imise-IEntityAccess-getPlayerByUUID.patch} | 16 +- ...404-Fix-items-not-falling-correctly.patch} | 4 +- ...patch => 0405-Lag-compensate-eating.patch} | 50 +- ...ize-call-to-getFluid-for-explosions.patch} | 8 +- ...-in-stack-not-having-effects-when-d.patch} | 12 +- ...=> 0408-Entity-Activation-Range-2.0.patch} | 153 +++--- ...Add-effect-to-block-break-naturally.patch} | 8 +- ...=> 0410-Tracking-Range-Improvements.patch} | 4 +- ...-items-vanishing-through-end-portal.patch} | 12 +- ...nk-loads-when-villagers-try-to-find-.patch | 20 - ...et-gravity-in-void.-Fixes-MC-167279.patch} | 10 +- ...-getChunkAt-calls-for-loaded-chunks.patch} | 10 +- ...w-overriding-the-java-version-check.patch} | 2 +- ...tch => 0415-Add-ThrownEggHatchEvent.patch} | 4 +- ... 0416-Optimise-random-block-ticking.patch} | 213 ++------ ...p-API.patch => 0417-Entity-Jump-API.patch} | 20 +- ...-to-nerf-pigmen-from-nether-portals.patch} | 20 +- ... => 0419-Make-the-GUI-graph-fancier.patch} | 20 +- ...20-add-hand-to-BlockMultiPlaceEvent.patch} | 4 +- ...1-Prevent-teleporting-dead-entities.patch} | 4 +- ...ipwire-hook-placement-before-update.patch} | 2 +- ...o-allow-iron-golems-to-spawn-in-air.patch} | 8 +- ...chance-of-villager-zombie-infection.patch} | 19 +- ...tch => 0425-Optimise-Chunk-getFluid.patch} | 10 +- ...mise-TickListServer-by-rewriting-it.patch} | 118 ++--- ...ator-behavior-for-EntityPhanton-goal.patch | 19 - ...pawn-settings-and-per-player-option.patch} | 17 +- ...e-Entity-is-never-double-registered.patch} | 24 +- ...ring-entities-from-unloading-chunks.patch} | 4 +- ...nections-shouldn-t-hold-up-shutdown.patch} | 4 +- ...ow-bees-to-load-chunks-for-beehives.patch} | 12 +- ...-more-tolerant-of-invalid-attributes.patch | 29 -- ...PlayerChunkMap-adds-crashing-server.patch} | 14 +- .../0439-Backport-fix-for-MC-167561.patch | 41 -- ...Status-cache-when-saving-protochunks.patch | 0 ...-Fix-spawn-radius-being-treated-as-0.patch | 2 + .../0429-Seed-based-feature-search.patch | 0 scripts/importmcdev.sh | 2 +- 79 files changed, 1260 insertions(+), 1466 deletions(-) rename Spigot-Server-Patches/{0366-Catch-exceptions-from-dispenser-entity-spawns.patch => 0365-Catch-exceptions-from-dispenser-entity-spawns.patch} (100%) rename Spigot-Server-Patches/{0380-Fix-World-isChunkGenerated-calls.patch => 0366-Fix-World-isChunkGenerated-calls.patch} (88%) rename Spigot-Server-Patches/{0381-Show-blockstate-location-if-we-failed-to-read-it.patch => 0367-Show-blockstate-location-if-we-failed-to-read-it.patch} (94%) rename Spigot-Server-Patches/{0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch => 0368-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch} (86%) rename removed/1.16/0378-incremental-chunk-saving.patch => Spigot-Server-Patches/0369-incremental-chunk-saving.patch (85%) rename Spigot-Server-Patches/{0384-Anti-Xray.patch => 0370-Anti-Xray.patch} (92%) rename Spigot-Server-Patches/{0385-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => 0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (62%) rename Spigot-Server-Patches/{0386-Configurable-projectile-relative-velocity.patch => 0372-Configurable-projectile-relative-velocity.patch} (57%) rename Spigot-Server-Patches/{0387-Mark-entities-as-being-ticked-when-notifying-navigat.patch => 0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch} (76%) rename Spigot-Server-Patches/{0388-offset-item-frame-ticking.patch => 0374-offset-item-frame-ticking.patch} (89%) rename Spigot-Server-Patches/{0389-Avoid-hopper-searches-if-there-are-no-items.patch => 0375-Avoid-hopper-searches-if-there-are-no-items.patch} (91%) rename Spigot-Server-Patches/{0390-Asynchronous-chunk-IO-and-loading.patch => 0376-Asynchronous-chunk-IO-and-loading.patch} (92%) rename Spigot-Server-Patches/{0391-Use-getChunkIfLoadedImmediately-in-places.patch => 0377-Use-getChunkIfLoadedImmediately-in-places.patch} (65%) rename Spigot-Server-Patches/{0392-Reduce-sync-loads.patch => 0378-Reduce-sync-loads.patch} (91%) rename Spigot-Server-Patches/{0393-Implement-alternative-item-despawn-rate.patch => 0379-Implement-alternative-item-despawn-rate.patch} (91%) create mode 100644 Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename Spigot-Server-Patches/{0395-Fix-MC-158900.patch => 0381-Fix-MC-158900.patch} (90%) rename Spigot-Server-Patches/{0396-implement-optional-per-player-mob-spawns.patch => 0382-implement-optional-per-player-mob-spawns.patch} (68%) rename Spigot-Server-Patches/{0397-Prevent-consuming-the-wrong-itemstack.patch => 0383-Prevent-consuming-the-wrong-itemstack.patch} (80%) rename Spigot-Server-Patches/{0398-only-add-passanger-entities-once-from-spawners.patch => 0384-only-add-passanger-entities-once-from-spawners.patch} (90%) rename Spigot-Server-Patches/{0399-Fix-nether-portal-creation.patch => 0385-Fix-nether-portal-creation.patch} (100%) create mode 100644 Spigot-Server-Patches/0386-Generator-Settings.patch rename Spigot-Server-Patches/{0402-Fix-MC-161754.patch => 0387-Fix-MC-161754.patch} (91%) rename Spigot-Server-Patches/{0403-Performance-improvement-for-Chunk.getEntities.patch => 0388-Performance-improvement-for-Chunk.getEntities.patch} (90%) rename Spigot-Server-Patches/{0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch => 0389-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch} (90%) rename Spigot-Server-Patches/{0405-Expose-the-internal-current-tick.patch => 0390-Expose-the-internal-current-tick.patch} (81%) rename Spigot-Server-Patches/{0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch => 0391-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch} (80%) rename Spigot-Server-Patches/{0407-Add-option-to-disable-pillager-patrols.patch => 0392-Add-option-to-disable-pillager-patrols.patch} (80%) rename Spigot-Server-Patches/{0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch => 0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch} (55%) delete mode 100644 Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename Spigot-Server-Patches/{0409-PlayerLaunchProjectileEvent.patch => 0394-PlayerLaunchProjectileEvent.patch} (82%) rename Spigot-Server-Patches/{0410-Add-CraftMagicNumbers.isSupportedApiVersion.patch => 0395-Add-CraftMagicNumbers.isSupportedApiVersion.patch} (90%) create mode 100644 Spigot-Server-Patches/0396-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename Spigot-Server-Patches/{0413-MC-145656-Fix-Follow-Range-Initial-Target.patch => 0397-MC-145656-Fix-Follow-Range-Initial-Target.patch} (89%) rename Spigot-Server-Patches/{0414-Optimize-Hoppers.patch => 0398-Optimize-Hoppers.patch} (92%) rename Spigot-Server-Patches/{0415-PlayerDeathEvent-shouldDropExperience.patch => 0399-PlayerDeathEvent-shouldDropExperience.patch} (81%) delete mode 100644 Spigot-Server-Patches/0400-Generator-Settings.patch rename Spigot-Server-Patches/{0416-Prevent-bees-loading-chunks-checking-hive-position.patch => 0400-Prevent-bees-loading-chunks-checking-hive-position.patch} (82%) rename Spigot-Server-Patches/{0417-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => 0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (82%) rename Spigot-Server-Patches/{0418-Guard-against-serializing-mismatching-chunk-coordina.patch => 0402-Guard-against-serializing-mismatching-chunk-coordina.patch} (85%) rename Spigot-Server-Patches/{0419-Optimise-IEntityAccess-getPlayerByUUID.patch => 0403-Optimise-IEntityAccess-getPlayerByUUID.patch} (57%) rename Spigot-Server-Patches/{0420-Fix-items-not-falling-correctly.patch => 0404-Fix-items-not-falling-correctly.patch} (89%) rename Spigot-Server-Patches/{0421-Lag-compensate-eating.patch => 0405-Lag-compensate-eating.patch} (65%) rename Spigot-Server-Patches/{0422-Optimize-call-to-getFluid-for-explosions.patch => 0406-Optimize-call-to-getFluid-for-explosions.patch} (72%) rename Spigot-Server-Patches/{0423-Fix-last-firework-in-stack-not-having-effects-when-d.patch => 0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch} (56%) rename Spigot-Server-Patches/{0424-Entity-Activation-Range-2.0.patch => 0408-Entity-Activation-Range-2.0.patch} (89%) rename Spigot-Server-Patches/{0425-Add-effect-to-block-break-naturally.patch => 0409-Add-effect-to-block-break-naturally.patch} (78%) rename Spigot-Server-Patches/{0426-Tracking-Range-Improvements.patch => 0410-Tracking-Range-Improvements.patch} (95%) rename Spigot-Server-Patches/{0428-Fix-items-vanishing-through-end-portal.patch => 0411-Fix-items-vanishing-through-end-portal.patch} (63%) delete mode 100644 Spigot-Server-Patches/0411-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename Spigot-Server-Patches/{0430-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => 0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (84%) rename Spigot-Server-Patches/{0431-Optimise-getChunkAt-calls-for-loaded-chunks.patch => 0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (89%) rename Spigot-Server-Patches/{0433-Allow-overriding-the-java-version-check.patch => 0414-Allow-overriding-the-java-version-check.patch} (90%) rename Spigot-Server-Patches/{0434-Add-ThrownEggHatchEvent.patch => 0415-Add-ThrownEggHatchEvent.patch} (89%) rename Spigot-Server-Patches/{0435-Optimise-random-block-ticking.patch => 0416-Optimise-random-block-ticking.patch} (67%) rename Spigot-Server-Patches/{0436-Entity-Jump-API.patch => 0417-Entity-Jump-API.patch} (76%) rename Spigot-Server-Patches/{0437-Add-option-to-nerf-pigmen-from-nether-portals.patch => 0418-Add-option-to-nerf-pigmen-from-nether-portals.patch} (75%) rename Spigot-Server-Patches/{0438-Make-the-GUI-graph-fancier.patch => 0419-Make-the-GUI-graph-fancier.patch} (95%) rename Spigot-Server-Patches/{0440-add-hand-to-BlockMultiPlaceEvent.patch => 0420-add-hand-to-BlockMultiPlaceEvent.patch} (89%) rename Spigot-Server-Patches/{0441-Prevent-teleporting-dead-entities.patch => 0421-Prevent-teleporting-dead-entities.patch} (84%) rename Spigot-Server-Patches/{0442-Validate-tripwire-hook-placement-before-update.patch => 0422-Validate-tripwire-hook-placement-before-update.patch} (90%) rename Spigot-Server-Patches/{0443-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => 0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (82%) rename Spigot-Server-Patches/{0444-Configurable-chance-of-villager-zombie-infection.patch => 0424-Configurable-chance-of-villager-zombie-infection.patch} (84%) rename Spigot-Server-Patches/{0445-Optimise-Chunk-getFluid.patch => 0425-Optimise-Chunk-getFluid.patch} (87%) rename Spigot-Server-Patches/{0446-Optimise-TickListServer-by-rewriting-it.patch => 0426-Optimise-TickListServer-by-rewriting-it.patch} (91%) delete mode 100644 Spigot-Server-Patches/0427-Fix-comparator-behavior-for-EntityPhanton-goal.patch rename Spigot-Server-Patches/{0447-Pillager-patrol-spawn-settings-and-per-player-option.patch => 0427-Pillager-patrol-spawn-settings-and-per-player-option.patch} (92%) rename Spigot-Server-Patches/{0448-Ensure-Entity-is-never-double-registered.patch => 0428-Ensure-Entity-is-never-double-registered.patch} (77%) rename Spigot-Server-Patches/{0449-Fix-unregistering-entities-from-unloading-chunks.patch => 0429-Fix-unregistering-entities-from-unloading-chunks.patch} (88%) rename Spigot-Server-Patches/{0450-Remote-Connections-shouldn-t-hold-up-shutdown.patch => 0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (86%) rename Spigot-Server-Patches/{0451-Do-not-allow-bees-to-load-chunks-for-beehives.patch => 0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (73%) delete mode 100644 Spigot-Server-Patches/0432-Be-more-tolerant-of-invalid-attributes.patch rename Spigot-Server-Patches/{0452-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => 0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (81%) delete mode 100644 Spigot-Server-Patches/0439-Backport-fix-for-MC-167561.patch rename {Spigot-Server-Patches => removed/1.16}/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0412-Fix-spawn-radius-being-treated-as-0.patch (98%) rename {Spigot-Server-Patches => removed/1.16}/0429-Seed-based-feature-search.patch (100%) diff --git a/SHIT_TO_CHECK.md b/SHIT_TO_CHECK.md index 6077d66cd2..024d8cc9af 100644 --- a/SHIT_TO_CHECK.md +++ b/SHIT_TO_CHECK.md @@ -4,3 +4,5 @@ * Mini: "Optimize World Server Map": Figure out how to fill PaperWorldMap, it needs a dim key which doesnt exist anymore? * Mini: "MC-50319": fix if still works * Mini: I definetly dropped a patch I didnt want to drop, we need to go thru in the end and see if all patches are still in, lol +* Make sure the flat bedrock setting doesn't do anything stupid +* Check DataBits foreach \ No newline at end of file diff --git a/Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0365-Catch-exceptions-from-dispenser-entity-spawns.patch similarity index 100% rename from Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch rename to Spigot-Server-Patches/0365-Catch-exceptions-from-dispenser-entity-spawns.patch diff --git a/Spigot-Server-Patches/0380-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0366-Fix-World-isChunkGenerated-calls.patch similarity index 88% rename from Spigot-Server-Patches/0380-Fix-World-isChunkGenerated-calls.patch rename to Spigot-Server-Patches/0366-Fix-World-isChunkGenerated-calls.patch index 66b5a976d6..a50ee287d7 100644 --- a/Spigot-Server-Patches/0380-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0366-Fix-World-isChunkGenerated-calls.patch @@ -8,10 +8,10 @@ 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 7b855ec2914a8a31ce0ade0f7ad085dd04f71478..d8647f272bdb29518b1a7faafa6fbcb53ffe1163 100644 +index 9f4c79629c981d496b96cf8a7a4c8e058f102b8b..726926f19c6725c1d935beec2f0f766d7466835e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -29,7 +29,7 @@ public class ChunkProviderServer extends IChunkProvider { private final WorldServer world; public final Thread serverThread; // Paper - private -> public private final LightEngineThreaded lightEngine; @@ -20,7 +20,7 @@ index 7b855ec2914a8a31ce0ade0f7ad085dd04f71478..d8647f272bdb29518b1a7faafa6fbcb5 public final PlayerChunkMap playerChunkMap; private final WorldPersistentData worldPersistentData; private long lastTickTime; -@@ -294,6 +294,21 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -295,6 +295,21 @@ public class ChunkProviderServer extends IChunkProvider { return ret; } @@ -43,10 +43,10 @@ index 7b855ec2914a8a31ce0ade0f7ad085dd04f71478..d8647f272bdb29518b1a7faafa6fbcb5 @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index f54572773c25b6716a68166efa8d3fc8b22b6258..8e4b3e52cbc95e24b1d72aed9ec8c32b94a91561 100644 +index 17b8c4445af2bd2ed907d05ed3c396d4290dc63d..208a8ef3aaa4b33bfe2db2569a3588a332ab5686 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -403,6 +403,17 @@ public class ChunkRegionLoader { +@@ -407,6 +407,17 @@ public class ChunkRegionLoader { } // Paper end @@ -65,10 +65,10 @@ index f54572773c25b6716a68166efa8d3fc8b22b6258..8e4b3e52cbc95e24b1d72aed9ec8c32b if (nbttagcompound != null) { ChunkStatus chunkstatus = ChunkStatus.a(nbttagcompound.getCompound("Level").getString("Status")); diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java -index efdf611e66ffd782291de749d8a48f3bf08f2129..134a4f0b7d254b5dd8ca26a9c5874532826978c4 100644 +index fb3ddcc5d5a1154a7e0583135ecd541e8f67ff0b..3ef584605d408c268806e74b95e9223ca4ffe0d9 100644 --- a/src/main/java/net/minecraft/server/ChunkStatus.java +++ b/src/main/java/net/minecraft/server/ChunkStatus.java -@@ -176,6 +176,7 @@ public class ChunkStatus { +@@ -182,6 +182,7 @@ public class ChunkStatus { return this.s; } @@ -76,7 +76,7 @@ index efdf611e66ffd782291de749d8a48f3bf08f2129..134a4f0b7d254b5dd8ca26a9c5874532 public ChunkStatus e() { return this.u; } -@@ -196,6 +197,17 @@ public class ChunkStatus { +@@ -202,6 +203,17 @@ public class ChunkStatus { return this.y; } @@ -95,7 +95,7 @@ index efdf611e66ffd782291de749d8a48f3bf08f2129..134a4f0b7d254b5dd8ca26a9c5874532 return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s)); } diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java -index f0a052eec2fb72b11dc70bf62a5e57f599bbc190..2f95174fcc467908808ed3f2dc956bdcafdc3558 100644 +index 2fde0b6ca8f38a998ac73b68be61fbfea9088cee..fa03834dacacf7ae6a326c88007256a261153c27 100644 --- a/src/main/java/net/minecraft/server/IChunkLoader.java +++ b/src/main/java/net/minecraft/server/IChunkLoader.java @@ -8,7 +8,7 @@ import javax.annotation.Nullable; @@ -108,10 +108,10 @@ index f0a052eec2fb72b11dc70bf62a5e57f599bbc190..2f95174fcc467908808ed3f2dc956bdc @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 ed9ada49c7cc1131691bd6e005b2380274ef23e3..52ea4f05a0c7f29f62f31bb032a5ceb905107e60 100644 +index d806b6acbcfbf141f4c1436bd5a163fbf11bf4e6..3b0d13d319fe1d274ab657c7c87e5a2db5c02c4f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -115,6 +115,19 @@ public class PlayerChunk { +@@ -111,6 +111,19 @@ public class PlayerChunk { Either either = (Either) statusFuture.getNow(null); return either == null ? null : (Chunk) either.left().orElse(null); } @@ -132,24 +132,22 @@ index ed9ada49c7cc1131691bd6e005b2380274ef23e3..52ea4f05a0c7f29f62f31bb032a5ceb9 public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 4f5b516144829a7ae11f21a56789ac7a1f256250..1d517fd1aea90edf470388fd857a41f2be149327 100644 +index 684d84e3c5caf1a0c816895c4930d056b2ba8be5..6dda11ffc022aa9bc7481506811a710a184f5e78 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -969,12 +969,62 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -938,12 +938,61 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @Nullable - private NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { + public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); - -- return nbttagcompound == null ? null : this.getChunkData(this.world.getWorldProvider().getDimensionManager(), this.l, nbttagcompound, chunkcoordintpair, world); // CraftBukkit + // Paper start - Cache chunk status on disk + if (nbttagcompound == null) { + return null; + } + -+ nbttagcompound = this.getChunkData(this.world.getWorldProvider().getDimensionManager(), this.l, nbttagcompound, chunkcoordintpair, world); // CraftBukkit ++ nbttagcompound = this.getChunkData(this.world.getTypeKey(), this.l, nbttagcompound, chunkcoordintpair, world); // CraftBukkit + if (nbttagcompound == null) { + return null; + } @@ -165,12 +163,12 @@ index 4f5b516144829a7ae11f21a56789ac7a1f256250..1d517fd1aea90edf470388fd857a41f2 + RegionFile regionFile = this.getIOWorker().getRegionFileCache().getRegionFileIfLoaded(chunkPos); + + return regionFile == null ? null : regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); - } - -+ public ChunkStatus getChunkStatusOnDisk(ChunkCoordIntPair chunkPos) throws IOException { -+ RegionFile regionFile = this.getIOWorker().getRegionFileCache().getFile(chunkPos, false); ++ } + -+ if (!regionFile.chunkExists(chunkPos)) { ++ public ChunkStatus getChunkStatusOnDisk(ChunkCoordIntPair chunkPos) throws IOException { ++ RegionFile regionFile = this.getIOWorker().getRegionFileCache().getFile(chunkPos, true); ++ ++ if (regionFile == null || !regionFile.chunkExists(chunkPos)) { + return null; + } + @@ -181,10 +179,11 @@ index 4f5b516144829a7ae11f21a56789ac7a1f256250..1d517fd1aea90edf470388fd857a41f2 + } + + this.readChunkData(chunkPos); -+ + +- return nbttagcompound == null ? null : this.getChunkData(this.world.getTypeKey(), this.l, nbttagcompound, chunkcoordintpair, world); // CraftBukkit + return regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); -+ } -+ + } + + public void updateChunkStatusOnDisk(ChunkCoordIntPair chunkPos, @Nullable NBTTagCompound compound) throws IOException { + RegionFile regionFile = this.getIOWorker().getRegionFileCache().getFile(chunkPos, false); + @@ -201,7 +200,7 @@ index 4f5b516144829a7ae11f21a56789ac7a1f256250..1d517fd1aea90edf470388fd857a41f2 // Spigot start return isOutsideOfRange(chunkcoordintpair, false); diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 6b543f89d4e32fb79bfe9aa7b815e4117dbea602..d37abf2cf304f81405e570588c8accbc44a629f4 100644 +index f781bb12a1c37d8b3088d0f638eae80d5b80aca4..e1730709fff5dfee68621d0aaed70a00bab97948 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -36,6 +36,30 @@ public class RegionFile implements AutoCloseable { @@ -232,10 +231,10 @@ index 6b543f89d4e32fb79bfe9aa7b815e4117dbea602..d37abf2cf304f81405e570588c8accbc + } + // Paper end + - public RegionFile(File file, File file1) throws IOException { - this(file.toPath(), file1.toPath(), RegionFileCompression.b); + public RegionFile(File file, File file1, boolean flag) throws IOException { + this(file.toPath(), file1.toPath(), RegionFileCompression.b, flag); } -@@ -350,11 +374,13 @@ public class RegionFile implements AutoCloseable { +@@ -359,11 +383,13 @@ public class RegionFile implements AutoCloseable { return this.getOffset(chunkcoordintpair) != 0; } @@ -247,14 +246,14 @@ index 6b543f89d4e32fb79bfe9aa7b815e4117dbea602..d37abf2cf304f81405e570588c8accbc public void close() throws IOException { + this.closed = true; // Paper try { - this.c(); + this.d(); } finally { diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 942b7d323936a872d83c536c1901b4b436aa7e7c..2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095 100644 +index 02bd568af727633a6e834d5328683a9ff67b9dd7..341689ac996164b7b53e095495b92b6e85ab991a 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java -@@ -18,7 +18,14 @@ public final class RegionFileCache implements AutoCloseable { - this.b = file; +@@ -20,7 +20,14 @@ public final class RegionFileCache implements AutoCloseable { + this.c = flag; } - private RegionFile getFile(ChunkCoordIntPair chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit @@ -269,7 +268,7 @@ index 942b7d323936a872d83c536c1901b4b436aa7e7c..2f8af42e2aadeb1b11db94fdb54ec0ba long i = ChunkCoordIntPair.pair(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()); RegionFile regionfile = (RegionFile) this.cache.getAndMoveToFirst(i); -@@ -165,7 +172,8 @@ public final class RegionFileCache implements AutoCloseable { +@@ -167,7 +174,8 @@ public final class RegionFileCache implements AutoCloseable { try { NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream); @@ -280,7 +279,7 @@ index 942b7d323936a872d83c536c1901b4b436aa7e7c..2f8af42e2aadeb1b11db94fdb54ec0ba throwable = throwable1; throw throwable1; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b257ef7583f7bc3b6d31f0be89990603640c5ff7..cf059aa091e9c732f99b89fc347074a9c1b879a8 100644 +index 0286bfc117efd9424de332f20398a26d613b98b7..1f1839f40a406f6a2bf2d3af68c2d208d6503b2d 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; @@ -291,7 +290,7 @@ index b257ef7583f7bc3b6d31f0be89990603640c5ff7..cf059aa091e9c732f99b89fc347074a9 import java.util.function.Predicate; import java.util.stream.Collectors; import net.minecraft.server.ArraySetSorted; -@@ -410,8 +411,22 @@ public class CraftWorld implements World { +@@ -411,8 +412,22 @@ public class CraftWorld implements World { @Override public boolean isChunkGenerated(int x, int z) { @@ -315,7 +314,7 @@ index b257ef7583f7bc3b6d31f0be89990603640c5ff7..cf059aa091e9c732f99b89fc347074a9 } catch (IOException ex) { throw new RuntimeException(ex); } -@@ -522,20 +537,49 @@ public class CraftWorld implements World { +@@ -523,20 +538,49 @@ public class CraftWorld implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/Spigot-Server-Patches/0381-Show-blockstate-location-if-we-failed-to-read-it.patch b/Spigot-Server-Patches/0367-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 94% rename from Spigot-Server-Patches/0381-Show-blockstate-location-if-we-failed-to-read-it.patch rename to Spigot-Server-Patches/0367-Show-blockstate-location-if-we-failed-to-read-it.patch index 76414879fa..bdabcc0cc8 100644 --- a/Spigot-Server-Patches/0381-Show-blockstate-location-if-we-failed-to-read-it.patch +++ b/Spigot-Server-Patches/0367-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Show blockstate location if we failed to read it diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index f6401e2cde9d56547cee7f8d9e4b2a58764ee895..3e22d558ea09a6554e1bc71f8ca10277ec480705 100644 +index feeae1a9eb309ae4101783b191bb2bffe9aeb7d3..6e9eff2c29528b857cf758e9e45606c8a1c1cc8d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -19,6 +19,8 @@ public class CraftBlockEntityState extends CraftBlockState diff --git a/Spigot-Server-Patches/0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch b/Spigot-Server-Patches/0368-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch similarity index 86% rename from Spigot-Server-Patches/0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch rename to Spigot-Server-Patches/0368-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch index fab2aaf139..f0a0d68f9e 100644 --- a/Spigot-Server-Patches/0382-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch +++ b/Spigot-Server-Patches/0368-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch @@ -13,10 +13,10 @@ contention situations. And this is extremely a low contention situation. diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 3586fe065f21fbf1e71b602c372a690ef603f377..44310efd63b0a460e9dcdc1c8ad0abec78052061 100644 +index bcf249aab7d8223f6d9b597fcb20c1aa523ab862..4d397dc5a5127d5e9eb1ba5675239b022a1544c0 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -24,7 +24,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -23,7 +23,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER private final ReentrantLock j = new ReentrantLock(); @@ -25,7 +25,7 @@ index 3586fe065f21fbf1e71b602c372a690ef603f377..44310efd63b0a460e9dcdc1c8ad0abec if (this.j.isLocked() && !this.j.isHeldByCurrentThread()) { String s = (String) Thread.getAllStackTraces().keySet().stream().filter(Objects::nonNull).map((thread) -> { return thread.getName() + ": \n\tat " + (String) Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n\tat ")); -@@ -36,11 +36,11 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -35,11 +35,11 @@ public class DataPaletteBlock implements DataPaletteExpandable { throw new ReportedException(crashreport); } else { this.j.lock(); @@ -39,7 +39,7 @@ index 3586fe065f21fbf1e71b602c372a690ef603f377..44310efd63b0a460e9dcdc1c8ad0abec } public DataPaletteBlock(DataPalette datapalette, RegistryBlockID registryblockid, Function function, Function function1, T t0) { -@@ -76,7 +76,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -75,7 +75,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { } @Override @@ -48,7 +48,7 @@ index 3586fe065f21fbf1e71b602c372a690ef603f377..44310efd63b0a460e9dcdc1c8ad0abec this.a(); DataBits databits = this.a; DataPalette datapalette = this.h; -@@ -99,18 +99,18 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -98,18 +98,18 @@ public class DataPaletteBlock implements DataPaletteExpandable { } public T setBlock(int i, int j, int k, T t0) { @@ -72,7 +72,7 @@ index 3586fe065f21fbf1e71b602c372a690ef603f377..44310efd63b0a460e9dcdc1c8ad0abec int j = this.h.a(t0); int k = this.a.a(i, j); T t1 = this.h.a(k); -@@ -135,7 +135,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -134,7 +134,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { } public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER @@ -81,16 +81,16 @@ index 3586fe065f21fbf1e71b602c372a690ef603f377..44310efd63b0a460e9dcdc1c8ad0abec this.a(); packetdataserializer.writeByte(this.i); this.h.b(packetdataserializer); -@@ -143,7 +143,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -142,7 +142,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { this.b(); } - public void a(NBTTagList nbttaglist, long[] along) { + public synchronized void a(NBTTagList nbttaglist, long[] along) { // Paper - synchronize this.a(); - int i = Math.max(4, MathHelper.d(nbttaglist.size())); + int i = Math.max(4, MathHelper.e(nbttaglist.size())); -@@ -176,7 +176,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -175,7 +175,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { this.b(); } diff --git a/removed/1.16/0378-incremental-chunk-saving.patch b/Spigot-Server-Patches/0369-incremental-chunk-saving.patch similarity index 85% rename from removed/1.16/0378-incremental-chunk-saving.patch rename to Spigot-Server-Patches/0369-incremental-chunk-saving.patch index 6afaaf3e9d..761a36ea6b 100644 --- a/removed/1.16/0378-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0369-incremental-chunk-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 071e5e7f729d6c3ffb70506e7ef32eebee1e9118..48676152152faf7a7b9524ac37d8b4a8c32c4e2c 100644 +index 91c9a027dd7aef8253f3d707c95e4ed917d32580..b947b31fc3b135f116af97907d5301619cc33070 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -487,4 +487,19 @@ public class PaperWorldConfig { +@@ -455,4 +455,19 @@ public class PaperWorldConfig { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); } @@ -29,10 +29,10 @@ index 071e5e7f729d6c3ffb70506e7ef32eebee1e9118..48676152152faf7a7b9524ac37d8b4a8 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 962f425bbb7165740e77664dc543f976ef3d9c4a..dd3857bb6a002d8432ecbc6c6b52a39e5d55e6a6 100644 +index 141f2e8975b01fc2a5e7743955894f100c3062a2..8a316f732644886c476921c69838e9cb8b93a5b5 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { +@@ -43,7 +43,7 @@ public class Chunk implements IChunkAccess { private TickList o; private TickList p; private boolean q; @@ -42,10 +42,10 @@ index 962f425bbb7165740e77664dc543f976ef3d9c4a..dd3857bb6a002d8432ecbc6c6b52a39e 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 8a8fb6acaabc5fc179a23ce3e23ddb54e1ee23a4..7b855ec2914a8a31ce0ade0f7ad085dd04f71478 100644 +index 726926f19c6725c1d935beec2f0f766d7466835e..f2ff1aa915c218bb1fc72467ccbd73ccf135c494 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -525,6 +525,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -535,6 +535,15 @@ public class ChunkProviderServer extends IChunkProvider { } // Paper - Timings } @@ -62,10 +62,10 @@ index 8a8fb6acaabc5fc179a23ce3e23ddb54e1ee23a4..7b855ec2914a8a31ce0ade0f7ad085dd public void close() throws IOException { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 257adcf4d5387fc18d5c48e0fa221f68539ad8f9..7920d24ab089fb8360ef74946cf7dc35cb7625eb 100644 +index 531031221346d2ed46bd25793c6c2b81029860d4..03ae25736b02ac02c01e76b5d2fbfd803585ebde 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; @@ -73,7 +73,7 @@ index 257adcf4d5387fc18d5c48e0fa221f68539ad8f9..7920d24ab089fb8360ef74946cf7dc35 public File bukkitDataPackFolder; public CommandDispatcher vanillaCommandDispatcher; private boolean forceTicks; -@@ -1116,14 +1117,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 47e3e618c9e683e6975fb64e1094dc7078574dae..ed9ada49c7cc1131691bd6e005b2380274ef23e3 100644 +index 3b0d13d319fe1d274ab657c7c87e5a2db5c02c4f..3e1c1253ad5e2fa68fd8a0bac100c2e7536ea080 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -41,6 +41,9 @@ public class PlayerChunk { +@@ -40,6 +40,9 @@ public class PlayerChunk { private final PlayerChunkMap chunkMap; // Paper @@ -175,10 +175,10 @@ index 47e3e618c9e683e6975fb64e1094dc7078574dae..ed9ada49c7cc1131691bd6e005b23802 public void a(ProtoChunkExtension protochunkextension) { for (int i = 0; i < this.statusFutures.length(); ++i) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 34f470779fa5d1cf9638431253024481236c073b..4f5b516144829a7ae11f21a56789ac7a1f256250 100644 +index 6dda11ffc022aa9bc7481506811a710a184f5e78..39d89d6209123ae2146ae292009cad44c25f490a 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -332,6 +332,64 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -333,6 +333,64 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -195,7 +195,7 @@ index 34f470779fa5d1cf9638431253024481236c073b..4f5b516144829a7ae11f21a56789ac7a + protected void saveIncrementally() { + int savedThisTick = 0; + // optimized since we search far less chunks to hit ones that need to be saved -+ List reschedule = new ArrayList<>(this.world.paperConfig.maxAutoSaveChunksPerTick); ++ List reschedule = new java.util.ArrayList<>(this.world.paperConfig.maxAutoSaveChunksPerTick); + long currentTick = this.world.getTime(); + long maxSaveTime = currentTick - this.world.paperConfig.autoSavePeriod; + @@ -243,7 +243,7 @@ index 34f470779fa5d1cf9638431253024481236c073b..4f5b516144829a7ae11f21a56789ac7a protected void save(boolean flag) { if (flag) { List list = (List) this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).peek(PlayerChunk::m).collect(Collectors.toList()); -@@ -442,6 +500,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -443,6 +501,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.world.unloadChunk(chunk); } @@ -251,7 +251,7 @@ index 34f470779fa5d1cf9638431253024481236c073b..4f5b516144829a7ae11f21a56789ac7a this.lightEngine.a(ichunkaccess.getPos()); this.lightEngine.queueUpdate(); -@@ -623,6 +682,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -635,6 +694,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { playerchunk.a(new ProtoChunkExtension(chunk)); } @@ -261,15 +261,15 @@ index 34f470779fa5d1cf9638431253024481236c073b..4f5b516144829a7ae11f21a56789ac7a 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 ca0a23be27ee8174204867d463eb89a10931ff84..a0484d8062ecfb817cfd5b996915dc8f9a4eb2bd 100644 +index 58c6f9194dbd767650117594eee3ae0ba3a00dce..c2fffa60b3d020e4c70a2cabcf61ec36fb9edc65 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -817,11 +817,44 @@ public class WorldServer extends World { - return this.worldProvider.c(); +@@ -769,11 +769,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { + return !this.server.a(this, blockposition, entityhuman) && this.getWorldBorder().a(blockposition); } + // Paper start - derived from below -+ public void saveIncrementally(boolean doFull) throws ExceptionWorldConflict { ++ public void saveIncrementally(boolean doFull) { + ChunkProviderServer chunkproviderserver = this.getChunkProvider(); + + if (doFull) { @@ -286,35 +286,34 @@ index ca0a23be27ee8174204867d463eb89a10931ff84..a0484d8062ecfb817cfd5b996915dc8f + timings.worldSaveChunks.stopTiming(); // Paper + + ++ // Copied from save() + // CraftBukkit start - moved from MinecraftServer.saveChunks -+ // PAIL - rename -+ if (doFull) { ++ if (doFull) { // Paper + WorldServer worldserver1 = this; -+ WorldData worlddata = worldserver1.getWorldData(); + -+ worldserver1.getWorldBorder().save(worlddata); -+ worlddata.setCustomBossEvents(this.server.getBossBattleCustomData().save()); -+ worldserver1.getDataManager().saveWorldData(worlddata, this.server.getPlayerList().save()); -+ // CraftBukkit end ++ worldDataServer.a(worldserver1.getWorldBorder().t()); ++ worldDataServer.setCustomBossEvents(this.server.getBossBattleCustomData().save()); ++ convertable.a(this.server.f, this.worldDataServer, this.server.getPlayerList().save()); + } ++ // CraftBukkit end + } + } + // Paper end + - public void save(@Nullable IProgressUpdate iprogressupdate, boolean flag, boolean flag1) throws ExceptionWorldConflict { + public void save(@Nullable IProgressUpdate iprogressupdate, boolean flag, boolean flag1) { ChunkProviderServer chunkproviderserver = this.getChunkProvider(); if (!flag1) { - org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit -+ if (flag) org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit ++ if (flag) org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit // Paper try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper if (iprogressupdate != null) { - iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); -@@ -848,6 +881,7 @@ public class WorldServer extends World { + iprogressupdate.a(new ChatMessage("menu.savingLevel")); +@@ -799,6 +831,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit end } -+ protected void saveData() throws ExceptionWorldConflict { this.m_(); } // Paper - OBFHELPER - protected void m_() throws ExceptionWorldConflict { - this.checkSession(); - this.worldProvider.i(); ++ private void saveData() { this.ag(); } // Paper - OBFHELPER + private void ag() { + if (this.dragonBattle != null) { + this.server.getSaveData().a(this.dragonBattle.a()); diff --git a/Spigot-Server-Patches/0384-Anti-Xray.patch b/Spigot-Server-Patches/0370-Anti-Xray.patch similarity index 92% rename from Spigot-Server-Patches/0384-Anti-Xray.patch rename to Spigot-Server-Patches/0370-Anti-Xray.patch index 47bca2c297..fc10c0f704 100644 --- a/Spigot-Server-Patches/0384-Anti-Xray.patch +++ b/Spigot-Server-Patches/0370-Anti-Xray.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 48676152152faf7a7b9524ac37d8b4a8c32c4e2c..f7c7c2871726e3a1673a693b9bd93910a28189b2 100644 +index b947b31fc3b135f116af97907d5301619cc33070..43925ed1e5c210399ba9fedb7bf890a6bd617e4a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,9 @@ @@ -18,7 +18,7 @@ index 48676152152faf7a7b9524ac37d8b4a8c32c4e2c..f7c7c2871726e3a1673a693b9bd93910 import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -502,4 +504,31 @@ public class PaperWorldConfig { +@@ -470,4 +472,31 @@ public class PaperWorldConfig { private void maxAutoSaveChunksPerTick() { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -998,10 +998,10 @@ index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e3 + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index dd3857bb6a002d8432ecbc6c6b52a39e5d55e6a6..08b3cbabc482d71862d90fcd9acd32d28f44a6e2 100644 +index 8a316f732644886c476921c69838e9cb8b93a5b5..8fa440b313b414a79118089b7481dee9f7ba69a8 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -422,7 +422,7 @@ public class Chunk implements IChunkAccess { +@@ -423,7 +423,7 @@ public class Chunk implements IChunkAccess { return null; } @@ -1011,10 +1011,10 @@ index dd3857bb6a002d8432ecbc6c6b52a39e5d55e6a6..08b3cbabc482d71862d90fcd9acd32d2 } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 8e4b3e52cbc95e24b1d72aed9ec8c32b94a91561..d287ea55c550dbebbbc1d5f815296ae7ba6315e9 100644 +index 208a8ef3aaa4b33bfe2db2569a3588a332ab5686..be3c7a8697c540d03a143b9306311a184474857f 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -57,7 +57,7 @@ public class ChunkRegionLoader { +@@ -58,7 +58,7 @@ public class ChunkRegionLoader { byte b0 = nbttagcompound2.getByte("Y"); if (nbttagcompound2.hasKeyOfType("Palette", 9) && nbttagcompound2.hasKeyOfType("BlockStates", 12)) { @@ -1023,7 +1023,7 @@ index 8e4b3e52cbc95e24b1d72aed9ec8c32b94a91561..d287ea55c550dbebbbc1d5f815296ae7 chunksection.getBlocks().a(nbttagcompound2.getList("Palette", 10), nbttagcompound2.getLongArray("BlockStates")); chunksection.recalcBlockCounts(); -@@ -115,7 +115,7 @@ public class ChunkRegionLoader { +@@ -116,7 +116,7 @@ public class ChunkRegionLoader { loadEntities(nbttagcompound1, chunk); }); } else { @@ -1033,17 +1033,18 @@ index 8e4b3e52cbc95e24b1d72aed9ec8c32b94a91561..d287ea55c550dbebbbc1d5f815296ae7 protochunk.a(biomestorage); object = protochunk; diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index e72d1386feb59e4a4c27466da96ffd29222bea18..c180d44bed91c86838d3be8c19be954b4412534e 100644 +index bd2290a4d4ec314b7afdb1f63d711f80803153cd..b168ad8021a5387e05023cd03ec1a69c8a86a233 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -1,5 +1,6 @@ +@@ -1,6 +1,7 @@ package net.minecraft.server; + import java.util.function.Predicate; +import com.destroystokyo.paper.antixray.ChunkPacketInfo; // Paper - Anti-Xray - Add chunk packet info import javax.annotation.Nullable; public class ChunkSection { -@@ -11,16 +12,22 @@ public class ChunkSection { +@@ -12,16 +13,22 @@ public class ChunkSection { private short e; final DataPaletteBlock blockIds; @@ -1065,12 +1066,12 @@ index e72d1386feb59e4a4c27466da96ffd29222bea18..c180d44bed91c86838d3be8c19be954b this.nonEmptyBlockCount = short0; this.tickingBlockCount = short1; this.e = short2; -- this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); -+ this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world == null ? null : world.chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, initializeBlocks), initializeBlocks); // Paper - Anti-Xray - Add predefined block data +- this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::c, GameProfileSerializer::a, Blocks.AIR.getBlockData()); ++ this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::c, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world == null ? null : world.chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, initializeBlocks), initializeBlocks); // Paper - Anti-Xray - Add predefined block data } public final IBlockData getType(int i, int j, int k) { // Paper -@@ -132,10 +139,14 @@ public class ChunkSection { +@@ -133,10 +140,14 @@ public class ChunkSection { return this.blockIds; } @@ -1089,18 +1090,18 @@ index e72d1386feb59e4a4c27466da96ffd29222bea18..c180d44bed91c86838d3be8c19be954b public int j() { diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 44310efd63b0a460e9dcdc1c8ad0abec78052061..a5ea0e34ec181ad9f98f9ee2f644c3ec1eb1cd3c 100644 +index 4d397dc5a5127d5e9eb1ba5675239b022a1544c0..900b551f6f76862443b09c1e76ad596eda5655f4 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -3,6 +3,7 @@ package net.minecraft.server; - import it.unimi.dsi.fastutil.ints.Int2IntMap; +@@ -1,6 +1,7 @@ + package net.minecraft.server; + import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; - import it.unimi.dsi.fastutil.ints.Int2IntMap.Entry; +import com.destroystokyo.paper.antixray.ChunkPacketInfo; // Paper - Anti-Xray - Add chunk packet info import java.util.Arrays; import java.util.Objects; import java.util.concurrent.locks.ReentrantLock; -@@ -19,6 +20,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -18,6 +19,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { private final Function e; private final Function f; private final T g; @@ -1108,7 +1109,7 @@ index 44310efd63b0a460e9dcdc1c8ad0abec78052061..a5ea0e34ec181ad9f98f9ee2f644c3ec protected DataBits a; protected DataBits getDataBits() { return this.a; } // Paper - OBFHELPER private DataPalette h; private DataPalette getDataPalette() { return this.h; } // Paper - OBFHELPER private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER -@@ -43,14 +45,47 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -42,14 +44,47 @@ public class DataPaletteBlock implements DataPaletteExpandable { //this.j.unlock(); // Paper - disable this } @@ -1158,7 +1159,7 @@ index 44310efd63b0a460e9dcdc1c8ad0abec78052061..a5ea0e34ec181ad9f98f9ee2f644c3ec private static int b(int i, int j, int k) { return j << 8 | k << 4 | i; -@@ -85,6 +120,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -84,6 +119,7 @@ public class DataPaletteBlock implements DataPaletteExpandable { int j; @@ -1166,7 +1167,7 @@ index 44310efd63b0a460e9dcdc1c8ad0abec78052061..a5ea0e34ec181ad9f98f9ee2f644c3ec for (j = 0; j < databits.b(); ++j) { T t1 = datapalette.a(databits.a(j)); -@@ -134,24 +170,38 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -133,24 +169,38 @@ public class DataPaletteBlock implements DataPaletteExpandable { return t0 == null ? this.g : t0; } @@ -1195,9 +1196,9 @@ index 44310efd63b0a460e9dcdc1c8ad0abec78052061..a5ea0e34ec181ad9f98f9ee2f644c3ec public synchronized void a(NBTTagList nbttaglist, long[] along) { // Paper - synchronize this.a(); -- int i = Math.max(4, MathHelper.d(nbttaglist.size())); +- int i = Math.max(4, MathHelper.e(nbttaglist.size())); + // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)? -+ int i = Math.max(4, MathHelper.d(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects ++ int i = Math.max(4, MathHelper.e(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects - if (i != this.i) { + if (true || i != this.i) { // Paper - Anti-Xray - Not initialized yet @@ -1210,7 +1211,7 @@ index 44310efd63b0a460e9dcdc1c8ad0abec78052061..a5ea0e34ec181ad9f98f9ee2f644c3ec if (this.h == this.b) { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 23223f3f45210cf23f44f9012f292db80df781a0..9b608d73869bd2907f705562c8378bc2f205767b 100644 +index 900f16efde29ace3f073b1cbc01df8bafc360a9a..8335d003369d94cbad17ec6fce76d6f9d016455a 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -1,5 +1,6 @@ @@ -1220,14 +1221,13 @@ index 23223f3f45210cf23f44f9012f292db80df781a0..9b608d73869bd2907f705562c8378bc2 import com.google.common.collect.Lists; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -@@ -20,8 +21,13 @@ public class PacketPlayOutMapChunk implements Packet { - private byte[] f; private byte[] getData() { return this.f; } // Paper - OBFHELPER - private List g; +@@ -22,7 +23,12 @@ public class PacketPlayOutMapChunk implements Packet { private boolean h; -+ private volatile boolean ready; // Paper - Async-Anti-Xray - Ready flag for the network manager + private boolean i; - public PacketPlayOutMapChunk() {} + // Paper start - Async-Anti-Xray - Set the ready flag to true ++ private volatile boolean ready; // Paper - Async-Anti-Xray - Ready flag for the network manager + public PacketPlayOutMapChunk() { + this.ready = true; + } @@ -1235,29 +1235,29 @@ index 23223f3f45210cf23f44f9012f292db80df781a0..9b608d73869bd2907f705562c8378bc2 // Paper start private final java.util.List extraPackets = new java.util.ArrayList<>(); -@@ -33,6 +39,7 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -34,6 +40,7 @@ public class PacketPlayOutMapChunk implements Packet { } // Paper end - public PacketPlayOutMapChunk(Chunk chunk, int i) { + public PacketPlayOutMapChunk(Chunk chunk, int i, boolean flag) { + ChunkPacketInfo chunkPacketInfo = chunk.world.chunkPacketBlockController.getChunkPacketInfo(this, chunk, i); // Paper - Anti-Xray - Add chunk packet info ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); this.a = chunkcoordintpair.x; -@@ -55,7 +62,12 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -57,7 +64,12 @@ public class PacketPlayOutMapChunk implements Packet { } this.f = new byte[this.a(chunk, i)]; -- this.c = this.a(new PacketDataSerializer(this.j()), chunk, i); +- this.c = this.a(new PacketDataSerializer(this.k()), chunk, i); + // Paper start - Anti-Xray - Add chunk packet info + if (chunkPacketInfo != null) { + chunkPacketInfo.setData(this.getData()); + } -+ this.c = this.writeChunk(new PacketDataSerializer(this.j()), chunk, i, chunkPacketInfo); ++ this.c = this.writeChunk(new PacketDataSerializer(this.k()), chunk, i, chunkPacketInfo); + // Paper end this.g = Lists.newArrayList(); iterator = chunk.getTileEntities().entrySet().iterator(); int totalTileEntities = 0; // Paper -@@ -82,8 +94,19 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -84,8 +96,19 @@ public class PacketPlayOutMapChunk implements Packet { this.g.add(nbttagcompound); } } @@ -1277,7 +1277,7 @@ index 23223f3f45210cf23f44f9012f292db80df781a0..9b608d73869bd2907f705562c8378bc2 @Override public void a(PacketDataSerializer packetdataserializer) throws IOException { -@@ -149,8 +172,12 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -153,8 +176,12 @@ public class PacketPlayOutMapChunk implements Packet { return bytebuf; } @@ -1292,7 +1292,7 @@ index 23223f3f45210cf23f44f9012f292db80df781a0..9b608d73869bd2907f705562c8378bc2 int j = 0; ChunkSection[] achunksection = chunk.getSections(); int k = 0; -@@ -160,7 +187,7 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -164,7 +191,7 @@ public class PacketPlayOutMapChunk implements Packet { if (chunksection != Chunk.a && (!this.f() || !chunksection.c()) && (i & 1 << k) != 0) { j |= 1 << k; @@ -1302,23 +1302,23 @@ index 23223f3f45210cf23f44f9012f292db80df781a0..9b608d73869bd2907f705562c8378bc2 } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 9171785ad54a26e95dea8b30509c1e49a5d9b22d..94b0c54d9d4d77b724087be55ffe6ce464a0bbe7 100644 +index 39d89d6209123ae2146ae292009cad44c25f490a..24f3e8a6866bb416f04aca342514fa5dd3d314c8 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -604,7 +604,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - PlayerChunkMap.LOGGER.error("Couldn't load chunk {}", chunkcoordintpair, exception); +@@ -608,7 +608,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } + this.g(chunkcoordintpair); - return Either.left(new ProtoChunk(chunkcoordintpair, ChunkConverter.a)); + return Either.left(new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.world)); // Paper - Anti-Xray - Add parameter }, this.executor); } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index ed3f3362b640746649455f8dd2255ac2da03df7c..f11ef84df85c1e7ada9c62247b7882f19ae32089 100644 +index a32490f0eb754b065ee34c41465176db78b1625d..734855c1db3215d90b2743988f64af68aacb388e 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -272,6 +272,8 @@ public class PlayerInteractManager { +@@ -275,6 +275,8 @@ public class PlayerInteractManager { } } @@ -1328,10 +1328,10 @@ index ed3f3362b640746649455f8dd2255ac2da03df7c..f11ef84df85c1e7ada9c62247b7882f1 public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype, String s) { diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 51a5b9cb36c4325df8d1434dcf28d27abefdfede..a78b240621e0407fff67b018224c39fc4f97f4e5 100644 +index 5114ce15ad1be23ca83b3a3fcaba10a34fcb1a6f..a60b414cdf70096e667e776ab4fd36e411f8ff12 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -45,16 +45,24 @@ public class ProtoChunk implements IChunkAccess { +@@ -46,16 +46,24 @@ public class ProtoChunk implements IChunkAccess { private long s; private final Map t; private volatile boolean u; @@ -1359,7 +1359,7 @@ index 51a5b9cb36c4325df8d1434dcf28d27abefdfede..a78b240621e0407fff67b018224c39fc this.f = Maps.newEnumMap(HeightMap.Type.class); this.g = ChunkStatus.EMPTY; this.h = Maps.newHashMap(); -@@ -209,7 +217,7 @@ public class ProtoChunk implements IChunkAccess { +@@ -210,7 +218,7 @@ public class ProtoChunk implements IChunkAccess { public ChunkSection a(int i) { if (this.j[i] == Chunk.a) { @@ -1369,7 +1369,7 @@ index 51a5b9cb36c4325df8d1434dcf28d27abefdfede..a78b240621e0407fff67b018224c39fc return this.j[i]; diff --git a/src/main/java/net/minecraft/server/ProtoChunkExtension.java b/src/main/java/net/minecraft/server/ProtoChunkExtension.java -index b740e82622e282bdf543a84a559af69dd5b8568c..6db6e74886943559e3582c350ffae54857ad8b84 100644 +index ee8df274d43be753887fb77e4203e2ee30ea02b3..9f91c02b444874e690eacb0cfa0c810168c8bb46 100644 --- a/src/main/java/net/minecraft/server/ProtoChunkExtension.java +++ b/src/main/java/net/minecraft/server/ProtoChunkExtension.java @@ -11,7 +11,7 @@ public class ProtoChunkExtension extends ProtoChunk { @@ -1382,7 +1382,7 @@ index b740e82622e282bdf543a84a559af69dd5b8568c..6db6e74886943559e3582c350ffae548 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 69db339c29c8f06026f05b0b5bb8019099af3fdf..479b87eaae67909768db1ba23854f05d2e61110c 100644 +index 8773b521db869f26525af7b4342955ade835b8ef..1434a6e2830aa455bb6ccfd2ce8c034b8d300414 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1394,7 +1394,7 @@ index 69db339c29c8f06026f05b0b5bb8019099af3fdf..479b87eaae67909768db1ba23854f05d import com.destroystokyo.paper.event.server.ServerExceptionEvent; import com.destroystokyo.paper.exception.ServerInternalException; import com.google.common.base.MoreObjects; -@@ -78,6 +80,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -83,6 +85,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper @@ -1402,19 +1402,19 @@ index 69db339c29c8f06026f05b0b5bb8019099af3fdf..479b87eaae67909768db1ba23854f05d public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPosition lastPhysicsProblem; // Spigot -@@ -116,9 +119,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - return ((ChunkProviderServer) this.chunkProvider).getChunkAt(x, z, false); +@@ -100,9 +103,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + return (CraftServer) Bukkit.getServer(); } -- protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { -+ protected World(WorldData worlddata, DimensionManager dimensionmanager, java.util.concurrent.Executor executor, BiFunction bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { // Paper - executor - this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot - this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper +- protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { ++ protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { + this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot + this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper + this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.generator = gen; - if (dimensionmanager.world == null) dimensionmanager.world = (WorldServer) this; // Paper this.world = new CraftWorld((WorldServer) this, gen, env); -@@ -343,6 +347,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit +@@ -402,6 +406,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit end IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1423,23 +1423,23 @@ index 69db339c29c8f06026f05b0b5bb8019099af3fdf..479b87eaae67909768db1ba23854f05d if (iblockdata1 == null) { // CraftBukkit start - remove blockstate if failed (or the same) diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a0484d8062ecfb817cfd5b996915dc8f9a4eb2bd..c019f0287711f8301b47a3c8f3740ff2aecb998b 100644 +index c2fffa60b3d020e4c70a2cabcf61ec36fb9edc65..789fd7d3d7679408d11a20cca6db96ecb86a067d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -84,7 +84,7 @@ public class WorldServer extends World { - - // Add env and gen to constructor - public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { -- super(worlddata, dimensionmanager, (world, worldprovider) -> { -+ super(worlddata, dimensionmanager, executor, (world, worldprovider) -> { // Paper - pass executor down - // CraftBukkit start - ChunkGenerator chunkGenerator; +@@ -96,7 +96,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + // Add env and gen to constructor, WorldData -> WorldDataServer + public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { +- super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env); ++ super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor + this.pvpMode = minecraftserver.getPVP(); + convertable = convertable_conversionsession; + uuid = WorldUUID.getUUID(convertable_conversionsession.folder.toFile()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index a53bb7295c5d510f2976ff3787d68857548e11cc..47f1b970b9ba39f9050ac34a5ac15593c25f8a70 100644 +index 2bd7d7959ce2845dbc09e198122e3574593dca58..cccb8f7b1c13811db7203282a5caad3da5b69a09 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -38,7 +38,7 @@ public class CraftChunk implements Chunk { +@@ -40,7 +40,7 @@ public class CraftChunk implements Chunk { private final WorldServer worldServer; private final int x; private final int z; @@ -1448,12 +1448,12 @@ index a53bb7295c5d510f2976ff3787d68857548e11cc..47f1b970b9ba39f9050ac34a5ac15593 private static final byte[] emptyLight = new byte[2048]; public CraftChunk(net.minecraft.server.Chunk chunk) { -@@ -260,7 +260,7 @@ public class CraftChunk implements Chunk { +@@ -262,7 +262,7 @@ public class CraftChunk implements Chunk { NBTTagCompound data = new NBTTagCompound(); cs[i].getBlocks().a(data, "Palette", "BlockStates"); -- DataPaletteBlock blockids = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, net.minecraft.server.Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); // TODO: snapshot whole ChunkSection -+ DataPaletteBlock blockids = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, net.minecraft.server.Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), null, false); // TODO: snapshot whole ChunkSection // Paper - Anti-Xray - Add no predefined block data and don't initialize because it's done in the line below internally +- DataPaletteBlock blockids = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, net.minecraft.server.Block.REGISTRY_ID, GameProfileSerializer::c, GameProfileSerializer::a, Blocks.AIR.getBlockData()); // TODO: snapshot whole ChunkSection ++ DataPaletteBlock blockids = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, net.minecraft.server.Block.REGISTRY_ID, GameProfileSerializer::c, GameProfileSerializer::a, Blocks.AIR.getBlockData(), null, false); // TODO: snapshot whole ChunkSection // Paper - Anti-Xray - Add no predefined block data and don't initialize because it's done in the line below internally blockids.a(data.getList("Palette", CraftMagicNumbers.NBT.TAG_COMPOUND), data.getLongArray("BlockStates")); sectionBlockIDs[i] = blockids; diff --git a/Spigot-Server-Patches/0385-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 62% rename from Spigot-Server-Patches/0385-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 29b06fd92f..134323c6db 100644 --- a/Spigot-Server-Patches/0385-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f7c7c2871726e3a1673a693b9bd93910a28189b2..e8e61ce505cafccb3c8338bc5bbdf941f903bb27 100644 +index 43925ed1e5c210399ba9fedb7bf890a6bd617e4a..16727e92f591725c8f8cefb250b7ab8c64a19472 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -505,6 +505,16 @@ public class PaperWorldConfig { +@@ -473,6 +473,16 @@ public class PaperWorldConfig { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -37,21 +37,21 @@ index f7c7c2871726e3a1673a693b9bd93910a28189b2..e8e61ce505cafccb3c8338bc5bbdf941 public boolean antiXray; public EngineMode engineMode; public int maxChunkSectionIndex; -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c019f0287711f8301b47a3c8f3740ff2aecb998b..702dcc0387f85ebae8f1cfe9a8e79affef24281b 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -960,6 +960,13 @@ public class WorldServer extends World { +diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java +index 32d45b54fc4e67555a7f016ac72787a8ad4818f3..86e906361ed998ba94ff6e1cbe21860a88626c3b 100644 +--- a/src/main/java/net/minecraft/server/SpawnerCreature.java ++++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +@@ -48,6 +48,13 @@ public final class SpawnerCreature { EnumCreatureType enumcreaturetype = entity.getEntityType().e(); - if (enumcreaturetype != EnumCreatureType.MISC && this.getChunkProvider().b(entity)) { + if (enumcreaturetype != EnumCreatureType.MISC) { + // Paper start - Only count natural spawns -+ if (!this.paperConfig.countAllMobsForSpawning && -+ !(entity.spawnReason == CreatureSpawnEvent.SpawnReason.NATURAL || -+ entity.spawnReason == CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { ++ if (!entity.world.paperConfig.countAllMobsForSpawning && ++ !(entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL || ++ entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { + continue; + } + // Paper end - object2intmap.mergeInt(enumcreaturetype, 1, Integer::sum); - } - } + BlockPosition blockposition = entity.getChunkCoordinates(); + long j = ChunkCoordIntPair.pair(blockposition.getX() >> 4, blockposition.getZ() >> 4); + diff --git a/Spigot-Server-Patches/0386-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch similarity index 57% rename from Spigot-Server-Patches/0386-Configurable-projectile-relative-velocity.patch rename to Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch index 73ac6c25e5..5f2519a433 100644 --- a/Spigot-Server-Patches/0386-Configurable-projectile-relative-velocity.patch +++ b/Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch @@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e8e61ce505cafccb3c8338bc5bbdf941f903bb27..7101ef0912221bdb1c32d2cafbac5d9d53e7037d 100644 +index 16727e92f591725c8f8cefb250b7ab8c64a19472..a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -541,4 +541,9 @@ public class PaperWorldConfig { +@@ -509,4 +509,9 @@ public class PaperWorldConfig { } log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius); } @@ -38,29 +38,16 @@ index e8e61ce505cafccb3c8338bc5bbdf941f903bb27..7101ef0912221bdb1c32d2cafbac5d9d + disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false); + } } -diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 634e2bd3049d65bbef4ef12e2264049a6980fd71..9c97edf9c9e9a8cdf029264f6b563090142c686b 100644 ---- a/src/main/java/net/minecraft/server/EntityArrow.java -+++ b/src/main/java/net/minecraft/server/EntityArrow.java -@@ -85,7 +85,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { - float f7 = MathHelper.cos(f1 * 0.017453292F) * MathHelper.cos(f * 0.017453292F); - - this.shoot((double) f5, (double) f6, (double) f7, f3, f4); -- this.setMot(this.getMot().add(entity.getMot().x, entity.onGround ? 0.0D : entity.getMot().y, entity.getMot().z)); -+ if (!entity.world.paperConfig.disableRelativeProjectileVelocity) this.setMot(this.getMot().add(entity.getMot().x, entity.onGround ? 0.0D : entity.getMot().y, entity.getMot().z)); // Paper - allow disabling relative velocity - } - - @Override -diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 6c091b68087d60b0b916871eb0ce06c6a2776bf8..f5c8074dcf1c6275bc13eb8f2b67c04ca547877b 100644 ---- a/src/main/java/net/minecraft/server/EntityProjectile.java -+++ b/src/main/java/net/minecraft/server/EntityProjectile.java -@@ -43,7 +43,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile { +diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java +index ceecb0520a63d2eff5f4cadf45fa49f56eaea8dd..ecdc717b3013749ed2384a143d6b6eef07f6f642 100644 +--- a/src/main/java/net/minecraft/server/IProjectile.java ++++ b/src/main/java/net/minecraft/server/IProjectile.java +@@ -114,7 +114,7 @@ public abstract class IProjectile extends Entity { this.shoot((double) f5, (double) f6, (double) f7, f3, f4); Vec3D vec3d = entity.getMot(); -- this.setMot(this.getMot().add(vec3d.x, entity.onGround ? 0.0D : vec3d.y, vec3d.z)); -+ if (!entity.world.paperConfig.disableRelativeProjectileVelocity) this.setMot(this.getMot().add(vec3d.x, entity.onGround ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity +- this.setMot(this.getMot().add(vec3d.x, entity.isOnGround() ? 0.0D : vec3d.y, vec3d.z)); ++ if (!entity.world.paperConfig.disableRelativeProjectileVelocity) this.setMot(this.getMot().add(vec3d.x, entity.isOnGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity } - @Override + protected void a(MovingObjectPosition movingobjectposition) { diff --git a/Spigot-Server-Patches/0387-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 76% rename from Spigot-Server-Patches/0387-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch index 372f4a9a83..cee98a020d 100644 --- a/Spigot-Server-Patches/0387-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -5,10 +5,10 @@ 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 702dcc0387f85ebae8f1cfe9a8e79affef24281b..83585f3ba7ef9e72f3702079a82f62c8b17e4077 100644 +index 789fd7d3d7679408d11a20cca6db96ecb86a067d..2738d61709a956e83ab7b4e05063a99bcbb7e01b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1401,6 +1401,7 @@ public class WorldServer extends World { +@@ -1320,6 +1320,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) { @@ -16,7 +16,7 @@ index 702dcc0387f85ebae8f1cfe9a8e79affef24281b..83585f3ba7ef9e72f3702079a82f62c8 Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { -@@ -1411,6 +1412,7 @@ public class WorldServer extends World { +@@ -1330,6 +1331,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0388-offset-item-frame-ticking.patch b/Spigot-Server-Patches/0374-offset-item-frame-ticking.patch similarity index 89% rename from Spigot-Server-Patches/0388-offset-item-frame-ticking.patch rename to Spigot-Server-Patches/0374-offset-item-frame-ticking.patch index 7e53a08ee4..f3cc8ac572 100644 --- a/Spigot-Server-Patches/0388-offset-item-frame-ticking.patch +++ b/Spigot-Server-Patches/0374-offset-item-frame-ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] offset item frame ticking diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java -index 21dbc9b2ab7c6edf2691f5c4f9e466ba33ba7580..ef9c4717c31c9fae4d9ac2e357ce22dab8fa3cce 100644 +index 3dc1f234a389b1badf0b189ba27708c787ce37af..06cf11af972f7762de43dc1df18a431a62787111 100644 --- a/src/main/java/net/minecraft/server/EntityHanging.java +++ b/src/main/java/net/minecraft/server/EntityHanging.java @@ -15,7 +15,7 @@ public abstract class EntityHanging extends Entity { diff --git a/Spigot-Server-Patches/0389-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0375-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 91% rename from Spigot-Server-Patches/0389-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0375-Avoid-hopper-searches-if-there-are-no-items.patch index 9e05dd85f9..c514cf39dc 100644 --- a/Spigot-Server-Patches/0389-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0375-Avoid-hopper-searches-if-there-are-no-items.patch @@ -14,10 +14,10 @@ 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 08b3cbabc482d71862d90fcd9acd32d28f44a6e2..af9a195f6d0f966133577d00d30e8b4ad812aaeb 100644 +index 8fa440b313b414a79118089b7481dee9f7ba69a8..b2713942d8cf5bedd91ac63df18a336743c72da5 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -84,6 +84,10 @@ public class Chunk implements IChunkAccess { +@@ -85,6 +85,10 @@ public class Chunk implements IChunkAccess { return removed; } } @@ -28,7 +28,7 @@ index 08b3cbabc482d71862d90fcd9acd32d28f44a6e2..af9a195f6d0f966133577d00d30e8b4a // Paper end public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList ticklist, TickList ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer consumer) { -@@ -538,6 +542,13 @@ public class Chunk implements IChunkAccess { +@@ -539,6 +543,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 08b3cbabc482d71862d90fcd9acd32d28f44a6e2..af9a195f6d0f966133577d00d30e8b4a entity.entitySlice = this.entitySlices[k]; // Paper this.markDirty(); // Paper } -@@ -570,6 +581,11 @@ public class Chunk implements IChunkAccess { +@@ -571,6 +582,11 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } @@ -54,7 +54,7 @@ index 08b3cbabc482d71862d90fcd9acd32d28f44a6e2..af9a195f6d0f966133577d00d30e8b4a entityCounts.decrement(entity.getMinecraftKeyString()); this.markDirty(); // Paper // Paper end -@@ -853,6 +869,14 @@ public class Chunk implements IChunkAccess { +@@ -854,6 +870,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 08b3cbabc482d71862d90fcd9acd32d28f44a6e2..af9a195f6d0f966133577d00d30e8b4a while (iterator.hasNext()) { T entity = (T) iterator.next(); // CraftBukkit - decompile error if (entity.shouldBeRemoved) continue; // Paper -@@ -872,9 +896,29 @@ public class Chunk implements IChunkAccess { +@@ -873,9 +897,29 @@ public class Chunk implements IChunkAccess { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); @@ -100,7 +100,7 @@ index 08b3cbabc482d71862d90fcd9acd32d28f44a6e2..af9a195f6d0f966133577d00d30e8b4a T t0 = (T) iterator.next(); // CraftBukkit - decompile error if (t0.shouldBeRemoved) continue; // Paper diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 498f381099b2cf9460104688e12afc5f586e057a..a2d1ef3602a1c63d106d10140e18dfdb1d490805 100644 +index 28f10ab2e427872c04bc97ebc392cf6d58854cf9..57bc56cffff87d9b1774cec455af8d1651fb882c 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -11,6 +11,7 @@ public final class IEntitySelector { diff --git a/Spigot-Server-Patches/0390-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch similarity index 92% rename from Spigot-Server-Patches/0390-Asynchronous-chunk-IO-and-loading.patch rename to Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch index 1f4ccdf6f6..4b451a71d4 100644 --- a/Spigot-Server-Patches/0390-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch @@ -199,7 +199,7 @@ index af810987846efcd2bffbd23c31481b2d31c168dd..331493a172f58e71b464d635efdba461 doChunkInfo(sender, args); break; diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index dbd14399707cdd43f98af40191be8ff3e76edf43..74295466e53db06d0d019a13768f3575ac61d699 100644 +index 1aa7d0cfaf5697daeeb98e237387f27e76bca16f..8c2202fbc1c38e6cd19005d010e365ae14233f51 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -1,5 +1,6 @@ @@ -209,7 +209,7 @@ index dbd14399707cdd43f98af40191be8ff3e76edf43..74295466e53db06d0d019a13768f3575 import com.google.common.base.Strings; import com.google.common.base.Throwables; -@@ -367,4 +368,54 @@ public class PaperConfig { +@@ -346,4 +347,54 @@ public class PaperConfig { maxBookPageSize = getInt("settings.book-size.page-max", maxBookPageSize); maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); } @@ -2309,10 +2309,10 @@ index 0000000000000000000000000000000000000000..b5c2e1f4a2b5fdcaa6bb01f4b3b6847c + +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index d8647f272bdb29518b1a7faafa6fbcb53ffe1163..981cf581c7504c38120d48c06b6351952fab43c0 100644 +index f2ff1aa915c218bb1fc72467ccbd73ccf135c494..edd901bb53385fa3d189a0057d57f98bf8b7115c 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -309,11 +309,138 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -310,11 +310,138 @@ public class ChunkProviderServer extends IChunkProvider { return playerChunk.getAvailableChunkNow(); } @@ -2451,7 +2451,7 @@ index d8647f272bdb29518b1a7faafa6fbcb53ffe1163..981cf581c7504c38120d48c06b635195 if (Thread.currentThread() != this.serverThread) { return (IChunkAccess) CompletableFuture.supplyAsync(() -> { return this.getChunkAt(i, j, chunkstatus, flag); -@@ -336,11 +463,16 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -337,11 +464,16 @@ public class ChunkProviderServer extends IChunkProvider { } gameprofilerfiller.c("getChunkCacheMiss"); @@ -2469,7 +2469,7 @@ index d8647f272bdb29518b1a7faafa6fbcb53ffe1163..981cf581c7504c38120d48c06b635195 this.world.timings.syncChunkLoad.stopTiming(); // Paper } // Paper ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { -@@ -406,6 +538,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) { @@ -2481,7 +2481,7 @@ index d8647f272bdb29518b1a7faafa6fbcb53ffe1163..981cf581c7504c38120d48c06b635195 ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); long k = chunkcoordintpair.pair(); int l = 33 + ChunkStatus.a(chunkstatus); -@@ -845,11 +982,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 { @@ -2496,7 +2496,7 @@ index d8647f272bdb29518b1a7faafa6fbcb53ffe1163..981cf581c7504c38120d48c06b635195 } finally { playerChunkMap.callbackExecutor.run(); diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0ccf43e53fc 100644 +index be3c7a8697c540d03a143b9306311a184474857f..4d6e8f987233ca6c5f53d004031c022bb2d43e1e 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet; @@ -2507,7 +2507,7 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc import java.util.Arrays; import java.util.BitSet; import java.util.EnumSet; -@@ -22,7 +23,29 @@ public class ChunkRegionLoader { +@@ -23,7 +24,29 @@ public class ChunkRegionLoader { private static final Logger LOGGER = LogManager.getLogger(); @@ -2534,10 +2534,10 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc + public static InProgressChunkHolder loadChunk(WorldServer worldserver, DefinedStructureManager definedstructuremanager, VillagePlace villageplace, ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound, boolean distinguish) { + ArrayDeque tasksToExecuteOnMain = new ArrayDeque<>(); + // Paper end - ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); + ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); WorldChunkManager worldchunkmanager = chunkgenerator.getWorldChunkManager(); NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Level"); -@@ -49,7 +72,9 @@ public class ChunkRegionLoader { +@@ -50,7 +73,9 @@ public class ChunkRegionLoader { LightEngine lightengine = chunkproviderserver.getLightEngine(); if (flag) { @@ -2548,7 +2548,7 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc } for (int i = 0; i < nbttaglist.size(); ++i) { -@@ -65,16 +90,30 @@ public class ChunkRegionLoader { +@@ -66,16 +91,28 @@ public class ChunkRegionLoader { achunksection[b0] = chunksection; } @@ -2560,29 +2560,27 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc if (flag) { if (nbttagcompound2.hasKeyOfType("BlockLight", 7)) { -- lightengine.a(EnumSkyBlock.BLOCK, SectionPosition.a(chunkcoordintpair, b0), new NibbleArray(nbttagcompound2.getByteArray("BlockLight"))); +- lightengine.a(EnumSkyBlock.BLOCK, SectionPosition.a(chunkcoordintpair, b0), new NibbleArray(nbttagcompound2.getByteArray("BlockLight")), true); + // Paper start - delay this task since we're executing off-main + NibbleArray blockLight = new NibbleArray(nbttagcompound2.getByteArray("BlockLight")); -+ // Note: We move the block light nibble array creation here for perf & in case the compound is modified + tasksToExecuteOnMain.add(() -> { -+ lightengine.a(EnumSkyBlock.BLOCK, SectionPosition.a(chunkcoordintpair, b0), blockLight); ++ lightengine.a(EnumSkyBlock.BLOCK, SectionPosition.a(chunkcoordintpair, b0), blockLight, true); + }); -+ // Paper end ++ // Paper end - delay this task since we're executing off-main } if (flag2 && nbttagcompound2.hasKeyOfType("SkyLight", 7)) { -- lightengine.a(EnumSkyBlock.SKY, SectionPosition.a(chunkcoordintpair, b0), new NibbleArray(nbttagcompound2.getByteArray("SkyLight"))); +- lightengine.a(EnumSkyBlock.SKY, SectionPosition.a(chunkcoordintpair, b0), new NibbleArray(nbttagcompound2.getByteArray("SkyLight")), true); + // Paper start - delay this task since we're executing off-main + NibbleArray skyLight = new NibbleArray(nbttagcompound2.getByteArray("SkyLight")); -+ // Note: We move the block light nibble array creation here for perf & in case the compound is modified + tasksToExecuteOnMain.add(() -> { -+ lightengine.a(EnumSkyBlock.SKY, SectionPosition.a(chunkcoordintpair, b0), skyLight); ++ lightengine.a(EnumSkyBlock.SKY, SectionPosition.a(chunkcoordintpair, b0), skyLight, true); + }); -+ // Paper end ++ // Paper end - delay this task since we're executing off-main } } } -@@ -177,7 +216,7 @@ public class ChunkRegionLoader { +@@ -178,7 +215,7 @@ public class ChunkRegionLoader { } if (chunkstatus_type == ChunkStatus.Type.LEVELCHUNK) { @@ -2591,15 +2589,15 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc } else { ProtoChunk protochunk1 = (ProtoChunk) object; -@@ -216,11 +255,83 @@ public class ChunkRegionLoader { +@@ -217,11 +254,83 @@ public class ChunkRegionLoader { protochunk1.a(worldgenstage_features, BitSet.valueOf(nbttagcompound5.getByteArray(s1))); } - return protochunk1; + return new InProgressChunkHolder(protochunk1, tasksToExecuteOnMain); // Paper - Async chunk loading - } - } - ++ } ++ } ++ + // Paper start - async chunk save for unload + public static final class AsyncSaveData { + public final NibbleArray[] blockLight; // null or size of 17 (for indices -1 through 15) @@ -2617,9 +2615,9 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc + this.blockTickList = blockTickList; + this.fluidTickList = fluidTickList; + this.worldTime = worldTime; -+ } -+ } -+ + } + } + + // must be called sync + public static AsyncSaveData getAsyncSaveData(WorldServer world, IChunkAccess chunk) { + org.spigotmc.AsyncCatcher.catchOp("preparation of chunk data for async save"); @@ -2676,7 +2674,7 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos(); NBTTagCompound nbttagcompound = new NBTTagCompound(); NBTTagCompound nbttagcompound1 = new NBTTagCompound(); -@@ -229,7 +340,7 @@ public class ChunkRegionLoader { +@@ -230,7 +339,7 @@ public class ChunkRegionLoader { nbttagcompound.set("Level", nbttagcompound1); nbttagcompound1.setInt("xPos", chunkcoordintpair.x); nbttagcompound1.setInt("zPos", chunkcoordintpair.z); @@ -2685,7 +2683,7 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc nbttagcompound1.setLong("InhabitedTime", ichunkaccess.getInhabitedTime()); nbttagcompound1.setString("Status", ichunkaccess.getChunkStatus().d()); ChunkConverter chunkconverter = ichunkaccess.p(); -@@ -245,14 +356,22 @@ public class ChunkRegionLoader { +@@ -246,14 +355,22 @@ public class ChunkRegionLoader { NBTTagCompound nbttagcompound2; @@ -2712,7 +2710,7 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc if (chunksection != Chunk.a || nibblearray != null || nibblearray1 != null) { nbttagcompound2 = new NBTTagCompound(); nbttagcompound2.setByte("Y", (byte) (i & 255)); -@@ -313,7 +432,7 @@ public class ChunkRegionLoader { +@@ -314,7 +431,7 @@ public class ChunkRegionLoader { Entity entity = (Entity) iterator1.next(); NBTTagCompound nbttagcompound4 = new NBTTagCompound(); // Paper start @@ -2721,7 +2719,7 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc toUpdate.add(entity); continue; } -@@ -353,24 +472,32 @@ public class ChunkRegionLoader { +@@ -357,24 +474,32 @@ public class ChunkRegionLoader { } nbttagcompound1.set("Entities", nbttaglist2); @@ -2731,8 +2729,7 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc if (ticklist instanceof ProtoChunkTickList) { nbttagcompound1.set("ToBeTicked", ((ProtoChunkTickList) ticklist).b()); } else if (ticklist instanceof TickListChunk) { -- nbttagcompound1.set("TileTicks", ((TickListChunk) ticklist).a(worldserver.getTime())); -+ nbttagcompound1.set("TileTicks", ((TickListChunk) ticklist).a(asyncsavedata != null ? asyncsavedata.worldTime : worldserver.getTime())); // Paper - async chunk unloading + nbttagcompound1.set("TileTicks", ((TickListChunk) ticklist).b()); + // Paper start - async chunk save for unload + } else if (asyncsavedata != null) { + nbttagcompound1.set("TileTicks", asyncsavedata.blockTickList); @@ -2748,23 +2745,22 @@ index d287ea55c550dbebbbc1d5f815296ae7ba6315e9..34cd09a503bfe617bd50808927bae0cc if (ticklist1 instanceof ProtoChunkTickList) { nbttagcompound1.set("LiquidsToBeTicked", ((ProtoChunkTickList) ticklist1).b()); } else if (ticklist1 instanceof TickListChunk) { -- nbttagcompound1.set("LiquidTicks", ((TickListChunk) ticklist1).a(worldserver.getTime())); -+ nbttagcompound1.set("LiquidTicks", ((TickListChunk) ticklist1).a(asyncsavedata != null ? asyncsavedata.worldTime : worldserver.getTime())); // Paper - async chunk unloading + nbttagcompound1.set("LiquidTicks", ((TickListChunk) ticklist1).b()); + // Paper start - async chunk save for unload + } else if (asyncsavedata != null) { + nbttagcompound1.set("LiquidTicks", asyncsavedata.fluidTickList); + // Paper end } else { - nbttagcompound1.set("LiquidTicks", worldserver.getFluidTickList().a(chunkcoordintpair)); -+ nbttagcompound1.set("LiquidTicks", worldserver.getFluidTickList().a(chunkcoordintpair)); // Paper - diff on method change (see getAsyncSaveData) ++ nbttagcompound1.set("LiquidTicks", worldserver.getFluidTickList().a(chunkcoordintpair)); // Paper - diff on method change (see getAsyncSaveData) } nbttagcompound1.set("PostProcessing", a(ichunkaccess.l())); diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java -index 134a4f0b7d254b5dd8ca26a9c5874532826978c4..40ce30cdc2a07b7a9c2d1f33070e87259f27cd27 100644 +index 3ef584605d408c268806e74b95e9223ca4ffe0d9..92d55591a994ab618c9641d77850e644ea093734 100644 --- a/src/main/java/net/minecraft/server/ChunkStatus.java +++ b/src/main/java/net/minecraft/server/ChunkStatus.java -@@ -153,6 +153,7 @@ public class ChunkStatus { +@@ -159,6 +159,7 @@ public class ChunkStatus { return ChunkStatus.q.size(); } @@ -2772,7 +2768,7 @@ index 134a4f0b7d254b5dd8ca26a9c5874532826978c4..40ce30cdc2a07b7a9c2d1f33070e8725 public static int a(ChunkStatus chunkstatus) { return ChunkStatus.r.getInt(chunkstatus.c()); } -@@ -168,6 +169,7 @@ public class ChunkStatus { +@@ -174,6 +175,7 @@ public class ChunkStatus { this.t = chunkstatus == null ? 0 : chunkstatus.c() + 1; } @@ -2780,7 +2776,7 @@ index 134a4f0b7d254b5dd8ca26a9c5874532826978c4..40ce30cdc2a07b7a9c2d1f33070e8725 public int c() { return this.t; } -@@ -189,6 +191,7 @@ public class ChunkStatus { +@@ -195,6 +197,7 @@ public class ChunkStatus { return this.w.doWork(this, worldserver, definedstructuremanager, lightenginethreaded, function, ichunkaccess); } @@ -2788,7 +2784,7 @@ index 134a4f0b7d254b5dd8ca26a9c5874532826978c4..40ce30cdc2a07b7a9c2d1f33070e8725 public int f() { return this.x; } -@@ -216,6 +219,7 @@ public class ChunkStatus { +@@ -222,6 +225,7 @@ public class ChunkStatus { return this.z; } @@ -2797,7 +2793,7 @@ index 134a4f0b7d254b5dd8ca26a9c5874532826978c4..40ce30cdc2a07b7a9c2d1f33070e8725 return this.c() >= chunkstatus.c(); } diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java -index 7e5ece9d50af7151ad4cc084e3680dae41ac92be..cfe43e882e524b6ab3d9702e81269c97e6b75eba 100644 +index 1ba26ee10f338edbec0f580bb55d083a3d6d2284..63fdae15ccbef0c39718b320dbd096794bcfa3b4 100644 --- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java +++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java @@ -91,7 +91,7 @@ public abstract class IAsyncTaskHandler implements Mailbox { + DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataConverterRegistry.a(), minecraftsessionservice, gameprofilerepository, usercache, WorldLoadListenerLogger::new); + diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7920d24ab089fb8360ef74946cf7dc35cb7625eb..9450e27e5ce9295d87b95be2797fc27984ca2b0b 100644 +index 03ae25736b02ac02c01e76b5d2fbfd803585ebde..7e832d2610f9c0d805c7f289de5098d9b5f09402 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -780,6 +780,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> getStatusFutureUnchecked(ChunkStatus chunkstatus) { -@@ -353,7 +365,7 @@ public class PlayerChunk { +@@ -340,7 +352,7 @@ public class PlayerChunk { ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel); ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel); boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET; @@ -3047,7 +3033,7 @@ index 52ea4f05a0c7f29f62f31bb032a5ceb905107e60..0f1576effe10795bcb8ed3b519f4dbaf PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel); PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel); // CraftBukkit start -@@ -389,6 +401,12 @@ public class PlayerChunk { +@@ -376,6 +388,12 @@ public class PlayerChunk { } }); @@ -3061,19 +3047,19 @@ index 52ea4f05a0c7f29f62f31bb032a5ceb905107e60..0f1576effe10795bcb8ed3b519f4dbaf completablefuture = (CompletableFuture) this.statusFutures.get(i); if (completablefuture != null) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3e381cb5a 100644 +index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f54989422e5281c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -63,7 +63,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -64,7 +64,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final LightEngineThreaded lightEngine; private final IAsyncTaskHandler executor; - public final ChunkGenerator chunkGenerator; + public final ChunkGenerator chunkGenerator; - private final Supplier l; + private final Supplier l; public final Supplier getWorldPersistentDataSupplier() { return this.l; } // Paper - OBFHELPER private final VillagePlace m; public final LongSet unloadQueue; private boolean updatingChunksModified; -@@ -73,7 +73,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -74,7 +74,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; @@ -3082,16 +3068,16 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 private final File w; private final PlayerMap playerMap; public final Int2ObjectMap trackedEntities; -@@ -156,7 +156,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getWorldProvider().f(), threadedmailbox1, this.p.a(threadedmailbox1, false)); +@@ -157,7 +157,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getDimensionManager().hasSkyLight(), threadedmailbox1, this.p.a(threadedmailbox1, false)); this.chunkDistanceManager = new PlayerChunkMap.a(executor, iasynctaskhandler); this.l = supplier; -- this.m = new VillagePlace(new File(this.w, "poi"), datafixer); -+ this.m = new VillagePlace(new File(this.w, "poi"), datafixer, this.world); // Paper +- this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag); ++ this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); } -@@ -203,7 +203,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -204,7 +204,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @Nullable @@ -3100,7 +3086,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 return (PlayerChunk) this.visibleChunks.get(i); } -@@ -325,6 +325,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -326,6 +326,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public void close() throws IOException { try { this.p.close(); @@ -3108,7 +3094,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 this.m.close(); } finally { super.close(); -@@ -416,7 +417,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -417,7 +418,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.b(() -> { return true; }); @@ -3118,7 +3104,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); } else { this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).forEach((playerchunk) -> { -@@ -432,16 +434,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -433,16 +435,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -3140,7 +3126,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 } gameprofilerfiller.exit(); -@@ -462,12 +468,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -463,12 +469,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (playerchunk != null) { this.pendingUnload.put(j, playerchunk); this.updatingChunksModified = true; @@ -3155,7 +3141,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 } } activityAccountant.endActivity(); // Spigot -@@ -481,6 +488,60 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -482,6 +489,60 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -3216,7 +3202,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 private void a(long i, PlayerChunk playerchunk) { CompletableFuture completablefuture = playerchunk.getChunkSave(); Consumer consumer = (ichunkaccess) -> { // CraftBukkit - decompile error -@@ -494,7 +555,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -495,7 +556,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ((Chunk) ichunkaccess).setLoaded(false); } @@ -3225,7 +3211,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 if (this.loadedChunks.remove(i) && ichunkaccess instanceof Chunk) { Chunk chunk = (Chunk) ichunkaccess; -@@ -502,6 +563,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -503,6 +564,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } this.autoSaveQueue.remove(playerchunk); // Paper @@ -3239,16 +3225,9 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 this.lightEngine.a(ichunkaccess.getPos()); this.lightEngine.queueUpdate(); this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null); -@@ -571,27 +639,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - } +@@ -573,19 +641,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } -+ // Paper start - Async chunk io -+ public NBTTagCompound completeChunkData(NBTTagCompound compound, ChunkCoordIntPair chunkcoordintpair) throws IOException { -+ return compound == null ? null : this.getChunkData(this.world.getWorldProvider().getDimensionManager(), this.getWorldPersistentDataSupplier(), compound, chunkcoordintpair, this.world); -+ } -+ // Paper end -+ private CompletableFuture> f(ChunkCoordIntPair chunkcoordintpair) { - return CompletableFuture.supplyAsync(() -> { + // Paper start - Async chunk io @@ -3259,38 +3238,26 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 - try (Timing ignored2 = this.world.timings.chunkIO.startTimingIfSync()) { // Paper start - timings - nbttagcompound = this.readChunkData(chunkcoordintpair); - } // Paper end -- ++ // Paper start ++ if (ioThrowable != null) { ++ com.destroystokyo.paper.util.SneakyThrow.sneaky(ioThrowable); ++ } ++ // Paper end + - if (nbttagcompound != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings - boolean flag = nbttagcompound.hasKeyOfType("Level", 10) && nbttagcompound.getCompound("Level").hasKeyOfType("Status", 8); -+ if (ioThrowable != null) { -+ com.destroystokyo.paper.io.IOUtil.rethrow(ioThrowable); -+ } ++ if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async - if (flag) { - ProtoChunk protochunk = ChunkRegionLoader.loadChunk(this.world, this.definedStructureManager, this.m, chunkcoordintpair, nbttagcompound); -+ this.getVillagePlace().loadInData(chunkcoordintpair, chunkHolder.poiData); -+ chunkHolder.tasks.forEach(Runnable::run); -+ // Paper - async load completes this -+ // Paper end ++ if (true) { ++ ProtoChunk protochunk = chunkHolder.protoChunk; -- protochunk.setLastSaved(this.world.getTime()); -- return Either.left(protochunk); -- } -- -- PlayerChunkMap.LOGGER.error("Chunk file at {} is missing level data, skipping", chunkcoordintpair); -- }} // Paper -+ // Paper start - This is done async -+ if (chunkHolder.protoChunk != null) { -+ chunkHolder.protoChunk.setLastSaved(this.world.getTime()); -+ return Either.left(chunkHolder.protoChunk); -+ } -+ // Paper end - } catch (ReportedException reportedexception) { - Throwable throwable = reportedexception.getCause(); - -@@ -605,7 +678,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - } + protochunk.setLastSaved(this.world.getTime()); + this.a(chunkcoordintpair, protochunk.getChunkStatus().getType()); +@@ -609,7 +678,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + this.g(chunkcoordintpair); return Either.left(new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.world)); // Paper - Anti-Xray - Add parameter - }, this.executor); + // Paper start - Async chunk io @@ -3321,8 +3288,8 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 + // Paper end } - private CompletableFuture> b(PlayerChunk playerchunk, ChunkStatus chunkstatus) { -@@ -824,17 +922,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private void g(ChunkCoordIntPair chunkcoordintpair) { +@@ -836,6 +930,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public boolean saveChunk(IChunkAccess ichunkaccess) { @@ -3330,52 +3297,46 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 this.m.a(ichunkaccess.getPos()); if (!ichunkaccess.isNeedsSaving()) { return false; - } else { -- try { -- this.world.checkSession(); -- } catch (ExceptionWorldConflict exceptionworldconflict) { -- PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict); -- com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exceptionworldconflict); // Paper -- return false; -- } -+ // Paper - The save session check is performed on the IO thread - - ichunkaccess.setLastSaved(this.world.getTime()); - ichunkaccess.setNeedsSaving(false); -@@ -845,6 +938,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - NBTTagCompound nbttagcompound; +@@ -848,6 +943,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + ChunkStatus chunkstatus = ichunkaccess.getChunkStatus(); if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { + try (co.aikar.timings.Timing ignored1 = this.world.timings.chunkSaveOverwriteCheck.startTiming()) { // Paper - // Paper start - Optimize save by using status cache - ChunkStatus statusOnDisk = this.getChunkStatusOnDisk(chunkcoordintpair); - if (statusOnDisk != null && statusOnDisk.getType() == ChunkStatus.Type.LEVELCHUNK) { -@@ -857,9 +951,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + if (this.h(chunkcoordintpair)) { + return false; } +@@ -855,12 +951,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + if (chunkstatus == ChunkStatus.EMPTY && ichunkaccess.h().values().stream().noneMatch(StructureStart::e)) { + return false; + } ++ } // Paper } -+ } // Paper this.world.getMethodProfiler().c("chunkSave"); +- NBTTagCompound nbttagcompound = ChunkRegionLoader.saveChunk(this.world, ichunkaccess); ++ NBTTagCompound nbttagcompound; + try (co.aikar.timings.Timing ignored1 = this.world.timings.chunkSaveDataSerialization.startTiming()) { // Paper - nbttagcompound = ChunkRegionLoader.saveChunk(this.world, ichunkaccess); -- this.a(chunkcoordintpair, nbttagcompound); ++ nbttagcompound = ChunkRegionLoader.saveChunk(this.world, ichunkaccess); + } // Paper ++ + +- this.a(chunkcoordintpair, nbttagcompound); + // Paper start - async chunk io + com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave(this.world, chunkcoordintpair.x, chunkcoordintpair.z, + null, nbttagcompound, com.destroystokyo.paper.io.PrioritizedTaskQueue.NORMAL_PRIORITY); + // Paper end - async chunk io + this.a(chunkcoordintpair, chunkstatus.getType()); return true; } catch (Exception exception) { - PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception); -@@ -867,6 +967,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -869,6 +973,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return false; } } + } // Paper } - protected void setViewDistance(int i) { -@@ -970,6 +1071,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private boolean h(ChunkCoordIntPair chunkcoordintpair) { +@@ -998,6 +1103,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -3411,20 +3372,20 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 @Nullable public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); -@@ -992,33 +1122,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1019,33 +1153,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - chunk status cache "api" public ChunkStatus getChunkStatusOnDiskIfCached(ChunkCoordIntPair chunkPos) { - RegionFile regionFile = this.getIOWorker().getRegionFileCache().getRegionFileIfLoaded(chunkPos); + synchronized (this) { // Paper -+ RegionFile regionFile = this.getRegionFileIfLoaded(chunkPos); ++ RegionFile regionFile = this.regionFileCache.getRegionFileIfLoaded(chunkPos); return regionFile == null ? null : regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); + } // Paper } public ChunkStatus getChunkStatusOnDisk(ChunkCoordIntPair chunkPos) throws IOException { -- RegionFile regionFile = this.getIOWorker().getRegionFileCache().getFile(chunkPos, false); +- RegionFile regionFile = this.getIOWorker().getRegionFileCache().getFile(chunkPos, true); + // Paper start - async chunk save for unload + IChunkAccess unloadingChunk = this.world.asyncChunkTaskManager.getChunkInSaveProgress(chunkPos.x, chunkPos.z); + if (unloadingChunk != null) { @@ -3435,20 +3396,20 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 + NBTTagCompound inProgressWrite = com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE + .getPendingWrite(this.world, chunkPos.x, chunkPos.z, false); -- if (!regionFile.chunkExists(chunkPos)) { +- if (regionFile == null || !regionFile.chunkExists(chunkPos)) { - return null; + if (inProgressWrite != null) { + return ChunkRegionLoader.getStatus(inProgressWrite); } + // Paper end + synchronized (this) { // Paper - async io -+ RegionFile regionFile = this.getFile(chunkPos, false); -+ -+ if (!regionFile.chunkExists(chunkPos)) { -+ return null; -+ } ++ RegionFile regionFile = this.regionFileCache.getFile(chunkPos, true); - ChunkStatus status = regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); ++ if (regionFile == null || !regionFile.chunkExists(chunkPos)) { ++ return null; ++ } ++ + ChunkStatus status = regionFile.getStatusIfCached(chunkPos.x, chunkPos.z); - if (status != null) { @@ -3470,7 +3431,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 public void updateChunkStatusOnDisk(ChunkCoordIntPair chunkPos, @Nullable NBTTagCompound compound) throws IOException { - RegionFile regionFile = this.getIOWorker().getRegionFileCache().getFile(chunkPos, false); + synchronized (this) { -+ RegionFile regionFile = this.getFile(chunkPos, false); ++ RegionFile regionFile = this.regionFileCache.getFile(chunkPos, false); - regionFile.setStatus(chunkPos.x, chunkPos.z, ChunkRegionLoader.getStatus(compound)); + regionFile.setStatus(chunkPos.x, chunkPos.z, ChunkRegionLoader.getStatus(compound)); @@ -3478,7 +3439,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 } public IChunkAccess getUnloadingChunk(int chunkX, int chunkZ) { -@@ -1027,6 +1179,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1054,6 +1210,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end @@ -3506,7 +3467,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 + synchronized (world.getChunkProvider().playerChunkMap) { + net.minecraft.server.RegionFile file; + try { -+ file = world.getChunkProvider().playerChunkMap.getFile(chunkPos, false); ++ file = world.getChunkProvider().playerChunkMap.regionFileCache.getFile(chunkPos, false); + } catch (IOException ex) { + throw new RuntimeException(ex); + } @@ -3518,7 +3479,7 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { // Spigot start return isOutsideOfRange(chunkcoordintpair, false); -@@ -1374,6 +1559,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1399,6 +1588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -3527,10 +3488,10 @@ index 94b0c54d9d4d77b724087be55ffe6ce464a0bbe7..6552bbf06637b08626cbf0fb352123c3 return this.m; } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a5700a955b6d7927228a14128860b49e79e61f03..6a7bdf8c5f38ca4eb578e1104375e5773269330c 100644 +index 35536527a01e72841e358c643631b2739dd0bf26..795b24c8d102417ae7e730254ecddefc06dbe0df 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -541,6 +541,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -544,6 +544,13 @@ public class PlayerConnection implements PacketListenerPlayIn { minecraftServer.scheduleOnMain(() -> this.disconnect(new ChatMessage("disconnect.spam", new Object[0]))); // Paper return; } @@ -3545,7 +3506,7 @@ index a5700a955b6d7927228a14128860b49e79e61f03..6a7bdf8c5f38ca4eb578e1104375e577 StringReader stringreader = new StringReader(packetplayintabcomplete.c()); diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index d37abf2cf304f81405e570588c8accbc44a629f4..df728e2c0a2bf660a91e0bd6342c4b4b1471dcb7 100644 +index e1730709fff5dfee68621d0aaed70a00bab97948..93797395c3a710d228bd790771ac18b4baa3b1e2 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -36,6 +36,8 @@ public class RegionFile implements AutoCloseable { @@ -3557,7 +3518,7 @@ index d37abf2cf304f81405e570588c8accbc44a629f4..df728e2c0a2bf660a91e0bd6342c4b4b // Paper start - Cache chunk status private final ChunkStatus[] statuses = new ChunkStatus[32 * 32]; -@@ -224,7 +226,7 @@ public class RegionFile implements AutoCloseable { +@@ -229,7 +231,7 @@ public class RegionFile implements AutoCloseable { return (i + 4096 - 1) / 4096; } @@ -3566,7 +3527,7 @@ index d37abf2cf304f81405e570588c8accbc44a629f4..df728e2c0a2bf660a91e0bd6342c4b4b int i = this.getOffset(chunkcoordintpair); if (i == 0) { -@@ -380,6 +382,11 @@ public class RegionFile implements AutoCloseable { +@@ -389,6 +391,11 @@ public class RegionFile implements AutoCloseable { } public void close() throws IOException { @@ -3577,9 +3538,9 @@ index d37abf2cf304f81405e570588c8accbc44a629f4..df728e2c0a2bf660a91e0bd6342c4b4b + // Paper end this.closed = true; // Paper try { - this.c(); -@@ -394,6 +401,10 @@ public class RegionFile implements AutoCloseable { - } + this.d(); +@@ -399,6 +406,10 @@ public class RegionFile implements AutoCloseable { + this.dataFile.close(); } } + } finally { // Paper start - Prevent regionfiles from being closed during use @@ -3590,7 +3551,7 @@ index d37abf2cf304f81405e570588c8accbc44a629f4..df728e2c0a2bf660a91e0bd6342c4b4b } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c026a2c99d9 100644 +index 341689ac996164b7b53e095495b92b6e85ab991a..867dc074bc57b27486de6ce742971d5db945b0fc 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -9,7 +9,7 @@ import java.io.File; @@ -3602,7 +3563,7 @@ index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c02 public final Long2ObjectLinkedOpenHashMap cache = new Long2ObjectLinkedOpenHashMap(); private final File b; -@@ -20,16 +20,27 @@ public final class RegionFileCache implements AutoCloseable { +@@ -22,16 +22,27 @@ public final class RegionFileCache implements AutoCloseable { // Paper start @@ -3632,8 +3593,8 @@ index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c02 return regionfile; } else { if (this.cache.size() >= com.destroystokyo.paper.PaperConfig.regionFileCacheSize) { // Paper - configurable -@@ -45,6 +56,12 @@ public final class RegionFileCache implements AutoCloseable { - RegionFile regionfile1 = new RegionFile(file, this.b); +@@ -47,6 +58,12 @@ public final class RegionFileCache implements AutoCloseable { + RegionFile regionfile1 = new RegionFile(file, this.b, this.c); this.cache.putAndMoveToFirst(i, regionfile1); + // Paper start @@ -3645,7 +3606,7 @@ index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c02 return regionfile1; } } -@@ -120,11 +137,12 @@ public final class RegionFileCache implements AutoCloseable { +@@ -122,11 +139,12 @@ public final class RegionFileCache implements AutoCloseable { @Nullable public NBTTagCompound read(ChunkCoordIntPair chunkcoordintpair) throws IOException { // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing @@ -3659,7 +3620,7 @@ index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c02 DataInputStream datainputstream = regionfile.a(chunkcoordintpair); // Paper start if (regionfile.isOversized(chunkcoordintpair.x, chunkcoordintpair.z)) { -@@ -162,10 +180,14 @@ public final class RegionFileCache implements AutoCloseable { +@@ -164,10 +182,14 @@ public final class RegionFileCache implements AutoCloseable { } return nbttagcompound; @@ -3675,7 +3636,7 @@ index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c02 int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper DataOutputStream dataoutputstream = regionfile.c(chunkcoordintpair); Throwable throwable = null; -@@ -204,9 +226,12 @@ public final class RegionFileCache implements AutoCloseable { +@@ -206,9 +228,12 @@ public final class RegionFileCache implements AutoCloseable { MinecraftServer.LOGGER.error("Failed to save chunk", laste); } // Paper end @@ -3686,10 +3647,10 @@ index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c02 - public void close() throws IOException { + public synchronized void close() throws IOException { // Paper -> synchronized + ExceptionSuppressor exceptionsuppressor = new ExceptionSuppressor<>(); ObjectIterator objectiterator = this.cache.values().iterator(); - while (objectiterator.hasNext()) { -@@ -216,4 +241,12 @@ public final class RegionFileCache implements AutoCloseable { +@@ -235,4 +260,12 @@ public final class RegionFileCache implements AutoCloseable { } } @@ -3703,46 +3664,45 @@ index 2f8af42e2aadeb1b11db94fdb54ec0ba9e30f095..72118a7dcfabde0f069b8c8b86f41c02 + // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java -index db9f0196bda4c987de6cf63eea437b7154d47b57..a6d8ef5eb44f3f851a3a1be4032ca21ab1d7f2b2 100644 +index a39075c68bb04e7183941c5eb80eb7cdde235045..bd0ff1e43a07a3332f9ade49fec2f76275a25c7f 100644 --- a/src/main/java/net/minecraft/server/RegionFileSection.java +++ b/src/main/java/net/minecraft/server/RegionFileSection.java -@@ -20,28 +20,29 @@ import javax.annotation.Nullable; +@@ -21,28 +21,29 @@ import javax.annotation.Nullable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; --public class RegionFileSection implements AutoCloseable { -+public class RegionFileSection extends RegionFileCache implements AutoCloseable { // Paper - nuke IOWorker +-public class RegionFileSection implements AutoCloseable { ++public class RegionFileSection extends RegionFileCache implements AutoCloseable { // Paper - nuke IOWorker private static final Logger LOGGER = LogManager.getLogger(); - private final IOWorker b; -+// private final IOWorker b; ++ // Paper - nuke IOWorker private final Long2ObjectMap> c = new Long2ObjectOpenHashMap(); - private final LongLinkedOpenHashSet d = new LongLinkedOpenHashSet(); + protected final LongLinkedOpenHashSet d = new LongLinkedOpenHashSet(); // Paper - private -> protected - private final BiFunction, R> e; + private final Function> e; private final Function f; private final DataFixer g; private final DataFixTypes h; - public RegionFileSection(File file, BiFunction, R> bifunction, Function function, DataFixer datafixer, DataFixTypes datafixtypes) { -+ super(file); // Paper - nuke IOWorker - this.e = bifunction; - this.f = function; + public RegionFileSection(File file, Function> function, Function function1, DataFixer datafixer, DataFixTypes datafixtypes, boolean flag) { ++ super(file, flag); // Paper - nuke IOWorker + this.e = function; + this.f = function1; this.g = datafixer; this.h = datafixtypes; -- this.b = new IOWorker(new RegionFileCache(file), file.getName()); -+// this.b = new IOWorker(new RegionFileCache(file), file.getName()); // Paper - nuke IOWorker +- this.b = new IOWorker(file, flag, file.getName()); ++ //this.b = new IOWorker(file, flag, file.getName()); // Paper - nuke IOWorker } protected void a(BooleanSupplier booleansupplier) { -- while (!this.d.isEmpty() && booleansupplier.getAsBoolean()) { -- ChunkCoordIntPair chunkcoordintpair = SectionPosition.a(this.d.firstLong()).u(); -+ while (!this.d.isEmpty() && booleansupplier.getAsBoolean()) { // Paper - conflict here to avoid obfhelpers -+ ChunkCoordIntPair chunkcoordintpair = SectionPosition.a(this.d.firstLong()).u(); // Paper - conflict here to avoid obfhelpers + while (!this.d.isEmpty() && booleansupplier.getAsBoolean()) { +- ChunkCoordIntPair chunkcoordintpair = SectionPosition.a(this.d.firstLong()).r(); ++ ChunkCoordIntPair chunkcoordintpair = SectionPosition.a(this.d.firstLong()).r(); // Paper - conflict here to avoid obfhelpers this.d(chunkcoordintpair); } -@@ -95,13 +96,18 @@ public class RegionFileSection implements AutoC +@@ -96,13 +97,18 @@ public class RegionFileSection implements AutoCloseable { } private void b(ChunkCoordIntPair chunkcoordintpair) { @@ -3763,7 +3723,7 @@ index db9f0196bda4c987de6cf63eea437b7154d47b57..a6d8ef5eb44f3f851a3a1be4032ca21a } catch (IOException ioexception) { RegionFileSection.LOGGER.error("Error reading chunk {} data from disk", chunkcoordintpair, ioexception); return null; -@@ -143,17 +149,31 @@ public class RegionFileSection implements AutoC +@@ -148,17 +154,31 @@ public class RegionFileSection implements AutoCloseable { } private void d(ChunkCoordIntPair chunkcoordintpair) { @@ -3797,19 +3757,19 @@ index db9f0196bda4c987de6cf63eea437b7154d47b57..a6d8ef5eb44f3f851a3a1be4032ca21a private Dynamic a(ChunkCoordIntPair chunkcoordintpair, DynamicOps dynamicops) { Map map = Maps.newHashMap(); -@@ -190,9 +210,9 @@ public class RegionFileSection implements AutoC +@@ -204,9 +224,9 @@ public class RegionFileSection implements AutoCloseable { public void a(ChunkCoordIntPair chunkcoordintpair) { if (!this.d.isEmpty()) { for (int i = 0; i < 16; ++i) { -- long j = SectionPosition.a(chunkcoordintpair, i).v(); -+ long j = SectionPosition.a(chunkcoordintpair, i).v(); // Paper - conflict here to avoid obfhelpers +- long j = SectionPosition.a(chunkcoordintpair, i).s(); ++ long j = SectionPosition.a(chunkcoordintpair, i).s(); // Paper - conflict here to avoid obfhelpers - if (this.d.contains(j)) { + if (this.d.contains(j)) { // Paper - conflict here to avoid obfhelpers this.d(chunkcoordintpair); return; } -@@ -201,7 +221,26 @@ public class RegionFileSection implements AutoC +@@ -215,7 +235,26 @@ public class RegionFileSection implements AutoCloseable { } @@ -3827,7 +3787,7 @@ index db9f0196bda4c987de6cf63eea437b7154d47b57..a6d8ef5eb44f3f851a3a1be4032ca21a + // This is checking if the data exists, then it builds it later in getDataInternal(ChunkCoordIntPair) + if (!this.d.isEmpty()) { + for (int i = 0; i < 16; ++i) { -+ long j = SectionPosition.a(chunkcoordintpair, i).v(); ++ long j = SectionPosition.a(chunkcoordintpair, i).s(); + + if (this.d.contains(j)) { + return this.getDataInternal(chunkcoordintpair); @@ -3851,27 +3811,27 @@ index 75ab9f185b3231113dfa387c956a707b403bb2db..8055f5998213ab1c6c10d03d88d2b14d public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java -index c999f8c9bf8a59e19b3d6d1b7ad8b5fb6e48b928..1a5ec6152c15a6ece227d4bac00c3b02bd9c5c95 100644 +index b8c15047771bd4527b86e514a3b950b2ffc6eef0..303f6b0953ff3c29bd31ec5e02386a92b11d114a 100644 --- a/src/main/java/net/minecraft/server/VillagePlace.java +++ b/src/main/java/net/minecraft/server/VillagePlace.java -@@ -24,8 +24,16 @@ public class VillagePlace extends RegionFileSection { +@@ -25,8 +25,16 @@ public class VillagePlace extends RegionFileSection { private final VillagePlace.a a = new VillagePlace.a(); private final LongSet b = new LongOpenHashSet(); + private final WorldServer world; // Paper + - public VillagePlace(File file, DataFixer datafixer) { -+ // Paper start -+ this(file, datafixer, null); + public VillagePlace(File file, DataFixer datafixer, boolean flag) { ++ // Paper start - add world parameter ++ this(file, datafixer, flag, null); + } -+ public VillagePlace(File file, DataFixer datafixer, WorldServer world) { -+ // Paper end - super(file, VillagePlaceSection::new, VillagePlaceSection::new, datafixer, DataFixTypes.POI_CHUNK); -+ this.world = world; // Paper ++ public VillagePlace(File file, DataFixer datafixer, boolean flag, WorldServer world) { + super(file, VillagePlaceSection::a, VillagePlaceSection::new, datafixer, DataFixTypes.POI_CHUNK, flag); ++ this.world = world; ++ // Paper end - add world parameter } public void a(BlockPosition blockposition, VillagePlaceType villageplacetype) { -@@ -129,7 +137,23 @@ public class VillagePlace extends RegionFileSection { +@@ -134,7 +142,23 @@ public class VillagePlace extends RegionFileSection { @Override public void a(BooleanSupplier booleansupplier) { @@ -3882,7 +3842,7 @@ index c999f8c9bf8a59e19b3d6d1b7ad8b5fb6e48b928..1a5ec6152c15a6ece227d4bac00c3b02 + } else { + //super.a(booleansupplier); // re-implement below + while (!((RegionFileSection)this).d.isEmpty() && booleansupplier.getAsBoolean()) { -+ ChunkCoordIntPair chunkcoordintpair = SectionPosition.a(((RegionFileSection)this).d.firstLong()).u(); ++ ChunkCoordIntPair chunkcoordintpair = SectionPosition.a(((RegionFileSection)this).d.firstLong()).r(); + + NBTTagCompound data; + try (co.aikar.timings.Timing ignored1 = this.world.timings.poiSaveDataSerialization.startTiming()) { @@ -3896,7 +3856,7 @@ index c999f8c9bf8a59e19b3d6d1b7ad8b5fb6e48b928..1a5ec6152c15a6ece227d4bac00c3b02 this.a.a(); } -@@ -229,6 +253,35 @@ public class VillagePlace extends RegionFileSection { +@@ -234,6 +258,35 @@ public class VillagePlace extends RegionFileSection { } } @@ -3933,11 +3893,11 @@ index c999f8c9bf8a59e19b3d6d1b7ad8b5fb6e48b928..1a5ec6152c15a6ece227d4bac00c3b02 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 83585f3ba7ef9e72f3702079a82f62c8b17e4077..83e6c872028107a17de1c08a5f6e8a02d62277ea 100644 +index 2738d61709a956e83ab7b4e05063a99bcbb7e01b..88a7217101070222c3c9a07ce6a6d7d75573144d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -82,6 +82,79 @@ public class WorldServer extends World { - return new Throwable(entity + " Added to world at " + new java.util.Date()); +@@ -94,6 +94,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { + return this.chunkProvider.getChunkAt(x, z, false); } + // Paper start - Asynchronous IO @@ -3993,7 +3953,7 @@ index 83585f3ba7ef9e72f3702079a82f62c8b17e4077..83e6c872028107a17de1c08a5f6e8a02 + RegionFile file; + + try { -+ file = WorldServer.this.getChunkProvider().playerChunkMap.getFile(new ChunkCoordIntPair(chunkX, chunkZ), false); ++ file = WorldServer.this.getChunkProvider().playerChunkMap.regionFileCache.getFile(new ChunkCoordIntPair(chunkX, chunkZ), false); + } catch (java.io.IOException ex) { + throw new RuntimeException(ex); + } @@ -4005,7 +3965,7 @@ index 83585f3ba7ef9e72f3702079a82f62c8b17e4077..83e6c872028107a17de1c08a5f6e8a02 + @Override + public T computeForRegionFileIfLoaded(int chunkX, int chunkZ, java.util.function.Function function) { + synchronized (WorldServer.this.getChunkProvider().playerChunkMap) { -+ RegionFile file = WorldServer.this.getChunkProvider().playerChunkMap.getRegionFileIfLoaded(new ChunkCoordIntPair(chunkX, chunkZ)); ++ RegionFile file = WorldServer.this.getChunkProvider().playerChunkMap.regionFileCache.getRegionFileIfLoaded(new ChunkCoordIntPair(chunkX, chunkZ)); + return function.apply(file); + } + } @@ -4013,19 +3973,19 @@ index 83585f3ba7ef9e72f3702079a82f62c8b17e4077..83e6c872028107a17de1c08a5f6e8a02 + public final com.destroystokyo.paper.io.chunk.ChunkTaskManager asyncChunkTaskManager; + // Paper end + - // Add env and gen to constructor - public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { - super(worlddata, dimensionmanager, executor, (world, worldprovider) -> { // Paper - pass executor down -@@ -125,6 +198,8 @@ public class WorldServer extends World { - - this.mobSpawnerTrader = this.worldProvider.getDimensionManager().getType() == DimensionManager.OVERWORLD ? new MobSpawnerTrader(this) : null; // CraftBukkit - getType() + // Add env and gen to constructor, WorldData -> WorldDataServer + public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { + super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor +@@ -141,6 +214,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { + this.dragonBattle = null; + } this.getServer().addWorld(this.getWorld()); // CraftBukkit + + this.asyncChunkTaskManager = new com.destroystokyo.paper.io.chunk.ChunkTaskManager(this); // Paper } // CraftBukkit start -@@ -1664,7 +1739,10 @@ public class WorldServer extends World { +@@ -1570,7 +1645,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { } MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> { @@ -4038,10 +3998,10 @@ index 83585f3ba7ef9e72f3702079a82f62c8b17e4077..83e6c872028107a17de1c08a5f6e8a02 } 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 cf059aa091e9c732f99b89fc347074a9c1b879a8..5aea49404717061fce4bf24e91f36217db5cee83 100644 +index 1f1839f40a406f6a2bf2d3af68c2d208d6503b2d..abf285be2b71a93681f06879177f03c0f5fdff1a 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.GroupDataEntity; +@@ -74,6 +74,7 @@ import net.minecraft.server.GroupDataEntity; import net.minecraft.server.IBlockData; import net.minecraft.server.IChunkAccess; import net.minecraft.server.MinecraftKey; @@ -4049,7 +4009,7 @@ index cf059aa091e9c732f99b89fc347074a9c1b879a8..5aea49404717061fce4bf24e91f36217 import net.minecraft.server.MovingObjectPosition; import net.minecraft.server.PacketPlayOutCustomSoundEffect; import net.minecraft.server.PacketPlayOutUpdateTime; -@@ -555,22 +556,23 @@ public class CraftWorld implements World { +@@ -556,22 +557,23 @@ public class CraftWorld implements World { return true; } @@ -4081,9 +4041,9 @@ index cf059aa091e9c732f99b89fc347074a9c1b879a8..5aea49404717061fce4bf24e91f36217 // fall through to load // we do this so we do not re-read the chunk data on disk -@@ -2442,6 +2444,34 @@ public class CraftWorld implements World { - - return new CraftDragonBattle(worldProvider.o()); // PAIL rename getDragonBattle +@@ -2445,6 +2447,34 @@ public class CraftWorld implements World { + public DragonBattle getEnderDragonBattle() { + return (getHandle().getDragonBattle() == null) ? null : new CraftDragonBattle(getHandle().getDragonBattle()); } + // Paper start + @Override diff --git a/Spigot-Server-Patches/0391-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 65% rename from Spigot-Server-Patches/0391-Use-getChunkIfLoadedImmediately-in-places.patch rename to Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch index eab049a619..684a858e98 100644 --- a/Spigot-Server-Patches/0391-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,10 +8,10 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6a7bdf8c5f38ca4eb578e1104375e5773269330c..ee186ed5a076ede4d89702aeb5a2128d6e7ac8cf 100644 +index 795b24c8d102417ae7e730254ecddefc06dbe0df..e382315c91540ac24821e432ee31a8244f4f7efa 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -996,7 +996,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1015,7 +1015,7 @@ public class PlayerConnection implements PacketListenerPlayIn { speed = player.abilities.walkSpeed * 10f; } // Paper start - Prevent moving into unloaded chunks @@ -21,45 +21,41 @@ index 6a7bdf8c5f38ca4eb578e1104375e5773269330c..ee186ed5a076ede4d89702aeb5a2128d return; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 479b87eaae67909768db1ba23854f05d2e61110c..8e5c54af26d2c7abf2daae081af97caee7fd9f7a 100644 +index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2edda551f85 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -116,8 +116,16 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -103,6 +103,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + return (CraftServer) Bukkit.getServer(); } - public Chunk getChunkIfLoaded(int x, int z) { -- return ((ChunkProviderServer) this.chunkProvider).getChunkAt(x, z, false); -+ return ((ChunkProviderServer) this.chunkProvider).getChunkAtIfLoadedImmediately(x, z); // Paper - } + // Paper start + @Override + public boolean isChunkLoaded(int x, int z) { -+ return getChunkIfLoaded(x, z) != null; ++ return ((WorldServer)this).getChunkIfLoaded(x, z) != null; + } -+ -+ + // Paper end - - protected World(WorldData worlddata, DimensionManager dimensionmanager, java.util.concurrent.Executor executor, BiFunction bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { // Paper - executor - this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot -@@ -1110,14 +1118,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { ++ + protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { + this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot + this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper +@@ -1033,14 +1040,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } - public boolean n(BlockPosition blockposition) { -- return isOutsideWorld(blockposition) ? false : this.chunkProvider.b(blockposition.getX() >> 4, blockposition.getZ() >> 4); + public boolean p(BlockPosition blockposition) { +- return isOutsideWorld(blockposition) ? false : this.getChunkProvider().b(blockposition.getX() >> 4, blockposition.getZ() >> 4); + return isOutsideWorld(blockposition) ? false : isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); // Paper } - public boolean a(BlockPosition blockposition, Entity entity) { + public boolean a(BlockPosition blockposition, Entity entity, EnumDirection enumdirection) { if (isOutsideWorld(blockposition)) { return false; } else { - IChunkAccess ichunkaccess = this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4, ChunkStatus.FULL, false); + IChunkAccess ichunkaccess = this.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4); // Paper - return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity); + return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity, enumdirection); } -@@ -1233,7 +1241,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1161,7 +1168,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -68,8 +64,21 @@ index 479b87eaae67909768db1ba23854f05d2e61110c..8e5c54af26d2c7abf2daae081af97cae 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 88a7217101070222c3c9a07ce6a6d7d75573144d..3e42d52d2256c85b7dcbbd0e363fa1e1c789b1bf 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -91,7 +91,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + } + + public Chunk getChunkIfLoaded(int x, int z) { +- return this.chunkProvider.getChunkAt(x, z, false); ++ return this.chunkProvider.getChunkAtIfLoadedImmediately(x, z); // Paper + } + + // Paper start - Asynchronous IO diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index f86404f83ae605159307a3ad2cca6c6c314a01af..92601c581cffac471872226abeb93ef9aa24f079 100644 +index 78f0fb5d97b077673ec542cd70bbc3ffa13f916c..b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -143,9 +143,10 @@ public class ActivationRange diff --git a/Spigot-Server-Patches/0392-Reduce-sync-loads.patch b/Spigot-Server-Patches/0378-Reduce-sync-loads.patch similarity index 91% rename from Spigot-Server-Patches/0392-Reduce-sync-loads.patch rename to Spigot-Server-Patches/0378-Reduce-sync-loads.patch index cd2b995d79..7d7d74706d 100644 --- a/Spigot-Server-Patches/0392-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0378-Reduce-sync-loads.patch @@ -109,7 +109,7 @@ index 331493a172f58e71b464d635efdba461082bd27d..182b440ba4802d199b8e44f7779b3401 if (args.length < 2 || args[1].equals("*")) { diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java new file mode 100644 -index 0000000000000000000000000000000000000000..59aec103295f747793fdc0a52eb45f4121aba921 +index 0000000000000000000000000000000000000000..1a68a8012f83bab9e814159c76b8c3710c7b1112 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java @@ -0,0 +1,172 @@ @@ -267,7 +267,7 @@ index 0000000000000000000000000000000000000000..59aec103295f747793fdc0a52eb45f41 + final ThrowableWithEquals other = (ThrowableWithEquals)obj; + final StackTraceElement[] otherStackTrace = other.stacktrace; + -+ if (this.stacktrace.length != otherStackTrace.length) { ++ if (this.stacktrace.length != otherStackTrace.length || this.hash != other.hash) { + return false; + } + @@ -286,10 +286,10 @@ index 0000000000000000000000000000000000000000..59aec103295f747793fdc0a52eb45f41 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 981cf581c7504c38120d48c06b6351952fab43c0..54cf319e9db1aad793ab7f55249f9857b450eda2 100644 +index edd901bb53385fa3d189a0057d57f98bf8b7115c..707db4febac59a4d09d6420ea2add469cf54c2ec 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -470,6 +470,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,19 +298,19 @@ index 981cf581c7504c38120d48c06b6351952fab43c0..54cf319e9db1aad793ab7f55249f9857 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 8e5c54af26d2c7abf2daae081af97caee7fd9f7a..045e449c7e411dec7ef415c76c808cda426db652 100644 +index 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8830669ac 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1174,7 +1174,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1101,7 +1101,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 <= j; ++i1) { for (int j1 = k; j1 <= l; ++j1) { -- Chunk chunk = this.getChunkProvider().getChunkAt(i1, j1, false); +- Chunk chunk = ichunkprovider.getChunkAt(i1, j1, false); + Chunk chunk = (Chunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper if (chunk != null) { chunk.a(entity, axisalignedbb, list, predicate); -@@ -1195,7 +1195,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1122,7 +1122,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 8e5c54af26d2c7abf2daae081af97caee7fd9f7a..045e449c7e411dec7ef415c76c808cda if (chunk != null) { chunk.a(entitytypes, axisalignedbb, list, predicate); -@@ -1218,7 +1218,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1145,7 +1145,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -329,10 +329,10 @@ index 8e5c54af26d2c7abf2daae081af97caee7fd9f7a..045e449c7e411dec7ef415c76c808cda 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 83e6c872028107a17de1c08a5f6e8a02d62277ea..da38293cf02d84f3e24a883136ffe5118a510b5a 100644 +index 3e42d52d2256c85b7dcbbd0e363fa1e1c789b1bf..0dd249f94905c30b5320109a3f0b17cac70def8d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -154,6 +154,12 @@ public class WorldServer extends World { +@@ -166,6 +166,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { }; public final com.destroystokyo.paper.io.chunk.ChunkTaskManager asyncChunkTaskManager; // Paper end @@ -343,5 +343,5 @@ index 83e6c872028107a17de1c08a5f6e8a02d62277ea..da38293cf02d84f3e24a883136ffe511 + } + // Paper end - // Add env and gen to constructor - public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { + // Add env and gen to constructor, WorldData -> WorldDataServer + public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { diff --git a/Spigot-Server-Patches/0393-Implement-alternative-item-despawn-rate.patch b/Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch similarity index 91% rename from Spigot-Server-Patches/0393-Implement-alternative-item-despawn-rate.patch rename to Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch index 1479d50390..47adb6a101 100644 --- a/Spigot-Server-Patches/0393-Implement-alternative-item-despawn-rate.patch +++ b/Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7101ef0912221bdb1c32d2cafbac5d9d53e7037d..9b43b4172ae5df253479a412ec0d83fed08d70f1 100644 +index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f9410dd51 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,10 +1,15 @@ @@ -24,7 +24,7 @@ index 7101ef0912221bdb1c32d2cafbac5d9d53e7037d..9b43b4172ae5df253479a412ec0d83fe import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -546,4 +551,52 @@ public class PaperWorldConfig { +@@ -514,4 +519,52 @@ public class PaperWorldConfig { private void disableRelativeProjectileVelocity() { disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false); } @@ -78,7 +78,7 @@ index 7101ef0912221bdb1c32d2cafbac5d9d53e7037d..9b43b4172ae5df253479a412ec0d83fe + } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index ef2cf6565b5935b1f1a80f12670609017aebb2c8..507627a29f67c380314d2fa8ee56807ced8ee56a 100644 +index 465550656356394074ebf4cc8d6188455daded88..f2626358d16e8f3d60633283322009e5afacd145 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -6,6 +6,7 @@ import java.util.Objects; @@ -89,7 +89,7 @@ index ef2cf6565b5935b1f1a80f12670609017aebb2c8..507627a29f67c380314d2fa8ee56807c import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent; // CraftBukkit end -@@ -128,7 +129,7 @@ public class EntityItem extends Entity { +@@ -129,7 +130,7 @@ public class EntityItem extends Entity { } } @@ -98,7 +98,7 @@ index ef2cf6565b5935b1f1a80f12670609017aebb2c8..507627a29f67c380314d2fa8ee56807c // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -152,7 +153,7 @@ public class EntityItem extends Entity { +@@ -153,7 +154,7 @@ public class EntityItem extends Entity { this.lastTick = MinecraftServer.currentTick; // CraftBukkit end @@ -107,7 +107,7 @@ index ef2cf6565b5935b1f1a80f12670609017aebb2c8..507627a29f67c380314d2fa8ee56807c // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -478,9 +479,16 @@ public class EntityItem extends Entity { +@@ -497,9 +498,16 @@ public class EntityItem extends Entity { public void s() { this.o(); @@ -123,5 +123,5 @@ index ef2cf6565b5935b1f1a80f12670609017aebb2c8..507627a29f67c380314d2fa8ee56807c + // Paper end + @Override - public Packet L() { + public Packet O() { return new PacketPlayOutSpawnEntity(this); diff --git a/Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch new file mode 100644 index 0000000000..3f88179170 --- /dev/null +++ b/Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -0,0 +1,40 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Sauve +Date: Sun, 14 Jul 2019 21:05:03 -0500 +Subject: [PATCH] Do less work if we have a custom Bukkit generator + +If the Bukkit generator already has a spawn, use it immediately instead +of spending time generating one that we won't use + +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 7e832d2610f9c0d805c7f289de5098d9b5f09402..824c3763a56171ceb5f7163783cd46154b7e181e 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -513,11 +513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant list = worldchunkmanager.b(); +- Random random = new Random(worldserver.getSeed()); +- BlockPosition blockposition = worldchunkmanager.a(0, worldserver.getSeaLevel(), 0, 256, list, random); +- ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); ++ // Paper start - moved down + // CraftBukkit start + if (worldserver.generator != null) { + Random rand = new Random(worldserver.getSeed()); +@@ -533,6 +529,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant list = worldchunkmanager.b(); ++ Random random = new Random(worldserver.getSeed()); ++ BlockPosition blockposition = worldchunkmanager.a(0, worldserver.getSeaLevel(), 0, 256, list, random); ++ ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); ++ // Paper end + + if (blockposition == null) { + MinecraftServer.LOGGER.warn("Unable to find spawn biome"); diff --git a/Spigot-Server-Patches/0395-Fix-MC-158900.patch b/Spigot-Server-Patches/0381-Fix-MC-158900.patch similarity index 90% rename from Spigot-Server-Patches/0395-Fix-MC-158900.patch rename to Spigot-Server-Patches/0381-Fix-MC-158900.patch index b7d14ec681..f08fb6bd61 100644 --- a/Spigot-Server-Patches/0395-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0381-Fix-MC-158900.patch @@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 559a411627ed7b018f00b90e8dfc1b470af4a531..3cc9c70882bfb9a933c726b7a194aa3b142034fa 100644 +index 8d067082ad52397d11822277438f00a43d7f3e09..93d30964fee7117beca92653df62f474730d866e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -502,8 +502,10 @@ public abstract class PlayerList { +@@ -532,8 +532,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); diff --git a/Spigot-Server-Patches/0396-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0382-implement-optional-per-player-mob-spawns.patch similarity index 68% rename from Spigot-Server-Patches/0396-implement-optional-per-player-mob-spawns.patch rename to Spigot-Server-Patches/0382-implement-optional-per-player-mob-spawns.patch index cf5dc5764c..c0e8da7d7d 100644 --- a/Spigot-Server-Patches/0396-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0382-implement-optional-per-player-mob-spawns.patch @@ -25,10 +25,10 @@ index 98acbfa44dd9042b26fdf719d7748f92d201c928..a94ebf7c76f167d3b66f7d243910c13d poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9b43b4172ae5df253479a412ec0d83fed08d70f1..c148a57a9c3d44f2a0a2edfed4f96211745cc3e7 100644 +index cf9d980e61be199a34cff98f805e511f9410dd51..3d9a48e56194225cf39e31d13d26ec17afedadaf 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -599,4 +599,9 @@ public class PaperWorldConfig { +@@ -567,4 +567,9 @@ public class PaperWorldConfig { } } } @@ -545,16 +545,16 @@ index 0000000000000000000000000000000000000000..4f13d3ff8391793a99f067189f854078 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 54cf319e9db1aad793ab7f55249f9857b450eda2..633f12098973857eca04acd2839bb4d453860f1e 100644 +index 707db4febac59a4d09d6420ea2add469cf54c2ec..1597b7a882769109f467d81ecbadc45ff6779b7e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -757,7 +757,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(); - EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); -- Object2IntMap object2intmap = this.world.l(); +- SpawnerCreature.d spawnercreature_d = SpawnerCreature.a(l, this.world.z(), this::a); + // Paper start - per player mob spawning -+ int[] worldMobCount; ++ SpawnerCreature.d spawnercreature_d; // moved down + if (this.playerChunkMap.playerMobDistanceMap != null) { + // update distance map + this.world.timings.playerMobDistanceMapUpdate.startTiming(); @@ -564,45 +564,19 @@ index 54cf319e9db1aad793ab7f55249f9857b450eda2..633f12098973857eca04acd2839bb4d4 + for (EntityPlayer player : this.world.players) { + Arrays.fill(player.mobCounts, 0); + } -+ worldMobCount = this.world.countMobs(true); ++ spawnercreature_d = SpawnerCreature.countMobs(l, this.world.z(), this::a, true); + } else { -+ worldMobCount = this.world.countMobs(false); ++ spawnercreature_d = SpawnerCreature.countMobs(l, this.world.z(), this::a, false); + } + // Paper end - this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings - this.world.getMethodProfiler().exit(); -@@ -825,8 +840,23 @@ public class ChunkProviderServer extends IChunkProvider { - if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) { - int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits -- if (object2intmap.getInt(enumcreaturetype) <= k1) { -- SpawnerCreature.a(enumcreaturetype, this.world, chunk, blockposition); -+ // Paper start - only allow spawns upto the limit per chunk and update count afterwards -+ int currEntityCount = worldMobCount[enumcreaturetype.ordinal()]; -+ int difference = k1 - currEntityCount; -+ -+ if (this.world.paperConfig.perPlayerMobSpawns) { -+ int minDiff = Integer.MAX_VALUE; -+ for (EntityPlayer entityplayer : this.playerChunkMap.playerMobDistanceMap.getPlayersInRange(chunk.getPos())) { -+ minDiff = Math.min(limit - this.playerChunkMap.getMobCountNear(entityplayer, enumcreaturetype), minDiff); -+ } -+ difference = (minDiff == Integer.MAX_VALUE) ? 0 : minDiff; -+ } -+ -+ if (difference > 0) { -+ int spawnCount = SpawnerCreature.spawnMobs(enumcreaturetype, this.world, chunk, blockposition, difference, -+ this.world.paperConfig.perPlayerMobSpawns ? this.playerChunkMap::updatePlayerMobTypeMap : null); -+ worldMobCount[enumcreaturetype.ordinal()] += spawnCount; -+ // Paper end - } - } - } + this.p = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 57b393c22448910c3ecc34353c3aa8480c58c074..3db173fb5559e62150192a28dbdccdff16787401 100644 +index df8db93a7b2783c738281adb0b696ff41a5105d0..f967f08049d792b1f2542828ed28de9e94949bab 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -81,6 +81,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -85,6 +85,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; // Paper end @@ -614,7 +588,7 @@ index 57b393c22448910c3ecc34353c3aa8480c58c074..3db173fb5559e62150192a28dbdccdff // CraftBukkit start public String displayName; -@@ -116,6 +121,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -120,6 +125,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.displayName = this.getName(); this.canPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); @@ -622,43 +596,43 @@ index 57b393c22448910c3ecc34353c3aa8480c58c074..3db173fb5559e62150192a28dbdccdff } // Yes, this doesn't match Vanilla, but it's the best we can do for now. -@@ -1791,6 +1797,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1929,6 +1935,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } -+ public SectionPosition getPlayerMapSection() { return this.K(); } // Paper - OBFHELPER - public SectionPosition K() { - return this.cs; ++ public final SectionPosition getPlayerMapSection() { return this.N(); } // Paper - OBFHELPER + public SectionPosition N() { + return this.cq; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 8427ee2ee8b90d5deb686412bb2eefb9a574b75a..0f04bcc8b7cd5bd0536dd3fccab0f4dae6b0130b 100644 +index b9fe08301409bc1f0d61a7566c26e720ff720d80..18a806ebbf092b904983691529ce5edf2da4e6db 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -254,6 +254,7 @@ public class EntityTypes { - return this.bf; +@@ -265,6 +265,7 @@ public class EntityTypes { + return this.bk; } -+ public EnumCreatureType getEnumCreatureType() { return this.e(); } // Paper - OBFHELPER ++ public final EnumCreatureType getEnumCreatureType() { return this.e(); } // Paper - OBFHELPER public EnumCreatureType e() { - return this.bb; + return this.bf; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 6552bbf06637b08626cbf0fb352123c3e381cb5a..c20acd86beb8f28345d1359d0a2b68b7d8e0e410 100644 +index cdb72b225226083ca45ade798f54989422e5281c..f7e57fd1ce5881c056c104d5a6a9a74e34e3ffc3 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -78,7 +78,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - private final PlayerMap playerMap; +@@ -80,7 +80,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final Int2ObjectMap trackedEntities; - private final Queue z; + private final Long2ByteMap z; + private final Queue A; private final Queue getUnloadQueueTasks() { return this.A; } // Paper - OBFHELPER - private int viewDistance; + int viewDistance; // Paper - private -> package private + public final com.destroystokyo.paper.util.PlayerMobDistanceMap playerMobDistanceMap; // Paper // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() public final CallbackExecutor callbackExecutor = new CallbackExecutor(); -@@ -158,6 +159,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -159,6 +160,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.l = supplier; - this.m = new VillagePlace(new File(this.w, "poi"), datafixer, this.world); // Paper + this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); + this.playerMobDistanceMap = this.world.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + } @@ -682,120 +656,170 @@ index 6552bbf06637b08626cbf0fb352123c3e381cb5a..c20acd86beb8f28345d1359d0a2b68b7 private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index fdac5bb3a2d4a73035e1d914979b87fc224b6b20..58bbf2f9d2ec91715051d40e108e16067bb36561 100644 +index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f237b5b2bf 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -3,6 +3,7 @@ package net.minecraft.server; - import java.util.List; - import java.util.Objects; - import java.util.Random; -+import java.util.function.Consumer; // Paper - import javax.annotation.Nullable; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; -@@ -16,9 +17,14 @@ public final class SpawnerCreature { +@@ -29,6 +29,11 @@ public final class SpawnerCreature { + }); - private static final Logger LOGGER = LogManager.getLogger(); - -+ // Paper start - add maxSpawns parameter and return spawned mobs - public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, BlockPosition blockposition) { -+ spawnMobs(enumcreaturetype, worldserver, chunk, blockposition, Integer.MAX_VALUE, null); + public static SpawnerCreature.d a(int i, Iterable iterable, SpawnerCreature.b spawnercreature_b) { ++ // Paper start - add countMobs parameter ++ return countMobs(i, iterable, spawnercreature_b, false); + } -+ public static int spawnMobs(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, BlockPosition blockposition, int maxSpawns, Consumer trackEntity) { -+ // Paper end - ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); -- int i = 0; -+ int i = 0; // Paper - force diff on name change - BlockPosition blockposition1 = getRandomPosition(worldserver, chunk); - int j = blockposition1.getX(); - int k = blockposition1.getY(); -@@ -88,7 +94,7 @@ public final class SpawnerCreature { - ); - if (!event.callEvent()) { - if (event.shouldAbortSpawn()) { -- return; -+ return i; // Paper - } - ++i2; - continue; -@@ -107,7 +113,7 @@ public final class SpawnerCreature { - } catch (Exception exception) { - SpawnerCreature.LOGGER.warn("Failed to create mob", exception); - ServerInternalException.reportInternalException(exception); // Paper -- return; -+ return i; // Paper - } - - entityinsentient.setPositionRotation((double) f, (double) k, (double) f1, worldserver.random.nextFloat() * 360.0F, 0.0F); -@@ -115,12 +121,16 @@ public final class SpawnerCreature { - groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(new BlockPosition(entityinsentient)), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); - // CraftBukkit start - if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) { -- ++i; -+ ++i; // Paper - force diff on name change - ++i2; -+ if (trackEntity != null) { -+ trackEntity.accept(entityinsentient); // Paper -+ } - } -+ if (i >= maxSpawns) { return i; } // Paper - // CraftBukkit end - if (i >= entityinsentient.getMaxSpawnGroup()) { -- return; -+ return i; // Paper - } - - if (entityinsentient.c(i2)) { -@@ -146,6 +156,7 @@ public final class SpawnerCreature { ++ public static SpawnerCreature.d countMobs(int i, Iterable iterable, SpawnerCreature.b spawnercreature_b, boolean countMobs) { ++ // Paper end - add countMobs parameter + SpawnerCreatureProbabilities spawnercreatureprobabilities = new SpawnerCreatureProbabilities(); + Object2IntOpenHashMap object2intopenhashmap = new Object2IntOpenHashMap(); + Iterator iterator = iterable.iterator(); +@@ -67,6 +72,11 @@ public final class SpawnerCreature { + } + object2intopenhashmap.addTo(enumcreaturetype, 1); ++ // Paper start ++ if (countMobs) { ++ ((WorldServer)chunk.world).getChunkProvider().playerChunkMap.updatePlayerMobTypeMap(entity); ++ } ++ // Paper end + }); } } -+ return i; // Paper - } +@@ -120,13 +130,33 @@ public final class SpawnerCreature { + continue; + } - @Nullable -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 135d1211525f499198122e500626ce463c263088..80e2a15bebe93939dc7b43b17b8116965438c062 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1031,7 +1031,20 @@ public class WorldServer extends World { - } - - public Object2IntMap l() { -- Object2IntMap object2intmap = new Object2IntOpenHashMap(); -+ // Paper start -+ int[] values = this.countMobs(false); -+ EnumCreatureType[] byId = EnumCreatureType.values(); -+ Object2IntMap ret = new Object2IntOpenHashMap<>(); ++ // Paper start - only allow spawns upto the limit per chunk and update count afterwards ++ int currEntityCount = spawnercreature_d.getEntityCountsByType().getInt(enumcreaturetype); ++ int k1 = limit * spawnercreature_d.getSpawnerChunks() / SpawnerCreature.b; ++ int difference = k1 - currEntityCount; + -+ for (int i = 0, len = values.length; i < len; ++i) { -+ ret.put(byId[i], values[i]); -+ } -+ -+ return ret; -+ } -+ public int[] countMobs(boolean updatePlayerCounts) { -+ int[] ret = new int[EntityPlayer.ENUMCREATURETYPE_TOTAL_ENUMS]; -+ // Paper end - ObjectIterator objectiterator = this.entitiesById.values().iterator(); - - while (objectiterator.hasNext()) { -@@ -1056,11 +1069,16 @@ public class WorldServer extends World { - continue; - } - // Paper end -- object2intmap.mergeInt(enumcreaturetype, 1, Integer::sum); -+ // Paper start - rework mob spawning -+ if (updatePlayerCounts) { -+ this.getChunkProvider().playerChunkMap.updatePlayerMobTypeMap(entity); ++ if (worldserver.paperConfig.perPlayerMobSpawns) { ++ int minDiff = Integer.MAX_VALUE; ++ for (EntityPlayer entityplayer : worldserver.getChunkProvider().playerChunkMap.playerMobDistanceMap.getPlayersInRange(chunk.getPos())) { ++ minDiff = Math.min(limit - worldserver.getChunkProvider().playerChunkMap.getMobCountNear(entityplayer, enumcreaturetype), minDiff); + } -+ ++ret[enumcreaturetype.ordinal()]; -+ // Paper end ++ difference = (minDiff == Integer.MAX_VALUE) ? 0 : minDiff; ++ } ++ // Paper end ++ ++ if (difference > 0) { // Paper + if ((flag || !enumcreaturetype.d()) && (flag1 || enumcreaturetype.d()) && (flag2 || !enumcreaturetype.e()) && spawnercreature_d.a(enumcreaturetype, limit)) { + // CraftBukkit end +- a(enumcreaturetype, worldserver, chunk, (entitytypes, blockposition, ichunkaccess) -> { ++ int spawnCount = spawnMobs(enumcreaturetype, worldserver, chunk, (entitytypes, blockposition, ichunkaccess) -> { + return spawnercreature_d.a(entitytypes, blockposition, ichunkaccess); + }, (entityinsentient, ichunkaccess) -> { + spawnercreature_d.a(entityinsentient, ichunkaccess); ++ }, ++ limit, worldserver.paperConfig.perPlayerMobSpawns ? worldserver.getChunkProvider().playerChunkMap::updatePlayerMobTypeMap : null); ++ spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, 0, (keyInMap, valueInMap) -> { ++ return Integer.valueOf(spawnCount + valueInMap.intValue()); + }); ++ } // Paper } } -- return object2intmap; -+ return ret; +@@ -135,22 +165,34 @@ public final class SpawnerCreature { } - @Override + public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a) { ++ // Paper start - add parameters and int ret type ++ spawnMobs(enumcreaturetype, worldserver, chunk, spawnercreature_c, spawnercreature_a, Integer.MAX_VALUE, null); ++ } ++ public static int spawnMobs(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a, int maxSpawns, Consumer trackEntity) { ++ // Paper end - add parameters and int ret type + BlockPosition blockposition = getRandomPosition(worldserver, chunk); + + if (blockposition.getY() >= 1) { +- a(enumcreaturetype, worldserver, (IChunkAccess) chunk, blockposition, spawnercreature_c, spawnercreature_a); ++ return spawnMobsInternal(enumcreaturetype, worldserver, (IChunkAccess) chunk, blockposition, spawnercreature_c, spawnercreature_a, maxSpawns, trackEntity); + } ++ return 0; // Paper + } + + public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, IChunkAccess ichunkaccess, BlockPosition blockposition, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a) { ++ // Paper start - add maxSpawns parameter and return spawned mobs ++ spawnMobsInternal(enumcreaturetype, worldserver, ichunkaccess, blockposition, spawnercreature_c, spawnercreature_a, Integer.MAX_VALUE, null); ++ } ++ public static int spawnMobsInternal(EnumCreatureType enumcreaturetype, WorldServer worldserver, IChunkAccess ichunkaccess, BlockPosition blockposition, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a, int maxSpawns, Consumer trackEntity) { ++ // Paper end - add maxSpawns parameter and return spawned mobs + StructureManager structuremanager = worldserver.getStructureManager(); + ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); + int i = blockposition.getY(); + IBlockData iblockdata = worldserver.getTypeIfLoadedAndInBounds(blockposition); // Paper - don't load chunks for mob spawn ++ int j = 0; // Paper - moved up + + if (iblockdata != null && !iblockdata.isOccluding(ichunkaccess, blockposition)) { // Paper - don't load chunks for mob spawn + BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); +- int j = 0; ++ // Paper - moved up + int k = 0; + + while (k < 3) { +@@ -190,13 +232,13 @@ public final class SpawnerCreature { + // Paper start + Boolean doSpawning = a(worldserver, enumcreaturetype, structuremanager, chunkgenerator, biomebase_biomemeta, blockposition_mutableblockposition, d2); + if (doSpawning == null) { +- return; ++ return j; // Paper + } + if (doSpawning.booleanValue() && spawnercreature_c.test(biomebase_biomemeta.c, blockposition_mutableblockposition, ichunkaccess)) { // Paper end + EntityInsentient entityinsentient = a(worldserver, biomebase_biomemeta.c); + + if (entityinsentient == null) { +- return; ++ return j; // Paper + } + + entityinsentient.setPositionRotation(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F); +@@ -204,13 +246,18 @@ public final class SpawnerCreature { + groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); + // CraftBukkit start + if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) { +- ++j; ++ ++j; // Paper - force diff on name change - we expect this to be the total amount spawned + ++k1; + spawnercreature_a.run(entityinsentient, ichunkaccess); ++ // Paper start ++ if (trackEntity != null) { ++ trackEntity.accept(entityinsentient); ++ } ++ // Paper end + } + // CraftBukkit end +- if (j >= entityinsentient.getMaxSpawnGroup()) { +- return; ++ if (j >= entityinsentient.getMaxSpawnGroup() || j >= maxSpawns) { // Paper ++ return j; // Paper + } + + if (entityinsentient.c(k1)) { +@@ -232,6 +279,7 @@ public final class SpawnerCreature { + } + + } ++ return j; // Paper + } + + private static boolean a(WorldServer worldserver, IChunkAccess ichunkaccess, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, double d0) { +@@ -471,10 +519,10 @@ public final class SpawnerCreature { + + public static class d { + +- private final int a; ++ private final int a; final int getSpawnerChunks() { return this.a; } // Paper - OBFHELPER + private final Object2IntOpenHashMap b; + private final SpawnerCreatureProbabilities c; +- private final Object2IntMap d; ++ private final Object2IntMap d; final Object2IntMap getEntityCountsByType() { return this.d; } // Paper - OBFHELPER + @Nullable + private BlockPosition e; + @Nullable +@@ -535,7 +583,7 @@ public final class SpawnerCreature { + + // CraftBukkit start + private boolean a(EnumCreatureType enumcreaturetype, int limit) { +- int i = limit * this.a / SpawnerCreature.b; ++ int i = limit * this.a / SpawnerCreature.b; // Paper - diff on change, needed in the spawn method + // CraftBukkit end + + return this.b.getInt(enumcreaturetype) < i; diff --git a/Spigot-Server-Patches/0397-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0383-Prevent-consuming-the-wrong-itemstack.patch similarity index 80% rename from Spigot-Server-Patches/0397-Prevent-consuming-the-wrong-itemstack.patch rename to Spigot-Server-Patches/0383-Prevent-consuming-the-wrong-itemstack.patch index c7c6b44c5b..4fc97cb716 100644 --- a/Spigot-Server-Patches/0397-Prevent-consuming-the-wrong-itemstack.patch +++ b/Spigot-Server-Patches/0383-Prevent-consuming-the-wrong-itemstack.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 0a31f2e931bba74ecda40c3792718a530acec3af..576c9c6ae4339951d4ec9fffa69c7f860d82b33f 100644 +index 79cf31d6fcd0e82ee146c489448a93a6e55e4190..d44d594b52cd63adcede55fbe6548b758b482c90 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2897,10 +2897,13 @@ public abstract class EntityLiving extends Entity { - this.datawatcher.set(EntityLiving.ao, (byte) j); +@@ -3062,10 +3062,13 @@ public abstract class EntityLiving extends Entity { + this.datawatcher.set(EntityLiving.an, (byte) j); } - public void c(EnumHand enumhand) { @@ -22,20 +22,20 @@ index 0a31f2e931bba74ecda40c3792718a530acec3af..576c9c6ae4339951d4ec9fffa69c7f86 - if (!itemstack.isEmpty() && !this.isHandRaised()) { + if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag this.activeItem = itemstack; - this.bl = itemstack.k(); + this.bk = itemstack.k(); if (!this.world.isClientSide) { -@@ -2976,6 +2979,7 @@ public abstract class EntityLiving extends Entity { - this.clearActiveItem(); +@@ -3141,6 +3144,7 @@ public abstract class EntityLiving extends Entity { + this.releaseActiveItem(); } else { if (!this.activeItem.isEmpty() && this.isHandRaised()) { + this.updateActiveItem(this.getRaisedHand(), true); // Paper this.b(this.activeItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; -@@ -3006,8 +3010,8 @@ public abstract class EntityLiving extends Entity { +@@ -3171,8 +3175,8 @@ public abstract class EntityLiving extends Entity { this.a(this.getRaisedHand(), itemstack); // CraftBukkit end - this.dH(); + this.clearActiveItem(); - // Paper start - if the replacement is anything but the default, update the client inventory - if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { + // Paper start diff --git a/Spigot-Server-Patches/0398-only-add-passanger-entities-once-from-spawners.patch b/Spigot-Server-Patches/0384-only-add-passanger-entities-once-from-spawners.patch similarity index 90% rename from Spigot-Server-Patches/0398-only-add-passanger-entities-once-from-spawners.patch rename to Spigot-Server-Patches/0384-only-add-passanger-entities-once-from-spawners.patch index 63a8d16c97..64f30c9f2e 100644 --- a/Spigot-Server-Patches/0398-only-add-passanger-entities-once-from-spawners.patch +++ b/Spigot-Server-Patches/0384-only-add-passanger-entities-once-from-spawners.patch @@ -5,7 +5,7 @@ Subject: [PATCH] only add passanger entities once from spawners diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 41001b02a654194c4a8e25ad5f7af8fdd91090b2..df494d37be687860878c2709ae7996510118a559 100644 +index 921abae4914c7b3f28d387f7a682d991293c4798..2f1d168bd6daad1bbd41977b18263d1fe67a3da0 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -196,7 +196,7 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/0399-Fix-nether-portal-creation.patch b/Spigot-Server-Patches/0385-Fix-nether-portal-creation.patch similarity index 100% rename from Spigot-Server-Patches/0399-Fix-nether-portal-creation.patch rename to Spigot-Server-Patches/0385-Fix-nether-portal-creation.patch diff --git a/Spigot-Server-Patches/0386-Generator-Settings.patch b/Spigot-Server-Patches/0386-Generator-Settings.patch new file mode 100644 index 0000000000..04d445d5d6 --- /dev/null +++ b/Spigot-Server-Patches/0386-Generator-Settings.patch @@ -0,0 +1,89 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Byteflux +Date: Wed, 2 Mar 2016 02:17:54 -0600 +Subject: [PATCH] Generator Settings + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 3d9a48e56194225cf39e31d13d26ec17afedadaf..a9d7e81ef123a7da7785a4b8dc868a0e256a61d0 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -572,4 +572,9 @@ public class PaperWorldConfig { + private void perPlayerMobSpawns() { + perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false); + } ++ ++ public boolean generateFlatBedrock; ++ private void generatorSettings() { ++ generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); ++ } + } +diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +index bbd955160802fdb231cd8090d95f4e49f10d8495..733c6244e08f6b7277006c1ed801f2cfc8fc36e5 100644 +--- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java ++++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +@@ -370,8 +370,8 @@ public final class ChunkGeneratorAbstract extends ChunkGenerator { + BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); + int i = ichunkaccess.getPos().d(); + int j = ichunkaccess.getPos().e(); +- int k = this.h.f(); +- int l = this.x - 1 - this.h.e(); ++ int k = this.h.f(); final int floorHeight = k; // Paper ++ int l = this.x - 1 - this.h.e(); final int roofHeight = l; // Paper + boolean flag = true; + boolean flag1 = l + 4 >= 0 && l < this.x; + boolean flag2 = k + 4 >= 0 && k < this.x; +@@ -385,7 +385,7 @@ public final class ChunkGeneratorAbstract extends ChunkGenerator { + + if (flag1) { + for (i1 = 0; i1 < 5; ++i1) { +- if (i1 <= random.nextInt(5)) { ++ if (i1 <= (ichunkaccess.generateFlatBedrock() ? roofHeight : random.nextInt(5))) { // Paper - Configurable flat bedrock roof + ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), l - i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false); + } + } +@@ -393,7 +393,7 @@ public final class ChunkGeneratorAbstract extends ChunkGenerator { + + if (flag2) { + for (i1 = 4; i1 >= 0; --i1) { +- if (i1 <= random.nextInt(5)) { ++ if (i1 <= (ichunkaccess.generateFlatBedrock() ? floorHeight : random.nextInt(5))) { // Paper - Configurable flat bedrock floor + ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), k + i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false); + } + } +diff --git a/src/main/java/net/minecraft/server/IChunkAccess.java b/src/main/java/net/minecraft/server/IChunkAccess.java +index 3adb35b6abd0df9617e27e10fa3e0d365958ba42..930cd8106412b362650c77a69ea5f945043c92c7 100644 +--- a/src/main/java/net/minecraft/server/IChunkAccess.java ++++ b/src/main/java/net/minecraft/server/IChunkAccess.java +@@ -12,6 +12,18 @@ import org.apache.logging.log4j.LogManager; + + public interface IChunkAccess extends IBlockAccess, IStructureAccess { + ++ // Paper start ++ default boolean generateFlatBedrock() { ++ if (this instanceof ProtoChunk) { ++ return ((ProtoChunk)this).world.paperConfig.generateFlatBedrock; ++ } else if (this instanceof Chunk) { ++ return ((Chunk)this).world.paperConfig.generateFlatBedrock; ++ } else { ++ return false; ++ } ++ } ++ // Paper end ++ + IBlockData getType(final int x, final int y, final int z); // Paper + @Nullable + IBlockData setType(BlockPosition blockposition, IBlockData iblockdata, boolean flag); +diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java +index a60b414cdf70096e667e776ab4fd36e411f8ff12..3b03c28ee5de1481e1f8088c0e4d388778155fad 100644 +--- a/src/main/java/net/minecraft/server/ProtoChunk.java ++++ b/src/main/java/net/minecraft/server/ProtoChunk.java +@@ -46,7 +46,7 @@ public class ProtoChunk implements IChunkAccess { + private long s; + private final Map t; + private volatile boolean u; +- private final World world; // Paper - Anti-Xray - Add world ++ final World world; // Paper - Anti-Xray - Add world // Paper - private -> default + + // Paper start - Anti-Xray - Add world + @Deprecated public ProtoChunk(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter) { this(chunkcoordintpair, chunkconverter, null); } // Notice for updates: Please make sure this constructor isn't used anywhere diff --git a/Spigot-Server-Patches/0402-Fix-MC-161754.patch b/Spigot-Server-Patches/0387-Fix-MC-161754.patch similarity index 91% rename from Spigot-Server-Patches/0402-Fix-MC-161754.patch rename to Spigot-Server-Patches/0387-Fix-MC-161754.patch index 9ba10c6d76..bab48dada7 100644 --- a/Spigot-Server-Patches/0402-Fix-MC-161754.patch +++ b/Spigot-Server-Patches/0387-Fix-MC-161754.patch @@ -9,7 +9,7 @@ We can use an entity valid check since this method is invoked for each inventory iteraction (thanks to CB) and on player tick (vanilla). diff --git a/src/main/java/net/minecraft/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java -index c95ce0124d948626732e796c386b7544e34b36c4..18e1ae7f0a4b06ec7d7400e791ac79e5192eb8d8 100644 +index 82109f50778a3ac4bea43ef83b5442105a45664a..ebaf45be997d121e1974dc1f920dccbf11744cb3 100644 --- a/src/main/java/net/minecraft/server/ContainerHorse.java +++ b/src/main/java/net/minecraft/server/ContainerHorse.java @@ -76,7 +76,7 @@ public class ContainerHorse extends Container { diff --git a/Spigot-Server-Patches/0403-Performance-improvement-for-Chunk.getEntities.patch b/Spigot-Server-Patches/0388-Performance-improvement-for-Chunk.getEntities.patch similarity index 90% rename from Spigot-Server-Patches/0403-Performance-improvement-for-Chunk.getEntities.patch rename to Spigot-Server-Patches/0388-Performance-improvement-for-Chunk.getEntities.patch index e58b04f559..d166242db6 100644 --- a/Spigot-Server-Patches/0403-Performance-improvement-for-Chunk.getEntities.patch +++ b/Spigot-Server-Patches/0388-Performance-improvement-for-Chunk.getEntities.patch @@ -10,10 +10,10 @@ operation. This patch will reduce the load of plugins which for example implement custom moblimits and depend on Chunk.getEntities(). diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 47f1b970b9ba39f9050ac34a5ac15593c25f8a70..39ef95cbbb1d1d049354ae1e8991309e918d0462 100644 +index cccb8f7b1c13811db7203282a5caad3da5b69a09..01bf7320b5cbc38e278ca907aa324ee3e945805e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -111,14 +111,14 @@ public class CraftChunk implements Chunk { +@@ -113,14 +113,14 @@ public class CraftChunk implements Chunk { Entity[] entities = new Entity[count]; for (int i = 0; i < 16; i++) { diff --git a/Spigot-Server-Patches/0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0389-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 90% rename from Spigot-Server-Patches/0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to Spigot-Server-Patches/0389-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch index f136189c97..85944b591c 100644 --- a/Spigot-Server-Patches/0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch +++ b/Spigot-Server-Patches/0389-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 5aea49404717061fce4bf24e91f36217db5cee83..c030ff7b34fdd4c4632714a800935a6a5f8082cb 100644 +index abf285be2b71a93681f06879177f03c0f5fdff1a..84c6dfcd87d9d893e846c08c9d14e01fbfb15fb2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1850,7 +1850,12 @@ public class CraftWorld implements World { +@@ -1860,7 +1860,12 @@ public class CraftWorld implements World { height = 9; } diff --git a/Spigot-Server-Patches/0405-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0390-Expose-the-internal-current-tick.patch similarity index 81% rename from Spigot-Server-Patches/0405-Expose-the-internal-current-tick.patch rename to Spigot-Server-Patches/0390-Expose-the-internal-current-tick.patch index cb23c2a1b5..f300ee3976 100644 --- a/Spigot-Server-Patches/0405-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0390-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 14cc12d772fe8c879a282275e3ee76cd66047c6b..e8d3528d515754affb14c947109ccdf1739d9745 100644 +index 57eb049e97e184426bf2a4a80232bf1c105196e2..181616c93656e45ec83659e59ac77cedce8af682 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2203,5 +2203,10 @@ public final class CraftServer implements Server { +@@ -2258,5 +2258,10 @@ public final class CraftServer implements Server { } return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name); } diff --git a/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0391-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 80% rename from Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to Spigot-Server-Patches/0391-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 3ab0a3b4d5..49377c8ba3 100644 --- a/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0391-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3db173fb5559e62150192a28dbdccdff16787401..81f00141776a1767b907d14ef04f60b576110128 100644 +index f967f08049d792b1f2542828ed28de9e94949bab..639bca91eec78f772b64677e37d8173e24b57391 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -984,6 +984,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1017,6 +1017,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; @@ -18,10 +18,10 @@ index 3db173fb5559e62150192a28dbdccdff16787401..81f00141776a1767b907d14ef04f60b5 PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3cc9c70882bfb9a933c726b7a194aa3b142034fa..088c82c5379b39f8cebd60465e054b97c96eb983 100644 +index 93d30964fee7117beca92653df62f474730d866e..0b6bb4b2a679c6a3589ce30becbf2af498804aff 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -718,6 +718,8 @@ public abstract class PlayerList { +@@ -760,6 +760,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect)); } diff --git a/Spigot-Server-Patches/0407-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0392-Add-option-to-disable-pillager-patrols.patch similarity index 80% rename from Spigot-Server-Patches/0407-Add-option-to-disable-pillager-patrols.patch rename to Spigot-Server-Patches/0392-Add-option-to-disable-pillager-patrols.patch index 2e175f1978..d11e1de6e9 100644 --- a/Spigot-Server-Patches/0407-Add-option-to-disable-pillager-patrols.patch +++ b/Spigot-Server-Patches/0392-Add-option-to-disable-pillager-patrols.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable pillager patrols diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f6f5f9dea6284582e9a175c0875273ee1db76076..19f355d00ebe7065ae2d2df8156ea4b6459a6598 100644 +index a9d7e81ef123a7da7785a4b8dc868a0e256a61d0..f8a617a62e62d088077712bfb66656c28b82a3c5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -614,4 +614,9 @@ public class PaperWorldConfig { +@@ -577,4 +577,9 @@ public class PaperWorldConfig { private void generatorSettings() { generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); } @@ -19,12 +19,12 @@ index f6f5f9dea6284582e9a175c0875273ee1db76076..19f355d00ebe7065ae2d2df8156ea4b6 + } } diff --git a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java -index 33488b37e4d0dd295e0f48b59c43d30208eb531a..a0f582807605b9cc5bbf31d84907e56fba393e2e 100644 +index e108f14b36b5459503e02146f8c11e5223d6bd61..b1fea06d29a0c98136496d6eff81e6959cb73672 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java +++ b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java -@@ -9,6 +9,7 @@ public class MobSpawnerPatrol { - public MobSpawnerPatrol() {} +@@ -10,6 +10,7 @@ public class MobSpawnerPatrol implements MobSpawner { + @Override public int a(WorldServer worldserver, boolean flag, boolean flag1) { + if (worldserver.paperConfig.disablePillagerPatrols) return 0; // Paper if (!flag) { diff --git a/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 55% rename from Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to Spigot-Server-Patches/0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index 019af38f15..e55c366dd5 100644 --- a/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -7,29 +7,29 @@ Fixes an AssertionError when setting the player's item in hand to null or a new Fixes GH-2718 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 576c9c6ae4339951d4ec9fffa69c7f860d82b33f..4f9255c0bc2ff46f34072846d2b0dc2e97f05db4 100644 +index d44d594b52cd63adcede55fbe6548b758b482c90..17491b9f9b4c8fb931a249580810681cb618ee45 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1891,6 +1891,7 @@ public abstract class EntityLiving extends Entity { - return this.getEquipment(EnumItemSlot.OFFHAND); +@@ -2035,6 +2035,7 @@ public abstract class EntityLiving extends Entity { + return predicate.test(this.getItemInMainHand().getItem()) || predicate.test(this.getItemInOffHand().getItem()); } -+ public ItemStack getItemInHand(EnumHand enumhand) { return this.b(enumhand); } // Paper - OBFHELPER ++ public final ItemStack getItemInHand(EnumHand enumhand) { return this.b(enumhand); } // Paper - OBFHELPER public ItemStack b(EnumHand enumhand) { if (enumhand == EnumHand.MAIN_HAND) { return this.getEquipment(EnumItemSlot.MAINHAND); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ee186ed5a076ede4d89702aeb5a2128d6e7ac8cf..9ba5f9325fe0a7adc3ecf745d52cafe6496bc73f 100644 +index e382315c91540ac24821e432ee31a8244f4f7efa..204eae3abdb006c3006537e6cf8f4c7a0bae2a47 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1438,6 +1438,10 @@ public class PlayerConnection implements PacketListenerPlayIn { - if (cancelled) { +@@ -1477,6 +1477,10 @@ public class PlayerConnection implements PacketListenerPlayIn { this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524 - } else { -+ // Paper start -+ itemstack = this.player.getItemInHand(enumhand); -+ if (itemstack.isEmpty()) return; -+ // Paper end - this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand); + return; } - // CraftBukkit end ++ // Paper start ++ itemstack = this.player.getItemInHand(enumhand); ++ if (itemstack.isEmpty()) return; ++ // Paper end + EnumInteractionResult enuminteractionresult = this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand); + + if (enuminteractionresult.b()) { diff --git a/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch deleted file mode 100644 index 45b933c4b9..0000000000 --- a/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Paul Sauve -Date: Sun, 14 Jul 2019 21:05:03 -0500 -Subject: [PATCH] Do less work if we have a custom Bukkit generator - -If the Bukkit generator already has a spawn, use it immediately instead -of spending time generating one that we won't use - -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index da38293cf02d84f3e24a883136ffe5118a510b5a..135d1211525f499198122e500626ce463c263088 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -814,12 +814,13 @@ public class WorldServer extends World { - } else if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { - this.worldData.setSpawn(BlockPosition.ZERO.up()); - } else { -- WorldChunkManager worldchunkmanager = this.getChunkProvider().getChunkGenerator().getWorldChunkManager(); -- List list = worldchunkmanager.a(); -- Random random = new Random(this.getSeed()); -- BlockPosition blockposition = worldchunkmanager.a(0, this.getSeaLevel(), 0, 256, list, random); -- ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); -- -+// Paper start - moved down -+// WorldChunkManager worldchunkmanager = this.getChunkProvider().getChunkGenerator().getWorldChunkManager(); -+// List list = worldchunkmanager.a(); -+// Random random = new Random(this.getSeed()); -+// BlockPosition blockposition = worldchunkmanager.a(0, this.getSeaLevel(), 0, 256, list, random); -+// ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); -+// Paper end - // CraftBukkit start - if (this.generator != null) { - Random rand = new Random(this.getSeed()); -@@ -836,6 +837,13 @@ public class WorldServer extends World { - } - // CraftBukkit end - -+ // Paper start - this is useless if craftbukkit returns early -+ WorldChunkManager worldchunkmanager = this.getChunkProvider().getChunkGenerator().getWorldChunkManager(); -+ List list = worldchunkmanager.a(); -+ Random random = new Random(this.getSeed()); -+ BlockPosition blockposition = worldchunkmanager.a(0, this.getSeaLevel(), 0, 256, list, random); -+ ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); -+ // Paper end - if (blockposition == null) { - WorldServer.LOGGER.warn("Unable to find spawn biome"); - } diff --git a/Spigot-Server-Patches/0409-PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/0394-PlayerLaunchProjectileEvent.patch similarity index 82% rename from Spigot-Server-Patches/0409-PlayerLaunchProjectileEvent.patch rename to Spigot-Server-Patches/0394-PlayerLaunchProjectileEvent.patch index d5773b74c1..cf650d9db4 100644 --- a/Spigot-Server-Patches/0409-PlayerLaunchProjectileEvent.patch +++ b/Spigot-Server-Patches/0394-PlayerLaunchProjectileEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent diff --git a/src/main/java/net/minecraft/server/InteractionResultWrapper.java b/src/main/java/net/minecraft/server/InteractionResultWrapper.java -index 5cab47a2821adf869693132f8ce1193b1543f896..886babdcda0b559fc6a760b48074bec44e0f9da1 100644 +index d59a0b739c0b8787029969a14002042e5c288ae8..8b2fc1c0e608c911b2cdc95ef134f84e3760c05d 100644 --- a/src/main/java/net/minecraft/server/InteractionResultWrapper.java +++ b/src/main/java/net/minecraft/server/InteractionResultWrapper.java @@ -10,6 +10,7 @@ public class InteractionResultWrapper { @@ -17,7 +17,7 @@ index 5cab47a2821adf869693132f8ce1193b1543f896..886babdcda0b559fc6a760b48074bec4 return this.a; } diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java -index 6fccd70a034b5d70729f57e0f2ee56e59e6f9cbc..16f1b734e01ee7cf917d2f9a4a4dc1e98e4f2af9 100644 +index f028cb04d692f848a4682aa2eeac2174eb0f6769..6ddb0237c013e5c40d6c28a300f33443f6f703a5 100644 --- a/src/main/java/net/minecraft/server/ItemEgg.java +++ b/src/main/java/net/minecraft/server/ItemEgg.java @@ -16,21 +16,35 @@ public class ItemEgg extends Item { @@ -49,7 +49,7 @@ index 6fccd70a034b5d70729f57e0f2ee56e59e6f9cbc..16f1b734e01ee7cf917d2f9a4a4dc1e9 + + } - world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F)); // CraftBukkit - from above + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.RANDOM.nextFloat() * 0.4F + 0.8F)); // CraftBukkit - from above + /* // Paper start - moved up entityhuman.b(StatisticList.ITEM_USED.b(this)); @@ -58,10 +58,10 @@ index 6fccd70a034b5d70729f57e0f2ee56e59e6f9cbc..16f1b734e01ee7cf917d2f9a4a4dc1e9 } + */ // Paper end - return InteractionResultWrapper.success(itemstack); + return InteractionResultWrapper.a(itemstack, world.s_()); } diff --git a/src/main/java/net/minecraft/server/ItemEnderPearl.java b/src/main/java/net/minecraft/server/ItemEnderPearl.java -index cab869e8e9b6a505e23c109c4434178a8824ba45..b57e9f7e72b892165129c3857d5d03a088bee3ee 100644 +index aa7356e6a18c0bf72314e92809a4eab320d3695f..0e154ee2976694dacf8d41fcd831f21fbbda13af 100644 --- a/src/main/java/net/minecraft/server/ItemEnderPearl.java +++ b/src/main/java/net/minecraft/server/ItemEnderPearl.java @@ -16,22 +16,37 @@ public class ItemEnderPearl extends Item { @@ -91,7 +91,7 @@ index cab869e8e9b6a505e23c109c4434178a8824ba45..b57e9f7e72b892165129c3857d5d03a0 } } -- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemEnderPearl.i.nextFloat() * 0.4F + 0.8F)); +- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemEnderPearl.RANDOM.nextFloat() * 0.4F + 0.8F)); - entityhuman.getCooldownTracker().setCooldown(this, 20); - // CraftBukkit end - @@ -100,7 +100,7 @@ index cab869e8e9b6a505e23c109c4434178a8824ba45..b57e9f7e72b892165129c3857d5d03a0 - itemstack.subtract(1); - } + // Paper start - moved up -+// world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemEnderPearl.i.nextFloat() * 0.4F + 0.8F)); ++// world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemEnderPearl.RANDOM.nextFloat() * 0.4F + 0.8F)); +// entityhuman.getCooldownTracker().setCooldown(this, 20); +// // CraftBukkit end +// @@ -108,20 +108,20 @@ index cab869e8e9b6a505e23c109c4434178a8824ba45..b57e9f7e72b892165129c3857d5d03a0 +// if (!entityhuman.abilities.canInstantlyBuild) { +// itemstack.subtract(1); +// } -+ // Paper end ++ // Paper end - moved up - return InteractionResultWrapper.success(itemstack); + return InteractionResultWrapper.a(itemstack, world.s_()); } diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java -index 071688b3ab45a527a642c3d16c8d8b1f3682e63c..1d575af5269762f6f2616884a7733470cca06be5 100644 +index 07e12714d064a2ccc7a3a50fbb88517f9a3b8b78..10abf20e907f1ea25797ff33d181de7eaed9a9da 100644 --- a/src/main/java/net/minecraft/server/ItemExpBottle.java +++ b/src/main/java/net/minecraft/server/ItemExpBottle.java @@ -15,19 +15,38 @@ public class ItemExpBottle extends Item { public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { ItemStack itemstack = entityhuman.b(enumhand); -- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F)); -+// world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F)); // Paper - moved down +- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.RANDOM.nextFloat() * 0.4F + 0.8F)); ++ //world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.RANDOM.nextFloat() * 0.4F + 0.8F)); // Paper - moved down if (!world.isClientSide) { EntityThrownExpBottle entitythrownexpbottle = new EntityThrownExpBottle(world, entityhuman); @@ -155,28 +155,29 @@ index 071688b3ab45a527a642c3d16c8d8b1f3682e63c..1d575af5269762f6f2616884a7733470 } + */ // Paper end - return InteractionResultWrapper.success(itemstack); + return InteractionResultWrapper.a(itemstack, world.s_()); } diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java -index c19b678cfb2bc3c27858488031e119d482905f8b..7672e31fc0c915c49c8752ba864c2706f1292e86 100644 +index 685d958994bc35ad5eceba629e6743b41e2cc04b..58f7191a6980265e8fab17cf39769bbbca0ee105 100644 --- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java +++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java -@@ -8,7 +8,11 @@ public class ItemLingeringPotion extends ItemPotionThrowable { +@@ -8,7 +8,12 @@ public class ItemLingeringPotion extends ItemPotionThrowable { @Override public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { -- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F)); +- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.RANDOM.nextFloat() * 0.4F + 0.8F)); - return super.a(world, entityhuman, enumhand); + // Paper start + InteractionResultWrapper wrapper = super.a(world, entityhuman, enumhand); -+ if (wrapper.getResult() != EnumInteractionResult.FAIL) -+ world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F)); ++ if (wrapper.getResult() != EnumInteractionResult.FAIL) { ++ world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.RANDOM.nextFloat() * 0.4F + 0.8F)); ++ } + return wrapper; + // Paper end } } diff --git a/src/main/java/net/minecraft/server/ItemPotionThrowable.java b/src/main/java/net/minecraft/server/ItemPotionThrowable.java -index 5d1f118c5139540a809dbaeee0982fbc7e9c3996..d1beab1ab72dffd3ee671982991d414b9244973d 100644 +index dee3d4042b0cd1ace86fe1d80d894d0cc48cf941..9c84de77df7e32915a633b92c842cfb69e30e0d0 100644 --- a/src/main/java/net/minecraft/server/ItemPotionThrowable.java +++ b/src/main/java/net/minecraft/server/ItemPotionThrowable.java @@ -15,13 +15,31 @@ public class ItemPotionThrowable extends ItemPotion { @@ -210,13 +211,13 @@ index 5d1f118c5139540a809dbaeee0982fbc7e9c3996..d1beab1ab72dffd3ee671982991d414b } + */ // Paper end - return InteractionResultWrapper.success(itemstack); + return InteractionResultWrapper.a(itemstack, world.s_()); } diff --git a/src/main/java/net/minecraft/server/ItemSnowball.java b/src/main/java/net/minecraft/server/ItemSnowball.java -index 56ec5089596de4209780a823a2a3f37676ec515b..e6044e654b78ab8ef9d73ef7bd6ad82a079745a8 100644 +index 19ac8cc57d6400e7574dd475dd21f2f48a954324..4242b5c4ed1e7d546fee7e2b3892b7b25e1259ff 100644 --- a/src/main/java/net/minecraft/server/ItemSnowball.java +++ b/src/main/java/net/minecraft/server/ItemSnowball.java -@@ -17,19 +17,27 @@ public class ItemSnowball extends Item { +@@ -17,14 +17,20 @@ public class ItemSnowball extends Item { entitysnowball.setItem(itemstack); entitysnowball.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F); @@ -226,44 +227,35 @@ index 56ec5089596de4209780a823a2a3f37676ec515b..e6044e654b78ab8ef9d73ef7bd6ad82a + com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entitysnowball.getBukkitEntity()); + if (event.callEvent() && world.addEntity(entitysnowball)) { + if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { ++ // Paper end itemstack.subtract(1); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); ++ } else if (entityhuman instanceof EntityPlayer) { // Paper ++ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // Paper } -- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemSnowball.i.nextFloat() * 0.4F + 0.8F)); + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemSnowball.RANDOM.nextFloat() * 0.4F + 0.8F)); - } else if (entityhuman instanceof EntityPlayer) { - ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); -+ entityhuman.b(StatisticList.ITEM_USED.b(this)); -+ } else { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); ++ } else { // Paper ++ if (entityhuman instanceof EntityPlayer) ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // Paper ++ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); // Paper } } // CraftBukkit end - -- entityhuman.b(StatisticList.ITEM_USED.b(this)); -+// entityhuman.b(StatisticList.ITEM_USED.b(this)); // Paper - moved up - // CraftBukkit start - moved up - /* - if (!entityhuman.abilities.canInstantlyBuild) { diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java -index 18bd846ceecf638fa1184a6cceb5c909ec49372c..e71e933fffb04aa4a00d02cfbc284da8ad3ee925 100644 +index 3574cf875c6284687c10637159ec96a823ade2dc..c919a402e80a5c6b17fdbd99e110be1abefda747 100644 --- a/src/main/java/net/minecraft/server/ItemSplashPotion.java +++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java -@@ -8,7 +8,11 @@ public class ItemSplashPotion extends ItemPotionThrowable { +@@ -8,7 +8,12 @@ public class ItemSplashPotion extends ItemPotionThrowable { @Override public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { -- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F)); -- return super.a(world, entityhuman, enumhand); + // Paper start + InteractionResultWrapper wrapper = super.a(world, entityhuman, enumhand); -+ if (wrapper.getResult() != EnumInteractionResult.FAIL) -+ world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F)); ++ if (wrapper.getResult() != EnumInteractionResult.FAIL) { + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.RANDOM.nextFloat() * 0.4F + 0.8F)); +- return super.a(world, entityhuman, enumhand); ++ } + return wrapper; + // Paper end } diff --git a/Spigot-Server-Patches/0410-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0395-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 90% rename from Spigot-Server-Patches/0410-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to Spigot-Server-Patches/0395-Add-CraftMagicNumbers.isSupportedApiVersion.patch index e84521520d..2418e3bb12 100644 --- a/Spigot-Server-Patches/0410-Add-CraftMagicNumbers.isSupportedApiVersion.patch +++ b/Spigot-Server-Patches/0395-Add-CraftMagicNumbers.isSupportedApiVersion.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion() diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 79ddf03c7f3afc868cb73ee4c000fc879ede90d8..6363074c38312387b62e6cf5df2592aefb078f29 100644 +index 9f2903c8623976ae71802ab56ff2e0e3ee9089b7..6e6da966a8c5b40494213f914db5b9449aea4f43 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -314,6 +314,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/Spigot-Server-Patches/0396-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/Spigot-Server-Patches/0396-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch new file mode 100644 index 0000000000..74c0749370 --- /dev/null +++ b/Spigot-Server-Patches/0396-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Callahan +Date: Mon, 13 Jan 2020 23:47:28 -0600 +Subject: [PATCH] Prevent sync chunk loads when villagers try to find beds + + +diff --git a/src/main/java/net/minecraft/server/BehaviorSleep.java b/src/main/java/net/minecraft/server/BehaviorSleep.java +index 77bbe246b225aab41fa193cf63286739118c05f4..615a06497588e07fa2b71194a5836ef6360bf0ca 100644 +--- a/src/main/java/net/minecraft/server/BehaviorSleep.java ++++ b/src/main/java/net/minecraft/server/BehaviorSleep.java +@@ -34,7 +34,8 @@ public class BehaviorSleep extends Behavior { + } + } + +- IBlockData iblockdata = worldserver.getType(globalpos.getBlockPosition()); ++ IBlockData iblockdata = worldserver.getTypeIfLoaded(globalpos.getBlockPosition()); // Paper ++ if (iblockdata == null) { return false; } // Paper + + return globalpos.getBlockPosition().a((IPosition) entityliving.getPositionVector(), 2.0D) && iblockdata.getBlock().a((Tag) TagsBlock.BEDS) && !(Boolean) iblockdata.get(BlockBed.OCCUPIED); + } diff --git a/Spigot-Server-Patches/0413-MC-145656-Fix-Follow-Range-Initial-Target.patch b/Spigot-Server-Patches/0397-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 89% rename from Spigot-Server-Patches/0413-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to Spigot-Server-Patches/0397-MC-145656-Fix-Follow-Range-Initial-Target.patch index 3494a96801..e8540c0cd8 100644 --- a/Spigot-Server-Patches/0413-MC-145656-Fix-Follow-Range-Initial-Target.patch +++ b/Spigot-Server-Patches/0397-MC-145656-Fix-Follow-Range-Initial-Target.patch @@ -5,10 +5,10 @@ Subject: [PATCH] MC-145656 Fix Follow Range Initial Target diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 19f355d00ebe7065ae2d2df8156ea4b6459a6598..a26848df994ffb0dc02d6a6051971439613dd0ba 100644 +index f8a617a62e62d088077712bfb66656c28b82a3c5..5c5a79d0ea00c9c4c2e93d524291f48f92e77857 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -619,4 +619,9 @@ public class PaperWorldConfig { +@@ -582,4 +582,9 @@ public class PaperWorldConfig { private void pillagerSettings() { disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols); } @@ -19,7 +19,7 @@ index 19f355d00ebe7065ae2d2df8156ea4b6459a6598..a26848df994ffb0dc02d6a6051971439 + } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java -index cd17bf2be53a92bcbe9c54794981753153bbef07..b85e67a85d16934c2158621b58701df403a42ff3 100644 +index 25a67f91e487d80d3996cc8b2544fece55059590..c0721c7fe479c8f753b8f48197a70dcd1ecfef5f 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java @@ -25,6 +25,7 @@ public class PathfinderGoalNearestAttackableTarget exten @@ -31,7 +31,7 @@ index cd17bf2be53a92bcbe9c54794981753153bbef07..b85e67a85d16934c2158621b58701df4 @Override diff --git a/src/main/java/net/minecraft/server/PathfinderTargetCondition.java b/src/main/java/net/minecraft/server/PathfinderTargetCondition.java -index c76a43837b443d09c0648d520b045765530d9af9..e35ec2db078cc888333cfdd44e1cd3fda71246da 100644 +index 42859f323ad5a300e0026e86371f5753ab3feab5..3f0b3eab438be921440be91f8a51439ac887c154 100644 --- a/src/main/java/net/minecraft/server/PathfinderTargetCondition.java +++ b/src/main/java/net/minecraft/server/PathfinderTargetCondition.java @@ -80,7 +80,7 @@ public class PathfinderTargetCondition { diff --git a/Spigot-Server-Patches/0414-Optimize-Hoppers.patch b/Spigot-Server-Patches/0398-Optimize-Hoppers.patch similarity index 92% rename from Spigot-Server-Patches/0414-Optimize-Hoppers.patch rename to Spigot-Server-Patches/0398-Optimize-Hoppers.patch index ad789cfbc6..801b3c9e09 100644 --- a/Spigot-Server-Patches/0414-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0398-Optimize-Hoppers.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a26848df994ffb0dc02d6a6051971439613dd0ba..cab503bd5c34d12b38a2f5deed6d3feb9287b370 100644 +index 5c5a79d0ea00c9c4c2e93d524291f48f92e77857..4bfe2fb948ee204f8c5a8c316141904a8a6a8b16 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -624,4 +624,13 @@ public class PaperWorldConfig { +@@ -587,4 +587,13 @@ public class PaperWorldConfig { private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); } @@ -31,7 +31,7 @@ index a26848df994ffb0dc02d6a6051971439613dd0ba..cab503bd5c34d12b38a2f5deed6d3feb + } } diff --git a/src/main/java/net/minecraft/server/IHopper.java b/src/main/java/net/minecraft/server/IHopper.java -index e1aa272e526950e6405221e566cf4299c869a6b2..4da26365ec59ed33e10b55789e535a1c0e7b92a1 100644 +index d891be4115f35c7b9685faa34ce90380e989fb18..54552d181912133577cd2c16c0d54e47d90f59d3 100644 --- a/src/main/java/net/minecraft/server/IHopper.java +++ b/src/main/java/net/minecraft/server/IHopper.java @@ -12,12 +12,13 @@ public interface IHopper extends IInventory { @@ -43,20 +43,20 @@ index e1aa272e526950e6405221e566cf4299c869a6b2..4da26365ec59ed33e10b55789e535a1c World getWorld(); + default BlockPosition getBlockPosition() { return new BlockPosition(getX(), getY(), getZ()); } // Paper +- double x(); ++ double x(); default double getX() { return this.x(); } // Paper - OBFHELPER + - double z(); -+ double z();default double getX() { return z(); } // Paper - OBFHELPER ++ double z(); default double getY() { return this.z(); } // Paper - OBFHELPER - double A(); -+ double A();default double getY() { return A(); } // Paper - OBFHELPER - -- double B(); -+ double B();default double getZ() { return B(); } // Paper - OBFHELPER ++ double A(); default double getZ() { return this.A(); } // Paper - OBFHELPER } diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index d953cdef14a9b62833a35a4fe94a22b5e9b19c2d..d6e43313bf0c678cf78fe77de2f8f4b6f819e3f4 100644 +index a075a41d954836864a5186b383e967a9ac262df8..64150130fa0081786190eada4cd2d1312a51572d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -482,11 +482,12 @@ public final class ItemStack { +@@ -486,11 +486,12 @@ public final class ItemStack { return this.getItem().a(this, entityhuman, entityliving, enumhand); } @@ -65,27 +65,27 @@ index d953cdef14a9b62833a35a4fe94a22b5e9b19c2d..d6e43313bf0c678cf78fe77de2f8f4b6 + public ItemStack cloneItemStack() { return cloneItemStack(false); } // Paper + public ItemStack cloneItemStack(boolean origItem) { // Paper + if (!origItem && this.isEmpty()) { // Paper - return ItemStack.a; + return ItemStack.b; } else { - ItemStack itemstack = new ItemStack(this.getItem(), this.count); + ItemStack itemstack = new ItemStack(origItem ? this.item : this.getItem(), this.count); // Paper - itemstack.d(this.C()); + itemstack.d(this.D()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9450e27e5ce9295d87b95be2797fc27984ca2b0b..8c08a542a97edd76c07ef7d64834bdbd70345876 100644 +index 824c3763a56171ceb5f7163783cd46154b7e181e..9edf1ead68e64cdd3ee3b1256d0f92374f20e9e7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1222,6 +1222,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper + TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit - this.methodProfiler.a(() -> { - return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager()); + + this.methodProfiler.a(() -> { + return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 958279249fdadfe5c2808d2a046636f06c3bd500..a8e64dfdab1e73894144a65c10c15d22f9198d3d 100644 +index 54285237ed5a096b2e46cabd78f7dcd5128133a8..543bbd1610fb2e6df4e8ad7fbf9f2cf9b4c6cbe6 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -62,6 +62,7 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -105,7 +105,7 @@ index 958279249fdadfe5c2808d2a046636f06c3bd500..a8e64dfdab1e73894144a65c10c15d22 this.world.b(this.position, this); if (!this.c.isAir()) { diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 907d088c8691eec5d72836ccda420a7a0703ad22..c755faed4f63884cb6a66bf951104a27dbaf887f 100644 +index a0a3adac3e2bc939b1809c5587929f674f4318a5..728c829c18db4bb25ad4581b485bb8a44300d1b1 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -168,6 +168,160 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -266,8 +266,8 @@ index 907d088c8691eec5d72836ccda420a7a0703ad22..c755faed4f63884cb6a66bf951104a27 + } + // Paper end + - private boolean j() { - IInventory iinventory = this.k(); + private boolean k() { + IInventory iinventory = this.l(); @@ -179,6 +333,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi if (this.b(iinventory, enumdirection)) { @@ -412,15 +412,15 @@ index 907d088c8691eec5d72836ccda420a7a0703ad22..c755faed4f63884cb6a66bf951104a27 + IGNORE_TILE_UPDATES = true; // Paper iinventory1.setItem(i, itemstack); + IGNORE_TILE_UPDATES = false; // Paper - itemstack = ItemStack.a; + itemstack = ItemStack.b; flag = true; } else if (a(itemstack1, itemstack)) { @@ -419,18 +622,24 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi } public static List c(IHopper ihopper) { -- return (List) ihopper.P_().d().stream().flatMap((axisalignedbb) -> { -- return ihopper.getWorld().a(EntityItem.class, axisalignedbb.d(ihopper.z() - 0.5D, ihopper.A() - 0.5D, ihopper.B() - 0.5D), IEntitySelector.a).stream(); +- return (List) ihopper.ac_().d().stream().flatMap((axisalignedbb) -> { +- return ihopper.getWorld().a(EntityItem.class, axisalignedbb.d(ihopper.x() - 0.5D, ihopper.z() - 0.5D, ihopper.A() - 0.5D), IEntitySelector.a).stream(); - }).collect(Collectors.toList()); + // Paper start - Optimize item suck in. remove streams, restore 1.12 checks. Seriously checking the bowl?! + World world = ihopper.getWorld(); @@ -455,10 +455,10 @@ index 907d088c8691eec5d72836ccda420a7a0703ad22..c755faed4f63884cb6a66bf951104a27 if (!list.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index d4cbce3243fe1f4973c9c0ae0dbdab10e3390897..3b394c2726e0fbe595641a022e59c8967d525f82 100644 +index 5ebba482a65cfe6079484a99f016f968c59df8ee..d017904561d093bf8f0061f646a75aa53975be88 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java -@@ -72,12 +72,19 @@ public abstract class TileEntityLootable extends TileEntityContainer { +@@ -77,12 +77,19 @@ public abstract class TileEntityLootable extends TileEntityContainer { @Override public boolean isEmpty() { this.d((EntityHuman) null); @@ -481,10 +481,10 @@ index d4cbce3243fe1f4973c9c0ae0dbdab10e3390897..3b394c2726e0fbe595641a022e59c896 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 045e449c7e411dec7ef415c76c808cda426db652..2beb1374b105381d4467de4989c207339cb5dca1 100644 +index ddd66c2519d67585df06d68612a0c8a8830669ac..9b751727d137316290f363e39993f75293fd0887 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1206,8 +1206,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1133,8 +1133,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return list; } diff --git a/Spigot-Server-Patches/0415-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/0399-PlayerDeathEvent-shouldDropExperience.patch similarity index 81% rename from Spigot-Server-Patches/0415-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-Server-Patches/0399-PlayerDeathEvent-shouldDropExperience.patch index ed6a98ac25..73006a4639 100644 --- a/Spigot-Server-Patches/0415-PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-Server-Patches/0399-PlayerDeathEvent-shouldDropExperience.patch @@ -5,12 +5,12 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 86bbbbaefca9ace5327d8bc2456939eb9ae8966a..8434f10d4c674fbbed40dba86e54f7cad93df642 100644 +index 639bca91eec78f772b64677e37d8173e24b57391..458306bd5585e1b78dec6cbfafba1751c76513a2 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -645,7 +645,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - - this.releaseShoulderEntities(); +@@ -691,7 +691,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + this.eW(); + } // SPIGOT-5478 must be called manually now - this.dropExperience(); + if (event.shouldDropExperience()) this.dropExperience(); // Paper - tie to event diff --git a/Spigot-Server-Patches/0400-Generator-Settings.patch b/Spigot-Server-Patches/0400-Generator-Settings.patch deleted file mode 100644 index 2cbf2fe4f7..0000000000 --- a/Spigot-Server-Patches/0400-Generator-Settings.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Byteflux -Date: Wed, 2 Mar 2016 02:17:54 -0600 -Subject: [PATCH] Generator Settings - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c148a57a9c3d44f2a0a2edfed4f96211745cc3e7..62fe175dc4f00cc9cab6cbd828b57e25740b3793 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -604,4 +604,9 @@ public class PaperWorldConfig { - private void perPlayerMobSpawns() { - perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false); - } -+ -+ public boolean generateFlatBedrock; -+ private void generatorSettings() { -+ generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); -+ } - } -diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -index af81a841428a656bc4c4a23c9dcafb25e4c96ee2..2268fbdd8716233ce8f5a8a68d17a8a460a6685f 100644 ---- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -+++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -@@ -211,8 +211,8 @@ public abstract class ChunkGeneratorAbstract - int i = ichunkaccess.getPos().d(); - int j = ichunkaccess.getPos().e(); - T t0 = this.getSettings(); -- int k = t0.u(); -- int l = t0.t(); -+ int k = t0.u(); final int floorHeight = k; // Paper -+ int l = t0.t(); final int roofHeight = l; // Paper - Iterator iterator = BlockPosition.b(i, 0, j, i + 15, 0, j + 15).iterator(); - - while (iterator.hasNext()) { -@@ -221,7 +221,7 @@ public abstract class ChunkGeneratorAbstract - - if (l > 0) { - for (i1 = l; i1 >= l - 4; --i1) { -- if (i1 >= l - random.nextInt(5)) { -+ if (i1 >= (getWorld().paperConfig.generateFlatBedrock ? roofHeight : l - random.nextInt(5))) { // Paper - Configurable flat bedrock roof - ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false); - } - } -@@ -229,7 +229,7 @@ public abstract class ChunkGeneratorAbstract - - if (k < 256) { - for (i1 = k + 4; i1 >= k; --i1) { -- if (i1 <= k + random.nextInt(5)) { -+ if (i1 <= (getWorld().paperConfig.generateFlatBedrock ? floorHeight : k + random.nextInt(5))) { // Paper - Configurable flat bedrock floor - ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false); - } - } diff --git a/Spigot-Server-Patches/0416-Prevent-bees-loading-chunks-checking-hive-position.patch b/Spigot-Server-Patches/0400-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 82% rename from Spigot-Server-Patches/0416-Prevent-bees-loading-chunks-checking-hive-position.patch rename to Spigot-Server-Patches/0400-Prevent-bees-loading-chunks-checking-hive-position.patch index 5aa65f1fea..8ff6e16636 100644 --- a/Spigot-Server-Patches/0416-Prevent-bees-loading-chunks-checking-hive-position.patch +++ b/Spigot-Server-Patches/0400-Prevent-bees-loading-chunks-checking-hive-position.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java -index b39599654e3e0a1120a37d254c80749ba70b3c15..73e016257847e5654e37ec6dbf8c689c36593216 100644 +index 5cc0a9284ef635aa6cb6f4803c0776cdbbf515a8..dcfd2ea5024be6d4a001fa7437092a7831b36fa7 100644 --- a/src/main/java/net/minecraft/server/EntityBee.java +++ b/src/main/java/net/minecraft/server/EntityBee.java -@@ -386,6 +386,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { +@@ -368,6 +368,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB if (!this.hasHivePos()) { return false; } else { diff --git a/Spigot-Server-Patches/0417-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 82% rename from Spigot-Server-Patches/0417-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch index ed2db84aa9..83a4f9a58f 100644 --- a/Spigot-Server-Patches/0417-Don-t-load-Chunks-from-Hoppers-and-other-things.patch +++ b/Spigot-Server-Patches/0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch @@ -13,21 +13,20 @@ This of course is undesirable, so just return the loaded side as "primary" and treat it as a single chest if the other sides are unloaded diff --git a/src/main/java/net/minecraft/server/DoubleBlockFinder.java b/src/main/java/net/minecraft/server/DoubleBlockFinder.java -index 3cb6e60895637405f163c1fac731926ee2cf0d2c..7a16a3e0e209b254db0ec15212d51fab71c17f60 100644 +index ac46a68f7b0f13b9d936ae872306a229ec4f1a61..89b2b11bf00b656bb23be855b25697e6ac93a0a2 100644 --- a/src/main/java/net/minecraft/server/DoubleBlockFinder.java +++ b/src/main/java/net/minecraft/server/DoubleBlockFinder.java -@@ -21,8 +21,12 @@ public class DoubleBlockFinder { +@@ -21,7 +21,12 @@ public class DoubleBlockFinder { return new DoubleBlockFinder.Result.Single<>(s0); } else { BlockPosition blockposition1 = blockposition.shift((EnumDirection) function1.apply(iblockdata)); - IBlockData iblockdata1 = generatoraccess.getType(blockposition1); -- -+ // Paper start - don't load chunks if the other side of the chest is in unloaded chunk ++ // Paper start + IBlockData iblockdata1 = generatoraccess.getTypeIfLoaded(blockposition1); + if (iblockdata1 == null) { + return new DoubleBlockFinder.Result.Single<>(s0); + } + // Paper end - if (iblockdata1.getBlock() == iblockdata.getBlock()) { - DoubleBlockFinder.BlockType doubleblockfinder_blocktype1 = (DoubleBlockFinder.BlockType) function.apply(iblockdata1); + if (iblockdata1.a(iblockdata.getBlock())) { + DoubleBlockFinder.BlockType doubleblockfinder_blocktype1 = (DoubleBlockFinder.BlockType) function.apply(iblockdata1); diff --git a/Spigot-Server-Patches/0418-Guard-against-serializing-mismatching-chunk-coordina.patch b/Spigot-Server-Patches/0402-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 85% rename from Spigot-Server-Patches/0418-Guard-against-serializing-mismatching-chunk-coordina.patch rename to Spigot-Server-Patches/0402-Guard-against-serializing-mismatching-chunk-coordina.patch index c654bb838c..bcb1842884 100644 --- a/Spigot-Server-Patches/0418-Guard-against-serializing-mismatching-chunk-coordina.patch +++ b/Spigot-Server-Patches/0402-Guard-against-serializing-mismatching-chunk-coordina.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate Should help if something dumb happens diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 34cd09a503bfe617bd50808927bae0ccf43e53fc..fa893b14bcef9bab6891dea2c4375b09d74ac038 100644 +index 4d6e8f987233ca6c5f53d004031c022bb2d43e1e..5b196201c0e35895a04e2a542ef7c753d0c469e1 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -23,6 +23,13 @@ public class ChunkRegionLoader { +@@ -24,6 +24,13 @@ public class ChunkRegionLoader { private static final Logger LOGGER = LogManager.getLogger(); @@ -23,9 +23,9 @@ index 34cd09a503bfe617bd50808927bae0ccf43e53fc..fa893b14bcef9bab6891dea2c4375b09 // Paper start public static final class InProgressChunkHolder { -@@ -48,8 +55,8 @@ public class ChunkRegionLoader { +@@ -49,8 +56,8 @@ public class ChunkRegionLoader { // Paper end - ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); + ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); WorldChunkManager worldchunkmanager = chunkgenerator.getWorldChunkManager(); - NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Level"); - ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(nbttagcompound1.getInt("xPos"), nbttagcompound1.getInt("zPos")); @@ -35,11 +35,11 @@ index 34cd09a503bfe617bd50808927bae0ccf43e53fc..fa893b14bcef9bab6891dea2c4375b09 if (!Objects.equals(chunkcoordintpair, chunkcoordintpair1)) { ChunkRegionLoader.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", chunkcoordintpair, chunkcoordintpair, chunkcoordintpair1); diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java -index 134c76065bf382912e6c28d15449db3f9827f848..25c8b131fec6d9076120bd8ef516b14956a668ec 100644 +index c0d2df8ef3b4d0224ede2b7a4ef4e3f930590209..582a5695bac7d078e3022b8ee70c512c0680d992 100644 --- a/src/main/java/net/minecraft/server/IChunkLoader.java +++ b/src/main/java/net/minecraft/server/IChunkLoader.java -@@ -106,6 +106,13 @@ public class IChunkLoader extends RegionFileCache implements AutoCloseable { - // +@@ -106,6 +106,13 @@ public class IChunkLoader implements AutoCloseable { + public void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException { write(chunkcoordintpair, nbttagcompound); } // Paper OBFHELPER public void write(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException { // Paper - OBFHELPER - (Switched around for safety) + // Paper start @@ -49,6 +49,6 @@ index 134c76065bf382912e6c28d15449db3f9827f848..25c8b131fec6d9076120bd8ef516b149 + + " but compound says coordinate is " + ChunkRegionLoader.getChunkCoordinate(nbttagcompound).toString() + (world == null ? " for an unknown world" : (" for world: " + world))); + } + // Paper end - super.write(chunkcoordintpair, nbttagcompound); + this.regionFileCache.write(chunkcoordintpair, nbttagcompound); if (this.c != null) { synchronized (this.persistentDataLock) { // Paper - Async chunk loading diff --git a/Spigot-Server-Patches/0419-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 57% rename from Spigot-Server-Patches/0419-Optimise-IEntityAccess-getPlayerByUUID.patch rename to Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch index f9ea7f61b5..8087a97ce9 100644 --- a/Spigot-Server-Patches/0419-Optimise-IEntityAccess-getPlayerByUUID.patch +++ b/Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise IEntityAccess#getPlayerByUUID Use the world entity map instead of iterating over all players diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java -index d5c284cdd10d33f5f1b7f456d6a384a44eafb139..4157e50e4d99c029759bffcb48a8d645487554c8 100644 +index 48e8b005bd9589135eff03a110ecce8776ab208a..74d4c28246e7db850e6d993e07a84b2a6ca24ce2 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java +++ b/src/main/java/net/minecraft/server/IEntityAccess.java -@@ -219,6 +219,12 @@ public interface IEntityAccess { +@@ -235,6 +235,12 @@ public interface IEntityAccess { @Nullable default EntityHuman b(UUID uuid) { @@ -23,12 +23,12 @@ index d5c284cdd10d33f5f1b7f456d6a384a44eafb139..4157e50e4d99c029759bffcb48a8d645 EntityHuman entityhuman = (EntityHuman) this.getPlayers().get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3ecc73d021c09fbcad74dd62aced460771f86038..f32e313a6287c8f5d487d4ad7148cac176773228 100644 +index 0dd249f94905c30b5320109a3f0b17cac70def8d..1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -82,6 +82,15 @@ public class WorldServer extends World { - return new Throwable(entity + " Added to world at " + new java.util.Date()); +@@ -173,6 +173,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { } + // Paper end + // Paper start - optimise getPlayerByUUID + @Nullable @@ -39,6 +39,6 @@ index 3ecc73d021c09fbcad74dd62aced460771f86038..f32e313a6287c8f5d487d4ad7148cac1 + } + // Paper end + - // Paper start - Asynchronous IO - public final com.destroystokyo.paper.io.PaperFileIOThread.ChunkDataController poiDataController = new com.destroystokyo.paper.io.PaperFileIOThread.ChunkDataController() { - @Override + // Add env and gen to constructor, WorldData -> WorldDataServer + public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { + super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor diff --git a/Spigot-Server-Patches/0420-Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/0404-Fix-items-not-falling-correctly.patch similarity index 89% rename from Spigot-Server-Patches/0420-Fix-items-not-falling-correctly.patch rename to Spigot-Server-Patches/0404-Fix-items-not-falling-correctly.patch index ac6d68d294..e8f474c064 100644 --- a/Spigot-Server-Patches/0420-Fix-items-not-falling-correctly.patch +++ b/Spigot-Server-Patches/0404-Fix-items-not-falling-correctly.patch @@ -15,10 +15,10 @@ This patch resolves the conflict by offsetting checking an item's move method from Spigot's entity activation range check. diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 507627a29f67c380314d2fa8ee56807ced8ee56a..2926fbb95705f4389ca599c3bf0421267b83d401 100644 +index f2626358d16e8f3d60633283322009e5afacd145..a7860cb4ded3e9f949e6e1a7a2afacd738da756e 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java -@@ -86,7 +86,7 @@ public class EntityItem extends Entity { +@@ -88,7 +88,7 @@ public class EntityItem extends Entity { } } diff --git a/Spigot-Server-Patches/0421-Lag-compensate-eating.patch b/Spigot-Server-Patches/0405-Lag-compensate-eating.patch similarity index 65% rename from Spigot-Server-Patches/0421-Lag-compensate-eating.patch rename to Spigot-Server-Patches/0405-Lag-compensate-eating.patch index 606469d9d6..97c8f1a7b7 100644 --- a/Spigot-Server-Patches/0421-Lag-compensate-eating.patch +++ b/Spigot-Server-Patches/0405-Lag-compensate-eating.patch @@ -7,76 +7,76 @@ When the server is lagging, players will wait longer when eating. Change to also use a time check instead if it passes. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 4f9255c0bc2ff46f34072846d2b0dc2e97f05db4..0ec0ddb7d0e3f25820fe064d75916407cb579eae 100644 +index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad06a19ad8 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -113,7 +113,7 @@ public abstract class EntityLiving extends Entity { +@@ -119,7 +119,7 @@ public abstract class EntityLiving extends Entity { private int jumpTicks; private float bD; public ItemStack activeItem; // Paper - public -- protected int bl; -+ protected int bl; protected final int getEatTimeTicks() { return this.bl; } protected final void setEatTimeTicks(int value) { this.bl = value; } // Paper - OBFHELPER - protected int bm; +- protected int bk; ++ protected int bk; protected final int getEatTimeTicks() { return this.bk; } protected final void setEatTimeTicks(int value) { this.bk = value; } // Paper - OBFHELPER + protected int bl; private BlockPosition bE; - private DamageSource bF; -@@ -2848,6 +2848,10 @@ public abstract class EntityLiving extends Entity { - return ((Byte) this.datawatcher.get(EntityLiving.ao) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND; + private Optional bF; +@@ -3012,6 +3012,11 @@ public abstract class EntityLiving extends Entity { + return ((Byte) this.datawatcher.get(EntityLiving.an) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND; } + // Paper start - lag compensate eating + protected long eatStartTime; + protected int totalEatTimeTicks; + // Paper end - private void o() { ++ + private void u() { if (this.isHandRaised()) { if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) { -@@ -2856,7 +2860,14 @@ public abstract class EntityLiving extends Entity { +@@ -3021,7 +3026,13 @@ public abstract class EntityLiving extends Entity { this.b(this.activeItem, 5); } -- if (--this.bl == 0 && !this.world.isClientSide && !this.activeItem.m()) { -+ +- if (--this.bk == 0 && !this.world.isClientSide && !this.activeItem.m()) { + // Paper start - lag compensate eating + // we add 1 to the expected time to avoid lag compensating when we should not + boolean shouldLagCompensate + = this.activeItem.getItem().isFood() && this.eatStartTime != -1 && (System.nanoTime() - this.eatStartTime) > ((1 + this.totalEatTimeTicks) * 50 * (1000 * 1000)); -+ if ((--this.bl == 0 || shouldLagCompensate) && !this.world.isClientSide && !this.activeItem.m()) { ++ if ((--this.bk == 0 || shouldLagCompensate) && !this.world.isClientSide && !this.activeItem.m()) { + this.setEatTimeTicks(0); + // Paper end - this.q(); + this.s(); } } else { -@@ -2906,7 +2917,10 @@ public abstract class EntityLiving extends Entity { +@@ -3071,7 +3082,10 @@ public abstract class EntityLiving extends Entity { if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag this.activeItem = itemstack; -- this.bl = itemstack.k(); +- this.bk = itemstack.k(); + // Paper start - lag compensate eating -+ this.bl = this.totalEatTimeTicks = itemstack.k(); ++ this.bk = this.totalEatTimeTicks = itemstack.k(); + this.eatStartTime = System.nanoTime(); + // Paper end if (!this.world.isClientSide) { this.c(1, true); this.c(2, enumhand == EnumHand.OFF_HAND); -@@ -2930,7 +2944,10 @@ public abstract class EntityLiving extends Entity { +@@ -3095,7 +3109,10 @@ public abstract class EntityLiving extends Entity { } } else if (!this.isHandRaised() && !this.activeItem.isEmpty()) { - this.activeItem = ItemStack.a; -- this.bl = 0; + this.activeItem = ItemStack.b; +- this.bk = 0; + // Paper start - lag compensate eating -+ this.bl = this.totalEatTimeTicks = 0; ++ this.bk = this.totalEatTimeTicks = 0; + this.eatStartTime = -1L; + // Paper end } } -@@ -3052,7 +3069,10 @@ public abstract class EntityLiving extends Entity { +@@ -3217,7 +3234,10 @@ public abstract class EntityLiving extends Entity { } - this.activeItem = ItemStack.a; -- this.bl = 0; + this.activeItem = ItemStack.b; +- this.bk = 0; + // Paper start - lag compensate eating -+ this.bl = this.totalEatTimeTicks = 0; ++ this.bk = this.totalEatTimeTicks = 0; + this.eatStartTime = -1L; + // Paper end } diff --git a/Spigot-Server-Patches/0422-Optimize-call-to-getFluid-for-explosions.patch b/Spigot-Server-Patches/0406-Optimize-call-to-getFluid-for-explosions.patch similarity index 72% rename from Spigot-Server-Patches/0422-Optimize-call-to-getFluid-for-explosions.patch rename to Spigot-Server-Patches/0406-Optimize-call-to-getFluid-for-explosions.patch index 1657736d45..46956819e7 100644 --- a/Spigot-Server-Patches/0422-Optimize-call-to-getFluid-for-explosions.patch +++ b/Spigot-Server-Patches/0406-Optimize-call-to-getFluid-for-explosions.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Optimize call to getFluid for explosions diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index d99d2defe9916e191ba7a2bfbd94bd72a2f5872a..a353f3d5fa5a5f54335f73584589de3f5cb20d3e 100644 +index 1b738260fb06446713ceab159eb7fa3df70fb611..22a19e761fdec68cc9405988b977021a8b6398eb 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java -@@ -117,7 +117,7 @@ public class Explosion { +@@ -124,7 +124,7 @@ public class Explosion { for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) { BlockPosition blockposition = new BlockPosition(d4, d5, d6); IBlockData iblockdata = this.world.getType(blockposition); - Fluid fluid = this.world.getFluid(blockposition); + Fluid fluid = iblockdata.getFluid(); // Paper + Optional optional = this.k.a(this, this.world, blockposition, iblockdata, fluid); - if (!iblockdata.isAir() || !fluid.isEmpty()) { - float f2 = Math.max(iblockdata.getBlock().getDurability(), fluid.k()); + if (optional.isPresent()) { diff --git a/Spigot-Server-Patches/0423-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/Spigot-Server-Patches/0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 56% rename from Spigot-Server-Patches/0423-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to Spigot-Server-Patches/0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch index a1c44ea4f9..9c065ec6c5 100644 --- a/Spigot-Server-Patches/0423-Fix-last-firework-in-stack-not-having-effects-when-d.patch +++ b/Spigot-Server-Patches/0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch @@ -9,15 +9,15 @@ dispensed. The resulting item would have size == 0 and therefore be convertered to air, hence why the effects disappeared. diff --git a/src/main/java/net/minecraft/server/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java -index b6b7e3c6c973886e35bde0bf10787b62c7f015ca..3af686c7f1e483afd4dbf5e2b27c484e2ef321d0 100644 +index 5432c24919bb5c32ca1eec4c9861ad127f72a60a..660f44975a003ea68ddad59899618485fdaf5487 100644 --- a/src/main/java/net/minecraft/server/IDispenseBehavior.java +++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java -@@ -265,7 +265,7 @@ public interface IDispenseBehavior { +@@ -352,7 +352,7 @@ public interface IDispenseBehavior { } itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); -- EntityFireworks entityfireworks = new EntityFireworks(isourceblock.getWorld(), itemstack, d3, d4, d5, true); -+ EntityFireworks entityfireworks = new EntityFireworks(isourceblock.getWorld(), itemstack1, d3, d4, d5, true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed +- EntityFireworks entityfireworks = new EntityFireworks(isourceblock.getWorld(), itemstack, isourceblock.getX(), isourceblock.getY(), isourceblock.getX(), true); ++ EntityFireworks entityfireworks = new EntityFireworks(isourceblock.getWorld(), itemstack1, isourceblock.getX(), isourceblock.getY(), isourceblock.getX(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed - entityfireworks.shoot(d0, d1, d2, 0.5F, 1.0F); - isourceblock.getWorld().addEntity(entityfireworks); + IDispenseBehavior.a(isourceblock, entityfireworks, enumdirection); + entityfireworks.shoot((double) enumdirection.getAdjacentX(), (double) enumdirection.getAdjacentY(), (double) enumdirection.getAdjacentZ(), 0.5F, 1.0F); diff --git a/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch similarity index 89% rename from Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch rename to Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch index 574d3c7907..36be6d5baa 100644 --- a/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch @@ -14,22 +14,22 @@ Adds flying monsters to control ghast and phantoms Adds villagers as separate config diff --git a/src/main/java/net/minecraft/server/BehaviorController.java b/src/main/java/net/minecraft/server/BehaviorController.java -index a1883eba63e0da420a3cf57b8da6ebdb2afbad80..7c6e687707cdf32638eee41e549818a494cd45ab 100644 +index ae2905b403a63396d9cdc61444586ea5548f2974..5ba4f96eec81dc6552aa195eaf544fe400441458 100644 --- a/src/main/java/net/minecraft/server/BehaviorController.java +++ b/src/main/java/net/minecraft/server/BehaviorController.java -@@ -161,6 +161,7 @@ public class BehaviorController implements MinecraftSeri - }); +@@ -379,6 +379,7 @@ public class BehaviorController { + } + public boolean hasActivity(Activity activity) { return c(activity); } // Paper - OBFHELPER public boolean c(Activity activity) { - return this.g.contains(activity); + return this.j.contains(activity); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fbec89c6d827463ea28036617acaa573c8e11d02..a1245c1f551cbce84b0f3dd3a7349e8585631a82 100644 +index 397ca1f0667ec002829e0d0435bedc6465538e8a..bc162a4f18d1123a2e844f4429ea2c26b632dfe5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -192,6 +192,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -193,6 +193,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; @@ -37,7 +37,7 @@ index fbec89c6d827463ea28036617acaa573c8e11d02..a1245c1f551cbce84b0f3dd3a7349e85 public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one protected int numCollisions = 0; // Paper public void inactiveTick() { } -@@ -553,6 +554,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -576,6 +577,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.recalcPosition(); } else { if (enummovetype == EnumMoveType.PISTON) { @@ -45,8 +45,8 @@ index fbec89c6d827463ea28036617acaa573c8e11d02..a1245c1f551cbce84b0f3dd3a7349e85 vec3d = this.a(vec3d); if (vec3d.equals(Vec3D.a)) { return; -@@ -565,6 +567,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - this.y = Vec3D.a; +@@ -588,6 +590,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.x = Vec3D.a; this.setMot(Vec3D.a); } + // Paper start - ignore movement changes while inactive. @@ -58,17 +58,17 @@ index fbec89c6d827463ea28036617acaa573c8e11d02..a1245c1f551cbce84b0f3dd3a7349e85 + // Paper end vec3d = this.a(vec3d, enummovetype); - Vec3D vec3d1 = this.e(vec3d); -@@ -2769,6 +2778,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return this.am; + Vec3D vec3d1 = this.f(vec3d); +@@ -2695,6 +2704,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + return this.al; } -+ public boolean isPushedByWater() { return this.bM(); } // Paper - OBFHELPER - the below is not an obfhelper, don't use it! - public boolean bM() { ++ public boolean isPushedByWater() { return this.bU(); } // Paper - OBFHELPER - the below is not an obfhelper, don't use it! + public boolean bU() { // Paper start return this.pushedByWater(); diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java -index b40c8d2f83a80bcb8925632a1e7d6bb4cc0caebf..4eda130750ff4903c3dc7d2afae09b8b77ff62b9 100644 +index c94197a50269622e8995685119bac984c45e6833..11d384729326af693a9a679195acbd594227466a 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -7,6 +7,7 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -80,19 +80,19 @@ index b40c8d2f83a80bcb8925632a1e7d6bb4cc0caebf..4eda130750ff4903c3dc7d2afae09b8b protected EntityCreature(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 6d53254f8381f3a957673930c7fdf42d4b9d2f36..5aca7a9131787415fb2edba1ebec9601e8a56d3a 100644 +index 081baca9a101d188e4810d04f69811d52de7a107..9f6f2caf25825bb135037c6205cb578dd375b9f8 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -46,7 +46,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -47,7 +47,7 @@ public abstract class EntityInsentient extends EntityLiving { public MinecraftKey lootTableKey; public long lootTableSeed; @Nullable - private Entity leashHolder; -+ public Entity leashHolder; // Paper - private int bF; ++ public Entity leashHolder; // Paper - private -> public + private int bE; @Nullable - private NBTTagCompound bG; -@@ -114,6 +114,17 @@ public abstract class EntityInsentient extends EntityLiving { + private NBTTagCompound bF; +@@ -128,6 +128,17 @@ public abstract class EntityInsentient extends EntityLiving { return this.lookController; } @@ -111,35 +111,35 @@ index 6d53254f8381f3a957673930c7fdf42d4b9d2f36..5aca7a9131787415fb2edba1ebec9601 if (this.isPassenger() && this.getVehicle() instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) this.getVehicle(); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 0ec0ddb7d0e3f25820fe064d75916407cb579eae..bbe72ac65b7a9cfdfd577a0fbc316fbcc84fac59 100644 +index 3d30dcfdf124ff634afff3db17375bad06a19ad8..27b92664cee1c685b5b6b9b385150bb5fdb9fa7a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -91,7 +91,7 @@ public abstract class EntityLiving extends Entity { - protected float aV; - protected int aW; protected int getKillCount() { return this.aW; } // Paper - OBFHELPER +@@ -97,7 +97,7 @@ public abstract class EntityLiving extends Entity { + protected float aU; + protected int aV; protected int getKillCount() { return this.aV; } // Paper - OBFHELPER public float lastDamage; - protected boolean jumping; -+ public boolean jumping; // Paper ++ public boolean jumping; // Paper protected -> public + public float aY; public float aZ; public float ba; - public float bb; diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java -index 6d4d41c88c206ad63f3733b5c8b3f23eb40dde52..193dbfc5f684bfe46f69cb2ab2c52dbb44707792 100644 +index 7ce3421696fbfc5a445f879dfd55a3055502a933..4fe769c761949c40bbb923cde5dfe1709843921f 100644 --- a/src/main/java/net/minecraft/server/EntityLlama.java +++ b/src/main/java/net/minecraft/server/EntityLlama.java -@@ -382,6 +382,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn - return this.bK != null; - } - -+ public boolean inCaravan() { return this.fd(); } // Paper - OBFHELPER - public boolean fd() { +@@ -404,6 +404,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn return this.bJ != null; } + ++ public final boolean inCaravan() { return this.fD(); } // Paper - OBFHELPER + public boolean fD() { + return this.bI != null; + } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 6e0020ae0b4d2f2597843129b83fff0d194de337..b3462576469f67dca618c54bb35fd53454afcd1f 100644 +index a23c8d54a30a1ed1a3ed4d158da08229f59ca4c5..8d3811ead268635c4b728f5c9b8dd6c9b8ec6124 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -135,17 +135,30 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -144,18 +144,29 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @Override public void inactiveTick() { // SPIGOT-3874, SPIGOT-3894, SPIGOT-3846, SPIGOT-5286 :( @@ -148,14 +148,14 @@ index 6e0020ae0b4d2f2597843129b83fff0d194de337..b3462576469f67dca618c54bb35fd534 + // Paper start + if (this.getUnhappy() > 0) { + this.setUnhappy(this.getUnhappy() - 1); -+ } + } + if (this.doAITick()) { + if (world.spigotConfig.tickInactiveVillagers) { + this.mobTick(); + } else { + this.mobTick(true); + } - } ++ } + doReputationTick(); + // Paper end + @@ -163,62 +163,61 @@ index 6e0020ae0b4d2f2597843129b83fff0d194de337..b3462576469f67dca618c54bb35fd534 } // Spigot End -- @Override + @Override - protected void mobTick() { -+ @Override // Paper start - tick trades while inactive + protected void mobTick() { mobTick(false); } + protected void mobTick(boolean inactive) { -+ // Paper end - this.world.getMethodProfiler().enter("brain"); + this.world.getMethodProfiler().enter("villagerBrain"); - this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error +- this.world.getMethodProfiler().exit(); + if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper - this.world.getMethodProfiler().exit(); - if (!this.et() && this.bB > 0) { - --this.bB; -@@ -165,7 +178,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - this.bD = null; + if (this.bM) { + this.bM = false; + } +@@ -178,7 +189,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + this.bC = null; } - if (!this.isNoAI() && this.random.nextInt(100) == 0) { + if (!inactive && !this.isNoAI() && this.random.nextInt(100) == 0) { // Paper - Raid raid = ((WorldServer) this.world).c_(new BlockPosition(this)); + Raid raid = ((WorldServer) this.world).c_(this.getChunkCoordinates()); if (raid != null && raid.v() && !raid.a()) { -@@ -176,6 +189,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - if (this.getVillagerData().getProfession() == VillagerProfession.NONE && this.et()) { - this.ey(); +@@ -189,6 +200,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + if (this.getVillagerData().getProfession() == VillagerProfession.NONE && this.eO()) { + this.eT(); } + if (inactive) return; // Paper super.mobTick(); } -@@ -819,6 +833,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -820,6 +832,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation } } -+ private void doReputationTick() { fa(); } // Paper - OBFHELPER - private void fa() { ++ private void doReputationTick() { fv(); } // Paper - OBFHELPER + private void fv() { long i = this.world.getTime(); diff --git a/src/main/java/net/minecraft/server/EntityVillagerAbstract.java b/src/main/java/net/minecraft/server/EntityVillagerAbstract.java -index 9b75c67c72bc2837cf12bf7ef8172031831deb6e..463528532026e9757431a90cc2540af0f7903faf 100644 +index b2ea467f26f78d3239062c6c3b9741b87489713e..81823b5d5ef17479583fda0121c95091175fdf1e 100644 --- a/src/main/java/net/minecraft/server/EntityVillagerAbstract.java +++ b/src/main/java/net/minecraft/server/EntityVillagerAbstract.java -@@ -43,10 +43,12 @@ public abstract class EntityVillagerAbstract extends EntityAgeable implements NP +@@ -45,10 +45,12 @@ public abstract class EntityVillagerAbstract extends EntityAgeable implements NP return super.prepare(generatoraccess, difficultydamagescaler, enummobspawn, (GroupDataEntity) groupdataentity, nbttagcompound); } -+ public final int getUnhappy() { return eq(); } // Paper - OBFHELPER - public int eq() { - return (Integer) this.datawatcher.get(EntityVillagerAbstract.bx); ++ public final int getUnhappy() { return eL(); } // Paper - OBFHELPER + public int eL() { + return (Integer) this.datawatcher.get(EntityVillagerAbstract.bw); } + public final void setUnhappy(int i) { s(i); } // Paper - OBFHELPER public void s(int i) { - this.datawatcher.set(EntityVillagerAbstract.bx, i); + this.datawatcher.set(EntityVillagerAbstract.bw, i); } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java -index f22f12eeb0b10d038fcd74cc4b19e888b134c3c7..bdb90a346639db37d3c72359c28b72d021d1b389 100644 +index d9454448119a3c1590b7f9ef141dccf10d4742cc..384300894d19ff70556c23b130c01b2e49aa3f20 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoal.java +++ b/src/main/java/net/minecraft/server/PathfinderGoal.java @@ -20,7 +20,10 @@ public abstract class PathfinderGoal { @@ -234,7 +233,7 @@ index f22f12eeb0b10d038fcd74cc4b19e888b134c3c7..bdb90a346639db37d3c72359c28b72d0 public void e() {} diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java -index 41fb166ce0ab29148ebd40e147fef98d1a2e9609..e93129f0b281e242383e36c99d19f6b0577a0b6b 100644 +index b0e17a5764ae4668ef45c4b5e8fe7280b3f5bfdf..3e26c32d0c886c6bd70aa4823d8738cdde7a6b24 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java @@ -4,12 +4,12 @@ import java.util.EnumSet; @@ -267,7 +266,7 @@ index 41fb166ce0ab29148ebd40e147fef98d1a2e9609..e93129f0b281e242383e36c99d19f6b0 public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int i, int j) { this.e = BlockPosition.ZERO; @@ -100,6 +107,7 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal { - blockposition_mutableblockposition.g(blockposition).e(i1, k - 1, j1); + blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, i1, k - 1, j1); if (this.a.a((BlockPosition) blockposition_mutableblockposition) && this.a(this.a.world, blockposition_mutableblockposition)) { this.e = blockposition_mutableblockposition; + setTarget(blockposition_mutableblockposition.immutableCopy()); // Paper @@ -275,24 +274,24 @@ index 41fb166ce0ab29148ebd40e147fef98d1a2e9609..e93129f0b281e242383e36c99d19f6b0 } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -index 44bb18c5945b69f09b3a6e6272f2c3a5477780c7..935136771e776fe498f608a159a41393340adc4e 100644 +index 482ce2cd8123252110508e8e03aa65afdd533e0a..b18e53220d8dbd50723c4201231091cbe4f4119a 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -@@ -24,10 +24,11 @@ public class PathfinderGoalSelector { +@@ -25,10 +25,11 @@ public class PathfinderGoalSelector { } }; private final Map c = new EnumMap(PathfinderGoal.Type.class); - private final Set d = Sets.newLinkedHashSet(); -+ private final Set d = Sets.newLinkedHashSet();private Set getTasks() { return d; }// Paper - OBFHELPER - private final GameProfilerFiller e; ++ private final Set d = Sets.newLinkedHashSet(); private Set getTasks() { return d; }// Paper - OBFHELPER + private final Supplier e; private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); - private int g = 3; + private int g = 3;private int getTickRate() { return g; } // Paper - OBFHELPER + private int curRate;private int getCurRate() { return curRate; } private void incRate() { this.curRate++; } // Paper TODO - public PathfinderGoalSelector(GameProfilerFiller gameprofilerfiller) { - this.e = gameprofilerfiller; -@@ -37,6 +38,25 @@ public class PathfinderGoalSelector { + public PathfinderGoalSelector(Supplier supplier) { + this.e = supplier; +@@ -38,6 +39,25 @@ public class PathfinderGoalSelector { this.d.add(new PathfinderGoalWrapped(i, pathfindergoal)); } @@ -319,7 +318,7 @@ index 44bb18c5945b69f09b3a6e6272f2c3a5477780c7..935136771e776fe498f608a159a41393 this.d.stream().filter((pathfindergoalwrapped) -> { return pathfindergoalwrapped.j() == pathfindergoal; diff --git a/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java b/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java -index 5a8c60ad909394413427851db8068ba79c058b63..29657fed75184aee0c89e56f5e642a5d68eda444 100644 +index 50487dbf0ac162d7608b67b4fb50fa7f8bfba69d..04b28555b1bb68536e40bb652613678775337b31 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java @@ -64,6 +64,7 @@ public class PathfinderGoalWrapped extends PathfinderGoal { @@ -331,10 +330,10 @@ index 5a8c60ad909394413427851db8068ba79c058b63..29657fed75184aee0c89e56f5e642a5d return this.c; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2beb1374b105381d4467de4989c207339cb5dca1..0fa2b335db297c6270090d3dd24ced92eab12825 100644 +index 9b751727d137316290f363e39993f75293fd0887..7d13f7a8b7272ad2ac86e706c1b8c7649cccb01c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -76,6 +76,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -81,6 +81,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public long ticksPerMonsterSpawns; public long ticksPerWaterSpawns; public long ticksPerAmbientSpawns; @@ -348,7 +347,7 @@ index 2beb1374b105381d4467de4989c207339cb5dca1..0fa2b335db297c6270090d3dd24ced92 public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 92601c581cffac471872226abeb93ef9aa24f079..d873b8cf3aec01b791565c33b252889f99f181f9 100644 +index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..97af8f8e3c48694c390036bb1455e6d22fcd1c49 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -2,24 +2,34 @@ package org.spigotmc; @@ -593,8 +592,8 @@ index 92601c581cffac471872226abeb93ef9aa24f079..d873b8cf3aec01b791565c33b252889f } if ( !( entity instanceof EntityArrow ) ) { -- if ( !entity.onGround || !entity.passengers.isEmpty() || entity.isPassenger() ) -+ if ( (!entity.onGround && !(entity instanceof EntityFlying)) || !entity.passengers.isEmpty() || entity.isPassenger() ) // Paper +- if ( !entity.isOnGround() || !entity.passengers.isEmpty() || entity.isPassenger() ) ++ if ( (!entity.isOnGround() && !(entity instanceof EntityFlying)) || !entity.passengers.isEmpty() || entity.isPassenger() ) { - return true; + return 10; // Paper @@ -735,7 +734,7 @@ index 92601c581cffac471872226abeb93ef9aa24f079..d873b8cf3aec01b791565c33b252889f isActive = false; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 37ef07338e0e7ebb778b4446c8e7a630f597c7be..69454bc3c51c0d7c6f1b6d1fbcba93322205bab6 100644 +index f0ad5fa235adfd165b8e56be7352568a3b3ae54a..9859e0c964e4d1e7dc7689cb97f40643a8e5cdd7 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/0425-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0409-Add-effect-to-block-break-naturally.patch similarity index 78% rename from Spigot-Server-Patches/0425-Add-effect-to-block-break-naturally.patch rename to Spigot-Server-Patches/0409-Add-effect-to-block-break-naturally.patch index f43e886f86..22dffbdf60 100644 --- a/Spigot-Server-Patches/0425-Add-effect-to-block-break-naturally.patch +++ b/Spigot-Server-Patches/0409-Add-effect-to-block-break-naturally.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add effect to block break naturally diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 16349e8e796c5e7e4e43fb355d4d641df7f41dc9..382b50d37aced746266b618f3f277846728565bd 100644 +index 2e24b75d2b56dc40d05200ddded817d6ae06803c..c50277fb107c562c00f9d803967b4121e427f40e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -606,6 +606,13 @@ public class CraftBlock implements Block { +@@ -619,6 +619,13 @@ public class CraftBlock implements Block { @Override public boolean breakNaturally(ItemStack item) { @@ -22,9 +22,9 @@ index 16349e8e796c5e7e4e43fb355d4d641df7f41dc9..382b50d37aced746266b618f3f277846 // Order matters here, need to drop before setting to air so skulls can get their data net.minecraft.server.IBlockData iblockdata = this.getNMS(); net.minecraft.server.Block block = iblockdata.getBlock(); -@@ -615,6 +622,7 @@ public class CraftBlock implements Block { +@@ -628,6 +635,7 @@ public class CraftBlock implements Block { // Modelled off EntityHuman#hasBlock - if (block != Blocks.AIR && (item == null || iblockdata.getMaterial().isAlwaysDestroyable() || nmsItem.canDestroySpecialBlock(iblockdata))) { + if (block != Blocks.AIR && (item == null || !iblockdata.isAlwaysDestroyable() || nmsItem.canDestroySpecialBlock(iblockdata))) { net.minecraft.server.Block.dropItems(iblockdata, world.getMinecraftWorld(), position, world.getTileEntity(position), null, nmsItem); + if (triggerEffect) world.triggerEffect(org.bukkit.Effect.STEP_SOUND.getId(), position, net.minecraft.server.Block.getCombinedId(block.getBlockData())); // Paper result = true; diff --git a/Spigot-Server-Patches/0426-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0410-Tracking-Range-Improvements.patch similarity index 95% rename from Spigot-Server-Patches/0426-Tracking-Range-Improvements.patch rename to Spigot-Server-Patches/0410-Tracking-Range-Improvements.patch index 01f06e48be..f5237e2f23 100644 --- a/Spigot-Server-Patches/0426-Tracking-Range-Improvements.patch +++ b/Spigot-Server-Patches/0410-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index c20acd86beb8f28345d1359d0a2b68b7d8e0e410..4ba661c5a89bebe29c8802387bc93c10094b7606 100644 +index f7e57fd1ce5881c056c104d5a6a9a74e34e3ffc3..fe3aab87de4e1eb60b19352499790fd9b571e169 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1702,6 +1702,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1735,6 +1735,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getEntityType().getChunkRange() * 16; diff --git a/Spigot-Server-Patches/0428-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch similarity index 63% rename from Spigot-Server-Patches/0428-Fix-items-vanishing-through-end-portal.patch rename to Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch index 467cd1e040..01ffc4d1e4 100644 --- a/Spigot-Server-Patches/0428-Fix-items-vanishing-through-end-portal.patch +++ b/Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch @@ -13,18 +13,16 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a1245c1f551cbce84b0f3dd3a7349e8585631a82..83e0af493c0f4037ff3e625ee93b9422863f335f 100644 +index bc162a4f18d1123a2e844f4429ea2c26b632dfe5..6cfbece5cbb6effb843f54e9917a755e2a9df4c5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2613,6 +2613,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2532,6 +2532,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (blockposition == null) { // CraftBukkit - if (dimensionmanager1.getType() == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) { // CraftBukkit + if (this.world.getDimensionKey() == World.THE_END && worldserver.getDimensionKey() == World.OVERWORLD) { + // Paper start - Ensure spawn chunk is always loaded before calculating Y coordinate -+ if (!worldserver1.isLoaded(worldserver1.getSpawn())) { -+ worldserver1.getChunkAtWorldCoords(worldserver1.getSpawn()); -+ } ++ this.world.getChunkAtWorldCoords(this.world.getSpawn()); + // Paper end // CraftBukkit start - EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver1, worldserver1.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver1.getSpawn()), 0); + EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver, worldserver.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver.getSpawn()), 0); if (event == null) { diff --git a/Spigot-Server-Patches/0411-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/Spigot-Server-Patches/0411-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch deleted file mode 100644 index 7535c03fa5..0000000000 --- a/Spigot-Server-Patches/0411-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Callahan -Date: Mon, 13 Jan 2020 23:47:28 -0600 -Subject: [PATCH] Prevent sync chunk loads when villagers try to find beds - - -diff --git a/src/main/java/net/minecraft/server/BehaviorSleep.java b/src/main/java/net/minecraft/server/BehaviorSleep.java -index fa575dde1924d840b966791aab8553108a877be4..dfe0f66500ab2ea733fd5ef84d7d80f32e2dfaab 100644 ---- a/src/main/java/net/minecraft/server/BehaviorSleep.java -+++ b/src/main/java/net/minecraft/server/BehaviorSleep.java -@@ -31,7 +31,8 @@ public class BehaviorSleep extends Behavior { - if (optional.isPresent() && worldserver.getTime() - ((MinecraftSerializableLong) optional.get()).a() < 100L) { - return false; - } else { -- IBlockData iblockdata = worldserver.getType(globalpos.getBlockPosition()); -+ IBlockData iblockdata = worldserver.getTypeIfLoaded(globalpos.getBlockPosition()); // Paper -+ if(iblockdata == null) return false; // Paper - - return globalpos.getBlockPosition().a((IPosition) entityliving.getPositionVector(), 2.0D) && iblockdata.getBlock().a(TagsBlock.BEDS) && !(Boolean) iblockdata.get(BlockBed.OCCUPIED); - } diff --git a/Spigot-Server-Patches/0430-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 84% rename from Spigot-Server-Patches/0430-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch index f20d611888..80436106a1 100644 --- a/Spigot-Server-Patches/0430-Bees-get-gravity-in-void.-Fixes-MC-167279.patch +++ b/Spigot-Server-Patches/0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279 diff --git a/src/main/java/net/minecraft/server/ControllerMove.java b/src/main/java/net/minecraft/server/ControllerMove.java -index 7e3671dae6194a9caad68054fb61c9e441b2d538..a5c4cbb67f030760e64e75e618285bd98083c5b5 100644 +index f2d2d04fe16bc091a971c8c90db56e6cd2799555..ac6f9d9e5252b819f91703ad6aeaae3d580eeca0 100644 --- a/src/main/java/net/minecraft/server/ControllerMove.java +++ b/src/main/java/net/minecraft/server/ControllerMove.java @@ -2,7 +2,7 @@ package net.minecraft.server; @@ -18,7 +18,7 @@ index 7e3671dae6194a9caad68054fb61c9e441b2d538..a5c4cbb67f030760e64e75e618285bd9 protected double c; protected double d; diff --git a/src/main/java/net/minecraft/server/ControllerMoveFlying.java b/src/main/java/net/minecraft/server/ControllerMoveFlying.java -index 2b6ac2eeb0fdf35e75c35144941d7fb82cb8adc1..0496c0c5dbbcf89461c947881129673fa4f33e42 100644 +index d3507b3852f02bf35bda35a13db66d5375325000..bafcb780f520db562e4a834400b789f60b563597 100644 --- a/src/main/java/net/minecraft/server/ControllerMoveFlying.java +++ b/src/main/java/net/minecraft/server/ControllerMoveFlying.java @@ -12,7 +12,7 @@ public class ControllerMoveFlying extends ControllerMove { @@ -31,10 +31,10 @@ index 2b6ac2eeb0fdf35e75c35144941d7fb82cb8adc1..0496c0c5dbbcf89461c947881129673f this.h = ControllerMove.Operation.WAIT; this.a.setNoGravity(true); diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java -index 73e016257847e5654e37ec6dbf8c689c36593216..c7d79efdf6ee3b1ac910ff48bfd4b0ef084b4d43 100644 +index dcfd2ea5024be6d4a001fa7437092a7831b36fa7..b9e01e4d9e64fdec4c4f04f1808eb8832bd00c8e 100644 --- a/src/main/java/net/minecraft/server/EntityBee.java +++ b/src/main/java/net/minecraft/server/EntityBee.java -@@ -36,7 +36,17 @@ public class EntityBee extends EntityAnimal implements EntityBird { +@@ -37,7 +37,17 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB public EntityBee(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -51,5 +51,5 @@ index 73e016257847e5654e37ec6dbf8c689c36593216..c7d79efdf6ee3b1ac910ff48bfd4b0ef + }; + // Paper end this.lookController = new EntityBee.j(this); + this.a(PathType.DANGER_FIRE, -1.0F); this.a(PathType.WATER, -1.0F); - this.a(PathType.COCOA, -1.0F); diff --git a/Spigot-Server-Patches/0431-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 89% rename from Spigot-Server-Patches/0431-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 9ac993e609..0ca1c3c83b 100644 --- a/Spigot-Server-Patches/0431-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0413-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 633f12098973857eca04acd2839bb4d453860f1e..e467cd8123dafc46a8c894f1ffa9440de0d45340 100644 +index 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b1977150d73f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -446,6 +446,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 633f12098973857eca04acd2839bb4d453860f1e..e467cd8123dafc46a8c894f1ffa9440d GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); gameprofilerfiller.c("getChunk"); -@@ -496,39 +502,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -497,39 +503,7 @@ public class ChunkProviderServer extends IChunkProvider { if (Thread.currentThread() != this.serverThread) { return null; } else { @@ -65,10 +65,10 @@ index 633f12098973857eca04acd2839bb4d453860f1e..e467cd8123dafc46a8c894f1ffa9440d } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d7ac4c86d170a8d7d816f86ac691c3b5129a20ba..adacff593ee20804b5ddb2df55b66bc6c162dc70 100644 +index 7d13f7a8b7272ad2ac86e706c1b8c7649cccb01c..50848896588e16bf2a498ba28ab30919a081afd5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -266,6 +266,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -319,6 +319,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @Override public Chunk getChunkAt(int i, int j) { diff --git a/Spigot-Server-Patches/0433-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0414-Allow-overriding-the-java-version-check.patch similarity index 90% rename from Spigot-Server-Patches/0433-Allow-overriding-the-java-version-check.patch rename to Spigot-Server-Patches/0414-Allow-overriding-the-java-version-check.patch index f1bc40efc3..d326950c38 100644 --- a/Spigot-Server-Patches/0433-Allow-overriding-the-java-version-check.patch +++ b/Spigot-Server-Patches/0414-Allow-overriding-the-java-version-check.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow overriding the java version check -DPaper.IgnoreJavaVersion=true diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 9b4f01120d473a4fea993a5df952e265b33cde0b..d3463abe89f6e730373cef5e3ac8c0911d0b0963 100644 +index 05b647fbb360910b2961c9276c2928fe71dad90c..5ec16547a20271074d034f7fbcb43e86cb1597e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -175,7 +175,7 @@ public class Main { diff --git a/Spigot-Server-Patches/0434-Add-ThrownEggHatchEvent.patch b/Spigot-Server-Patches/0415-Add-ThrownEggHatchEvent.patch similarity index 89% rename from Spigot-Server-Patches/0434-Add-ThrownEggHatchEvent.patch rename to Spigot-Server-Patches/0415-Add-ThrownEggHatchEvent.patch index 42e3a2e270..5edd2e992d 100644 --- a/Spigot-Server-Patches/0434-Add-ThrownEggHatchEvent.patch +++ b/Spigot-Server-Patches/0415-Add-ThrownEggHatchEvent.patch @@ -7,10 +7,10 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem (dispensers can throw eggs to hatch them, too). diff --git a/src/main/java/net/minecraft/server/EntityEgg.java b/src/main/java/net/minecraft/server/EntityEgg.java -index 970f9109d9bdea5556dc2ac7752860378623ecfa..bdd82d052a2b04744435e5695b4578c7872d8d52 100644 +index 0d5e91a4204c394efcc510d34011f32f2e313ab1..edce89169b3ca2894852087b83a6bf035ba43c3f 100644 --- a/src/main/java/net/minecraft/server/EntityEgg.java +++ b/src/main/java/net/minecraft/server/EntityEgg.java -@@ -52,6 +52,16 @@ public class EntityEgg extends EntityProjectileThrowable { +@@ -55,6 +55,16 @@ public class EntityEgg extends EntityProjectileThrowable { hatchingType = event.getHatchingType(); } diff --git a/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch similarity index 67% rename from Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch rename to Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch index 4b05375b2e..be5febc5c1 100644 --- a/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch @@ -70,39 +70,11 @@ index 0000000000000000000000000000000000000000..3edc8e52e06a62ce9f8cc734fd7458b3 + return fastRandomBounded(this.next(32) & 0xFFFFFFFFL, bound); + } +} -diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index e29ec958b3519d92cda215a50e97e6852d71c684..e40375b67a4a321048c87002a07fde5c5d2395db 100644 ---- a/src/main/java/net/minecraft/server/Block.java -+++ b/src/main/java/net/minecraft/server/Block.java -@@ -109,8 +109,8 @@ public class Block implements IMaterial { - return iblockdata.d(iblockaccess, blockposition, EnumDirection.UP) && this.n < 14; - } - -- @Deprecated -- public boolean d(IBlockData iblockdata) { -+ public final boolean isAir(IBlockData iblockdata) { return this.d(iblockdata); } // Paper - OBFHELPER -+ @Deprecated public boolean d(IBlockData iblockdata) { // Paper - OBFHELPER - return false; - } - -diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java -index 6d351f0979ecfa8e500edf8dd03b4a455fd5d180..a44f65f40d2080b63069602a454266ee6fe6cff7 100644 ---- a/src/main/java/net/minecraft/server/BlockFluids.java -+++ b/src/main/java/net/minecraft/server/BlockFluids.java -@@ -27,7 +27,7 @@ public class BlockFluids extends Block implements IFluidSource { - - @Override - public void b(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { -- worldserver.getFluid(blockposition).b(worldserver, blockposition, random); -+ iblockdata.getFluid().b(worldserver, blockposition, random); // Paper - avoid getType call - } - - @Override diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index a3a376e35eaf17b128048bd26a22eef713e7d535..3fcfe416d26808fa1c9bfdc5b413b149764c544a 100644 +index 37570a3bbb9a36133d012350eca1685cca68c73b..9fb776318c10f393eb6d94e5112c454a7cd246b9 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -452,6 +452,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -402,6 +402,7 @@ public class BlockPosition extends BaseBlockPosition { return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } @@ -111,25 +83,25 @@ index a3a376e35eaf17b128048bd26a22eef713e7d535..3fcfe416d26808fa1c9bfdc5b413b149 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 af9a195f6d0f966133577d00d30e8b4ad812aaeb..cfdf6ea55dedeaf6b96566b72ca0015350c13e92 100644 +index b2713942d8cf5bedd91ac63df18a336743c72da5..a76b1d2fd81aaedb37190bcb8510020d5df2513e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -592,8 +592,8 @@ public class Chunk implements IChunkAccess { +@@ -593,8 +593,8 @@ public class Chunk implements IChunkAccess { this.entities.remove(entity); // Paper } - @Override -- public int a(HeightMap.Type heightmap_type, int i, int j) { -+ public int getHighestBlockY(HeightMap.Type heightmap_type, int i, int j) { return this.a(heightmap_type, i, j) + 1; } // Paper - sort of an obfhelper, but without -1 -+ @Override public int a(HeightMap.Type heightmap_type, int i, int j) { // Paper +- public int getHighestBlock(HeightMap.Type heightmap_type, int i, int j) { ++ public final int getHighestBlockY(HeightMap.Type heightmap_type, int i, int j) { return this.getHighestBlock(heightmap_type, i, j) + 1; } // Paper - sort of an obfhelper, but without -1 ++ @Override public int getHighestBlock(HeightMap.Type heightmap_type, int i, int j) { // Paper return ((HeightMap) this.heightMap.get(heightmap_type)).a(i & 15, j & 15) - 1; } diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index c180d44bed91c86838d3be8c19be954b4412534e..4eb7c1a9b5afced4be79a263e6a918f39c4b51be 100644 +index b168ad8021a5387e05023cd03ec1a69c8a86a233..cf444fa1cc96e881a1f9ed0c78d45935fe1c90ab 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -6,12 +6,14 @@ import javax.annotation.Nullable; +@@ -7,12 +7,14 @@ import javax.annotation.Nullable; public class ChunkSection { public static final DataPalette GLOBAL_PALETTE = new DataPaletteGlobal<>(Block.REGISTRY_ID, Blocks.AIR.getBlockData()); @@ -146,9 +118,9 @@ index c180d44bed91c86838d3be8c19be954b4412534e..4eb7c1a9b5afced4be79a263e6a918f3 // Paper start - Anti-Xray - Add parameters @Deprecated public ChunkSection(int i) { this(i, null, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere public ChunkSection(int i, IChunkAccess chunk, World world, boolean initializeBlocks) { -@@ -66,6 +68,9 @@ public class ChunkSection { +@@ -67,6 +69,9 @@ public class ChunkSection { --this.nonEmptyBlockCount; - if (iblockdata1.q()) { + if (iblockdata1.isTicking()) { --this.tickingBlockCount; + // Paper start + this.tickingList.remove(i, j, k); @@ -156,9 +128,9 @@ index c180d44bed91c86838d3be8c19be954b4412534e..4eb7c1a9b5afced4be79a263e6a918f3 } } -@@ -77,6 +82,9 @@ public class ChunkSection { +@@ -78,6 +83,9 @@ public class ChunkSection { ++this.nonEmptyBlockCount; - if (iblockdata.q()) { + if (iblockdata.isTicking()) { ++this.tickingBlockCount; + // Paper start + this.tickingList.add(i, j, k, iblockdata); @@ -166,7 +138,7 @@ index c180d44bed91c86838d3be8c19be954b4412534e..4eb7c1a9b5afced4be79a263e6a918f3 } } -@@ -112,23 +120,29 @@ public class ChunkSection { +@@ -113,23 +121,29 @@ public class ChunkSection { } public void recalcBlockCounts() { @@ -182,10 +154,10 @@ index c180d44bed91c86838d3be8c19be954b4412534e..4eb7c1a9b5afced4be79a263e6a918f3 if (!iblockdata.isAir()) { - this.nonEmptyBlockCount = (short) (this.nonEmptyBlockCount + i); -+ this.nonEmptyBlockCount = (short) (this.nonEmptyBlockCount + 1); // Paper - if (iblockdata.q()) { ++ this.nonEmptyBlockCount = (short) (this.nonEmptyBlockCount + 1); + if (iblockdata.isTicking()) { - this.tickingBlockCount = (short) (this.tickingBlockCount + i); -+ this.tickingBlockCount = (short) (this.tickingBlockCount + 1); // Paper ++ this.tickingBlockCount = (short) (this.tickingBlockCount + 1); + // Paper start + this.tickingList.add(location, iblockdata); + // Paper end @@ -194,53 +166,39 @@ index c180d44bed91c86838d3be8c19be954b4412534e..4eb7c1a9b5afced4be79a263e6a918f3 if (!fluid.isEmpty()) { - this.nonEmptyBlockCount = (short) (this.nonEmptyBlockCount + i); -+ this.nonEmptyBlockCount = (short) (this.nonEmptyBlockCount + 1); // Paper - if (fluid.h()) { ++ this.nonEmptyBlockCount = (short) (this.nonEmptyBlockCount + 1); + if (fluid.f()) { - this.e = (short) (this.e + i); -+ this.e = (short) (this.e + 1); // Paper ++ this.e = (short) (this.e + 1); } } diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index f9680b6830c77f31e1eb8b6845dd6d58d04f624a..a61cffa3f494be5fea785a573b0faf05b149a30d 100644 +index 48cca2b9a1dbb071615625842123c0c47e281b29..235c9ec37c00ce8838b3e7c02284e402f9d30e38 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java -@@ -127,4 +127,46 @@ public class DataBits { - +@@ -111,4 +111,32 @@ public class DataBits { } + } + + // Paper start + public final void forEach(DataBitConsumer consumer) { -+ // Note: copied from above -+ int i = this.a.length; ++ int i = 0; ++ long[] along = this.b; ++ int j = along.length; + -+ if (i != 0) { -+ int j = 0; -+ long k = this.a[0]; -+ long l = i > 1 ? this.a[1] : 0L; ++ for (int k = 0; k < j; ++k) { ++ long l = along[k]; + -+ for (int i1 = 0; i1 < this.d; ++i1) { -+ int j1 = i1 * this.b; -+ int k1 = j1 >> 6; -+ int l1 = (i1 + 1) * this.b - 1 >> 6; -+ int i2 = j1 ^ k1 << 6; -+ -+ if (k1 != j) { -+ k = l; -+ l = k1 + 1 < i ? this.a[k1 + 1] : 0L; -+ j = k1; -+ } -+ -+ if (k1 == l1) { -+ consumer.accept(i1, (int) (k >>> i2 & this.c)); -+ } else { -+ int j2 = 64 - i2; -+ -+ consumer.accept(i1, (int) ((k >>> i2 | l << j2) & this.c)); ++ for (int i1 = 0; i1 < this.f; ++i1) { ++ consumer.accept(i, (int) (l & this.d)); ++ l >>= this.c; ++ ++i; ++ if (i >= this.e) { ++ return; + } + } -+ + } + } + @@ -253,10 +211,10 @@ index f9680b6830c77f31e1eb8b6845dd6d58d04f624a..a61cffa3f494be5fea785a573b0faf05 + // Paper end } diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index a5ea0e34ec181ad9f98f9ee2f644c3ec1eb1cd3c..81362de5430f9cd045ee7cbefa4a28e4c6bc0457 100644 +index 900b551f6f76862443b09c1e76ad596eda5655f4..1cb45f97b644347d16b66b46113b1e4455004fd3 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java -@@ -278,6 +278,14 @@ public class DataPaletteBlock implements DataPaletteExpandable { +@@ -277,6 +277,14 @@ public class DataPaletteBlock implements DataPaletteExpandable { }); } @@ -272,77 +230,24 @@ index a5ea0e34ec181ad9f98f9ee2f644c3ec1eb1cd3c..81362de5430f9cd045ee7cbefa4a28e4 public interface a { diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index dd02cb3485021c3afd23c2985a71e93c6b0ab07d..b24a5100b452f69f771b724ca96d34613c7fa170 100644 +index 5862e2026b685df80de45c529f1367382a2a60b0..a5cd127c0f133b0ef136f4efad9d71eab2edf8e4 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -29,7 +29,7 @@ public class EntityTurtle extends EntityAnimal { - public final void setHome(BlockPosition pos) { g(pos); } // Paper - OBFHELPER - public void g(BlockPosition blockposition) { -- this.datawatcher.set(EntityTurtle.bx, blockposition); -+ this.datawatcher.set(EntityTurtle.bx, blockposition.immutableCopy()); // Paper - make sure home position can't change + public final void setHome(BlockPosition pos) { setHomePos(pos); } // Paper - OBFHELPER + public void setHomePos(BlockPosition blockposition) { +- this.datawatcher.set(EntityTurtle.bw, blockposition); ++ this.datawatcher.set(EntityTurtle.bw, blockposition.immutableCopy()); // Paper - called with mutablepos... } - - public final BlockPosition getHome() { return this.es(); } // Paper - OBFHELPER -diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 321eae23c575528788b1b575f17593580d6ba737..b19bbbbc81376177751396a2de9452ce1f84c06b 100644 ---- a/src/main/java/net/minecraft/server/IBlockData.java -+++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -22,11 +22,15 @@ public class IBlockData extends BlockDataAbstract implements - private IBlockData.a c; - private final int d; - private final boolean e; -+ private final boolean isAir; // Paper -+ private final boolean isTicking; // Paper - - public IBlockData(Block block, ImmutableMap, Comparable> immutablemap) { - super(block, immutablemap); - this.d = block.a(this); - this.e = block.o(this); -+ this.isAir = this.getBlock().isAir(this); // Paper -+ this.isTicking = this.getBlock().isTicking(this); // Paper - } - - public void c() { -@@ -82,8 +86,8 @@ public class IBlockData extends BlockDataAbstract implements - return this.d; - } - -- public boolean isAir() { -- return this.getBlock().d(this); -+ public final boolean isAir() { // Paper - compile fail if the impl changes -+ return this.isAir; // Paper - improve inlining of isAir - } - - public MaterialMapColor c(IBlockAccess iblockaccess, BlockPosition blockposition) { -@@ -268,12 +272,19 @@ public class IBlockData extends BlockDataAbstract implements - return this.getBlock().a(tag); - } - -+ private Fluid fluidData; // Paper - cache result - public Fluid getFluid() { -- return this.getBlock().a_(this); -+ // Paper start -+ // This can't be done during the constructor, order issues -+ if (this.fluidData != null) { -+ return this.fluidData; -+ } -+ return this.fluidData = this.getBlock().a_(this); -+ // Paper end - } - - public boolean q() { -- return this.getBlock().isTicking(this); -+ return this.isTicking; // Paper - } - - public final SoundEffectType getStepSound() { return this.r(); } // Paper - OBFHELPER + // TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them + public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index adacff593ee20804b5ddb2df55b66bc6c162dc70..a52d8a27cee6721c32444d9d2bd81135b7d4b859 100644 +index 50848896588e16bf2a498ba28ab30919a081afd5..d2b3e06dda10fc321768301c35f319767796d7d5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1564,10 +1564,19 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - public abstract TagRegistry t(); +@@ -1460,10 +1460,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + public abstract TagRegistry p(); public BlockPosition a(int i, int j, int k, int l) { + // Paper start - allow use of mutable pos @@ -350,11 +255,10 @@ index adacff593ee20804b5ddb2df55b66bc6c162dc70..a52d8a27cee6721c32444d9d2bd81135 + this.getRandomBlockPosition(i, j, k, l, ret); + return ret.immutableCopy(); + } -+ + public final BlockPosition.MutableBlockPosition getRandomBlockPosition(int i, int j, int k, int l, BlockPosition.MutableBlockPosition out) { + // Paper end - this.i = this.i * 3 + 1013904223; - int i1 = this.i >> 2; + this.n = this.n * 3 + 1013904223; + int i1 = this.n >> 2; - return new BlockPosition(i + (i1 & 15), j + (i1 >> 16 & l), k + (i1 >> 8 & 15)); + out.setValues(i + (i1 & 15), j + (i1 >> 16 & l), k + (i1 >> 8 & 15)); // Paper - change to setValues call @@ -363,10 +267,10 @@ index adacff593ee20804b5ddb2df55b66bc6c162dc70..a52d8a27cee6721c32444d9d2bd81135 public boolean isSavingDisabled() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f32e313a6287c8f5d487d4ad7148cac176773228..7fded15f14a3f5c04a676e9e25413718b9922c13 100644 +index 1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c..3266ecf2ad975613942a9cd127440dd898b12ff5 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -531,7 +531,12 @@ public class WorldServer extends World { +@@ -558,7 +558,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { }); } @@ -380,21 +284,20 @@ index f32e313a6287c8f5d487d4ad7148cac176773228..7fded15f14a3f5c04a676e9e25413718 ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); boolean flag = this.isRaining(); int j = chunkcoordintpair.d(); -@@ -539,10 +544,10 @@ public class WorldServer extends World { +@@ -566,10 +571,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); gameprofilerfiller.enter("thunder"); - BlockPosition blockposition; + final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change -- if (!this.paperConfig.disableThunder && flag && this.U() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder + if (!this.paperConfig.disableThunder && flag && this.T() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder - blockposition = this.a(this.a(j, 0, k, 15)); -+ if (!this.paperConfig.disableThunder && flag && this.U() && this.randomTickRandom.nextInt(100000) == 0) { // Paper - Disable thunder // Paper - optimise random ticking -+ blockposition.setValues(this.a(this.getRandomBlockPosition(j, 0, k, 15, blockposition))); // Paper ++ blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper -@@ -561,61 +566,79 @@ public class WorldServer extends World { +@@ -592,59 +597,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exitEnter("iceandsnow"); @@ -469,10 +372,8 @@ index f32e313a6287c8f5d487d4ad7148cac176773228..7fded15f14a3f5c04a676e9e25413718 + continue; + } -- if (iblockdata.q()) { -- iblockdata.getBlock().randomTick = true; // Paper - fix MC-113809 +- if (iblockdata.isTicking()) { - iblockdata.b(this, blockposition2, this.random); -- iblockdata.getBlock().randomTick = false; // Paper - fix MC-113809 - } + long raw = section.tickingList.getRaw(index); + int location = com.destroystokyo.paper.util.maplist.IBlockDataList.getLocationFromRaw(raw); @@ -484,12 +385,10 @@ index f32e313a6287c8f5d487d4ad7148cac176773228..7fded15f14a3f5c04a676e9e25413718 + BlockPosition blockposition2 = blockposition.setValues(j + randomX, randomY, k + randomZ); + IBlockData iblockdata = com.destroystokyo.paper.util.maplist.IBlockDataList.getBlockDataFromRaw(raw); -- if (fluid.h()) { +- if (fluid.f()) { - fluid.b(this, blockposition2, this.random); - } -+ iblockdata.getBlock().randomTick = true; // Paper - fix MC-113809 + iblockdata.b(this, blockposition2, this.randomTickRandom); -+ iblockdata.getBlock().randomTick = false; // Paper - fix MC-113809 - gameprofilerfiller.exit(); - } diff --git a/Spigot-Server-Patches/0436-Entity-Jump-API.patch b/Spigot-Server-Patches/0417-Entity-Jump-API.patch similarity index 76% rename from Spigot-Server-Patches/0436-Entity-Jump-API.patch rename to Spigot-Server-Patches/0417-Entity-Jump-API.patch index c2af5a8fed..63f5a0bfae 100644 --- a/Spigot-Server-Patches/0436-Entity-Jump-API.patch +++ b/Spigot-Server-Patches/0417-Entity-Jump-API.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index bbe72ac65b7a9cfdfd577a0fbc316fbcc84fac59..4cac47c280a757b09e0b1e3f98c815bb8cd1b3c0 100644 +index 27b92664cee1c685b5b6b9b385150bb5fdb9fa7a..e4c7f4c100e1b8d4470da954a3b72f9e0ec5b494 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2608,8 +2608,10 @@ public abstract class EntityLiving extends Entity { - } else if (this.aH()) { - this.c(TagsFluid.LAVA); - } else if ((this.onGround || this.N > 0.0D && this.N <= 0.4D) && this.jumpTicks == 0) { +@@ -2748,8 +2748,10 @@ public abstract class EntityLiving extends Entity { + } else if (this.aN() && (!this.onGround || d7 > d8)) { + this.c((Tag) TagsFluid.LAVA); + } else if ((this.onGround || flag && d7 <= d8) && this.jumpTicks == 0) { + if (new com.destroystokyo.paper.event.entity.EntityJumpEvent(getBukkitLivingEntity()).callEvent()) { // Paper this.jump(); this.jumpTicks = 10; @@ -20,13 +20,13 @@ index bbe72ac65b7a9cfdfd577a0fbc316fbcc84fac59..4cac47c280a757b09e0b1e3f98c815bb } else { this.jumpTicks = 0; diff --git a/src/main/java/net/minecraft/server/EntityPanda.java b/src/main/java/net/minecraft/server/EntityPanda.java -index cd41c80f19105633305be933ac20fc5548b1c5f7..f50ed19080257b9199bf1b8b846877a2ba1cafbb 100644 +index 50fe69143a6b91f957414ff556a0e60d220ab04f..42df0d74ee24ef9ac15ee19cfd298c5721df0d7d 100644 --- a/src/main/java/net/minecraft/server/EntityPanda.java +++ b/src/main/java/net/minecraft/server/EntityPanda.java -@@ -438,7 +438,9 @@ public class EntityPanda extends EntityAnimal { +@@ -435,7 +435,9 @@ public class EntityPanda extends EntityAnimal { EntityPanda entitypanda = (EntityPanda) iterator.next(); - if (!entitypanda.isBaby() && entitypanda.onGround && !entitypanda.isInWater() && entitypanda.eL()) { + if (!entitypanda.isBaby() && entitypanda.onGround && !entitypanda.isInWater() && entitypanda.fi()) { + if (new com.destroystokyo.paper.event.entity.EntityJumpEvent(getBukkitLivingEntity()).callEvent()) { // Paper entitypanda.jump(); + } else { this.setJumping(false); } // Paper - setJumping(false) stops a potential loop @@ -34,10 +34,10 @@ index cd41c80f19105633305be933ac20fc5548b1c5f7..f50ed19080257b9199bf1b8b846877a2 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 7d101d9630848b68b15acc5efdc16ae51dc1f132..245bd116d143af120127a9d25dcb7a0c43ad47a0 100644 +index 39b8ab223bc708e5ee3dc967e489fdc76d944416..b3ec32b20751fbea2f6df14fc5e9f84682493bfd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -723,5 +723,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -736,5 +736,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public boolean isHandRaised() { return getHandle().isHandRaised(); } diff --git a/Spigot-Server-Patches/0437-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 75% rename from Spigot-Server-Patches/0437-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch index 9803eec324..026a8e3c6f 100644 --- a/Spigot-Server-Patches/0437-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2ab810f71beaa608af2194165696817a2cde4b92..578d81337394e5279c99937890c3ce35bf58404c 100644 +index 4bfe2fb948ee204f8c5a8c316141904a8a6a8b16..3496f615aa9857aa704767f460b1b166295ccf39 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -639,4 +639,9 @@ public class PaperWorldConfig { +@@ -596,4 +596,9 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } @@ -19,23 +19,23 @@ index 2ab810f71beaa608af2194165696817a2cde4b92..578d81337394e5279c99937890c3ce35 + } } diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java -index 2dc3ab4cfa3fb9335d271e91c89f0b22f21eeb39..09c7c131833ded951e49a7a1a2eb2e1f6f8cb989 100644 +index e5b8d45ed9f62c28b0429859593d881546ccead2..77f8d5e6662fa75e622f07b3e6efae04c38735fe 100644 --- a/src/main/java/net/minecraft/server/BlockPortal.java +++ b/src/main/java/net/minecraft/server/BlockPortal.java -@@ -45,6 +45,8 @@ public class BlockPortal extends Block { - Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL); +@@ -46,6 +46,8 @@ public class BlockPortal extends Block { if (entity != null) { + entity.portalCooldown = entity.getDefaultPortalCooldown(); + entity.fromNetherPortal = true; // Paper + if (worldserver.paperConfig.nerfNetherPortalPigmen) ((EntityInsentient) entity).aware = false; // Paper - entity.portalCooldown = entity.ba(); } } + } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 83e0af493c0f4037ff3e625ee93b9422863f335f..7bdd3f19b2bc51c4f995d42fcd47e0e315310bff 100644 +index 6cfbece5cbb6effb843f54e9917a755e2a9df4c5..278b379ba761b76fd94d3cb7aef9d3240271a973 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -194,6 +194,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -195,6 +195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public long activatedTick = Integer.MIN_VALUE; public boolean isTemporarilyActive = false; // Paper public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one @@ -43,7 +43,7 @@ index 83e0af493c0f4037ff3e625ee93b9422863f335f..7bdd3f19b2bc51c4f995d42fcd47e0e3 protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1646,6 +1647,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1607,6 +1608,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); } @@ -53,7 +53,7 @@ index 83e0af493c0f4037ff3e625ee93b9422863f335f..7bdd3f19b2bc51c4f995d42fcd47e0e3 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1768,6 +1772,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1731,6 +1735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status diff --git a/Spigot-Server-Patches/0438-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch similarity index 95% rename from Spigot-Server-Patches/0438-Make-the-GUI-graph-fancier.patch rename to Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch index 6f0b10d334..5390ceee55 100644 --- a/Spigot-Server-Patches/0438-Make-the-GUI-graph-fancier.patch +++ b/Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch @@ -385,10 +385,10 @@ index 0000000000000000000000000000000000000000..c3e54da4ab6440811aab2f9dd1e21880 + } +} diff --git a/src/main/java/net/minecraft/server/GuiStatsComponent.java b/src/main/java/net/minecraft/server/GuiStatsComponent.java -index c21db8e6b798cd5106801d666f14d1d73d5e84ed..7b6e9352578aecf37c5827ba2b2596d07851bf9a 100644 +index d4d5bc19e167a5271f8eb8d010f8a52b23b942df..859e31c63f94bdc7729c6d475990750b76e24b9c 100644 --- a/src/main/java/net/minecraft/server/GuiStatsComponent.java +++ b/src/main/java/net/minecraft/server/GuiStatsComponent.java -@@ -12,7 +12,7 @@ import javax.swing.Timer; +@@ -11,7 +11,7 @@ import javax.swing.Timer; public class GuiStatsComponent extends JComponent { @@ -398,23 +398,23 @@ index c21db8e6b798cd5106801d666f14d1d73d5e84ed..7b6e9352578aecf37c5827ba2b2596d0 }); private final int[] b = new int[256]; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8c08a542a97edd76c07ef7d64834bdbd70345876..234c6f1854d4a491f6233fbd4677719a0503d3a1 100644 +index 9edf1ead68e64cdd3ee3b1256d0f92374f20e9e7..281b8d508e569c7a5e2112e72a45fa088e7cacce 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -105,7 +105,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant set) { diff --git a/Spigot-Server-Patches/0442-Validate-tripwire-hook-placement-before-update.patch b/Spigot-Server-Patches/0422-Validate-tripwire-hook-placement-before-update.patch similarity index 90% rename from Spigot-Server-Patches/0442-Validate-tripwire-hook-placement-before-update.patch rename to Spigot-Server-Patches/0422-Validate-tripwire-hook-placement-before-update.patch index eb09d84299..6ea67bd8e8 100644 --- a/Spigot-Server-Patches/0442-Validate-tripwire-hook-placement-before-update.patch +++ b/Spigot-Server-Patches/0422-Validate-tripwire-hook-placement-before-update.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate tripwire hook placement before update diff --git a/src/main/java/net/minecraft/server/BlockTripwireHook.java b/src/main/java/net/minecraft/server/BlockTripwireHook.java -index 1b9d889af6bdefed0d6a3ebc832c39effb8af0b9..a5e6e94fe0d7702594a842bcfec2fcaae9f19d7f 100644 +index 26d801c231c6e9e31d0bdfea59e6027c77f488e4..dd30810569325096d35a367c4348e09f1463b2a9 100644 --- a/src/main/java/net/minecraft/server/BlockTripwireHook.java +++ b/src/main/java/net/minecraft/server/BlockTripwireHook.java @@ -149,6 +149,7 @@ public class BlockTripwireHook extends Block { diff --git a/Spigot-Server-Patches/0443-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/Spigot-Server-Patches/0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 82% rename from Spigot-Server-Patches/0443-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to Spigot-Server-Patches/0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index 364a1c75bf..533e3f7386 100644 --- a/Spigot-Server-Patches/0443-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/Spigot-Server-Patches/0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 578d81337394e5279c99937890c3ce35bf58404c..7d39028c930cbd66c867649d5148be2fb96bc579 100644 +index 3496f615aa9857aa704767f460b1b166295ccf39..101a473ff8979b37098fde7ac6ac66c6ed1b0282 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -413,6 +413,11 @@ public class PaperWorldConfig { +@@ -385,6 +385,11 @@ public class PaperWorldConfig { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } @@ -21,10 +21,10 @@ index 578d81337394e5279c99937890c3ce35bf58404c..7d39028c930cbd66c867649d5148be2f private void bedSearchRadius() { bedSearchRadius = getInt("bed-search-radius", 1); diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java -index 2f764776b2fd7b9fd7c2489f1ab914dc6d2f121a..7f6a56776000643ecc42b0b917f6673b7b038d79 100644 +index 86de45327653c09dcb6764754b10b8ad1b3450fd..e38a675be7e6a4cbb1f2f7606bf84ac570bb5985 100644 --- a/src/main/java/net/minecraft/server/EntityIronGolem.java +++ b/src/main/java/net/minecraft/server/EntityIronGolem.java -@@ -221,7 +221,7 @@ public class EntityIronGolem extends EntityGolem { +@@ -251,7 +251,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable { BlockPosition blockposition1 = blockposition.down(); IBlockData iblockdata = iworldreader.getType(blockposition1); diff --git a/Spigot-Server-Patches/0444-Configurable-chance-of-villager-zombie-infection.patch b/Spigot-Server-Patches/0424-Configurable-chance-of-villager-zombie-infection.patch similarity index 84% rename from Spigot-Server-Patches/0444-Configurable-chance-of-villager-zombie-infection.patch rename to Spigot-Server-Patches/0424-Configurable-chance-of-villager-zombie-infection.patch index aa7b0311ae..69cc38bd06 100644 --- a/Spigot-Server-Patches/0444-Configurable-chance-of-villager-zombie-infection.patch +++ b/Spigot-Server-Patches/0424-Configurable-chance-of-villager-zombie-infection.patch @@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where: * On normal difficulty they will have a 50% of getting infected or dying. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7d39028c930cbd66c867649d5148be2fb96bc579..0ff4475625e93d6f7a41345149e7c1fed0220bbb 100644 +index 101a473ff8979b37098fde7ac6ac66c6ed1b0282..9e8485679bd36481c2bd2f0c7cfa49892f0e4baf 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -649,4 +649,9 @@ public class PaperWorldConfig { +@@ -606,4 +606,9 @@ public class PaperWorldConfig { private void nerfNetherPortalPigmen() { nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); } @@ -22,23 +22,22 @@ index 7d39028c930cbd66c867649d5148be2fb96bc579..0ff4475625e93d6f7a41345149e7c1fe + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index e8b9a21baf74645cc07cd9daf741bf9f65deff08..6989c0469641150b93d4264b0b6ae7080879faa7 100644 +index 9bb54d13a318199bbce3d5b32db3710f822daa40..ad8b1f0e419e6341eb46def2dc58423588a65882 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -455,10 +455,14 @@ public class EntityZombie extends EntityMonster { +@@ -390,10 +390,14 @@ public class EntityZombie extends EntityMonster { @Override - public void b(EntityLiving entityliving) { - super.b(entityliving); + public void a_(EntityLiving entityliving) { + super.a_(entityliving); - if ((this.world.getDifficulty() == EnumDifficulty.NORMAL || this.world.getDifficulty() == EnumDifficulty.HARD) && entityliving instanceof EntityVillager) { - if (this.world.getDifficulty() != EnumDifficulty.HARD && this.random.nextBoolean()) { + // Paper start + if (world.paperConfig.zombieVillagerInfectionChance != 0.0 && (world.paperConfig.zombieVillagerInfectionChance != -1.0 || this.world.getDifficulty() == EnumDifficulty.NORMAL || this.world.getDifficulty() == EnumDifficulty.HARD) && entityliving instanceof EntityVillager) { + if (world.paperConfig.zombieVillagerInfectionChance == -1.0 && this.world.getDifficulty() != EnumDifficulty.HARD && this.random.nextBoolean()) { -+ return; -+ } -+ if (world.paperConfig.zombieVillagerInfectionChance != -1.0 && (this.random.nextDouble() * 100.0) > world.paperConfig.zombieVillagerInfectionChance) { return; -- } + } ++ if (world.paperConfig.zombieVillagerInfectionChance != -1.0 && (this.random.nextDouble() * 100.0) > world.paperConfig.zombieVillagerInfectionChance) { ++ return; + } // Paper end EntityVillager entityvillager = (EntityVillager) entityliving; diff --git a/Spigot-Server-Patches/0445-Optimise-Chunk-getFluid.patch b/Spigot-Server-Patches/0425-Optimise-Chunk-getFluid.patch similarity index 87% rename from Spigot-Server-Patches/0445-Optimise-Chunk-getFluid.patch rename to Spigot-Server-Patches/0425-Optimise-Chunk-getFluid.patch index d0174a7e1e..ed9f3cdb2c 100644 --- a/Spigot-Server-Patches/0445-Optimise-Chunk-getFluid.patch +++ b/Spigot-Server-Patches/0425-Optimise-Chunk-getFluid.patch @@ -8,10 +8,10 @@ faster on its own, however removing the try catch makes it easier to inline due to code size diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index cfdf6ea55dedeaf6b96566b72ca0015350c13e92..74d110874d0a9c1603d6b2d77753179ba49811ea 100644 +index a76b1d2fd81aaedb37190bcb8510020d5df2513e..cb24f27bc443880b18ffc36236f6ec7174c9d493 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -385,17 +385,20 @@ public class Chunk implements IChunkAccess { +@@ -386,17 +386,20 @@ public class Chunk implements IChunkAccess { } public Fluid a(int i, int j, int k) { @@ -39,7 +39,7 @@ index cfdf6ea55dedeaf6b96566b72ca0015350c13e92..74d110874d0a9c1603d6b2d77753179b CrashReport crashreport = CrashReport.a(throwable, "Getting fluid state"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Block being got"); -@@ -404,6 +407,7 @@ public class Chunk implements IChunkAccess { +@@ -405,6 +408,7 @@ public class Chunk implements IChunkAccess { }); throw new ReportedException(crashreport); } @@ -48,10 +48,10 @@ index cfdf6ea55dedeaf6b96566b72ca0015350c13e92..74d110874d0a9c1603d6b2d77753179b // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 4eb7c1a9b5afced4be79a263e6a918f39c4b51be..f6df85c6bf27bfa7a16967259a6016c9473201a5 100644 +index cf444fa1cc96e881a1f9ed0c78d45935fe1c90ab..860dc98ab4f84c470b27726314943936d23fcb79 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -37,7 +37,7 @@ public class ChunkSection { +@@ -38,7 +38,7 @@ public class ChunkSection { } public Fluid b(int i, int j, int k) { diff --git a/Spigot-Server-Patches/0446-Optimise-TickListServer-by-rewriting-it.patch b/Spigot-Server-Patches/0426-Optimise-TickListServer-by-rewriting-it.patch similarity index 91% rename from Spigot-Server-Patches/0446-Optimise-TickListServer-by-rewriting-it.patch rename to Spigot-Server-Patches/0426-Optimise-TickListServer-by-rewriting-it.patch index 852cf1d22c..d7a6348ff4 100644 --- a/Spigot-Server-Patches/0446-Optimise-TickListServer-by-rewriting-it.patch +++ b/Spigot-Server-Patches/0426-Optimise-TickListServer-by-rewriting-it.patch @@ -42,10 +42,10 @@ sets the excessive tick delay to the specified ticks (defaults to 60 * 20 ticks, aka 60 seconds) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 74295466e53db06d0d019a13768f3575ac61d699..f1b41e16c8ce8323a896339c5d822f8ff7d8f7e6 100644 +index 8c2202fbc1c38e6cd19005d010e365ae14233f51..c03ff5f856f669ed535379f6c9d41812b7472743 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -369,6 +369,13 @@ public class PaperConfig { +@@ -348,6 +348,13 @@ public class PaperConfig { maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); } @@ -61,10 +61,10 @@ index 74295466e53db06d0d019a13768f3575ac61d699..f1b41e16c8ce8323a896339c5d822f8f ConfigurationSection section; diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java new file mode 100644 -index 0000000000000000000000000000000000000000..ce653f6b4be3ab6c6d35cb3e9222e7f8c8759e25 +index 0000000000000000000000000000000000000000..0692fe33bb7c4a7bb666920b10f5dd3a0e7a7689 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java -@@ -0,0 +1,622 @@ +@@ -0,0 +1,617 @@ +package com.destroystokyo.paper.server.ticklist; + +import net.minecraft.server.MCUtil; @@ -113,7 +113,7 @@ index 0000000000000000000000000000000000000000..ce653f6b4be3ab6c6d35cb3e9222e7f8 + private final WorldServer world; + private final Predicate excludeFromScheduling; + private final Function getMinecraftKeyFrom; -+ private final Function getObjectFronMinecraftKey; ++ //private final Function getObjectFronMinecraftKey; + private final Consumer> tickFunction; + + private final co.aikar.timings.Timing timingCleanup; // Paper @@ -156,12 +156,11 @@ index 0000000000000000000000000000000000000000..ce653f6b4be3ab6c6d35cb3e9222e7f8 + } + + public PaperTickList(final WorldServer world, final Predicate excludeFromScheduling, final Function getMinecraftKeyFrom, -+ final Function getObjectFronMinecraftKey, final Consumer> tickFunction, final String timingsType) { -+ super(world, excludeFromScheduling, getMinecraftKeyFrom, getObjectFronMinecraftKey, tickFunction, timingsType); ++ final Consumer> tickFunction, final String timingsType) { ++ super(world, excludeFromScheduling, getMinecraftKeyFrom, tickFunction, timingsType); + this.world = world; + this.excludeFromScheduling = excludeFromScheduling; + this.getMinecraftKeyFrom = getMinecraftKeyFrom; -+ this.getObjectFronMinecraftKey = getObjectFronMinecraftKey; + this.tickFunction = tickFunction; + this.timingCleanup = co.aikar.timings.WorldTimingsHandler.getTickList(world, timingsType + " - Cleanup"); // Paper + this.timingTicking = co.aikar.timings.WorldTimingsHandler.getTickList(world, timingsType + " - Ticking"); // Paper @@ -521,10 +520,6 @@ index 0000000000000000000000000000000000000000..ce653f6b4be3ab6c6d35cb3e9222e7f8 + this.addToSchedule(entry); + } + -+ @Override -+ public void scheduleAll(final Stream> stream) { -+ this.scheduleAll(stream.iterator()); -+ } + public void scheduleAll(final Iterator> iterator) { + while (iterator.hasNext()) { + this.schedule(iterator.next()); @@ -883,10 +878,10 @@ index 0000000000000000000000000000000000000000..118988c39e58f28e8a2851792b9c014f + } +} diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 3fcfe416d26808fa1c9bfdc5b413b149764c544a..3bf17ccdaef21322b787db538d569e0bc614ef22 100644 +index 9fb776318c10f393eb6d94e5112c454a7cd246b9..adfeeefbbc307a77738c2cc8d82856cd02c2285e 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -126,6 +126,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -104,6 +104,7 @@ public class BlockPosition extends BaseBlockPosition { return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k); } @@ -895,10 +890,10 @@ index 3fcfe416d26808fa1c9bfdc5b413b149764c544a..3bf17ccdaef21322b787db538d569e0b 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 e467cd8123dafc46a8c894f1ffa9440de0d45340..9e3471be219b5e061486c8a3e4b638a45e6f28f5 100644 +index 67d6facd37462beef49dac311019b1977150d73f..ba9f75bd8f6fe1990d485548f4481bd1762d93af 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -200,6 +200,13 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -202,6 +202,13 @@ public class ChunkProviderServer extends IChunkProvider { } // Paper end @@ -909,9 +904,9 @@ index e467cd8123dafc46a8c894f1ffa9440de0d45340..9e3471be219b5e061486c8a3e4b638a4 + } + // Paper end - rewrite ticklistserver + - - public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier supplier) { + 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; + this.serverThreadQueue = new ChunkProviderServer.a(worldserver); diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java index 33cfeabdee03195a294f303f28044a313cb1c4ed..2287e47d1b891135a5f2579ec324c70589141192 100644 --- a/src/main/java/net/minecraft/server/NextTickListEntry.java @@ -984,10 +979,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 0f1576effe10795bcb8ed3b519f4dbafdf9ea6ed..afc92dd031cdaf725b85c0b301d5a5a21da54720 100644 +index b6868b6b23a09e8e0dfe7a5e378dca22b8d80bad..9cb2ff09da0b8832e58eed4d70741853a25c9011 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -473,7 +473,9 @@ public class PlayerChunk { +@@ -460,7 +460,9 @@ public class PlayerChunk { PlayerChunk.this.isTickingReady = true; @@ -999,7 +994,7 @@ index 0f1576effe10795bcb8ed3b519f4dbafdf9ea6ed..afc92dd031cdaf725b85c0b301d5a5a2 } }); diff --git a/src/main/java/net/minecraft/server/StructureBoundingBox.java b/src/main/java/net/minecraft/server/StructureBoundingBox.java -index dbb565e74d211ef35d5d40b3d024e2f07cef9031..185658e230688a9939c89dae9167217cbee03571 100644 +index 7873db26b336c97f909e5391e58ee53feaf59b9a..447eb2ba84789edf9bac2e2ffb2dec7cb4596cbf 100644 --- a/src/main/java/net/minecraft/server/StructureBoundingBox.java +++ b/src/main/java/net/minecraft/server/StructureBoundingBox.java @@ -4,12 +4,12 @@ import com.google.common.base.MoreObjects; @@ -1021,7 +1016,7 @@ index dbb565e74d211ef35d5d40b3d024e2f07cef9031..185658e230688a9939c89dae9167217c public StructureBoundingBox() {} -@@ -84,6 +84,7 @@ public class StructureBoundingBox { +@@ -88,6 +88,7 @@ public class StructureBoundingBox { this.e = 512; } @@ -1029,8 +1024,8 @@ index dbb565e74d211ef35d5d40b3d024e2f07cef9031..185658e230688a9939c89dae9167217c public boolean b(StructureBoundingBox structureboundingbox) { return this.d >= structureboundingbox.a && this.a <= structureboundingbox.d && this.f >= structureboundingbox.c && this.c <= structureboundingbox.f && this.e >= structureboundingbox.b && this.b <= structureboundingbox.e; } -@@ -114,6 +115,7 @@ public class StructureBoundingBox { - return new StructureBoundingBox(this.a + i, this.b + j, this.c + k, this.d + i, this.e + j, this.f + k); +@@ -122,6 +123,7 @@ public class StructureBoundingBox { + this.a(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); } + public final boolean hasPoint(BaseBlockPosition baseblockposition) { return this.b(baseblockposition); } // Paper - OBFHELPER @@ -1038,10 +1033,10 @@ index dbb565e74d211ef35d5d40b3d024e2f07cef9031..185658e230688a9939c89dae9167217c return baseblockposition.getX() >= this.a && baseblockposition.getX() <= this.d && baseblockposition.getZ() >= this.c && baseblockposition.getZ() <= this.f && baseblockposition.getY() >= this.b && baseblockposition.getY() <= this.e; } diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java -index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5dc98b8166 100644 +index 3b8f56c0f0507ebdd9ac20be70688b4c0cfe4cf8..149d2b4f929c11b8baf17163bbd6ff8220a95e86 100644 --- a/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java -@@ -42,6 +42,11 @@ public class TickListServer implements TickList { +@@ -39,6 +39,11 @@ public class TickListServer implements TickList { // Paper end public void b() { @@ -1053,7 +1048,7 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d int i = this.nextTickList.size(); if (false) { // CraftBukkit -@@ -109,15 +114,30 @@ public class TickListServer implements TickList { +@@ -106,10 +111,20 @@ public class TickListServer implements TickList { @Override public boolean b(BlockPosition blockposition, T t0) { @@ -1062,17 +1057,7 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d + } + public boolean isPendingTickThisTick(BlockPosition blockposition, T t0) { + // Paper end - return this.g.contains(new NextTickListEntry<>(blockposition, t0)); - } - - @Override - public void a(Stream> stream) { -+ // Paper start - allow overriding -+ this.scheduleAll(stream); -+ } -+ public void scheduleAll(Stream> stream) { -+ // Paper end - stream.forEach(this::a); + return this.f.contains(new NextTickListEntry<>(blockposition, t0)); } public List> a(ChunkCoordIntPair chunkcoordintpair, boolean flag, boolean flag1) { @@ -1084,7 +1069,7 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d int i = (chunkcoordintpair.x << 4) - 2; int j = i + 16 + 2; int k = (chunkcoordintpair.z << 4) - 2; -@@ -127,6 +147,11 @@ public class TickListServer implements TickList { +@@ -119,6 +134,11 @@ public class TickListServer implements TickList { } public List> a(StructureBoundingBox structureboundingbox, boolean flag, boolean flag1) { @@ -1096,7 +1081,7 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d List> list = this.a((List) null, this.nextTickList, structureboundingbox, flag); if (flag && list != null) { -@@ -166,6 +191,11 @@ public class TickListServer implements TickList { +@@ -158,6 +178,11 @@ public class TickListServer implements TickList { } public void a(StructureBoundingBox structureboundingbox, BlockPosition blockposition) { @@ -1108,7 +1093,7 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d List> list = this.a(structureboundingbox, false, false); Iterator iterator = list.iterator(); -@@ -183,11 +213,17 @@ public class TickListServer implements TickList { +@@ -175,11 +200,17 @@ public class TickListServer implements TickList { } public NBTTagList a(ChunkCoordIntPair chunkcoordintpair) { @@ -1119,14 +1104,14 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d + // Paper end List> list = this.a(chunkcoordintpair, false, true); - return a(this.b, list, this.f.getTime()); + return a(this.b, list, this.e.getTime()); } + public static NBTTagList serialize(Function function, Iterable> iterable, long i) { return TickListServer.a(function, iterable, i); } // Paper - OBFHELPER - public static NBTTagList a(Function function, Iterable> iterable, long i) { + private static NBTTagList a(Function function, Iterable> iterable, long i) { NBTTagList nbttaglist = new NBTTagList(); Iterator iterator = iterable.iterator(); -@@ -210,11 +246,21 @@ public class TickListServer implements TickList { +@@ -202,11 +233,21 @@ public class TickListServer implements TickList { @Override public boolean a(BlockPosition blockposition, T t0) { @@ -1146,9 +1131,9 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d + public void schedule(BlockPosition blockposition, T t0, int i, TickListPriority ticklistpriority) { + // Paper end if (!this.a.test(t0)) { - this.a(new NextTickListEntry<>(blockposition, t0, (long) i + this.f.getTime(), ticklistpriority)); + this.a(new NextTickListEntry<>(blockposition, t0, (long) i + this.e.getTime(), ticklistpriority)); } -@@ -230,6 +276,11 @@ public class TickListServer implements TickList { +@@ -222,6 +263,11 @@ public class TickListServer implements TickList { } public int a() { @@ -1161,10 +1146,10 @@ index f533860bbed19ff2915c90186c259b466f41ce90..3f1aa5ced697490b5481ba992cf5af5d } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7fded15f14a3f5c04a676e9e25413718b9922c13..642b5b485df28149f255ae9b5e43083821b20a0a 100644 +index 3266ecf2ad975613942a9cd127440dd898b12ff5..b8e635e351773663f62bd07193c6b0aceef0a3f3 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -170,6 +170,15 @@ public class WorldServer extends World { +@@ -182,6 +182,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // Paper end @@ -1177,35 +1162,34 @@ index 7fded15f14a3f5c04a676e9e25413718b9922c13..642b5b485df28149f255ae9b5e430838 + } + // Paper end - rewrite ticklistserver + - // Add env and gen to constructor - public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { - super(worlddata, dimensionmanager, executor, (world, worldprovider) -> { // Paper - pass executor down -@@ -190,12 +199,22 @@ public class WorldServer extends World { - this.pvpMode = minecraftserver.getPVP(); - worlddata.world = this; + // Add env and gen to constructor, WorldData -> WorldDataServer + public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { + super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor +@@ -189,12 +198,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { + convertable = convertable_conversionsession; + uuid = WorldUUID.getUUID(convertable_conversionsession.folder.toFile()); // CraftBukkit end - this.nextTickListBlock = new TickListServer<>(this, (block) -> { - return block == null || block.getBlockData().isAir(); -- }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::get, this::b, "Blocks"); // Paper - Timings +- }, IRegistry.BLOCK::getKey, this::b, "Blocks"); // Paper - Timings - this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> { - return fluidtype == null || fluidtype == FluidTypes.EMPTY; -- }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings +- }, IRegistry.FLUID::getKey, this::a, "Fluids"); // Paper - Timings + if (com.destroystokyo.paper.PaperConfig.useOptimizedTickList) { -+ this.nextTickListBlock = new com.destroystokyo.paper.server.ticklist.PaperTickList<>(this, (block) -> { // Paper - optimise TickListServer ++ this.nextTickListBlock = new com.destroystokyo.paper.server.ticklist.PaperTickList<>(this, (block) -> { + return block == null || block.getBlockData().isAir(); -+ }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::get, this::b, "Blocks"); // Paper - Timings -+ this.nextTickListFluid = new com.destroystokyo.paper.server.ticklist.PaperTickList<>(this, (fluidtype) -> { // Paper - optimise TickListServer ++ }, IRegistry.BLOCK::getKey, this::b, "Blocks"); // Paper - Timings ++ this.nextTickListFluid = new com.destroystokyo.paper.server.ticklist.PaperTickList<>(this, (fluidtype) -> { + return fluidtype == null || fluidtype == FluidTypes.EMPTY; -+ }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings ++ }, IRegistry.FLUID::getKey, this::a, "Fluids"); // Paper - Timings + } else { -+ this.nextTickListBlock = new TickListServer<>(this, (block) -> { // Paper - optimise TickListServer ++ this.nextTickListBlock = new TickListServer<>(this, (block) -> { + return block == null || block.getBlockData().isAir(); -+ }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::get, this::b, "Blocks"); // Paper - Timings -+ this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> { // Paper - optimise TickListServer ++ }, IRegistry.BLOCK::getKey, this::b, "Blocks"); // Paper - Timings ++ this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> { + return fluidtype == null || fluidtype == FluidTypes.EMPTY; -+ }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings ++ }, IRegistry.FLUID::getKey, this::a, "Fluids"); // Paper - Timings + } -+ this.navigators = Sets.newHashSet(); - this.I = new ObjectLinkedOpenHashSet(); - this.dataManager = worldnbtstorage; + this.L = new ObjectLinkedOpenHashSet(); + this.Q = flag1; diff --git a/Spigot-Server-Patches/0427-Fix-comparator-behavior-for-EntityPhanton-goal.patch b/Spigot-Server-Patches/0427-Fix-comparator-behavior-for-EntityPhanton-goal.patch deleted file mode 100644 index 3e04bb18fc..0000000000 --- a/Spigot-Server-Patches/0427-Fix-comparator-behavior-for-EntityPhanton-goal.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Wed, 22 Jan 2020 21:00:21 +0000 -Subject: [PATCH] Fix comparator behavior for EntityPhanton goal - - -diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 82323bf4acc140d279c399cc64fa393a0db90136..90eeddb1af59126ea7ca19c2cc909da72578fb6c 100644 ---- a/src/main/java/net/minecraft/server/EntityPhantom.java -+++ b/src/main/java/net/minecraft/server/EntityPhantom.java -@@ -224,7 +224,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { - - if (!list.isEmpty()) { - list.sort((entityhuman, entityhuman1) -> { -- return entityhuman.locY() > entityhuman1.locY() ? -1 : 1; -+ return Double.compare(entityhuman1.locY(), entityhuman.locY()); // Paper - }); - Iterator iterator = list.iterator(); - diff --git a/Spigot-Server-Patches/0447-Pillager-patrol-spawn-settings-and-per-player-option.patch b/Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 92% rename from Spigot-Server-Patches/0447-Pillager-patrol-spawn-settings-and-per-player-option.patch rename to Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch index 3ceb2620fa..4bc611f700 100644 --- a/Spigot-Server-Patches/0447-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per world and the world age for the start day. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0ff4475625e93d6f7a41345149e7c1fed0220bbb..598f27bc1b95132ded224dd5c7a0e2639ab2bd12 100644 +index 9e8485679bd36481c2bd2f0c7cfa49892f0e4baf..2688b3018eaab4e7ba95754164f83065a98e53fc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -627,10 +627,21 @@ public class PaperWorldConfig { +@@ -584,10 +584,21 @@ public class PaperWorldConfig { } public boolean disablePillagerPatrols = false; @@ -36,10 +36,10 @@ index 0ff4475625e93d6f7a41345149e7c1fed0220bbb..598f27bc1b95132ded224dd5c7a0e263 private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8434f10d4c674fbbed40dba86e54f7cad93df642..52544730a2cce4db4f912ad1109945ac4e53a9b6 100644 +index 458306bd5585e1b78dec6cbfafba1751c76513a2..9d7096c61fed5f5b8b45273e146862688df22c59 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -77,6 +77,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -81,6 +81,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean viewingCredits; private int containerUpdateDelay; // Paper public long loginTime; // Paper @@ -48,12 +48,12 @@ index 8434f10d4c674fbbed40dba86e54f7cad93df642..52544730a2cce4db4f912ad1109945ac public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java -index a0f582807605b9cc5bbf31d84907e56fba393e2e..edca6d3abdc31701068cad4af493759f353d4407 100644 +index b1fea06d29a0c98136496d6eff81e6959cb73672..78029e10e6670936fb7dbedc7f34c5f8045fc291 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java +++ b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java -@@ -4,12 +4,14 @@ import java.util.Random; +@@ -4,13 +4,15 @@ import java.util.Random; - public class MobSpawnerPatrol { + public class MobSpawnerPatrol implements MobSpawner { + private int getSpawnDelay() { return a; } // Paper - OBFHELPER + private void setSpawnDelay(int spawnDelay) { this.a = spawnDelay; } // Paper - OBFHELPER @@ -61,13 +61,14 @@ index a0f582807605b9cc5bbf31d84907e56fba393e2e..edca6d3abdc31701068cad4af493759f public MobSpawnerPatrol() {} + @Override public int a(WorldServer worldserver, boolean flag, boolean flag1) { - if (worldserver.paperConfig.disablePillagerPatrols) return 0; // Paper + if (worldserver.paperConfig.disablePillagerPatrols || worldserver.paperConfig.patrolSpawnChance == 0) return 0; // Paper if (!flag) { return 0; } else if (!worldserver.getGameRules().getBoolean(GameRules.DO_PATROL_SPAWNING)) { -@@ -17,23 +19,51 @@ public class MobSpawnerPatrol { +@@ -18,23 +20,51 @@ public class MobSpawnerPatrol implements MobSpawner { } else { Random random = worldserver.random; diff --git a/Spigot-Server-Patches/0448-Ensure-Entity-is-never-double-registered.patch b/Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch similarity index 77% rename from Spigot-Server-Patches/0448-Ensure-Entity-is-never-double-registered.patch rename to Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch index 13035d203c..21f54aa5ef 100644 --- a/Spigot-Server-Patches/0448-Ensure-Entity-is-never-double-registered.patch +++ b/Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch @@ -11,10 +11,10 @@ Vs behavior of non ticking of just overwriting state. We will now simply log a warning when this happens instead of crashing the server. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7bdd3f19b2bc51c4f995d42fcd47e0e315310bff..7434f859f7f9acff0f881ff594c8dffdfa249c76 100644 +index 278b379ba761b76fd94d3cb7aef9d3240271a973..59d72dfc903bb7a9c50baf59fface280b44a6d5b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -59,6 +59,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -60,6 +60,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start @@ -23,18 +23,18 @@ index 7bdd3f19b2bc51c4f995d42fcd47e0e315310bff..7434f859f7f9acff0f881ff594c8dffd private boolean locked = false; @Override diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 642b5b485df28149f255ae9b5e43083821b20a0a..46b28be6a808a33e4330a051ac6d8139953ed299 100644 +index b8e635e351773663f62bd07193c6b0aceef0a3f3..17f9e9119723561a4b01efbb91d651fbc9c8726e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -532,6 +532,7 @@ public class WorldServer extends World { +@@ -532,6 +532,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + Entity entity2; - try (co.aikar.timings.Timing ignored = this.timings.newEntities.startTiming()) { // Paper - timings - while ((entity = (Entity) this.entitiesToAdd.poll()) != null) { -+ if (!entity.isQueuedForRegister) continue; // Paper - ignore cancelled registers - this.registerEntity(entity); + while ((entity2 = (Entity) this.entitiesToAdd.poll()) != null) { ++ if (!entity2.isQueuedForRegister) continue; // Paper - ignore cancelled registers + this.registerEntity(entity2); } - } // Paper - timings -@@ -1338,6 +1339,19 @@ public class WorldServer extends World { + +@@ -1228,6 +1229,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { public void unregisterEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot @@ -54,7 +54,7 @@ index 642b5b485df28149f255ae9b5e43083821b20a0a..46b28be6a808a33e4330a051ac6d8139 // Spigot start if ( entity instanceof EntityHuman ) { -@@ -1404,9 +1418,21 @@ public class WorldServer extends World { +@@ -1294,9 +1308,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void registerEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot @@ -76,4 +76,4 @@ index 642b5b485df28149f255ae9b5e43083821b20a0a..46b28be6a808a33e4330a051ac6d8139 + entity.isQueuedForRegister = false; // Paper this.entitiesById.put(entity.getId(), entity); if (entity instanceof EntityEnderDragon) { - EntityComplexPart[] aentitycomplexpart = ((EntityEnderDragon) entity).eo(); + EntityComplexPart[] aentitycomplexpart = ((EntityEnderDragon) entity).eK(); diff --git a/Spigot-Server-Patches/0449-Fix-unregistering-entities-from-unloading-chunks.patch b/Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch similarity index 88% rename from Spigot-Server-Patches/0449-Fix-unregistering-entities-from-unloading-chunks.patch rename to Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch index 8baa9ea66b..8baef3ad57 100644 --- a/Spigot-Server-Patches/0449-Fix-unregistering-entities-from-unloading-chunks.patch +++ b/Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch @@ -15,10 +15,10 @@ 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 46b28be6a808a33e4330a051ac6d8139953ed299..68c7c243a6d12d5c2f1045dfc5dd36f455dfbffa 100644 +index 17f9e9119723561a4b01efbb91d651fbc9c8726e..f792ff541793855d9ed0b60f5990b6fdfa303995 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1497,9 +1497,9 @@ public class WorldServer extends World { +@@ -1387,9 +1387,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } private void removeEntityFromChunk(Entity entity) { diff --git a/Spigot-Server-Patches/0450-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/Spigot-Server-Patches/0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 86% rename from Spigot-Server-Patches/0450-Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to Spigot-Server-Patches/0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch index e74f8cac97..cf920fbc7c 100644 --- a/Spigot-Server-Patches/0450-Remote-Connections-shouldn-t-hold-up-shutdown.patch +++ b/Spigot-Server-Patches/0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown Bugs in the connection logic appears to leave stale connections even, preventing shutdown diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 349a0ea213f7f45e927d439985e121e8fa66c041..1ef7890da599d13e784861035e7891efcc4cd504 100644 +index 715063432bb3a18421f7ac00723f6695f8a56a8c..4fa8d40d84884f17b4bbcc357a6bb902f8f668cd 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -415,11 +415,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -361,11 +361,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } if (this.remoteControlListener != null) { diff --git a/Spigot-Server-Patches/0451-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/Spigot-Server-Patches/0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 73% rename from Spigot-Server-Patches/0451-Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to Spigot-Server-Patches/0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch index f639d95a41..f39f9165ee 100644 --- a/Spigot-Server-Patches/0451-Do-not-allow-bees-to-load-chunks-for-beehives.patch +++ b/Spigot-Server-Patches/0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not allow bees to load chunks for beehives diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java -index c7d79efdf6ee3b1ac910ff48bfd4b0ef084b4d43..dd1d246aeb5bd7c7d284175f936936ececb0f932 100644 +index b9e01e4d9e64fdec4c4f04f1808eb8832bd00c8e..e6868e2b65e3c2bde7696272b242a47e7394e27f 100644 --- a/src/main/java/net/minecraft/server/EntityBee.java +++ b/src/main/java/net/minecraft/server/EntityBee.java -@@ -315,6 +315,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { +@@ -284,6 +284,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB if (this.hivePos == null) { return false; } else { @@ -16,7 +16,7 @@ index c7d79efdf6ee3b1ac910ff48bfd4b0ef084b4d43..dd1d246aeb5bd7c7d284175f936936ec TileEntity tileentity = this.world.getTileEntity(this.hivePos); return tileentity instanceof TileEntityBeehive && ((TileEntityBeehive) tileentity).d(); -@@ -334,6 +335,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { +@@ -316,6 +317,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB } private boolean i(BlockPosition blockposition) { @@ -24,15 +24,15 @@ index c7d79efdf6ee3b1ac910ff48bfd4b0ef084b4d43..dd1d246aeb5bd7c7d284175f936936ec TileEntity tileentity = this.world.getTileEntity(blockposition); return tileentity instanceof TileEntityBeehive ? !((TileEntityBeehive) tileentity).isFull() : false; -@@ -593,6 +595,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { +@@ -558,6 +560,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB @Override public boolean g() { - if (EntityBee.this.hasHivePos() && EntityBee.this.eI() && EntityBee.this.hivePos.a((IPosition) EntityBee.this.getPositionVector(), 2.0D)) { + if (EntityBee.this.hasHivePos() && EntityBee.this.fe() && EntityBee.this.hivePos.a((IPosition) EntityBee.this.getPositionVector(), 2.0D)) { + if (!EntityBee.this.world.isLoadedAndInBounds(EntityBee.this.hivePos)) return false; // Paper TileEntity tileentity = EntityBee.this.world.getTileEntity(EntityBee.this.hivePos); if (tileentity instanceof TileEntityBeehive) { -@@ -616,6 +619,7 @@ public class EntityBee extends EntityAnimal implements EntityBird { +@@ -581,6 +584,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB @Override public void c() { diff --git a/Spigot-Server-Patches/0432-Be-more-tolerant-of-invalid-attributes.patch b/Spigot-Server-Patches/0432-Be-more-tolerant-of-invalid-attributes.patch deleted file mode 100644 index 9f40d486f6..0000000000 --- a/Spigot-Server-Patches/0432-Be-more-tolerant-of-invalid-attributes.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Thu, 6 Feb 2020 19:20:27 -0600 -Subject: [PATCH] Be more tolerant of invalid attributes - -Prior to this commit, the player would be disconnected if they ever encountered an attribute with a name that did -not match Bukkit's expected vanilla scheme. It appears that datapacks can set whatever attribute name they want, -ignoring vanilla's typical scheme. - -In a more perfect world the API would expose some way to interact with these attributes, however Bukkit is not -particularly flexible in this area. Perhaps this is an area for future expansion at a later time. - -diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java -index 77e584b129ab21959b7c33ac45e5841935e86ac8..007d28b16ce16295c7d398c09557b8c0777657c6 100644 ---- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java -+++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java -@@ -47,6 +47,12 @@ public class CraftAttributeMap implements Attributable { - public static Attribute fromMinecraft(String nms) { - String[] split = nms.split("\\.", 2); - -+ // Paper start - Datapacks can set their own attributes that may not match our expectations, ignore them -+ if (split.length != 2) { -+ return null; -+ } -+ // Paper end -+ - String generic = split[0]; - String descriptor = CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, split[1]); // movementSpeed -> MOVEMENT_SPEED - String fin = generic + "_" + descriptor; diff --git a/Spigot-Server-Patches/0452-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 81% rename from Spigot-Server-Patches/0452-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index 8c7cd4a030..ff50f90ba8 100644 --- a/Spigot-Server-Patches/0452-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding Stack will identify any causer of this and warn instead of crashing. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 4ba661c5a89bebe29c8802387bc93c10094b7606..6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4 100644 +index fe3aab87de4e1eb60b19352499790fd9b571e169..c9be4ae99458863bf91687c3667d67bc6b37b0f0 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1411,6 +1411,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1442,6 +1442,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { protected void addEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot @@ -23,13 +23,13 @@ index 4ba661c5a89bebe29c8802387bc93c10094b7606..6a2cf0c6f649e7a74b58fc292f57a08c + } + // Paper end if (!(entity instanceof EntityComplexPart)) { - if (!(entity instanceof EntityLightning)) { - EntityTypes entitytypes = entity.getEntityType(); + EntityTypes entitytypes = entity.getEntityType(); + int i = entitytypes.getChunkRange() * 16; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 68c7c243a6d12d5c2f1045dfc5dd36f455dfbffa..dfc9f4d5738b01e3f80af8f3d25aec51b6e9d8d9 100644 +index f792ff541793855d9ed0b60f5990b6fdfa303995..2609ae63556053adccdce19677d2e52aaab4ebf6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1463,7 +1463,7 @@ public class WorldServer extends World { +@@ -1353,7 +1353,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } @@ -38,7 +38,7 @@ index 68c7c243a6d12d5c2f1045dfc5dd36f455dfbffa..dfc9f4d5738b01e3f80af8f3d25aec51 // CraftBukkit start - SPIGOT-5278 if (entity instanceof EntityDrowned) { this.navigators.add(((EntityDrowned) entity).navigationWater); -@@ -1474,6 +1474,7 @@ public class WorldServer extends World { +@@ -1364,6 +1364,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.navigators.add(((EntityInsentient) entity).getNavigation()); } entity.valid = true; // CraftBukkit diff --git a/Spigot-Server-Patches/0439-Backport-fix-for-MC-167561.patch b/Spigot-Server-Patches/0439-Backport-fix-for-MC-167561.patch deleted file mode 100644 index 3a93a0a388..0000000000 --- a/Spigot-Server-Patches/0439-Backport-fix-for-MC-167561.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Fri, 21 Feb 2020 18:44:28 +0000 -Subject: [PATCH] Backport fix for MC-167561 - - -diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java -index db15d5e0a23c414742ac73785d29aeadd432d3d7..eec1e26b6eba07c31d251ecf69dc36199688110e 100644 ---- a/src/main/java/net/minecraft/server/EntityWolf.java -+++ b/src/main/java/net/minecraft/server/EntityWolf.java -@@ -296,7 +296,14 @@ public class EntityWolf extends EntityTameableAnimal { - boolean flag = super.a(entityhuman, enumhand); - - if (!flag || this.isBaby()) { -- this.goalSit.setSitting(!this.isSitting()); -+ //this.goalSit.setSitting(!this.isSitting()); // Paper start - copied from below -+ if (this.i((EntityLiving) entityhuman) && !this.i(itemstack)) { -+ this.goalSit.setSitting(!this.isSitting()); -+ this.jumping = false; -+ this.navigation.o(); -+ this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason -+ } -+ // Paper end - copied from below - } - - return flag; -@@ -313,12 +320,14 @@ public class EntityWolf extends EntityTameableAnimal { - return true; - } - -+ /* Paper start - Move into above - if (this.i((EntityLiving) entityhuman) && !this.i(itemstack)) { - this.goalSit.setSitting(!this.isSitting()); - this.jumping = false; - this.navigation.o(); - this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason - } -+ */ // Paper end - } else if (item == Items.BONE && !this.isAngry()) { - if (!entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); diff --git a/Spigot-Server-Patches/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch b/removed/1.16/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch similarity index 100% rename from Spigot-Server-Patches/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch rename to removed/1.16/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch diff --git a/Spigot-Server-Patches/0412-Fix-spawn-radius-being-treated-as-0.patch b/removed/1.16/0412-Fix-spawn-radius-being-treated-as-0.patch similarity index 98% rename from Spigot-Server-Patches/0412-Fix-spawn-radius-being-treated-as-0.patch rename to removed/1.16/0412-Fix-spawn-radius-being-treated-as-0.patch index d5fd1f08cb..7f6c706c69 100644 --- a/Spigot-Server-Patches/0412-Fix-spawn-radius-being-treated-as-0.patch +++ b/removed/1.16/0412-Fix-spawn-radius-being-treated-as-0.patch @@ -4,6 +4,8 @@ Date: Sun, 15 Dec 2019 19:41:28 +0000 Subject: [PATCH] Fix spawn radius being treated as 0 +Not needed anymore? + diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 81f00141776a1767b907d14ef04f60b576110128..86bbbbaefca9ace5327d8bc2456939eb9ae8966a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/Spigot-Server-Patches/0429-Seed-based-feature-search.patch b/removed/1.16/0429-Seed-based-feature-search.patch similarity index 100% rename from Spigot-Server-Patches/0429-Seed-based-feature-search.patch rename to removed/1.16/0429-Seed-based-feature-search.patch diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 6fd55da94e..06ad7ab9b9 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -94,7 +94,7 @@ done # import FileName - +import VoxelShapeSpliterator ######################################################## ######################################################## From 939690baeaac6a6e467db83302b190866e2ff3da Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Thu, 25 Jun 2020 18:53:21 -0700 Subject: [PATCH 11/95] even even even even even even more work --- SHIT_TO_CHECK.md | 3 +- ...ptimize-Collision-to-not-load-chunks.patch | 135 ++++++++++++++++++ ...tch => 0434-Don-t-tick-dead-players.patch} | 8 +- ...-Player-s-shouldn-t-be-able-to-move.patch} | 4 +- ...unkMap-memory-use-for-visibleChunks.patch} | 42 +++--- ...h => 0437-Increase-Light-Queue-Size.patch} | 10 +- ...sks-Speed-up-processing-of-chunk-lo.patch} | 86 +++++------ ...ove-existing-players-to-world-spawn.patch} | 37 ++--- ...Add-tick-times-API-and-mspt-command.patch} | 28 ++-- ...41-Expose-MinecraftServer-isRunning.patch} | 4 +- ...dd-Raw-Byte-ItemStack-Serialization.patch} | 10 +- ...3-Remove-streams-from-Mob-AI-System.patch} | 38 ++--- ...ons-until-after-entity-ticking-is-d.patch} | 12 +- ... => 0445-Async-command-map-building.patch} | 6 +- ...h => 0446-Improved-Watchdog-Support.patch} | 115 +++++++-------- ....patch => 0447-Optimize-Pathfinding.patch} | 6 +- ...8-Reduce-Either-Optional-allocation.patch} | 0 ...449-Remove-streams-from-PairedQueue.patch} | 0 ...-memory-footprint-of-NBTTagCompound.patch} | 8 +- ...ent-opening-inventories-when-frozen.patch} | 14 +- ...52-Optimise-ArraySetSorted-removeIf.patch} | 0 ...entity-collision-code-if-not-needed.patch} | 4 +- ...ptimize-Collision-to-not-load-chunks.patch | 111 -------------- ...mise-entity-hard-collision-checking.patch} | 82 ++++++----- ...viderServer-s-chunk-level-checking-.patch} | 21 +-- ...teleport-command-to-valid-locations.patch} | 12 +- ...Implement-Player-Client-Options-API.patch} | 60 ++++---- ...Chunk-Post-Processing-deadlock-risk.patch} | 14 +- ...ayer-is-attempted-to-be-removed-fro.patch} | 8 +- ...0-Broadcast-join-message-to-console.patch} | 6 +- ...-Broken-behavior-of-PlayerJoinEvent.patch} | 20 +-- ...oad-Chunks-for-Login-Asynchronously.patch} | 93 +++++++----- ...awn-point-if-spawn-in-unloaded-worl.patch} | 14 +- ...layerAttackEntityCooldownResetEvent.patch} | 7 +- ...llbacks-to-schedule-for-Callback-Ex.patch} | 4 +- ...-fire-BlockFade-on-worldgen-threads.patch} | 17 ++- ...tom-creative-and-insomniac-controls.patch} | 26 ++-- ...-duplication-issues-and-teleport-is.patch} | 28 ++-- ...0469-Implement-Brigadier-Mojang-API.patch} | 48 +++---- ...patch => 0470-Villager-Restocks-API.patch} | 4 +- ...471-Remove-streams-from-MinecraftKey.patch | 47 ------ ...ickItem-Packet-and-kick-for-invalid.patch} | 4 +- ...n.patch => 0472-Expose-game-version.patch} | 4 +- ...0473-Sync-position-on-teleportation.patch} | 6 +- ...> 0474-Optimize-Voxel-Shape-Merging.patch} | 2 +- ...per-thread-native-byte-buffer-cache.patch} | 4 +- ...atch => 0476-Implement-Mob-Goal-API.patch} | 34 ++--- ...ance-map-to-optimise-entity-tracker.patch} | 74 ++++++---- ...isOutsideRange-to-use-distance-maps.patch} | 105 +++++++------- ...e-operations-for-updating-light-dat.patch} | 8 +- ...o-Tick-view-distance-implementation.patch} | 118 ++++++++------- ...0486-Allow-sleeping-players-to-float.patch | 23 --- 52 files changed, 793 insertions(+), 781 deletions(-) create mode 100644 Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch rename Spigot-Server-Patches/{0454-Don-t-tick-dead-players.patch => 0434-Don-t-tick-dead-players.patch} (60%) rename Spigot-Server-Patches/{0455-Dead-Player-s-shouldn-t-be-able-to-move.patch => 0435-Dead-Player-s-shouldn-t-be-able-to-move.patch} (84%) rename Spigot-Server-Patches/{0456-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch => 0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch} (89%) rename Spigot-Server-Patches/{0457-Increase-Light-Queue-Size.patch => 0437-Increase-Light-Queue-Size.patch} (83%) rename Spigot-Server-Patches/{0458-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch => 0438-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch} (79%) rename Spigot-Server-Patches/{0459-Don-t-move-existing-players-to-world-spawn.patch => 0439-Don-t-move-existing-players-to-world-spawn.patch} (60%) rename Spigot-Server-Patches/{0460-Add-tick-times-API-and-mspt-command.patch => 0440-Add-tick-times-API-and-mspt-command.patch} (86%) rename Spigot-Server-Patches/{0461-Expose-MinecraftServer-isRunning.patch => 0441-Expose-MinecraftServer-isRunning.patch} (83%) rename Spigot-Server-Patches/{0462-Add-Raw-Byte-ItemStack-Serialization.patch => 0442-Add-Raw-Byte-ItemStack-Serialization.patch} (92%) rename Spigot-Server-Patches/{0463-Remove-streams-from-Mob-AI-System.patch => 0443-Remove-streams-from-Mob-AI-System.patch} (90%) rename Spigot-Server-Patches/{0464-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch => 0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch} (78%) rename Spigot-Server-Patches/{0465-Async-command-map-building.patch => 0445-Async-command-map-building.patch} (90%) rename Spigot-Server-Patches/{0466-Improved-Watchdog-Support.patch => 0446-Improved-Watchdog-Support.patch} (89%) rename Spigot-Server-Patches/{0467-Optimize-Pathfinding.patch => 0447-Optimize-Pathfinding.patch} (91%) rename Spigot-Server-Patches/{0469-Reduce-Either-Optional-allocation.patch => 0448-Reduce-Either-Optional-allocation.patch} (100%) rename Spigot-Server-Patches/{0470-Remove-streams-from-PairedQueue.patch => 0449-Remove-streams-from-PairedQueue.patch} (100%) rename Spigot-Server-Patches/{0472-Reduce-memory-footprint-of-NBTTagCompound.patch => 0450-Reduce-memory-footprint-of-NBTTagCompound.patch} (89%) rename Spigot-Server-Patches/{0473-Prevent-opening-inventories-when-frozen.patch => 0451-Prevent-opening-inventories-when-frozen.patch} (86%) rename Spigot-Server-Patches/{0474-Optimise-ArraySetSorted-removeIf.patch => 0452-Optimise-ArraySetSorted-removeIf.patch} (100%) rename Spigot-Server-Patches/{0475-Don-t-run-entity-collision-code-if-not-needed.patch => 0453-Don-t-run-entity-collision-code-if-not-needed.patch} (89%) delete mode 100644 Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch rename Spigot-Server-Patches/{0476-Optimise-entity-hard-collision-checking.patch => 0454-Optimise-entity-hard-collision-checking.patch} (74%) rename Spigot-Server-Patches/{0477-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch => 0455-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch} (74%) rename Spigot-Server-Patches/{0478-Restrict-vanilla-teleport-command-to-valid-locations.patch => 0456-Restrict-vanilla-teleport-command-to-valid-locations.patch} (77%) rename Spigot-Server-Patches/{0479-Implement-Player-Client-Options-API.patch => 0457-Implement-Player-Client-Options-API.patch} (81%) rename Spigot-Server-Patches/{0480-Fix-Chunk-Post-Processing-deadlock-risk.patch => 0458-Fix-Chunk-Post-Processing-deadlock-risk.patch} (80%) rename Spigot-Server-Patches/{0481-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch => 0459-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch} (79%) rename Spigot-Server-Patches/{0482-Broadcast-join-message-to-console.patch => 0460-Broadcast-join-message-to-console.patch} (83%) rename Spigot-Server-Patches/{0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch => 0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch} (88%) rename Spigot-Server-Patches/{0484-Load-Chunks-for-Login-Asynchronously.patch => 0462-Load-Chunks-for-Login-Asynchronously.patch} (76%) rename Spigot-Server-Patches/{0485-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch => 0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch} (65%) rename Spigot-Server-Patches/{0487-Add-PlayerAttackEntityCooldownResetEvent.patch => 0464-Add-PlayerAttackEntityCooldownResetEvent.patch} (81%) rename Spigot-Server-Patches/{0488-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch => 0465-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch} (93%) rename Spigot-Server-Patches/{0489-Don-t-fire-BlockFade-on-worldgen-threads.patch => 0466-Don-t-fire-BlockFade-on-worldgen-threads.patch} (53%) rename Spigot-Server-Patches/{0490-Add-phantom-creative-and-insomniac-controls.patch => 0467-Add-phantom-creative-and-insomniac-controls.patch} (74%) rename Spigot-Server-Patches/{0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch => 0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch} (84%) rename Spigot-Server-Patches/{0492-Implement-Brigadier-Mojang-API.patch => 0469-Implement-Brigadier-Mojang-API.patch} (78%) rename Spigot-Server-Patches/{0493-Villager-Restocks-API.patch => 0470-Villager-Restocks-API.patch} (85%) delete mode 100644 Spigot-Server-Patches/0471-Remove-streams-from-MinecraftKey.patch rename Spigot-Server-Patches/{0494-Validate-PickItem-Packet-and-kick-for-invalid.patch => 0471-Validate-PickItem-Packet-and-kick-for-invalid.patch} (91%) rename Spigot-Server-Patches/{0495-Expose-game-version.patch => 0472-Expose-game-version.patch} (82%) rename Spigot-Server-Patches/{0496-Sync-position-on-teleportation.patch => 0473-Sync-position-on-teleportation.patch} (86%) rename Spigot-Server-Patches/{0497-Optimize-Voxel-Shape-Merging.patch => 0474-Optimize-Voxel-Shape-Merging.patch} (98%) rename Spigot-Server-Patches/{0498-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch => 0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch} (91%) rename Spigot-Server-Patches/{0499-Implement-Mob-Goal-API.patch => 0476-Implement-Mob-Goal-API.patch} (97%) rename Spigot-Server-Patches/{0500-Use-distance-map-to-optimise-entity-tracker.patch => 0477-Use-distance-map-to-optimise-entity-tracker.patch} (84%) rename Spigot-Server-Patches/{0501-Optimize-isOutsideRange-to-use-distance-maps.patch => 0478-Optimize-isOutsideRange-to-use-distance-maps.patch} (83%) rename Spigot-Server-Patches/{0502-Stop-copy-on-write-operations-for-updating-light-dat.patch => 0479-Stop-copy-on-write-operations-for-updating-light-dat.patch} (98%) rename Spigot-Server-Patches/{0503-No-Tick-view-distance-implementation.patch => 0480-No-Tick-view-distance-implementation.patch} (88%) delete mode 100644 Spigot-Server-Patches/0486-Allow-sleeping-players-to-float.patch diff --git a/SHIT_TO_CHECK.md b/SHIT_TO_CHECK.md index 024d8cc9af..98771cea37 100644 --- a/SHIT_TO_CHECK.md +++ b/SHIT_TO_CHECK.md @@ -5,4 +5,5 @@ * Mini: "MC-50319": fix if still works * Mini: I definetly dropped a patch I didnt want to drop, we need to go thru in the end and see if all patches are still in, lol * Make sure the flat bedrock setting doesn't do anything stupid -* Check DataBits foreach \ No newline at end of file +* Check DataBits foreach +* Update MobGoalHelper \ No newline at end of file diff --git a/Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch new file mode 100644 index 0000000000..7c14863cc9 --- /dev/null +++ b/Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch @@ -0,0 +1,135 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 2 Apr 2020 02:37:57 -0400 +Subject: [PATCH] Optimize Collision to not load chunks + +The collision code takes an AABB and generates a cuboid of checks rather +than a cylinder, so at high velocity this can generate a lot of chunk checks. + +Treat an unloaded chunk as a collision for entities, and also for players if +the "prevent moving into unloaded chunks" setting is enabled. + +If that serting is not enabled, collisions will be ignored for players, since +movement will load only the chunk the player enters anyways and avoids loading +massive amounts of surrounding chunks due to large AABB lookups. + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 59d72dfc903bb7a9c50baf59fface280b44a6d5b..8b7f59577416468a89a99954e2a00b3704ffbd40 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -81,6 +81,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + private CraftEntity bukkitEntity; + + PlayerChunkMap.EntityTracker tracker; // Paper ++ boolean collisionLoadChunks = false; // Paper + Throwable addedToWorldStack; // Paper - entity debug + public CraftEntity getBukkitEntity() { + if (bukkitEntity == null) { +diff --git a/src/main/java/net/minecraft/server/ICollisionAccess.java b/src/main/java/net/minecraft/server/ICollisionAccess.java +index b27260270de80de371a5a71fa0516aa43c44c83e..1cc40b1f0af9e617b2a71bcc442543e10b2dc61a 100644 +--- a/src/main/java/net/minecraft/server/ICollisionAccess.java ++++ b/src/main/java/net/minecraft/server/ICollisionAccess.java +@@ -46,7 +46,9 @@ public interface ICollisionAccess extends IBlockAccess { + } + + default boolean b(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate) { ++ try { if (entity != null) entity.collisionLoadChunks = true; // Paper + return this.d(entity, axisalignedbb, predicate).allMatch(VoxelShape::isEmpty); ++ } finally { if (entity != null) entity.collisionLoadChunks = false; } // Paper + } + + Stream c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index 0b6bb4b2a679c6a3589ce30becbf2af498804aff..ea287e9c21ee1b4cf692d8c7b3df530766f2d26a 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -723,6 +723,7 @@ public abstract class PlayerList { + entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); + // CraftBukkit end + ++ worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper + while (avoidSuffocation && !worldserver1.getCubes(entityplayer1) && entityplayer1.locY() < 256.0D) { + entityplayer1.setPosition(entityplayer1.locX(), entityplayer1.locY() + 1.0D, entityplayer1.locZ()); + } +diff --git a/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java b/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java +index 4967d1ebd109c462a322e4829d01ff519d1b5366..ed0f3ddbcb7d6ce8a59ae3829f4cb11ae75046cb 100644 +--- a/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java ++++ b/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java +@@ -9,13 +9,13 @@ import javax.annotation.Nullable; + public class VoxelShapeSpliterator extends AbstractSpliterator { + + @Nullable +- private final Entity a; ++ private final Entity a; final Entity getEntity() { return this.a; } // Paper - OBFHELPER + private final AxisAlignedBB b; + private final VoxelShapeCollision c; + private final CursorPosition d; +- private final BlockPosition.MutableBlockPosition e; ++ private final BlockPosition.MutableBlockPosition e; final BlockPosition.MutableBlockPosition getMutablePos() { return this.e; } // Paper - OBFHELPER + private final VoxelShape f; +- private final ICollisionAccess g; ++ private final ICollisionAccess g; final ICollisionAccess getCollisionAccess() { return this.g; } // Paper - OBFHELPER + private boolean h; + private final BiPredicate i; + +@@ -52,23 +52,37 @@ public class VoxelShapeSpliterator extends AbstractSpliterator { + boolean a(Consumer consumer) { + while (true) { + if (this.d.a()) { +- int i = this.d.b(); +- int j = this.d.c(); +- int k = this.d.d(); ++ int i = this.d.b(); final int x = i; ++ int j = this.d.c(); final int y = j; ++ int k = this.d.d(); final int z = k; + int l = this.d.e(); + + if (l == 3) { + continue; + } + +- IBlockAccess iblockaccess = this.a(i, k); +- +- if (iblockaccess == null) { ++ // Paper start - ensure we don't load chunks ++ Entity entity = this.getEntity(); ++ BlockPosition.MutableBlockPosition blockposition_mutableblockposition = this.getMutablePos(); ++ boolean far = entity != null && MCUtil.distanceSq(entity.locX(), y, entity.locZ(), x, y, z) > 14; ++ blockposition_mutableblockposition.setValues(x, y, z); ++ ++ boolean isRegionLimited = this.getCollisionAccess() instanceof RegionLimitedWorldAccess; ++ IBlockData iblockdata = isRegionLimited ? Blocks.VOID_AIR.getBlockData() : ((!far && entity instanceof EntityPlayer) || (entity != null && entity.collisionLoadChunks) ++ ? this.getCollisionAccess().getType(blockposition_mutableblockposition) ++ : this.getCollisionAccess().getTypeIfLoaded(blockposition_mutableblockposition) ++ ); ++ ++ if (iblockdata == null) { ++ if (!(entity instanceof EntityPlayer) || entity.world.paperConfig.preventMovingIntoUnloadedChunks) { ++ VoxelShape voxelshape3 = VoxelShapes.of(far ? entity.getBoundingBox() : new AxisAlignedBB(new BlockPosition(x, y, z))); ++ consumer.accept(voxelshape3); ++ return true; ++ } + continue; + } +- +- this.e.d(i, j, k); +- IBlockData iblockdata = iblockaccess.getType(this.e); ++ // Paper - moved up ++ // Paper end + + if (!this.i.test(iblockdata, this.e) || l == 1 && !iblockdata.d() || l == 2 && !iblockdata.a(Blocks.MOVING_PISTON)) { + continue; +diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java +index b6e2a3d8d0cf510f497c6f974356fafaf2adc13b..4acde367542247627574fdeb586fb8c9087eef1a 100644 +--- a/src/main/java/net/minecraft/server/VoxelShapes.java ++++ b/src/main/java/net/minecraft/server/VoxelShapes.java +@@ -239,7 +239,8 @@ public final class VoxelShapes { + + if (k2 < 3) { + blockposition_mutableblockposition.a(enumaxiscycle1, i2, j2, l1); +- IBlockData iblockdata = iworldreader.getType(blockposition_mutableblockposition); ++ IBlockData iblockdata = iworldreader.getTypeIfLoaded(blockposition_mutableblockposition); // Paper ++ if (iblockdata == null) return 0.0D; // Paper + + if ((k2 != 1 || iblockdata.d()) && (k2 != 2 || iblockdata.a(Blocks.MOVING_PISTON))) { + d0 = iblockdata.b((IBlockAccess) iworldreader, blockposition_mutableblockposition, voxelshapecollision).a(enumdirection_enumaxis2, axisalignedbb.d((double) (-blockposition_mutableblockposition.getX()), (double) (-blockposition_mutableblockposition.getY()), (double) (-blockposition_mutableblockposition.getZ())), d0); diff --git a/Spigot-Server-Patches/0454-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0434-Don-t-tick-dead-players.patch similarity index 60% rename from Spigot-Server-Patches/0454-Don-t-tick-dead-players.patch rename to Spigot-Server-Patches/0434-Don-t-tick-dead-players.patch index 999a01d978..6a3a18e8ac 100644 --- a/Spigot-Server-Patches/0454-Don-t-tick-dead-players.patch +++ b/Spigot-Server-Patches/0434-Don-t-tick-dead-players.patch @@ -7,15 +7,15 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 52544730a2cce4db4f912ad1109945ac4e53a9b6..f4215d38acef8018f09dff5f379c14336647687d 100644 +index 9d7096c61fed5f5b8b45273e146862688df22c59..559da47b80f21f0da59da9410288835c0d394fd8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -429,7 +429,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -472,7 +472,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void playerTick() { try { -- if (!this.isSpectator() || this.world.isLoaded(new BlockPosition(this))) { -+ if (valid && (!this.isSpectator() || this.world.isLoaded(new BlockPosition(this)))) { // Paper - don't tick dead players that are not in the world currently (pending respawn) +- if (!this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { ++ if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn) super.tick(); } diff --git a/Spigot-Server-Patches/0455-Dead-Player-s-shouldn-t-be-able-to-move.patch b/Spigot-Server-Patches/0435-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 84% rename from Spigot-Server-Patches/0455-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to Spigot-Server-Patches/0435-Dead-Player-s-shouldn-t-be-able-to-move.patch index 558141ad32..d151045776 100644 --- a/Spigot-Server-Patches/0455-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/Spigot-Server-Patches/0435-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 61c9e030a105ee78a7e59fbf36cf7a77f87a0e88..c4d433430503e844121f1917c6caf05823af0a34 100644 +index 8af8676888e4deff66094053d14203c2f5b20ab1..0bf9de73e800cbbe0553bf491cb1546bb1677b63 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -978,7 +978,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -952,7 +952,7 @@ public abstract class EntityHuman extends EntityLiving { @Override protected boolean isFrozen() { diff --git a/Spigot-Server-Patches/0456-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 89% rename from Spigot-Server-Patches/0456-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to Spigot-Server-Patches/0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 7383da9f43..6241b79ad7 100644 --- a/Spigot-Server-Patches/0456-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -57,23 +57,23 @@ index 0000000000000000000000000000000000000000..f6ff4d8132a95895680f5bc81f8f873e + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 9e3471be219b5e061486c8a3e4b638a45e6f28f5..9d5275c628b3963befdfa60841ef3c3331c8338c 100644 +index ba9f75bd8f6fe1990d485548f4481bd1762d93af..e14e8bcf235339c1537a1e0a7702a364ee784c93 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -766,7 +766,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end -- this.playerChunkMap.f().forEach((playerchunk) -> { +- this.playerChunkMap.f().forEach((playerchunk) -> { // Paper - no... just no... + this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping - Optional optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); + Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); if (optional.isPresent()) { diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index ea087800eb838371d5da70538091e1148816296e..ce0bf608b71cf492fc31e89a360ecd83fa5c23a6 100644 +index b2e8ddc9ff1bf5f519d971455d48a2faad3638f2..2f9c014454cf5fe771c6da84ad4af7e7790fdc7d 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java -@@ -610,7 +610,7 @@ public final class MCUtil { +@@ -598,7 +598,7 @@ public final class MCUtil { WorldServer world = ((org.bukkit.craftbukkit.CraftWorld)bukkitWorld).getHandle(); PlayerChunkMap chunkMap = world.getChunkProvider().playerChunkMap; @@ -83,10 +83,10 @@ index ea087800eb838371d5da70538091e1148816296e..ce0bf608b71cf492fc31e89a360ecd83 List allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca8bea5e06 100644 +index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71efd606b8f6 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -55,8 +55,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -56,8 +56,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private static final Logger LOGGER = LogManager.getLogger(); public static final int GOLDEN_TICKET = 33 + ChunkStatus.b(); @@ -124,14 +124,14 @@ index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca public final WorldServer world; @@ -130,7 +155,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - public PlayerChunkMap(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i) { - super(new File(worldserver.getWorldProvider().getDimensionManager().a(file), "region"), datafixer); + public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i, boolean flag) { + super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag); - this.visibleChunks = this.updatingChunks.clone(); + //this.visibleChunks = this.updatingChunks.clone(); // Paper - no more cloning this.pendingUnload = new Long2ObjectLinkedOpenHashMap(); this.loadedChunks = new LongOpenHashSet(); this.unloadQueue = new LongOpenHashSet(); -@@ -221,9 +246,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -222,9 +247,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return (PlayerChunk) this.updatingChunks.get(i); } @@ -185,7 +185,7 @@ index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca } protected IntSupplier c(long i) { -@@ -411,8 +479,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -412,8 +480,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end protected void save(boolean flag) { @@ -196,7 +196,7 @@ index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -440,7 +509,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -441,7 +510,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // this.i(); // Paper - nuke IOWorker PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); } else { @@ -205,7 +205,7 @@ index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkSave().getNow(null); // CraftBukkit - decompile error if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { -@@ -611,7 +680,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -612,7 +681,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (!this.updatingChunksModified) { return false; } else { @@ -227,7 +227,7 @@ index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca this.updatingChunksModified = false; return true; } -@@ -1048,12 +1130,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1080,12 +1162,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } protected Iterable f() { @@ -243,10 +243,10 @@ index 6a2cf0c6f649e7a74b58fc292f57a08c0663b0a4..ea6b310e8e4741c8bb301e5bc586faca 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 c030ff7b34fdd4c4632714a800935a6a5f8082cb..1929aacbe83c401c7254484aa8df62ed1554e3ba 100644 +index 84c6dfcd87d9d893e846c08c9d14e01fbfb15fb2..e044534d3cb47cf1228c5e5fa8920df8264fd0b5 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.GameRules; +@@ -73,6 +73,7 @@ import net.minecraft.server.GameRules; import net.minecraft.server.GroupDataEntity; import net.minecraft.server.IBlockData; import net.minecraft.server.IChunkAccess; @@ -254,7 +254,7 @@ index c030ff7b34fdd4c4632714a800935a6a5f8082cb..1929aacbe83c401c7254484aa8df62ed import net.minecraft.server.MinecraftKey; import net.minecraft.server.MinecraftServer; import net.minecraft.server.MovingObjectPosition; -@@ -291,6 +292,7 @@ public class CraftWorld implements World { +@@ -292,6 +293,7 @@ public class CraftWorld implements World { return ret; } public int getTileEntityCount() { @@ -262,7 +262,7 @@ index c030ff7b34fdd4c4632714a800935a6a5f8082cb..1929aacbe83c401c7254484aa8df62ed // We don't use the full world tile entity list, so we must iterate chunks Long2ObjectLinkedOpenHashMap chunks = world.getChunkProvider().playerChunkMap.visibleChunks; int size = 0; -@@ -302,11 +304,13 @@ public class CraftWorld implements World { +@@ -303,11 +305,13 @@ public class CraftWorld implements World { size += chunk.tileEntities.size(); } return size; @@ -276,7 +276,7 @@ index c030ff7b34fdd4c4632714a800935a6a5f8082cb..1929aacbe83c401c7254484aa8df62ed int ret = 0; for (PlayerChunk chunkHolder : world.getChunkProvider().playerChunkMap.visibleChunks.values()) { -@@ -315,7 +319,7 @@ public class CraftWorld implements World { +@@ -316,7 +320,7 @@ public class CraftWorld implements World { } } @@ -285,7 +285,7 @@ index c030ff7b34fdd4c4632714a800935a6a5f8082cb..1929aacbe83c401c7254484aa8df62ed } public int getPlayerCount() { return world.players.size(); -@@ -435,6 +439,14 @@ public class CraftWorld implements World { +@@ -436,6 +440,14 @@ public class CraftWorld implements World { @Override public Chunk[] getLoadedChunks() { diff --git a/Spigot-Server-Patches/0457-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch similarity index 83% rename from Spigot-Server-Patches/0457-Increase-Light-Queue-Size.patch rename to Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch index 7ad92c02d1..da22ce1926 100644 --- a/Spigot-Server-Patches/0457-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 598f27bc1b95132ded224dd5c7a0e2639ab2bd12..ea5f306ef57fe5958a554f4bdf866a36d2b185e0 100644 +index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -665,4 +665,9 @@ public class PaperWorldConfig { +@@ -622,4 +622,9 @@ public class PaperWorldConfig { private void zombieVillagerInfectionChance() { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } @@ -28,15 +28,15 @@ index 598f27bc1b95132ded224dd5c7a0e2639ab2bd12..ea5f306ef57fe5958a554f4bdf866a36 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 234c6f1854d4a491f6233fbd4677719a0503d3a1..508aa4866e47f3865a8c51f7c8e3b842be216923 100644 +index 281b8d508e569c7a5e2112e72a45fa088e7cacce..917d5eb4a660134468cc45982aae07b704b0cd0e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -637,7 +637,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { // Paper - safe iterator incase chunk loads, also no wrapping + final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping - Optional optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); + Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); if (optional.isPresent()) { -@@ -849,6 +851,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 -+ if (chunksTicked[0]++ % 10 == 0) this.world.getMinecraftServer().midTickLoadChunks(); // Paper +@@ -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 ++ if (chunksTicked[0]++ % 10 == 0) this.world.getMinecraftServer().midTickLoadChunks(); // Paper + } } } - }); -@@ -990,6 +993,41 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider { super.executeTask(runnable); } @@ -135,10 +135,10 @@ index 9d5275c628b3963befdfa60841ef3c3331c8338c..b6146330a55665a0365ff7474f184376 protected boolean executeNext() { // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 508aa4866e47f3865a8c51f7c8e3b842be216923..11349565e71d97384d3dcab9cdf6ea168c6d2f4f 100644 +index 917d5eb4a660134468cc45982aae07b704b0cd0e..37ecdf66d705454bc818195476d25fbfa6628004 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -910,6 +910,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { @@ -187,7 +187,7 @@ index 508aa4866e47f3865a8c51f7c8e3b842be216923..11349565e71d97384d3dcab9cdf6ea16 return !this.canOversleep(); }); isOversleep = false;MinecraftTimings.serverOversleep.stopTiming(); -@@ -1178,13 +1197,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant(this); // Paper -@@ -162,6 +162,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -171,6 +171,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end -+ public void moveToSpawn(WorldServer worldserver) { a(worldserver); } // Paper - OBFHELPER - private void a(WorldServer worldserver) { ++ public final void moveToSpawn(WorldServer worldserver) { b(worldserver); } // Paper - OBFHELPER + private void b(WorldServer worldserver) { BlockPosition blockposition = worldserver.getSpawn(); -@@ -302,7 +303,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - position = new Vec3D(world.getSpawn()); +@@ -346,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + position = Vec3D.a(((WorldServer) world).getSpawn()); } this.world = world; - this.setPosition(position.getX(), position.getY(), position.getZ()); + this.setPositionRaw(position.getX(), position.getY(), position.getZ()); // Paper - don't register to chunks yet } - this.dimension = ((WorldServer) this.world).getWorldProvider().getDimensionManager(); this.playerInteractManager.a((WorldServer) world); + } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0e9ba6319472f54a1f77a9d2cdfb86d7490f0572..80f1c41062de9251343c3d9be4e076315cdbf88d 100644 +index ea287e9c21ee1b4cf692d8c7b3df530766f2d26a..7a65b4f2cc6f3430bdad9df95b035ff29c8a2700 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -108,6 +108,7 @@ public abstract class PlayerList { - NBTTagCompound bukkit = nbttagcompound.getCompound("bukkit"); - s = bukkit.hasKeyOfType("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s; +@@ -134,6 +134,8 @@ public abstract class PlayerList { + worldserver1 = worldserver; } -+ if (nbttagcompound == null) entityplayer.moveToSpawn(worldserver); // Paper - only move to spawn on first login, otherwise, stay where you are.... - // CraftBukkit end - entityplayer.spawnIn(worldserver); ++ if (nbttagcompound == null) entityplayer.moveToSpawn(worldserver1); // Paper - only move to spawn on first login, otherwise, stay where you are.... ++ + entityplayer.spawnIn(worldserver1); + entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); + String s1 = "local"; diff --git a/Spigot-Server-Patches/0460-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0440-Add-tick-times-API-and-mspt-command.patch similarity index 86% rename from Spigot-Server-Patches/0460-Add-tick-times-API-and-mspt-command.patch rename to Spigot-Server-Patches/0440-Add-tick-times-API-and-mspt-command.patch index 1d28a9ba79..45d2c48d3a 100644 --- a/Spigot-Server-Patches/0460-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0440-Add-tick-times-API-and-mspt-command.patch @@ -75,10 +75,10 @@ index 0000000000000000000000000000000000000000..d0211d4f39f9d6af1d751ac66342b42c + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index f8f225e18fa38cad917f52a379233e0a7a869b07..3ee7e5671dd2519cec72b81211f1f39176a228ba 100644 +index 5814c0da1fe82ccf9a74c6418bee021543749d86..c31a97c6ae0dd1493039158e67c5f3ba237ad234 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -70,6 +70,7 @@ public class PaperConfig { +@@ -68,6 +68,7 @@ public class PaperConfig { commands = new HashMap(); commands.put("paper", new PaperCommand("paper")); @@ -87,23 +87,23 @@ index f8f225e18fa38cad917f52a379233e0a7a869b07..3ee7e5671dd2519cec72b81211f1f391 version = getInt("config-version", 20); set("config-version", 20); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 11349565e71d97384d3dcab9cdf6ea168c6d2f4f..a0e33d42a158defc8b4a72de5d01b9395dca42eb 100644 +index 37ecdf66d705454bc818195476d25fbfa6628004..826db17cdc83833ec93289ee7695171fc136bf8e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -106,6 +106,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant c = new EnumMap(PathfinderGoal.Type.class); - private final Set d = Sets.newLinkedHashSet();private Set getTasks() { return d; }// Paper - OBFHELPER - private final GameProfilerFiller e; + private final Set d = Sets.newLinkedHashSet(); private Set getTasks() { return d; }// Paper - OBFHELPER + private final Supplier e; - private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); + private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. + private final OptimizedSmallEnumSet goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector private int g = 3;private int getTickRate() { return g; } // Paper - OBFHELPER private int curRate;private int getCurRate() { return curRate; } private void incRate() { this.curRate++; } // Paper TODO -@@ -58,33 +61,36 @@ public class PathfinderGoalSelector { +@@ -59,35 +62,38 @@ public class PathfinderGoalSelector { // Paper end public void a(PathfinderGoal pathfindergoal) { @@ -104,8 +104,10 @@ index 935136771e776fe498f608a159a41393340adc4e..84d2abbcb90eb09a19fa0922cfc053c7 + private static final PathfinderGoal.Type[] PATHFINDER_GOAL_TYPES = PathfinderGoal.Type.values(); // Paper - remove streams from pathfindergoalselector + public void doTick() { - this.e.enter("goalCleanup"); -- this.c().filter((pathfindergoalwrapped) -> { + GameProfilerFiller gameprofilerfiller = (GameProfilerFiller) this.e.get(); + + gameprofilerfiller.enter("goalCleanup"); +- this.d().filter((pathfindergoalwrapped) -> { - boolean flag; - - if (pathfindergoalwrapped.g()) { @@ -136,10 +138,10 @@ index 935136771e776fe498f608a159a41393340adc4e..84d2abbcb90eb09a19fa0922cfc053c7 this.c.forEach((pathfindergoal_type, pathfindergoalwrapped) -> { if (!pathfindergoalwrapped.g()) { this.c.remove(pathfindergoal_type); -@@ -93,30 +99,58 @@ public class PathfinderGoalSelector { +@@ -96,30 +102,58 @@ public class PathfinderGoalSelector { }); - this.e.exit(); - this.e.enter("goalUpdate"); + gameprofilerfiller.exit(); + gameprofilerfiller.enter("goalUpdate"); - this.d.stream().filter((pathfindergoalwrapped) -> { - return !pathfindergoalwrapped.g(); - }).filter((pathfindergoalwrapped) -> { @@ -203,9 +205,9 @@ index 935136771e776fe498f608a159a41393340adc4e..84d2abbcb90eb09a19fa0922cfc053c7 + wrappedGoal.c(); + } + // Paper end - remove streams from pathfindergoalselector - this.e.exit(); - this.e.enter("goalTick"); -- this.c().forEach(PathfinderGoalWrapped::e); + gameprofilerfiller.exit(); + gameprofilerfiller.enter("goalTick"); +- this.d().forEach(PathfinderGoalWrapped::e); + // Paper start - remove streams from pathfindergoalselector + for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { + PathfinderGoalWrapped wrappedGoal = iterator.next(); @@ -214,10 +216,10 @@ index 935136771e776fe498f608a159a41393340adc4e..84d2abbcb90eb09a19fa0922cfc053c7 + } + } + // Paper end - remove streams from pathfindergoalselector - this.e.exit(); + gameprofilerfiller.exit(); } -@@ -125,11 +159,11 @@ public class PathfinderGoalSelector { +@@ -128,11 +162,11 @@ public class PathfinderGoalSelector { } public void a(PathfinderGoal.Type pathfindergoal_type) { @@ -232,7 +234,7 @@ index 935136771e776fe498f608a159a41393340adc4e..84d2abbcb90eb09a19fa0922cfc053c7 public void a(PathfinderGoal.Type pathfindergoal_type, boolean flag) { diff --git a/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java b/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java -index 29657fed75184aee0c89e56f5e642a5d68eda444..1b800c558f0988ffc0270b86d1a59ea3bb245116 100644 +index 04b28555b1bb68536e40bb652613678775337b31..96f4401044cacf88e8e00b5b18821c105e634fba 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java @@ -59,9 +59,10 @@ public class PathfinderGoalWrapped extends PathfinderGoal { diff --git a/Spigot-Server-Patches/0464-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch b/Spigot-Server-Patches/0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch similarity index 78% rename from Spigot-Server-Patches/0464-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch rename to Spigot-Server-Patches/0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch index 0bd387f305..7544fe4be2 100644 --- a/Spigot-Server-Patches/0464-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch +++ b/Spigot-Server-Patches/0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Delay unsafe actions until after entity ticking is done This will help prevent many cases of unregistering entities during entity ticking diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 69e6614049e490dc70baf745761c62b173cf693e..aaf85a1497de98522e3a01d4f81a267c4b0cc087 100644 +index 661718302a2eac338d9185d9d31ab7f704d4bee3..d0493919e71159ac6b38a64b2411fea722b53306 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -60,6 +60,16 @@ public class WorldServer extends World { - private final Queue entitiesToAdd = Queues.newArrayDeque(); +@@ -61,6 +61,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { public final List players = Lists.newArrayList(); // Paper - private -> public + public final ChunkProviderServer chunkProvider; // Paper - public boolean tickingEntities; + // Paper start + List afterEntityTickingTasks = Lists.newArrayList(); @@ -24,9 +24,9 @@ index 69e6614049e490dc70baf745761c62b173cf693e..aaf85a1497de98522e3a01d4f81a267c + } + // Paper end private final MinecraftServer server; - private final WorldNBTStorage dataManager; + public final WorldDataServer worldDataServer; // CraftBukkit - type public boolean savingDisabled; -@@ -531,6 +541,16 @@ public class WorldServer extends World { +@@ -530,6 +540,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { timings.entityTick.stopTiming(); // Spigot this.tickingEntities = false; @@ -42,4 +42,4 @@ index 69e6614049e490dc70baf745761c62b173cf693e..aaf85a1497de98522e3a01d4f81a267c + // Paper end this.getMinecraftServer().midTickLoadChunks(); // Paper - try (co.aikar.timings.Timing ignored = this.timings.newEntities.startTiming()) { // Paper - timings + Entity entity2; diff --git a/Spigot-Server-Patches/0465-Async-command-map-building.patch b/Spigot-Server-Patches/0445-Async-command-map-building.patch similarity index 90% rename from Spigot-Server-Patches/0465-Async-command-map-building.patch rename to Spigot-Server-Patches/0445-Async-command-map-building.patch index 2d3efaa3ad..953f418632 100644 --- a/Spigot-Server-Patches/0465-Async-command-map-building.patch +++ b/Spigot-Server-Patches/0445-Async-command-map-building.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Async command map building diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java -index 37b1a7947c2d5ce954d83f599453db86ca1eb131..2414b0a552e5d6fb449bca163add7a9bac39e943 100644 +index e6030512dbbfac3c2ab29e20562ad666f7608295..1229aaf19de60f1e3ce161b5c3b7ef659d14c018 100644 --- a/src/main/java/net/minecraft/server/CommandDispatcher.java +++ b/src/main/java/net/minecraft/server/CommandDispatcher.java -@@ -241,6 +241,14 @@ public class CommandDispatcher { +@@ -242,6 +242,14 @@ public class CommandDispatcher { if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot // CraftBukkit start // Register Vanilla commands into builtRoot as before @@ -23,7 +23,7 @@ index 37b1a7947c2d5ce954d83f599453db86ca1eb131..2414b0a552e5d6fb449bca163add7a9b Map, CommandNode> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues RootCommandNode vanillaRoot = new RootCommandNode(); -@@ -258,7 +266,14 @@ public class CommandDispatcher { +@@ -259,7 +267,14 @@ public class CommandDispatcher { for (CommandNode node : rootcommandnode.getChildren()) { bukkit.add(node.getName()); } diff --git a/Spigot-Server-Patches/0466-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0446-Improved-Watchdog-Support.patch similarity index 89% rename from Spigot-Server-Patches/0466-Improved-Watchdog-Support.patch rename to Spigot-Server-Patches/0446-Improved-Watchdog-Support.patch index 20a2c9e38f..48ba8972da 100644 --- a/Spigot-Server-Patches/0466-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0446-Improved-Watchdog-Support.patch @@ -55,7 +55,7 @@ index e257d6b36e0e78dac5b8320017d92776171e1bb0..24641501aeae0f2c2c5ce877775c7b97 } }, 1000 * 60 * 5, 1000 * 60 * 30); diff --git a/src/main/java/net/minecraft/server/CrashReport.java b/src/main/java/net/minecraft/server/CrashReport.java -index 3de19c998b749ccf74958c2412a8c9506457383e..c7dc8787cc3456c5540d6a00a6ff051533edc25a 100644 +index 95e6a6de7ccfc4445d0ac19c5f874c0d533b1712..cc6e6f245ee5e73bd570cf42381bf55ee0b364d3 100644 --- a/src/main/java/net/minecraft/server/CrashReport.java +++ b/src/main/java/net/minecraft/server/CrashReport.java @@ -257,6 +257,7 @@ public class CrashReport { @@ -67,19 +67,19 @@ index 3de19c998b749ccf74958c2412a8c9506457383e..c7dc8787cc3456c5540d6a00a6ff0515 throwable = throwable.getCause(); } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 1ef7890da599d13e784861035e7891efcc4cd504..32cd645abb236b355f4f4f0f810e56342ee6cc06 100644 +index 4fa8d40d84884f17b4bbcc357a6bb902f8f668cd..22ee001a8d5a3c93303d036daa7ee12a6ec802bb 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -299,7 +299,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - long l = SystemUtils.getMonotonicNanos() - i; - String s2 = String.format(Locale.ROOT, "%.3fs", (double) l / 1.0E9D); +@@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + long j = SystemUtils.getMonotonicNanos() - i; + String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D); -- DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s2); -+ //DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s2); // Paper moved to after init +- DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); ++ //DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); // Paper moved to after init if (dedicatedserverproperties.announcePlayerAchievements != null) { ((GameRules.GameRuleBoolean) this.getGameRules().get(GameRules.ANNOUNCE_ADVANCEMENTS)).a(dedicatedserverproperties.announcePlayerAchievements, (MinecraftServer) this); } -@@ -422,6 +422,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -368,6 +368,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer //this.remoteStatusListener.b(); // Paper - don't wait for remote connections } @@ -87,17 +87,17 @@ index 1ef7890da599d13e784861035e7891efcc4cd504..32cd645abb236b355f4f4f0f810e5634 System.exit(0); // CraftBukkit } -@@ -750,7 +751,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -696,7 +697,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @Override public void stop() { super.stop(); -- SystemUtils.f(); -+ //SystemUtils.f(); // Paper - moved into super +- SystemUtils.h(); ++ //SystemUtils.h(); // Paper - moved into super } @Override diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java -index cfe43e882e524b6ab3d9702e81269c97e6b75eba..2632c7c3ec77918be7979f2aa49209e566cafc77 100644 +index 63fdae15ccbef0c39718b320dbd096794bcfa3b4..6beefff203ed6e448898eb5b2e95800def868381 100644 --- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java +++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java @@ -135,6 +135,7 @@ public abstract class IAsyncTaskHandler implements Mailbox resourcePackRepository; - @Nullable - private ResourcePackSourceFolder resourcePackFolder; -+ public volatile Thread shutdownThread; // Paper - public CommandDispatcher commandDispatcher; - private final CraftingManager craftingManager; - private final TagRegistry tagRegistry; -@@ -176,7 +177,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant S a(Function function) { + AtomicReference atomicreference = new AtomicReference(); + Thread thread = new Thread(() -> { +@@ -738,6 +740,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 80f1c41062de9251343c3d9be4e076315cdbf88d..4d4912a38ad0bf38a42ac8fed0ad4c1eecaf63a5 100644 +index 7a65b4f2cc6f3430bdad9df95b035ff29c8a2700..a212c3bb7c80948cc329f21c3916f52ec02e06bf 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -400,7 +400,7 @@ public abstract class PlayerList { +@@ -430,7 +430,7 @@ public abstract class PlayerList { cserver.getPluginManager().callEvent(playerQuitEvent); entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); @@ -285,22 +286,22 @@ index 80f1c41062de9251343c3d9be4e076315cdbf88d..4d4912a38ad0bf38a42ac8fed0ad4c1e // Paper start - Remove from collideRule team if needed diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 20d803ad68ea65fd725d6eb3317b998c1692a7b3..aa399e7f6518ff70f2214161319170b1fc911751 100644 +index 3299ac0b0115cb1166c1ee449bd49292e553b7af..dc7a4eabf83d5b74ccde170764dcd1e99f958ee0 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java -@@ -112,6 +112,7 @@ public class SystemUtils { - return SystemUtils.c; +@@ -119,6 +119,7 @@ public class SystemUtils { + return SystemUtils.f; } -+ public static void shutdownServerThreadPool() { f(); } // Paper - OBFHELPER - public static void f() { - SystemUtils.c.shutdown(); - ++ public static void shutdownServerThreadPool() { h(); } // Paper - OBFHELPER + public static void h() { + 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 a52d8a27cee6721c32444d9d2bd81135b7d4b859..bdd0908adb7d3cd5370b43be196c975e6c48a70f 100644 +index d2b3e06dda10fc321768301c35f319767796d7d5..91294ff7e86a997cc81f287517b2ff5529fc0a91 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -793,6 +793,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -840,6 +840,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.exit(); } catch (Throwable throwable) { @@ -308,7 +309,7 @@ index a52d8a27cee6721c32444d9d2bd81135b7d4b859..bdd0908adb7d3cd5370b43be196c975e // 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); -@@ -868,6 +869,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -915,6 +916,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { consumer.accept(entity); } catch (Throwable throwable) { @@ -317,10 +318,10 @@ index a52d8a27cee6721c32444d9d2bd81135b7d4b859..bdd0908adb7d3cd5370b43be196c975e 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/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b627180729a24a83ca383f83aee53133ea1b398e..f49193d9d7cd9655fdedf64bebdcf4e1a9b77f2c 100644 +index 06b56bd65803bddc634d4984b8da29d910d31ee7..b0ab57ef2e45394905a29444daea1d7b3e866875 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1706,7 +1706,7 @@ public final class CraftServer implements Server { +@@ -1761,7 +1761,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { @@ -330,7 +331,7 @@ index b627180729a24a83ca383f83aee53133ea1b398e..f49193d9d7cd9655fdedf64bebdcf4e1 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index d3463abe89f6e730373cef5e3ac8c0911d0b0963..e913d249d850210c9efba1bb46ce2ce4df013a62 100644 +index 5ec16547a20271074d034f7fbcb43e86cb1597e6..429ae482f30eeeab84cc009a9143245e086ce469 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -150,6 +150,37 @@ public class Main { diff --git a/Spigot-Server-Patches/0467-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0447-Optimize-Pathfinding.patch similarity index 91% rename from Spigot-Server-Patches/0467-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0447-Optimize-Pathfinding.patch index b06ced5912..6329d78de1 100644 --- a/Spigot-Server-Patches/0467-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0447-Optimize-Pathfinding.patch @@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index f06764973feaa29ccbb4731b65372c544dcf3032..dc32107ec320fa54487f24c9d68ff8e5a6dea1bb 100644 +index cca6242e38fc286eea810eb8f2e4d1ab5429b9df..e6dc5b9ce1b2f844d84a7cdf9bce030bc8eb568d 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -11,7 +11,7 @@ public abstract class NavigationAbstract { @@ -17,9 +17,9 @@ index f06764973feaa29ccbb4731b65372c544dcf3032..dc32107ec320fa54487f24c9d68ff8e5 - protected PathEntity c; + protected PathEntity c; protected final PathEntity getCurrentPath() { return this.c; } // Paper - OBFHELPER protected double d; - private final AttributeInstance p; protected int e; -@@ -158,10 +158,30 @@ public abstract class NavigationAbstract { + protected int f; +@@ -162,10 +162,30 @@ public abstract class NavigationAbstract { return this.a(this.a(d0, d1, d2, 1), d3); } diff --git a/Spigot-Server-Patches/0469-Reduce-Either-Optional-allocation.patch b/Spigot-Server-Patches/0448-Reduce-Either-Optional-allocation.patch similarity index 100% rename from Spigot-Server-Patches/0469-Reduce-Either-Optional-allocation.patch rename to Spigot-Server-Patches/0448-Reduce-Either-Optional-allocation.patch diff --git a/Spigot-Server-Patches/0470-Remove-streams-from-PairedQueue.patch b/Spigot-Server-Patches/0449-Remove-streams-from-PairedQueue.patch similarity index 100% rename from Spigot-Server-Patches/0470-Remove-streams-from-PairedQueue.patch rename to Spigot-Server-Patches/0449-Remove-streams-from-PairedQueue.patch diff --git a/Spigot-Server-Patches/0472-Reduce-memory-footprint-of-NBTTagCompound.patch b/Spigot-Server-Patches/0450-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 89% rename from Spigot-Server-Patches/0472-Reduce-memory-footprint-of-NBTTagCompound.patch rename to Spigot-Server-Patches/0450-Reduce-memory-footprint-of-NBTTagCompound.patch index 8f36b43e48..1ef08f95cc 100644 --- a/Spigot-Server-Patches/0472-Reduce-memory-footprint-of-NBTTagCompound.patch +++ b/Spigot-Server-Patches/0450-Reduce-memory-footprint-of-NBTTagCompound.patch @@ -8,10 +8,10 @@ is important because we clone chunk data after reading it for safety. So, reduce the impact of the clone on GC. diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 98deaba12ceb25f59d1b56420fb544a64b417ddd..02a2ed1baa3f82d302432b7bc627f3179751f886 100644 +index 9c445902e6adc05773497bc4444203ca364e4f5c..f608b35502890650adfc1df35e0794471f57ecbc 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -31,7 +31,7 @@ public class NBTTagCompound implements NBTBase { +@@ -41,7 +41,7 @@ public class NBTTagCompound implements NBTBase { if (i > 512) { throw new RuntimeException("Tried to read NBT tag with too high complexity, depth > 512"); } else { @@ -20,7 +20,7 @@ index 98deaba12ceb25f59d1b56420fb544a64b417ddd..02a2ed1baa3f82d302432b7bc627f317 byte b0; -@@ -67,7 +67,7 @@ public class NBTTagCompound implements NBTBase { +@@ -77,7 +77,7 @@ public class NBTTagCompound implements NBTBase { } public NBTTagCompound() { @@ -29,7 +29,7 @@ index 98deaba12ceb25f59d1b56420fb544a64b417ddd..02a2ed1baa3f82d302432b7bc627f317 } @Override -@@ -402,9 +402,17 @@ public class NBTTagCompound implements NBTBase { +@@ -409,9 +409,17 @@ public class NBTTagCompound implements NBTBase { @Override public NBTTagCompound clone() { diff --git a/Spigot-Server-Patches/0473-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0451-Prevent-opening-inventories-when-frozen.patch similarity index 86% rename from Spigot-Server-Patches/0473-Prevent-opening-inventories-when-frozen.patch rename to Spigot-Server-Patches/0451-Prevent-opening-inventories-when-frozen.patch index a245aa5c49..3d840fa9a8 100644 --- a/Spigot-Server-Patches/0473-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0451-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 4e4c0acc6c103c85b7ba2a390a54d3513939d547..49fe2d1a0376e5aa8a5ec00d010e6c834633e7b7 100644 +index ec664e43009d0878ac6a2e35ae6b4595eb7aea44..97f03d09d8e7f38b00f407b1268e30a0729d1811 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -380,7 +380,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -423,7 +423,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { containerUpdateDelay = world.paperConfig.containerUpdateTickRate; } // Paper end @@ -17,7 +17,7 @@ index 4e4c0acc6c103c85b7ba2a390a54d3513939d547..49fe2d1a0376e5aa8a5ec00d010e6c83 this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.activeContainer = this.defaultContainer; } -@@ -1170,7 +1170,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1277,7 +1277,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } else { // CraftBukkit start this.activeContainer = container; @@ -26,7 +26,7 @@ index 4e4c0acc6c103c85b7ba2a390a54d3513939d547..49fe2d1a0376e5aa8a5ec00d010e6c83 // CraftBukkit end container.addSlotListener(this); return OptionalInt.of(this.containerCounter); -@@ -1933,7 +1933,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2071,7 +2071,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @Override @@ -36,10 +36,10 @@ index 4e4c0acc6c103c85b7ba2a390a54d3513939d547..49fe2d1a0376e5aa8a5ec00d010e6c83 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index a6d75c0e07a25fdb59dde2e3eb2a0213c7112515..a5e9fc90ffae794b9b14468337ce7b091fd0dc35 100644 +index 1eac3798acfc8a6859f102250bc8e49ed29d6e21..077d1a0f45c304066fedbb1f9b9a05a2e3331e88 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -350,7 +350,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -317,7 +317,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { String title = container.getBukkitView().getTitle(); @@ -48,7 +48,7 @@ index a6d75c0e07a25fdb59dde2e3eb2a0213c7112515..a5e9fc90ffae794b9b14468337ce7b09 getHandle().activeContainer = container; getHandle().activeContainer.addSlotListener(player); } -@@ -420,7 +420,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -387,7 +387,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // Now open the window Containers windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); String title = inventory.getTitle(); diff --git a/Spigot-Server-Patches/0474-Optimise-ArraySetSorted-removeIf.patch b/Spigot-Server-Patches/0452-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from Spigot-Server-Patches/0474-Optimise-ArraySetSorted-removeIf.patch rename to Spigot-Server-Patches/0452-Optimise-ArraySetSorted-removeIf.patch diff --git a/Spigot-Server-Patches/0475-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0453-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 89% rename from Spigot-Server-Patches/0475-Don-t-run-entity-collision-code-if-not-needed.patch rename to Spigot-Server-Patches/0453-Don-t-run-entity-collision-code-if-not-needed.patch index 63d284875c..50c37d080b 100644 --- a/Spigot-Server-Patches/0475-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/Spigot-Server-Patches/0453-Don-t-run-entity-collision-code-if-not-needed.patch @@ -7,10 +7,10 @@ Will not run if max entity craming is disabled and the max collisions per entity is less than or equal to 0 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 4cac47c280a757b09e0b1e3f98c815bb8cd1b3c0..b546537586c3033f696aba9c133490258a9422b2 100644 +index e4c7f4c100e1b8d4470da954a3b72f9e0ec5b494..cee156e0847af3187de8a7c9bc0791dff3886b15 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2666,10 +2666,16 @@ public abstract class EntityLiving extends Entity { +@@ -2814,10 +2814,16 @@ public abstract class EntityLiving extends Entity { protected void doTick() {} protected void collideNearby() { diff --git a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch deleted file mode 100644 index 8677547aa7..0000000000 --- a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Thu, 2 Apr 2020 02:37:57 -0400 -Subject: [PATCH] Optimize Collision to not load chunks - -The collision code takes an AABB and generates a cuboid of checks rather -than a cylinder, so at high velocity this can generate a lot of chunk checks. - -Treat an unloaded chunk as a collision for entities, and also for players if -the "prevent moving into unloaded chunks" setting is enabled. - -If that serting is not enabled, collisions will be ignored for players, since -movement will load only the chunk the player enters anyways and avoids loading -massive amounts of surrounding chunks due to large AABB lookups. - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7434f859f7f9acff0f881ff594c8dffdfa249c76..7fb34a86dc35cb4bf51e1ce5220e56642096fece 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -80,6 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - private CraftEntity bukkitEntity; - - PlayerChunkMap.EntityTracker tracker; // Paper -+ boolean collisionLoadChunks = false; // Paper - Throwable addedToWorldStack; // Paper - entity debug - public CraftEntity getBukkitEntity() { - if (bukkitEntity == null) { -diff --git a/src/main/java/net/minecraft/server/ICollisionAccess.java b/src/main/java/net/minecraft/server/ICollisionAccess.java -index f851ed11df14fd9aa8017f44d82fb6cfc3bde345..3eefbf4d5f10b53f930759a0afa5661253b92c60 100644 ---- a/src/main/java/net/minecraft/server/ICollisionAccess.java -+++ b/src/main/java/net/minecraft/server/ICollisionAccess.java -@@ -43,7 +43,9 @@ public interface ICollisionAccess extends IBlockAccess { - } - - default boolean a(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set set) { -+ try { if (entity != null) entity.collisionLoadChunks = true; // Paper - return this.c(entity, axisalignedbb, set).allMatch(VoxelShape::isEmpty); -+ } finally { if (entity != null) entity.collisionLoadChunks = false; } // Paper - } - - default Stream b(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set set) { -@@ -83,19 +85,33 @@ public interface ICollisionAccess extends IBlockAccess { - } - - while (cursorposition.a()) { -- int k1 = cursorposition.b(); -- int l1 = cursorposition.c(); -- int i2 = cursorposition.d(); -+ int k1 = cursorposition.b();int x = k1; // Paper -+ int l1 = cursorposition.c();int y = l1; // Paper -+ int i2 = cursorposition.d();int z = i2; // Paper - int j2 = cursorposition.e(); - - if (j2 != 3) { -- int k2 = k1 >> 4; -- int l2 = i2 >> 4; -- IBlockAccess iblockaccess = ICollisionAccess.this.c(k2, l2); -- -- if (iblockaccess != null) { -- blockposition_mutableblockposition.d(k1, l1, i2); -- IBlockData iblockdata = iblockaccess.getType(blockposition_mutableblockposition); -+ // Paper start - ensure we don't load chunks -+ //int k2 = k1 >> 4; -+ //int l2 = i2 >> 4; -+ boolean far = entity != null && MCUtil.distanceSq(entity.locX(), y, entity.locZ(), x, y, z) > 14; -+ blockposition_mutableblockposition.setValues(x, y, z); -+ -+ boolean isRegionLimited = ICollisionAccess.this instanceof RegionLimitedWorldAccess; -+ IBlockData iblockdata = isRegionLimited ? Blocks.VOID_AIR.getBlockData() : ((!far && entity instanceof EntityPlayer) || (entity != null && entity.collisionLoadChunks) -+ ? ICollisionAccess.this.getType(blockposition_mutableblockposition) -+ : ICollisionAccess.this.getTypeIfLoaded(blockposition_mutableblockposition) -+ ); -+ if (iblockdata == null) { -+ if (!(entity instanceof EntityPlayer) || entity.world.paperConfig.preventMovingIntoUnloadedChunks) { -+ VoxelShape voxelshape3 = VoxelShapes.of(far ? entity.getBoundingBox() : new AxisAlignedBB(new BlockPosition(x, y, z))); -+ consumer.accept(voxelshape3); -+ return true; -+ } -+ } else { -+ //blockposition_mutableblockposition.d(k1, l1, i2); // moved up -+ //IBlockData iblockdata = iblockaccess.getType(blockposition_mutableblockposition); // moved up -+ // Paper end - - if ((j2 != 1 || iblockdata.f()) && (j2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { - VoxelShape voxelshape2 = iblockdata.b((IBlockAccess) ICollisionAccess.this, blockposition_mutableblockposition, voxelshapecollision); -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 088c82c5379b39f8cebd60465e054b97c96eb983..0e9ba6319472f54a1f77a9d2cdfb86d7490f0572 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -677,6 +677,7 @@ public abstract class PlayerList { - entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); - // CraftBukkit end - -+ worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper - while (avoidSuffocation && !worldserver.getCubes(entityplayer1) && entityplayer1.locY() < 256.0D) { - entityplayer1.setPosition(entityplayer1.locX(), entityplayer1.locY() + 1.0D, entityplayer1.locZ()); - } -diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index 335142ec0dfad822cfe40877e99dec0f307e1a58..e641d4b8d8b4ac5d539e6d9c0eaf345601e0b499 100644 ---- a/src/main/java/net/minecraft/server/VoxelShapes.java -+++ b/src/main/java/net/minecraft/server/VoxelShapes.java -@@ -239,7 +239,8 @@ public final class VoxelShapes { - - if (k2 < 3) { - blockposition_mutableblockposition.a(enumaxiscycle1, i2, j2, l1); -- IBlockData iblockdata = iworldreader.getType(blockposition_mutableblockposition); -+ IBlockData iblockdata = iworldreader.getTypeIfLoaded(blockposition_mutableblockposition); // Paper -+ if (iblockdata == null) return 0.0D; // Paper - - if ((k2 != 1 || iblockdata.f()) && (k2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { - d0 = iblockdata.b((IBlockAccess) iworldreader, blockposition_mutableblockposition, voxelshapecollision).a(enumdirection_enumaxis2, axisalignedbb.d((double) (-blockposition_mutableblockposition.getX()), (double) (-blockposition_mutableblockposition.getY()), (double) (-blockposition_mutableblockposition.getZ())), d0); diff --git a/Spigot-Server-Patches/0476-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch similarity index 74% rename from Spigot-Server-Patches/0476-Optimise-entity-hard-collision-checking.patch rename to Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch index b80a505ed9..c426f1829c 100644 --- a/Spigot-Server-Patches/0476-Optimise-entity-hard-collision-checking.patch +++ b/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch @@ -11,10 +11,10 @@ Less crammed entities are likely to show significantly less benefit. Effectively, this patch optimises crammed entity situations. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 74d110874d0a9c1603d6b2d77753179ba49811ea..cf86ce24e12068d6ff7ae43cb1fd6fe665c24932 100644 +index cb24f27bc443880b18ffc36236f6ec7174c9d493..b65ae2d6919a67498d0646c5522735086fec00c1 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -90,6 +90,54 @@ public class Chunk implements IChunkAccess { +@@ -91,6 +91,54 @@ public class Chunk implements IChunkAccess { private final int[] inventoryEntityCounts = new int[16]; // Paper end @@ -27,7 +27,7 @@ index 74d110874d0a9c1603d6b2d77753179ba49811ea..cf86ce24e12068d6ff7ae43cb1fd6fe6 + } + } + -+ public final void getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, List into) { ++ public final void getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, List into, Predicate predicate) { + // copied from getEntities + int min = MathHelper.floor((axisalignedbb.minY - 2.0D) / 16.0D); + int max = MathHelper.floor((axisalignedbb.maxY + 2.0D) / 16.0D); @@ -43,7 +43,7 @@ index 74d110874d0a9c1603d6b2d77753179ba49811ea..cf86ce24e12068d6ff7ae43cb1fd6fe6 + Entity entity1 = entities[i]; + if (entity1.shouldBeRemoved) continue; // Paper + -+ if (entity1 != entity && entity1.getBoundingBox().intersects(axisalignedbb)) { ++ if (entity1 != entity && entity1.getBoundingBox().intersects(axisalignedbb) && (predicate == null || predicate.test(entity1))) { + into.add(entity1); + + if (!(entity1 instanceof EntityEnderDragon)) { @@ -56,7 +56,7 @@ index 74d110874d0a9c1603d6b2d77753179ba49811ea..cf86ce24e12068d6ff7ae43cb1fd6fe6 + for (int i1 = 0; i1 < l; ++i1) { + EntityComplexPart entitycomplexpart = aentitycomplexpart[i1]; + -+ if (entitycomplexpart != entity && entitycomplexpart.getBoundingBox().intersects(axisalignedbb)) { ++ if (entitycomplexpart != entity && entitycomplexpart.getBoundingBox().intersects(axisalignedbb) && (predicate == null || predicate.test(entitycomplexpart))) { + into.add(entitycomplexpart); + } + } @@ -69,7 +69,7 @@ index 74d110874d0a9c1603d6b2d77753179ba49811ea..cf86ce24e12068d6ff7ae43cb1fd6fe6 public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList ticklist, TickList ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer consumer) { this.sections = new ChunkSection[16]; this.e = Maps.newHashMap(); -@@ -545,7 +593,7 @@ public class Chunk implements IChunkAccess { +@@ -546,7 +594,7 @@ public class Chunk implements IChunkAccess { entity.chunkY = k; entity.chunkZ = this.loc.z; this.entities.add(entity); // Paper - per chunk entity list @@ -78,7 +78,7 @@ index 74d110874d0a9c1603d6b2d77753179ba49811ea..cf86ce24e12068d6ff7ae43cb1fd6fe6 // Paper start if (entity instanceof EntityItem) { itemCounts[k]++; -@@ -582,7 +630,7 @@ public class Chunk implements IChunkAccess { +@@ -583,7 +631,7 @@ public class Chunk implements IChunkAccess { entity.entitySlice = null; entity.inChunk = false; } @@ -88,10 +88,10 @@ index 74d110874d0a9c1603d6b2d77753179ba49811ea..cf86ce24e12068d6ff7ae43cb1fd6fe6 } if (entity instanceof EntityItem) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7fb34a86dc35cb4bf51e1ce5220e56642096fece..f20f798f0f7bb765ffdab8672f4bf77a60fa52d2 100644 +index 8b7f59577416468a89a99954e2a00b3704ffbd40..bf01f4ef7831491ecb29b86f6d459d1e3a767554 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -211,6 +211,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -212,6 +212,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end @@ -106,9 +106,9 @@ index 7fb34a86dc35cb4bf51e1ce5220e56642096fece..f20f798f0f7bb765ffdab8672f4bf77a + Boolean hardCollides = cachedOverrides.get(this.getClass()); + if (hardCollides == null) { + try { -+ Object getHardCollisionBoxMethod = Entity.class.getMethod("au"); ++ Object getHardCollisionBoxMethod = Entity.class.getMethod("ay"); + Object getHardCollisionBoxEntityMethod = Entity.class.getMethod("j", Entity.class); -+ if (!this.getClass().getMethod("au").equals(getHardCollisionBoxMethod)) { ++ if (!this.getClass().getMethod("ay").equals(getHardCollisionBoxMethod)) { + hardCollides = Boolean.TRUE; + } else if (!this.getClass().getMethod("j", Entity.class).equals(getHardCollisionBoxEntityMethod)) { + hardCollides = Boolean.TRUE; @@ -133,61 +133,73 @@ index 7fb34a86dc35cb4bf51e1ce5220e56642096fece..f20f798f0f7bb765ffdab8672f4bf77a this.id = Entity.entityCount.incrementAndGet(); this.passengers = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 5bf99e0028b886a6ba1d2f39f8dc4cd3c9aa0943..aecdaacfc7da560759bc513680d76f55820d5046 100644 +index ac12d782539a5f502e8996eb39eb2ddbab46f756..43e3755f0fa75b5f72ec620f3f6647ef6bce38c5 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -847,6 +847,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { +@@ -844,6 +844,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { @Override public void checkDespawn() {} -+ public final EntityComplexPart[] getComplexParts() { return this.eo(); } // Paper - OBFHELPER - public EntityComplexPart[] eo() { ++ public final EntityComplexPart[] getComplexParts() { return this.eK(); } // Paper - OBFHELPER + public EntityComplexPart[] eK() { return this.children; } diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java -index 4157e50e4d99c029759bffcb48a8d645487554c8..5135308fb6137a34ed6fd061f0a210de6de4e81c 100644 +index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..24705eef5514bfb078bea6f87e5457e73cee2d5e 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java +++ b/src/main/java/net/minecraft/server/IEntityAccess.java -@@ -42,17 +42,26 @@ public interface IEntityAccess { - return this.b(oclass, axisalignedbb, IEntitySelector.f); +@@ -53,24 +53,36 @@ public interface IEntityAccess { + return this.b(oclass, axisalignedbb, IEntitySelector.g); } + // Paper start - optimise hard collision + /** + * Not guaranteed to only return hard colliding entites + */ -+ default List getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb) { ++ default List getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate) { + return this.getEntities(entity, axisalignedbb); + } + // Paper end - optimise hard collision + - default Stream b(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set set) { + default Stream c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate) { if (axisalignedbb.a() < 1.0E-7D) { return Stream.empty(); } else { AxisAlignedBB axisalignedbb1 = axisalignedbb.g(1.0E-7D); -- Stream stream = this.getEntities(entity, axisalignedbb1).stream().filter((entity1) -> { // Paper - decompile fix -+ Stream stream = ((entity != null && entity.hardCollides()) ? this.getEntities(entity, axisalignedbb) : this.getHardCollidingEntities(entity, axisalignedbb1)).stream().filter((entity1) -> { // Paper - decompile fix // Paper - optimise hard collision - return !set.contains(entity1); - }).filter((entity1) -> { - return entity == null || !entity.isSameVehicle(entity1); - }).flatMap((entity1) -> { -- return Stream.of(entity1.au(), entity == null ? null : entity.j(entity1)); -+ return Stream.of(entity1.au(), entity == null ? null : entity.j(entity1)); // Paper - optimise hard collision - diff on change, these are the methods that only hard colliding entities override - }).filter(Objects::nonNull); - return stream.filter(axisalignedbb1::c).map(VoxelShapes::a); +- return this.getEntities(entity, axisalignedbb1, predicate.and((entity1) -> { ++ // Paper start ++ Predicate effectivePredicate = predicate.and((entity1) -> { + return entity == null || !entity.isSameVehicle(entity1); +- })).stream().flatMap((entity1) -> { ++ }); ++ ++ return ((entity != null && entity.hardCollides()) ? this.getEntities(entity, axisalignedbb, effectivePredicate) : this.getHardCollidingEntities(entity, axisalignedbb1, effectivePredicate)).stream().flatMap((entity1) -> { + if (entity != null) { +- AxisAlignedBB axisalignedbb2 = entity.j(entity1); ++ AxisAlignedBB axisalignedbb2 = entity.j(entity1); // Paper - diff on change, hard collision box method + + if (axisalignedbb2 != null && axisalignedbb2.c(axisalignedbb1)) { + return Stream.of(entity1.ay(), axisalignedbb2); + } + } + +- return Stream.of(entity1.ay()); ++ return Stream.of(entity1.ay()); // Paper - diff on change, hard collision box method + }).filter(Objects::nonNull).map(VoxelShapes::a); + } + } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index bdd0908adb7d3cd5370b43be196c975e6c48a70f..1c7955d3ae7ddd1c2d924cec20a91202cf090f40 100644 +index 91294ff7e86a997cc81f287517b2ff5529fc0a91..cafa47b90320249f84cd1cc4aca1908a4982bffb 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1179,6 +1179,32 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1105,6 +1105,32 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.getChunkAt(i, j, ChunkStatus.FULL, false); } + // Paper start - optimise hard collision handling + @Override -+ public List getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb) { ++ public List getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate) { + // copied from below + List list = Lists.newArrayList(); + int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D); @@ -195,14 +207,14 @@ index bdd0908adb7d3cd5370b43be196c975e6c48a70f..1c7955d3ae7ddd1c2d924cec20a91202 + int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D); + int l = MathHelper.floor((axisalignedbb.maxZ + 2.0D) / 16.0D); + -+ ChunkProviderServer chunkProvider = ((ChunkProviderServer)this.chunkProvider); ++ ChunkProviderServer chunkProvider = ((WorldServer)this).getChunkProvider(); + + for (int i1 = i; i1 <= j; ++i1) { + for (int j1 = k; j1 <= l; ++j1) { + Chunk chunk = chunkProvider.getChunkAtIfLoadedMainThread(i1, j1); + + if (chunk != null) { -+ chunk.getHardCollidingEntities(entity, axisalignedbb, list); ++ chunk.getHardCollidingEntities(entity, axisalignedbb, list, predicate); + } + } + } diff --git a/Spigot-Server-Patches/0477-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0455-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch similarity index 74% rename from Spigot-Server-Patches/0477-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch rename to Spigot-Server-Patches/0455-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch index 9bd9a6f1eb..368e1ea8c2 100644 --- a/Spigot-Server-Patches/0477-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch +++ b/Spigot-Server-Patches/0455-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch @@ -9,16 +9,16 @@ 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 b6146330a55665a0365ff7474f1843766e0c0ce1..695d12e1942018be6a9e8c999ba6071b9f778568 100644 +index d1f832db33f21f8ba910d2c0c163af78718d298f..91755cd7313d87bae85584dff140acbc6467428f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -617,27 +617,37 @@ 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) { - long i = ChunkCoordIntPair.pair(MathHelper.floor(entity.locX()) >> 4, MathHelper.floor(entity.locZ()) >> 4); - -- return this.a(i, PlayerChunk::b); +- return this.a(i, (Function>>) PlayerChunk::b); // CraftBukkit - decompile error + // Paper start - optimize is ticking ready type functions + // entity ticking + PlayerChunk playerChunk = this.getChunk(MCUtil.getCoordinateKey(entity)); @@ -28,7 +28,7 @@ index b6146330a55665a0365ff7474f1843766e0c0ce1..695d12e1942018be6a9e8c999ba6071b public final boolean isEntityTickingChunk(ChunkCoordIntPair chunkcoordintpair) { return this.a(chunkcoordintpair); } // Paper - OBFHELPER @Override public boolean a(ChunkCoordIntPair chunkcoordintpair) { -- return this.a(chunkcoordintpair.pair(), PlayerChunk::b); +- return this.a(chunkcoordintpair.pair(), (Function>>) PlayerChunk::b); // CraftBukkit - decompile error + // Paper start - optimize is ticking ready type functions + // is entity ticking ready + PlayerChunk playerChunk = this.getChunk(MCUtil.getCoordinateKey(chunkcoordintpair)); @@ -40,7 +40,7 @@ index b6146330a55665a0365ff7474f1843766e0c0ce1..695d12e1942018be6a9e8c999ba6071b public boolean a(BlockPosition blockposition) { - long i = ChunkCoordIntPair.pair(blockposition.getX() >> 4, blockposition.getZ() >> 4); - -- return this.a(i, PlayerChunk::a); +- return this.a(i, (Function>>) PlayerChunk::a); // CraftBukkit - decompile error + // Paper start - optimize is ticking ready type functions + // is ticking ready + PlayerChunk playerChunk = this.getChunk(MCUtil.getCoordinateKey(blockposition)); @@ -48,15 +48,4 @@ index b6146330a55665a0365ff7474f1843766e0c0ce1..695d12e1942018be6a9e8c999ba6071b + // Paper end - optimize is ticking ready type functions } - public boolean b(Entity entity) { -- long i = ChunkCoordIntPair.pair(MathHelper.floor(entity.locX()) >> 4, MathHelper.floor(entity.locZ()) >> 4); -- -- return this.a(i, PlayerChunk::c); -+ // Paper start - optimize is ticking ready type functions -+ // is full chunk ready -+ PlayerChunk playerChunk = this.getChunk(MCUtil.getCoordinateKey(entity)); -+ return playerChunk != null && playerChunk.isFullChunkReady(); -+ // Paper end - optimize is ticking ready type functions - } - private boolean a(long i, Function>> function) { diff --git a/Spigot-Server-Patches/0478-Restrict-vanilla-teleport-command-to-valid-locations.patch b/Spigot-Server-Patches/0456-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 77% rename from Spigot-Server-Patches/0478-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to Spigot-Server-Patches/0456-Restrict-vanilla-teleport-command-to-valid-locations.patch index 9cfca0614e..12eb7b480e 100644 --- a/Spigot-Server-Patches/0478-Restrict-vanilla-teleport-command-to-valid-locations.patch +++ b/Spigot-Server-Patches/0456-Restrict-vanilla-teleport-command-to-valid-locations.patch @@ -6,19 +6,19 @@ Subject: [PATCH] Restrict vanilla teleport command to valid locations Fixes GH-3165, GH-3575 diff --git a/src/main/java/net/minecraft/server/CommandTeleport.java b/src/main/java/net/minecraft/server/CommandTeleport.java -index 3060b4f68b13abe05d31b85bb49690a0b476939f..cc00cd0b44b23c76c627b5d51362a22273f7bac4 100644 +index 75c2c7f191f0a9704017ff08766cc920fa8a7270..203373c3bb97d331ff6c6b9e21ae4cbc8b173fe6 100644 --- a/src/main/java/net/minecraft/server/CommandTeleport.java +++ b/src/main/java/net/minecraft/server/CommandTeleport.java -@@ -116,6 +116,12 @@ public class CommandTeleport { - } +@@ -119,6 +119,12 @@ public class CommandTeleport { - private static void a(CommandListenerWrapper commandlistenerwrapper, Entity entity, WorldServer worldserver, double d0, double d1, double d2, Set set, float f, float f1, @Nullable CommandTeleport.a commandteleport_a) { + private static void a(CommandListenerWrapper commandlistenerwrapper, Entity entity, WorldServer worldserver, double d0, double d1, double d2, Set set, float f, float f1, @Nullable CommandTeleport.a commandteleport_a) throws CommandSyntaxException { + BlockPosition blockposition = new BlockPosition(d0, d1, d2); + // Paper start - Don't allow teleport command to invalid locations + if (d0 <= -30000000 || d2 <= -30000000 || d0 > 30000000 || d2 > 30000000 || d1 > 30000000 || d1 <= -30000000) { // Copy/pasta from BaseBlockPosition#isValidLocation + org.bukkit.Bukkit.getLogger().warning("Refused to teleport " + entity.getName() + " to " + d0 + ", " + d1 + ", " + d2); + return; + } + // Paper end - if (entity instanceof EntityPlayer) { - ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(d0, d1, d2)); + if (!World.k(blockposition)) { + throw CommandTeleport.a.create(); diff --git a/Spigot-Server-Patches/0479-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch similarity index 81% rename from Spigot-Server-Patches/0479-Implement-Player-Client-Options-API.patch rename to Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch index 2126083443..b9c0b95810 100644 --- a/Spigot-Server-Patches/0479-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch @@ -85,20 +85,20 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb + } +} diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index c4d433430503e844121f1917c6caf05823af0a34..7df24be46e4471ae0ddad5cded5eef4937fd37a3 100644 +index 0bf9de73e800cbbe0553bf491cb1546bb1677b63..e6bf2b5268c03edfb3205f13a963ec1d9388526c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -35,7 +35,7 @@ public abstract class EntityHuman extends EntityLiving { - private static final Map b = ImmutableMap.builder().put(EntityPose.STANDING, EntityHuman.bp).put(EntityPose.SLEEPING, EntityHuman.ap).put(EntityPose.FALL_FLYING, EntitySize.b(0.6F, 0.6F)).put(EntityPose.SWIMMING, EntitySize.b(0.6F, 0.6F)).put(EntityPose.SPIN_ATTACK, EntitySize.b(0.6F, 0.6F)).put(EntityPose.CROUCHING, EntitySize.b(0.6F, 1.5F)).put(EntityPose.DYING, EntitySize.c(0.2F, 0.2F)).build(); +@@ -36,7 +36,7 @@ public abstract class EntityHuman extends EntityLiving { + private static final Map b = ImmutableMap.builder().put(EntityPose.STANDING, EntityHuman.bo).put(EntityPose.SLEEPING, EntityHuman.ao).put(EntityPose.FALL_FLYING, EntitySize.b(0.6F, 0.6F)).put(EntityPose.SWIMMING, EntitySize.b(0.6F, 0.6F)).put(EntityPose.SPIN_ATTACK, EntitySize.b(0.6F, 0.6F)).put(EntityPose.CROUCHING, EntitySize.b(0.6F, 1.5F)).put(EntityPose.DYING, EntitySize.c(0.2F, 0.2F)).build(); private static final DataWatcherObject c = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.c); private static final DataWatcherObject d = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.b); -- protected static final DataWatcherObject bq = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.a); -+ protected static final DataWatcherObject bq = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.a); public static DataWatcherObject getSkinPartsWatcher() { return bq; } // Paper - OBFHELPER - protected static final DataWatcherObject br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.a); +- protected static final DataWatcherObject bp = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.a); ++ protected static final DataWatcherObject bp = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.a); public static DataWatcherObject getSkinPartsWatcher() { return bp; } // Paper - OBFHELPER + protected static final DataWatcherObject bq = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.a); + protected static final DataWatcherObject br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); - protected static final DataWatcherObject bt = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 49fe2d1a0376e5aa8a5ec00d010e6c834633e7b7..64e00275edf38739fe6e2d79dbcb93243e765678 100644 +index 97f03d09d8e7f38b00f407b1268e30a0729d1811..0683e163fa6081d4382b3f4635bc52b646b9dd54 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -108,35 +108,39 @@ index 49fe2d1a0376e5aa8a5ec00d010e6c834633e7b7..64e00275edf38739fe6e2d79dbcb9324 +import com.destroystokyo.paper.event.player.PlayerClientOptionsChangeEvent; // Paper import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; - import io.netty.util.concurrent.Future; + import com.mojang.serialization.DataResult; @@ -59,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int lastSentExp = -99999999; public int invulnerableTicks = 60; - private EnumChatVisibility ch; -- private boolean ci = true; -+ private boolean ci = true; public boolean hasChatColorsEnabled() { return this.ci; } // Paper - OBFHELPER - private long cj = SystemUtils.getMonotonicMillis(); + private EnumChatVisibility cf; +- private boolean cg = true; ++ private boolean cg = true; public boolean hasChatColorsEnabled() { return this.cg; } // Paper - OBFHELPER + private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1573,6 +1574,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - } +@@ -1681,6 +1682,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + public String locale = null; // CraftBukkit - lowercase // Paper - default to null public void a(PacketPlayInSettings packetplayinsettings) { + new PlayerClientOptionsChangeEvent(getBukkitEntity(), packetplayinsettings.getLocale(), packetplayinsettings.viewDistance, com.destroystokyo.paper.ClientOption.ChatVisibility.valueOf(packetplayinsettings.getChatVisibility().name()), packetplayinsettings.hasChatColorsEnabled(), new com.destroystokyo.paper.PaperSkinParts(packetplayinsettings.getSkinParts()), packetplayinsettings.getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT).callEvent(); // Paper - settings event // CraftBukkit start if (getMainHand() != packetplayinsettings.getMainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT); diff --git a/src/main/java/net/minecraft/server/PacketPlayInSettings.java b/src/main/java/net/minecraft/server/PacketPlayInSettings.java -index 8faebf9efed7c3529b151fddf8246e8c77a8b693..4da637138190c9b749d986ac32dddc051931d58f 100644 +index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3feca10d14 100644 --- a/src/main/java/net/minecraft/server/PacketPlayInSettings.java +++ b/src/main/java/net/minecraft/server/PacketPlayInSettings.java -@@ -37,18 +37,22 @@ public class PacketPlayInSettings implements Packet { - packetlistenerplayin.a(this); - } +@@ -4,7 +4,7 @@ import java.io.IOException; -+ public String getLocale() { return b(); } // Paper - OBFHELPER - public String b() { - return this.a; + public class PacketPlayInSettings implements Packet { + +- public String locale; ++ public String locale; public String getLocale() { return this.locale; } // Paper - OBFHELPER + public int viewDistance; + private EnumChatVisibility c; + private boolean d; +@@ -37,14 +37,17 @@ public class PacketPlayInSettings implements Packet { + packetlistenerplayin.a(this); } + public EnumChatVisibility getChatVisibility() { return d(); } // Paper - OBFHELPER @@ -154,7 +158,7 @@ index 8faebf9efed7c3529b151fddf8246e8c77a8b693..4da637138190c9b749d986ac32dddc05 return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 71d5ebe8c6ea2d52886c28e0fdc55e5993238709..bd4d5184b607db09c8ff2687ceaf47fb94368a28 100644 +index 4bef2d3c8318da57e5721d728953f8d5ac6b0ff6..b28e5abea5d2585d9beff574dd82651e7d20275b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ @@ -166,15 +170,7 @@ index 71d5ebe8c6ea2d52886c28e0fdc55e5993238709..bd4d5184b607db09c8ff2687ceaf47fb import com.destroystokyo.paper.Title; import com.destroystokyo.paper.profile.CraftPlayerProfile; import com.destroystokyo.paper.profile.PlayerProfile; -@@ -36,6 +39,7 @@ import net.minecraft.server.BlockPosition; - import net.minecraft.server.ChatComponentText; - import net.minecraft.server.Container; - import net.minecraft.server.Entity; -+import net.minecraft.server.EntityHuman; - import net.minecraft.server.EntityLiving; - import net.minecraft.server.EntityPlayer; - import net.minecraft.server.EnumColor; -@@ -1968,6 +1972,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2008,6 +2011,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO } diff --git a/Spigot-Server-Patches/0480-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0458-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 80% rename from Spigot-Server-Patches/0480-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to Spigot-Server-Patches/0458-Fix-Chunk-Post-Processing-deadlock-risk.patch index 3cc4ccdb74..f7dc818e08 100644 --- a/Spigot-Server-Patches/0480-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/Spigot-Server-Patches/0458-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 695d12e1942018be6a9e8c999ba6071b9f778568..665d83042dab467cddf315fade883fd55ffc8bfd 100644 +index 91755cd7313d87bae85584dff140acbc6467428f..0080a0cbe58d1a81c434ef97659428c8bf1ec290 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1050,6 +1050,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -994,6 +994,7 @@ public class ChunkProviderServer extends IChunkProvider { return super.executeNext() || execChunkTask; // Paper } } finally { @@ -37,10 +37,10 @@ index 695d12e1942018be6a9e8c999ba6071b9f778568..665d83042dab467cddf315fade883fd5 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 6bdaaf8daef15cd7c11943254e412e0e2d2898fb..48f858388029e77f710365e73905f8570f1103f5 100644 +index ba100e5c96d5279ab5f30c6e10f3cbd7b6b4443e..a44702e805c24fba63ef17534032fc29fb4a2c3f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -131,6 +131,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -133,6 +133,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; // CraftBukkit end @@ -49,12 +49,12 @@ index 6bdaaf8daef15cd7c11943254e412e0e2d2898fb..48f858388029e77f710365e73905f857 // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); -@@ -987,7 +989,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -995,7 +997,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return Either.left(chunk); }); }, (runnable) -> { -- this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); // CraftBukkit - decompile error -+ this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, () -> PlayerChunkMap.this.chunkLoadConversionCallbackExecutor.execute(runnable))); // CraftBukkit - decompile error // Paper - delay running Chunk post processing until outside of the sorter to prevent a deadlock scenario when post processing causes another chunk request. +- this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); ++ this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, () -> PlayerChunkMap.this.chunkLoadConversionCallbackExecutor.execute(runnable))); // Paper - delay running Chunk post processing until outside of the sorter to prevent a deadlock scenario when post processing causes another chunk request. }); completablefuture1.thenAcceptAsync((either) -> { diff --git a/Spigot-Server-Patches/0481-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/Spigot-Server-Patches/0459-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 79% rename from Spigot-Server-Patches/0481-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to Spigot-Server-Patches/0459-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch index fae600572c..fd6daa9573 100644 --- a/Spigot-Server-Patches/0481-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch +++ b/Spigot-Server-Patches/0459-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch @@ -7,11 +7,11 @@ 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 83da76fdc495225b563cecbdb71422aec2b534f3..10e385eb556faff954df28ed0b3ddaceac2b8baa 100644 +index d5b50a6a6816421c0443ae36213932b16ed5c797..32d3887e2542c4ebba4a7498167fbe4b497a71ce 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.u().pair(); + long i = sectionposition.r().pair(); ObjectSet objectset = (ObjectSet) this.c.get(i); - objectset.remove(entityplayer); @@ -19,5 +19,5 @@ index 83da76fdc495225b563cecbdb71422aec2b534f3..10e385eb556faff954df28ed0b3ddace + 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); - this.f.b(i, Integer.MAX_VALUE, false); - this.g.b(i, Integer.MAX_VALUE, false); + this.f.update(i, Integer.MAX_VALUE, false); + this.g.update(i, Integer.MAX_VALUE, false); diff --git a/Spigot-Server-Patches/0482-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0460-Broadcast-join-message-to-console.patch similarity index 83% rename from Spigot-Server-Patches/0482-Broadcast-join-message-to-console.patch rename to Spigot-Server-Patches/0460-Broadcast-join-message-to-console.patch index 36a66ac469..a1cd06dfcd 100644 --- a/Spigot-Server-Patches/0482-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0460-Broadcast-join-message-to-console.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4d4912a38ad0bf38a42ac8fed0ad4c1eecaf63a5..3d6509786cba4307898c4485f6865e3f55ebb13b 100644 +index a212c3bb7c80948cc329f21c3916f52ec02e06bf..769f8c147c8104ab21a33abb1471f76f3729f2b2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -188,9 +188,9 @@ public abstract class PlayerList { +@@ -212,9 +212,9 @@ public abstract class PlayerList { joinMessage = playerJoinEvent.getJoinMessage(); if (joinMessage != null && joinMessage.length() > 0) { - for (IChatBaseComponent line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) { -- server.getPlayerList().sendAll(new PacketPlayOutChat(line)); +- server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b)); - } + // Paper start - Removed sendAll for loop and broadcasted to console also + server.getPlayerList().sendMessage(CraftChatMessage.fromString(joinMessage)); diff --git a/Spigot-Server-Patches/0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 88% rename from Spigot-Server-Patches/0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index a668639175..96ee28841b 100644 --- a/Spigot-Server-Patches/0483-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 64e00275edf38739fe6e2d79dbcb93243e765678..a87aa07b17205b52e85f7d082fa4d5169771cbb4 100644 +index 0683e163fa6081d4382b3f4635bc52b646b9dd54..b3429f001397ed7cbcdfeb12c8f47e5face209a3 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -100,6 +100,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -104,6 +104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -40,22 +40,22 @@ index 64e00275edf38739fe6e2d79dbcb93243e765678..a87aa07b17205b52e85f7d082fa4d516 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 48f858388029e77f710365e73905f8570f1103f5..2caa53a7e143aae32918ecbefc1bdadcab8d61ed 100644 +index a44702e805c24fba63ef17534032fc29fb4a2c3f..ee38ab87ba477e8bf5b739759371439b299f21f3 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1503,6 +1503,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1534,6 +1534,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { .printStackTrace(); return; } + if (entity instanceof EntityPlayer && ((EntityPlayer) entity).supressTrackerForLogin) return; // Delay adding to tracker until after list packets // Paper end if (!(entity instanceof EntityComplexPart)) { - if (!(entity instanceof EntityLightning)) { + EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3d6509786cba4307898c4485f6865e3f55ebb13b..d9fff5836e6f4b8a14fea1db66c5a89b43b2b952 100644 +index 769f8c147c8104ab21a33abb1471f76f3729f2b2..f8c12055330794039347336fe2ab9ab52f413323 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -177,6 +177,12 @@ public abstract class PlayerList { +@@ -201,6 +201,12 @@ public abstract class PlayerList { this.j.put(entityplayer.getUniqueID(), entityplayer); // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below @@ -68,7 +68,7 @@ index 3d6509786cba4307898c4485f6865e3f55ebb13b..d9fff5836e6f4b8a14fea1db66c5a89b // CraftBukkit start PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); cserver.getPluginManager().callEvent(playerJoinEvent); -@@ -211,6 +217,8 @@ public abstract class PlayerList { +@@ -235,6 +241,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer1})); } entityplayer.sentListPacket = true; @@ -77,7 +77,7 @@ index 3d6509786cba4307898c4485f6865e3f55ebb13b..d9fff5836e6f4b8a14fea1db66c5a89b // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -236,6 +244,11 @@ public abstract class PlayerList { +@@ -260,6 +268,11 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobeffect)); } @@ -89,7 +89,7 @@ index 3d6509786cba4307898c4485f6865e3f55ebb13b..d9fff5836e6f4b8a14fea1db66c5a89b if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -277,6 +290,10 @@ public abstract class PlayerList { +@@ -308,6 +321,10 @@ public abstract class PlayerList { } } diff --git a/Spigot-Server-Patches/0484-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch similarity index 76% rename from Spigot-Server-Patches/0484-Load-Chunks-for-Login-Asynchronously.patch rename to Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch index 2d0d6beed2..ed6b8944c2 100644 --- a/Spigot-Server-Patches/0484-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch @@ -4,32 +4,45 @@ Date: Sun, 19 Apr 2020 04:28:29 -0400 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 0080a0cbe58d1a81c434ef97659428c8bf1ec290..eebd4c50a7324250d3ebe7060739a71af4243f72 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -604,7 +604,7 @@ public class ChunkProviderServer extends IChunkProvider { + return this.serverThreadQueue.executeNext(); + } + +- private boolean tickDistanceManager() { ++ public boolean tickDistanceManager() { // Paper - private -> public + boolean flag = this.chunkMapDistance.a(this.playerChunkMap); + 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 f20f798f0f7bb765ffdab8672f4bf77a60fa52d2..9eab570e48817e18d10ddde95b3f80f7e4ea4766 100644 +index bf01f4ef7831491ecb29b86f6d459d1e3a767554..26cfb843fd54de475190b793d9a206d798d54268 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1384,7 +1384,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1327,7 +1327,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F; this.lastYaw = this.yaw; this.lastPitch = this.pitch; -- world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit -+ if (valid) world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit // Paper +- world.getChunkAt((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4); // CraftBukkit ++ if (valid) world.getChunkAt((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4); // CraftBukkit // Paper } - public void setPositionRotation(BlockPosition blockposition, float f, float f1) { + public void c(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index a87aa07b17205b52e85f7d082fa4d5169771cbb4..79c2187b7383336e7574709e6d4ad805e557976f 100644 +index b3429f001397ed7cbcdfeb12c8f47e5face209a3..c26236ff4ab56506c51d4e215cfe4fb76bed26ed 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + private static final Logger LOGGER = LogManager.getLogger(); - public String locale = null; // CraftBukkit - lowercase // Paper - default to null public PlayerConnection playerConnection; + public NetworkManager networkManager; // Paper public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; public final Deque removeQueue = new ArrayDeque<>(); // Paper -@@ -101,6 +102,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -105,6 +106,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper @@ -38,29 +51,29 @@ index a87aa07b17205b52e85f7d082fa4d5169771cbb4..79c2187b7383336e7574709e6d4ad805 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index f1222fcb2bd52b8781d0f92c94e1472fa7b1e493..28f48f22522ef8c3c66381abcf017f0859b45290 100644 +index 8c5c57ecd98a286a4992a36effae95596b37fc8a..28a3040ac9cf705d05ec459a29cd7147770389be 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -66,7 +66,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -65,7 +65,7 @@ public class LoginListener implements PacketLoginInListener { } // Paper end } else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) { -- EntityPlayer entityplayer = this.server.getPlayerList().a(this.i.getId()); +- EntityPlayer entityplayer = this.server.getPlayerList().getPlayer(this.i.getId()); + EntityPlayer entityplayer = this.server.getPlayerList().getActivePlayer(this.i.getId()); // Paper if (entityplayer == null) { this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; -@@ -165,7 +165,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -164,7 +164,7 @@ public class LoginListener implements PacketLoginInListener { } this.networkManager.sendPacket(new PacketLoginOutSuccess(this.i)); -- EntityPlayer entityplayer = this.server.getPlayerList().a(this.i.getId()); +- EntityPlayer entityplayer = this.server.getPlayerList().getPlayer(this.i.getId()); + EntityPlayer entityplayer = this.server.getPlayerList().getActivePlayer(this.i.getId()); // Paper if (entityplayer != null) { this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4be93d12dbe12511628fd97af52d5cf78da17eaa..6dd4303c1c211ac4b0bb542ea96cc150581bf8c1 100644 +index 651ecb50c2b06ca81cb9a2286d77fd41a17b5140..1099a46aa05f12572100994ea251f0d55c66ef80 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -69,6 +69,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -97,10 +110,10 @@ index 4be93d12dbe12511628fd97af52d5cf78da17eaa..6dd4303c1c211ac4b0bb542ea96cc150 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9f79203a8 100644 +index f8c12055330794039347336fe2ab9ab52f413323..e0a95fde93d4a2339831cb8ea0918174e9914e34 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -16,6 +16,7 @@ import java.util.Map; +@@ -18,6 +18,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.UUID; @@ -108,7 +121,7 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 import javax.annotation.Nullable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -52,11 +53,12 @@ public abstract class PlayerList { +@@ -54,11 +55,12 @@ public abstract class PlayerList { private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z"); private final MinecraftServer server; public final List players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety @@ -122,7 +135,7 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 // CraftBukkit start // private final Map o; // private final Map p; -@@ -94,6 +96,11 @@ public abstract class PlayerList { +@@ -97,6 +99,11 @@ public abstract class PlayerList { } public void a(NetworkManager networkmanager, EntityPlayer entityplayer) { @@ -134,21 +147,22 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 entityplayer.loginTime = System.currentTimeMillis(); // Paper GameProfile gameprofile = entityplayer.getProfile(); UserCache usercache = this.server.getUserCache(); -@@ -107,7 +114,7 @@ public abstract class PlayerList { +@@ -110,7 +117,7 @@ public abstract class PlayerList { if (nbttagcompound != null && nbttagcompound.hasKey("bukkit")) { NBTTagCompound bukkit = nbttagcompound.getCompound("bukkit"); s = bukkit.hasKeyOfType("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s; - } + }String lastKnownName = s; // Paper - if (nbttagcompound == null) entityplayer.moveToSpawn(worldserver); // Paper - only move to spawn on first login, otherwise, stay where you are.... // CraftBukkit end -@@ -160,6 +167,52 @@ public abstract class PlayerList { + if (nbttagcompound != null) { +@@ -184,6 +191,53 @@ public abstract class PlayerList { entityplayer.B().a(entityplayer); - this.sendScoreboard(worldserver.getScoreboard(), entityplayer); + this.sendScoreboard(worldserver1.getScoreboard(), entityplayer); this.server.invalidatePingSample(); + // Paper start - async load spawn in chunk + WorldServer finalWorldserver = worldserver; ++ WorldServer finalWorldserver1 = worldserver1; + int chunkX = loc.getBlockX() >> 4; + int chunkZ = loc.getBlockZ() >> 4; + final ChunkCoordIntPair pos = new ChunkCoordIntPair(chunkX, chunkZ); @@ -165,7 +179,7 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 + }).thenAccept(chunk -> { + playerconnection.playerJoinReady = () -> { + postChunkLoadJoin( -+ entityplayer, finalWorldserver, networkmanager, playerconnection, ++ entityplayer, finalWorldserver, finalWorldserver1, networkmanager, playerconnection, + nbttagcompound, networkmanager.getSocketAddress().toString(), lastKnownName + ); + //playerChunkMap.chunkDistanceManager.removeTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); @@ -186,7 +200,7 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 + }); + } + -+ private void postChunkLoadJoin(EntityPlayer entityplayer, WorldServer worldserver, NetworkManager networkmanager, PlayerConnection playerconnection, NBTTagCompound nbttagcompound, String s1, String s) { ++ private void postChunkLoadJoin(EntityPlayer entityplayer, WorldServer worldserver, WorldServer worldserver1, NetworkManager networkmanager, PlayerConnection playerconnection, NBTTagCompound nbttagcompound, String s1, String s) { + pendingPlayers.remove(entityplayer.getUniqueID(), entityplayer); + if (!networkmanager.isConnected()) { + return; @@ -196,7 +210,16 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 ChatMessage chatmessage; if (entityplayer.getProfile().getName().equalsIgnoreCase(s)) { -@@ -218,7 +271,6 @@ public abstract class PlayerList { +@@ -205,7 +259,7 @@ public abstract class PlayerList { + entityplayer.supressTrackerForLogin = true; + worldserver.addPlayerJoin(entityplayer); + this.server.getBossBattleCustomData().a(entityplayer); // see commented out section below worldserver.addPlayerJoin(entityplayer); +- mountSavedVehicle(entityplayer, worldserver, nbttagcompound); ++ mountSavedVehicle(entityplayer, worldserver, worldserver1, nbttagcompound); + // Paper end + // CraftBukkit start + PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); +@@ -242,7 +296,6 @@ public abstract class PlayerList { } entityplayer.sentListPacket = true; entityplayer.supressTrackerForLogin = false; // Paper @@ -204,15 +227,19 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -245,6 +297,7 @@ public abstract class PlayerList { +@@ -269,9 +322,10 @@ public abstract class PlayerList { } // Paper start - move vehicle into method so it can be called above - short circuit around that code + ((WorldServer)entityplayer.world).getChunkProvider().playerChunkMap.addEntity(entityplayer); // track entity now onPlayerJoinFinish(entityplayer, worldserver, s1); } - private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver, NBTTagCompound nbttagcompound) { -@@ -390,6 +443,7 @@ public abstract class PlayerList { +- private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver, NBTTagCompound nbttagcompound) { ++ private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver, WorldServer worldserver1, NBTTagCompound nbttagcompound) { + // Paper end + if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { + NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); +@@ -420,6 +474,7 @@ public abstract class PlayerList { protected void savePlayerFile(EntityPlayer entityplayer) { if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -220,7 +247,7 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -414,7 +468,7 @@ public abstract class PlayerList { +@@ -444,7 +499,7 @@ public abstract class PlayerList { entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); @@ -229,7 +256,7 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -466,6 +520,13 @@ public abstract class PlayerList { +@@ -497,6 +552,13 @@ public abstract class PlayerList { // this.p.remove(uuid); // CraftBukkit end } @@ -242,8 +269,8 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 + // Paper end // CraftBukkit start - // this.sendAll(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -483,7 +544,7 @@ public abstract class PlayerList { + // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); +@@ -514,7 +576,7 @@ public abstract class PlayerList { cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end @@ -252,7 +279,7 @@ index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9 } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -502,6 +563,13 @@ public abstract class PlayerList { +@@ -533,6 +595,13 @@ public abstract class PlayerList { list.add(entityplayer); } } diff --git a/Spigot-Server-Patches/0485-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 65% rename from Spigot-Server-Patches/0485-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 3e1193387b..5addc24da3 100644 --- a/Spigot-Server-Patches/0485-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,21 +7,21 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9eab570e48817e18d10ddde95b3f80f7e4ea4766..0a7e4449407104fe6c0ff7d00bd1f32eb074e10a 100644 +index 26cfb843fd54de475190b793d9a206d798d54268..7aa95b968af810a7bb4d7dedfacc83219f491e05 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1792,9 +1792,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1755,9 +1755,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke bworld = server.getWorld(worldName); } - if (bworld == null) { -- bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getWorldServer(DimensionManager.OVERWORLD).getWorld(); +- bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getWorldServer(World.OVERWORLD).getWorld(); - } + // Paper start - Move player to spawn point if spawn in unloaded world -+ // if (bworld == null) { -+ // bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getWorldServer(DimensionManager.OVERWORLD).getWorld(); -+ // } -+ // Paper end ++// if (bworld == null) { ++// bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getWorldServer(World.OVERWORLD).getWorld(); ++// } ++ // Paper end - Move player to spawn point if spawn in unloaded world spawnIn(bworld == null ? null : ((CraftWorld) bworld).getHandle()); } diff --git a/Spigot-Server-Patches/0487-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0464-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 81% rename from Spigot-Server-Patches/0487-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-Server-Patches/0464-Add-PlayerAttackEntityCooldownResetEvent.patch index 9128290e7a..d6d0111327 100644 --- a/Spigot-Server-Patches/0487-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/Spigot-Server-Patches/0464-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b546537586c3033f696aba9c133490258a9422b2..ab6576f36e7682d5100f4e9358e76426e4a1c525 100644 +index cee156e0847af3187de8a7c9bc0791dff3886b15..d4451116215b0a396fc536fac992e962b3e8a100 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1690,7 +1690,17 @@ public abstract class EntityLiving extends Entity { +@@ -1820,7 +1820,16 @@ public abstract class EntityLiving extends Entity { EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption); if (damagesource.getEntity() instanceof EntityHuman) { -- ((EntityHuman) damagesource.getEntity()).ey(); // Moved from EntityHuman in order to make the cooldown reset get called after the damage event is fired +- ((EntityHuman) damagesource.getEntity()).resetAttackCooldown(); // Moved from EntityHuman in order to make the cooldown reset get called after the damage event is fired + // Paper start - PlayerAttackEntityCooldownResetEvent + if (damagesource.getEntity() instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) damagesource.getEntity(); @@ -23,7 +23,6 @@ index b546537586c3033f696aba9c133490258a9422b2..ab6576f36e7682d5100f4e9358e76426 + ((EntityHuman) damagesource.getEntity()).resetCooldown(); + } + // Paper end -+ } if (event.isCancelled()) { return false; diff --git a/Spigot-Server-Patches/0488-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/Spigot-Server-Patches/0465-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 93% rename from Spigot-Server-Patches/0488-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to Spigot-Server-Patches/0465-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch index b2f5e22745..a30bd0be70 100644 --- a/Spigot-Server-Patches/0488-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch +++ b/Spigot-Server-Patches/0465-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch @@ -14,10 +14,10 @@ Use an ArrayDeque to store this Queue We make sure to also implement a pattern that is recursion safe too. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 2caa53a7e143aae32918ecbefc1bdadcab8d61ed..3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb 100644 +index ee38ab87ba477e8bf5b739759371439b299f21f3..b55c94788014b8085b45082162866f0210191622 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -110,24 +110,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -112,24 +112,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { diff --git a/Spigot-Server-Patches/0489-Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/0466-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 53% rename from Spigot-Server-Patches/0489-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to Spigot-Server-Patches/0466-Don-t-fire-BlockFade-on-worldgen-threads.patch index b9ea27eb3c..bceae8f952 100644 --- a/Spigot-Server-Patches/0489-Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/Spigot-Server-Patches/0466-Don-t-fire-BlockFade-on-worldgen-threads.patch @@ -6,14 +6,23 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads Caused a deadlock diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index b41de95a6390910ba8bb21bfa12ab61c85900218..9e501514f30de00d68736d9593582a5e7c8b3cff 100644 +index 1e6159f211fb445e45bab3ca1a3bf21750928302..70bcf165b187ba5b3d832f6ad2df87cc51e59bea 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java -@@ -44,6 +44,7 @@ public class BlockFire extends Block { +@@ -35,6 +35,7 @@ public class BlockFire extends BlockFireAbstract { @Override public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { // CraftBukkit start -+ if (!(generatoraccess instanceof WorldServer)) return this.canPlace(iblockdata, generatoraccess, blockposition) ? (IBlockData) this.a((IBlockAccess) generatoraccess, blockposition).set(BlockFire.AGE, iblockdata.get(BlockFire.AGE)) : Blocks.AIR.getBlockData(); // Paper - don't fire events in world generation - if (!iblockdata.canPlace(generatoraccess, blockposition)) { ++ if (!(generatoraccess instanceof WorldServer)) return this.canPlace(iblockdata, generatoraccess, blockposition) ? (IBlockData) this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)) : Blocks.AIR.getBlockData(); // Paper - don't fire events in world generation + if (!this.canPlace(iblockdata, generatoraccess, blockposition)) { CraftBlockState blockState = CraftBlockState.getBlockState(generatoraccess, blockposition); blockState.setData(Blocks.AIR.getBlockData()); +@@ -46,7 +47,7 @@ public class BlockFire extends BlockFireAbstract { + return blockState.getHandle(); + } + } +- return this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)); ++ return this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)); // Paper - diff on change, see "don't fire events in world generation" + // CraftBukkit end + } + diff --git a/Spigot-Server-Patches/0490-Add-phantom-creative-and-insomniac-controls.patch b/Spigot-Server-Patches/0467-Add-phantom-creative-and-insomniac-controls.patch similarity index 74% rename from Spigot-Server-Patches/0490-Add-phantom-creative-and-insomniac-controls.patch rename to Spigot-Server-Patches/0467-Add-phantom-creative-and-insomniac-controls.patch index 723b5b1a26..76796703ef 100644 --- a/Spigot-Server-Patches/0490-Add-phantom-creative-and-insomniac-controls.patch +++ b/Spigot-Server-Patches/0467-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ea5f306ef57fe5958a554f4bdf866a36d2b185e0..9db76eae1649fe2ce0856ff4bdcb15569bf58d93 100644 +index e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5..5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -670,4 +670,11 @@ public class PaperWorldConfig { +@@ -627,4 +627,11 @@ public class PaperWorldConfig { private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); } @@ -21,10 +21,10 @@ index ea5f306ef57fe5958a554f4bdf866a36d2b185e0..9db76eae1649fe2ce0856ff4bdcb1556 + } } diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 90eeddb1af59126ea7ca19c2cc909da72578fb6c..96b4912c4832bee0337d35cb23e574cd02f64c3b 100644 +index 47d82722e15c5b91a86af1a09807ccc37a1b37be..3cb78924daa48c3a0a3e5c9c64ef6e726d79a798 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java -@@ -232,6 +232,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -225,6 +225,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { EntityHuman entityhuman = (EntityHuman) iterator.next(); if (EntityPhantom.this.a((EntityLiving) entityhuman, PathfinderTargetCondition.a)) { @@ -33,27 +33,27 @@ index 90eeddb1af59126ea7ca19c2cc909da72578fb6c..96b4912c4832bee0337d35cb23e574cd return true; } diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index a2d1ef3602a1c63d106d10140e18dfdb1d490805..1398c47a2f8b183b65f1553c735c3b183a8bfc9c 100644 +index 57bc56cffff87d9b1774cec455af8d1651fb882c..a52dd0c021e264a57a62bde27ea9d2a6a97e2335 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java -@@ -23,6 +23,7 @@ public final class IEntitySelector { - public static final Predicate f = (entity) -> { +@@ -26,6 +26,7 @@ public final class IEntitySelector { + public static final Predicate g = (entity) -> { return !entity.isSpectator(); }; + public static Predicate isInsomniac = (player) -> MathHelper.clamp(((EntityPlayer) player).getStatisticManager().getStatisticValue(StatisticList.CUSTOM.get(StatisticList.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= 72000; // Paper - public static Predicate a(double d0, double d1, double d2, double d3) { - double d4 = d3 * d3; + // Paper start + public static final Predicate affectsSpawning = (entity) -> { diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java -index f488c22ed64a9fa1ce7746942b2a9ff4bc296703..0db431cd6add225304af48a73e1aa732b4c3ae58 100644 +index 39c5350373f6a5ad30f41e8886573d6b315924c6..bf4fa17101cb8710d8b8ba8ad43f98b6fe154ae1 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java +++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java -@@ -31,7 +31,7 @@ public class MobSpawnerPhantom { +@@ -32,7 +32,7 @@ public class MobSpawnerPhantom implements MobSpawner { while (iterator.hasNext()) { EntityHuman entityhuman = (EntityHuman) iterator.next(); - if (!entityhuman.isSpectator()) { + if (!entityhuman.isSpectator() && (!worldserver.paperConfig.phantomIgnoreCreative || !entityhuman.isCreative())) { // Paper - BlockPosition blockposition = new BlockPosition(entityhuman); + BlockPosition blockposition = entityhuman.getChunkCoordinates(); - if (!worldserver.worldProvider.f() || blockposition.getY() >= worldserver.getSeaLevel() && worldserver.f(blockposition)) { + if (!worldserver.getDimensionManager().hasSkyLight() || blockposition.getY() >= worldserver.getSeaLevel() && worldserver.f(blockposition)) { diff --git a/Spigot-Server-Patches/0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 84% rename from Spigot-Server-Patches/0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch index f049948582..f17424f1b5 100644 --- a/Spigot-Server-Patches/0491-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,10 +16,10 @@ 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 0a7e4449407104fe6c0ff7d00bd1f32eb074e10a..32daf027a3575d73aeabf9db14a2e0c74e4cc7e6 100644 +index 7aa95b968af810a7bb4d7dedfacc83219f491e05..b400b04fcb733110150de800927c602180771cec 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1968,11 +1968,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1911,11 +1911,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } else { // CraftBukkit start - Capture drops for death event if (this instanceof EntityLiving && !((EntityLiving) this).forceDrops) { @@ -34,20 +34,20 @@ index 0a7e4449407104fe6c0ff7d00bd1f32eb074e10a..32daf027a3575d73aeabf9db14a2e0c7 entityitem.defaultPickupDelay(); // CraftBukkit start -@@ -2635,6 +2636,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2560,6 +2561,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable - public Entity teleportTo(DimensionManager dimensionmanager, BlockPosition location) { + public Entity teleportTo(WorldServer worldserver, BlockPosition location) { // CraftBukkit end + // Paper start - fix bad state entities causing dupes + if (!isAlive() || !valid) { -+ LOGGER.warn("Illegal Entity Teleport " + this + " to " + dimensionmanager + ":" + location, new Throwable()); ++ LOGGER.warn("Illegal Entity Teleport " + this + " to " + worldserver + ":" + location, new Throwable()); + return null; + } + // Paper end - if (!this.world.isClientSide && !this.dead) { + if (this.world instanceof WorldServer && !this.dead) { this.world.getMethodProfiler().enter("changeDimension"); - MinecraftServer minecraftserver = this.getMinecraftServer(); -@@ -2743,7 +2750,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + // CraftBukkit start +@@ -2663,7 +2670,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke entity.bukkitEntity = this.getBukkitEntity(); if (this instanceof EntityInsentient) { @@ -56,7 +56,7 @@ index 0a7e4449407104fe6c0ff7d00bd1f32eb074e10a..32daf027a3575d73aeabf9db14a2e0c7 } // CraftBukkit end } -@@ -2760,7 +2767,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2684,7 +2691,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean canPortal() { @@ -66,7 +66,7 @@ index 0a7e4449407104fe6c0ff7d00bd1f32eb074e10a..32daf027a3575d73aeabf9db14a2e0c7 public float a(Explosion explosion, IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, Fluid fluid, float f) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 8ad131e4fc20efc61b938a5f6ab64379da23bf0d..d35a0b2d94e4f52c257375c35f55b5a41c9f2c12 100644 +index 51e9f4a6e09474a7489d2872a800308ee3f02e46..250bccee4a27801b41c50d59e93396c696ab6974 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -557,7 +557,7 @@ public class EntityArmorStand extends EntityLiving { @@ -75,7 +75,7 @@ index 8ad131e4fc20efc61b938a5f6ab64379da23bf0d..d35a0b2d94e4f52c257375c35f55b5a4 if (!itemstack.isEmpty()) { - drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops + drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); // CraftBukkit - add to drops // Paper - mirror so we can destroy it later - though this call site was safe - this.handItems.set(i, ItemStack.a); + this.handItems.set(i, ItemStack.b); } } @@ -565,7 +565,7 @@ public class EntityArmorStand extends EntityLiving { @@ -84,14 +84,14 @@ index 8ad131e4fc20efc61b938a5f6ab64379da23bf0d..d35a0b2d94e4f52c257375c35f55b5a4 if (!itemstack.isEmpty()) { - drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops + drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); // CraftBukkit - add to drops // Paper - mirror so we can destroy it later - though this call site was safe - this.armorItems.set(i, ItemStack.a); + this.armorItems.set(i, ItemStack.b); } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5d88a48b4c54c4b2c79804557bd36d1a6c686c89..a4cd6c404c2a8d526c4673695aadd001f2b4516f 100644 +index d82b57f4078802acd6b4a45e1f46f7ac9c8ba1d6..3c73d81d143ade511a88d2ab46417c7aa09719d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -777,7 +777,8 @@ public class CraftEventFactory { +@@ -775,7 +775,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/0492-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0469-Implement-Brigadier-Mojang-API.patch similarity index 78% rename from Spigot-Server-Patches/0492-Implement-Brigadier-Mojang-API.patch rename to Spigot-Server-Patches/0469-Implement-Brigadier-Mojang-API.patch index b4c15ac4f4..6320ed5d7e 100644 --- a/Spigot-Server-Patches/0492-Implement-Brigadier-Mojang-API.patch +++ b/Spigot-Server-Patches/0469-Implement-Brigadier-Mojang-API.patch @@ -10,10 +10,10 @@ Adds CommandRegisteredEvent - Allows manipulating the CommandNode to add more children/metadata for the client diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java -index 2414b0a552e5d6fb449bca163add7a9bac39e943..2d512aa4f9ab74dfadff748ba6dd72631eda9fe5 100644 +index 1229aaf19de60f1e3ce161b5c3b7ef659d14c018..e59151d01b4710b750366a395e1e5d18caa4726f 100644 --- a/src/main/java/net/minecraft/server/CommandDispatcher.java +++ b/src/main/java/net/minecraft/server/CommandDispatcher.java -@@ -267,6 +267,7 @@ public class CommandDispatcher { +@@ -268,6 +268,7 @@ public class CommandDispatcher { bukkit.add(node.getName()); } // Paper start - Async command map building @@ -21,7 +21,7 @@ index 2414b0a552e5d6fb449bca163add7a9bac39e943..2d512aa4f9ab74dfadff748ba6dd7263 MinecraftServer.getServer().execute(() -> { runSync(entityplayer, bukkit, rootcommandnode); }); -@@ -274,6 +275,7 @@ public class CommandDispatcher { +@@ -275,6 +276,7 @@ public class CommandDispatcher { private void runSync(EntityPlayer entityplayer, Collection bukkit, RootCommandNode rootcommandnode) { // Paper end - Async command map building @@ -30,19 +30,19 @@ index 2414b0a552e5d6fb449bca163add7a9bac39e943..2d512aa4f9ab74dfadff748ba6dd7263 event.getPlayer().getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/CommandListenerWrapper.java b/src/main/java/net/minecraft/server/CommandListenerWrapper.java -index 0b23a0548d52a30c064d624e39a896a9791aab3b..c988c929f1063b417d10d84b0c13127738f63e20 100644 +index 4b6f45501106f49f118a93e5027734cdb7ff2727..fa0f247e51c20ea0e3cbaccbc8dbb2a153d6121f 100644 --- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java +++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java -@@ -15,7 +15,7 @@ import java.util.function.BinaryOperator; +@@ -16,7 +16,7 @@ import java.util.function.BinaryOperator; import java.util.stream.Stream; import javax.annotation.Nullable; -public class CommandListenerWrapper implements ICompletionProvider { +public class CommandListenerWrapper implements ICompletionProvider, com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource { // Paper - public static final SimpleCommandExceptionType a = new SimpleCommandExceptionType(new ChatMessage("permissions.requires.player", new Object[0])); - public static final SimpleCommandExceptionType b = new SimpleCommandExceptionType(new ChatMessage("permissions.requires.entity", new Object[0])); -@@ -120,6 +120,25 @@ public class CommandListenerWrapper implements ICompletionProvider { + public static final SimpleCommandExceptionType a = new SimpleCommandExceptionType(new ChatMessage("permissions.requires.player")); + public static final SimpleCommandExceptionType b = new SimpleCommandExceptionType(new ChatMessage("permissions.requires.entity")); +@@ -121,6 +121,25 @@ public class CommandListenerWrapper implements ICompletionProvider { return this.g; } @@ -69,25 +69,25 @@ index 0b23a0548d52a30c064d624e39a896a9791aab3b..c988c929f1063b417d10d84b0c131277 public boolean hasPermission(int i) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 08e087d952edfecd73ad698684b71c09dabbac9e..c3a86d3007c2fdc5d45f628226507b4a1c968ad6 100644 +index 1099a46aa05f12572100994ea251f0d55c66ef80..37defd033c3377b1166b8e97bbbf9ef1be25a565 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -581,8 +581,12 @@ public class PlayerConnection implements PacketListenerPlayIn { - ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); +@@ -584,8 +584,12 @@ public class PlayerConnection implements PacketListenerPlayIn { + ParseResults parseresults = this.minecraftServer.getCommandDispatcher().a().parse(stringreader, this.player.getCommandListener()); - this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { -- if (((Suggestions) suggestions).isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer -- this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestions)); // CraftBukkit - decompile error -+ // Paper start -+ com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent suggestEvent = new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent(this.getPlayer(), suggestions, buffer); -+ suggestEvent.setCancelled(suggestions.isEmpty()); -+ if (!suggestEvent.callEvent()) return; -+ this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestEvent.getSuggestions())); // CraftBukkit - decompile error // Paper -+ // Paper end - }); - }); // Paper - This needs to be on main + this.minecraftServer.getCommandDispatcher().a().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { +- if (suggestions.isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer +- this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), suggestions)); ++ // Paper start ++ com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent suggestEvent = new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent(this.getPlayer(), suggestions, buffer); ++ suggestEvent.setCancelled(suggestions.isEmpty()); ++ if (!suggestEvent.callEvent()) return; ++ this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestEvent.getSuggestions())); // CraftBukkit - decompile error // Paper ++ // Paper end + }); + }); } -@@ -592,7 +596,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -594,7 +598,11 @@ public class PlayerConnection implements PacketListenerPlayIn { builder = builder.createOffset(builder.getInput().lastIndexOf(' ') + 1); completions.forEach(builder::suggest); @@ -99,7 +99,7 @@ index 08e087d952edfecd73ad698684b71c09dabbac9e..c3a86d3007c2fdc5d45f628226507b4a + this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), suggestEvent.getSuggestions())); } // Paper end - async tab completion - + } diff --git a/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java index 5f33c9e52ac51486d4b22a6dcbfac7f46e0412bb..e16ecdea7d27424053b3f21378af054b2f808eca 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java diff --git a/Spigot-Server-Patches/0493-Villager-Restocks-API.patch b/Spigot-Server-Patches/0470-Villager-Restocks-API.patch similarity index 85% rename from Spigot-Server-Patches/0493-Villager-Restocks-API.patch rename to Spigot-Server-Patches/0470-Villager-Restocks-API.patch index f47011ebd4..e53dcfff63 100644 --- a/Spigot-Server-Patches/0493-Villager-Restocks-API.patch +++ b/Spigot-Server-Patches/0470-Villager-Restocks-API.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Villager Restocks API diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index b3462576469f67dca618c54bb35fd53454afcd1f..eeb76bc0298711ac3ea24440a172e812925f875e 100644 +index 8d3811ead268635c4b728f5c9b8dd6c9b8ec6124..86b75e31ea1ed9deecae9756c6f838c302dd8df6 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -992,4 +992,13 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - return optional.isPresent() && optional1.isPresent() ? i - ((MinecraftSerializableLong) optional.get()).a() < 24000L && i - ((MinecraftSerializableLong) optional1.get()).a() < 36000L : false; + return optional.isPresent() ? i - (Long) optional.get() < 24000L : false; } + + // Paper start diff --git a/Spigot-Server-Patches/0471-Remove-streams-from-MinecraftKey.patch b/Spigot-Server-Patches/0471-Remove-streams-from-MinecraftKey.patch deleted file mode 100644 index 853063b15a..0000000000 --- a/Spigot-Server-Patches/0471-Remove-streams-from-MinecraftKey.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Mon, 6 Apr 2020 18:06:24 -0700 -Subject: [PATCH] Remove streams from MinecraftKey - -They produce a lot of garbage. - -diff --git a/src/main/java/net/minecraft/server/MinecraftKey.java b/src/main/java/net/minecraft/server/MinecraftKey.java -index 2b271d3e509a5450c9136dced3ad4dc4d65af45a..b1beebf0ed5737c04875bf9138624fb2bd5dff27 100644 ---- a/src/main/java/net/minecraft/server/MinecraftKey.java -+++ b/src/main/java/net/minecraft/server/MinecraftKey.java -@@ -125,15 +125,29 @@ public class MinecraftKey implements Comparable { - } - - private static boolean c(String s) { -- return s.chars().allMatch((i) -> { -- return i == 95 || i == 45 || i >= 97 && i <= 122 || i >= 48 && i <= 57 || i == 47 || i == 46; -- }); -+ // Paper start - remove streams -+ for (int index = 0, len = s.length(); index < len; ++index) { -+ int i = (int)s.charAt(index); -+ boolean condition = i == 95 || i == 45 || i >= 97 && i <= 122 || i >= 48 && i <= 57 || i == 47 || i == 46; // this is copied from the replaced code. -+ if (!condition) { -+ return false; -+ } -+ } -+ return true; -+ // Paper end - remove streams - } - - private static boolean d(String s) { -- return s.chars().allMatch((i) -> { -- return i == 95 || i == 45 || i >= 97 && i <= 122 || i >= 48 && i <= 57 || i == 46; -- }); -+ // Paper start - remove streams -+ for (int index = 0, len = s.length(); index < len; ++index) { -+ int i = (int)s.charAt(index); -+ boolean condition = i == 95 || i == 45 || i >= 97 && i <= 122 || i >= 48 && i <= 57 || i == 46; // this is copied from the replaced code. -+ if (!condition) { -+ return false; -+ } -+ } -+ return true; -+ // Paper end - remove streams - } - - public static class a implements JsonDeserializer, JsonSerializer { diff --git a/Spigot-Server-Patches/0494-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0471-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 91% rename from Spigot-Server-Patches/0494-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to Spigot-Server-Patches/0471-Validate-PickItem-Packet-and-kick-for-invalid.patch index e8c029c3a1..da017c88ed 100644 --- a/Spigot-Server-Patches/0494-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/Spigot-Server-Patches/0471-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c3a86d3007c2fdc5d45f628226507b4a1c968ad6..a716f25478ba9731b7bb07f5d80c3655c8190e8b 100644 +index 37defd033c3377b1166b8e97bbbf9ef1be25a565..64a948510265b881b2aefdfbdb54ec0d413d2766 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -696,7 +696,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -697,7 +697,14 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInPickItem packetplayinpickitem) { PlayerConnectionUtils.ensureMainThread(packetplayinpickitem, this, this.player.getWorldServer()); diff --git a/Spigot-Server-Patches/0495-Expose-game-version.patch b/Spigot-Server-Patches/0472-Expose-game-version.patch similarity index 82% rename from Spigot-Server-Patches/0495-Expose-game-version.patch rename to Spigot-Server-Patches/0472-Expose-game-version.patch index 8d6ba360d2..bdb4199db6 100644 --- a/Spigot-Server-Patches/0495-Expose-game-version.patch +++ b/Spigot-Server-Patches/0472-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 f49193d9d7cd9655fdedf64bebdcf4e1a9b77f2c..1647c09756ed303a3f3e879e877b5b3de639f843 100644 +index b0ab57ef2e45394905a29444daea1d7b3e866875..715186249545ab2af5284ef71ab59e5ebccad8e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -489,6 +489,13 @@ public final class CraftServer implements Server { +@@ -514,6 +514,13 @@ public final class CraftServer implements Server { return bukkitVersion; } diff --git a/Spigot-Server-Patches/0496-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0473-Sync-position-on-teleportation.patch similarity index 86% rename from Spigot-Server-Patches/0496-Sync-position-on-teleportation.patch rename to Spigot-Server-Patches/0473-Sync-position-on-teleportation.patch index 06ad495a7e..8fb536336d 100644 --- a/Spigot-Server-Patches/0496-Sync-position-on-teleportation.patch +++ b/Spigot-Server-Patches/0473-Sync-position-on-teleportation.patch @@ -13,10 +13,10 @@ it is triggering a massive movement velocity. This will ensure that the servers position is synchronized anytime player is teleported. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a716f25478ba9731b7bb07f5d80c3655c8190e8b..1f9d231fb93e30286205f7a0a4c898a0e153bd95 100644 +index 64a948510265b881b2aefdfbdb54ec0d413d2766..383a9bdec4d476bbde5a7c63a9915d2ed4c136a4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -498,6 +498,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -501,6 +501,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.o = this.teleportPos.x; this.p = this.teleportPos.y; this.q = this.teleportPos.z; @@ -24,7 +24,7 @@ index a716f25478ba9731b7bb07f5d80c3655c8190e8b..1f9d231fb93e30286205f7a0a4c898a0 if (this.player.H()) { this.player.I(); } -@@ -1277,6 +1278,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1299,6 +1300,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.A = this.e; this.player.setLocation(d0, d1, d2, f, f1); diff --git a/Spigot-Server-Patches/0497-Optimize-Voxel-Shape-Merging.patch b/Spigot-Server-Patches/0474-Optimize-Voxel-Shape-Merging.patch similarity index 98% rename from Spigot-Server-Patches/0497-Optimize-Voxel-Shape-Merging.patch rename to Spigot-Server-Patches/0474-Optimize-Voxel-Shape-Merging.patch index dfe8d29d49..94143e356b 100644 --- a/Spigot-Server-Patches/0497-Optimize-Voxel-Shape-Merging.patch +++ b/Spigot-Server-Patches/0474-Optimize-Voxel-Shape-Merging.patch @@ -75,7 +75,7 @@ index 71d2ae2a9c5a05351241b5a313e66ca15b0624ef..232b0023773008c19f19ad4658eb40fc this.b = new IntArrayList(i1); this.c = new IntArrayList(i1); diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index e641d4b8d8b4ac5d539e6d9c0eaf345601e0b499..4b3e632a8944828189bc8a5dada32913c1929286 100644 +index 4acde367542247627574fdeb586fb8c9087eef1a..aeee4f11828e54ff9e873e452e19299822b1ec86 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java @@ -319,9 +319,21 @@ public final class VoxelShapes { diff --git a/Spigot-Server-Patches/0498-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 91% rename from Spigot-Server-Patches/0498-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index 50dcdc2c0c..c19c1ace79 100644 --- a/Spigot-Server-Patches/0498-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,10 +17,10 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index e913d249d850210c9efba1bb46ce2ce4df013a62..2ea6f5b7da35cbb342e72a00ea70fef667f05d49 100644 +index 429ae482f30eeeab84cc009a9143245e086ce469..a61e6561c10b62cc97aab1b4d8befe893c5da09f 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -21,6 +21,7 @@ public class Main { +@@ -20,6 +20,7 @@ public class Main { public static void main(String[] args) { // Todo: Installation script diff --git a/Spigot-Server-Patches/0499-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0476-Implement-Mob-Goal-API.patch similarity index 97% rename from Spigot-Server-Patches/0499-Implement-Mob-Goal-API.patch rename to Spigot-Server-Patches/0476-Implement-Mob-Goal-API.patch index 799c09f79b..b64bdc934c 100644 --- a/Spigot-Server-Patches/0499-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0476-Implement-Mob-Goal-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/pom.xml b/pom.xml -index 64bd667e8b11263e483364efc3414396819a255c..e4c63bb76cb598545f9d215a8859724d6e7f8b81 100644 +index f578acae6fbe1ad7a0c05b96ba489482687ec1df..2b24688310f14b6a9e3fe04fe8b41cd1803b78c1 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,13 @@ @@ -744,7 +744,7 @@ index 9df0006c1a283f77c4d01d9fce9062fc1c9bbb1f..b3329c6fcd6758a781a51f5ba8f5052a + } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java -index 93009d83f07bdaf7bc424ffb99cbfe716ca0d66d..f1c4ce9e4b83aa966b4ae4dcd6a283e08f8db783 100644 +index a85d81186ae92dec72f2cc3a1dcd8c4b7e7ede62..d2aa9a854ea013f24f585c194bd1ddfd8d5410a5 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoal.java +++ b/src/main/java/net/minecraft/server/PathfinderGoal.java @@ -10,9 +10,9 @@ public abstract class PathfinderGoal { @@ -780,20 +780,20 @@ index 93009d83f07bdaf7bc424ffb99cbfe716ca0d66d..f1c4ce9e4b83aa966b4ae4dcd6a283e0 this.goalTypes.clear(); this.goalTypes.addAllUnchecked(enumset); diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -index 84d2abbcb90eb09a19fa0922cfc053c74f8c56e4..a68fc11ec668576d1453459666caeacf5fbc49b8 100644 +index 22f4fec58fbaab24673dd418700c51671248c510..d3f0327a2a7cdedf3fe8d10df981a9f1cb378d26 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java -@@ -26,7 +26,7 @@ public class PathfinderGoalSelector { +@@ -27,7 +27,7 @@ public class PathfinderGoalSelector { } }; private final Map c = new EnumMap(PathfinderGoal.Type.class); -- private final Set d = Sets.newLinkedHashSet();private Set getTasks() { return d; }// Paper - OBFHELPER -+ private final Set d = Sets.newLinkedHashSet();public Set getTasks() { return d; }// Paper - OBFHELPER - private final GameProfilerFiller e; +- private final Set d = Sets.newLinkedHashSet(); private Set getTasks() { return d; }// Paper - OBFHELPER ++ private final Set d = Sets.newLinkedHashSet(); public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public + private final Supplier e; private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. private final OptimizedSmallEnumSet goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector -@@ -37,7 +37,7 @@ public class PathfinderGoalSelector { - this.e = gameprofilerfiller; +@@ -38,7 +38,7 @@ public class PathfinderGoalSelector { + this.e = supplier; } - public void a(int i, PathfinderGoal pathfindergoal) { @@ -801,7 +801,7 @@ index 84d2abbcb90eb09a19fa0922cfc053c74f8c56e4..a68fc11ec668576d1453459666caeacf this.d.add(new PathfinderGoalWrapped(i, pathfindergoal)); } -@@ -60,7 +60,7 @@ public class PathfinderGoalSelector { +@@ -61,7 +61,7 @@ public class PathfinderGoalSelector { } // Paper end @@ -810,16 +810,16 @@ index 84d2abbcb90eb09a19fa0922cfc053c74f8c56e4..a68fc11ec668576d1453459666caeacf // Paper start - remove streams from pathfindergoalselector for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { PathfinderGoalWrapped goalWrapped = iterator.next(); -@@ -154,6 +154,7 @@ public class PathfinderGoalSelector { - this.e.exit(); +@@ -157,6 +157,7 @@ public class PathfinderGoalSelector { + gameprofilerfiller.exit(); } -+ public Stream getExecutingGoals() {return c();} // Paper - OBFHELPER - public Stream c() { ++ public final Stream getExecutingGoals() { return d(); } // Paper - OBFHELPER + public Stream d() { return this.d.stream().filter(PathfinderGoalWrapped::g); } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java b/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java -index 1b800c558f0988ffc0270b86d1a59ea3bb245116..dee4e2beacb1bbb179f220ed186e873bef718340 100644 +index 96f4401044cacf88e8e00b5b18821c105e634fba..112d8bab65bf41263a477c5faa717687fe8a2bc9 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalWrapped.java @@ -5,8 +5,8 @@ import javax.annotation.Nullable; @@ -834,10 +834,10 @@ index 1b800c558f0988ffc0270b86d1a59ea3bb245116..dee4e2beacb1bbb179f220ed186e873b 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 1647c09756ed303a3f3e879e877b5b3de639f843..b89f99a66fe2ab9ad4c956c38c9e4b1d79716c9c 100644 +index 715186249545ab2af5284ef71ab59e5ebccad8e1..7c3a66e5e6c4dece0807cc349a69d79fd1b8c352 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2230,5 +2230,11 @@ public final class CraftServer implements Server { +@@ -2285,5 +2285,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/Spigot-Server-Patches/0500-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch similarity index 84% rename from Spigot-Server-Patches/0500-Use-distance-map-to-optimise-entity-tracker.patch rename to Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch index 790612e3d0..d931923a40 100644 --- a/Spigot-Server-Patches/0500-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 32daf027a3575d73aeabf9db14a2e0c74e4cc7e6..b176dc26d15065aebc91c75e8a96745f589c0b87 100644 +index b400b04fcb733110150de800927c602180771cec..d1b5e421e80ed79fec94cbf181d4e6f5515b94e8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -245,6 +245,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -246,6 +246,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper end @@ -32,22 +32,34 @@ index 32daf027a3575d73aeabf9db14a2e0c74e4cc7e6..b176dc26d15065aebc91c75e8a96745f this.id = Entity.entityCount.incrementAndGet(); this.passengers = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 3a88c9a67062eb73ad8257ea786efca7e7e99f65..6d3b34ead9cc95dcc1152dffa8c6c4a8c7f1d58b 100644 +index 9b89c0c8a3f1dada4e9b2aaeed0b92e56229b7ca..0c46297e6ff229538d77b2f481e4ab13ea14c48e 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -@@ -70,6 +70,7 @@ public class EntityTrackerEntry { - this.r = entity.onGround; +@@ -72,6 +72,7 @@ public class EntityTrackerEntry { + this.r = entity.isOnGround(); } + public final void tick() { this.a(); } // Paper - OBFHELPER public void a() { List list = this.tracker.getPassengers(); +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index cf05c44865b5d3210b50d11ac7413865cc57f1ff..14a208b3b36f492285c432c591000df1573d31b1 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -1531,6 +1531,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); @@ -60,6 +72,10 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 + static final org.spigotmc.TrackingRange.TrackingRangeType[] TRACKING_RANGE_TYPES = org.spigotmc.TrackingRange.TrackingRangeType.values(); + final com.destroystokyo.paper.util.misc.PlayerAreaMap[] playerEntityTrackerTrackMaps; + final int[] entityTrackerTrackRanges; ++ ++ private int convertSpigotRangeToVanilla(final int vanilla) { ++ return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); ++ } + // Paper end - use distance map to optimise tracker void addPlayerToDistanceMaps(EntityPlayer player) { @@ -98,10 +114,10 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 + } + // Paper end - use distance map to optimise entity tracker } + // Paper end - -@@ -195,6 +225,44 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.m = new VillagePlace(new File(this.w, "poi"), datafixer, this.world); // Paper +@@ -196,6 +230,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); this.playerMobDistanceMap = this.world.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + // Paper start - use distance map to optimise entity tracker @@ -135,6 +151,7 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 + default: + throw new IllegalStateException("Missing case for enum " + trackingRangeType); + } ++ configuredSpigotValue = convertSpigotRangeToVanilla(configuredSpigotValue); + + int trackRange = (configuredSpigotValue >>> 4) + ((configuredSpigotValue & 15) != 0 ? 1 : 0); + this.entityTrackerTrackRanges[ordinal] = trackRange; @@ -145,7 +162,7 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 } public void updatePlayerMobTypeMap(Entity entity) { -@@ -1400,17 +1468,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1431,17 +1504,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public void movePlayer(EntityPlayer entityplayer) { @@ -164,16 +181,16 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 int i = MathHelper.floor(entityplayer.locX()) >> 4; int j = MathHelper.floor(entityplayer.locZ()) >> 4; -@@ -1527,7 +1585,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1557,7 +1620,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker - this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); -- playerchunkmap_entitytracker.track(this.world.getPlayers()); -+ playerchunkmap_entitytracker.updatePlayers(entity.getPlayersInTrackRange()); // Paper - don't search all players - if (entity instanceof EntityPlayer) { - EntityPlayer entityplayer = (EntityPlayer) entity; + entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker + this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); +- playerchunkmap_entitytracker.track(this.world.getPlayers()); ++ playerchunkmap_entitytracker.updatePlayers(entity.getPlayersInTrackRange()); // Paper - don't search all players + if (entity instanceof EntityPlayer) { + EntityPlayer entityplayer = (EntityPlayer) entity; -@@ -1571,7 +1629,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1600,7 +1663,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = null; // Paper - We're no longer tracked } @@ -211,7 +228,7 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 List list = Lists.newArrayList(); List list1 = this.world.getPlayers(); -@@ -1639,23 +1727,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1668,23 +1761,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PacketDebug.a(this.world, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -255,7 +272,7 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 Iterator iterator; Entity entity1; -@@ -1693,7 +1789,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1722,7 +1823,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public class EntityTracker { @@ -264,7 +281,7 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 private final Entity tracker; private final int trackingDistance; private SectionPosition e; -@@ -1710,6 +1806,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1739,6 +1840,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.e = SectionPosition.a(entity); } @@ -307,7 +324,7 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 public boolean equals(Object object) { return object instanceof PlayerChunkMap.EntityTracker ? ((PlayerChunkMap.EntityTracker) object).tracker.getId() == this.tracker.getId() : false; } -@@ -1806,7 +1938,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1839,7 +1976,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int j = entity.getEntityType().getChunkRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper @@ -317,10 +334,15 @@ index 3f1a5e48676d1b4b01fbbc25fc9c9cf556cbf0eb..f09bb1329cf993034661fb8cfbf87571 } } diff --git a/src/main/java/org/spigotmc/TrackingRange.java b/src/main/java/org/spigotmc/TrackingRange.java -index 03990231a8b6bc6925f054e9033825316abfafcc..2ba1c1b9160e8d24cb338fa9b6b844423119dc73 100644 +index 03990231a8b6bc6925f054e9033825316abfafcc..627e9a90b3045602bc540a5f3f031aaf3716c942 100644 --- a/src/main/java/org/spigotmc/TrackingRange.java +++ b/src/main/java/org/spigotmc/TrackingRange.java -@@ -50,4 +50,43 @@ public class TrackingRange +@@ -46,8 +46,49 @@ public class TrackingRange + return config.miscTrackingRange; + } else + { +- if (entity instanceof EntityEnderDragon) return ((WorldServer)(entity.getWorld())).getChunkProvider().playerChunkMap.getLoadViewDistance(); // Paper - enderdragon is exempt ++ if (entity instanceof EntityEnderDragon) return defaultRange; // Paper - enderdragon is exempt return config.otherTrackingRange; } } @@ -337,8 +359,10 @@ index 03990231a8b6bc6925f054e9033825316abfafcc..2ba1c1b9160e8d24cb338fa9b6b84442 + switch (entity.activationType) { + case RAIDER: + case MONSTER: ++ case FLYING_MONSTER: + return TrackingRangeType.MONSTER; + case WATER: ++ case VILLAGER: + case ANIMAL: + return TrackingRangeType.ANIMAL; + case MISC: diff --git a/Spigot-Server-Patches/0501-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0478-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 83% rename from Spigot-Server-Patches/0501-Optimize-isOutsideRange-to-use-distance-maps.patch rename to Spigot-Server-Patches/0478-Optimize-isOutsideRange-to-use-distance-maps.patch index 76f0eb6a96..ef8551fce7 100644 --- a/Spigot-Server-Patches/0501-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0478-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -6,15 +6,15 @@ 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 10e385eb556faff954df28ed0b3ddaceac2b8baa..ae27942991eeaec77f72b58ab32260a35f86b4a4 100644 +index 32d3887e2542c4ebba4a7498167fbe4b497a71ce..7e57a53ec614a2f7d2672edff9d7c0e0dca42377 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 { private final Long2ObjectMap> c = new Long2ObjectOpenHashMap(); public final Long2ObjectOpenHashMap>> tickets = new Long2ObjectOpenHashMap(); - private final ChunkMapDistance.a e = new ChunkMapDistance.a(); + private final ChunkMapDistance.a ticketLevelTracker = new ChunkMapDistance.a(); - private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); -+ public static final int MOB_SPAWN_RANGE = 8; //private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); // Paper - no longer used ++ public static final int MOB_SPAWN_RANGE = 8; // private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); // Paper - no longer used private final ChunkMapDistance.c g = new ChunkMapDistance.c(33); // Paper start use a queue, but still keep unique requirement public final java.util.Queue pendingChunkUpdates = new java.util.ArrayDeque() { @@ -34,24 +34,24 @@ index 10e385eb556faff954df28ed0b3ddaceac2b8baa..ae27942991eeaec77f72b58ab32260a3 - this.f.a(); + //this.f.a(); // Paper - no longer used this.g.a(); - int i = Integer.MAX_VALUE - this.e.a(Integer.MAX_VALUE); + int i = Integer.MAX_VALUE - this.ticketLevelTracker.a(Integer.MAX_VALUE); boolean flag = i != 0; @@ -230,7 +232,7 @@ public abstract class ChunkMapDistance { ((ObjectSet) this.c.computeIfAbsent(i, (j) -> { return new ObjectOpenHashSet(); })).add(entityplayer); -- this.f.b(i, 0, true); -+ //this.f.b(i, 0, true); // Paper - no longer used - this.g.b(i, 0, true); +- this.f.update(i, 0, true); ++ //this.f.update(i, 0, true); // Paper - no longer used + this.g.update(i, 0, true); } @@ -241,7 +243,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); -- this.f.b(i, Integer.MAX_VALUE, false); -+ //this.f.b(i, Integer.MAX_VALUE, false); // Paper - no longer used - this.g.b(i, Integer.MAX_VALUE, false); +- this.f.update(i, Integer.MAX_VALUE, false); ++ //this.f.update(i, Integer.MAX_VALUE, false); // Paper - no longer used + this.g.update(i, Integer.MAX_VALUE, false); } @@ -265,13 +267,17 @@ public abstract class ChunkMapDistance { @@ -77,10 +77,10 @@ index 10e385eb556faff954df28ed0b3ddaceac2b8baa..ae27942991eeaec77f72b58ab32260a3 public String c() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 665d83042dab467cddf315fade883fd55ffc8bfd..3089d673a029c493cac756124eb0baa21a8bab7f 100644 +index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e84316c49 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -735,6 +735,36 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -728,6 +728,36 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit if (!flag) { @@ -116,55 +116,54 @@ index 665d83042dab467cddf315fade883fd55ffc8bfd..3089d673a029c493cac756124eb0baa2 + // Paper end - optimize isOutisdeRange this.world.getMethodProfiler().enter("pollingChunks"); int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); - BlockPosition blockposition = this.world.getSpawn(); -@@ -769,15 +799,7 @@ public class ChunkProviderServer extends IChunkProvider { - - this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings + boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit +@@ -757,15 +787,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); + //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper + //Collections.shuffle(list); // Paper - //Paper start - call player naturally spawn event - int chunkRange = world.spigotConfig.mobSpawnRange; - chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; - chunkRange = Math.min(chunkRange, 8); -- for (EntityPlayer entityPlayer : this.world.players) { +- for (EntityPlayer entityPlayer : this.world.getPlayers()) { - entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange); - entityPlayer.playerNaturallySpawnedEvent.callEvent(); - }; - // Paper end -+ // Paper - replaced by above ++ // Paper - moved up final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping - Optional optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); + Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -791,10 +813,10 @@ public class ChunkProviderServer extends IChunkProvider { - this.world.getMethodProfiler().exit(); - ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); +@@ -781,9 +803,9 @@ public class ChunkProviderServer extends IChunkProvider { + Chunk chunk = (Chunk) optional1.get(); + ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); + +- if (!this.playerChunkMap.isOutsideOfRange(chunkcoordintpair)) { ++ if (!this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, false)) { // Paper - optimise isOutsideOfRange + chunk.setInhabitedTime(chunk.getInhabitedTime() + j); +- if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot ++ if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, true)) { // Spigot // Paper - optimise isOutsideOfRange + SpawnerCreature.a(this.world, chunk, spawnercreature_d, this.allowAnimals, this.allowMonsters, flag2); + } -- if (!this.playerChunkMap.isOutsideOfRange(chunkcoordintpair)) { -+ if (!this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, false)) { // Paper - optimise isOutsideOfRange - // Paper end - chunk.setInhabitedTime(chunk.getInhabitedTime() + j); -- if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot -+ if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, true)) { // Spigot // Paper - optimise isOutsideOfRange - this.world.getMethodProfiler().enter("spawner"); - this.world.timings.mobSpawn.startTiming(); // Spigot - EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype; diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 79c2187b7383336e7574709e6d4ad805e557976f..0560eca744cb2032bb6a3faf5aeafa95a7a6815e 100644 +index c26236ff4ab56506c51d4e215cfe4fb76bed26ed..6c8c697367b2c8504d0467cd58f576afbd3e775f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -109,6 +109,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -113,6 +113,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper + double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks + public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { - super((World) worldserver, gameprofile); - playerinteractmanager.player = this; + super(worldserver, worldserver.getSpawn(), 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 afc92dd031cdaf725b85c0b301d5a5a21da54720..6980d19f36c18cdbed6679dbdf04afd694e078b6 100644 +index 9cb2ff09da0b8832e58eed4d70741853a25c9011..7f660d3c528f5fb4150e4ee8b29913436f125b06 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -44,6 +44,18 @@ public class PlayerChunk { +@@ -43,6 +43,18 @@ public class PlayerChunk { long lastAutoSaveTime; // Paper - incremental autosave long inactiveTimeStart; // Paper - incremental autosave @@ -183,7 +182,7 @@ index afc92dd031cdaf725b85c0b301d5a5a21da54720..6980d19f36c18cdbed6679dbdf04afd6 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; -@@ -60,6 +72,7 @@ public class PlayerChunk { +@@ -59,6 +71,7 @@ public class PlayerChunk { this.n = this.oldTicketLevel; this.a(i); this.chunkMap = (PlayerChunkMap)playerchunk_d; // Paper @@ -192,12 +191,12 @@ index afc92dd031cdaf725b85c0b301d5a5a21da54720..6980d19f36c18cdbed6679dbdf04afd6 // Paper start diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4ec54d56b 100644 +index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d933bbc4170 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -153,6 +153,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - final com.destroystokyo.paper.util.misc.PlayerAreaMap[] playerEntityTrackerTrackMaps; - final int[] entityTrackerTrackRanges; +@@ -159,6 +159,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); + } // Paper end - use distance map to optimise tracker + // Paper start - optimise PlayerChunkMap#isOutsideRange + // A note about the naming used here: @@ -213,7 +212,7 @@ index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4 void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -166,6 +177,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -172,6 +183,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.add(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -223,7 +222,7 @@ index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4 } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -174,6 +188,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -180,6 +194,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[i].remove(player); } // Paper end - use distance map to optimise tracker @@ -234,7 +233,7 @@ index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4 } void updateMaps(EntityPlayer player) { -@@ -188,6 +206,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -194,6 +212,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -242,18 +241,18 @@ index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4 + this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); + // Paper end - optimise PlayerChunkMap#isOutsideRange } + // Paper end - -@@ -220,7 +241,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -225,7 +246,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.mailboxWorldGen = this.p.a(threadedmailbox, false); this.mailboxMain = this.p.a(mailbox, false); - this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getWorldProvider().f(), threadedmailbox1, this.p.a(threadedmailbox1, false)); + this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getDimensionManager().hasSkyLight(), threadedmailbox1, this.p.a(threadedmailbox1, false)); - this.chunkDistanceManager = new PlayerChunkMap.a(executor, iasynctaskhandler); + this.chunkDistanceManager = new PlayerChunkMap.a(executor, iasynctaskhandler); this.chunkDistanceManager.chunkMap = this; // Paper this.l = supplier; - this.m = new VillagePlace(new File(this.w, "poi"), datafixer, this.world); // Paper + this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); -@@ -263,6 +284,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -269,6 +290,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[ordinal] = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); } // Paper end - use distance map to optimise entity tracker @@ -292,7 +291,7 @@ index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4 } public void updatePlayerMobTypeMap(Entity entity) { -@@ -282,6 +335,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -288,6 +341,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return entityPlayer.mobCounts[enumCreatureType.ordinal()]; } @@ -300,7 +299,7 @@ index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4 private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { double d0 = (double) (chunkcoordintpair.x * 16 + 8); double d1 = (double) (chunkcoordintpair.z * 16 + 8); -@@ -460,6 +514,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -466,6 +520,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } else { if (playerchunk != null) { playerchunk.a(j); @@ -308,7 +307,7 @@ index f09bb1329cf993034661fb8cfbf87571fe5f1ebe..74b868d7cec0260a10ca7718f48308f4 } if (playerchunk != null) { -@@ -1397,30 +1452,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1433,30 +1488,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return isOutsideOfRange(chunkcoordintpair, false); } diff --git a/Spigot-Server-Patches/0502-Stop-copy-on-write-operations-for-updating-light-dat.patch b/Spigot-Server-Patches/0479-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 98% rename from Spigot-Server-Patches/0502-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to Spigot-Server-Patches/0479-Stop-copy-on-write-operations-for-updating-light-dat.patch index ede6c2717b..5b1fb6844a 100644 --- a/Spigot-Server-Patches/0502-Stop-copy-on-write-operations-for-updating-light-dat.patch +++ b/Spigot-Server-Patches/0479-Stop-copy-on-write-operations-for-updating-light-dat.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Stop copy-on-write operations for updating light data Causes huge memory allocations + gc issues diff --git a/src/main/java/net/minecraft/server/LightEngineStorage.java b/src/main/java/net/minecraft/server/LightEngineStorage.java -index a3f919816eb2a742ed09b553995e6508684e5ea5..88277d23c36696fdd5363e41a130c9a443fac2c0 100644 +index 916d38cebcbe912153d54a21acbf60bc26db7401..6c7c4e75670a7e08ba10c0231a2510bf985dab6b 100644 --- a/src/main/java/net/minecraft/server/LightEngineStorage.java +++ b/src/main/java/net/minecraft/server/LightEngineStorage.java @@ -19,8 +19,8 @@ public abstract class LightEngineStorage> e @@ -20,7 +20,7 @@ index a3f919816eb2a742ed09b553995e6508684e5ea5..88277d23c36696fdd5363e41a130c9a4 protected final LongSet g = new LongOpenHashSet(); protected final LongSet h = new LongOpenHashSet(); protected final Long2ObjectMap i = Long2ObjectMaps.synchronize(new Long2ObjectOpenHashMap()); -@@ -33,8 +33,8 @@ public abstract class LightEngineStorage> e +@@ -34,8 +34,8 @@ public abstract class LightEngineStorage> e this.l = enumskyblock; this.m = ilightaccess; this.f = m0; @@ -31,7 +31,7 @@ index a3f919816eb2a742ed09b553995e6508684e5ea5..88277d23c36696fdd5363e41a130c9a4 } protected boolean g(long i) { -@@ -43,7 +43,15 @@ public abstract class LightEngineStorage> e +@@ -44,7 +44,15 @@ public abstract class LightEngineStorage> e @Nullable protected NibbleArray a(long i, boolean flag) { @@ -48,7 +48,7 @@ index a3f919816eb2a742ed09b553995e6508684e5ea5..88277d23c36696fdd5363e41a130c9a4 } @Nullable -@@ -340,10 +348,12 @@ public abstract class LightEngineStorage> e +@@ -357,10 +365,12 @@ public abstract class LightEngineStorage> e protected void e() { if (!this.g.isEmpty()) { diff --git a/Spigot-Server-Patches/0503-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0480-No-Tick-view-distance-implementation.patch similarity index 88% rename from Spigot-Server-Patches/0503-No-Tick-view-distance-implementation.patch rename to Spigot-Server-Patches/0480-No-Tick-view-distance-implementation.patch index 442134ba54..2d2f034998 100644 --- a/Spigot-Server-Patches/0503-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0480-No-Tick-view-distance-implementation.patch @@ -23,10 +23,10 @@ index d4ebcf8f66197299256bd6b65710a1488c90ea41..a3b41ce5fc70948d4804659a472cb622 })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9db76eae1649fe2ce0856ff4bdcb15569bf58d93..c3f7717869c86d9ac6395615bceda324aea16b27 100644 +index 5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162..0746932a3191669052f15270f5c94efbce0bd0c2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -677,4 +677,9 @@ public class PaperWorldConfig { +@@ -634,4 +634,9 @@ public class PaperWorldConfig { phantomIgnoreCreative = getBoolean("phantoms-do-not-spawn-on-creative-players", phantomIgnoreCreative); phantomOnlyAttackInsomniacs = getBoolean("phantoms-only-attack-insomniacs", phantomOnlyAttackInsomniacs); } @@ -37,10 +37,10 @@ index 9db76eae1649fe2ce0856ff4bdcb15569bf58d93..c3f7717869c86d9ac6395615bceda324 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index cf86ce24e12068d6ff7ae43cb1fd6fe665c24932..c80a55ee53eac128c94d74b78c5641854e974750 100644 +index b65ae2d6919a67498d0646c5522735086fec00c1..7f508b9ef616071b1adeef7c00da7f4565ef4ddd 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -245,7 +245,51 @@ public class Chunk implements IChunkAccess { +@@ -246,7 +246,51 @@ public class Chunk implements IChunkAccess { } protected void onNeighbourChange(final long bitsetBefore, final long bitsetAfter) { @@ -93,7 +93,7 @@ index cf86ce24e12068d6ff7ae43cb1fd6fe665c24932..c80a55ee53eac128c94d74b78c564185 public final boolean isAnyNeighborsLoaded() { diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index ae27942991eeaec77f72b58ab32260a35f86b4a4..7702fbefa598bce7e6a2d287f7ec36b78a62bff8 100644 +index 7e57a53ec614a2f7d2672edff9d7c0e0dca42377..c072f61e8c88eac8335acd660d8ff0e2f9db819e 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 { @@ -113,25 +113,25 @@ index ae27942991eeaec77f72b58ab32260a35f86b4a4..7702fbefa598bce7e6a2d287f7ec36b7 + Ticket ticket = new Ticket<>(TicketType.PLAYER, 33, new ChunkCoordIntPair(i)); // Paper - no-tick view distance if (flag1) { - ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error + ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0560eca744cb2032bb6a3faf5aeafa95a7a6815e..07a6fc3d88e7d44bfab7f3d6a0eef7dc132ab422 100644 +index 6c8c697367b2c8504d0467cd58f576afbd3e775f..55351ee29a724e7680e5ec98afea2c0f365bc6c4 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -111,6 +111,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -115,6 +115,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks + boolean needsChunkCenterUpdate; // Paper - no-tick view distance + public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { - super((World) worldserver, gameprofile); - playerinteractmanager.player = this; + super(worldserver, worldserver.getSpawn(), 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 6980d19f36c18cdbed6679dbdf04afd694e078b6..03fb688fe4bdc19b4bc36b1f1d5b40c61e7bef9b 100644 +index 7f660d3c528f5fb4150e4ee8b29913436f125b06..40347212ad1bcf857d5b8ddb0ee6a698e2568201 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -56,6 +56,18 @@ public class PlayerChunk { +@@ -55,6 +55,18 @@ public class PlayerChunk { } // Paper end - optimise isOutsideOfRange @@ -150,7 +150,7 @@ index 6980d19f36c18cdbed6679dbdf04afd694e078b6..03fb688fe4bdc19b4bc36b1f1d5b40c6 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; -@@ -211,7 +223,7 @@ public class PlayerChunk { +@@ -210,7 +222,7 @@ public class PlayerChunk { } public void a(int i, int j, int k) { @@ -159,7 +159,7 @@ index 6980d19f36c18cdbed6679dbdf04afd694e078b6..03fb688fe4bdc19b4bc36b1f1d5b40c6 if (chunk != null) { this.r |= 1 << (j >> 4); -@@ -231,7 +243,7 @@ public class PlayerChunk { +@@ -230,7 +242,7 @@ public class PlayerChunk { } public void a(EnumSkyBlock enumskyblock, int i) { @@ -168,7 +168,7 @@ index 6980d19f36c18cdbed6679dbdf04afd694e078b6..03fb688fe4bdc19b4bc36b1f1d5b40c6 if (chunk != null) { chunk.setNeedsSaving(true); -@@ -316,9 +328,48 @@ public class PlayerChunk { +@@ -303,9 +315,48 @@ public class PlayerChunk { } private void a(Packet packet, boolean flag) { @@ -221,10 +221,10 @@ index 6980d19f36c18cdbed6679dbdf04afd694e078b6..03fb688fe4bdc19b4bc36b1f1d5b40c6 public CompletableFuture> a(ChunkStatus chunkstatus, PlayerChunkMap playerchunkmap) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f145202ff7887 100644 +index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e7b0d4947 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -94,7 +94,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -95,7 +95,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private boolean updatingChunksModified; private final ChunkTaskQueueSorter p; private final Mailbox> mailboxWorldGen; @@ -233,7 +233,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -164,6 +164,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -170,6 +170,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -256,7 +256,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -180,6 +196,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -186,6 +202,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -276,7 +276,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -192,6 +221,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -198,6 +227,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerMobSpawnMap.remove(player); this.playerChunkTickRangeMap.remove(player); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -288,7 +288,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 } void updateMaps(EntityPlayer player) { -@@ -209,6 +243,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -215,6 +249,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -306,9 +306,9 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 + player.needsChunkCenterUpdate = false; + // Paper end - no-tick view distance } + // Paper end - -@@ -316,6 +363,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -322,6 +369,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } }); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -354,7 +354,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 } public void updatePlayerMobTypeMap(Entity entity) { -@@ -1126,15 +1212,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1139,15 +1225,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { completablefuture1.thenAcceptAsync((either) -> { either.mapLeft((chunk) -> { this.u.getAndIncrement(); @@ -367,18 +367,16 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 return Either.left(chunk); }); }, (runnable) -> { -- this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); // CraftBukkit - decompile error -+ this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); // CraftBukkit - decompile error // Paper - diff on change, this is the scheduling method copied in Chunk used to schedule chunk broadcasts (on change it needs to be copied again) +- this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); ++ this.mailboxMain.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); // Paper - diff on change, this is the scheduling method copied in Chunk used to schedule chunk broadcasts (on change it needs to be copied again) }); return completablefuture1; } -@@ -1205,32 +1287,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - } // Paper +@@ -1243,31 +1325,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } -- protected void setViewDistance(int i) { + protected void setViewDistance(int i) { - int j = MathHelper.clamp(i + 1, 3, 33); -+ public final void setViewDistance(int i) { // Paper - public + int j = MathHelper.clamp(i + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32 if (j != this.viewDistance) { @@ -426,7 +424,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 protected void sendChunk(EntityPlayer entityplayer, ChunkCoordIntPair chunkcoordintpair, Packet[] apacket, boolean flag, boolean flag1) { if (entityplayer.world == this.world) { -@@ -1238,7 +1326,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1275,7 +1363,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunk playerchunk = this.getVisibleChunk(chunkcoordintpair.pair()); if (playerchunk != null) { @@ -435,7 +433,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 if (chunk != null) { this.a(entityplayer, apacket, chunk); -@@ -1500,6 +1588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1536,6 +1624,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end - optimise isOutsideOfRange @@ -443,7 +441,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 private boolean b(EntityPlayer entityplayer) { return entityplayer.isSpectator() && !this.world.getGameRules().getBoolean(GameRules.SPECTATORS_GENERATE_CHUNKS); } -@@ -1527,13 +1616,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1563,13 +1652,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.removePlayerFromDistanceMaps(entityplayer); // Paper - distance maps } @@ -458,7 +456,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 } -@@ -1541,7 +1624,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1577,7 +1660,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { SectionPosition sectionposition = SectionPosition.a((Entity) entityplayer); entityplayer.a(sectionposition); @@ -467,7 +465,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 return sectionposition; } -@@ -1586,6 +1669,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1622,6 +1705,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int k1; int l1; @@ -475,7 +473,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 if (Math.abs(i1 - i) <= this.viewDistance * 2 && Math.abs(j1 - j) <= this.viewDistance * 2) { k1 = Math.min(i, i1) - this.viewDistance; l1 = Math.min(j, j1) - this.viewDistance; -@@ -1623,7 +1707,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1659,7 +1743,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.sendChunk(entityplayer, chunkcoordintpair1, new Packet[2], false, true); } } @@ -484,7 +482,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 this.updateMaps(entityplayer); // Paper - distance maps -@@ -1631,11 +1715,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1667,11 +1751,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public Stream a(ChunkCoordIntPair chunkcoordintpair, boolean flag) { @@ -501,7 +499,7 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 + return Stream.empty(); + } + // all current cases are inlined so we wont hit this code, it's just in case plugins or future updates use it -+ List players = new ArrayList<>(); ++ List players = new java.util.ArrayList<>(); + Object[] backingSet = inRange.getBackingSet(); + + if (flag) { // flag -> border only @@ -535,15 +533,15 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 } protected void addEntity(Entity entity) { -@@ -1795,6 +1914,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1829,6 +1948,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } + final void sendChunk(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { this.a(entityplayer, apacket, chunk); } // Paper - OBFHELPER private void a(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { if (apacket[0] == null) { - apacket[0] = new PacketPlayOutMapChunk(chunk, 65535); -@@ -1980,7 +2100,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + apacket[0] = new PacketPlayOutMapChunk(chunk, 65535, true); +@@ -2014,7 +2134,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ); PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair()); @@ -553,28 +551,28 @@ index 74b868d7cec0260a10ca7718f48308f4ec54d56b..f832e7cdfc6741a932787f02754f1452 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 628327e1e39299bbe64dff042d0187a9f79203a8..74571c1befa60e71e93de8052740a56f7b80e920 100644 +index e0a95fde93d4a2339831cb8ea0918174e9914e34..bdee3540b675f8036c5c6a59d6f53057bbdd6a85 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -152,7 +152,7 @@ public abstract class PlayerList { - // CraftBukkit - getType() +@@ -176,7 +176,7 @@ public abstract class PlayerList { + // Spigot - view distance networkmanager.queueImmunity = true; // Paper -- playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), WorldData.c(worlddata.getSeed()), worlddata.isHardcore(), worldserver.worldProvider.getDimensionManager().getType(), this.getMaxPlayers(), worlddata.getType(), worldserver.spigotConfig.viewDistance, flag1, !flag)); -+ playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), WorldData.c(worlddata.getSeed()), worlddata.isHardcore(), worldserver.worldProvider.getDimensionManager().getType(), this.getMaxPlayers(), worlddata.getType(), worldserver.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag)); // Paper - no-tick view distance +- playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); ++ playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -776,7 +776,7 @@ public abstract class PlayerList { - WorldData worlddata = worldserver.getWorldData(); - - entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver.worldProvider.getDimensionManager().getType(), WorldData.c(worldserver.getWorldData().getSeed()), worldserver.getWorldData().getType(), entityplayer1.playerInteractManager.getGameMode())); -- entityplayer1.playerConnection.sendPacket(new PacketPlayOutViewDistance(worldserver.spigotConfig.viewDistance)); // Spigot -+ entityplayer1.playerConnection.sendPacket(new PacketPlayOutViewDistance(worldserver.getChunkProvider().playerChunkMap.getLoadViewDistance())); // Paper - no-tick view distance - entityplayer1.spawnIn(worldserver); +@@ -818,7 +818,7 @@ public abstract class PlayerList { + // CraftBukkit start + WorldData worlddata = worldserver1.getWorldData(); + entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver1.getTypeKey(), worldserver1.getDimensionKey(), BiomeManager.a(worldserver1.getSeed()), entityplayer1.playerInteractManager.getGameMode(), entityplayer1.playerInteractManager.c(), worldserver1.isDebugWorld(), worldserver1.isFlatWorld(), flag)); +- entityplayer1.playerConnection.sendPacket(new PacketPlayOutViewDistance(worldserver1.spigotConfig.viewDistance)); // Spigot ++ entityplayer1.playerConnection.sendPacket(new PacketPlayOutViewDistance(worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance())); // Spigot // Paper - no-tick view distance + entityplayer1.spawnIn(worldserver1); entityplayer1.dead = false; - entityplayer1.playerConnection.teleport(new Location(worldserver.getWorld(), entityplayer1.locX(), entityplayer1.locY(), entityplayer1.locZ(), entityplayer1.yaw, entityplayer1.pitch)); -@@ -1262,7 +1262,7 @@ public abstract class PlayerList { + entityplayer1.playerConnection.teleport(new Location(worldserver1.getWorld(), entityplayer1.locX(), entityplayer1.locY(), entityplayer1.locZ(), entityplayer1.yaw, entityplayer1.pitch)); +@@ -1285,7 +1285,7 @@ public abstract class PlayerList { public void a(int i) { this.viewDistance = i; @@ -584,10 +582,10 @@ index 628327e1e39299bbe64dff042d0187a9f79203a8..74571c1befa60e71e93de8052740a56f while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1c7955d3ae7ddd1c2d924cec20a91202cf090f40..7bd3f789b6055d73f3a6c0628652cca241147887 100644 +index cafa47b90320249f84cd1cc4aca1908a4982bffb..965b43da38832f37091929d954c2bb7e7fbc7798 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -444,8 +444,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -502,8 +502,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.b(blockposition, iblockdata1, iblockdata2); } @@ -603,10 +601,10 @@ index 1c7955d3ae7ddd1c2d924cec20a91202cf090f40..7bd3f789b6055d73f3a6c0628652cca2 if (!this.isClientSide && (i & 1) != 0) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1929aacbe83c401c7254484aa8df62ed1554e3ba..36207acffac3620879afd11bb47e06341a3dabb9 100644 +index e044534d3cb47cf1228c5e5fa8920df8264fd0b5..745633509d3f948d46529d5439ec14cd01a05563 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2493,10 +2493,39 @@ public class CraftWorld implements World { +@@ -2496,10 +2496,39 @@ public class CraftWorld implements World { // Spigot start @Override public int getViewDistance() { @@ -648,7 +646,7 @@ index 1929aacbe83c401c7254484aa8df62ed1554e3ba..36207acffac3620879afd11bb47e0634 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 d873b8cf3aec01b791565c33b252889f99f181f9..f735217e7a99bf8286ea60158f9fe137e84ad75c 100644 +index 97af8f8e3c48694c390036bb1455e6d22fcd1c49..901aac23ae2878f4b05e986e8a363b95371ca6c3 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -201,7 +201,7 @@ public class ActivationRange diff --git a/Spigot-Server-Patches/0486-Allow-sleeping-players-to-float.patch b/Spigot-Server-Patches/0486-Allow-sleeping-players-to-float.patch deleted file mode 100644 index 0727ae686c..0000000000 --- a/Spigot-Server-Patches/0486-Allow-sleeping-players-to-float.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mariell Hoversholm -Date: Sun, 19 Apr 2020 12:25:20 +0200 -Subject: [PATCH] Allow sleeping players to float - -This change lets players who are in their bed have a position which is above -ground for a longer period of time. This is because of the server not setting -their position to the ground/exit location when entering the bed, resulting in -the server believing they're still in the air. - -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6dd4303c1c211ac4b0bb542ea96cc150581bf8c1..08e087d952edfecd73ad698684b71c09dabbac9e 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -160,7 +160,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - this.player.setLocation(this.l, this.m, this.n, this.player.yaw, this.player.pitch); - ++this.e; - this.processedMovePackets = this.receivedMovePackets; -- if (this.B) { -+ if (this.B && !this.player.isSleeping()) { // Paper - #3176 Allow sleeping players to float - if (++this.C > 80) { - PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString()); - this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message From 014b7f115dcd5f362c943fa07fe97527e2b27d4f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 25 Jun 2020 21:58:00 -0400 Subject: [PATCH 12/95] Current non compilable status of all patches - THIS IS NOT READY THERE IS STILL NO ETA. GOBLINS WILL EAT YOU. --- Paper-MojangAPI/pom.xml | 2 +- Spigot-Server-Patches/0001-POM-Changes.patch | 4 +- .../0002-Paper-config-files.patch | 6 +- Spigot-Server-Patches/0004-MC-Utils.patch | 10 +- ...-MinecraftKey-Information-to-Objects.patch | 6 +- ...to-current-Chunk-for-Entity-and-Bloc.patch | 6 +- Spigot-Server-Patches/0009-Timings-v2.patch | 12 +- ...d-mobs-to-jump-and-take-water-damage.patch | 4 +- ...ck-and-tnt-entities-at-the-specified.patch | 4 +- ...ient-crashes-server-lists-and-Mojang.patch | 6 +- ...023-Further-improve-server-tick-loop.patch | 2 +- .../0025-Entity-Origin-API.patch | 10 +- ...nfigurable-top-of-nether-void-damage.patch | 8 +- .../0030-Configurable-end-credits.patch | 2 +- .../0032-Optimize-explosions.patch | 2 +- ...sition-the-first-time-an-entity-is-s.patch | 2 +- ...figurable-container-update-tick-rate.patch | 2 +- ...dd-configurable-portal-search-radius.patch | 12 +- .../0054-Add-exception-reporting-event.patch | 2 +- ...-don-t-need-to-when-cerealising-text.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 4 +- ...064-Handle-Item-Meta-Inconsistencies.patch | 4 +- ...070-Use-a-Shared-Random-for-Entities.patch | 6 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 2 +- .../0088-Configurable-Player-Collision.patch | 2 +- ...92-Implement-PlayerLocaleChangeEvent.patch | 5 +- ...-possibility-for-getServer-singleton.patch | 2 +- ...-API-Replenishable-Lootables-Feature.patch | 4 +- ...y-scoreboard-teams-to-scoreboard.dat.patch | 2 +- .../0100-Optimize-UserCache-Thread-Safe.patch | 2 +- ...2-Optional-TNT-doesn-t-move-in-water.patch | 4 +- .../0104-Add-server-name-parameter.patch | 2 +- ...uto-fix-bad-Y-levels-on-player-login.patch | 2 +- .../0117-Add-EntityZapEvent.patch | 4 +- ...119-Cache-user-authenticator-threads.patch | 4 +- ...2-Add-source-to-PlayerExpChangeEvent.patch | 6 +- ...3-Don-t-let-fishinghooks-use-portals.patch | 4 +- .../0124-Add-ProjectileCollideEvent.patch | 13 +- ...31-Properly-fix-item-duplication-bug.patch | 4 +- .../0134-PlayerTeleportEndGatewayEvent.patch | 2 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- ...llow-entities-to-ride-themselves-572.patch | 4 +- ...PI-for-Reason-Source-Triggering-play.patch | 4 +- .../0139-Cap-Entity-Collisions.patch | 4 +- ...more-aggressive-in-the-chunk-unload-.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 2 +- ...oleAppender-for-console-improvements.patch | 4 +- .../0153-Basic-PlayerProfile-API.patch | 2 +- .../0154-Shoulder-Entities-Release-API.patch | 4 +- .../0157-Entity-fromMobSpawner.patch | 8 +- .../0162-Fix-this-stupid-bullshit.patch | 4 +- ...-maximum-exp-value-when-merging-orbs.patch | 4 +- ...-get-a-BlockState-without-a-snapshot.patch | 2 +- .../0185-ExperienceOrbMergeEvent.patch | 4 +- ...9-PlayerNaturallySpawnCreaturesEvent.patch | 4 +- .../0193-Add-ArmorStand-Item-Meta.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 2 +- ...d-method-to-open-already-placed-sign.patch | 4 +- ...ld.spawnParticle-API-and-add-Builder.patch | 2 +- ...Item-entities-with-World.spawnEntity.patch | 2 +- ...0222-ItemStack-getMaxItemUseDuration.patch | 2 +- ...ent-consumeArrow-and-getArrowItem-AP.patch | 12 +- .../0238-InventoryCloseEvent-Reason-API.patch | 16 +- ...-more-information-to-Entity.toString.patch | 4 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 4 +- ...3-Vanished-players-don-t-have-rights.patch | 8 +- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 4 +- ...ead-Entities-in-entityList-iteration.patch | 4 +- .../0265-Add-hand-to-bucket-events.patch | 8 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 2 +- .../0286-Improve-death-events.patch | 16 +- ...-for-CanPlaceOn-and-CanDestroy-NBT-v.patch | 2 +- .../0295-Optimize-Server-World-Map.patch | 2 +- ...tator-target-events-and-improve-impl.patch | 4 +- ...09-Reset-players-airTicks-on-respawn.patch | 8 +- ...er-Thread-Pool-and-Thread-Priorities.patch | 2 +- .../0312-Optimize-World-Time-Updates.patch | 2 +- ...entity-dismount-during-teleportation.patch | 14 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 2 +- ...vehicle-tracking-issue-on-disconnect.patch | 4 +- ...341-Add-LivingEntity-getTargetEntity.patch | 6 +- .../0343-Entity-getEntitySpawnReason.patch | 8 +- .../0348-Server-Tick-Events.patch | 2 +- ...0349-PlayerDeathEvent-getItemsToKeep.patch | 2 +- ...n-item-frames-are-modified-MC-123450.patch | 4 +- ...isPrimaryThread-and-MinecraftServer-.patch | 2 +- .../0358-Duplicate-UUID-Resolve-Option.patch | 4 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 2 +- .../0369-incremental-chunk-saving.patch | 2 +- ...76-Asynchronous-chunk-IO-and-loading.patch | 2 +- ...if-we-have-a-custom-Bukkit-generator.patch | 2 +- ...ement-optional-per-player-mob-spawns.patch | 4 +- ...-sneak-when-changing-worlds-MC-10657.patch | 4 +- .../0398-Optimize-Hoppers.patch | 2 +- ...layerDeathEvent-shouldDropExperience.patch | 2 +- .../0408-Entity-Activation-Range-2.0.patch | 10 +- ...x-items-vanishing-through-end-portal.patch | 6 +- ...ow-overriding-the-java-version-check.patch | 2 +- ...n-to-nerf-pigmen-from-nether-portals.patch | 8 +- .../0419-Make-the-GUI-graph-fancier.patch | 2 +- ...420-add-hand-to-BlockMultiPlaceEvent.patch | 4 +- ...spawn-settings-and-per-player-option.patch | 2 +- ...re-Entity-is-never-double-registered.patch | 4 +- ...ptimize-Collision-to-not-load-chunks.patch | 4 +- .../0434-Don-t-tick-dead-players.patch | 2 +- .../0437-Increase-Light-Queue-Size.patch | 2 +- ...asks-Speed-up-processing-of-chunk-lo.patch | 2 +- ...move-existing-players-to-world-spawn.patch | 2 +- ...-Add-tick-times-API-and-mspt-command.patch | 2 +- .../0446-Improved-Watchdog-Support.patch | 4 +- ...vent-opening-inventories-when-frozen.patch | 20 +- ...imise-entity-hard-collision-checking.patch | 4 +- ...-Implement-Player-Client-Options-API.patch | 4 +- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 2 +- ...Load-Chunks-for-Login-Asynchronously.patch | 6 +- ...pawn-point-if-spawn-in-unloaded-worl.patch | 4 +- ...m-duplication-issues-and-teleport-is.patch | 14 +- ...-per-thread-native-byte-buffer-cache.patch | 2 +- ...tance-map-to-optimise-entity-tracker.patch | 6 +- ...-isOutsideRange-to-use-distance-maps.patch | 2 +- ...No-Tick-view-distance-implementation.patch | 2 +- ...=> 0481-Add-villager-reputation-API.patch} | 18 +- ...and.patch => 0482-Fix-Light-Command.patch} | 12 +- ...-Fix-PotionEffect-ignores-icon-flag.patch} | 4 +- ...brigadier-child-sorting-performance.patch} | 0 ...ock-unless-actually-showing-the-mes.patch} | 2 +- ...API.patch => 0486-Potential-bed-API.patch} | 21 +- ...ait-for-Async-Tasks-during-shutdown.patch} | 10 +- ...er-respects-game-and-entity-rules-f.patch} | 11 +- ...nd-End-Portal-Frames-from-being-des.patch} | 93 +++--- ...e-NibbleArray-to-use-pooled-buffers.patch} | 40 ++- ...leInt-allocations-from-light-engine.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 12 +- ...> 0493-Ensure-safe-gateway-teleport.patch} | 19 +- ...-for-console-having-all-permissions.patch} | 8 +- ...und-for-Client-Lag-Spikes-MC-162253.patch} | 20 +- ...-Priority-Urgency-System-for-Chunks.patch} | 193 ++++++----- ...n-Full-Status-Chunk-NBT-Memory-Leak.patch} | 6 +- ...-packets-to-nearby-locations-sounds-.patch | 63 ++++ ...prove-Chunk-Status-Transition-Speed.patch} | 40 +-- ...x-villager-trading-demand-MC-163962.patch} | 2 +- ... => 0501-Maps-shouldn-t-load-chunks.patch} | 2 +- ...okup-for-Treasure-Maps-Fixes-lag-fr.patch} | 9 +- ...Optimize-Bit-Operations-by-inlining.patch} | 105 ++---- ...patch => 0504-Optimize-Light-Engine.patch} | 312 +++++++----------- ...nk-Unloads-based-on-Player-Movement.patch} | 16 +- ...Plugin-Tickets-to-API-Chunk-Methods.patch} | 20 +- ...506-Fix-CraftServer.unloadWorld-Leak.patch | 124 ------- ...sing-chunks-due-to-integer-overflow.patch} | 4 +- ...r-runTaskTimerAsynchronously-Plugin.patch} | 0 ...ton-physics-inconsistency-MC-188840.patch} | 21 +- ...generate-Carving-Masks-BitSet-unless.patch | 43 --- ...uping.patch => 0510-Fix-sand-duping.patch} | 2 +- ...desync-in-playerconnection-causing-.patch} | 6 +- .../0512-Fix-enderdragon-exp-dupe.patch | 28 ++ ...older-method-without-block-snapshot.patch} | 4 +- ...h => 0514-Expose-Arrow-getItemStack.patch} | 6 +- ...mplement-PlayerRecipeBookClickEvent.patch} | 4 +- ... => 0516-Add-PrepareGrindstoneEvent.patch} | 2 +- ...-packets-to-nearby-locations-sounds-.patch | 73 ---- .../0544-Fix-enderdragon-exp-dupe.patch | 37 --- ...quid-s-Entity-Collision-optimisation.patch | 0 ...me-Streams-usage-in-Entity-Collision.patch | 0 ...sure-Entity-AABB-s-are-never-invalid.patch | 0 ...WorldBorder-collision-checks-and-air.patch | 0 ...der-Remove-Streams-Optimized-collect.patch | 0 ...24-Add-permission-for-command-blocks.patch | 0 .../1.16}/0530-Optimize-Villagers.patch | 0 work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 171 files changed, 814 insertions(+), 1122 deletions(-) rename Spigot-Server-Patches/{0504-Add-villager-reputation-API.patch => 0481-Add-villager-reputation-API.patch} (93%) rename Spigot-Server-Patches/{0505-Fix-Light-Command.patch => 0482-Fix-Light-Command.patch} (94%) rename Spigot-Server-Patches/{0507-Fix-PotionEffect-ignores-icon-flag.patch => 0483-Fix-PotionEffect-ignores-icon-flag.patch} (87%) rename Spigot-Server-Patches/{0508-Optimize-brigadier-child-sorting-performance.patch => 0484-Optimize-brigadier-child-sorting-performance.patch} (100%) rename Spigot-Server-Patches/{0510-Don-t-toString-block-unless-actually-showing-the-mes.patch => 0485-Don-t-toString-block-unless-actually-showing-the-mes.patch} (92%) rename Spigot-Server-Patches/{0514-Potential-bed-API.patch => 0486-Potential-bed-API.patch} (57%) rename Spigot-Server-Patches/{0515-Wait-for-Async-Tasks-during-shutdown.patch => 0487-Wait-for-Async-Tasks-during-shutdown.patch} (87%) rename Spigot-Server-Patches/{0517-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch => 0488-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch} (77%) rename Spigot-Server-Patches/{0519-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (69%) rename Spigot-Server-Patches/{0520-Optimize-NibbleArray-to-use-pooled-buffers.patch => 0490-Optimize-NibbleArray-to-use-pooled-buffers.patch} (92%) rename Spigot-Server-Patches/{0521-Reduce-MutableInt-allocations-from-light-engine.patch => 0491-Reduce-MutableInt-allocations-from-light-engine.patch} (100%) rename Spigot-Server-Patches/{0522-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (90%) rename Spigot-Server-Patches/{0523-Ensure-safe-gateway-teleport.patch => 0493-Ensure-safe-gateway-teleport.patch} (64%) rename Spigot-Server-Patches/{0525-Add-option-for-console-having-all-permissions.patch => 0494-Add-option-for-console-having-all-permissions.patch} (90%) rename Spigot-Server-Patches/{0526-Workaround-for-Client-Lag-Spikes-MC-162253.patch => 0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch} (92%) rename Spigot-Server-Patches/{0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch => 0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch} (89%) rename Spigot-Server-Patches/{0528-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch => 0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch} (94%) create mode 100644 Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename Spigot-Server-Patches/{0531-Improve-Chunk-Status-Transition-Speed.patch => 0499-Improve-Chunk-Status-Transition-Speed.patch} (72%) rename Spigot-Server-Patches/{0532-Fix-villager-trading-demand-MC-163962.patch => 0500-Fix-villager-trading-demand-MC-163962.patch} (89%) rename Spigot-Server-Patches/{0533-Maps-shouldn-t-load-chunks.patch => 0501-Maps-shouldn-t-load-chunks.patch} (95%) rename Spigot-Server-Patches/{0534-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch => 0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch} (82%) rename Spigot-Server-Patches/{0535-Optimize-Bit-Operations-by-inlining.patch => 0503-Optimize-Bit-Operations-by-inlining.patch} (69%) rename Spigot-Server-Patches/{0536-Optimize-Light-Engine.patch => 0504-Optimize-Light-Engine.patch} (88%) rename Spigot-Server-Patches/{0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch => 0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch} (90%) rename Spigot-Server-Patches/{0538-Add-Plugin-Tickets-to-API-Chunk-Methods.patch => 0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch} (89%) delete mode 100644 Spigot-Server-Patches/0506-Fix-CraftServer.unloadWorld-Leak.patch rename Spigot-Server-Patches/{0539-Fix-missing-chunks-due-to-integer-overflow.patch => 0507-Fix-missing-chunks-due-to-integer-overflow.patch} (90%) rename Spigot-Server-Patches/{0540-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch => 0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch} (100%) rename Spigot-Server-Patches/{0541-Fix-piston-physics-inconsistency-MC-188840.patch => 0509-Fix-piston-physics-inconsistency-MC-188840.patch} (84%) delete mode 100644 Spigot-Server-Patches/0509-MC-183249-Don-t-generate-Carving-Masks-BitSet-unless.patch rename Spigot-Server-Patches/{0542-Fix-sand-duping.patch => 0510-Fix-sand-duping.patch} (94%) rename Spigot-Server-Patches/{0543-Prevent-position-desync-in-playerconnection-causing-.patch => 0511-Prevent-position-desync-in-playerconnection-causing-.patch} (86%) create mode 100644 Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch rename Spigot-Server-Patches/{0545-Inventory-getHolder-method-without-block-snapshot.patch => 0513-Inventory-getHolder-method-without-block-snapshot.patch} (92%) rename Spigot-Server-Patches/{0546-Expose-Arrow-getItemStack.patch => 0514-Expose-Arrow-getItemStack.patch} (83%) rename Spigot-Server-Patches/{0547-Add-and-implement-PlayerRecipeBookClickEvent.patch => 0515-Add-and-implement-PlayerRecipeBookClickEvent.patch} (92%) rename Spigot-Server-Patches/{0548-Add-PrepareGrindstoneEvent.patch => 0516-Add-PrepareGrindstoneEvent.patch} (93%) delete mode 100644 Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch delete mode 100644 Spigot-Server-Patches/0544-Fix-enderdragon-exp-dupe.patch rename {Spigot-Server-Patches => removed/1.16}/0511-Implement-JellySquid-s-Entity-Collision-optimisation.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0512-Remove-some-Streams-usage-in-Entity-Collision.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0513-Ensure-Entity-AABB-s-are-never-invalid.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0516-Optimize-WorldBorder-collision-checks-and-air.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0518-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0524-Add-permission-for-command-blocks.patch (100%) rename {Spigot-Server-Patches => removed/1.16}/0530-Optimize-Villagers.patch (100%) diff --git a/Paper-MojangAPI/pom.xml b/Paper-MojangAPI/pom.xml index d0da7daf4e..4c7c62c787 100644 --- a/Paper-MojangAPI/pom.xml +++ b/Paper-MojangAPI/pom.xml @@ -10,7 +10,7 @@ com.destroystokyo.paper paper-mojangapi - 1.15.2-R0.1-SNAPSHOT + 1.16.1-R0.1-SNAPSHOT jar Paper-MojangAPI diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index ec0dbc3a7d..88617b94b1 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -190,7 +190,7 @@ index 0466cd48f5ccd1479f2909c70654d884dc1e8f24..7bc5bf271e435e1e0d85af133f1352f3 diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 4ac80c20ba970a2078fe62c452e7fdfb8ad0b46e..a5c4b7f28f13f0aad4712912f60ba5fc6785539a 100644 +index b75bed0890ce76c7a015998f199851374de6983c..9ff914194ca72c2d0d4c63a12fa4441aee93429d 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -186,7 +186,7 @@ public class Main { @@ -201,7 +201,7 @@ index 4ac80c20ba970a2078fe62c452e7fdfb8ad0b46e..a5c4b7f28f13f0aad4712912f60ba5fc + Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -3); + deadline.add(Calendar.DAY_OF_YEAR, -1); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 93046379d0cefd5d3236fc59e698809acdc18f80..674096cab190d62622f9947853b056f57d43a2a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index edc9aad0d9..51ac0e6718 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -574,10 +574,10 @@ index 27e6872c675647d7e61040b76183dac4e347a40c..1964130ae411ff7d5e1b456a23629804 this.setPVP(dedicatedserverproperties.pvp); this.setAllowFlight(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 390dafff979ebdd99b98db312035d665ab1eabda..2f81613099f3fa8828ce0a20c2cc26d431f208e5 100644 +index ede38b7b5fe4acc29ae9c12298a73a3a745983ac..781eaaa4544dfa6e2c523d4d3d99929e7ab46ac7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -136,9 +136,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { private static final DataWatcherObject aA = DataWatcher.a(Entity.class, DataWatcherRegistry.i); protected static final DataWatcherObject POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s); public boolean inChunk; @@ -699,7 +699,7 @@ index 9aa648bb5ec42730f6ce85902b91a079084e7f8e..d9dda69118a5319da28cf3011fe5d8a6 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index a5c4b7f28f13f0aad4712912f60ba5fc6785539a..3d15661eb1f15f74213ecb7e8eceb1f231ad2c1c 100644 +index 9ff914194ca72c2d0d4c63a12fa4441aee93429d..5d8a9361151985f8a8215797592f7998a186152d 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -129,6 +129,14 @@ public class Main { diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 0bd0c2f86a..b569c83569 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -3053,10 +3053,10 @@ index 8856981da86219bdb036aa6246152f382ff8a818..4c6979903d287f7f37d9029f6ce25517 this.a(); packetdataserializer.writeByte(this.i); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2f81613099f3fa8828ce0a20c2cc26d431f208e5..1512b23034b0ec95e2c72b9dd1c7b0a80d611e15 100644 +index 781eaaa4544dfa6e2c523d4d3d99929e7ab46ac7..0622f0d8d765c1249fd97f27c3c83af519f01c00 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -984,8 +984,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -983,8 +983,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { } @@ -3068,7 +3068,7 @@ index 2f81613099f3fa8828ce0a20c2cc26d431f208e5..1512b23034b0ec95e2c72b9dd1c7b0a8 return null; } -@@ -1775,6 +1776,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1774,6 +1775,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return EnumInteractionResult.PASS; } @@ -3126,7 +3126,7 @@ index fb0f281261455c9f127abd8d3b336135ad84fc27..ebdd990829edb8e423f482fa4352fe2d super(entitytypes, world); this.f = 5; diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3f4453bbfbad4d4171c2981fd625e80aec6bea6c..2f3fe374070a3743931ac0c68c949cded4da085a 100644 +index a356e3258a69e059fd752212d3c5f13078ed62ab..183346d37e36be70348ecf0f2f26a0e0ef35eab8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -91,6 +91,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -3807,7 +3807,7 @@ index 0000000000000000000000000000000000000000..da7a325d070e194cd1664ed20dcb3a76 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3cb0957d8b57c930d74fc25aa5e1a0eaaf33e747..0aed429bfa996b1b01dbe2c876c6ad489ab7fa4a 100644 +index a5f26a51ba612bc62d406cbefa858af75bd062da..67120e3e4a2cd77394fd7e77543223afa2d6a22e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -767,6 +767,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1512b23034b0ec95e2c72b9dd1c7b0a80d611e15..06165a668c96d25f3a863f5c98eae93240fd56fc 100644 +index 0622f0d8d765c1249fd97f27c3c83af519f01c00..3e679f66cd922cf0b47a84cdd1a83f311ddf6d0b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -50,7 +50,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; +@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.plugin.PluginManager; // CraftBukkit end @@ -31,7 +31,7 @@ index 1512b23034b0ec95e2c72b9dd1c7b0a80d611e15..06165a668c96d25f3a863f5c98eae932 // CraftBukkit start private static final int CURRENT_LEVEL = 2; -@@ -1671,12 +1671,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1670,12 +1670,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return true; } 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 704accb548..725775fd21 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 @@ -80,10 +80,10 @@ index 7c7826cf3adb19814984ab627e4c4726d8933244..bd92ed2e6d4766f4f16ec3002c41b36b } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 06165a668c96d25f3a863f5c98eae93240fd56fc..62814197d32f9daf4e6b6aad26920589589efd75 100644 +index 3e679f66cd922cf0b47a84cdd1a83f311ddf6d0b..f51325612fa14c1428679d6955a6d92322da7c84 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -179,7 +179,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -178,7 +178,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean isChunkLoaded() { @@ -92,7 +92,7 @@ index 06165a668c96d25f3a863f5c98eae93240fd56fc..62814197d32f9daf4e6b6aad26920589 } // CraftBukkit end -@@ -1672,6 +1672,23 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1671,6 +1671,23 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 7c3b44e415..2ae0e78da8 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1001,10 +1001,10 @@ index 1964130ae411ff7d5e1b456a23629804d294a5d0..4cf4ef11ce295aec3b7d0bf07b64a1ec } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 62814197d32f9daf4e6b6aad26920589589efd75..a25e9ce6d536c8c276750bfd56ac73a2dbaf7202 100644 +index f51325612fa14c1428679d6955a6d92322da7c84..81f2c91f9e27e2ad2855b64a7849efa18505e952 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -30,7 +30,8 @@ import org.bukkit.command.CommandSender; +@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Hanging; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Vehicle; @@ -1014,7 +1014,7 @@ index 62814197d32f9daf4e6b6aad26920589589efd75..a25e9ce6d536c8c276750bfd56ac73a2 import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; -@@ -166,7 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -165,7 +166,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public boolean valid; public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 @@ -1023,7 +1023,7 @@ index 62814197d32f9daf4e6b6aad26920589589efd75..a25e9ce6d536c8c276750bfd56ac73a2 // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -527,7 +528,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -526,7 +527,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public void move(EnumMoveType enummovetype, Vec3D vec3d) { @@ -1031,7 +1031,7 @@ index 62814197d32f9daf4e6b6aad26920589589efd75..a25e9ce6d536c8c276750bfd56ac73a2 if (this.noclip) { this.a(this.getBoundingBox().c(vec3d)); this.recalcPosition(); -@@ -664,7 +664,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -663,7 +663,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.getMethodProfiler().exit(); } @@ -1116,7 +1116,7 @@ index dccb315440f7429fe881bd0d12af8f1ae8e35c3d..96a95413f74592ef0a8e9367fd3ed81f if (!this.world.isClientSide && this.dN() && this.aC()) { this.damageEntity(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0aed429bfa996b1b01dbe2c876c6ad489ab7fa4a..76ee1196df1d9a0f4c9dfb7b590ee95cc9871aae 100644 +index 67120e3e4a2cd77394fd7e77543223afa2d6a22e..a5284ca66043150c7132f6bee29a952fb6601007 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer; diff --git a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index 10b2a01af5..ecb06718c4 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -31,10 +31,10 @@ index 2e869004c8c6b8bfbb002fb4eda04519d50390c8..8a6856e0fd7b9b515d98f45aaabefbc3 this.b.setJumping(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a25e9ce6d536c8c276750bfd56ac73a2dbaf7202..748193697235755ba778126dd693526ece0bf46d 100644 +index 81f2c91f9e27e2ad2855b64a7849efa18505e952..f8a85f1c96729ad97aa5f21ac0468c92f243f079 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1025,6 +1025,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1024,6 +1024,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.isInWater() || this.isInRain(); } diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 63ab83a6ac..6066138b6b 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -24,10 +24,10 @@ index 8ee2b9bb1bce698fce50ac1b3fc477fcafd0542c..d59b82b7bb1f6d1b231f4e394e0a67a3 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 748193697235755ba778126dd693526ece0bf46d..0f40d8505edda1bb01b5212e2d2fdf07fbfa302b 100644 +index f8a85f1c96729ad97aa5f21ac0468c92f243f079..80f1c4930d6dd602210b07a50b10c45e9f80ae8a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1762,6 +1762,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1761,6 +1761,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(itemstack, 0.0F); } diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 1381f0383e..be4ce0fe65 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -19,7 +19,7 @@ index aab33df7a36eb69300fedfce733985d6c239ca01..550232cb3819138b3bae0fa1c5142948 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 76ee1196df1d9a0f4c9dfb7b590ee95cc9871aae..f4d2ecac55d8ec6272fcb9488c8d4488119b991d 100644 +index a5284ca66043150c7132f6bee29a952fb6601007..77746c19bdeb81b0b2da86cf0aad39207e1b16d1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1225,7 +1225,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0); -@@ -433,6 +440,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -432,6 +439,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.getMethodProfiler().exit(); } @@ -67,7 +67,7 @@ index 15a7c8c01ad27ad25eec8cb59c20e9fe4e0f0ba6..71f2234fd430ee219da6b3d10b8e679a protected void E() { if (this.portalCooldown > 0) { --this.portalCooldown; -@@ -508,6 +526,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -507,6 +525,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.setFireTicks(0); } diff --git a/Spigot-Server-Patches/0030-Configurable-end-credits.patch b/Spigot-Server-Patches/0030-Configurable-end-credits.patch index 8680df6f7d..5094638692 100644 --- a/Spigot-Server-Patches/0030-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0030-Configurable-end-credits.patch @@ -20,7 +20,7 @@ index f7a0a33e49cadf9b2bd43f118c106937760da762..50dec5cb5e924301842300e8fc80cb67 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 2f3fe374070a3743931ac0c68c949cded4da085a..f768c6450f5224507fd6b2251de14cc59227d1a9 100644 +index 183346d37e36be70348ecf0f2f26a0e0ef35eab8..c3fc8de59042e97560785997fdb3f7bbdc6234e6 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0032-Optimize-explosions.patch b/Spigot-Server-Patches/0032-Optimize-explosions.patch index 0942164ba6..d79c31b57b 100644 --- a/Spigot-Server-Patches/0032-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0032-Optimize-explosions.patch @@ -123,7 +123,7 @@ index bf156897acfe25c16a1b09a83a00ba3ab647a2dd..842563f2030382659a62a3a63d9af9d5 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 401e528b0812f4917fe782a16ce3831e4427ac6b..fe47aa345b93105547e216f683491943866ccd3f 100644 +index 9555c26c889ceb19b2546967ad60979c8f4868f4..63c2953d6eb6f3c034be97e0cb2dd5e991c75fdd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1209,6 +1209,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch index cb3b72b349..202a44a847 100644 --- a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch @@ -25,10 +25,10 @@ index abbf59bb91021821876a8960e8f77fac24457ec4..04430aae52205ee167662004e45c145b + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index bfdb57ff56df5d025a7bba9558682089a557c7c9..936919c357865b8933dc1395fffa844940099138 100644 +index 833234254a93b0aee421f7cdb91f85f269040b91..c2ea0e74b72976131976f875934042cf65ba8263 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2196,6 +2196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2195,6 +2195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public ScoreboardTeamBase getScoreboardTeam() { diff --git a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch index dd8b0ecd94..f36e44a5d1 100644 --- a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch @@ -79,7 +79,7 @@ index 76091ab3f149decc0d3c848b79edd24e20cf181d..a360711ea14983e8df34caa5edda80a0 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index c59da5b36c158a25ab861b1aaee497b4119feb3e..bbee99c13e66b50401489fa4ea497980b1e50b18 100644 +index 2097ea9b2683bf4063fbcb601720e8d297fb3b13..52fbc33dab7090075146e04388262f91ae027f2d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { @@ -194,7 +194,7 @@ index c59da5b36c158a25ab861b1aaee497b4119feb3e..bbee99c13e66b50401489fa4ea497980 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index dac0bf9c482cdad7a4e94e41a70cd0765e3c5f18..c1a42d04429a4e9587a4907c29f6b917951e659c 100644 +index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c7544abf44ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; diff --git a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch index 3329238321..100be84da7 100644 --- a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 936919c357865b8933dc1395fffa844940099138..d4e673a70f28b9d29b3d1b16eaa06562b7a5d7bc 100644 +index c2ea0e74b72976131976f875934042cf65ba8263..9e750c0ff42fa1189f20f10495e1ca1d74c6d51b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -59,6 +59,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -58,6 +58,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } @@ -31,7 +31,7 @@ index 936919c357865b8933dc1395fffa844940099138..d4e673a70f28b9d29b3d1b16eaa06562 private CraftEntity bukkitEntity; public CraftEntity getBukkitEntity() { -@@ -193,7 +208,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -192,7 +207,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.x = Vec3D.a; this.at = 1.0F; this.au = 1.0F; diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index b369db1166..cf5dd44636 100644 --- a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -32,7 +32,7 @@ index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c410 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fe47aa345b93105547e216f683491943866ccd3f..2455bbee53b4fe3084a785471fde7c4a3354dd4b 100644 +index 63c2953d6eb6f3c034be97e0cb2dd5e991c75fdd..777a553fe3abfdc5db3616352ac11de7969f737c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1175,6 +1175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0) { diff --git a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch index f6a1745082..f71a663959 100644 --- a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch @@ -27,10 +27,10 @@ index f164844f339793860e773c499443ce160d0a6830..751551f173338217f6682532a9a5e1a2 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8bac1e7d8ad004fc7d248ed21382ca9042dfa9b7..400e6d5784d1d92678bf26fa3dbffbe2e0424a65 100644 +index e1c592c57e54c0c0882978b25286e06d6aaef570..6c60cf4ff4e7d5716c0487767b7632a59607ce23 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -189,6 +189,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; diff --git a/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index b2d49c6fc2..293fd16f1c 100644 --- a/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 9816b64c0760f334e508194ccb3f6b3ab54f7695..cec1baadf5e8e0459837522ca434327491005e8c 100644 +index 2b4033cb2b3d42b776afb9c219d2f64b6c6b1e79..465beba397f05a31dcda9840375a0e9b97153e78 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -75,7 +75,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch index cfbf5f476c..9cbb7bc520 100644 --- a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 56c9e7e2fd3b454f20fe6f440915bbb770d9a0c9..bb08e1ed62e50549bcef036218f9ed9ed8124a97 100644 +index 9c9dc07a3b6dbfc5c4e0abc9a094de7230c34452..d710082d0aefa0d4a3dccbf5839969bc4d056e7b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -91,6 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0) { diff --git a/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch index 0df5427f98..321d2d8401 100644 --- a/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch @@ -39,7 +39,7 @@ index 967aec7ce9a7fbbb42b51d1ed281db005e107c2c..54285237ed5a096b2e46cabd78f7dcd5 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 562d9daa34540c0e3d99b799dd6f01bf87329006..5ce381ad88daf5f95b19871356ab5852097c5956 100644 +index 1d75200e73f3eaccca4040853a14cfa35a09a2ea..20a294723869756495b4bd5c23846be4049d52a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -308,6 +308,20 @@ public class CraftBlock implements Block { diff --git a/Spigot-Server-Patches/0185-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0185-ExperienceOrbMergeEvent.patch index 769320160c..deef60597b 100644 --- a/Spigot-Server-Patches/0185-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0185-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 ee7f71c0fe2cf075ab2e821391cd94f920dc494b..8551d3c9ba808bb9a77897a9866249bc0845c3b2 100644 +index ffad80b0c08274a0a24bfad731a299ae153b6bd9..1529a42197380bd7570abc085a7ad77e9a58894c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -558,7 +558,7 @@ public class CraftEventFactory { +@@ -572,7 +572,7 @@ public class CraftEventFactory { if (e instanceof EntityExperienceOrb) { EntityExperienceOrb loopItem = (EntityExperienceOrb) e; // Paper start diff --git a/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch index cf0949b6b7..b6a7714d43 100644 --- a/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch @@ -29,7 +29,7 @@ index 7abd3683f9cc21b90dc74739954de2decddf6478..6921def2dc8dd7f2b8ba9d46ab697a9f Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f4275e2ba2659d3087395105da9446225d3a904c..00b19cce68abf405117c5e2d55ba86fc10e7db34 100644 +index 2fa8c3e2491ff5947a99374c0678694d833bf659..253dac9aff57f4311f8c3134caad760992bd340b 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1,5 +1,6 @@ @@ -48,7 +48,7 @@ index f4275e2ba2659d3087395105da9446225d3a904c..00b19cce68abf405117c5e2d55ba86fc public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index cec1baadf5e8e0459837522ca434327491005e8c..ebe18750e19030b7e7eceb8190fc8d78dc0c3a90 100644 +index 465beba397f05a31dcda9840375a0e9b97153e78..4ae3e91677ecf9c2104a229b4e8b229d18b87aa4 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -912,12 +912,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch index c9871a8cb5..0c370ab224 100644 --- a/Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch @@ -267,7 +267,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..3723faccac00afe19e59d71008ba1604 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c1a42d04429a4e9587a4907c29f6b917951e659c..e5a2779a0460500c7d58f97c605549a366b5f0ce 100644 +index 5d14fff8050f43f5bd9036d5e8b8c7544abf44ee..153f4c31584e6968978ce4befd7db294cc44c16b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1427,7 +1427,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { diff --git a/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch index 8d678debf8..7b693c305a 100644 --- a/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c8a82a6b4b29dcee0f7996b7fd9f01fd73ec2659..f5fa425308e4253d961f8f2bac5b961616dd8521 100644 +index 12aaacc19006f99ccd59f98b55dbab8b4134c654..790d7df8691537a976086b5507db4f97054706de 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2,6 +2,9 @@ package net.minecraft.server; diff --git a/Spigot-Server-Patches/0210-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0210-Add-method-to-open-already-placed-sign.patch index 4d1123236d..abc0e8ae04 100644 --- a/Spigot-Server-Patches/0210-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0210-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 d67fd3bf1048afae0bb78a95724ddf53337d9a2f..42bc39381c4fc5ff81bdd312afd1644dcc5d40c2 100644 +index 30ba0a6aa2fd8c281f1129ad3098ee1033c32f8c..27b2ee740a705238995dd3bcea62b4bf74ec82dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -584,4 +584,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -585,4 +585,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { entity.remove(); } } diff --git a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch index 73173219f4..b5d2d74d2f 100644 --- a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -43,7 +43,7 @@ index 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2 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 876a62a456c8ff938cca4944b0b40a135dd6ac1c..aa497699fc0fab80b3da1ff4dd08840260cb22d3 100644 +index 7c4514ad1969f7f79bb474606df0f2c3c5888b1a..81546c69e375ffdd46634a5826fd0d016e9e9218 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -2295,11 +2295,17 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 1826d7235b..4a3a2eaec3 100644 --- a/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,7 +8,7 @@ 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 aa497699fc0fab80b3da1ff4dd08840260cb22d3..61780597747e67581531ae436249ddd1c32bae82 100644 +index 81546c69e375ffdd46634a5826fd0d016e9e9218..2aea66553dceadc504abcf5701f8c82b24d1bda7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1489,6 +1489,10 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch index fed6fc5c02..cfa748824b 100644 --- a/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch @@ -18,7 +18,7 @@ index c4d034c6a6ff176bc954c00c328512bdf67455a6..7b2010ec4955fb5788c60178c6e306ea return this.getItem().e_(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index bbee99c13e66b50401489fa4ea497980b1e50b18..4f72b8874f9575c5fc7949c39b4d489809bba097 100644 +index 52fbc33dab7090075146e04388262f91ae027f2d..2146d1354c48b9a76b24bca321b578d401e1a0a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -174,6 +174,13 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index 474f9e78db..3d70fca470 100644 --- a/Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -72,18 +72,10 @@ index 1592e94c78611a4b968bfb24daf68570e778fadd..31c80bb0a2e403c34fb9cd4b3ee4e903 event.getProjectile().remove(); return; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 8551d3c9ba808bb9a77897a9866249bc0845c3b2..bd820d9661616c1b294fff0a7af7581a84ada25f 100644 +index 1529a42197380bd7570abc085a7ad77e9a58894c..78475dd2c0f6cca94586536f12323d8080e05623 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -50,6 +50,7 @@ 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; - import net.minecraft.server.ItemStack; - import net.minecraft.server.Items; -@@ -476,16 +477,16 @@ public class CraftEventFactory { +@@ -490,16 +490,16 @@ public class CraftEventFactory { /** * EntityShootBowEvent */ diff --git a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch index 7c795f7406..90a0c96744 100644 --- a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch @@ -34,7 +34,7 @@ index 4893daca7ea64504731cfab455e09b0a11c65857..1f3e5c384a66bb0767cc18bdbe99b942 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 00b19cce68abf405117c5e2d55ba86fc10e7db34..dc99c7730e72e1a52219fbe0b3b039899899f49d 100644 +index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e2c280c45 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -411,7 +411,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -55,7 +55,7 @@ index 00b19cce68abf405117c5e2d55ba86fc10e7db34..dc99c7730e72e1a52219fbe0b3b03989 } String deathMessage = event.getDeathMessage(); -@@ -1164,7 +1164,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1165,7 +1165,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return OptionalInt.empty(); } else { if (this.activeContainer != this.defaultContainer) { @@ -64,7 +64,7 @@ index 00b19cce68abf405117c5e2d55ba86fc10e7db34..dc99c7730e72e1a52219fbe0b3b03989 } this.nextContainerCounter(); -@@ -1224,7 +1224,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1225,7 +1225,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end if (this.activeContainer != this.defaultContainer) { @@ -73,7 +73,7 @@ index 00b19cce68abf405117c5e2d55ba86fc10e7db34..dc99c7730e72e1a52219fbe0b3b03989 } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1288,7 +1288,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1289,7 +1289,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void closeInventory() { @@ -136,10 +136,10 @@ index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf3877 } // 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 42bc39381c4fc5ff81bdd312afd1644dcc5d40c2..1eac3798acfc8a6859f102250bc8e49ed29d6e21 100644 +index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc62a06225d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -434,8 +434,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -435,8 +435,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { @@ -168,10 +168,10 @@ index ec0cb22d53733bed33019b257ac06ca9dc80d19e..5575c44d6f427661de1fec2c69932b44 // 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 bd820d9661616c1b294fff0a7af7581a84ada25f..3757a30e7b0ae1ec61211b2250bab47f70c776d4 100644 +index 78475dd2c0f6cca94586536f12323d8080e05623..ec079f7d04f17cc82bd65aec5abfe269bbfb6922 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1299,12 +1299,22 @@ public class CraftEventFactory { +@@ -1319,12 +1319,22 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch index 561df855cc..d82bdcfc29 100644 --- a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3e5b6c2a0ce6df2620d5f6505fcd25e6ea622744..3cb157cf4d1aa90b23f24b5090071d71c6bd2754 100644 +index 357d9293b66eee667f49e566f6f7b5449666986e..09567fe1628f9d2393e7902782e3cdc91531bb18 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2430,7 +2430,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2429,7 +2429,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public String toString() { diff --git a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index dba29626a7..f4b8a2c0b8 100644 --- a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3cb157cf4d1aa90b23f24b5090071d71c6bd2754..814c885313967f007584f6832111ec5b445e4088 100644 +index 09567fe1628f9d2393e7902782e3cdc91531bb18..c84bf924c9d1c98b469f279302d8595cece71960 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -77,6 +77,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; diff --git a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch index 9871c118fc..bf5699bc00 100644 --- a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch @@ -17,10 +17,10 @@ index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac 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 814c885313967f007584f6832111ec5b445e4088..e281ab94a1a69059db653789532735e8c5fd272a 100644 +index c84bf924c9d1c98b469f279302d8595cece71960..3b718673e250a1f9e12ce58481ed533151ad3754 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -99,7 +99,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke private static double e = 1.0D; private final EntityTypes f; private int id; @@ -159,10 +159,10 @@ index 66ce6afd46be67a131091d16b6a1221bbff333b5..f6cb503b8eb329cb6bfaa960f812da3c 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 3757a30e7b0ae1ec61211b2250bab47f70c776d4..a349ce7f04d6f2b29a0de534a3f7616778026666 100644 +index ec079f7d04f17cc82bd65aec5abfe269bbfb6922..1a74690daa05c46c3c0be02a762951efbe945e65 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1177,6 +1177,14 @@ public class CraftEventFactory { +@@ -1190,6 +1190,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/0255-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch index 79423f7b9e..31cd188c18 100644 --- a/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -58,10 +58,10 @@ index a27f91e6c3d1f5dd0adf8a3b48a640cc63676114..3ba19f75d24a1539c94f4fed9b8f90ae return; } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e281ab94a1a69059db653789532735e8c5fd272a..6012891971265323603cb05ae444cca1bb058c89 100644 +index 3b718673e250a1f9e12ce58481ed533151ad3754..c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } } }; diff --git a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch index fc445de048..f019e41cd0 100644 --- a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -51,10 +51,10 @@ index 3ba19f75d24a1539c94f4fed9b8f90aecc918cdc..f7be161c8557ae3848227b1a61e27374 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 6012891971265323603cb05ae444cca1bb058c89..9163916e6f600f2efa3e05f3df1d07ef9b60cd3a 100644 +index c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1..7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -196,6 +196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -195,6 +195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end diff --git a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch index 1ee7ba868e..db1e261ddf 100644 --- a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch @@ -117,10 +117,10 @@ index ba0bb12dd5c5068d31c8a925e31804ddf2cec5da..14ec04c6503cca58f64fc2a82a9fd715 public LongSet getForceLoadedChunks() { ForcedChunk forcedchunk = (ForcedChunk) this.getWorldPersistentData().b(ForcedChunk::new, "chunks"); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index a349ce7f04d6f2b29a0de534a3f7616778026666..46889e7b462673f5d03e6efc1114074da3165d47 100644 +index 1a74690daa05c46c3c0be02a762951efbe945e65..26a7463a536df9aa8558aba68a2a45464eb2dcfb 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -220,7 +220,7 @@ public class CraftEventFactory { +@@ -224,7 +224,7 @@ public class CraftEventFactory { public static Entity entityDamage; // For use in EntityDamageByEntityEvent // helper methods @@ -129,7 +129,7 @@ index a349ce7f04d6f2b29a0de534a3f7616778026666..46889e7b462673f5d03e6efc1114074d int spawnSize = Bukkit.getServer().getSpawnRadius(); if (world.getDimensionKey() != World.OVERWORLD) return true; -@@ -379,6 +379,20 @@ public class CraftEventFactory { +@@ -392,6 +392,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) { @@ -150,7 +150,7 @@ index a349ce7f04d6f2b29a0de534a3f7616778026666..46889e7b462673f5d03e6efc1114074d Player player = (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item); Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem()); -@@ -391,10 +405,10 @@ public class CraftEventFactory { +@@ -404,10 +418,10 @@ public class CraftEventFactory { PlayerEvent event; if (isFilling) { diff --git a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch index 09a508e230..850f230060 100644 --- a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,7 +36,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f5fa425308e4253d961f8f2bac5b961616dd8521..6a42e480940c4081622050c07961a2c56cfaa542 100644 +index 790d7df8691537a976086b5507db4f97054706de..a7be2875faa968d2e3939974f62c977ca03e9c5b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -900,6 +900,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 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 46889e7b462673f5d03e6efc1114074da3165d47..3ba376b077bde759ac62ca1641962598637edd59 100644 +index 26a7463a536df9aa8558aba68a2a45464eb2dcfb..49b39ab97f4ef32a0ea35a0832dca289da14bbde 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -755,9 +755,16 @@ public class CraftEventFactory { +@@ -768,9 +768,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()); @@ -398,7 +398,7 @@ index 46889e7b462673f5d03e6efc1114074da3165d47..3ba376b077bde759ac62ca1641962598 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -773,8 +780,15 @@ public class CraftEventFactory { +@@ -786,8 +793,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -414,7 +414,7 @@ index 46889e7b462673f5d03e6efc1114074da3165d47..3ba376b077bde759ac62ca1641962598 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -791,6 +805,31 @@ public class CraftEventFactory { +@@ -804,6 +818,31 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index badd4ad964..d658362532 100644 --- a/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -32,7 +32,7 @@ index b986a8e318733bdae766202bef93d4d25f18b58d..1f74602ff13a9f89c8dc40170353a79a this.s = this::l; if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index e5a2779a0460500c7d58f97c605549a366b5f0ce..7e0cdc3a1dde2c2e9cf5a9a80bc42010c6695f9e 100644 +index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d8f2063ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -85,6 +85,12 @@ import org.bukkit.persistence.PersistentDataContainer; diff --git a/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch b/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch index 8c39dc1f94..cdcdcc4d14 100644 --- a/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch +++ b/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch @@ -219,7 +219,7 @@ index 0000000000000000000000000000000000000000..0f0c5330c364909c85cc8cf58fb5c478 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6a42e480940c4081622050c07961a2c56cfaa542..16a8300a202e0b33b6de472a72ebf74653bafc20 100644 +index a7be2875faa968d2e3939974f62c977ca03e9c5b..1d4ec1412db104a6437b57afe192063188fabd10 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -91,7 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7a0391dc2861d604f1f3acc53eb9e1134c33c64f..9972ee33433914ef9abc5075f274e58d46a9192f 100644 +index 8719381d942789bf80f4b0394cec12e7394ce871..f64a83a6a9f8aaa0c1bbd6c2e3d0af28c06cbbd6 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1694,15 +1694,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1696,15 +1696,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } diff --git a/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch index b61fa994c8..92ecb5f738 100644 --- a/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 698619c25714d6bb296084298de4f2e39f8f9c63..28714c10c2bf30fc51c591060bec87c330fc62c1 100644 +index 4e3ea0a00b903b09e2f4d62a330f9faf5ff15f67..58ecc49ba91cdb9c100ce3319434f2110b9a5892 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2257,6 +2257,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2256,6 +2256,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -17,10 +17,10 @@ index 698619c25714d6bb296084298de4f2e39f8f9c63..28714c10c2bf30fc51c591060bec87c3 return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 9972ee33433914ef9abc5075f274e58d46a9192f..8de15e4856217fb4fc4fc44d9460437e0c8c65ee 100644 +index f64a83a6a9f8aaa0c1bbd6c2e3d0af28c06cbbd6..6bdbe8081689c55a61e133c7b4d3d06d0c507d50 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -2025,6 +2025,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2027,6 +2027,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); diff --git a/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 84edc47501..dd6bcdf540 100644 --- a/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -12,7 +12,7 @@ server threads Allow usage of a single thread executor by not using ForkJoin so single core CPU's. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 16a8300a202e0b33b6de472a72ebf74653bafc20..ba9b0a7b8b34919eb67c611c11dacbd1805bb226 100644 +index 1d4ec1412db104a6437b57afe192063188fabd10..e4f033d5ad66da5a38e5bfee861e9ea3399f30fe 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -176,6 +176,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant entitySlice = null; @@ -21,7 +21,7 @@ index 84aa003d90b64c0a37e155f38041c7908860b7f9..8144433d6c309d49b624e88623a3dd37 // Paper end public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper -@@ -1590,6 +1591,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1589,6 +1590,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -31,7 +31,7 @@ index 84aa003d90b64c0a37e155f38041c7908860b7f9..8144433d6c309d49b624e88623a3dd37 // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); -@@ -1718,6 +1722,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1717,6 +1721,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status diff --git a/Spigot-Server-Patches/0348-Server-Tick-Events.patch b/Spigot-Server-Patches/0348-Server-Tick-Events.patch index e3877e97ef..0217e2a927 100644 --- a/Spigot-Server-Patches/0348-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0348-Server-Tick-Events.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f1098b1b62fd568579fd0e1fda63478f58036c8c..5d62daec9afe60cfb0069b6ed867d1d2530389a8 100644 +index 4c610db03f4d8bae0e310d6a0680cefb7bc74872..b6e103bf140d04e9f3bda4112252da5d5fedcf6d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1120,6 +1120,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); String title = inventory.getTitle(); -- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, new ChatComponentText(title))); -+ if (!player.isFrozen()) player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, new ChatComponentText(title))); // Paper +- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); ++ if (!player.isFrozen()) player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper player.activeContainer = container; player.activeContainer.addSlotListener(player); } diff --git a/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch index c426f1829c..4026e52429 100644 --- a/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch +++ b/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch @@ -88,10 +88,10 @@ index cb24f27bc443880b18ffc36236f6ec7174c9d493..b65ae2d6919a67498d0646c552273508 } if (entity instanceof EntityItem) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8b7f59577416468a89a99954e2a00b3704ffbd40..bf01f4ef7831491ecb29b86f6d459d1e3a767554 100644 +index a64e21964ed6131d2fc62345e04a30885e1d9a74..83f248b2a045a55ddffd8988f4d176992de26148 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -212,6 +212,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -211,6 +211,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end diff --git a/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch index b9c0b95810..9d74d6d5ce 100644 --- a/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch @@ -98,7 +98,7 @@ index 0bf9de73e800cbbe0553bf491cb1546bb1677b63..e6bf2b5268c03edfb3205f13a963ec1d protected static final DataWatcherObject br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 97f03d09d8e7f38b00f407b1268e30a0729d1811..0683e163fa6081d4382b3f4635bc52b646b9dd54 100644 +index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad512e774f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -118,7 +118,7 @@ index 97f03d09d8e7f38b00f407b1268e30a0729d1811..0683e163fa6081d4382b3f4635bc52b6 private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1681,6 +1682,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1682,6 +1683,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public String locale = null; // CraftBukkit - lowercase // Paper - default to null public void a(PacketPlayInSettings packetplayinsettings) { diff --git a/Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 96ee28841b..0b03e2d326 100644 --- a/Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,7 +28,7 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0683e163fa6081d4382b3f4635bc52b646b9dd54..b3429f001397ed7cbcdfeb12c8f47e5face209a3 100644 +index ef35e07fd8b27a66710140c1422f88ad512e774f..56cf64709ae520287f6687fe7c2f55040cc769a1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -104,6 +104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch index ed6b8944c2..c18d76c30f 100644 --- a/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch @@ -18,10 +18,10 @@ index 0080a0cbe58d1a81c434ef97659428c8bf1ec290..eebd4c50a7324250d3ebe7060739a71a 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 bf01f4ef7831491ecb29b86f6d459d1e3a767554..26cfb843fd54de475190b793d9a206d798d54268 100644 +index 83f248b2a045a55ddffd8988f4d176992de26148..3bcd6c5a32515b96bb7424bcafd5cd0a04954b7b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1327,7 +1327,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1326,7 +1326,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F; this.lastYaw = this.yaw; this.lastPitch = this.pitch; @@ -31,7 +31,7 @@ index bf01f4ef7831491ecb29b86f6d459d1e3a767554..26cfb843fd54de475190b793d9a206d7 public void c(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b3429f001397ed7cbcdfeb12c8f47e5face209a3..c26236ff4ab56506c51d4e215cfe4fb76bed26ed 100644 +index 56cf64709ae520287f6687fe7c2f55040cc769a1..0a5f784e851414f84e5a94b53f5616531f533109 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 5addc24da3..b2f572fd55 100644 --- a/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,10 +7,10 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 26cfb843fd54de475190b793d9a206d798d54268..7aa95b968af810a7bb4d7dedfacc83219f491e05 100644 +index 3bcd6c5a32515b96bb7424bcafd5cd0a04954b7b..66adeb5e986e721a7e98d57cf5414cdb82cdc071 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1755,9 +1755,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1754,9 +1754,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke bworld = server.getWorld(worldName); } diff --git a/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch index f17424f1b5..539ad92f80 100644 --- a/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,10 +16,10 @@ 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 7aa95b968af810a7bb4d7dedfacc83219f491e05..b400b04fcb733110150de800927c602180771cec 100644 +index 66adeb5e986e721a7e98d57cf5414cdb82cdc071..f6bd3f458e340c7b19921c135415acdfc3f54802 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1911,11 +1911,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1910,11 +1910,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } else { // CraftBukkit start - Capture drops for death event if (this instanceof EntityLiving && !((EntityLiving) this).forceDrops) { @@ -34,7 +34,7 @@ index 7aa95b968af810a7bb4d7dedfacc83219f491e05..b400b04fcb733110150de800927c6021 entityitem.defaultPickupDelay(); // CraftBukkit start -@@ -2560,6 +2561,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2559,6 +2560,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public Entity teleportTo(WorldServer worldserver, BlockPosition location) { // CraftBukkit end @@ -47,7 +47,7 @@ index 7aa95b968af810a7bb4d7dedfacc83219f491e05..b400b04fcb733110150de800927c6021 if (this.world instanceof WorldServer && !this.dead) { this.world.getMethodProfiler().enter("changeDimension"); // CraftBukkit start -@@ -2663,7 +2670,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2662,7 +2669,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke entity.bukkitEntity = this.getBukkitEntity(); if (this instanceof EntityInsentient) { @@ -56,7 +56,7 @@ index 7aa95b968af810a7bb4d7dedfacc83219f491e05..b400b04fcb733110150de800927c6021 } // CraftBukkit end } -@@ -2684,7 +2691,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2683,7 +2690,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean canPortal() { @@ -88,10 +88,10 @@ index 51e9f4a6e09474a7489d2872a800308ee3f02e46..250bccee4a27801b41c50d59e93396c6 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d82b57f4078802acd6b4a45e1f46f7ac9c8ba1d6..3c73d81d143ade511a88d2ab46417c7aa09719d8 100644 +index 4b8ea4e56efb4c8bfe969c9c1628b5d69aa0c4d9..d4b77d70bfc91339346689ad58f585856633007b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -775,7 +775,8 @@ public class CraftEventFactory { +@@ -788,7 +788,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/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index c19c1ace79..c070fa4565 100644 --- a/Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 429ae482f30eeeab84cc009a9143245e086ce469..a61e6561c10b62cc97aab1b4d8befe893c5da09f 100644 +index ff2b21305e4a46a8cafa247a0d4e786a6b7cb627..feb45475bb3c0785a8d8198615fbf4b3cd99acbe 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -20,6 +20,7 @@ public class Main { diff --git a/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch index d931923a40..284637ce16 100644 --- a/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b400b04fcb733110150de800927c602180771cec..d1b5e421e80ed79fec94cbf181d4e6f5515b94e8 100644 +index f6bd3f458e340c7b19921c135415acdfc3f54802..fa15abb838aa4560acaaca1bd1d982b9b8073674 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -246,6 +246,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -245,6 +245,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper end @@ -44,7 +44,7 @@ index 9b89c0c8a3f1dada4e9b2aaeed0b92e56229b7ca..0c46297e6ff229538d77b2f481e4ab13 List list = this.tracker.getPassengers(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cf05c44865b5d3210b50d11ac7413865cc57f1ff..14a208b3b36f492285c432c591000df1573d31b1 100644 +index e4e946c0b3c6b73f02567fffaaabf06312cbea91..45715f50deb7c3c31a1d2f9795ad026e4938dc47 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1531,6 +1531,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 6c8c697367b2c8504d0467cd58f576afbd3e775f..55351ee29a724e7680e5ec98afea2c0f365bc6c4 100644 +index fb2b64628b974758cace770ce6debe5e88318ae8..0e3ceb60e503c74fc65b1d08371645ffbb26ef5c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -115,6 +115,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0504-Add-villager-reputation-API.patch b/Spigot-Server-Patches/0481-Add-villager-reputation-API.patch similarity index 93% rename from Spigot-Server-Patches/0504-Add-villager-reputation-API.patch rename to Spigot-Server-Patches/0481-Add-villager-reputation-API.patch index ab2742c643..ada8c81cd8 100644 --- a/Spigot-Server-Patches/0504-Add-villager-reputation-API.patch +++ b/Spigot-Server-Patches/0481-Add-villager-reputation-API.patch @@ -20,19 +20,19 @@ index 0000000000000000000000000000000000000000..0f10c333d88f2e1c56a6c7f22d421084 + } +} diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index eeb76bc0298711ac3ea24440a172e812925f875e..7da267d287eb338d32a8cace82bacc4ce2c47182 100644 +index 86b75e31ea1ed9deecae9756c6f838c302dd8df6..91c19ee2926957c530b3ebc7680eeea451464e24 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -960,6 +960,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - this.bL = 0; +@@ -959,6 +959,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + this.bK = 0; } -+ public Reputation getReputation() { return this.eN(); } // Paper - OBFHELPER - public Reputation eN() { - return this.bG; ++ public Reputation getReputation() { return this.fj(); } // Paper - OBFHELPER + public Reputation fj() { + return this.bF; } diff --git a/src/main/java/net/minecraft/server/Reputation.java b/src/main/java/net/minecraft/server/Reputation.java -index 0b6f91ac1206089654a6745bccb038fba8c13d98..4ae31599664ee8478ca1acf68f7253eb02eb45ed 100644 +index 3c6d6be4485cad4f2e9a395425b5837590853eee..28c9f9ed2d532a1eb14b74c2e9723a2cf1b3c6fa 100644 --- a/src/main/java/net/minecraft/server/Reputation.java +++ b/src/main/java/net/minecraft/server/Reputation.java @@ -25,7 +25,7 @@ import java.util.stream.Stream; @@ -44,7 +44,7 @@ index 0b6f91ac1206089654a6745bccb038fba8c13d98..4ae31599664ee8478ca1acf68f7253eb public Reputation() {} -@@ -138,11 +138,11 @@ public class Reputation { +@@ -140,11 +140,11 @@ public class Reputation { return k > reputationtype.h ? Math.max(reputationtype.h, i) : k; } @@ -58,7 +58,7 @@ index 0b6f91ac1206089654a6745bccb038fba8c13d98..4ae31599664ee8478ca1acf68f7253eb this.a = new Object2IntOpenHashMap(); } -@@ -196,6 +196,27 @@ public class Reputation { +@@ -198,6 +198,27 @@ public class Reputation { public void b(ReputationType reputationtype) { this.a.removeInt(reputationtype); } diff --git a/Spigot-Server-Patches/0505-Fix-Light-Command.patch b/Spigot-Server-Patches/0482-Fix-Light-Command.patch similarity index 94% rename from Spigot-Server-Patches/0505-Fix-Light-Command.patch rename to Spigot-Server-Patches/0482-Fix-Light-Command.patch index a6cb9a1c73..a4d5076953 100644 --- a/Spigot-Server-Patches/0505-Fix-Light-Command.patch +++ b/Spigot-Server-Patches/0482-Fix-Light-Command.patch @@ -122,10 +122,10 @@ index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f53 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 03fb688fe4bdc19b4bc36b1f1d5b40c61e7bef9b..aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44 100644 +index 40347212ad1bcf857d5b8ddb0ee6a698e2568201..e5751adde516544722b95016f64b2a46c16e77ce 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -327,6 +327,7 @@ public class PlayerChunk { +@@ -314,6 +314,7 @@ public class PlayerChunk { } @@ -134,10 +134,10 @@ index 03fb688fe4bdc19b4bc36b1f1d5b40c61e7bef9b..aeca6b2b9d5d73aeb6dc639b5cad2f25 // Paper start - per player view distance // there can be potential desync with player's last mapped section and the view distance map, so use the diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index f832e7cdfc6741a932787f02754f145202ff7887..f361939b9ae451bdccf7922e9cca09344c6152b5 100644 +index 6cde6d684f6a3ced1eb2aa554559672e7b0d4947..31f122aeef8df2eae5e8aab12f0b3316a67daa3b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -95,6 +95,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -96,6 +96,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final ChunkTaskQueueSorter p; private final Mailbox> mailboxWorldGen; final Mailbox> mailboxMain; // Paper - private -> package private @@ -150,7 +150,7 @@ index f832e7cdfc6741a932787f02754f145202ff7887..f361939b9ae451bdccf7922e9cca0934 public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -282,11 +288,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -287,11 +293,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { Mailbox mailbox = Mailbox.a("main", iasynctaskhandler::a); this.worldLoadListener = worldloadlistener; @@ -161,6 +161,6 @@ index f832e7cdfc6741a932787f02754f145202ff7887..f361939b9ae451bdccf7922e9cca0934 this.mailboxWorldGen = this.p.a(threadedmailbox, false); this.mailboxMain = this.p.a(mailbox, false); + this.mailboxLight = this.p.a(lightthreaded, false);// Paper - this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getWorldProvider().f(), threadedmailbox1, this.p.a(threadedmailbox1, false)); + this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getDimensionManager().hasSkyLight(), threadedmailbox1, this.p.a(threadedmailbox1, false)); this.chunkDistanceManager = new PlayerChunkMap.a(executor, iasynctaskhandler); this.chunkDistanceManager.chunkMap = this; // Paper this.l = supplier; diff --git a/Spigot-Server-Patches/0507-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0483-Fix-PotionEffect-ignores-icon-flag.patch similarity index 87% rename from Spigot-Server-Patches/0507-Fix-PotionEffect-ignores-icon-flag.patch rename to Spigot-Server-Patches/0483-Fix-PotionEffect-ignores-icon-flag.patch index 9c6ba39afd..43fcc1a798 100644 --- a/Spigot-Server-Patches/0507-Fix-PotionEffect-ignores-icon-flag.patch +++ b/Spigot-Server-Patches/0483-Fix-PotionEffect-ignores-icon-flag.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 245bd116d143af120127a9d25dcb7a0c43ad47a0..a461ac36144361b712e015b722e68bdb0b43dfb2 100644 +index b3ec32b20751fbea2f6df14fc5e9f84682493bfd..3777aba5f32f58f4620d4fe496af4e641ff8c858 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -384,7 +384,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -387,7 +387,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public boolean addPotionEffect(PotionEffect effect, boolean force) { diff --git a/Spigot-Server-Patches/0508-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0484-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from Spigot-Server-Patches/0508-Optimize-brigadier-child-sorting-performance.patch rename to Spigot-Server-Patches/0484-Optimize-brigadier-child-sorting-performance.patch diff --git a/Spigot-Server-Patches/0510-Don-t-toString-block-unless-actually-showing-the-mes.patch b/Spigot-Server-Patches/0485-Don-t-toString-block-unless-actually-showing-the-mes.patch similarity index 92% rename from Spigot-Server-Patches/0510-Don-t-toString-block-unless-actually-showing-the-mes.patch rename to Spigot-Server-Patches/0485-Don-t-toString-block-unless-actually-showing-the-mes.patch index f81d312f6d..11c031b70c 100644 --- a/Spigot-Server-Patches/0510-Don-t-toString-block-unless-actually-showing-the-mes.patch +++ b/Spigot-Server-Patches/0485-Don-t-toString-block-unless-actually-showing-the-mes.patch @@ -7,7 +7,7 @@ This is causing MASSIVE performance issues with hoppers and block states in general. diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 3e22d558ea09a6554e1bc71f8ca10277ec480705..3da34ebcb96040ef4b399e348d1cff2f000aefa2 100644 +index 6e9eff2c29528b857cf758e9e45606c8a1c1cc8d..dc0e6e49e9eb5004e53d24304bce095bcef8f4c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -26,7 +26,7 @@ public class CraftBlockEntityState extends CraftBlockState diff --git a/Spigot-Server-Patches/0514-Potential-bed-API.patch b/Spigot-Server-Patches/0486-Potential-bed-API.patch similarity index 57% rename from Spigot-Server-Patches/0514-Potential-bed-API.patch rename to Spigot-Server-Patches/0486-Potential-bed-API.patch index 2dd156300d..3e0e6af768 100644 --- a/Spigot-Server-Patches/0514-Potential-bed-API.patch +++ b/Spigot-Server-Patches/0486-Potential-bed-API.patch @@ -8,24 +8,29 @@ 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 a5e9fc90ffae794b9b14468337ce7b091fd0dc35..a2815073bc04dd831fa22da47162031d360683dd 100644 +index 1c271ee568a02f1ab9c8722b840444f5cf5d657f..7c22a24d0b50f0a8f4ccfef87f7f77028c3188c6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -143,6 +143,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { - return null; +@@ -126,6 +126,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { + return getHandle().sleepTicks; } + // Paper start - Potential bed api + @Override + public Location getPotentialBedLocation() { -+ BlockPosition bed = getHandle().getBed(); ++ EntityPlayer handle = (EntityPlayer) getHandle(); ++ BlockPosition bed = handle.getSpawn(); + if (bed == null) { + return null; + } -+ return new Location(getServer().getWorld(getHandle().spawnWorld), bed.getX(), bed.getY(), bed.getZ()); ++ ++ net.minecraft.server.WorldServer worldServer = handle.server.getWorldServer(handle.getSpawnDimension()); ++ if (worldServer == null) { ++ return null; ++ } ++ return new Location(worldServer.getWorld(), bed.getX(), bed.getY(), bed.getZ()); + } + // Paper end -+ @Override - public void setBedSpawnLocation(Location location) { - setBedSpawnLocation(location, false); + public boolean sleep(Location location, boolean force) { + Preconditions.checkArgument(location != null, "Location cannot be null"); diff --git a/Spigot-Server-Patches/0515-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch similarity index 87% rename from Spigot-Server-Patches/0515-Wait-for-Async-Tasks-during-shutdown.patch rename to Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch index b7b12e7797..c04562f746 100644 --- a/Spigot-Server-Patches/0515-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2c9ae5c46a39639fd9f842df23993a47b31c8585..4ab6579032043f570c20befa7fef8931babd2355 100644 +index 45715f50deb7c3c31a1d2f9795ad026e4938dc47..10e6572afa5b5cf65673b65541ef2fafb0b2aaae 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -747,6 +747,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant extends PathfinderGoal { @@ -18,12 +18,11 @@ index c0b7b5f072b0b3777b2042b0b80f3bb22e617b11..ee1fcb11afbc3efa42ce0170b72da3fd public b(T entityraider) { // CraftBukkit - decompile error this.b = entityraider; -@@ -495,6 +495,8 @@ public abstract class EntityRaider extends EntityMonsterPatrolling { +@@ -496,6 +496,7 @@ public abstract class EntityRaider extends EntityMonsterPatrolling { @Override public boolean a() { + if (!getRaider().world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) || !getRaider().canPickupLoot()) return false; // Paper - respect game and entity rules for picking up items -+ - Raid raid = this.b.eE(); + Raid raid = this.b.fb(); - if (this.b.eF() && !this.b.eE().a() && this.b.es() && !ItemStack.matches(this.b.getEquipment(EnumItemSlot.HEAD), Raid.s())) { + if (this.b.fc() && !this.b.fb().a() && this.b.eO() && !ItemStack.matches(this.b.getEquipment(EnumItemSlot.HEAD), Raid.s())) { diff --git a/Spigot-Server-Patches/0519-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/Spigot-Server-Patches/0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 69% rename from Spigot-Server-Patches/0519-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to Spigot-Server-Patches/0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 6952b8854c..74dd006542 100644 --- a/Spigot-Server-Patches/0519-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/Spigot-Server-Patches/0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -13,10 +13,10 @@ A config is provided if you rather let players use these exploits, and let them destroy the worlds End Portals and get on top of the nether easy. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 3ee7e5671dd2519cec72b81211f1f39176a228ba..cf9b9de8688e3f655631451409096d7ec0471910 100644 +index c31a97c6ae0dd1493039158e67c5f3ba237ad234..e1c9e559b25792296b6b8f6dd1070035d10d82f2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -431,4 +431,10 @@ public class PaperConfig { +@@ -410,4 +410,10 @@ public class PaperConfig { private static void midTickChunkTasks() { midTickChunkTasks = getInt("settings.chunk-tasks-per-tick", midTickChunkTasks); } @@ -28,12 +28,12 @@ index 3ee7e5671dd2519cec72b81211f1f39176a228ba..cf9b9de8688e3f655631451409096d7e + } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index e40375b67a4a321048c87002a07fde5c5d2395db..d2207a2c95690de586ab2d181b64955a6d2ea70d 100644 +index 4f9c6b25f152b348a00dadf4b8f58ec3adc3476e..81725611d5b8c10c05d561984f92dc67349900ec 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -32,6 +32,14 @@ public class Block implements IMaterial { - protected final SoundEffectType stepSound; - protected final Material material; +@@ -25,6 +25,14 @@ public class Block extends BlockBase implements IMaterial { + protected final BlockStateList blockStateList; + private IBlockData blockData; // Paper start + public final boolean isDestroyable() { + return com.destroystokyo.paper.PaperConfig.allowBlockPermanentBreakingExploits || @@ -46,7 +46,11 @@ index e40375b67a4a321048c87002a07fde5c5d2395db..d2207a2c95690de586ab2d181b64955a public co.aikar.timings.Timing timing; public co.aikar.timings.Timing getTiming() { if (timing == null) { -@@ -276,7 +284,7 @@ public class Block implements IMaterial { +diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java +index 16a8ee36ba2b23207cb8630623d542ac5943b9df..ea272c5f818a07535851c93ab905bde906a0e61e 100644 +--- a/src/main/java/net/minecraft/server/BlockBase.java ++++ b/src/main/java/net/minecraft/server/BlockBase.java +@@ -138,7 +138,7 @@ public abstract class BlockBase { @Deprecated public boolean a(IBlockData iblockdata, BlockActionContext blockactioncontext) { @@ -55,20 +59,33 @@ index e40375b67a4a321048c87002a07fde5c5d2395db..d2207a2c95690de586ab2d181b64955a } @Deprecated -@@ -596,7 +604,7 @@ public class Block implements IMaterial { +@@ -334,7 +334,11 @@ public abstract class BlockBase { + public Block getBlock() { + return (Block) this.c; + } +- ++ // Paper start ++ public final boolean isDestroyable() { ++ return getBlock().isDestroyable(); ++ } ++ // Paper end + public Material getMaterial() { + return this.g; + } +@@ -424,7 +428,7 @@ public abstract class BlockBase { + } - @Deprecated - public EnumPistonReaction getPushReaction(IBlockData iblockdata) { -- return this.material.getPushReaction(); -+ return !blockData.isDestroyable() ? EnumPistonReaction.BLOCK : this.material.getPushReaction(); // Paper - } + public EnumPistonReaction getPushReaction() { +- return this.getBlock().getPushReaction(this.p()); ++ return !isDestroyable() ? EnumPistonReaction.BLOCK : this.getBlock().getPushReaction(this.p()); // Paper + } - public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) { + public boolean i(IBlockAccess iblockaccess, BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index b29525c40dc8e3ae747b8ddf5a3bd79b7cc0b792..39cd8ab5925ceb9494e0ac910c73338c24ecda2c 100644 +index c068a4115e3b82f4886d822d2472e8b522946674..6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java -@@ -175,6 +175,12 @@ public class BlockPiston extends BlockDirectional { +@@ -165,6 +165,12 @@ public class BlockPiston extends BlockDirectional { @Override public boolean a(IBlockData iblockdata, World world, BlockPosition blockposition, int i, int j) { EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockPiston.FACING); @@ -81,16 +98,16 @@ index b29525c40dc8e3ae747b8ddf5a3bd79b7cc0b792..39cd8ab5925ceb9494e0ac910c73338c if (!world.isClientSide) { boolean flag = this.a(world, blockposition, enumdirection); -@@ -204,7 +210,7 @@ public class BlockPiston extends BlockDirectional { - } +@@ -196,7 +202,7 @@ public class BlockPiston extends BlockDirectional { + IBlockData iblockdata1 = (IBlockData) ((IBlockData) Blocks.MOVING_PISTON.getBlockData().set(BlockPistonMoving.a, enumdirection)).set(BlockPistonMoving.b, this.sticky ? BlockPropertyPistonType.STICKY : BlockPropertyPistonType.DEFAULT); - world.setTypeAndData(blockposition, (IBlockData) ((IBlockData) Blocks.MOVING_PISTON.getBlockData().set(BlockPistonMoving.a, enumdirection)).set(BlockPistonMoving.b, this.sticky ? BlockPropertyPistonType.STICKY : BlockPropertyPistonType.DEFAULT), 3); + world.setTypeAndData(blockposition, iblockdata1, 20); - world.setTileEntity(blockposition, BlockPistonMoving.a((IBlockData) this.getBlockData().set(BlockPiston.FACING, EnumDirection.fromType1(j & 7)), enumdirection, false, true)); -+ world.setTileEntity(blockposition, BlockPistonMoving.a((IBlockData) this.getBlockData().set(BlockPiston.FACING, EnumDirection.fromType1(j & 7)), enumdirection, false, true)); // Paper - diff on change, j is facing direction ++ world.setTileEntity(blockposition, BlockPistonMoving.a((IBlockData) this.getBlockData().set(BlockPiston.FACING, EnumDirection.fromType1(j & 7)), enumdirection, false, true)); // Paper - diff on change, j is facing direction - copy this above + world.update(blockposition, iblockdata1.getBlock()); + iblockdata1.a(world, blockposition, 2); if (this.sticky) { - BlockPosition blockposition1 = blockposition.b(enumdirection.getAdjacentX() * 2, enumdirection.getAdjacentY() * 2, enumdirection.getAdjacentZ() * 2); - IBlockData iblockdata1 = world.getType(blockposition1); -@@ -232,7 +238,14 @@ public class BlockPiston extends BlockDirectional { +@@ -225,7 +231,14 @@ public class BlockPiston extends BlockDirectional { } } } else { @@ -107,18 +124,18 @@ index b29525c40dc8e3ae747b8ddf5a3bd79b7cc0b792..39cd8ab5925ceb9494e0ac910c73338c world.playSound((EntityHuman) null, blockposition, SoundEffects.BLOCK_PISTON_CONTRACT, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.15F + 0.6F); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index a353f3d5fa5a5f54335f73584589de3f5cb20d3e..2552f860ff7a25f74e9a0600e58cefe064fac484 100644 +index 22a19e761fdec68cc9405988b977021a8b6398eb..e408ec8c645e9ceb278a13a5b0de8ecf57f3929e 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java -@@ -117,6 +117,7 @@ public class Explosion { +@@ -124,6 +124,7 @@ public class Explosion { for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) { BlockPosition blockposition = new BlockPosition(d4, d5, d6); IBlockData iblockdata = this.world.getType(blockposition); + if (!iblockdata.isDestroyable()) continue; // Paper Fluid fluid = iblockdata.getFluid(); // Paper + Optional optional = this.k.a(this, this.world, blockposition, iblockdata, fluid); - if (!iblockdata.isAir() || !fluid.isEmpty()) { -@@ -282,7 +283,7 @@ public class Explosion { +@@ -277,7 +278,7 @@ public class Explosion { IBlockData iblockdata = this.world.getType(blockposition); Block block = iblockdata.getBlock(); @@ -127,28 +144,12 @@ index a353f3d5fa5a5f54335f73584589de3f5cb20d3e..2552f860ff7a25f74e9a0600e58cefe0 BlockPosition blockposition1 = blockposition.immutableCopy(); this.world.getMethodProfiler().enter("explosion_blocks"); -diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index b19bbbbc81376177751396a2de9452ce1f84c06b..296b41bf36ee1ace5bd9db2b810bf926b5f5278f 100644 ---- a/src/main/java/net/minecraft/server/IBlockData.java -+++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -52,6 +52,11 @@ public class IBlockData extends BlockDataAbstract implements - return (CraftBlockData) cachedCraftBlockData.clone(); - } - // Paper end -+ // Paper start -+ public final boolean isDestroyable() { -+ return getBlock().isDestroyable(); -+ } -+ // Paper end - - public Material getMaterial() { - return this.getBlock().k(this); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7bd3f789b6055d73f3a6c0628652cca241147887..032b7acee8c8af70c0283f5551ce2875607f6c98 100644 +index 965b43da38832f37091929d954c2bb7e7fbc7798..bf32f4d81e58f6d7ccf1b6eb9daebe0986169b1c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -342,6 +342,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - public boolean setTypeAndData(BlockPosition blockposition, IBlockData iblockdata, int i) { +@@ -400,6 +400,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { + // Paper start diff --git a/Spigot-Server-Patches/0520-Optimize-NibbleArray-to-use-pooled-buffers.patch b/Spigot-Server-Patches/0490-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 92% rename from Spigot-Server-Patches/0520-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to Spigot-Server-Patches/0490-Optimize-NibbleArray-to-use-pooled-buffers.patch index bbd03eef7a..8b2082f5e8 100644 --- a/Spigot-Server-Patches/0520-Optimize-NibbleArray-to-use-pooled-buffers.patch +++ b/Spigot-Server-Patches/0490-Optimize-NibbleArray-to-use-pooled-buffers.patch @@ -9,10 +9,10 @@ an object pool for these. Uses lots of advanced new capabilities of the Paper codebase :) diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index e625842e524f18e469f7695b27d52d4d04892266..d752e793f13a9caf5d255293f7ce9d562fd50064 100644 +index 5b196201c0e35895a04e2a542ef7c753d0c469e1..4b7c4643f04448aaccc66f26a9dea2323bea420d 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -387,11 +387,11 @@ public class ChunkRegionLoader { +@@ -386,11 +386,11 @@ public class ChunkRegionLoader { } if (nibblearray != null && !nibblearray.c()) { @@ -27,10 +27,10 @@ index e625842e524f18e469f7695b27d52d4d04892266..d752e793f13a9caf5d255293f7ce9d56 nbttaglist.add(nbttagcompound2); diff --git a/src/main/java/net/minecraft/server/LightEngineStorage.java b/src/main/java/net/minecraft/server/LightEngineStorage.java -index 88277d23c36696fdd5363e41a130c9a443fac2c0..b0b7544592981bcff22c8acee7230a211918ef28 100644 +index 6c7c4e75670a7e08ba10c0231a2510bf985dab6b..b8b06c790adfa0246b1a6fb5eab1f63bf5ef8b0b 100644 --- a/src/main/java/net/minecraft/server/LightEngineStorage.java +++ b/src/main/java/net/minecraft/server/LightEngineStorage.java -@@ -148,7 +148,7 @@ public abstract class LightEngineStorage> e +@@ -149,7 +149,7 @@ public abstract class LightEngineStorage> e protected NibbleArray j(long i) { NibbleArray nibblearray = (NibbleArray) this.i.get(i); @@ -39,12 +39,15 @@ index 88277d23c36696fdd5363e41a130c9a443fac2c0..b0b7544592981bcff22c8acee7230a21 } protected void a(LightEngineLayer lightenginelayer, long i) { -@@ -317,9 +317,9 @@ public abstract class LightEngineStorage> e +@@ -331,12 +331,12 @@ public abstract class LightEngineStorage> e - protected void a(long i, @Nullable NibbleArray nibblearray) { + protected void a(long i, @Nullable NibbleArray nibblearray, boolean flag) { if (nibblearray != null) { - this.i.put(i, nibblearray); + NibbleArray remove = this.i.put(i, nibblearray); if (remove != null && remove.cleaner != null) remove.cleaner.run(); // Paper - clean up when removed + if (!flag) { + this.n.add(i); + } } else { - this.i.remove(i); + NibbleArray remove = this.i.remove(i); if (remove != null && remove.cleaner != null) remove.cleaner.run(); // Paper - clean up when removed @@ -244,12 +247,12 @@ index 67c960292db9d99ac85b5d0dda50ae48ef942c1b..5e3efa1fa6c089df35971ce5c83da384 for (int i = 0; i < 16; ++i) { System.arraycopy(this.a, 0, abyte, i * 128, 128); diff --git a/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java b/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java -index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07ac9e59437 100644 +index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d3d3d99a7 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java -@@ -16,13 +16,42 @@ public class PacketPlayOutLightUpdate implements Packet { - private List g; +@@ -17,14 +17,43 @@ public class PacketPlayOutLightUpdate implements Packet { private List h; + private boolean i; + // Paper start + java.lang.Runnable cleaner1; @@ -282,9 +285,10 @@ index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07a + // Paper end public PacketPlayOutLightUpdate() {} - public PacketPlayOutLightUpdate(ChunkCoordIntPair chunkcoordintpair, LightEngine lightengine) { + public PacketPlayOutLightUpdate(ChunkCoordIntPair chunkcoordintpair, LightEngine lightengine, boolean flag) { this.a = chunkcoordintpair.x; this.b = chunkcoordintpair.z; + this.i = flag; - this.g = Lists.newArrayList(); - this.h = Lists.newArrayList(); + this.g = Lists.newArrayList();cleaner1 = MCUtil.registerListCleaner(this, this.g, NibbleArray::releaseBytes); // Paper @@ -292,7 +296,7 @@ index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07a for (int i = 0; i < 18; ++i) { NibbleArray nibblearray = lightengine.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, -1 + i)); -@@ -33,7 +62,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -35,7 +64,7 @@ public class PacketPlayOutLightUpdate implements Packet { this.e |= 1 << i; } else { this.c |= 1 << i; @@ -301,7 +305,7 @@ index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07a } } -@@ -42,7 +71,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -44,7 +73,7 @@ public class PacketPlayOutLightUpdate implements Packet { this.f |= 1 << i; } else { this.d |= 1 << i; @@ -310,8 +314,8 @@ index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07a } } } -@@ -54,8 +83,8 @@ public class PacketPlayOutLightUpdate implements Packet { - this.b = chunkcoordintpair.z; +@@ -57,8 +86,8 @@ public class PacketPlayOutLightUpdate implements Packet { + this.i = flag; this.c = i; this.d = j; - this.g = Lists.newArrayList(); @@ -321,7 +325,7 @@ index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07a for (int k = 0; k < 18; ++k) { NibbleArray nibblearray; -@@ -63,7 +92,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -66,7 +95,7 @@ public class PacketPlayOutLightUpdate implements Packet { if ((this.c & 1 << k) != 0) { nibblearray = lightengine.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, -1 + k)); if (nibblearray != null && !nibblearray.c()) { @@ -330,7 +334,7 @@ index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07a } else { this.c &= ~(1 << k); if (nibblearray != null) { -@@ -75,7 +104,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -78,7 +107,7 @@ public class PacketPlayOutLightUpdate implements Packet { if ((this.d & 1 << k) != 0) { nibblearray = lightengine.a(EnumSkyBlock.BLOCK).a(SectionPosition.a(chunkcoordintpair, -1 + k)); if (nibblearray != null && !nibblearray.c()) { @@ -340,10 +344,10 @@ index cd1ad45469aa163b9bc41774ae80adfa617fd97b..27068f73a2b1fd97dc675ceb3f0eb07a this.d &= ~(1 << k); if (nibblearray != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 39ef95cbbb1d1d049354ae1e8991309e918d0462..ec3f560556c3056bdfc11cc6a7eb76420f13abad 100644 +index 01bf7320b5cbc38e278ca907aa324ee3e945805e..06e42b7db5385f9a357183552259e7b4491d9fd0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -271,14 +271,14 @@ public class CraftChunk implements Chunk { +@@ -273,14 +273,14 @@ public class CraftChunk implements Chunk { sectionSkyLights[i] = emptyLight; } else { sectionSkyLights[i] = new byte[2048]; diff --git a/Spigot-Server-Patches/0521-Reduce-MutableInt-allocations-from-light-engine.patch b/Spigot-Server-Patches/0491-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from Spigot-Server-Patches/0521-Reduce-MutableInt-allocations-from-light-engine.patch rename to Spigot-Server-Patches/0491-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/Spigot-Server-Patches/0522-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 90% rename from Spigot-Server-Patches/0522-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to Spigot-Server-Patches/0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index 45ed81a066..ff50f48c9f 100644 --- a/Spigot-Server-Patches/0522-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/Spigot-Server-Patches/0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reduce allocation of Vec3D by entity tracker diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 6d3b34ead9cc95dcc1152dffa8c6c4a8c7f1d58b..5cc89c0cf9e9e632212a9653391437cbe9b15031 100644 +index 0c46297e6ff229538d77b2f481e4ab13ea14c48e..f75c09d44a19f84588f21a55ea8f0dd8ccb539b9 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -@@ -125,8 +125,12 @@ public class EntityTrackerEntry { +@@ -127,8 +127,12 @@ public class EntityTrackerEntry { ++this.o; i = MathHelper.d(this.tracker.yaw * 256.0F / 360.0F); j = MathHelper.d(this.tracker.pitch * 256.0F / 360.0F); @@ -23,7 +23,7 @@ index 6d3b34ead9cc95dcc1152dffa8c6c4a8c7f1d58b..5cc89c0cf9e9e632212a9653391437cb Packet packet1 = null; boolean flag2 = flag1 || this.tickCounter % 60 == 0; boolean flag3 = Math.abs(i - this.yRot) >= 1 || Math.abs(j - this.xRot) >= 1; -@@ -143,9 +147,11 @@ public class EntityTrackerEntry { +@@ -145,9 +149,11 @@ public class EntityTrackerEntry { // CraftBukkit end if (this.tickCounter > 0 || this.tracker instanceof EntityArrow) { @@ -37,12 +37,12 @@ index 6d3b34ead9cc95dcc1152dffa8c6c4a8c7f1d58b..5cc89c0cf9e9e632212a9653391437cb + // Paper end - remove allocation of Vec3D here boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L; - if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.onGround) { + if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.isOnGround()) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index f361939b9ae451bdccf7922e9cca09344c6152b5..68dd9220bb360c75057919fed0598b415b947e4d 100644 +index 31f122aeef8df2eae5e8aab12f0b3316a67daa3b..435fadebe0c7a56a2a338b09238021fa50665285 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -2096,9 +2096,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2130,9 +2130,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public void updatePlayer(EntityPlayer entityplayer) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (entityplayer != this.tracker) { diff --git a/Spigot-Server-Patches/0523-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0493-Ensure-safe-gateway-teleport.patch similarity index 64% rename from Spigot-Server-Patches/0523-Ensure-safe-gateway-teleport.patch rename to Spigot-Server-Patches/0493-Ensure-safe-gateway-teleport.patch index 3e35b9bdc2..39235c4524 100644 --- a/Spigot-Server-Patches/0523-Ensure-safe-gateway-teleport.patch +++ b/Spigot-Server-Patches/0493-Ensure-safe-gateway-teleport.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure safe gateway teleport diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index c71f76004ed934e9e921efc4cb637f2e77af92d2..87aef515c65c8bd815667b1a77f453fee76b192d 100644 +index ea61a473d8e47428ed5cd4541a5855f0e2c50815..aebb6b6b2b869231310567b030fe32f34cc268f5 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -62,10 +62,14 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick @@ -14,16 +14,15 @@ index c71f76004ed934e9e921efc4cb637f2e77af92d2..87aef515c65c8bd815667b1a77f453fe List list = this.world.a(Entity.class, new AxisAlignedBB(this.getPosition())); - - if (!list.isEmpty()) { -- this.a(((Entity) list.get(0)).getRootVehicle()); -- } -+ // Paper start -+ for (Entity entity : list) { -+ if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) { -+ this.a(entity); -+ break; -+ } +- this.a((Entity) list.get(this.world.random.nextInt(list.size()))); ++ // Paper start ++ for (Entity entity : list) { ++ if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) { ++ this.a(entity); ++ break; + } -+ // Paper end + } ++ // Paper end if (this.age % 2400L == 0L) { this.h(); diff --git a/Spigot-Server-Patches/0525-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch similarity index 90% rename from Spigot-Server-Patches/0525-Add-option-for-console-having-all-permissions.patch rename to Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch index f04d491a80..bbfc2ca385 100644 --- a/Spigot-Server-Patches/0525-Add-option-for-console-having-all-permissions.patch +++ b/Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option for console having all permissions diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index cf9b9de8688e3f655631451409096d7ec0471910..f0284e81db3ab7c45018de2b446f2d8296df15c3 100644 +index e1c9e559b25792296b6b8f6dd1070035d10d82f2..08f744ee5e83d317f872f9c48e2037a24327d76f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -437,4 +437,9 @@ public class PaperConfig { +@@ -416,4 +416,9 @@ public class PaperConfig { allowBlockPermanentBreakingExploits = getBoolean("allow-perm-block-break-exploits", allowBlockPermanentBreakingExploits); } @@ -40,10 +40,10 @@ index bfd21a07280a79d279388c785c78fb8fe731102a..e67da10f9bfbb8125d8fbf34695997ec + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java -index 228e88a6e2b93ef2c4a5774cc8663b64467fb9eb..4024408815205c12eac9fdb246497ba713295f4b 100644 +index 655bdbc37d0b95622206569229d4f4ea9496c69d..5562a7199f9b73d6af539360d4912d1dbde5d6cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java -@@ -38,4 +38,16 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme +@@ -39,4 +39,16 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme public void setOp(boolean value) { throw new UnsupportedOperationException("Cannot change operator status of remote controller."); } diff --git a/Spigot-Server-Patches/0526-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch similarity index 92% rename from Spigot-Server-Patches/0526-Workaround-for-Client-Lag-Spikes-MC-162253.patch rename to Spigot-Server-Patches/0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch index 794ef4675d..b433d4d1cd 100644 --- a/Spigot-Server-Patches/0526-Workaround-for-Client-Lag-Spikes-MC-162253.patch +++ b/Spigot-Server-Patches/0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch @@ -12,10 +12,10 @@ to the client, so that it doesn't attempt to calculate them. This mitigates the frametime impact to a minimum (but it's still there). diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index c80a55ee53eac128c94d74b78c5641854e974750..d7beb47d9e07707e5875c50932dfe4698cb6ad72 100644 +index 7f508b9ef616071b1adeef7c00da7f4565ef4ddd..84dc89d961bde16f96dba5cf7f2ce4b85564215a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -277,7 +277,7 @@ public class Chunk implements IChunkAccess { +@@ -278,7 +278,7 @@ public class Chunk implements IChunkAccess { // broadcast Object[] backingSet = inRange.getBackingSet(); @@ -25,10 +25,10 @@ index c80a55ee53eac128c94d74b78c5641854e974750..d7beb47d9e07707e5875c50932dfe469 Object temp = backingSet[index]; if (!(temp instanceof EntityPlayer)) { diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index f6df85c6bf27bfa7a16967259a6016c9473201a5..4dcb111c704a495c214827f4ef554fb8e65ca2da 100644 +index 860dc98ab4f84c470b27726314943936d23fcb79..8d45588ecfa33b8c7335df3db58ed6865b8c956c 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java -@@ -99,6 +99,7 @@ public class ChunkSection { +@@ -100,6 +100,7 @@ public class ChunkSection { return this.nonEmptyBlockCount == 0; } @@ -37,10 +37,10 @@ index f6df85c6bf27bfa7a16967259a6016c9473201a5..4dcb111c704a495c214827f4ef554fb8 return chunksection == Chunk.a || chunksection.c(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 68dd9220bb360c75057919fed0598b415b947e4d..0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532 100644 +index 435fadebe0c7a56a2a338b09238021fa50665285..45e89468d72adba2cf7c079a12b8f3848f56e807 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -402,7 +402,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -408,7 +408,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { player.needsChunkCenterUpdate = false; player.playerConnection.sendPacket(new PacketPlayOutViewCentre(currPosX, currPosZ)); } @@ -49,7 +49,7 @@ index 68dd9220bb360c75057919fed0598b415b947e4d..0aa14bfca6e1845eb6e9f5bd4e0e3633 }, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet newState) -> { -@@ -1921,12 +1921,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1955,12 +1955,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -102,8 +102,8 @@ index 68dd9220bb360c75057919fed0598b415b947e4d..0aa14bfca6e1845eb6e9f5bd4e0e3633 + apacket = new Packet[10]; + } + // Paper end - apacket[0] = new PacketPlayOutMapChunk(chunk, 65535); - apacket[1] = new PacketPlayOutLightUpdate(chunk.getPos(), this.lightEngine); + apacket[0] = new PacketPlayOutMapChunk(chunk, 65535, true); + apacket[1] = new PacketPlayOutLightUpdate(chunk.getPos(), this.lightEngine, true); + + // Paper start - Fix MC-162253 + final int lightMask = getLightMask(chunk); @@ -127,7 +127,7 @@ index 68dd9220bb360c75057919fed0598b415b947e4d..0aa14bfca6e1845eb6e9f5bd4e0e3633 + continue; + } + -+ apacket[i] = new PacketPlayOutLightUpdate(new ChunkCoordIntPair(chunk.getPos().x + x, chunk.getPos().z + z), lightEngine, updateLightMask, 0); ++ apacket[i] = new PacketPlayOutLightUpdate(new ChunkCoordIntPair(chunk.getPos().x + x, chunk.getPos().z + z), lightEngine, updateLightMask, 0, true); + } + } + } diff --git a/Spigot-Server-Patches/0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 89% rename from Spigot-Server-Patches/0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 519dc60fec..32810a5190 100644 --- a/Spigot-Server-Patches/0527-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -78,19 +78,19 @@ index b5c2e1f4a2b5fdcaa6bb01f4b3b6847cd5b73ae8..6209b33d8497ec56bbde507e523db064 } diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index f617636a22167b06ac8073aa25efd8c7099155f0..0f40793f004639822b9d40521cd21ec50391ba3b 100644 +index 35b8a85d1280ba3be757b14b14388954ac1617d4..f47a6e0027de6886991aad5bcb98a04157aeb846 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -@@ -110,6 +110,7 @@ public class ChunkCoordIntPair { +@@ -108,6 +108,7 @@ public class ChunkCoordIntPair { return "[" + this.x + ", " + this.z + "]"; } + public final BlockPosition asPosition() { return l(); } // Paper - OBFHELPER public BlockPosition l() { - return new BlockPosition(this.x << 4, 0, this.z << 4); + 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 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1837cb127 100644 +index c072f61e8c88eac8335acd660d8ff0e2f9db819e..4c4108705e9d25912e57a7b3c28b4f1abad58377 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; @@ -113,8 +113,8 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 @@ -84,6 +85,7 @@ public abstract class ChunkMapDistance { } - private static int a(ArraySetSorted> arraysetsorted) { -+ AsyncCatcher.catchOp("ChunkMapDistance::getHighestTicketLevel"); // Paper + private static int getLowestTicketLevel(ArraySetSorted> arraysetsorted) { ++ AsyncCatcher.catchOp("ChunkMapDistance::getLowestTicketLevel"); // Paper return !arraysetsorted.isEmpty() ? ((Ticket) arraysetsorted.b()).b() : PlayerChunkMap.GOLDEN_TICKET + 1; } @@ -122,9 +122,9 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 public boolean a(PlayerChunkMap playerchunkmap) { //this.f.a(); // Paper - no longer used -+ AsyncCatcher.catchOp("DistanceManagerTick"); ++ AsyncCatcher.catchOp("DistanceManagerTick"); // Paper this.g.a(); - int i = Integer.MAX_VALUE - this.e.a(Integer.MAX_VALUE); + int i = Integer.MAX_VALUE - this.ticketLevelTracker.a(Integer.MAX_VALUE); boolean flag = i != 0; @@ -107,11 +110,13 @@ public abstract class ChunkMapDistance { @@ -149,7 +149,7 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 private boolean addTicket(long i, Ticket ticket) { // CraftBukkit - void -> boolean + AsyncCatcher.catchOp("ChunkMapDistance::addTicket"); // Paper ArraySetSorted> arraysetsorted = this.e(i); - int j = a(arraysetsorted); + int j = getLowestTicketLevel(arraysetsorted); Ticket ticket1 = (Ticket) arraysetsorted.a(ticket); // CraftBukkit - decompile error @@ -162,7 +169,9 @@ public abstract class ChunkMapDistance { } @@ -157,22 +157,21 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 private boolean removeTicket(long i, Ticket ticket) { // CraftBukkit - void -> boolean + AsyncCatcher.catchOp("ChunkMapDistance::removeTicket"); // Paper ArraySetSorted> arraysetsorted = this.e(i); -+ int oldLevel = a(arraysetsorted); // Paper ++ int oldLevel = getLowestTicketLevel(arraysetsorted); // Paper boolean removed = false; // CraftBukkit if (arraysetsorted.remove(ticket)) { -@@ -172,8 +181,8 @@ public abstract class ChunkMapDistance { - if (arraysetsorted.isEmpty()) { +@@ -173,7 +182,8 @@ public abstract class ChunkMapDistance { this.tickets.remove(i); } -- -- this.e.b(i, a(arraysetsorted), false); -+ int newLevel = a(arraysetsorted); // Paper -+ if (newLevel > oldLevel) this.e.b(i, newLevel, false); // Paper + +- this.ticketLevelTracker.update(i, getLowestTicketLevel(arraysetsorted), false); ++ int newLevel = getLowestTicketLevel(arraysetsorted); // Paper ++ if (newLevel > oldLevel) this.ticketLevelTracker.update(i, newLevel, false); // Paper return removed; // CraftBukkit } -@@ -182,6 +191,135 @@ public abstract class ChunkMapDistance { +@@ -182,6 +192,135 @@ public abstract class ChunkMapDistance { this.addTicketAtLevel(tickettype, chunkcoordintpair, i, t0); } @@ -308,7 +307,7 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 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 +519,51 @@ public abstract class ChunkMapDistance { +@@ -381,27 +520,50 @@ public abstract class ChunkMapDistance { private void a(long i, int j, boolean flag, boolean flag1) { if (flag != flag1) { @@ -317,6 +316,7 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 + Ticket ticket = new Ticket<>(TicketType.PLAYER, 33, coords); // Paper - no-tick view distance if (flag1) { +- ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { + scheduleChunkLoad(i, MinecraftServer.currentTick, j, (priority) -> { // Paper - smarter ticket delay based on frustum and distance + // Paper start - recheck its still valid if not cancel + if (!isChunkInRange(i)) { @@ -337,16 +337,16 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 + return; + } + // Paper end - ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error ++ ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error ChunkMapDistance.this.m.execute(() -> { - if (this.c(this.c(i))) { + if (isChunkInRange(i)) { if (!hasPlayerTicket(coords, 33)) { // Paper - high priority might of already added it ChunkMapDistance.this.addTicket(i, ticket); ChunkMapDistance.this.l.add(i); - } else { -+ } -+ } else { // Paper - ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error +- ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { ++ }} else { // Paper ++ ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error }, i, false)); } @@ -357,7 +357,7 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 })); + }); // Paper } else { - ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error + ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { ChunkMapDistance.this.m.execute(() -> { ChunkMapDistance.this.removeTicket(i, ticket); + ChunkMapDistance.this.clearPriorityTickets(coords); // Paper @@ -484,10 +484,10 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..35a4999b2c34ae62cba042885db25dd1 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 3089d673a029c493cac756124eb0baa21a8bab7f..8efe036be0c74a5ceb6a18e019c4a08a49a28693 100644 +index a6363b73522f9d27534b6e80f4b3789e84316c49..604e7004b659daed2844ba1a76bf09288ec549e5 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -442,6 +442,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); } @@ -514,7 +514,7 @@ index 3089d673a029c493cac756124eb0baa21a8bab7f..8efe036be0c74a5ceb6a18e019c4a08a // Paper end @Nullable -@@ -480,6 +500,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 @@ -523,7 +523,7 @@ index 3089d673a029c493cac756124eb0baa21a8bab7f..8efe036be0c74a5ceb6a18e019c4a08a 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 -@@ -488,6 +510,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 @@ -532,7 +532,7 @@ index 3089d673a029c493cac756124eb0baa21a8bab7f..8efe036be0c74a5ceb6a18e019c4a08a } // Paper ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { return ichunkaccess1; -@@ -540,10 +564,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); @@ -545,7 +545,7 @@ index 3089d673a029c493cac756124eb0baa21a8bab7f..8efe036be0c74a5ceb6a18e019c4a08a this.tickDistanceManager(); playerchunk = this.getChunk(k); gameprofilerfiller.exit(); -@@ -552,8 +578,13 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -553,8 +579,13 @@ public class ChunkProviderServer extends IChunkProvider { } } } @@ -561,18 +561,16 @@ index 3089d673a029c493cac756124eb0baa21a8bab7f..8efe036be0c74a5ceb6a18e019c4a08a } private boolean a(@Nullable PlayerChunk playerchunk, int i) { -@@ -603,7 +634,8 @@ public class ChunkProviderServer extends IChunkProvider { - return this.serverThreadQueue.executeNext(); +@@ -605,6 +636,7 @@ public class ChunkProviderServer extends IChunkProvider { } -- private boolean tickDistanceManager() { -+ public boolean tickDistanceManager() { // Paper - public + public boolean tickDistanceManager() { // Paper - private -> public + if (chunkMapDistance.delayDistanceManagerTick) return false; // Paper boolean flag = this.chunkMapDistance.a(this.playerChunkMap); boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 07a6fc3d88e7d44bfab7f3d6a0eef7dc132ab422..39072ebdc9e4be2bb762d81a8bd542dbdb8f6371 100644 +index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a23a9b5005 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -55,6 +55,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -588,7 +586,7 @@ index 07a6fc3d88e7d44bfab7f3d6a0eef7dc132ab422..39072ebdc9e4be2bb762d81a8bd542db private float lastHealthSent = -1.0E8F; private int lastFoodSent = -99999999; private boolean lastSentSaturationZero = true; -@@ -132,6 +138,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -136,6 +142,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.maxHealthCache = this.getMaxHealth(); this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper } @@ -610,8 +608,8 @@ index 07a6fc3d88e7d44bfab7f3d6a0eef7dc132ab422..39072ebdc9e4be2bb762d81a8bd542db // Yes, this doesn't match Vanilla, but it's the best we can do for now. // If this is an issue, PRs are welcome -@@ -441,6 +462,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - if (valid && (!this.isSpectator() || this.world.isLoaded(new BlockPosition(this)))) { // Paper - don't tick dead players that are not in the world currently (pending respawn) +@@ -484,6 +505,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn) super.tick(); } + if (valid && isAlive() && playerConnection != null) ((WorldServer)world).getChunkProvider().playerChunkMap.checkHighPriorityChunks(this); // Paper @@ -619,10 +617,10 @@ index 07a6fc3d88e7d44bfab7f3d6a0eef7dc132ab422..39072ebdc9e4be2bb762d81a8bd542db for (int i = 0; i < this.inventory.getSize(); ++i) { ItemStack itemstack = this.inventory.getItem(i); diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index ce0bf608b71cf492fc31e89a360ecd83fa5c23a6..87d58002116f361d8255d79fc0dbd1200f442168 100644 +index 2f9c014454cf5fe771c6da84ad4af7e7790fdc7d..2e58e58548f0fc7af98b0c6294bf855f54705f9b 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java -@@ -666,6 +666,7 @@ public final class MCUtil { +@@ -654,6 +654,7 @@ public final class MCUtil { chunkData.addProperty("x", playerChunk.location.x); chunkData.addProperty("z", playerChunk.location.z); chunkData.addProperty("ticket-level", playerChunk.getTicketLevel()); @@ -631,7 +629,7 @@ index ce0bf608b71cf492fc31e89a360ecd83fa5c23a6..87d58002116f361d8255d79fc0dbd120 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 aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda492700e4 100644 +index e5751adde516544722b95016f64b2a46c16e77ce..04dea2c9fd9337631a6289c7242338e166d6bc1e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -26,8 +26,8 @@ public class PlayerChunk { @@ -645,7 +643,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda private final short[] dirtyBlocks; private int dirtyCount; private int r; -@@ -40,6 +40,7 @@ public class PlayerChunk { +@@ -39,6 +39,7 @@ public class PlayerChunk { private boolean hasBeenLoaded; private final PlayerChunkMap chunkMap; // Paper @@ -653,7 +651,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda long lastAutoSaveTime; // Paper - incremental autosave long inactiveTimeStart; // Paper - incremental autosave -@@ -67,6 +68,120 @@ public class PlayerChunk { +@@ -66,6 +67,120 @@ public class PlayerChunk { return null; } // Paper end - no-tick view distance @@ -774,7 +772,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); -@@ -165,6 +280,18 @@ public class PlayerChunk { +@@ -164,6 +279,18 @@ public class PlayerChunk { } return null; } @@ -793,7 +791,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda // Paper end public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { -@@ -418,6 +545,7 @@ public class PlayerChunk { +@@ -405,6 +532,7 @@ public class PlayerChunk { return this.n; } @@ -801,7 +799,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda private void d(int i) { this.n = i; } -@@ -436,7 +564,7 @@ public class PlayerChunk { +@@ -423,7 +551,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)) { @@ -810,7 +808,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda Chunk chunk = (Chunk)either.left().orElse(null); if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { -@@ -501,12 +629,13 @@ public class PlayerChunk { +@@ -488,12 +616,13 @@ public class PlayerChunk { if (!flag2 && flag3) { // Paper start - cache ticking ready status int expectCreateCount = ++this.fullChunkCreateCount; @@ -825,7 +823,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda } -@@ -531,7 +660,7 @@ public class PlayerChunk { +@@ -518,7 +647,7 @@ public class PlayerChunk { if (!flag4 && flag5) { // Paper start - cache ticking ready status @@ -834,7 +832,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda if (either.left().isPresent()) { // note: Here is a very good place to add callbacks to logic waiting on this. Chunk tickingChunk = either.left().get(); -@@ -562,7 +691,7 @@ public class PlayerChunk { +@@ -549,7 +678,7 @@ public class PlayerChunk { } // Paper start - cache ticking ready status @@ -843,12 +841,11 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda if (either.left().isPresent()) { // note: Here is a very good place to add callbacks to logic waiting on this. Chunk entityTickingChunk = either.left().get(); -@@ -581,13 +710,29 @@ public class PlayerChunk { - this.entityTickingFuture.complete(PlayerChunk.UNLOADED_CHUNK); this.isEntityTickingReady = false; // Paper - cache chunk ticking stage +@@ -569,12 +698,29 @@ public class PlayerChunk { this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; } -- -- this.w.a(this.location, this::k, this.ticketLevel, this::d); + +- this.v.a(this.location, this::k, this.ticketLevel, this::d); + // Paper start - raise IO/load priority if priority changes, use our preferred priority + priorityBoost = chunkMap.chunkDistanceManager.getChunkPriority(location); + int priority = getDemandedPriority(); @@ -862,7 +859,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda + chunkMap.world.asyncChunkTaskManager.raisePriority(location.x, location.z, ioPriority); + } + if (getCurrentPriority() != priority) { -+ this.w.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority ++ this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority + int neighborsPriority = getNeighborsPriority(); + this.neighbors.forEach((neighbor, neighborDesired) -> neighbor.setNeighborPriority(this, neighborsPriority)); + } @@ -876,7 +873,7 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda Chunk chunk = (Chunk)either.left().orElse(null); if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { -@@ -669,6 +814,7 @@ public class PlayerChunk { +@@ -656,6 +802,7 @@ public class PlayerChunk { public interface c { @@ -885,10 +882,10 @@ index aeca6b2b9d5d73aeb6dc639b5cad2f2533a2de44..52da9c78c0cc2b21533a1477a25a3dda } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c0fd1eef7 100644 +index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb60426067b2ba89 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -50,6 +50,7 @@ import org.apache.commons.lang3.mutable.MutableBoolean; +@@ -51,6 +51,7 @@ import org.apache.commons.lang3.mutable.MutableBoolean; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.bukkit.entity.Player; // CraftBukkit @@ -896,7 +893,15 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { -@@ -123,6 +124,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -88,6 +89,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + public final WorldServer world; + private final LightEngineThreaded lightEngine; + private final IAsyncTaskHandler executor; ++ final java.util.concurrent.Executor mainInvokingExecutor; // Paper + public final ChunkGenerator chunkGenerator; + private final Supplier l; public final Supplier getWorldPersistentDataSupplier() { return this.l; } // Paper - OBFHELPER + private final VillagePlace m; +@@ -125,6 +127,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void execute(Runnable runnable) { @@ -904,7 +909,7 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c if (queued == null) { queued = new java.util.ArrayDeque<>(); } -@@ -131,6 +133,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -133,6 +136,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void run() { @@ -912,7 +917,23 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c if (queued == null) { return; } -@@ -375,6 +378,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -287,6 +291,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + this.world = worldserver; + this.chunkGenerator = chunkgenerator; + this.executor = iasynctaskhandler; ++ // Paper start ++ this.mainInvokingExecutor = (run) -> { ++ if (MCUtil.isMainThread()) { ++ run.run(); ++ } else { ++ iasynctaskhandler.execute(run); ++ } ++ }; ++ // Paper end + ThreadedMailbox threadedmailbox = ThreadedMailbox.a(executor, "worldgen"); + + iasynctaskhandler.getClass(); +@@ -381,6 +394,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet newState) -> { @@ -920,7 +941,7 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c if (newState.size() != 1) { return; } -@@ -393,7 +397,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -399,7 +413,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(rangeX, rangeZ); PlayerChunkMap.this.world.getChunkProvider().removeTicketAtLevel(TicketType.PLAYER, chunkPos, 31, chunkPos); // entity ticking level, TODO check on update @@ -933,7 +954,7 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c this.playerViewDistanceNoTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); this.playerViewDistanceBroadcastMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -410,6 +418,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -416,6 +434,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }); // Paper end - no-tick view distance } @@ -1050,7 +1071,7 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c public void updatePlayerMobTypeMap(Entity entity) { if (!this.world.paperConfig.perPlayerMobSpawns) { -@@ -539,6 +657,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -545,6 +673,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { List>> list = Lists.newArrayList(); int j = chunkcoordintpair.x; int k = chunkcoordintpair.z; @@ -1058,7 +1079,7 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c for (int l = -i; l <= i; ++l) { for (int i1 = -i; i1 <= i; ++i1) { -@@ -557,6 +676,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -563,6 +692,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkStatus chunkstatus = (ChunkStatus) intfunction.apply(j1); CompletableFuture> completablefuture = playerchunk.a(chunkstatus, this); @@ -1073,7 +1094,7 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c list.add(completablefuture); } -@@ -1022,14 +1149,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1027,14 +1164,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; CompletableFuture chunkSaveFuture = this.world.asyncChunkTaskManager.getChunkSaveFuture(chunkcoordintpair.x, chunkcoordintpair.z); @@ -1101,20 +1122,20 @@ index 0aa14bfca6e1845eb6e9f5bd4e0e36335fa7f532..3139d55bb801b6c433de7274be4a1d0c return ret; // Paper end } -@@ -1158,7 +1293,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1171,7 +1316,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { long i = playerchunk.i().pair(); playerchunk.getClass(); -- mailbox.a(ChunkTaskQueueSorter.a(runnable, i, playerchunk::getTicketLevel)); // CraftBukkit - decompile error -+ mailbox.a(ChunkTaskQueueSorter.a(runnable, i, () -> 1)); // CraftBukkit - decompile error // Paper - final loads are always urgent! +- mailbox.a(ChunkTaskQueueSorter.a(runnable, i, playerchunk::getTicketLevel)); ++ mailbox.a(ChunkTaskQueueSorter.a(runnable, i, () -> 1)); // Paper - final loads are always urgent! }); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d52fbda79fe1c52d3ddb53c0f1c1f521d7620702..f9cb87a3be35575ecf3362b10dc7fe5ebadb56ec 100644 +index 383a9bdec4d476bbde5a7c63a9915d2ed4c136a4..e34290011bb5d7bcfb677b70fdec1a525a082e0e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1279,6 +1279,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1301,6 +1301,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.A = this.e; this.player.setLocation(d0, d1, d2, f, f1); this.syncPosition(); // Paper @@ -1123,10 +1144,10 @@ index d52fbda79fe1c52d3ddb53c0f1c1f521d7620702..f9cb87a3be35575ecf3362b10dc7fe5e } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 74571c1befa60e71e93de8052740a56f7b80e920..f0fe864026dc10cd809f06dc9d4e823c21494a8d 100644 +index bdee3540b675f8036c5c6a59d6f53057bbdd6a85..34e218f054eee7d3e2ea064e0758d93f140f270b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -174,8 +174,8 @@ public abstract class PlayerList { +@@ -199,8 +199,8 @@ public abstract class PlayerList { final ChunkCoordIntPair pos = new ChunkCoordIntPair(chunkX, chunkZ); PlayerChunkMap playerChunkMap = finalWorldserver.getChunkProvider().playerChunkMap; playerChunkMap.chunkDistanceManager.addTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); @@ -1137,32 +1158,32 @@ index 74571c1befa60e71e93de8052740a56f7b80e920..f0fe864026dc10cd809f06dc9d4e823c PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pos.pair()); if (updatingChunk != null) { return updatingChunk.getEntityTickingFuture(); -@@ -188,7 +188,6 @@ public abstract class PlayerList { - entityplayer, finalWorldserver, networkmanager, playerconnection, +@@ -213,7 +213,6 @@ public abstract class PlayerList { + entityplayer, finalWorldserver, finalWorldserver1, networkmanager, playerconnection, nbttagcompound, networkmanager.getSocketAddress().toString(), lastKnownName ); - //playerChunkMap.chunkDistanceManager.removeTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); }; }); } -@@ -585,6 +584,7 @@ public abstract class PlayerList { +@@ -617,6 +616,7 @@ public abstract class PlayerList { SocketAddress socketaddress = loginlistener.networkManager.getSocketAddress(); - EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(DimensionManager.OVERWORLD), gameprofile, new PlayerInteractManager(this.server.getWorldServer(DimensionManager.OVERWORLD))); + EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(World.OVERWORLD), gameprofile, new PlayerInteractManager(this.server.getWorldServer(World.OVERWORLD))); + entity.isRealPlayer = true; // Paper Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); -@@ -764,6 +764,7 @@ public abstract class PlayerList { +@@ -812,6 +812,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper + entityplayer1.forceCheckHighPriority(); // Player - while (avoidSuffocation && !worldserver.getCubes(entityplayer1) && entityplayer1.locY() < 256.0D) { + while (avoidSuffocation && !worldserver1.getCubes(entityplayer1) && entityplayer1.locY() < 256.0D) { entityplayer1.setPosition(entityplayer1.locX(), entityplayer1.locY() + 1.0D, entityplayer1.locZ()); } diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java -index 7a8397815a5b7f79f3e3a0348aeedf63fe879f8f..0d6e0f2ddaa85c04e626980591e9a78ac27fb42d 100644 +index 7a8397815a5b7f79f3e3a0348aeedf63fe879f8f..b5030d6f5d917ba33fb3c40903384fa7a56bc5f1 100644 --- a/src/main/java/net/minecraft/server/Ticket.java +++ b/src/main/java/net/minecraft/server/Ticket.java @@ -8,6 +8,7 @@ public final class Ticket implements Comparable> { @@ -1173,6 +1194,14 @@ index 7a8397815a5b7f79f3e3a0348aeedf63fe879f8f..0d6e0f2ddaa85c04e626980591e9a78a protected Ticket(TicketType tickettype, int i, T t0) { this.a = tickettype; +@@ -56,6 +57,7 @@ public final class Ticket implements Comparable> { + return this.b; + } + ++ public final void setCurrentTick(long i) { this.a(i); } // Paper - OBFHELPER + protected void a(long i) { + this.d = i; + } diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java index d7b9d9fd3a3b607278a3d72b0b306b0be2aa30ad..6fd852db6bcfbfbf84ec2acf6d23b08a6051165c 100644 --- a/src/main/java/net/minecraft/server/TicketType.java @@ -1187,10 +1216,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 36207acffac3620879afd11bb47e06341a3dabb9..5992fdda8a5c66f77dbfca86d6261b98cce2b1e9 100644 +index 745633509d3f948d46529d5439ec14cd01a05563..5ae74d0856f7fb4a7ee35e5d778d78fecaf99730 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2483,6 +2483,10 @@ public class CraftWorld implements World { +@@ -2486,6 +2486,10 @@ public class CraftWorld implements World { return future; } @@ -1202,10 +1231,10 @@ index 36207acffac3620879afd11bb47e06341a3dabb9..5992fdda8a5c66f77dbfca86d6261b98 net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bd4d5184b607db09c8ff2687ceaf47fb94368a28..141003ca718cc6ba113de8e4855b18252b293ef6 100644 +index b28e5abea5d2585d9beff574dd82651e7d20275b..663f9136c4101bb48944ed5ea952f6375e8b2781 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -738,6 +738,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -741,6 +741,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); } diff --git a/Spigot-Server-Patches/0528-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 94% rename from Spigot-Server-Patches/0528-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to Spigot-Server-Patches/0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch index 29b5e63ec6..0888e5d79b 100644 --- a/Spigot-Server-Patches/0528-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch +++ b/Spigot-Server-Patches/0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch @@ -16,10 +16,10 @@ We further improve it by making a copy of the nbt tag with only the memory it needs, so that we dont have to hold a copy to the entire compound. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index d752e793f13a9caf5d255293f7ce9d562fd50064..1685237dfd7d6f352c5bab5f65817462de5e6d12 100644 +index 4b7c4643f04448aaccc66f26a9dea2323bea420d..ac58fcb7985ebe0cfdab6e1400deb37c233ff637 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -157,9 +157,9 @@ public class ChunkRegionLoader { +@@ -156,9 +156,9 @@ public class ChunkRegionLoader { object2 = protochunkticklist1; } @@ -32,7 +32,7 @@ index d752e793f13a9caf5d255293f7ce9d562fd50064..1685237dfd7d6f352c5bab5f65817462 } else { ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, worldserver); // Paper - Anti-Xray - Add parameter -@@ -265,6 +265,37 @@ public class ChunkRegionLoader { +@@ -264,6 +264,37 @@ public class ChunkRegionLoader { return new InProgressChunkHolder(protochunk1, tasksToExecuteOnMain); // Paper - Async chunk loading } } diff --git a/Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch new file mode 100644 index 0000000000..d4b5d55f70 --- /dev/null +++ b/Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -0,0 +1,63 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 23 May 2020 17:03:41 -0400 +Subject: [PATCH] Optimize sending packets to nearby locations (sounds/effects) + +Instead of using the entire world or player list, use the distance +maps to only iterate players who are even seeing the chunk the packet +is originating from. + +This will drastically cut down on packet sending cost for worlds with +lots of players in them. + +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index 34e218f054eee7d3e2ea064e0758d93f140f270b..54d5bb4309600ed87a6f7dfc64415fb8854c0f75 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -1062,16 +1062,40 @@ public abstract class PlayerList { + } + + public void sendPacketNearby(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, double d3, ResourceKey resourcekey, Packet packet) { +- for (int i = 0; i < this.players.size(); ++i) { +- EntityPlayer entityplayer = (EntityPlayer) this.players.get(i); ++ WorldServer world = null; ++ if (entityhuman != null && entityhuman.world instanceof WorldServer) { ++ world = (WorldServer) entityhuman.world; ++ } + +- // CraftBukkit start - Test if player receiving packet can see the source of the packet +- if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) { +- continue; ++ // Paper start ++ if (world == null) { ++ world = server.getWorldServer(resourcekey); ++ } ++ PlayerChunkMap chunkMap = world != null ? world.getChunkProvider().playerChunkMap : null; ++ Object[] backingSet; ++ if (chunkMap == null) { ++ // Really shouldn't happen... ++ backingSet = world != null ? world.players.toArray() : players.toArray(); ++ } else { ++ com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet nearbyPlayers = chunkMap.playerViewDistanceBroadcastMap.getObjectsInRange(MCUtil.fastFloor(d0) >> 4, MCUtil.fastFloor(d2) >> 4); ++ if (nearbyPlayers == null) { ++ return; + } ++ backingSet = nearbyPlayers.getBackingSet(); ++ } ++ ++ for (Object object : backingSet) { ++ if (!(object instanceof EntityPlayer)) continue; ++ EntityPlayer entityplayer = (EntityPlayer) object; ++ // Paper end ++ ++ // CraftBukkit start - Test if player receiving packet can see the source of the packet ++ //if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) { // Paper ++ //continue; // Paper ++ //} // Paper + // CraftBukkit end + +- if (entityplayer != entityhuman && entityplayer.world.getDimensionKey() == resourcekey) { ++ if (entityplayer != entityhuman && entityplayer.world.getDimensionKey() == resourcekey && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) { // Paper + double d4 = d0 - entityplayer.locX(); + double d5 = d1 - entityplayer.locY(); + double d6 = d2 - entityplayer.locZ(); diff --git a/Spigot-Server-Patches/0531-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0499-Improve-Chunk-Status-Transition-Speed.patch similarity index 72% rename from Spigot-Server-Patches/0531-Improve-Chunk-Status-Transition-Speed.patch rename to Spigot-Server-Patches/0499-Improve-Chunk-Status-Transition-Speed.patch index 85c0553f68..bbd4ac1ce4 100644 --- a/Spigot-Server-Patches/0531-Improve-Chunk-Status-Transition-Speed.patch +++ b/Spigot-Server-Patches/0499-Improve-Chunk-Status-Transition-Speed.patch @@ -36,10 +36,10 @@ scenario / path: Previously would have hopped to SERVER around 12+ times there extra. diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 52da9c78c0cc2b21533a1477a25a3dda492700e4..69899c100dd86c6c4795013364472336327ce036 100644 +index 04dea2c9fd9337631a6289c7242338e166d6bc1e..446c401b3139f8c6c0e70d883340f0140d94b752 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -56,6 +56,13 @@ public class PlayerChunk { +@@ -55,6 +55,13 @@ public class PlayerChunk { this.playersInChunkTickRange = this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(key); } // Paper end - optimise isOutsideOfRange @@ -54,34 +54,10 @@ index 52da9c78c0cc2b21533a1477a25a3dda492700e4..69899c100dd86c6c4795013364472336 // Paper start - no-tick view distance public final Chunk getSendingChunk() { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 3139d55bb801b6c433de7274be4a1d0c0fd1eef7..98adcb6390105a183d66975ed9659906b609ce08 100644 +index 1eb138f003730f9d1048683beb60426067b2ba89..e9703cee3b175b220917b83d80e9904b1af17abe 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -88,6 +88,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - public final WorldServer world; - private final LightEngineThreaded lightEngine; - private final IAsyncTaskHandler executor; -+ final java.util.concurrent.Executor mainInvokingExecutor; // Paper - public final ChunkGenerator chunkGenerator; - private final Supplier l; public final Supplier getWorldPersistentDataSupplier() { return this.l; } // Paper - OBFHELPER - private final VillagePlace m; -@@ -285,6 +286,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.world = worldserver; - this.chunkGenerator = chunkgenerator; - this.executor = iasynctaskhandler; -+ // Paper start - optimize chunk status progression without jumping through thread pool -+ this.mainInvokingExecutor = (run) -> { -+ if (MCUtil.isMainThread()) { -+ run.run(); -+ } else { -+ iasynctaskhandler.execute(run); -+ } -+ }; -+ // Paper end - ThreadedMailbox threadedmailbox = ThreadedMailbox.a(executor, "worldgen"); - - iasynctaskhandler.getClass(); -@@ -724,7 +734,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -740,7 +740,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return either.mapLeft((list) -> { return (Chunk) list.get(list.size() / 2); }); @@ -90,7 +66,7 @@ index 3139d55bb801b6c433de7274be4a1d0c0fd1eef7..98adcb6390105a183d66975ed9659906 } @Nullable -@@ -1074,7 +1084,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1090,7 +1090,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { IChunkAccess ichunkaccess = (IChunkAccess) optional.get(); if (ichunkaccess.getChunkStatus().b(chunkstatus)) { @@ -99,7 +75,7 @@ index 3139d55bb801b6c433de7274be4a1d0c0fd1eef7..98adcb6390105a183d66975ed9659906 if (chunkstatus == ChunkStatus.LIGHT) { completablefuture1 = this.b(playerchunk, chunkstatus); -@@ -1090,7 +1100,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1106,7 +1106,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return this.b(playerchunk, chunkstatus); } } @@ -108,7 +84,7 @@ index 3139d55bb801b6c433de7274be4a1d0c0fd1eef7..98adcb6390105a183d66975ed9659906 } } -@@ -1201,6 +1211,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1224,6 +1224,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); }); }, (runnable) -> { @@ -118,6 +94,6 @@ index 3139d55bb801b6c433de7274be4a1d0c0fd1eef7..98adcb6390105a183d66975ed9659906 + return; + } + // Paper end - this.mailboxWorldGen.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); // CraftBukkit - decompile error + this.mailboxWorldGen.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); }); } diff --git a/Spigot-Server-Patches/0532-Fix-villager-trading-demand-MC-163962.patch b/Spigot-Server-Patches/0500-Fix-villager-trading-demand-MC-163962.patch similarity index 89% rename from Spigot-Server-Patches/0532-Fix-villager-trading-demand-MC-163962.patch rename to Spigot-Server-Patches/0500-Fix-villager-trading-demand-MC-163962.patch index daa484429a..96152b810e 100644 --- a/Spigot-Server-Patches/0532-Fix-villager-trading-demand-MC-163962.patch +++ b/Spigot-Server-Patches/0500-Fix-villager-trading-demand-MC-163962.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix villager trading demand - MC-163962 Prevent demand from going negative and tending to negative infinity diff --git a/src/main/java/net/minecraft/server/MerchantRecipe.java b/src/main/java/net/minecraft/server/MerchantRecipe.java -index f1f49c2ebff93ce3537bd4a58916d4c624a3fe82..7c4dc1143696320c8b8dc21ea4ae0600d5686d62 100644 +index 2865fa7018c3631fbcaaaaa2892219d9cab713d3..e42382a5c385c27b6322b03e87870eb20b21cb22 100644 --- a/src/main/java/net/minecraft/server/MerchantRecipe.java +++ b/src/main/java/net/minecraft/server/MerchantRecipe.java @@ -104,7 +104,7 @@ public class MerchantRecipe { diff --git a/Spigot-Server-Patches/0533-Maps-shouldn-t-load-chunks.patch b/Spigot-Server-Patches/0501-Maps-shouldn-t-load-chunks.patch similarity index 95% rename from Spigot-Server-Patches/0533-Maps-shouldn-t-load-chunks.patch rename to Spigot-Server-Patches/0501-Maps-shouldn-t-load-chunks.patch index 9b5bf77979..6dd34a1a75 100644 --- a/Spigot-Server-Patches/0533-Maps-shouldn-t-load-chunks.patch +++ b/Spigot-Server-Patches/0501-Maps-shouldn-t-load-chunks.patch @@ -15,7 +15,7 @@ Previously maps would load all chunks in a certain radius depending on five ticks that movement occur in anyways. diff --git a/src/main/java/net/minecraft/server/ItemWorldMap.java b/src/main/java/net/minecraft/server/ItemWorldMap.java -index 189e6d753d43b145a5480b10db11bba54fe8fbf3..134468da1a8fad6fdd48f64bf9ea885794e86bdf 100644 +index a65266040dc14d7c679b8eb46188023aa35f83ed..90be8c6091dc590a020721f45c7ff7b137cc806d 100644 --- a/src/main/java/net/minecraft/server/ItemWorldMap.java +++ b/src/main/java/net/minecraft/server/ItemWorldMap.java @@ -96,9 +96,9 @@ public class ItemWorldMap extends ItemWorldMapBase { diff --git a/Spigot-Server-Patches/0534-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 82% rename from Spigot-Server-Patches/0534-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch index 0a2d3d9c47..96bcd2c18e 100644 --- a/Spigot-Server-Patches/0534-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch +++ b/Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from diff --git a/src/main/java/net/minecraft/server/ItemWorldMap.java b/src/main/java/net/minecraft/server/ItemWorldMap.java -index 134468da1a8fad6fdd48f64bf9ea885794e86bdf..b09de92ee56f491f7b4c526105f8d306b365a275 100644 +index 90be8c6091dc590a020721f45c7ff7b137cc806d..faa556d4358bc9890ae80c18ee10c38a8d46548e 100644 --- a/src/main/java/net/minecraft/server/ItemWorldMap.java +++ b/src/main/java/net/minecraft/server/ItemWorldMap.java @@ -229,7 +229,7 @@ public class ItemWorldMap extends ItemWorldMapBase { @@ -19,16 +19,15 @@ index 134468da1a8fad6fdd48f64bf9ea885794e86bdf..b09de92ee56f491f7b4c526105f8d306 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2c9acffe5a62af43ff4f4ccdb6962929d645e226..49da7352dcee6c352904cabe8b5db0152c427029 100644 +index d0493919e71159ac6b38a64b2411fea722b53306..b79302b83921111d5fa32794babf1fa57b7bbcb1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -283,8 +283,9 @@ public class WorldServer extends World { +@@ -303,8 +303,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { + this.worldDataServer.setThundering(flag1); } - // CraftBukkit end - @Override - public BiomeBase a(int i, int j, int k) { -+ + public BiomeBase getBiomeBySeed(int i, int j, int k) { return a(i, j, k); } // Paper - OBFHELPER + @Override public BiomeBase a(int i, int j, int k) { return this.getChunkProvider().getChunkGenerator().getWorldChunkManager().getBiome(i, j, k); diff --git a/Spigot-Server-Patches/0535-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0503-Optimize-Bit-Operations-by-inlining.patch similarity index 69% rename from Spigot-Server-Patches/0535-Optimize-Bit-Operations-by-inlining.patch rename to Spigot-Server-Patches/0503-Optimize-Bit-Operations-by-inlining.patch index 7f92515714..d54739c7e8 100644 --- a/Spigot-Server-Patches/0535-Optimize-Bit-Operations-by-inlining.patch +++ b/Spigot-Server-Patches/0503-Optimize-Bit-Operations-by-inlining.patch @@ -7,11 +7,11 @@ Inline bit operations and reduce instruction count to make these hot operations faster diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 3bf17ccdaef21322b787db538d569e0bc614ef22..4c64798fbc50f4d8b08502ba865c5fde5c968e62 100644 +index adfeeefbbc307a77738c2cc8d82856cd02c2285e..52b2bff9ee3ccb4cea9549542b2b484685a70bfb 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -75,38 +75,34 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - return dynamicops.createIntList(IntStream.of(new int[]{this.getX(), this.getY(), this.getZ()})); +@@ -53,28 +53,29 @@ public class BlockPosition extends BaseBlockPosition { + this(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); } + public static long getAdjacent(int baseX, int baseY, int baseZ, EnumDirection enumdirection) { return asLong(baseX + enumdirection.getAdjacentX(), baseY + enumdirection.getAdjacentY(), baseZ + enumdirection.getAdjacentZ()); } // Paper @@ -25,17 +25,17 @@ index 3bf17ccdaef21322b787db538d569e0bc614ef22..4c64798fbc50f4d8b08502ba865c5fde } public static int b(long i) { -- return (int) (i << 64 - BlockPosition.k - BlockPosition.c >> 64 - BlockPosition.c); +- return (int) (i << 64 - BlockPosition.m - BlockPosition.f >> 64 - BlockPosition.f); + return (int) (i >> 38); // Paper - simplify/inline } public static int c(long i) { -- return (int) (i << 64 - BlockPosition.f >> 64 - BlockPosition.f); -+ return (int) ((i << 52) >> 52); // Paper - simplify/inline +- return (int) (i << 64 - BlockPosition.h >> 64 - BlockPosition.h); ++ return (int) ((i << 26) >> 38); // Paper - simplify/inline } public static int d(long i) { -- return (int) (i << 64 - BlockPosition.j - BlockPosition.d >> 64 - BlockPosition.d); +- return (int) (i << 64 - BlockPosition.l - BlockPosition.g >> 64 - BlockPosition.g); + return (int) ((i << 26) >> 38); // Paper - simplify/inline } @@ -44,20 +44,23 @@ index 3bf17ccdaef21322b787db538d569e0bc614ef22..4c64798fbc50f4d8b08502ba865c5fde + return new BlockPosition((int) (i >> 38), (int) ((i << 52) >> 52), (int) ((i << 26) >> 38)); // Paper - simplify/inline } + public long asLong() { +@@ -83,12 +84,7 @@ public class BlockPosition extends BaseBlockPosition { + public static long asLong(int x, int y, int z) { return a(x, y, z); } // Paper - OBFHELPER public static long a(int i, int j, int k) { - long l = 0L; - -- l |= ((long) i & BlockPosition.g) << BlockPosition.k; -- l |= ((long) j & BlockPosition.h) << 0; -- l |= ((long) k & BlockPosition.i) << BlockPosition.j; +- l |= ((long) i & BlockPosition.i) << BlockPosition.m; +- l |= ((long) j & BlockPosition.j) << 0; +- l |= ((long) k & BlockPosition.k) << BlockPosition.l; - return l; + return (((long) i & (long) 67108863) << 38) | (((long) j & (long) 4095)) | (((long) k & (long) 67108863) << 12); // Paper - inline constants and simplify } public static long f(long i) { diff --git a/src/main/java/net/minecraft/server/SectionPosition.java b/src/main/java/net/minecraft/server/SectionPosition.java -index ca3f63f5e5e4e926de562b4bfbbf72ad8a6b943f..22bc96f97d22e0748110982e4b1ff85002f924b5 100644 +index 6a8597c585e74ebea2e8bac2f9965f8760e19b67..7806f3c351cba3f0388da11888f900c48004dadf 100644 --- a/src/main/java/net/minecraft/server/SectionPosition.java +++ b/src/main/java/net/minecraft/server/SectionPosition.java @@ -16,7 +16,7 @@ public class SectionPosition extends BaseBlockPosition { @@ -104,75 +107,35 @@ index ca3f63f5e5e4e926de562b4bfbbf72ad8a6b943f..22bc96f97d22e0748110982e4b1ff850 - int k = b(blockposition.getZ()); - - return (short) (i << 8 | k << 4 | j); -+ return (short) ((blockposition.x & 15) << 8 | (blockposition.z & 15) << 4 | blockposition.y & 15); // Paper - simplify/inline ++ return (short) ((blockposition.getX() & 15) << 8 | (blockposition.getZ() & 15) << 4 | blockposition.getY() & 15); // Paper - simplify/inline } public static int c(int i) { -@@ -60,7 +64,7 @@ public class SectionPosition extends BaseBlockPosition { - } - - public static int b(long i) { -- return (int) (i << 0 >> 42); -+ return (int) (i >> 42); // Paper - } - - public static int c(long i) { -@@ -71,44 +75,46 @@ public class SectionPosition extends BaseBlockPosition { - return (int) (i << 22 >> 42); - } - -- public int a() { -- return this.getX(); -+ public final int a() { // Paper -+ return x; // Paper - } - -- public int b() { -- return this.getY(); -+ public final int b() { // Paper -+ return y; // Paper - } - -- public int c() { -- return this.getZ(); -+ public final int c() { // Paper -+ return z; // Paper +@@ -83,16 +87,16 @@ public class SectionPosition extends BaseBlockPosition { + return this.getZ(); } - public int d() { - return this.a() << 4; + public final int d() { // Paper -+ return x << 4; // Paper ++ return this.getX() << 4; // Paper } - public int e() { - return this.b() << 4; + public final int e() { // Paper -+ return y << 4; // Paper ++ return this.getY() << 4; // Paper } - public int f() { - return this.c() << 4; + public final int f() { // Paper -+ return z << 4; // Paper ++ return this.getZ() << 4; // Paper } -- public int g() { -- return (this.a() << 4) + 15; -+ public final int g() { // Paper -+ return (x << 4) + 15; // Paper - } - -- public int h() { -- return (this.b() << 4) + 15; -+ public final int h() { // Paper -+ return (y << 4) + 15; // Paper - } - -- public int r() { -- return (this.c() << 4) + 15; -+ public final int r() { // Paper -+ return (z << 4) + 15; // Paper + public int g() { +@@ -107,8 +111,10 @@ public class SectionPosition extends BaseBlockPosition { + return (this.c() << 4) + 15; } + public static long blockToSection(long i) { return e(i); } // Paper - OBFHELPER @@ -183,16 +146,7 @@ index ca3f63f5e5e4e926de562b4bfbbf72ad8a6b943f..22bc96f97d22e0748110982e4b1ff850 } public static long f(long i) { -@@ -116,7 +122,7 @@ public class SectionPosition extends BaseBlockPosition { - } - - public BlockPosition s() { -- return new BlockPosition(c(this.a()), c(this.b()), c(this.c())); -+ return new BlockPosition(x << 4, y << 4, z << 4); // Paper - } - - public BlockPosition t() { -@@ -129,36 +135,30 @@ public class SectionPosition extends BaseBlockPosition { +@@ -129,17 +135,18 @@ public class SectionPosition extends BaseBlockPosition { return new ChunkCoordIntPair(this.a(), this.c()); } @@ -212,14 +166,13 @@ index ca3f63f5e5e4e926de562b4bfbbf72ad8a6b943f..22bc96f97d22e0748110982e4b1ff850 + return (((long) i & 4194303L) << 42) | (((long) j & 1048575L)) | (((long) k & 4194303L) << 20); // Paper - Simplify to reduce instruction count } - public long v() { + public long s() { - return b(this.a(), this.b(), this.c()); -+ return (((long) x & 4194303L) << 42) | (((long) y & 1048575L)) | (((long) z & 4194303L) << 20); // Paper - Simplify to reduce instruction count ++ return (((long) getX() & 4194303L) << 42) | (((long) getY() & 1048575L)) | (((long) getZ() & 4194303L) << 20); // Paper - Simplify to reduce instruction count } - public Stream w() { -- return BlockPosition.a(this.d(), this.e(), this.f(), this.g(), this.h(), this.r()); -+ return BlockPosition.a(x << 4, y << 4, z << 4, (x << 4) + 15, (y << 4) + 15, (z << 4) + 15); // Paper - simplify/inline + public Stream t() { +@@ -147,18 +154,11 @@ public class SectionPosition extends BaseBlockPosition { } public static Stream a(SectionPosition sectionposition, int i) { @@ -228,7 +181,7 @@ index ca3f63f5e5e4e926de562b4bfbbf72ad8a6b943f..22bc96f97d22e0748110982e4b1ff850 - int l = sectionposition.c(); - - return a(j - i, k - i, l - i, j + i, k + i, l + i); -+ return a(sectionposition.x - i, sectionposition.y - i, sectionposition.z - i, sectionposition.x + i, sectionposition.y + i, sectionposition.z + i); // Paper - simplify/inline ++ return a(sectionposition.getX() - i, sectionposition.getY() - i, sectionposition.getZ() - i, sectionposition.getX() + i, sectionposition.getY() + i, sectionposition.getZ() + i); // Paper - simplify/inline } public static Stream b(ChunkCoordIntPair chunkcoordintpair, int i) { diff --git a/Spigot-Server-Patches/0536-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0504-Optimize-Light-Engine.patch similarity index 88% rename from Spigot-Server-Patches/0536-Optimize-Light-Engine.patch rename to Spigot-Server-Patches/0504-Optimize-Light-Engine.patch index 56f8be81f9..3c31180a4f 100644 --- a/Spigot-Server-Patches/0536-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0504-Optimize-Light-Engine.patch @@ -24,24 +24,11 @@ Massive update to light to improve performance and chunk loading/generation. 7) Buffer non urgent tasks even if queueUpdate is called multiple times to improve efficiency. 8) Fix NPE risk that crashes server in getting nibble data -diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index d2207a2c95690de586ab2d181b64955a6d2ea70d..66244a9d0e253b3709df4ae2adcd21e44ebbfc90 100644 ---- a/src/main/java/net/minecraft/server/Block.java -+++ b/src/main/java/net/minecraft/server/Block.java -@@ -310,7 +310,7 @@ public class Block implements IMaterial { - return false; - } - -- @Deprecated -+ public final boolean canOcclude(IBlockData blockData) { return n(blockData); } @Deprecated // Paper - OBFHELPER - public final boolean n(IBlockData iblockdata) { - return this.j; - } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 8efe036be0c74a5ceb6a18e019c4a08a49a28693..7d50b94cb37ea921451af1baa47c8900e99b37e1 100644 +index 604e7004b659daed2844ba1a76bf09288ec549e5..ef980f9859d1d7d0d5e13d0d70e998055f92135e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1100,7 +1100,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -1044,7 +1044,7 @@ public class ChunkProviderServer extends IChunkProvider { if (ChunkProviderServer.this.tickDistanceManager()) { return true; } else { @@ -50,46 +37,6 @@ index 8efe036be0c74a5ceb6a18e019c4a08a49a28693..7d50b94cb37ea921451af1baa47c8900 return super.executeNext() || execChunkTask; // Paper } } finally { -diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 296b41bf36ee1ace5bd9db2b810bf926b5f5278f..b39554faf235b6f81c86542673dfb4508d4c3e5a 100644 ---- a/src/main/java/net/minecraft/server/IBlockData.java -+++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -24,6 +24,7 @@ public class IBlockData extends BlockDataAbstract implements - private final boolean e; - private final boolean isAir; // Paper - private final boolean isTicking; // Paper -+ private final boolean canOcclude; // Paper - - public IBlockData(Block block, ImmutableMap, Comparable> immutablemap) { - super(block, immutablemap); -@@ -31,6 +32,7 @@ public class IBlockData extends BlockDataAbstract implements - this.e = block.o(this); - this.isAir = this.getBlock().isAir(this); // Paper - this.isTicking = this.getBlock().isTicking(this); // Paper -+ this.canOcclude = this.getBlock().canOcclude(this); // Paper - } - - public void c() { -@@ -83,7 +85,7 @@ public class IBlockData extends BlockDataAbstract implements - return this.c == null || this.c.h; - } - -- public boolean g() { -+ public final boolean g() { // Paper - return this.e; - } - -@@ -151,8 +153,8 @@ public class IBlockData extends BlockDataAbstract implements - return this.c != null ? this.c.c : this.getBlock().k(this, iblockaccess, blockposition); - } - -- public boolean o() { -- return this.c != null ? this.c.b : this.getBlock().n(this); -+ public final boolean o() { // Paper -+ return canOcclude; // Paper - } - - public VoxelShape getShape(IBlockAccess iblockaccess, BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/LightEngineBlock.java b/src/main/java/net/minecraft/server/LightEngineBlock.java index 07fadc21ee12138b52cc77c50da536fec5b032f5..a61d0a27e9525505eedaec8cde44216e807eb9a8 100644 --- a/src/main/java/net/minecraft/server/LightEngineBlock.java @@ -264,10 +211,10 @@ index 2eb37fb5796d423a70fa7321899a19b6625bbecc..13d067f48647dea63ef1bf3a2a3e0868 if (l1 == i) { l1 = Long.MAX_VALUE; diff --git a/src/main/java/net/minecraft/server/LightEngineLayer.java b/src/main/java/net/minecraft/server/LightEngineLayer.java -index f72ff8495bcf704c15040676b95c51fecb72b73a..faa432779ec70c2c6b5fe7fe3523f171e26d3a5f 100644 +index 3e9731bcdd4c6370c11ffc93f9fafcaf60fe932b..b5d5dd1075fd6aabbfbbd60f219b76593fc54a76 100644 --- a/src/main/java/net/minecraft/server/LightEngineLayer.java +++ b/src/main/java/net/minecraft/server/LightEngineLayer.java -@@ -11,9 +11,9 @@ public abstract class LightEngineLayer, S e +@@ -11,10 +11,37 @@ public abstract class LightEngineLayer, S e protected final EnumSkyBlock b; protected final S c; private boolean f; @@ -277,9 +224,37 @@ index f72ff8495bcf704c15040676b95c51fecb72b73a..faa432779ec70c2c6b5fe7fe3523f171 - private final IBlockAccess[] h = new IBlockAccess[2]; + private final IChunkAccess[] h = new IChunkAccess[2]; // Paper ++ // Paper start - see fully commented out method below (look for Bedrock) ++ // optimized method with less branching for when scenarios arent needed. ++ // avoid using mutable version if can ++ protected final IBlockData getBlockOptimized(int x, int y, int z, MutableInt mutableint) { ++ IChunkAccess iblockaccess = this.a(x >> 4, z >> 4); ++ ++ if (iblockaccess == null) { ++ mutableint.setValue(16); ++ return Blocks.BEDROCK.getBlockData(); ++ } else { ++ this.pos.setValues(x, y, z); ++ IBlockData iblockdata = iblockaccess.getType(x, y, z); ++ mutableint.setValue(iblockdata.b(this.a.getWorld(), this.pos)); ++ return iblockdata.l() && iblockdata.e() ? iblockdata : Blocks.AIR.getBlockData(); ++ } ++ } ++ protected final IBlockData getBlockOptimized(int x, int y, int z) { ++ IChunkAccess iblockaccess = this.a(x >> 4, z >> 4); ++ ++ if (iblockaccess == null) { ++ return Blocks.BEDROCK.getBlockData(); ++ } else { ++ IBlockData iblockdata = iblockaccess.getType(x, y, z); ++ return iblockdata.l() && iblockdata.e() ? iblockdata : Blocks.AIR.getBlockData(); ++ } ++ } ++ // Paper end public LightEngineLayer(ILightAccess ilightaccess, EnumSkyBlock enumskyblock, S s0) { super(16, 256, 8192); -@@ -33,7 +33,7 @@ public abstract class LightEngineLayer, S e + this.a = ilightaccess; +@@ -33,7 +60,7 @@ public abstract class LightEngineLayer, S e } @Nullable @@ -288,7 +263,7 @@ index f72ff8495bcf704c15040676b95c51fecb72b73a..faa432779ec70c2c6b5fe7fe3523f171 long k = ChunkCoordIntPair.pair(i, j); for (int l = 0; l < 2; ++l) { -@@ -42,7 +42,7 @@ public abstract class LightEngineLayer, S e +@@ -42,7 +69,7 @@ public abstract class LightEngineLayer, S e } } @@ -297,7 +272,7 @@ index f72ff8495bcf704c15040676b95c51fecb72b73a..faa432779ec70c2c6b5fe7fe3523f171 for (int i1 = 1; i1 > 0; --i1) { this.g[i1] = this.g[i1 - 1]; -@@ -59,37 +59,64 @@ public abstract class LightEngineLayer, S e +@@ -59,37 +86,39 @@ public abstract class LightEngineLayer, S e Arrays.fill(this.h, (Object) null); } @@ -308,7 +283,31 @@ index f72ff8495bcf704c15040676b95c51fecb72b73a..faa432779ec70c2c6b5fe7fe3523f171 - } - - return Blocks.AIR.getBlockData(); -+ // Paper start - unused, optimized versions below, comment out to detect changes +- } else { +- int j = SectionPosition.a(BlockPosition.b(i)); +- int k = SectionPosition.a(BlockPosition.d(i)); +- IBlockAccess iblockaccess = this.a(j, k); +- +- if (iblockaccess == null) { +- if (mutableint != null) { +- mutableint.setValue(16); +- } +- +- return Blocks.BEDROCK.getBlockData(); +- } else { +- this.d.g(i); +- IBlockData iblockdata = iblockaccess.getType(this.d); +- boolean flag = iblockdata.l() && iblockdata.e(); +- +- if (mutableint != null) { +- mutableint.setValue(iblockdata.b(this.a.getWorld(), (BlockPosition) this.d)); +- } +- +- return flag ? iblockdata : Blocks.AIR.getBlockData(); +- } +- } +- } ++ // Paper start - comment out, see getBlockOptimized +// protected IBlockData a(long i, @Nullable MutableInt mutableint) { +// if (i == Long.MAX_VALUE) { +// if (mutableint != null) { @@ -330,7 +329,7 @@ index f72ff8495bcf704c15040676b95c51fecb72b73a..faa432779ec70c2c6b5fe7fe3523f171 +// } else { +// this.d.g(i); +// IBlockData iblockdata = iblockaccess.getType(this.d); -+// boolean flag = iblockdata.o() && iblockdata.g(); ++// boolean flag = iblockdata.l() && iblockdata.e(); +// +// if (mutableint != null) { +// mutableint.setValue(iblockdata.b(this.a.getWorld(), (BlockPosition) this.d)); @@ -340,56 +339,11 @@ index f72ff8495bcf704c15040676b95c51fecb72b73a..faa432779ec70c2c6b5fe7fe3523f171 +// } +// } +// } -+ // optimized method with less branching for when scenarios arent needed. -+ // avoid using mutable version if can -+ protected final IBlockData getBlockOptimized(int x, int y, int z, MutableInt mutableint) { -+ IChunkAccess iblockaccess = this.a(x >> 4, z >> 4); -+ -+ if (iblockaccess == null) { -+ mutableint.setValue(16); -+ return Blocks.BEDROCK.getBlockData(); - } else { -- int j = SectionPosition.a(BlockPosition.b(i)); -- int k = SectionPosition.a(BlockPosition.d(i)); -- IBlockAccess iblockaccess = this.a(j, k); -- -- if (iblockaccess == null) { -- if (mutableint != null) { -- mutableint.setValue(16); -- } -- -- return Blocks.BEDROCK.getBlockData(); -- } else { -- this.d.g(i); -- IBlockData iblockdata = iblockaccess.getType(this.d); -- boolean flag = iblockdata.o() && iblockdata.g(); -- -- if (mutableint != null) { -- mutableint.setValue(iblockdata.b(this.a.getWorld(), (BlockPosition) this.d)); -- } -+ this.pos.setValues(x, y, z); -+ IBlockData iblockdata = iblockaccess.getType(x, y, z); -+ mutableint.setValue(iblockdata.b(this.a.getWorld(), this.pos)); -+ return iblockdata.o() && iblockdata.g() ? iblockdata : Blocks.AIR.getBlockData(); -+ } -+ } -+ protected final IBlockData getBlockOptimized(int x, int y, int z) { -+ IChunkAccess iblockaccess = this.a(x >> 4, z >> 4); - -- return flag ? iblockdata : Blocks.AIR.getBlockData(); -- } -+ if (iblockaccess == null) { -+ return Blocks.BEDROCK.getBlockData(); -+ } else { -+ IBlockData iblockdata = iblockaccess.getType(x, y, z); -+ return iblockdata.o() && iblockdata.g() ? iblockdata : Blocks.AIR.getBlockData(); - } - } + // Paper end protected VoxelShape a(IBlockData iblockdata, long i, EnumDirection enumdirection) { - return iblockdata.o() ? iblockdata.a(this.a.getWorld(), this.d.g(i), enumdirection) : VoxelShapes.a(); -@@ -124,8 +151,9 @@ public abstract class LightEngineLayer, S e + return iblockdata.l() ? iblockdata.a(this.a.getWorld(), this.d.g(i), enumdirection) : VoxelShapes.a(); +@@ -124,8 +153,9 @@ public abstract class LightEngineLayer, S e return i == Long.MAX_VALUE ? 0 : 15 - this.c.i(i); } @@ -568,10 +522,10 @@ index f0b57784006752e031800a12a1a3c1a5945c636b..32b52ca2462fa206b1184025cb3837d6 if (i2 != j) { int l2; diff --git a/src/main/java/net/minecraft/server/LightEngineStorage.java b/src/main/java/net/minecraft/server/LightEngineStorage.java -index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c7816d73b6c 100644 +index b8b06c790adfa0246b1a6fb5eab1f63bf5ef8b0b..b98e60772bad7e06845b50fdc11e98c0ea775d3d 100644 --- a/src/main/java/net/minecraft/server/LightEngineStorage.java +++ b/src/main/java/net/minecraft/server/LightEngineStorage.java -@@ -20,42 +20,42 @@ public abstract class LightEngineStorage> e +@@ -20,9 +20,9 @@ public abstract class LightEngineStorage> e protected final LongSet c = new LongOpenHashSet(); protected final LongSet d = new LongOpenHashSet(); protected volatile M e_visible; protected final Object visibleUpdateLock = new Object(); // Paper - diff on change, should be "visible" - force compile fail on usage change @@ -583,6 +537,7 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 protected final Long2ObjectMap i = Long2ObjectMaps.synchronize(new Long2ObjectOpenHashMap()); private final LongSet n = new LongOpenHashSet(); private final LongSet o = new LongOpenHashSet(); +@@ -30,33 +30,33 @@ public abstract class LightEngineStorage> e protected volatile boolean j; protected LightEngineStorage(EnumSkyBlock enumskyblock, ILightAccess ilightaccess, M m0) { @@ -623,7 +578,7 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 return m0.c(i); } -@@ -69,27 +69,57 @@ public abstract class LightEngineStorage> e +@@ -70,27 +70,57 @@ public abstract class LightEngineStorage> e protected abstract int d(long i); protected int i(long i) { @@ -692,16 +647,16 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 } } } -@@ -121,17 +151,23 @@ public abstract class LightEngineStorage> e +@@ -122,17 +152,23 @@ public abstract class LightEngineStorage> e } if (k >= 2 && j != 2) { -- if (this.o.contains(i)) { -- this.o.remove(i); +- if (this.p.contains(i)) { +- this.p.remove(i); - } else { -+ if (!this.o.remove(i)) { // Paper - remove useless contains - credit to JellySquid -+ //this.o.remove(i); // Paper -+ //} else { // Pape ++ if (!this.p.remove(i)) { // Paper - remove useless contains - credit to JellySquid ++ //this.p.remove(i); // Paper ++ //} else { // Paper this.f.a(i, this.j(i)); this.g.add(i); this.k(i); @@ -723,7 +678,7 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 } } } -@@ -157,9 +193,9 @@ public abstract class LightEngineStorage> e +@@ -158,9 +194,9 @@ public abstract class LightEngineStorage> e return SectionPosition.e(j) == i; }); } else { @@ -736,7 +691,7 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 for (int i1 = 0; i1 < 16; ++i1) { for (int j1 = 0; j1 < 16; ++j1) { -@@ -186,7 +222,7 @@ public abstract class LightEngineStorage> e +@@ -187,7 +223,7 @@ public abstract class LightEngineStorage> e NibbleArray nibblearray; while (longiterator.hasNext()) { @@ -745,8 +700,8 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 this.a(lightenginelayer, i); NibbleArray nibblearray1 = (NibbleArray) this.i.remove(i); -@@ -204,48 +240,56 @@ public abstract class LightEngineStorage> e - longiterator = this.o.iterator(); +@@ -205,7 +241,7 @@ public abstract class LightEngineStorage> e + longiterator = this.p.iterator(); while (longiterator.hasNext()) { - i = (Long) longiterator.next(); @@ -754,16 +709,11 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 this.l(i); } - this.o.clear(); - this.j = false; -- ObjectIterator objectiterator = this.i.long2ObjectEntrySet().iterator(); -+ ObjectIterator> objectiterator = Long2ObjectMaps.fastIterator(this.i); // Paper - +@@ -216,12 +252,13 @@ public abstract class LightEngineStorage> e Entry entry; long j; + NibbleArray test = null; // Paper -+ LongSet propagating = new LongOpenHashSet(); // Paper - credit JellySquid for idea to move this up while (objectiterator.hasNext()) { entry = (Entry) objectiterator.next(); j = entry.getLongKey(); @@ -775,66 +725,48 @@ index b0b7544592981bcff22c8acee7230a211918ef28..f2575fb69714397bb8e1f9d402689c78 this.a(lightenginelayer, j); this.f.a(j, nibblearray); this.g.add(j); - } -+ if (!flag1) propagating.add(j); // Paper -+ objectiterator.remove(); // Paper - } - } - - this.f.c(); -- if (!flag1) { -- longiterator = this.i.keySet().iterator(); -+ if (!flag1) {// Paper - diff on change, change propagating add a few lines up -+ longiterator = propagating.iterator(); // Paper +@@ -234,14 +271,14 @@ public abstract class LightEngineStorage> e + longiterator = this.i.keySet().iterator(); while (longiterator.hasNext()) { - i = (Long) longiterator.next(); -- if (this.g(i)) { -- int k = SectionPosition.c(SectionPosition.b(i)); -- int l = SectionPosition.c(SectionPosition.c(i)); -- int i1 = SectionPosition.c(SectionPosition.d(i)); -+ // Paper start -+ i = longiterator.nextLong(); -+ if (true) { // don't check hasLight, this iterator is filtered already -+ int secX = (int) (i >> 42); -+ int secY = (int) (i << 44 >> 44); -+ int secZ = (int) (i << 22 >> 42); -+ int k = secX << 4; // baseX -+ int l = secY << 4; // baseY -+ int i1 = secZ << 4; // baseZ -+ // Paper end - EnumDirection[] aenumdirection = LightEngineStorage.k; - int j1 = aenumdirection.length; ++ i = longiterator.nextLong(); // Paper + this.b(lightenginelayer, i); + } + } else { + longiterator = this.n.iterator(); - for (int k1 = 0; k1 < j1; ++k1) { - EnumDirection enumdirection = aenumdirection[k1]; -- long l1 = SectionPosition.a(i, enumdirection); -- -- if (!this.i.containsKey(l1) && this.g(l1)) { -+ long l1 = SectionPosition.getAdjacentFromSectionPos(secX, secY, secZ, enumdirection); // Paper - avoid extra unpacking -+ if (!propagating.contains(l1) && this.g(l1)) { // Paper - use propagating - for (int i2 = 0; i2 < 16; ++i2) { - for (int j2 = 0; j2 < 16; ++j2) { - long k2; -@@ -287,6 +331,8 @@ public abstract class LightEngineStorage> e + while (longiterator.hasNext()) { +- i = (Long) longiterator.next(); ++ i = longiterator.nextLong(); // Paper + this.b(lightenginelayer, i); } } +@@ -262,15 +299,20 @@ public abstract class LightEngineStorage> e -+ // Paper start - moved above - Credit JellySquid for idea -+ /* - objectiterator = this.i.long2ObjectEntrySet().iterator(); - - while (objectiterator.hasNext()) { -@@ -295,7 +341,8 @@ public abstract class LightEngineStorage> e - if (this.g(j)) { - objectiterator.remove(); - } -- } -+ }*/ + private void b(LightEngineLayer lightenginelayer, long i) { + if (this.g(i)) { +- int j = SectionPosition.c(SectionPosition.b(i)); +- int k = SectionPosition.c(SectionPosition.c(i)); +- int l = SectionPosition.c(SectionPosition.d(i)); ++ // Paper start ++ int secX = (int) (i >> 42); ++ int secY = (int) (i << 44 >> 44); ++ int secZ = (int) (i << 22 >> 42); ++ int j = secX << 4; // baseX ++ int k = secY << 4; // baseY ++ int l = secZ << 4; // baseZ + // Paper end + EnumDirection[] aenumdirection = LightEngineStorage.k; + int i1 = aenumdirection.length; - } - } + for (int j1 = 0; j1 < i1; ++j1) { + EnumDirection enumdirection = aenumdirection[j1]; +- long k1 = SectionPosition.a(i, enumdirection); ++ long k1 = SectionPosition.getAdjacentFromSectionPos(secX, secY, secZ, enumdirection); // Paper - avoid extra unpacking + + if (!this.i.containsKey(k1) && this.g(k1)) { + for (int l1 = 0; l1 < 16; ++l1) { diff --git a/src/main/java/net/minecraft/server/LightEngineStorageArray.java b/src/main/java/net/minecraft/server/LightEngineStorageArray.java index 37c44a89f28c44915fcae5a7e2c4797b1c123723..549c2551c2b59730bf53a80f8706d388d96ad932 100644 --- a/src/main/java/net/minecraft/server/LightEngineStorageArray.java @@ -1095,7 +1027,7 @@ index 097f58e9ac3f4096d3b9dad75b6ebe76021fa92c..f744f62c93370d096c113f92ee81a823 lightenginelayer.a(Long.MAX_VALUE, l3, 15, false); } diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java -index 8776799de033f02b0f87e9ea7e4a4ce912e94dd4..9ef39f1f51f9960865f6418115b08e8d7de86509 100644 +index a9dc8466278f9ec2becbcb643e6e1c973df72b82..968a1f71a44122ef0c4236d4251497f0b813d3b9 100644 --- a/src/main/java/net/minecraft/server/LightEngineThreaded.java +++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java @@ -14,8 +14,98 @@ import org.apache.logging.log4j.Logger; @@ -1211,7 +1143,7 @@ index 8776799de033f02b0f87e9ea7e4a4ce912e94dd4..9ef39f1f51f9960865f6418115b08e8d @@ -111,8 +201,11 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable { private void a(int i, int j, IntSupplier intsupplier, LightEngineThreaded.Update lightenginethreaded_update, Runnable runnable) { - this.e.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile error + this.e.a(ChunkTaskQueueSorter.a(() -> { - this.c.add(Pair.of(lightenginethreaded_update, runnable)); - if (this.c.size() >= this.f) { + // Paper start @@ -1337,22 +1269,22 @@ index 8cedfdd820cc02a76607b53e0b054fc74654f907..a9795394c9b17f9f0ce4c4f9c8f51a48 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 69899c100dd86c6c4795013364472336327ce036..2edb4904d3071aa9de6517c375410b814a45cfbe 100644 +index 446c401b3139f8c6c0e70d883340f0140d94b752..a3bce8f13bf278af2d6870891daa9bf692b4e267 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -728,6 +728,7 @@ public class PlayerChunk { +@@ -716,6 +716,7 @@ public class PlayerChunk { ioPriority = com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGH_PRIORITY; } chunkMap.world.asyncChunkTaskManager.raisePriority(location.x, location.z, ioPriority); + chunkMap.world.getChunkProvider().getLightEngine().changePriority(location.pair(), getCurrentPriority(), priority); } if (getCurrentPriority() != priority) { - this.w.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority + this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 98adcb6390105a183d66975ed9659906b609ce08..201221df63d4ec8e704fee9126240891f2b1c37d 100644 +index e9703cee3b175b220917b83d80e9904b1af17abe..3b2c3d55ef7bd31d8562623fe40d76c9d4eee7c8 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -647,6 +647,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -653,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end } @@ -1361,10 +1293,10 @@ index 98adcb6390105a183d66975ed9659906b609ce08..201221df63d4ec8e704fee9126240891 return () -> { PlayerChunk playerchunk = this.getVisibleChunk(i); diff --git a/src/main/java/net/minecraft/server/ThreadedMailbox.java b/src/main/java/net/minecraft/server/ThreadedMailbox.java -index 8082569022384a3ba03fb4a6f1ae12b443598dcb..3db8073f5182fe4dd4c710b202afc323dfb9b2d2 100644 +index 35f4d2d9591e625ab0bbeab7b606761e74965eec..698d82dd736529a8cbfad5c6bed70ab97f0064bb 100644 --- a/src/main/java/net/minecraft/server/ThreadedMailbox.java +++ b/src/main/java/net/minecraft/server/ThreadedMailbox.java -@@ -93,7 +93,8 @@ public class ThreadedMailbox implements Mailbox, AutoCloseable, Runnable { +@@ -109,7 +109,8 @@ public class ThreadedMailbox implements Mailbox, AutoCloseable, Runnable { } @@ -1375,10 +1307,10 @@ index 8082569022384a3ba03fb4a6f1ae12b443598dcb..3db8073f5182fe4dd4c710b202afc323 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 49da7352dcee6c352904cabe8b5db0152c427029..46e261b6513b52f5562387b661de4a409ea515a3 100644 +index b79302b83921111d5fa32794babf1fa57b7bbcb1..bed2cbabc0ac921bfdc4c6e4a04973a5411ebaa0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -685,6 +685,7 @@ public class WorldServer extends World { +@@ -709,6 +709,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exit(); timings.chunkTicksBlocks.stopTiming(); // Paper diff --git a/Spigot-Server-Patches/0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 90% rename from Spigot-Server-Patches/0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 583c249a71..4738b38c7b 100644 --- a/Spigot-Server-Patches/0537-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c3f7717869c86d9ac6395615bceda324aea16b27..ecacb72b922927f06883b75e7d2cc1f904eb9f03 100644 +index 0746932a3191669052f15270f5c94efbce0bd0c2..0f4fca90fd6c3788a5762c96c344899cb1665466 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -682,4 +682,13 @@ public class PaperWorldConfig { +@@ -639,4 +639,13 @@ public class PaperWorldConfig { private void viewDistance() { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } @@ -35,7 +35,7 @@ index c3f7717869c86d9ac6395615bceda324aea16b27..ecacb72b922927f06883b75e7d2cc1f9 + } } diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 35a4999b2c34ae62cba042885db25dd1837cb127..9a84d1749cf00316f1acadc55d45426267a94827 100644 +index 4c4108705e9d25912e57a7b3c28b4f1abad58377..893c0085bca0a8d77a85dba1cc29f2dec96c56ec 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -176,6 +176,27 @@ public abstract class ChunkMapDistance { @@ -67,7 +67,7 @@ index 35a4999b2c34ae62cba042885db25dd1837cb127..9a84d1749cf00316f1acadc55d454262 if (arraysetsorted.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java -index 0d6e0f2ddaa85c04e626980591e9a78ac27fb42d..c79aa4a80a8a2288f7a50466abd677f388360ba1 100644 +index b5030d6f5d917ba33fb3c40903384fa7a56bc5f1..e41cb8613efc86499dfe3be36c9130ab6dc9b89e 100644 --- a/src/main/java/net/minecraft/server/Ticket.java +++ b/src/main/java/net/minecraft/server/Ticket.java @@ -9,11 +9,13 @@ public final class Ticket implements Comparable> { @@ -84,13 +84,7 @@ index 0d6e0f2ddaa85c04e626980591e9a78ac27fb42d..c79aa4a80a8a2288f7a50466abd677f3 } public int compareTo(Ticket ticket) { -@@ -57,12 +59,13 @@ public final class Ticket implements Comparable> { - return this.b; - } - -+ protected void setCurrentTick(long i) { a(i); } // Paper - OBFHELPER - protected void a(long i) { - this.d = i; +@@ -63,7 +65,7 @@ public final class Ticket implements Comparable> { } protected boolean b(long i) { diff --git a/Spigot-Server-Patches/0538-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 89% rename from Spigot-Server-Patches/0538-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to Spigot-Server-Patches/0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index 4ba303feae..7a51bfb672 100644 --- a/Spigot-Server-Patches/0538-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0506-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 894917c8891a951edb251f019529d0f7bec7037d..568aefdf698facfc36edacc9332e83196c0d80bc 100644 +index 7c1e50e57cdb62364369455ca21b41456e8a010f..94005471723187cba438670a7e52363959ad4d02 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -318,7 +318,7 @@ public final class CraftServer implements Server { +@@ -342,7 +342,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 894917c8891a951edb251f019529d0f7bec7037d..568aefdf698facfc36edacc9332e8319 minimumAPI = configuration.getString("settings.minimum-api"); loadIcon(); } -@@ -796,7 +796,7 @@ public final class CraftServer implements Server { +@@ -819,7 +819,7 @@ public final class CraftServer implements Server { waterAnimalSpawn = configuration.getInt("spawn-limits.water-animals"); ambientSpawn = configuration.getInt("spawn-limits.ambient"); warningState = WarningState.value(configuration.getString("settings.deprecated-verbose")); @@ -44,10 +44,10 @@ index 894917c8891a951edb251f019529d0f7bec7037d..568aefdf698facfc36edacc9332e8319 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 5992fdda8a5c66f77dbfca86d6261b98cce2b1e9..73ffc3c24d38c11982cb44bf0c08e761b9667cda 100644 +index 5ae74d0856f7fb4a7ee35e5d778d78fecaf99730..7096886c20e870061587860a663a184b21650246 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -399,9 +399,22 @@ public class CraftWorld implements World { +@@ -400,9 +400,22 @@ public class CraftWorld implements World { @Override public Chunk getChunkAt(int x, int z) { @@ -71,7 +71,7 @@ index 5992fdda8a5c66f77dbfca86d6261b98cce2b1e9..73ffc3c24d38c11982cb44bf0c08e761 @Override public Chunk getChunkAt(Block block) { Preconditions.checkArgument(block != null, "null block"); -@@ -475,7 +488,7 @@ public class CraftWorld implements World { +@@ -476,7 +489,7 @@ public class CraftWorld implements World { public boolean unloadChunkRequest(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot if (isChunkLoaded(x, z)) { @@ -80,7 +80,7 @@ index 5992fdda8a5c66f77dbfca86d6261b98cce2b1e9..73ffc3c24d38c11982cb44bf0c08e761 } return true; -@@ -552,10 +565,12 @@ public class CraftWorld implements World { +@@ -553,10 +566,12 @@ public class CraftWorld implements World { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot // Paper start - Optimize this method ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z); @@ -94,7 +94,7 @@ index 5992fdda8a5c66f77dbfca86d6261b98cce2b1e9..73ffc3c24d38c11982cb44bf0c08e761 if (immediate == null) { immediate = world.getChunkProvider().playerChunkMap.getUnloadingChunk(x, z); } -@@ -563,7 +578,7 @@ public class CraftWorld implements World { +@@ -564,7 +579,7 @@ public class CraftWorld implements World { if (!(immediate instanceof ProtoChunkExtension) && !(immediate instanceof net.minecraft.server.Chunk)) { return false; // not full status } @@ -103,7 +103,7 @@ index 5992fdda8a5c66f77dbfca86d6261b98cce2b1e9..73ffc3c24d38c11982cb44bf0c08e761 world.getChunkAt(x, z); // make sure we're at ticket level 32 or lower return true; } -@@ -590,7 +605,7 @@ public class CraftWorld implements World { +@@ -591,7 +606,7 @@ public class CraftWorld implements World { // we do this so we do not re-read the chunk data on disk } @@ -112,7 +112,7 @@ index 5992fdda8a5c66f77dbfca86d6261b98cce2b1e9..73ffc3c24d38c11982cb44bf0c08e761 world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -2489,6 +2504,7 @@ public class CraftWorld implements World { +@@ -2492,6 +2507,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/0506-Fix-CraftServer.unloadWorld-Leak.patch b/Spigot-Server-Patches/0506-Fix-CraftServer.unloadWorld-Leak.patch deleted file mode 100644 index fb1455d4f9..0000000000 --- a/Spigot-Server-Patches/0506-Fix-CraftServer.unloadWorld-Leak.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 8 May 2020 20:30:58 -0400 -Subject: [PATCH] Fix CraftServer.unloadWorld Leak - -The dimension manager was still registered which leaked the entire World - -diff --git a/src/main/java/net/minecraft/server/DimensionManager.java b/src/main/java/net/minecraft/server/DimensionManager.java -index 393bc4dc700bbf8653db0662c7957f676b0a647a..410ab224fbb05bfbf4aa847d69b150bfe75d32f6 100644 ---- a/src/main/java/net/minecraft/server/DimensionManager.java -+++ b/src/main/java/net/minecraft/server/DimensionManager.java -@@ -20,6 +20,15 @@ public class DimensionManager implements MinecraftSerializable { - private final boolean hasSkyLight; - private final GenLayerZoomer genLayerZoomer; - -+ // Paper start -+ public static void unregister(String s, DimensionManager dimensionmanager) { -+ if (dimensionmanager == OVERWORLD || dimensionmanager == NETHER || dimensionmanager == THE_END) { return; } // do not unregister the default worlds -+ MCUtil.MAIN_EXECUTOR.execute(() -> { -+ RegistryMaterials registry = (RegistryMaterials) IRegistry.DIMENSION_TYPE; -+ registry.deleteValue(new MinecraftKey(s), dimensionmanager); -+ }); -+ } -+ // Paper end - public static DimensionManager register(String s, DimensionManager dimensionmanager) { - return (DimensionManager) IRegistry.a(IRegistry.DIMENSION_TYPE, dimensionmanager.id, s, dimensionmanager); - } -diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index e8a48b9a4c999281869dfb85577c2b44d6e30eb7..5335e7acc85f0fe9699e5ed59e5aaae5f381347d 100644 ---- a/src/main/java/net/minecraft/server/RegistryID.java -+++ b/src/main/java/net/minecraft/server/RegistryID.java -@@ -9,12 +9,26 @@ import javax.annotation.Nullable; - public class RegistryID implements Registry { - - private static final Object a = null; -- private K[] b; -+ private K[] b; // Paper - diff below - private int[] c; -- private K[] d; -+ private K[] d; // Paper - diff below - private int e; - private int f; - private java.util.BitSet usedIds; // Paper -+ // Paper start -+ public void removeValue(K value) { -+ removeValue(value, this.b); -+ removeValue(value, this.d); -+ rehash(this.b.length); -+ } -+ public void removeValue(K value, K[] arr) { -+ for (int i = 0; i < arr.length; i++) { -+ K k = arr[i]; -+ if (k == value) { -+ arr[i] = null; -+ } -+ } -+ } - - public RegistryID(int i) { - i = (int) ((float) i / 0.8F); -@@ -58,6 +72,7 @@ public class RegistryID implements Registry { - return this.e; - } - -+ private void rehash(int i) { d(i); } // Paper - OBFHELPER - private void d(int i) { - K[] ak = this.b; - int[] aint = this.c; -diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java -index 8477febca23b575da21023b4d7c18bb679cf3b30..dcdd8d38dee89ae7ac404a431e51a61c50b6d45c 100644 ---- a/src/main/java/net/minecraft/server/RegistryMaterials.java -+++ b/src/main/java/net/minecraft/server/RegistryMaterials.java -@@ -22,18 +22,23 @@ public class RegistryMaterials extends IRegistryWritable { - private int V; - - public RegistryMaterials() {} -+ public T deleteValue(MinecraftKey minecraftkey, T value) { -+ this.b.removeValue(value); // Diff 1 -+ this.d = null; // Diff 2 -+ return this.c.remove(minecraftkey); // Diff 3 -+ } - - @Override - public V a(int i, MinecraftKey minecraftkey, V v0) { -- this.b.a(v0, i); -+ this.b.a(v0, i); // Paper - diff above 1 - Validate.notNull(minecraftkey); - Validate.notNull(v0); -- this.d = null; -+ this.d = null; // Diff 2 - if (this.c.containsKey(minecraftkey)) { - RegistryMaterials.LOGGER.debug("Adding duplicate key '{}' to registry", minecraftkey); - } - -- this.c.put(minecraftkey, v0); -+ this.c.put(minecraftkey, v0); // Paper - diff3 - if (this.V <= i) { - this.V = i + 1; - } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b89f99a66fe2ab9ad4c956c38c9e4b1d79716c9c..c2b7cb36052455eef2100a1924dc76a5921fa858 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -60,6 +60,7 @@ import net.minecraft.server.EntityPlayer; - import net.minecraft.server.EnumDifficulty; - import net.minecraft.server.EnumGamemode; - import net.minecraft.server.IRecipe; -+import net.minecraft.server.IRegistry; - import net.minecraft.server.Item; - import net.minecraft.server.ItemWorldMap; - import net.minecraft.server.Items; -@@ -1099,7 +1100,11 @@ public final class CraftServer implements Server { - } - - worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH)); -- console.worldServer.remove(handle.getWorldProvider().getDimensionManager()); -+ // Paper start -+ DimensionManager dimensionManager = handle.getWorldProvider().getDimensionManager(); -+ DimensionManager.unregister(world.getName().toLowerCase(java.util.Locale.ENGLISH), dimensionManager); -+ console.worldServer.remove(dimensionManager); -+ // Paper end - return true; - } - diff --git a/Spigot-Server-Patches/0539-Fix-missing-chunks-due-to-integer-overflow.patch b/Spigot-Server-Patches/0507-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 90% rename from Spigot-Server-Patches/0539-Fix-missing-chunks-due-to-integer-overflow.patch rename to Spigot-Server-Patches/0507-Fix-missing-chunks-due-to-integer-overflow.patch index 3bea36db8a..7554af844d 100644 --- a/Spigot-Server-Patches/0539-Fix-missing-chunks-due-to-integer-overflow.patch +++ b/Spigot-Server-Patches/0507-Fix-missing-chunks-due-to-integer-overflow.patch @@ -13,10 +13,10 @@ The fix for the issue is quite simple, casting chunk coordinates to longs allows the distance calculation to avoid overflow and work as intended. diff --git a/src/main/java/net/minecraft/server/WorldChunkManagerTheEnd.java b/src/main/java/net/minecraft/server/WorldChunkManagerTheEnd.java -index 985f54067073909f413a0c9bb574017bf6d177f3..1ba0f43702b6c576fa9251bef574b7d52406f2f1 100644 +index 3abf1a61dfdb89c6df9338bc4947a64be5c91e2f..631a028dd262476f257c382f488320fee42584cd 100644 --- a/src/main/java/net/minecraft/server/WorldChunkManagerTheEnd.java +++ b/src/main/java/net/minecraft/server/WorldChunkManagerTheEnd.java -@@ -36,7 +36,9 @@ public class WorldChunkManagerTheEnd extends WorldChunkManager { +@@ -50,7 +50,9 @@ public class WorldChunkManagerTheEnd extends WorldChunkManager { int l = j / 2; int i1 = i % 2; int j1 = j % 2; diff --git a/Spigot-Server-Patches/0540-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/Spigot-Server-Patches/0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from Spigot-Server-Patches/0540-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to Spigot-Server-Patches/0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/Spigot-Server-Patches/0541-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 84% rename from Spigot-Server-Patches/0541-Fix-piston-physics-inconsistency-MC-188840.patch rename to Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch index 91358261da..8e81d5690d 100644 --- a/Spigot-Server-Patches/0541-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch @@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840 This patch also fixes rail duping and carpet duping. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index f0284e81db3ab7c45018de2b446f2d8296df15c3..8444819f071b13e98ba07032520016a664b7b9bc 100644 +index 08f744ee5e83d317f872f9c48e2037a24327d76f..f9831b1ac15c9fa08c7201a43fe9f1824ddc03c3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -442,4 +442,9 @@ public class PaperConfig { +@@ -421,4 +421,9 @@ public class PaperConfig { consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions); } @@ -46,10 +46,10 @@ index f0284e81db3ab7c45018de2b446f2d8296df15c3..8444819f071b13e98ba07032520016a6 + } } diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index 39cd8ab5925ceb9494e0ac910c73338c24ecda2c..73ac83832121e0390b7c4649681fc247e3d8c30b 100644 +index 6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b..0fb6debc0cd5f522614f32f3df1b5f37a415a0f5 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java -@@ -376,12 +376,24 @@ public class BlockPiston extends BlockDirectional { +@@ -368,12 +368,24 @@ public class BlockPiston extends BlockDirectional { } for (k = list.size() - 1; k >= 0; --k) { @@ -63,25 +63,24 @@ index 39cd8ab5925ceb9494e0ac910c73338c24ecda2c..73ac83832121e0390b7c4649681fc247 blockposition3 = blockposition3.shift(enumdirection1); map.remove(blockposition3); world.setTypeAndData(blockposition3, (IBlockData) Blocks.MOVING_PISTON.getBlockData().set(BlockPiston.FACING, enumdirection), 68); -- world.setTileEntity(blockposition3, BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false)); + // Paper start - fix a variety of piston desync dupes + if (!allowDesync) { + iblockdata1 = world.getType(oldPos); + map.replace(oldPos, iblockdata1); + } -+ world.setTileEntity(blockposition3, BlockPistonMoving.a(allowDesync ? list1.get(k) : iblockdata1, enumdirection, flag, false)); + world.setTileEntity(blockposition3, BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false)); + if (!allowDesync) { + world.setTypeAndData(oldPos, Blocks.AIR.getBlockData(), 2 | 4 | 16 | 1024); // set air to prevent later physics updates from seeing this block + } + // Paper end - fix a variety of piston desync dupes - --j; - aiblockdata[j] = iblockdata1; + aiblockdata[j++] = iblockdata1; } + diff --git a/src/main/java/net/minecraft/server/TileEntityPiston.java b/src/main/java/net/minecraft/server/TileEntityPiston.java -index 489175abd8e582a3c082364fec357c4f061a22d7..d700e8281fe50b1c4131ac260ff6c0d0dd8412f0 100644 +index 5b941321a7fdc561e6b794a1dce5d600083c505d..e7b7e468fc874b0fbcd43f87d816a42420f9b05e 100644 --- a/src/main/java/net/minecraft/server/TileEntityPiston.java +++ b/src/main/java/net/minecraft/server/TileEntityPiston.java -@@ -275,7 +275,7 @@ public class TileEntityPiston extends TileEntity implements ITickable { +@@ -256,7 +256,7 @@ public class TileEntityPiston extends TileEntity implements ITickable { IBlockData iblockdata = Block.b(this.a, (GeneratorAccess) this.world, this.position); if (iblockdata.isAir()) { @@ -89,4 +88,4 @@ index 489175abd8e582a3c082364fec357c4f061a22d7..d700e8281fe50b1c4131ac260ff6c0d0 + this.world.setTypeAndData(this.position, this.a, com.destroystokyo.paper.PaperConfig.allowPistonDuplication ? 84 : (84 | 2)); // Paper - force notify (flag 2), it's possible the set type by the piston block (which doesn't notify) set this block to air Block.a(this.a, iblockdata, this.world, this.position, 3); } else { - if (iblockdata.b((IBlockState) BlockProperties.C) && (Boolean) iblockdata.get(BlockProperties.C)) { + if (iblockdata.b(BlockProperties.C) && (Boolean) iblockdata.get(BlockProperties.C)) { diff --git a/Spigot-Server-Patches/0509-MC-183249-Don-t-generate-Carving-Masks-BitSet-unless.patch b/Spigot-Server-Patches/0509-MC-183249-Don-t-generate-Carving-Masks-BitSet-unless.patch deleted file mode 100644 index 613fea34fe..0000000000 --- a/Spigot-Server-Patches/0509-MC-183249-Don-t-generate-Carving-Masks-BitSet-unless.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sat, 9 May 2020 12:11:47 -0400 -Subject: [PATCH] MC-183249: Don't generate Carving Masks BitSet unless needed - -This was using SIGNIFICANT amounts of memory allocating many -long[]'s for BitSets for every ProtoChunk in the cache that had -been unloaded and reloaded. - -This will result in a nice memory reduction. - -diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index fa893b14bcef9bab6891dea2c4375b09d74ac038..e625842e524f18e469f7695b27d52d4d04892266 100644 ---- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java -+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -472,7 +472,12 @@ public class ChunkRegionLoader { - for (int l = 0; l < k; ++l) { - WorldGenStage.Features worldgenstage_features = aworldgenstage_features[l]; - -- nbttagcompound3.setByteArray(worldgenstage_features.toString(), ichunkaccess.a(worldgenstage_features).toByteArray()); -+ // Paper start - don't create carving mask bitsets if not even at that chunk status yet -+ BitSet mask = protochunk.getCarvingMaskIfSet(worldgenstage_features); -+ if (mask != null) { -+ nbttagcompound3.setByteArray(worldgenstage_features.toString(), mask.toByteArray()); -+ } -+ // Paper end - } - - nbttagcompound1.set("CarvingMasks", nbttagcompound3); -diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index a78b240621e0407fff67b018224c39fc4f97f4e5..2eb14bbf888f5e5601441743cb7642da6ee1249c 100644 ---- a/src/main/java/net/minecraft/server/ProtoChunk.java -+++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -43,7 +43,8 @@ public class ProtoChunk implements IChunkAccess { - private final ProtoChunkTickList q; - private final ProtoChunkTickList r; - private long s; -- private final Map t; -+ private final Map t;public BitSet getCarvingMaskIfSet(WorldGenStage.Features worldgenstage_features) { return this.t.get(worldgenstage_features); } // Paper -+ // Paper end - private volatile boolean u; - private final World world; // Paper - Anti-Xray - Add world - diff --git a/Spigot-Server-Patches/0542-Fix-sand-duping.patch b/Spigot-Server-Patches/0510-Fix-sand-duping.patch similarity index 94% rename from Spigot-Server-Patches/0542-Fix-sand-duping.patch rename to Spigot-Server-Patches/0510-Fix-sand-duping.patch index a42ac1b7f3..6cf9476b0e 100644 --- a/Spigot-Server-Patches/0542-Fix-sand-duping.patch +++ b/Spigot-Server-Patches/0510-Fix-sand-duping.patch @@ -7,7 +7,7 @@ If the falling block dies during teleportation (entity#move), then we need to detect that by placing a check after the move. diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 6683f7c5f31b88187961335c5f708b8a4f77b5af..243a8c570dd7cc5b1b622ff130c7339f9bcfc79a 100644 +index 40ab0a1e5b8e31f1ef3b2444366784a65f034341..6697b94550054ebbc8d4b3761bd9f36eb7e4ba8a 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -64,6 +64,11 @@ public class EntityFallingBlock extends Entity { diff --git a/Spigot-Server-Patches/0543-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0511-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 86% rename from Spigot-Server-Patches/0543-Prevent-position-desync-in-playerconnection-causing-.patch rename to Spigot-Server-Patches/0511-Prevent-position-desync-in-playerconnection-causing-.patch index b5b0331a01..faf47ee8f1 100644 --- a/Spigot-Server-Patches/0543-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/Spigot-Server-Patches/0511-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f9cb87a3be35575ecf3362b10dc7fe5ebadb56ec..2109afc8ca0af636be2d7e7c041e3160448f4a38 100644 +index e34290011bb5d7bcfb677b70fdec1a525a082e0e..bcb0ea6704b185a41f92d6cab24e4cf4ff91ebbc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1080,6 +1080,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1097,6 +1097,11 @@ public class PlayerConnection implements PacketListenerPlayIn { } this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9)); @@ -26,6 +26,6 @@ index f9cb87a3be35575ecf3362b10dc7fe5ebadb56ec..2109afc8ca0af636be2d7e7c041e3160 + return; // ... thanks Mojang for letting move calls teleport across dimensions. + } + // Paper end - prevent position desync - this.player.onGround = packetplayinflying.b(); double d12 = d8; + d7 = d4 - this.player.locX(); diff --git a/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch new file mode 100644 index 0000000000..9fcd5db58b --- /dev/null +++ b/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Fri, 12 Jun 2020 22:25:11 -0700 +Subject: [PATCH] Fix enderdragon exp dupe + +Properly track death stage when unloading/loading in the +dragon + +diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java +index 43e3755f0fa75b5f72ec620f3f6647ef6bce38c5..3a37e481729abc890cb2f9884b8501f630c3cf32 100644 +--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java ++++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java +@@ -830,6 +830,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { + public void saveData(NBTTagCompound nbttagcompound) { + super.saveData(nbttagcompound); + nbttagcompound.setInt("DragonPhase", this.bN.a().getControllerPhase().b()); ++ nbttagcompound.setInt("Paper.DeathTick", this.deathAnimationTicks); // Paper + } + + @Override +@@ -838,6 +839,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { + if (nbttagcompound.hasKey("DragonPhase")) { + this.bN.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase"))); + } ++ this.deathAnimationTicks = nbttagcompound.getInt("Paper.DeathTick"); // Paper + + } + diff --git a/Spigot-Server-Patches/0545-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-Server-Patches/0513-Inventory-getHolder-method-without-block-snapshot.patch similarity index 92% rename from Spigot-Server-Patches/0545-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-Server-Patches/0513-Inventory-getHolder-method-without-block-snapshot.patch index 24e430cfb5..5ea9d7c297 100644 --- a/Spigot-Server-Patches/0545-Inventory-getHolder-method-without-block-snapshot.patch +++ b/Spigot-Server-Patches/0513-Inventory-getHolder-method-without-block-snapshot.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Inventory getHolder method without block snapshot diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 47827fbf1b80f88ffff8a252df10d70758c68703..57858327a4909fe536724371ac25f1cdede8c885 100644 +index a04213325b8266623b076f1233539512a0a0207f..726631348243566654d08abe9b5bf4ab3a2885f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -519,6 +519,13 @@ public class CraftInventory implements Inventory { +@@ -521,6 +521,13 @@ public class CraftInventory implements Inventory { return inventory.getOwner(); } diff --git a/Spigot-Server-Patches/0546-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0514-Expose-Arrow-getItemStack.patch similarity index 83% rename from Spigot-Server-Patches/0546-Expose-Arrow-getItemStack.patch rename to Spigot-Server-Patches/0514-Expose-Arrow-getItemStack.patch index 0d64b1ddaf..36652f2519 100644 --- a/Spigot-Server-Patches/0546-Expose-Arrow-getItemStack.patch +++ b/Spigot-Server-Patches/0514-Expose-Arrow-getItemStack.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose Arrow getItemStack diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 9c97edf9c9e9a8cdf029264f6b563090142c686b..e66f6b30069af5b9031c7c78a2bb3d3a645034c0 100644 +index c552962a9a2c8dac6794ef6698943c7d91ea45c4..6195a45e30d9a9d76e24fbc2493020917a8b87b9 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java -@@ -556,6 +556,8 @@ public abstract class EntityArrow extends Entity implements IProjectile { +@@ -520,6 +520,8 @@ public abstract class EntityArrow extends IProjectile { } } @@ -18,7 +18,7 @@ index 9c97edf9c9e9a8cdf029264f6b563090142c686b..e66f6b30069af5b9031c7c78a2bb3d3a @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -index 228e1327ca8821cc7e1542d2c09cdeb3365024a5..27897182559044d7079953e302ecfaa67918536a 100644 +index cf40d62492dc207815487d6f64e7d11892adc09b..5a0a78d7edead8712090dfb9c53ff904abf5b118 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -102,6 +102,13 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow { diff --git a/Spigot-Server-Patches/0547-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0515-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 92% rename from Spigot-Server-Patches/0547-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-Server-Patches/0515-Add-and-implement-PlayerRecipeBookClickEvent.patch index 13f7bfcdfa..d7f11254f3 100644 --- a/Spigot-Server-Patches/0547-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/Spigot-Server-Patches/0515-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2109afc8ca0af636be2d7e7c041e3160448f4a38..10e3bf60f13fbc8e26071bcfe8d19cbb635662a9 100644 +index bcb0ea6704b185a41f92d6cab24e4cf4ff91ebbc..92802301e420da4eb64b0d942f914ee30c9b784b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2476,9 +2476,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2515,9 +2515,15 @@ public class PlayerConnection implements PacketListenerPlayIn { PlayerConnectionUtils.ensureMainThread(packetplayinautorecipe, this, this.player.getWorldServer()); this.player.resetIdleTimer(); if (!this.player.isSpectator() && this.player.activeContainer.windowId == packetplayinautorecipe.b() && this.player.activeContainer.c(this.player) && this.player.activeContainer instanceof ContainerRecipeBook) { diff --git a/Spigot-Server-Patches/0548-Add-PrepareGrindstoneEvent.patch b/Spigot-Server-Patches/0516-Add-PrepareGrindstoneEvent.patch similarity index 93% rename from Spigot-Server-Patches/0548-Add-PrepareGrindstoneEvent.patch rename to Spigot-Server-Patches/0516-Add-PrepareGrindstoneEvent.patch index f0a00ab8ed..a6c0e1687b 100644 --- a/Spigot-Server-Patches/0548-Add-PrepareGrindstoneEvent.patch +++ b/Spigot-Server-Patches/0516-Add-PrepareGrindstoneEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PrepareGrindstoneEvent diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java -index ed88e208d00f3b19b5c5916cf87513ab511a5fb1..83cb0cd64c81eb35fa49eecff93b40f08e0a5606 100644 +index fe9a083b724a8657cac8462b3f44d3cc12a4db58..716304021f85a86a2f9492f5fb98e86bb7f089d2 100644 --- a/src/main/java/net/minecraft/server/ContainerGrindstone.java +++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java @@ -10,6 +10,10 @@ import org.bukkit.craftbukkit.inventory.CraftInventoryGrindstone; diff --git a/Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch deleted file mode 100644 index c15c5465f4..0000000000 --- a/Spigot-Server-Patches/0529-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sat, 23 May 2020 17:03:41 -0400 -Subject: [PATCH] Optimize sending packets to nearby locations (sounds/effects) - -Instead of using the entire world or player list, use the distance -maps to only iterate players who are even seeing the chunk the packet -is originating from. - -This will drastically cut down on packet sending cost for worlds with -lots of players in them. - -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f0fe864026dc10cd809f06dc9d4e823c21494a8d..5b634f2385f6dbb62cf3884daabded3870e8b8cc 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1031,11 +1031,30 @@ public abstract class PlayerList { - world = (WorldServer) entityhuman.world; - } - -- List players1 = world == null ? players : world.players; -- for (int j = 0; j < players1.size(); ++j) { -- EntityHuman entity = players1.get(j); -- if (!(entity instanceof EntityPlayer)) continue; -- EntityPlayer entityplayer = (EntityPlayer) entity; -+ // Paper start -+ if ((world == null || world.chunkProvider == null) && dimensionmanager != null) { -+ world = dimensionmanager.world; -+ } -+ if (world == null) { -+ LOGGER.error("Sending packet to invalid world" + entityhuman + " " + dimensionmanager + " - " + packet.getClass().getName(), new Throwable()); -+ return; // ??? shouldn't happen... -+ } -+ PlayerChunkMap chunkMap = world.chunkMap; -+ Object[] backingSet; -+ if (chunkMap == null) { -+ // Really shouldn't happen... -+ backingSet = world.players.toArray(); -+ } else { -+ com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet nearbyPlayers = chunkMap.playerViewDistanceBroadcastMap.getObjectsInRange(MCUtil.fastFloor(d0) >> 4, MCUtil.fastFloor(d2) >> 4); -+ if (nearbyPlayers == null) { -+ return; -+ } -+ backingSet = nearbyPlayers.getBackingSet(); -+ } -+ -+ for (Object object : backingSet) { -+ if (!(object instanceof EntityPlayer)) continue; -+ EntityPlayer entityplayer = (EntityPlayer) object; - // Paper end - - // CraftBukkit start - Test if player receiving packet can see the source of the packet -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index aaf85a1497de98522e3a01d4f81a267c4b0cc087..2c9acffe5a62af43ff4f4ccdb6962929d645e226 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -70,6 +70,7 @@ public class WorldServer extends World { - } - } - // Paper end -+ public final PlayerChunkMap chunkMap; // Paper - private final MinecraftServer server; - private final WorldNBTStorage dataManager; - public boolean savingDisabled; -@@ -208,6 +209,8 @@ public class WorldServer extends World { - }, gameprofilerfiller, false, gen, env); - this.pvpMode = minecraftserver.getPVP(); - worlddata.world = this; -+ if (chunkProvider == null) { chunkMap = null; new Throwable("World created without a ChunkProvider!").printStackTrace(); } // Paper - figure out if something weird happened here -+ else chunkMap = ((ChunkProviderServer) chunkProvider).playerChunkMap; - // CraftBukkit end - if (com.destroystokyo.paper.PaperConfig.useOptimizedTickList) { - this.nextTickListBlock = new com.destroystokyo.paper.server.ticklist.PaperTickList<>(this, (block) -> { // Paper - optimise TickListServer diff --git a/Spigot-Server-Patches/0544-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0544-Fix-enderdragon-exp-dupe.patch deleted file mode 100644 index f37907b171..0000000000 --- a/Spigot-Server-Patches/0544-Fix-enderdragon-exp-dupe.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Fri, 12 Jun 2020 22:25:11 -0700 -Subject: [PATCH] Fix enderdragon exp dupe - -Properly track death stage when unloading/loading in the -dragon - -diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index aecdaacfc7da560759bc513680d76f55820d5046..7daebfdab5c6e258d3e426643c0dbd374774ff5d 100644 ---- a/src/main/java/net/minecraft/server/EntityEnderDragon.java -+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -33,7 +33,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - public float bx; - public float by; - public boolean bz; -- public int bA; -+ public int bA; public final int getDeathTicks() { return this.bA; } public final void setDeathTicks(final int value) { this.bA = value; } // Paper - public float bB; - @Nullable - public EntityEnderCrystal currentEnderCrystal; -@@ -833,6 +833,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - public void b(NBTTagCompound nbttagcompound) { - super.b(nbttagcompound); - nbttagcompound.setInt("DragonPhase", this.bO.a().getControllerPhase().b()); -+ nbttagcompound.setInt("Paper.DeathTick", this.getDeathTicks()); // Paper - } - - @Override -@@ -841,6 +842,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - if (nbttagcompound.hasKey("DragonPhase")) { - this.bO.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase"))); - } -+ this.setDeathTicks(nbttagcompound.getInt("Paper.DeathTick")); // Paper - - } - diff --git a/Spigot-Server-Patches/0511-Implement-JellySquid-s-Entity-Collision-optimisation.patch b/removed/1.16/0511-Implement-JellySquid-s-Entity-Collision-optimisation.patch similarity index 100% rename from Spigot-Server-Patches/0511-Implement-JellySquid-s-Entity-Collision-optimisation.patch rename to removed/1.16/0511-Implement-JellySquid-s-Entity-Collision-optimisation.patch diff --git a/Spigot-Server-Patches/0512-Remove-some-Streams-usage-in-Entity-Collision.patch b/removed/1.16/0512-Remove-some-Streams-usage-in-Entity-Collision.patch similarity index 100% rename from Spigot-Server-Patches/0512-Remove-some-Streams-usage-in-Entity-Collision.patch rename to removed/1.16/0512-Remove-some-Streams-usage-in-Entity-Collision.patch diff --git a/Spigot-Server-Patches/0513-Ensure-Entity-AABB-s-are-never-invalid.patch b/removed/1.16/0513-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 100% rename from Spigot-Server-Patches/0513-Ensure-Entity-AABB-s-are-never-invalid.patch rename to removed/1.16/0513-Ensure-Entity-AABB-s-are-never-invalid.patch diff --git a/Spigot-Server-Patches/0516-Optimize-WorldBorder-collision-checks-and-air.patch b/removed/1.16/0516-Optimize-WorldBorder-collision-checks-and-air.patch similarity index 100% rename from Spigot-Server-Patches/0516-Optimize-WorldBorder-collision-checks-and-air.patch rename to removed/1.16/0516-Optimize-WorldBorder-collision-checks-and-air.patch diff --git a/Spigot-Server-Patches/0518-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/removed/1.16/0518-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from Spigot-Server-Patches/0518-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to removed/1.16/0518-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/Spigot-Server-Patches/0524-Add-permission-for-command-blocks.patch b/removed/1.16/0524-Add-permission-for-command-blocks.patch similarity index 100% rename from Spigot-Server-Patches/0524-Add-permission-for-command-blocks.patch rename to removed/1.16/0524-Add-permission-for-command-blocks.patch diff --git a/Spigot-Server-Patches/0530-Optimize-Villagers.patch b/removed/1.16/0530-Optimize-Villagers.patch similarity index 100% rename from Spigot-Server-Patches/0530-Optimize-Villagers.patch rename to removed/1.16/0530-Optimize-Villagers.patch diff --git a/work/Bukkit b/work/Bukkit index 6f3c5f4a5a..8edeffe67d 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 6f3c5f4a5a0867ef265df9d58b48bdc43079e3dd +Subproject commit 8edeffe67d1821afd48d16cd0ec2572251f24ee8 diff --git a/work/CraftBukkit b/work/CraftBukkit index 3f0c333870..d1fb662ec5 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 3f0c333870ba74705e98d19322174d6f0c10c900 +Subproject commit d1fb662ec53c4fd8bc718039b76a3e9a11346371 diff --git a/work/Spigot b/work/Spigot index 758abbeee4..8fc58f10ab 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 758abbeee4e12f5ff65470999dd9955d0ebb49cd +Subproject commit 8fc58f10ab171ca1979afa2065909214a0ffab32 From 68636aee7249e0784a1150799ba86bdeba8f0127 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 26 Jun 2020 02:29:44 -0400 Subject: [PATCH 13/95] Latest progress - restored patches, some issues resolved --- .../0002-Paper-config-files.patch | 5 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 37 +++ Spigot-Server-Patches/0004-MC-Utils.patch | 12 + .../0005-Paper-Metrics.patch | 6 +- ...to-current-Chunk-for-Entity-and-Bloc.patch | 4 +- Spigot-Server-Patches/0009-Timings-v2.patch | 21 +- .../0025-Entity-Origin-API.patch | 6 +- ...nfigurable-top-of-nether-void-damage.patch | 2 +- ...dd-configurable-portal-search-radius.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 2 +- ...ading-permissions.yml-before-plugins.patch | 4 +- .../0066-Add-World-Util-Methods.patch | 25 +- ...070-Use-a-Shared-Random-for-Entities.patch | 2 +- ...Location-getType-and-getBlockData-fo.patch | 2 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 19 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 6 +- ...egionFileCache-and-make-configurable.patch | 4 +- ...g-BlockPlaceEvent-triggering-physics.patch | 4 +- ...Remove-unused-World-Tile-Entity-List.patch | 18 +- .../0088-Configurable-Player-Collision.patch | 6 +- ...item-frames-performance-and-bug-fixe.patch | 4 +- ...-API-Replenishable-Lootables-Feature.patch | 2 +- ...y-scoreboard-teams-to-scoreboard.dat.patch | 4 +- ...2-Optional-TNT-doesn-t-move-in-water.patch | 2 +- ...r-redstone-torch-rapid-clock-removal.patch | 2 +- .../0106-Fix-Double-World-Add-issues.patch | 4 +- ...setting-for-proxy-online-mode-status.patch | 6 +- ...ptimise-BlockState-s-hashCode-equals.patch | 13 +- ...onfigurable-packet-in-spam-threshold.patch | 4 +- ...12-Configurable-flying-kick-messages.patch | 4 +- .../0113-Chunk-registration-fixes.patch | 4 +- ...3-Don-t-let-fishinghooks-use-portals.patch | 2 +- ...imize-World.isLoaded-BlockPosition-Z.patch | 2 +- ...llow-entities-to-ride-themselves-572.patch | 2 +- .../0139-Cap-Entity-Collisions.patch | 2 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- .../0157-Entity-fromMobSpawner.patch | 4 +- ...65-Fix-MC-117075-TE-Unload-Lag-Spike.patch | 4 +- ...-a-custom-authentication-servers-dow.patch | 4 +- ...dEffects-only-to-players-who-can-see.patch | 4 +- ...e-implementations-for-captured-block.patch | 8 +- .../0203-Player.setPlayerProfile-API.patch | 22 +- ...Make-player-data-saving-configurable.patch | 4 +- ...09-Flag-to-disable-the-channel-limit.patch | 6 +- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +- ...le-Alternative-LootPool-Luck-Formula.patch | 4 +- ...plement-EntityKnockbackByEntityEvent.patch | 67 ++++- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 4 +- ...to-disable-ender-dragon-legacy-check.patch | 20 +- .../0238-InventoryCloseEvent-Reason-API.patch | 12 +- ...nilla-entity-warnings-for-duplicates.patch | 4 +- ...-more-information-to-Entity.toString.patch | 2 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 16 +- ...t-armor-stands-from-doing-entity-loo.patch | 4 +- ...3-Vanished-players-don-t-have-rights.patch | 6 +- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 2 +- ...revent-Saving-Bad-entities-to-chunks.patch | 6 +- ...ead-Entities-in-entityList-iteration.patch | 8 +- ...nd-make-tab-spam-limits-configurable.patch | 4 +- .../0265-Add-hand-to-bucket-events.patch | 6 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 8 +- ...timize-BlockPosition-helper-methods.patch} | 0 ...tore-vanlla-default-mob-spawn-range.patch} | 0 ...-124320.patch => 0275-Fix-MC-124320.patch} | 0 ...tch => 0276-Slime-Pathfinder-Events.patch} | 0 ...e-speed-for-water-flowing-over-lava.patch} | 8 +- ...278-Optimize-CraftBlockData-Creation.patch | 49 ++++ ...-ray-tracing-methods-to-LivingEntity.patch | 4 +- ...e-attack-cooldown-methods-for-Player.patch | 8 +- .../0286-Improve-death-events.patch | 28 +- ...e-Biome-Mob-Lookups-for-Mob-Spawning.patch | 29 ++- .../0295-Optimize-Server-World-Map.patch | 242 ------------------ ....patch => 0295-PreSpawnerSpawnEvent.patch} | 0 ...rseException-in-Entity-and-TE-names.patch} | 0 ...=> 0297-Honor-EntityAgeable.ageLock.patch} | 0 ...le-connection-throttle-kick-message.patch} | 4 +- ...> 0299-Hook-into-CB-plugin-rewrites.patch} | 0 ...00-Allow-setting-the-vex-s-summoner.patch} | 0 ...I.patch => 0301-Add-sun-related-API.patch} | 4 +- ...Turtle-API.patch => 0302-Turtle-API.patch} | 9 +- ...her-worlds-for-shooter-of-projectil.patch} | 0 ...ator-target-events-and-improve-impl.patch} | 0 ...-Add-Velocity-IP-Forwarding-Support.patch} | 6 +- ...PI.patch => 0306-Add-more-Witch-API.patch} | 0 ...owned-for-Villager-Aggression-Config.patch | 19 ++ .../0308-Here-s-Johnny.patch | 38 +++ ...vent-players-from-moving-into-unloa.patch} | 4 +- ...0-Reset-players-airTicks-on-respawn.patch} | 2 +- ...after-profile-lookups-if-not-needed.patch} | 0 ...r-Thread-Pool-and-Thread-Priorities.patch} | 2 +- ...=> 0313-Optimize-World-Time-Updates.patch} | 2 +- ...tore-custom-InventoryHolder-support.patch} | 0 ...=> 0315-Use-Vanilla-Minecart-Speeds.patch} | 0 ...0316-Fix-SpongeAbsortEvent-handling.patch} | 0 ...-allow-digging-into-unloaded-chunks.patch} | 0 ...mits.patch => 0318-Book-Size-Limits.patch} | 4 +- ...ult-permission-message-configurable.patch} | 6 +- ...revent-rayTrace-from-loading-chunks.patch} | 0 ...-Large-Packets-disconnecting-client.patch} | 0 ...ntity-dismount-during-teleportation.patch} | 8 +- ...I.patch => 0323-Add-more-Zombie-API.patch} | 0 ...0324-Add-PlayerConnectionCloseEvent.patch} | 0 ...revent-Enderman-from-loading-chunks.patch} | 0 ...replace-OfflinePlayer-getLastPlayed.patch} | 10 +- ...tch => 0327-Fix-PlayerEditBookEvent.patch} | 0 ...ehicle-tracking-issue-on-disconnect.patch} | 0 ...nRetractEvent-for-all-empty-pistons.patch} | 0 ...remove-from-being-called-on-Players.patch} | 4 +- ...ent.patch => 0331-BlockDestroyEvent.patch} | 4 +- ...m-Shapeless-Custom-Crafting-Recipes.patch} | 0 ...h => 0333-Fix-sign-edit-memory-leak.patch} | 0 ... 0334-Limit-Client-Sign-length-more.patch} | 0 ...onvertSigns-boolean-every-sign-save.patch} | 0 ...Manager-and-add-advanced-packet-sup.patch} | 13 +- ...e-Oversized-Tile-Entities-in-chunks.patch} | 0 ...-Fix-Whitelist-On-Off-inconsistency.patch} | 0 ...t-tick-at-start-of-drowning-process.patch} | 0 ...40-Allow-Saving-of-Oversized-Chunks.patch} | 0 ...ggleEvent-when-whitelist-is-toggled.patch} | 0 ...42-Add-LivingEntity-getTargetEntity.patch} | 6 +- ...ngth-when-serialising-BungeeCord-te.patch} | 0 ...=> 0344-Entity-getEntitySpawnReason.patch} | 6 +- ...ty-Metadata-for-all-tracked-players.patch} | 0 ...46-Implement-PlayerPostRespawnEvent.patch} | 0 ...for-pickupDelay-breaks-picking-up-i.patch} | 0 ...-and-setters-for-EntityItem-owner-a.patch} | 0 ...ts.patch => 0349-Server-Tick-Events.patch} | 2 +- ...350-PlayerDeathEvent-getItemsToKeep.patch} | 0 ...Optimize-Captured-TileEntity-Lookup.patch} | 4 +- ...API.patch => 0352-Add-Heightmap-API.patch} | 4 +- ...> 0353-Mob-Spawner-API-Enhancements.patch} | 0 ...ayer-View-Distance-API-placeholders.patch} | 4 +- ...-to-changed-postToMainThread-method.patch} | 0 ...-item-frames-are-modified-MC-123450.patch} | 0 ...sPrimaryThread-and-MinecraftServer-.patch} | 2 +- ...-entity-loss-due-to-unloaded-chunks.patch} | 6 +- ... 0359-Duplicate-UUID-Resolve-Option.patch} | 10 +- ...60-improve-CraftWorld-isChunkLoaded.patch} | 0 ...e-Keep-Spawn-Loaded-range-per-world.patch} | 12 +- ...ityAreaEffectCloud-from-going-negat.patch} | 0 ....patch => 0363-ChunkMapDistance-CME.patch} | 0 ...0364-Implement-CraftBlockSoundGroup.patch} | 0 ...d.patch => 0365-Chunk-debug-command.patch} | 4 +- ...ptions-from-dispenser-entity-spawns.patch} | 0 ...67-Fix-World-isChunkGenerated-calls.patch} | 0 ...te-location-if-we-failed-to-read-it.patch} | 0 ...aletteBlock-instead-of-ReentrantLoc.patch} | 0 ...ch => 0370-incremental-chunk-saving.patch} | 20 +- ...0-Anti-Xray.patch => 0371-Anti-Xray.patch} | 16 +- ...l-Spawned-mobs-towards-natural-spaw.patch} | 4 +- ...urable-projectile-relative-velocity.patch} | 4 +- ...being-ticked-when-notifying-navigat.patch} | 6 +- ...h => 0375-offset-item-frame-ticking.patch} | 0 ...pper-searches-if-there-are-no-items.patch} | 0 ...7-Asynchronous-chunk-IO-and-loading.patch} | 33 ++- ...tChunkIfLoadedImmediately-in-places.patch} | 12 +- ...ads.patch => 0379-Reduce-sync-loads.patch} | 12 +- ...ement-alternative-item-despawn-rate.patch} | 4 +- ...f-we-have-a-custom-Bukkit-generator.patch} | 2 +- ...-158900.patch => 0382-Fix-MC-158900.patch} | 0 ...ment-optional-per-player-mob-spawns.patch} | 4 +- ...event-consuming-the-wrong-itemstack.patch} | 8 +- ...ssanger-entities-once-from-spawners.patch} | 0 ... => 0386-Fix-nether-portal-creation.patch} | 0 ...gs.patch => 0387-Generator-Settings.patch} | 4 +- ...-161754.patch => 0388-Fix-MC-161754.patch} | 0 ...e-improvement-for-Chunk.getEntities.patch} | 0 ...anging-entities-that-are-not-ItemFr.patch} | 0 ...91-Expose-the-internal-current-tick.patch} | 0 ...sneak-when-changing-worlds-MC-10657.patch} | 0 ...-option-to-disable-pillager-patrols.patch} | 4 +- ...r-when-player-hand-set-to-empty-typ.patch} | 4 +- ...=> 0395-PlayerLaunchProjectileEvent.patch} | 0 ...tMagicNumbers.isSupportedApiVersion.patch} | 0 ...k-loads-when-villagers-try-to-find-.patch} | 0 ...656-Fix-Follow-Range-Initial-Target.patch} | 4 +- ...pers.patch => 0399-Optimize-Hoppers.patch} | 14 +- ...ayerDeathEvent-shouldDropExperience.patch} | 0 ...ading-chunks-checking-hive-position.patch} | 0 ...hunks-from-Hoppers-and-other-things.patch} | 0 ...ializing-mismatching-chunk-coordina.patch} | 0 ...imise-IEntityAccess-getPlayerByUUID.patch} | 4 +- ...405-Fix-items-not-falling-correctly.patch} | 0 ...patch => 0406-Lag-compensate-eating.patch} | 12 +- ...ize-call-to-getFluid-for-explosions.patch} | 0 ...-in-stack-not-having-effects-when-d.patch} | 0 ...=> 0409-Entity-Activation-Range-2.0.patch} | 26 +- ...Add-effect-to-block-break-naturally.patch} | 0 ...=> 0411-Tracking-Range-Improvements.patch} | 0 ...-items-vanishing-through-end-portal.patch} | 2 +- ...et-gravity-in-void.-Fixes-MC-167279.patch} | 0 ...-getChunkAt-calls-for-loaded-chunks.patch} | 2 +- ...w-overriding-the-java-version-check.patch} | 0 ...tch => 0416-Add-ThrownEggHatchEvent.patch} | 0 ... 0417-Optimise-random-block-ticking.patch} | 14 +- ...p-API.patch => 0418-Entity-Jump-API.patch} | 4 +- ...-to-nerf-pigmen-from-nether-portals.patch} | 6 +- ... => 0420-Make-the-GUI-graph-fancier.patch} | 2 +- ...21-add-hand-to-BlockMultiPlaceEvent.patch} | 0 ...2-Prevent-teleporting-dead-entities.patch} | 0 ...ipwire-hook-placement-before-update.patch} | 0 ...o-allow-iron-golems-to-spawn-in-air.patch} | 2 +- ...chance-of-villager-zombie-infection.patch} | 4 +- ...tch => 0426-Optimise-Chunk-getFluid.patch} | 0 ...mise-TickListServer-by-rewriting-it.patch} | 10 +- ...pawn-settings-and-per-player-option.patch} | 4 +- ...e-Entity-is-never-double-registered.patch} | 10 +- ...ring-entities-from-unloading-chunks.patch} | 4 +- ...nections-shouldn-t-hold-up-shutdown.patch} | 0 ...ow-bees-to-load-chunks-for-beehives.patch} | 0 ...PlayerChunkMap-adds-crashing-server.patch} | 6 +- ...timize-Collision-to-not-load-chunks.patch} | 2 +- ...tch => 0435-Don-t-tick-dead-players.patch} | 0 ...-Player-s-shouldn-t-be-able-to-move.patch} | 0 ...unkMap-memory-use-for-visibleChunks.patch} | 0 ...h => 0438-Increase-Light-Queue-Size.patch} | 6 +- ...sks-Speed-up-processing-of-chunk-lo.patch} | 22 +- ...ove-existing-players-to-world-spawn.patch} | 0 ...Add-tick-times-API-and-mspt-command.patch} | 10 +- ...42-Expose-MinecraftServer-isRunning.patch} | 0 ...dd-Raw-Byte-ItemStack-Serialization.patch} | 0 ...4-Remove-streams-from-Mob-AI-System.patch} | 0 ...ons-until-after-entity-ticking-is-d.patch} | 4 +- ... => 0446-Async-command-map-building.patch} | 0 ...h => 0447-Improved-Watchdog-Support.patch} | 10 +- ....patch => 0448-Optimize-Pathfinding.patch} | 0 ...9-Reduce-Either-Optional-allocation.patch} | 0 ...450-Remove-streams-from-PairedQueue.patch} | 0 ...-memory-footprint-of-NBTTagCompound.patch} | 0 ...ent-opening-inventories-when-frozen.patch} | 0 ...53-Optimise-ArraySetSorted-removeIf.patch} | 0 ...entity-collision-code-if-not-needed.patch} | 4 +- ...mise-entity-hard-collision-checking.patch} | 6 +- ...viderServer-s-chunk-level-checking-.patch} | 0 ...teleport-command-to-valid-locations.patch} | 0 ...Implement-Player-Client-Options-API.patch} | 6 +- ...Chunk-Post-Processing-deadlock-risk.patch} | 0 ...ayer-is-attempted-to-be-removed-fro.patch} | 0 ...1-Broadcast-join-message-to-console.patch} | 0 ...-Broken-behavior-of-PlayerJoinEvent.patch} | 0 ...oad-Chunks-for-Login-Asynchronously.patch} | 2 +- ...awn-point-if-spawn-in-unloaded-worl.patch} | 2 +- ...layerAttackEntityCooldownResetEvent.patch} | 4 +- ...llbacks-to-schedule-for-Callback-Ex.patch} | 0 ...-fire-BlockFade-on-worldgen-threads.patch} | 0 ...tom-creative-and-insomniac-controls.patch} | 4 +- ...-duplication-issues-and-teleport-is.patch} | 8 +- ...0470-Implement-Brigadier-Mojang-API.patch} | 0 ...patch => 0471-Villager-Restocks-API.patch} | 0 ...ickItem-Packet-and-kick-for-invalid.patch} | 0 ...n.patch => 0473-Expose-game-version.patch} | 0 ...0474-Sync-position-on-teleportation.patch} | 0 ...> 0475-Optimize-Voxel-Shape-Merging.patch} | 0 ...per-thread-native-byte-buffer-cache.patch} | 0 ...atch => 0477-Implement-Mob-Goal-API.patch} | 0 ...ance-map-to-optimise-entity-tracker.patch} | 8 +- ...isOutsideRange-to-use-distance-maps.patch} | 0 ...e-operations-for-updating-light-dat.patch} | 0 ...o-Tick-view-distance-implementation.patch} | 8 +- ...=> 0482-Add-villager-reputation-API.patch} | 0 ...and.patch => 0483-Fix-Light-Command.patch} | 10 +- ...-Fix-PotionEffect-ignores-icon-flag.patch} | 0 ...brigadier-child-sorting-performance.patch} | 0 ...ock-unless-actually-showing-the-mes.patch} | 0 ...API.patch => 0487-Potential-bed-API.patch} | 0 ...ait-for-Async-Tasks-during-shutdown.patch} | 2 +- ...er-respects-game-and-entity-rules-f.patch} | 0 ...nd-End-Portal-Frames-from-being-des.patch} | 14 +- ...e-NibbleArray-to-use-pooled-buffers.patch} | 25 +- ...leInt-allocations-from-light-engine.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 0 ...> 0494-Ensure-safe-gateway-teleport.patch} | 0 ...-for-console-having-all-permissions.patch} | 4 +- ...und-for-Client-Lag-Spikes-MC-162253.patch} | 0 ...-Priority-Urgency-System-for-Chunks.patch} | 6 +- ...n-Full-Status-Chunk-NBT-Memory-Leak.patch} | 0 ...packets-to-nearby-locations-sounds-.patch} | 0 ...prove-Chunk-Status-Transition-Speed.patch} | 0 ...x-villager-trading-demand-MC-163962.patch} | 0 ... => 0502-Maps-shouldn-t-load-chunks.patch} | 0 ...okup-for-Treasure-Maps-Fixes-lag-fr.patch} | 4 +- ...Optimize-Bit-Operations-by-inlining.patch} | 0 ...patch => 0505-Optimize-Light-Engine.patch} | 4 +- ...nk-Unloads-based-on-Player-Movement.patch} | 4 +- ...Plugin-Tickets-to-API-Chunk-Methods.patch} | 0 ...sing-chunks-due-to-integer-overflow.patch} | 0 ...r-runTaskTimerAsynchronously-Plugin.patch} | 0 ...ton-physics-inconsistency-MC-188840.patch} | 4 +- ...uping.patch => 0511-Fix-sand-duping.patch} | 0 ...desync-in-playerconnection-causing-.patch} | 0 ...ch => 0513-Fix-enderdragon-exp-dupe.patch} | 0 ...older-method-without-block-snapshot.patch} | 0 ...h => 0515-Expose-Arrow-getItemStack.patch} | 0 ...mplement-PlayerRecipeBookClickEvent.patch} | 0 ... => 0517-Add-PrepareGrindstoneEvent.patch} | 0 ...Allow-disabling-armour-stand-ticking.patch | 126 ++++++++- 296 files changed, 881 insertions(+), 743 deletions(-) rename Spigot-Server-Patches/{0274-Optimize-BlockPosition-helper-methods.patch => 0273-Optimize-BlockPosition-helper-methods.patch} (100%) rename Spigot-Server-Patches/{0275-Restore-vanlla-default-mob-spawn-range.patch => 0274-Restore-vanlla-default-mob-spawn-range.patch} (100%) rename Spigot-Server-Patches/{0276-Fix-MC-124320.patch => 0275-Fix-MC-124320.patch} (100%) rename Spigot-Server-Patches/{0277-Slime-Pathfinder-Events.patch => 0276-Slime-Pathfinder-Events.patch} (100%) rename Spigot-Server-Patches/{0278-Configurable-speed-for-water-flowing-over-lava.patch => 0277-Configurable-speed-for-water-flowing-over-lava.patch} (90%) create mode 100644 Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch delete mode 100644 Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch rename Spigot-Server-Patches/{0296-PreSpawnerSpawnEvent.patch => 0295-PreSpawnerSpawnEvent.patch} (100%) rename Spigot-Server-Patches/{0297-Catch-JsonParseException-in-Entity-and-TE-names.patch => 0296-Catch-JsonParseException-in-Entity-and-TE-names.patch} (100%) rename Spigot-Server-Patches/{0298-Honor-EntityAgeable.ageLock.patch => 0297-Honor-EntityAgeable.ageLock.patch} (100%) rename Spigot-Server-Patches/{0299-Configurable-connection-throttle-kick-message.patch => 0298-Configurable-connection-throttle-kick-message.patch} (94%) rename Spigot-Server-Patches/{0300-Hook-into-CB-plugin-rewrites.patch => 0299-Hook-into-CB-plugin-rewrites.patch} (100%) rename Spigot-Server-Patches/{0301-Allow-setting-the-vex-s-summoner.patch => 0300-Allow-setting-the-vex-s-summoner.patch} (100%) rename Spigot-Server-Patches/{0302-Add-sun-related-API.patch => 0301-Add-sun-related-API.patch} (92%) rename Spigot-Server-Patches/{0303-Turtle-API.patch => 0302-Turtle-API.patch} (95%) rename Spigot-Server-Patches/{0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch => 0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch} (100%) rename Spigot-Server-Patches/{0305-Call-player-spectator-target-events-and-improve-impl.patch => 0304-Call-player-spectator-target-events-and-improve-impl.patch} (100%) rename Spigot-Server-Patches/{0306-Add-Velocity-IP-Forwarding-Support.patch => 0305-Add-Velocity-IP-Forwarding-Support.patch} (98%) rename Spigot-Server-Patches/{0307-Add-more-Witch-API.patch => 0306-Add-more-Witch-API.patch} (100%) create mode 100644 Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch create mode 100644 Spigot-Server-Patches/0308-Here-s-Johnny.patch rename Spigot-Server-Patches/{0308-Add-option-to-prevent-players-from-moving-into-unloa.patch => 0309-Add-option-to-prevent-players-from-moving-into-unloa.patch} (96%) rename Spigot-Server-Patches/{0309-Reset-players-airTicks-on-respawn.patch => 0310-Reset-players-airTicks-on-respawn.patch} (93%) rename Spigot-Server-Patches/{0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch => 0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch} (100%) rename Spigot-Server-Patches/{0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch => 0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch} (97%) rename Spigot-Server-Patches/{0312-Optimize-World-Time-Updates.patch => 0313-Optimize-World-Time-Updates.patch} (96%) rename Spigot-Server-Patches/{0313-Restore-custom-InventoryHolder-support.patch => 0314-Restore-custom-InventoryHolder-support.patch} (100%) rename Spigot-Server-Patches/{0314-Use-Vanilla-Minecart-Speeds.patch => 0315-Use-Vanilla-Minecart-Speeds.patch} (100%) rename Spigot-Server-Patches/{0315-Fix-SpongeAbsortEvent-handling.patch => 0316-Fix-SpongeAbsortEvent-handling.patch} (100%) rename Spigot-Server-Patches/{0316-Don-t-allow-digging-into-unloaded-chunks.patch => 0317-Don-t-allow-digging-into-unloaded-chunks.patch} (100%) rename Spigot-Server-Patches/{0317-Book-Size-Limits.patch => 0318-Book-Size-Limits.patch} (96%) rename Spigot-Server-Patches/{0318-Make-the-default-permission-message-configurable.patch => 0319-Make-the-default-permission-message-configurable.patch} (91%) rename Spigot-Server-Patches/{0319-Prevent-rayTrace-from-loading-chunks.patch => 0320-Prevent-rayTrace-from-loading-chunks.patch} (100%) rename Spigot-Server-Patches/{0320-Handle-Large-Packets-disconnecting-client.patch => 0321-Handle-Large-Packets-disconnecting-client.patch} (100%) rename Spigot-Server-Patches/{0321-force-entity-dismount-during-teleportation.patch => 0322-force-entity-dismount-during-teleportation.patch} (94%) rename Spigot-Server-Patches/{0322-Add-more-Zombie-API.patch => 0323-Add-more-Zombie-API.patch} (100%) rename Spigot-Server-Patches/{0323-Add-PlayerConnectionCloseEvent.patch => 0324-Add-PlayerConnectionCloseEvent.patch} (100%) rename Spigot-Server-Patches/{0324-Prevent-Enderman-from-loading-chunks.patch => 0325-Prevent-Enderman-from-loading-chunks.patch} (100%) rename Spigot-Server-Patches/{0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch => 0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch} (94%) rename Spigot-Server-Patches/{0326-Fix-PlayerEditBookEvent.patch => 0327-Fix-PlayerEditBookEvent.patch} (100%) rename Spigot-Server-Patches/{0327-Workaround-for-vehicle-tracking-issue-on-disconnect.patch => 0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch} (100%) rename Spigot-Server-Patches/{0328-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch => 0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch} (100%) rename Spigot-Server-Patches/{0329-Block-Entity-remove-from-being-called-on-Players.patch => 0330-Block-Entity-remove-from-being-called-on-Players.patch} (89%) rename Spigot-Server-Patches/{0330-BlockDestroyEvent.patch => 0331-BlockDestroyEvent.patch} (92%) rename Spigot-Server-Patches/{0331-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch => 0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch} (100%) rename Spigot-Server-Patches/{0332-Fix-sign-edit-memory-leak.patch => 0333-Fix-sign-edit-memory-leak.patch} (100%) rename Spigot-Server-Patches/{0333-Limit-Client-Sign-length-more.patch => 0334-Limit-Client-Sign-length-more.patch} (100%) rename Spigot-Server-Patches/{0334-Don-t-check-ConvertSigns-boolean-every-sign-save.patch => 0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch} (100%) rename Spigot-Server-Patches/{0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => 0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (97%) rename Spigot-Server-Patches/{0336-Handle-Oversized-Tile-Entities-in-chunks.patch => 0337-Handle-Oversized-Tile-Entities-in-chunks.patch} (100%) rename Spigot-Server-Patches/{0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch => 0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch} (100%) rename Spigot-Server-Patches/{0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch => 0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch} (100%) rename Spigot-Server-Patches/{0339-Allow-Saving-of-Oversized-Chunks.patch => 0340-Allow-Saving-of-Oversized-Chunks.patch} (100%) rename Spigot-Server-Patches/{0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => 0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (100%) rename Spigot-Server-Patches/{0341-Add-LivingEntity-getTargetEntity.patch => 0342-Add-LivingEntity-getTargetEntity.patch} (96%) rename Spigot-Server-Patches/{0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch => 0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch} (100%) rename Spigot-Server-Patches/{0343-Entity-getEntitySpawnReason.patch => 0344-Entity-getEntitySpawnReason.patch} (95%) rename Spigot-Server-Patches/{0344-Update-entity-Metadata-for-all-tracked-players.patch => 0345-Update-entity-Metadata-for-all-tracked-players.patch} (100%) rename Spigot-Server-Patches/{0345-Implement-PlayerPostRespawnEvent.patch => 0346-Implement-PlayerPostRespawnEvent.patch} (100%) rename Spigot-Server-Patches/{0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => 0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (100%) rename Spigot-Server-Patches/{0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch => 0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch} (100%) rename Spigot-Server-Patches/{0348-Server-Tick-Events.patch => 0349-Server-Tick-Events.patch} (93%) rename Spigot-Server-Patches/{0349-PlayerDeathEvent-getItemsToKeep.patch => 0350-PlayerDeathEvent-getItemsToKeep.patch} (100%) rename Spigot-Server-Patches/{0350-Optimize-Captured-TileEntity-Lookup.patch => 0351-Optimize-Captured-TileEntity-Lookup.patch} (89%) rename Spigot-Server-Patches/{0351-Add-Heightmap-API.patch => 0352-Add-Heightmap-API.patch} (94%) rename Spigot-Server-Patches/{0352-Mob-Spawner-API-Enhancements.patch => 0353-Mob-Spawner-API-Enhancements.patch} (100%) rename Spigot-Server-Patches/{0353-Per-Player-View-Distance-API-placeholders.patch => 0354-Per-Player-View-Distance-API-placeholders.patch} (96%) rename Spigot-Server-Patches/{0354-Fix-CB-call-to-changed-postToMainThread-method.patch => 0355-Fix-CB-call-to-changed-postToMainThread-method.patch} (100%) rename Spigot-Server-Patches/{0355-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => 0356-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (100%) rename Spigot-Server-Patches/{0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch => 0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch} (95%) rename Spigot-Server-Patches/{0357-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch => 0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch} (92%) rename Spigot-Server-Patches/{0358-Duplicate-UUID-Resolve-Option.patch => 0359-Duplicate-UUID-Resolve-Option.patch} (96%) rename Spigot-Server-Patches/{0359-improve-CraftWorld-isChunkLoaded.patch => 0360-improve-CraftWorld-isChunkLoaded.patch} (100%) rename Spigot-Server-Patches/{0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch => 0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (96%) rename Spigot-Server-Patches/{0361-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch => 0362-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch} (100%) rename Spigot-Server-Patches/{0362-ChunkMapDistance-CME.patch => 0363-ChunkMapDistance-CME.patch} (100%) rename Spigot-Server-Patches/{0363-Implement-CraftBlockSoundGroup.patch => 0364-Implement-CraftBlockSoundGroup.patch} (100%) rename Spigot-Server-Patches/{0364-Chunk-debug-command.patch => 0365-Chunk-debug-command.patch} (99%) rename Spigot-Server-Patches/{0365-Catch-exceptions-from-dispenser-entity-spawns.patch => 0366-Catch-exceptions-from-dispenser-entity-spawns.patch} (100%) rename Spigot-Server-Patches/{0366-Fix-World-isChunkGenerated-calls.patch => 0367-Fix-World-isChunkGenerated-calls.patch} (100%) rename Spigot-Server-Patches/{0367-Show-blockstate-location-if-we-failed-to-read-it.patch => 0368-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename Spigot-Server-Patches/{0368-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch => 0369-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch} (100%) rename Spigot-Server-Patches/{0369-incremental-chunk-saving.patch => 0370-incremental-chunk-saving.patch} (94%) rename Spigot-Server-Patches/{0370-Anti-Xray.patch => 0371-Anti-Xray.patch} (99%) rename Spigot-Server-Patches/{0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => 0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (94%) rename Spigot-Server-Patches/{0372-Configurable-projectile-relative-velocity.patch => 0373-Configurable-projectile-relative-velocity.patch} (95%) rename Spigot-Server-Patches/{0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch => 0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch} (81%) rename Spigot-Server-Patches/{0374-offset-item-frame-ticking.patch => 0375-offset-item-frame-ticking.patch} (100%) rename Spigot-Server-Patches/{0375-Avoid-hopper-searches-if-there-are-no-items.patch => 0376-Avoid-hopper-searches-if-there-are-no-items.patch} (100%) rename Spigot-Server-Patches/{0376-Asynchronous-chunk-IO-and-loading.patch => 0377-Asynchronous-chunk-IO-and-loading.patch} (99%) rename Spigot-Server-Patches/{0377-Use-getChunkIfLoadedImmediately-in-places.patch => 0378-Use-getChunkIfLoadedImmediately-in-places.patch} (91%) rename Spigot-Server-Patches/{0378-Reduce-sync-loads.patch => 0379-Reduce-sync-loads.patch} (97%) rename Spigot-Server-Patches/{0379-Implement-alternative-item-despawn-rate.patch => 0380-Implement-alternative-item-despawn-rate.patch} (97%) rename Spigot-Server-Patches/{0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch => 0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch} (96%) rename Spigot-Server-Patches/{0381-Fix-MC-158900.patch => 0382-Fix-MC-158900.patch} (100%) rename Spigot-Server-Patches/{0382-implement-optional-per-player-mob-spawns.patch => 0383-implement-optional-per-player-mob-spawns.patch} (99%) rename Spigot-Server-Patches/{0383-Prevent-consuming-the-wrong-itemstack.patch => 0384-Prevent-consuming-the-wrong-itemstack.patch} (88%) rename Spigot-Server-Patches/{0384-only-add-passanger-entities-once-from-spawners.patch => 0385-only-add-passanger-entities-once-from-spawners.patch} (100%) rename Spigot-Server-Patches/{0385-Fix-nether-portal-creation.patch => 0386-Fix-nether-portal-creation.patch} (100%) rename Spigot-Server-Patches/{0386-Generator-Settings.patch => 0387-Generator-Settings.patch} (97%) rename Spigot-Server-Patches/{0387-Fix-MC-161754.patch => 0388-Fix-MC-161754.patch} (100%) rename Spigot-Server-Patches/{0388-Performance-improvement-for-Chunk.getEntities.patch => 0389-Performance-improvement-for-Chunk.getEntities.patch} (100%) rename Spigot-Server-Patches/{0389-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch => 0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch} (100%) rename Spigot-Server-Patches/{0390-Expose-the-internal-current-tick.patch => 0391-Expose-the-internal-current-tick.patch} (100%) rename Spigot-Server-Patches/{0391-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch => 0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch} (100%) rename Spigot-Server-Patches/{0392-Add-option-to-disable-pillager-patrols.patch => 0393-Add-option-to-disable-pillager-patrols.patch} (91%) rename Spigot-Server-Patches/{0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch => 0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch} (92%) rename Spigot-Server-Patches/{0394-PlayerLaunchProjectileEvent.patch => 0395-PlayerLaunchProjectileEvent.patch} (100%) rename Spigot-Server-Patches/{0395-Add-CraftMagicNumbers.isSupportedApiVersion.patch => 0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch} (100%) rename Spigot-Server-Patches/{0396-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch => 0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch} (100%) rename Spigot-Server-Patches/{0397-MC-145656-Fix-Follow-Range-Initial-Target.patch => 0398-MC-145656-Fix-Follow-Range-Initial-Target.patch} (95%) rename Spigot-Server-Patches/{0398-Optimize-Hoppers.patch => 0399-Optimize-Hoppers.patch} (97%) rename Spigot-Server-Patches/{0399-PlayerDeathEvent-shouldDropExperience.patch => 0400-PlayerDeathEvent-shouldDropExperience.patch} (100%) rename Spigot-Server-Patches/{0400-Prevent-bees-loading-chunks-checking-hive-position.patch => 0401-Prevent-bees-loading-chunks-checking-hive-position.patch} (100%) rename Spigot-Server-Patches/{0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => 0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (100%) rename Spigot-Server-Patches/{0402-Guard-against-serializing-mismatching-chunk-coordina.patch => 0403-Guard-against-serializing-mismatching-chunk-coordina.patch} (100%) rename Spigot-Server-Patches/{0403-Optimise-IEntityAccess-getPlayerByUUID.patch => 0404-Optimise-IEntityAccess-getPlayerByUUID.patch} (93%) rename Spigot-Server-Patches/{0404-Fix-items-not-falling-correctly.patch => 0405-Fix-items-not-falling-correctly.patch} (100%) rename Spigot-Server-Patches/{0405-Lag-compensate-eating.patch => 0406-Lag-compensate-eating.patch} (89%) rename Spigot-Server-Patches/{0406-Optimize-call-to-getFluid-for-explosions.patch => 0407-Optimize-call-to-getFluid-for-explosions.patch} (100%) rename Spigot-Server-Patches/{0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch => 0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch} (100%) rename Spigot-Server-Patches/{0408-Entity-Activation-Range-2.0.patch => 0409-Entity-Activation-Range-2.0.patch} (96%) rename Spigot-Server-Patches/{0409-Add-effect-to-block-break-naturally.patch => 0410-Add-effect-to-block-break-naturally.patch} (100%) rename Spigot-Server-Patches/{0410-Tracking-Range-Improvements.patch => 0411-Tracking-Range-Improvements.patch} (100%) rename Spigot-Server-Patches/{0411-Fix-items-vanishing-through-end-portal.patch => 0412-Fix-items-vanishing-through-end-portal.patch} (94%) rename Spigot-Server-Patches/{0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => 0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (100%) rename Spigot-Server-Patches/{0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch => 0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (97%) rename Spigot-Server-Patches/{0414-Allow-overriding-the-java-version-check.patch => 0415-Allow-overriding-the-java-version-check.patch} (100%) rename Spigot-Server-Patches/{0415-Add-ThrownEggHatchEvent.patch => 0416-Add-ThrownEggHatchEvent.patch} (100%) rename Spigot-Server-Patches/{0416-Optimise-random-block-ticking.patch => 0417-Optimise-random-block-ticking.patch} (97%) rename Spigot-Server-Patches/{0417-Entity-Jump-API.patch => 0418-Entity-Jump-API.patch} (94%) rename Spigot-Server-Patches/{0418-Add-option-to-nerf-pigmen-from-nether-portals.patch => 0419-Add-option-to-nerf-pigmen-from-nether-portals.patch} (93%) rename Spigot-Server-Patches/{0419-Make-the-GUI-graph-fancier.patch => 0420-Make-the-GUI-graph-fancier.patch} (99%) rename Spigot-Server-Patches/{0420-add-hand-to-BlockMultiPlaceEvent.patch => 0421-add-hand-to-BlockMultiPlaceEvent.patch} (100%) rename Spigot-Server-Patches/{0421-Prevent-teleporting-dead-entities.patch => 0422-Prevent-teleporting-dead-entities.patch} (100%) rename Spigot-Server-Patches/{0422-Validate-tripwire-hook-placement-before-update.patch => 0423-Validate-tripwire-hook-placement-before-update.patch} (100%) rename Spigot-Server-Patches/{0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => 0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (95%) rename Spigot-Server-Patches/{0424-Configurable-chance-of-villager-zombie-infection.patch => 0425-Configurable-chance-of-villager-zombie-infection.patch} (94%) rename Spigot-Server-Patches/{0425-Optimise-Chunk-getFluid.patch => 0426-Optimise-Chunk-getFluid.patch} (100%) rename Spigot-Server-Patches/{0426-Optimise-TickListServer-by-rewriting-it.patch => 0427-Optimise-TickListServer-by-rewriting-it.patch} (99%) rename Spigot-Server-Patches/{0427-Pillager-patrol-spawn-settings-and-per-player-option.patch => 0428-Pillager-patrol-spawn-settings-and-per-player-option.patch} (97%) rename Spigot-Server-Patches/{0428-Ensure-Entity-is-never-double-registered.patch => 0429-Ensure-Entity-is-never-double-registered.patch} (89%) rename Spigot-Server-Patches/{0429-Fix-unregistering-entities-from-unloading-chunks.patch => 0430-Fix-unregistering-entities-from-unloading-chunks.patch} (90%) rename Spigot-Server-Patches/{0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch => 0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (100%) rename Spigot-Server-Patches/{0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch => 0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (100%) rename Spigot-Server-Patches/{0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => 0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (92%) rename Spigot-Server-Patches/{0433-Optimize-Collision-to-not-load-chunks.patch => 0434-Optimize-Collision-to-not-load-chunks.patch} (98%) rename Spigot-Server-Patches/{0434-Don-t-tick-dead-players.patch => 0435-Don-t-tick-dead-players.patch} (100%) rename Spigot-Server-Patches/{0435-Dead-Player-s-shouldn-t-be-able-to-move.patch => 0436-Dead-Player-s-shouldn-t-be-able-to-move.patch} (100%) rename Spigot-Server-Patches/{0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch => 0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch} (100%) rename Spigot-Server-Patches/{0437-Increase-Light-Queue-Size.patch => 0438-Increase-Light-Queue-Size.patch} (88%) rename Spigot-Server-Patches/{0438-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch => 0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch} (94%) rename Spigot-Server-Patches/{0439-Don-t-move-existing-players-to-world-spawn.patch => 0440-Don-t-move-existing-players-to-world-spawn.patch} (100%) rename Spigot-Server-Patches/{0440-Add-tick-times-API-and-mspt-command.patch => 0441-Add-tick-times-API-and-mspt-command.patch} (94%) rename Spigot-Server-Patches/{0441-Expose-MinecraftServer-isRunning.patch => 0442-Expose-MinecraftServer-isRunning.patch} (100%) rename Spigot-Server-Patches/{0442-Add-Raw-Byte-ItemStack-Serialization.patch => 0443-Add-Raw-Byte-ItemStack-Serialization.patch} (100%) rename Spigot-Server-Patches/{0443-Remove-streams-from-Mob-AI-System.patch => 0444-Remove-streams-from-Mob-AI-System.patch} (100%) rename Spigot-Server-Patches/{0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch => 0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch} (92%) rename Spigot-Server-Patches/{0445-Async-command-map-building.patch => 0446-Async-command-map-building.patch} (100%) rename Spigot-Server-Patches/{0446-Improved-Watchdog-Support.patch => 0447-Improved-Watchdog-Support.patch} (98%) rename Spigot-Server-Patches/{0447-Optimize-Pathfinding.patch => 0448-Optimize-Pathfinding.patch} (100%) rename Spigot-Server-Patches/{0448-Reduce-Either-Optional-allocation.patch => 0449-Reduce-Either-Optional-allocation.patch} (100%) rename Spigot-Server-Patches/{0449-Remove-streams-from-PairedQueue.patch => 0450-Remove-streams-from-PairedQueue.patch} (100%) rename Spigot-Server-Patches/{0450-Reduce-memory-footprint-of-NBTTagCompound.patch => 0451-Reduce-memory-footprint-of-NBTTagCompound.patch} (100%) rename Spigot-Server-Patches/{0451-Prevent-opening-inventories-when-frozen.patch => 0452-Prevent-opening-inventories-when-frozen.patch} (100%) rename Spigot-Server-Patches/{0452-Optimise-ArraySetSorted-removeIf.patch => 0453-Optimise-ArraySetSorted-removeIf.patch} (100%) rename Spigot-Server-Patches/{0453-Don-t-run-entity-collision-code-if-not-needed.patch => 0454-Don-t-run-entity-collision-code-if-not-needed.patch} (89%) rename Spigot-Server-Patches/{0454-Optimise-entity-hard-collision-checking.patch => 0455-Optimise-entity-hard-collision-checking.patch} (97%) rename Spigot-Server-Patches/{0455-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch => 0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch} (100%) rename Spigot-Server-Patches/{0456-Restrict-vanilla-teleport-command-to-valid-locations.patch => 0457-Restrict-vanilla-teleport-command-to-valid-locations.patch} (100%) rename Spigot-Server-Patches/{0457-Implement-Player-Client-Options-API.patch => 0458-Implement-Player-Client-Options-API.patch} (97%) rename Spigot-Server-Patches/{0458-Fix-Chunk-Post-Processing-deadlock-risk.patch => 0459-Fix-Chunk-Post-Processing-deadlock-risk.patch} (100%) rename Spigot-Server-Patches/{0459-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch => 0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch} (100%) rename Spigot-Server-Patches/{0460-Broadcast-join-message-to-console.patch => 0461-Broadcast-join-message-to-console.patch} (100%) rename Spigot-Server-Patches/{0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch => 0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch} (100%) rename Spigot-Server-Patches/{0462-Load-Chunks-for-Login-Asynchronously.patch => 0463-Load-Chunks-for-Login-Asynchronously.patch} (99%) rename Spigot-Server-Patches/{0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch => 0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch} (93%) rename Spigot-Server-Patches/{0464-Add-PlayerAttackEntityCooldownResetEvent.patch => 0465-Add-PlayerAttackEntityCooldownResetEvent.patch} (91%) rename Spigot-Server-Patches/{0465-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch => 0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch} (100%) rename Spigot-Server-Patches/{0466-Don-t-fire-BlockFade-on-worldgen-threads.patch => 0467-Don-t-fire-BlockFade-on-worldgen-threads.patch} (100%) rename Spigot-Server-Patches/{0467-Add-phantom-creative-and-insomniac-controls.patch => 0468-Add-phantom-creative-and-insomniac-controls.patch} (96%) rename Spigot-Server-Patches/{0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch => 0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch} (94%) rename Spigot-Server-Patches/{0469-Implement-Brigadier-Mojang-API.patch => 0470-Implement-Brigadier-Mojang-API.patch} (100%) rename Spigot-Server-Patches/{0470-Villager-Restocks-API.patch => 0471-Villager-Restocks-API.patch} (100%) rename Spigot-Server-Patches/{0471-Validate-PickItem-Packet-and-kick-for-invalid.patch => 0472-Validate-PickItem-Packet-and-kick-for-invalid.patch} (100%) rename Spigot-Server-Patches/{0472-Expose-game-version.patch => 0473-Expose-game-version.patch} (100%) rename Spigot-Server-Patches/{0473-Sync-position-on-teleportation.patch => 0474-Sync-position-on-teleportation.patch} (100%) rename Spigot-Server-Patches/{0474-Optimize-Voxel-Shape-Merging.patch => 0475-Optimize-Voxel-Shape-Merging.patch} (100%) rename Spigot-Server-Patches/{0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch => 0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch} (100%) rename Spigot-Server-Patches/{0476-Implement-Mob-Goal-API.patch => 0477-Implement-Mob-Goal-API.patch} (100%) rename Spigot-Server-Patches/{0477-Use-distance-map-to-optimise-entity-tracker.patch => 0478-Use-distance-map-to-optimise-entity-tracker.patch} (98%) rename Spigot-Server-Patches/{0478-Optimize-isOutsideRange-to-use-distance-maps.patch => 0479-Optimize-isOutsideRange-to-use-distance-maps.patch} (100%) rename Spigot-Server-Patches/{0479-Stop-copy-on-write-operations-for-updating-light-dat.patch => 0480-Stop-copy-on-write-operations-for-updating-light-dat.patch} (100%) rename Spigot-Server-Patches/{0480-No-Tick-view-distance-implementation.patch => 0481-No-Tick-view-distance-implementation.patch} (99%) rename Spigot-Server-Patches/{0481-Add-villager-reputation-API.patch => 0482-Add-villager-reputation-API.patch} (100%) rename Spigot-Server-Patches/{0482-Fix-Light-Command.patch => 0483-Fix-Light-Command.patch} (96%) rename Spigot-Server-Patches/{0483-Fix-PotionEffect-ignores-icon-flag.patch => 0484-Fix-PotionEffect-ignores-icon-flag.patch} (100%) rename Spigot-Server-Patches/{0484-Optimize-brigadier-child-sorting-performance.patch => 0485-Optimize-brigadier-child-sorting-performance.patch} (100%) rename Spigot-Server-Patches/{0485-Don-t-toString-block-unless-actually-showing-the-mes.patch => 0486-Don-t-toString-block-unless-actually-showing-the-mes.patch} (100%) rename Spigot-Server-Patches/{0486-Potential-bed-API.patch => 0487-Potential-bed-API.patch} (100%) rename Spigot-Server-Patches/{0487-Wait-for-Async-Tasks-during-shutdown.patch => 0488-Wait-for-Async-Tasks-during-shutdown.patch} (96%) rename Spigot-Server-Patches/{0488-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch => 0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch} (100%) rename Spigot-Server-Patches/{0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (94%) rename Spigot-Server-Patches/{0490-Optimize-NibbleArray-to-use-pooled-buffers.patch => 0491-Optimize-NibbleArray-to-use-pooled-buffers.patch} (95%) rename Spigot-Server-Patches/{0491-Reduce-MutableInt-allocations-from-light-engine.patch => 0492-Reduce-MutableInt-allocations-from-light-engine.patch} (100%) rename Spigot-Server-Patches/{0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (100%) rename Spigot-Server-Patches/{0493-Ensure-safe-gateway-teleport.patch => 0494-Ensure-safe-gateway-teleport.patch} (100%) rename Spigot-Server-Patches/{0494-Add-option-for-console-having-all-permissions.patch => 0495-Add-option-for-console-having-all-permissions.patch} (95%) rename Spigot-Server-Patches/{0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch => 0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch} (100%) rename Spigot-Server-Patches/{0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch => 0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch} (99%) rename Spigot-Server-Patches/{0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch => 0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch} (100%) rename Spigot-Server-Patches/{0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch => 0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch} (100%) rename Spigot-Server-Patches/{0499-Improve-Chunk-Status-Transition-Speed.patch => 0500-Improve-Chunk-Status-Transition-Speed.patch} (100%) rename Spigot-Server-Patches/{0500-Fix-villager-trading-demand-MC-163962.patch => 0501-Fix-villager-trading-demand-MC-163962.patch} (100%) rename Spigot-Server-Patches/{0501-Maps-shouldn-t-load-chunks.patch => 0502-Maps-shouldn-t-load-chunks.patch} (100%) rename Spigot-Server-Patches/{0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch => 0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch} (91%) rename Spigot-Server-Patches/{0503-Optimize-Bit-Operations-by-inlining.patch => 0504-Optimize-Bit-Operations-by-inlining.patch} (100%) rename Spigot-Server-Patches/{0504-Optimize-Light-Engine.patch => 0505-Optimize-Light-Engine.patch} (99%) rename Spigot-Server-Patches/{0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch => 0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch} (97%) rename Spigot-Server-Patches/{0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch => 0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch} (100%) rename Spigot-Server-Patches/{0507-Fix-missing-chunks-due-to-integer-overflow.patch => 0508-Fix-missing-chunks-due-to-integer-overflow.patch} (100%) rename Spigot-Server-Patches/{0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch => 0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch} (100%) rename Spigot-Server-Patches/{0509-Fix-piston-physics-inconsistency-MC-188840.patch => 0510-Fix-piston-physics-inconsistency-MC-188840.patch} (97%) rename Spigot-Server-Patches/{0510-Fix-sand-duping.patch => 0511-Fix-sand-duping.patch} (100%) rename Spigot-Server-Patches/{0511-Prevent-position-desync-in-playerconnection-causing-.patch => 0512-Prevent-position-desync-in-playerconnection-causing-.patch} (100%) rename Spigot-Server-Patches/{0512-Fix-enderdragon-exp-dupe.patch => 0513-Fix-enderdragon-exp-dupe.patch} (100%) rename Spigot-Server-Patches/{0513-Inventory-getHolder-method-without-block-snapshot.patch => 0514-Inventory-getHolder-method-without-block-snapshot.patch} (100%) rename Spigot-Server-Patches/{0514-Expose-Arrow-getItemStack.patch => 0515-Expose-Arrow-getItemStack.patch} (100%) rename Spigot-Server-Patches/{0515-Add-and-implement-PlayerRecipeBookClickEvent.patch => 0516-Add-and-implement-PlayerRecipeBookClickEvent.patch} (100%) rename Spigot-Server-Patches/{0516-Add-PrepareGrindstoneEvent.patch => 0517-Add-PrepareGrindstoneEvent.patch} (100%) rename Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch => removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch (53%) diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 51ac0e6718..d9b98eb286 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -268,10 +268,10 @@ index 0000000000000000000000000000000000000000..41c79650b169b87fbc70cf502438a545 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..273cdb598b3606b962dcc92564c84ad351b7a74f +index 0000000000000000000000000000000000000000..68d3cb02dbfdc9d6f9d3682a2659c9430b50c490 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -0,0 +1,184 @@ +@@ -0,0 +1,185 @@ +package com.destroystokyo.paper; + +import com.google.common.base.Throwables; @@ -291,6 +291,7 @@ index 0000000000000000000000000000000000000000..273cdb598b3606b962dcc92564c84ad3 +import net.minecraft.server.MinecraftServer; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; ++import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.InvalidConfigurationException; +import org.bukkit.configuration.file.YamlConfiguration; + diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index c16fe13fe1..7629074599 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -279,6 +279,27 @@ index 8886cedfe8809fe4711b5f2451e3e6456d2a6513..b77a0f0c2ee30df44b113aa6c8d4fa92 return true; } } +diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java +index 88f1f201240ef0479c4f0f93f4caca454bbe7e9e..d63a4e4916ed5f5d901be0f4dd2c13cf66239055 100644 +--- a/src/main/java/net/minecraft/server/IBlockState.java ++++ b/src/main/java/net/minecraft/server/IBlockState.java +@@ -16,12 +16,10 @@ public abstract class IBlockState> { + private final Codec> e; + + protected IBlockState(String s, Class oclass) { +- this.d = Codec.STRING.comapFlatMap((s1) -> { +- return (DataResult) this.b(s1).map(DataResult::success).orElseGet(() -> { +- return DataResult.error("Unable to read property: " + this + " with value: " + s1); +- }); +- }, this::a); +- this.e = this.d.xmap(this::b, IBlockState.a::b); ++ this.d = Codec.STRING.comapFlatMap((s1) -> this.b(s1).map(DataResult::success).orElseGet(() -> { // Paper - decompile error ++ return DataResult.error("Unable to read property: " + this + " with value: " + s1); ++ }), this::a); ++ this.e = this.d.xmap(this::b, (IBlockState.a param) -> param.b()); // Paper - decompile fix + this.a = oclass; + this.b = s; + } diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java index 2517b70ddeb985ae7d708c6a1708b42c6a67dd00..c469b5db81fb040fc27cd2e4f7cd61797f56a62d 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java @@ -423,6 +444,22 @@ index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d55 } } +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index a5f26a51ba612bc62d406cbefa858af75bd062da..7ea0118d108dd71fa1b0336e471ac4cc36722ff8 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -1550,9 +1550,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrantmap(resourcepackrepository::a).filter(Objects::nonNull).map(ResourcePackLoader::d).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error // Paper - decompile error + }, this).thenCompose((immutablelist) -> { +- return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); ++ return DataPackResources.a((List) immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); // Paper - decompile error + }).thenAcceptAsync((datapackresources) -> { + this.dataPackResources.close(); + this.dataPackResources = datapackresources; diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java index 829a7ae0a2b77205fb8e8c5754d0d4333afa224d..8b9e47b4c7f5dc464fa617a59583df9e30a54045 100644 --- a/src/main/java/net/minecraft/server/NBTBase.java diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index b569c83569..5c52196e91 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2318,6 +2318,18 @@ index eff6ebcd30b538cbaedaa031a46a59ea956253ba..30cbfc8eac20910aa55951e3dce63862 @Override public IBlockData getType(BlockPosition blockposition) { return Blocks.AIR.getBlockData(); +diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java +index 47324feca49786b49563d3d0e854e74ad27c190b..26d446077bb563ca3c5bb0339695b3364a3e41bf 100644 +--- a/src/main/java/net/minecraft/server/BlockBase.java ++++ b/src/main/java/net/minecraft/server/BlockBase.java +@@ -632,6 +632,7 @@ public abstract class BlockBase { + return this.a != null ? this.a.e : Block.a(this.getCollisionShape(iblockaccess, blockposition)); + } + ++ public IBlockData getBlockData() { return p(); } // Paper - OBFHELPER + protected abstract IBlockData p(); + + public boolean isAlwaysDestroyable() { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java index 8eb94bcb605f882c9ce096fc758df5e3ae3ab28d..b61651fcd6605cd8638ce14f15e41b878add3f1c 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/Spigot-Server-Patches/0005-Paper-Metrics.patch b/Spigot-Server-Patches/0005-Paper-Metrics.patch index 0ac402ed69..999be8eb7f 100644 --- a/Spigot-Server-Patches/0005-Paper-Metrics.patch +++ b/Spigot-Server-Patches/0005-Paper-Metrics.patch @@ -647,10 +647,10 @@ index 0000000000000000000000000000000000000000..e257d6b36e0e78dac5b8320017d92776 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 273cdb598b3606b962dcc92564c84ad351b7a74f..b6d470e594ce196f560ac6c94ced904b0081b205 100644 +index 68d3cb02dbfdc9d6f9d3682a2659c9430b50c490..b367bb8ea184489f433f8acc798466c38816ae62 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -41,6 +41,7 @@ public class PaperConfig { +@@ -42,6 +42,7 @@ public class PaperConfig { private static boolean verbose; private static boolean fatalError; /*========================================================================*/ @@ -658,7 +658,7 @@ index 273cdb598b3606b962dcc92564c84ad351b7a74f..b6d470e594ce196f560ac6c94ced904b public static void init(File configFile) { CONFIG_FILE = configFile; -@@ -83,6 +84,11 @@ public class PaperConfig { +@@ -84,6 +85,11 @@ public class PaperConfig { for (Map.Entry entry : commands.entrySet()) { MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue()); } 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 725775fd21..ddc0ee4dd1 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 @@ -117,7 +117,7 @@ index 3e679f66cd922cf0b47a84cdd1a83f311ddf6d0b..f51325612fa14c1428679d6955a6d923 private String entityKeyString; diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5d2b47e6a 100644 +index 3cae7ef750371cee741c2f27799c1bb5864a278a..f8d859cda8186d706304b4e182bca34573f09433 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -128,7 +128,7 @@ index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5 + private java.lang.ref.WeakReference currentChunk = null; + public Chunk getCurrentChunk() { + final Chunk chunk = currentChunk != null ? currentChunk.get() : null; -+ return chunk != null && chunk.isLoaded() ? chunk : null; ++ return chunk != null && chunk.loaded ? chunk : null; + } + public void setCurrentChunk(Chunk chunk) { + this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null; diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 2ae0e78da8..27c2861da2 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -544,7 +544,7 @@ index 0000000000000000000000000000000000000000..d4ebcf8f66197299256bd6b65710a148 +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 -index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1ed27bf338 +index 0000000000000000000000000000000000000000..03bb2102d6952df04753ba9986aad9b494568e2d --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +1,118 @@ @@ -608,7 +608,7 @@ index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1e + public final Timing miscMobSpawning; + + public WorldTimingsHandler(World server) { -+ String name = server.worldData.getName() +" - "; ++ String name = server.getWorld().getName() +" - "; + + mobSpawn = Timings.ofSafe(name + "mobSpawn"); + doChunkUnload = Timings.ofSafe(name + "doChunkUnload"); @@ -663,14 +663,14 @@ index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1e + } + + public static Timing getTickList(WorldServer worldserver, String timingsType) { -+ return Timings.ofSafe(worldserver.getWorldData().getName() + " - Scheduled " + timingsType); ++ return Timings.ofSafe(worldserver.getWorld().getName() + " - Scheduled " + timingsType); + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9 100644 +index b367bb8ea184489f433f8acc798466c38816ae62..a62f4bbb973b9cb6d1ee53f56a0897d70ae176af 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit; +@@ -14,12 +14,15 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.regex.Pattern; @@ -678,6 +678,7 @@ index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; import org.bukkit.command.Command; + import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; +import co.aikar.timings.Timings; @@ -685,7 +686,7 @@ index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc public class PaperConfig { -@@ -187,4 +190,27 @@ public class PaperConfig { +@@ -188,4 +191,27 @@ public class PaperConfig { config.addDefault(path, def); return config.getString(path, config.getString(path)); } @@ -1116,7 +1117,7 @@ index dccb315440f7429fe881bd0d12af8f1ae8e35c3d..96a95413f74592ef0a8e9367fd3ed81f if (!this.world.isClientSide && this.dN() && this.aC()) { this.damageEntity(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 67120e3e4a2cd77394fd7e77543223afa2d6a22e..a5284ca66043150c7132f6bee29a952fb6601007 100644 +index 10ba89eeb31adedadd34746b86843accd1869597..04d1af26aaa7005c9dcf84abfb796b848108bbf0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -1560,7 +1561,7 @@ index e8ff43662b8397229cb19ea26342b66c88807379..3b8f56c0f0507ebdd9ac20be70688b4c this.g.clear(); this.f.clear(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index f4d88de468e7843585eb5c722c9e94f5d2b47e6a..03c6a1c95daaa25208917d6985594eb5f182e8e1 100644 +index f8d859cda8186d706304b4e182bca34573f09433..057d703fe73de9bb9ca6f0e263463d32abae4c13 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; @@ -1626,7 +1627,7 @@ index 42294c7c7de146be08d38eddafd8d099073b627a..8a7ce347c35e0527471b3b586a248d64 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 f45b5ddc66024e993ac94436ee25a03e085742b4..2b39fb903c1cf6ded8aa170f5bd25f4fadb1195a 100644 +index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98faf4a7641 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -3,6 +3,8 @@ package net.minecraft.server; @@ -1687,7 +1688,7 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..2b39fb903c1cf6ded8aa170f5bd25f4f org.spigotmc.ActivationRange.activateEntities(this); // Spigot timings.entityTick.startTiming(); // Spigot -+ TimingHistory.entityTicks += this.globalEntityList.size(); // Paper ++ TimingHistory.entityTicks += this.entitiesById.size(); // Paper while (objectiterator.hasNext()) { Entry entry = (Entry) objectiterator.next(); Entity entity = (Entity) entry.getValue(); diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0025-Entity-Origin-API.patch index 911ea345a7..c3f4dc7b4c 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0025-Entity-Origin-API.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..002678bc2bff9aa733650cea3b9bcb96e6fb3f9c 100644 +index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..12730f52fdb0774dcf8be81547c8f03ef9f184a4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper -+ public Location origin; // Paper ++ public org.bukkit.Location origin; // Paper // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; @@ -35,7 +35,7 @@ index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..002678bc2bff9aa733650cea3b9bcb96 + // Paper start - Restore the entity's origin location + NBTTagList originTag = nbttagcompound.getList("Paper.Origin", 6); + if (!originTag.isEmpty()) { -+ origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); ++ origin = new org.bukkit.Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); + } + // Paper end + diff --git a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch index 37c6e44a94..05b755623b 100644 --- a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch @@ -29,7 +29,7 @@ index d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 002678bc2bff9aa733650cea3b9bcb96e6fb3f9c..2adde8312a8e5bed9bfc2bd60961f56c799ee6c6 100644 +index 12730f52fdb0774dcf8be81547c8f03ef9f184a4..be0ade74030c5f8584b5caa22d6d3084a0853afa 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -420,9 +420,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch index 4457ad57fb..06fcc7f4cd 100644 --- a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch @@ -21,7 +21,7 @@ index 62e793b71b313146b86b466421e7a5f894bef9df..cd47a4ca069df26969de3051c2aac805 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2adde8312a8e5bed9bfc2bd60961f56c799ee6c6..833234254a93b0aee421f7cdb91f85f269040b91 100644 +index be0ade74030c5f8584b5caa22d6d3084a0853afa..3bda9ab2a19740e3b06f24e2bcc82cc9ea57858e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2502,7 +2502,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch index 202a44a847..959dc3cfcc 100644 --- a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch @@ -25,7 +25,7 @@ index abbf59bb91021821876a8960e8f77fac24457ec4..04430aae52205ee167662004e45c145b + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 833234254a93b0aee421f7cdb91f85f269040b91..c2ea0e74b72976131976f875934042cf65ba8263 100644 +index 3bda9ab2a19740e3b06f24e2bcc82cc9ea57858e..b75c6aa78dd9c7478912b0b68de7a27289a480ba 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2195,6 +2195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index 4a9869fd1b..45b97d4ef5 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9..6ef5bb9f323da7cbf8cb24d094bf43c4735549b0 100644 +index a62f4bbb973b9cb6d1ee53f56a0897d70ae176af..f207abbe757ad403a29a7a012903aaa88d5b1685 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -213,4 +213,9 @@ public class PaperConfig { +@@ -214,4 +214,9 @@ public class PaperConfig { " - Length: " + timeSummary(Timings.getHistoryLength() / 20) + " - Server Name: " + timingsServerName); } diff --git a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch index c50dd3fcd7..6e941f70ac 100644 --- a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..2a18a905aef50d23d9e5544f4240b2f719abd8f1 100644 +index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..6e05a7deaae13f29c24fb6e364c62948a20d83a8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -283,6 +283,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -283,6 +283,22 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return chunk == null ? null : chunk.getFluid(blockposition); } @@ -17,8 +17,12 @@ index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..2a18a905aef50d23d9e5544f4240b2f7 + public boolean isLoadedAndInBounds(BlockPosition blockposition) { + return getWorldBorder().isInBounds(blockposition) && getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) != null; + } -+ public Chunk getChunkIfLoaded(BlockPosition blockposition) { -+ return getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); ++ ++ public Chunk getChunkIfLoaded(int x, int z) { ++ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(x, z); ++ } ++ public final Chunk getChunkIfLoaded(BlockPosition blockposition) { ++ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4); + } + + // reduces need to do isLoaded before getType @@ -40,3 +44,16 @@ index d039e715624d33fc3ec9e87d5ad992415e7dc6b9..d5c0d394feaf8bb991245dbdcc6252cf public boolean a(BlockPosition blockposition) { return (double) (blockposition.getX() + 1) > this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h(); } +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 9eec2ec61777222c1290ad3112b003409001e51a..4548a38464fac65a88da26e95660542eeb482ccb 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -83,7 +83,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + public final Convertable.ConversionSession convertable; + public final UUID uuid; + +- public Chunk getChunkIfLoaded(int x, int z) { ++ @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI + return this.chunkProvider.getChunkAt(x, z, false); + } + diff --git a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch index 100be84da7..68a1232e5c 100644 --- a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c2ea0e74b72976131976f875934042cf65ba8263..9e750c0ff42fa1189f20f10495e1ca1d74c6d51b 100644 +index b75c6aa78dd9c7478912b0b68de7a27289a480ba..0b0dca503a91bbd7991996bf6c395991c993604d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -58,6 +58,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index 9723792c8d..ff7be580c3 100644 --- a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -192,7 +192,7 @@ index c5d7a013e65c2c81b14ceb2476c1c6dfe3239f0d..ee8df274d43be753887fb77e4203e2ee @Override public Fluid getFluid(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2a18a905aef50d23d9e5544f4240b2f719abd8f1..9067fcbf6d35931d31830b91f42f027076426bad 100644 +index 6479a62d81daacde6e1e72cb57bd99f9c59b5ae7..042f10ba2c6a3283203fdc5e79f78f3dbf6ccc22 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -179,7 +179,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index cf5dd44636..6e99c30c0b 100644 --- a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -32,7 +32,7 @@ index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c410 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 63c2953d6eb6f3c034be97e0cb2dd5e991c75fdd..777a553fe3abfdc5db3616352ac11de7969f737c 100644 +index 704d59e53f4cf6f94202d6db36b3f7dba3a29c59..5f89477c664662447c1aafbf734a15aee0084f17 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1175,6 +1175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70eacbe4617 100644 +index 0611194eac072ce8dcd350dadffbc9da267d6cff..e236a3b3aa11bc5c3bab92959b90827447aa282c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -435,7 +435,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -439,7 +439,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start iblockdata1.b(this, blockposition, j); // Don't call an event for the old block to limit event spam CraftWorld world = ((WorldServer) this).getWorld(); @@ -56,7 +56,7 @@ index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70e BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata)); this.getServer().getPluginManager().callEvent(event); -@@ -537,7 +537,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -541,7 +541,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); @@ -66,15 +66,14 @@ index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70e this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9e8f22f41889c8592033925c180f46413cfaec14..cc96ce0cb2e75dd86b413da76e878d511cd4e039 100644 +index 20200408da6cae15576926f79de22b955781201d..0746d0cf0c517a28e8faf637ecc19fb07f6eac2b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -83,6 +83,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -82,6 +82,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + private int tickPosition; public final Convertable.ConversionSession convertable; public final UUID uuid; - + boolean hasPhysicsEvent = true; // Paper -+ - public Chunk getChunkIfLoaded(int x, int z) { + + @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkProvider.getChunkAt(x, z, false); - } diff --git a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch index f1d7930aff..1dac1c374a 100644 --- a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cc96ce0cb2e75dd86b413da76e878d511cd4e039..f6940921dec04eedc393578ec9827e6f8516611c 100644 +index 0746d0cf0c517a28e8faf637ecc19fb07f6eac2b..a6747315cf3d9d5f22d95aade5b0d4df63bd18f8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1057,7 +1057,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1056,7 +1056,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity instanceof EntityInsentient) { this.navigators.remove(((EntityInsentient) entity).getNavigation()); } @@ -17,7 +17,7 @@ index cc96ce0cb2e75dd86b413da76e878d511cd4e039..f6940921dec04eedc393578ec9827e6f entity.valid = false; // CraftBukkit } -@@ -1095,6 +1095,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1094,6 +1094,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end diff --git a/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch index 113e0a0b5c..40b7fe7091 100644 --- a/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch @@ -11,10 +11,10 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap). The maximum size of the RegionFileCache is also made configurable. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 6ef5bb9f323da7cbf8cb24d094bf43c4735549b0..d500cd75a9229584a70bbdbda6de9bce67b836e8 100644 +index f207abbe757ad403a29a7a012903aaa88d5b1685..7d726757d1083011a09c9f2ca37c33a81360e964 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -218,4 +218,9 @@ public class PaperConfig { +@@ -219,4 +219,9 @@ public class PaperConfig { private static void loadPermsBeforePlugins() { loadPermsBeforePlugins = getBoolean("settings.load-permissions-yml-before-plugins", true); } diff --git a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index f6f9834a34..f4e225d016 100644 --- a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 66a4e068f43fad6d8f3858e6665ad70eacbe4617..b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3 100644 +index b6242cee9f5ab7c4fc9e32d682eb271f4604db41..45daedbba9829193bdc5e7a8f33b6e29c6fbbe10 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -495,6 +495,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -499,6 +499,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} public void applyPhysics(BlockPosition blockposition, Block block) { diff --git a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch index df5acb06a2..94c5479f1b 100644 --- a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0086-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 b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5ceea5efb18a 100644 +index d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93512a4855 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 { @@ -18,7 +18,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee public final List tileEntityListTick = Lists.newArrayList(); protected final List tileEntityListPending = Lists.newArrayList(); protected final java.util.Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); -@@ -660,9 +660,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -664,9 +664,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { }, tileentity::getPosition}); } @@ -30,7 +30,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee this.tileEntityListTick.add(tileentity); } -@@ -698,7 +698,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -702,7 +702,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { this.tileEntityListTick.removeAll(this.tileEntityListUnload); @@ -39,7 +39,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee this.tileEntityListUnload.clear(); } -@@ -759,7 +759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -763,7 +763,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); // Spigot end @@ -48,7 +48,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition()); } -@@ -789,7 +789,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -793,7 +793,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 b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee this.a(tileentity1); } // CraftBukkit end -@@ -931,7 +931,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -935,7 +935,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } else { if (tileentity != null) { this.tileEntityListPending.remove(tileentity); @@ -67,10 +67,10 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f6940921dec04eedc393578ec9827e6f8516611c..e2dfe047e64257b861fa0b168d2790605f09291c 100644 +index a6747315cf3d9d5f22d95aade5b0d4df63bd18f8..db02025e02de1d99e34771380dbf7e71b298d290 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1543,7 +1543,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1542,7 +1542,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size())); @@ -79,7 +79,7 @@ index f6940921dec04eedc393578ec9827e6f8516611c..e2dfe047e64257b861fa0b168d279060 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"); -@@ -1682,7 +1682,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1681,7 +1681,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/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index fe45ac3a00..b4645d220e 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable Player Collision diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index d500cd75a9229584a70bbdbda6de9bce67b836e8..e4f0db64c061af684c28f50f0a37fbca693af7be 100644 +index 7d726757d1083011a09c9f2ca37c33a81360e964..3d9a98936cfe933fd71fb82f07e1ba54d5d35800 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -223,4 +223,9 @@ public class PaperConfig { +@@ -224,4 +224,9 @@ public class PaperConfig { private static void regionFileCacheSize() { regionFileCacheSize = Math.max(getInt("settings.region-file-cache-size", 256), 4); } @@ -19,7 +19,7 @@ index d500cd75a9229584a70bbdbda6de9bce67b836e8..e4f0db64c061af684c28f50f0a37fbca + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 777a553fe3abfdc5db3616352ac11de7969f737c..02e5a4214e46f31ba38d1ab814eeacce850dfaa1 100644 +index 5f89477c664662447c1aafbf734a15aee0084f17..26a796513e66d1593d2d7e47062b26bfe07796e9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -436,6 +436,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> { - return DataResult.error("Unable to read property: " + this + " with value: " + s1); - }); - }, this::a); -- this.e = this.d.xmap(this::b, IBlockState.a::b); -+ this.e = this.d.xmap(this::b, (IBlockState.a param) -> { return param.b(); }); // Paper - decompile fix - this.a = oclass; - this.b = s; - } -@@ -61,23 +61,17 @@ public abstract class IBlockState> { +@@ -59,23 +59,17 @@ public abstract class IBlockState> { } public boolean equals(Object object) { diff --git a/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch index 55191777ec..8000fd33f9 100644 --- a/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 53f96a1576582fce83999a1f7e9a2624506ed51f..010b17d2e7a27ace6ff8b15edff577c4164d2e81 100644 +index 5827ef1e3eb35a11867ee4f92f301e1b0245c0fa..23c9e0f317073bb9c327ec49e0b0586d2123e4e9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -243,4 +243,13 @@ public class PaperConfig { +@@ -244,4 +244,13 @@ public class PaperConfig { public static boolean isProxyOnlineMode() { return Bukkit.getOnlineMode() || (SpigotConfig.bungee && bungeeOnlineMode); } diff --git a/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch index 566c3f320b..427d0ff71c 100644 --- a/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 010b17d2e7a27ace6ff8b15edff577c4164d2e81..5a83fc21cb6801d597a01fb4a83d30488f30bdb6 100644 +index 23c9e0f317073bb9c327ec49e0b0586d2123e4e9..c4086de778cc2ccc958b1a94dd6e9cdb5065076c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -252,4 +252,11 @@ public class PaperConfig { +@@ -253,4 +253,11 @@ public class PaperConfig { } packetInSpamThreshold = getInt("settings.incoming-packet-spam-threshold", 300); } diff --git a/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch index 4f58339a29..af8c0e3472 100644 --- a/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch @@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 43b588709da17ae779e97d297955edd3425c2a68..6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02 100644 +index 0ae5eb7da3c8baf6ff54cc3b83bba41127457134..022b05be76768cf0fb702ac5f9fa48c5e474391c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -729,7 +729,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -728,7 +728,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity.ck()) { this.getMethodProfiler().enter("chunkCheck"); int i = MathHelper.floor(entity.locX() / 16.0D); diff --git a/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch index 3f35c50ee8..284219eb3a 100644 --- a/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 851d05096b9230c1eaaf2a910293697f358eec0a..3e6d3c2be5fc36db4ae5d022f80f5b0bbc349704 100644 +index 6d6ce3b5a012f49b2e0725d66ad4bcae4a7310f7..de126bf6c95e90dd9a81ee8d815806b8908709ec 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -162,7 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch index d06ad5610a..da9b98b915 100644 --- a/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3e6dc44ede30846b8c612b043c1bd625576980e8..cfd03f29e6c46c66bf3ad9253c88e27b30f313c1 100644 +index 8f7222639bcc5b4b1b8af4aa69a100a37766cb4e..2b5384d43a4bceb0113e88a2e75b3b201fc49393 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -285,6 +285,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch index 685fef6ccf..b0e8a63edc 100644 --- a/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3e6d3c2be5fc36db4ae5d022f80f5b0bbc349704..e1c592c57e54c0c0882978b25286e06d6aaef570 100644 +index de126bf6c95e90dd9a81ee8d815806b8908709ec..e36855b969bdef5e85e6b29879f960b0675a7937 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1950,6 +1950,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch index f71a663959..89ff13d7bd 100644 --- a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index f164844f339793860e773c499443ce160d0a6830..751551f173338217f6682532a9a5e1a2 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e1c592c57e54c0c0882978b25286e06d6aaef570..6c60cf4ff4e7d5716c0487767b7632a59607ce23 100644 +index e36855b969bdef5e85e6b29879f960b0675a7937..13b10732917ffb823688336e888a329c774cc251 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch index 4244195e7b..7993683604 100644 --- a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5a83fc21cb6801d597a01fb4a83d30488f30bdb6..295b8390cbc31fc1fcb225f80ec2ff8f0df44321 100644 +index c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -259,4 +259,9 @@ public class PaperConfig { +@@ -260,4 +260,9 @@ public class PaperConfig { flyingKickPlayerMessage = getString("messages.kick.flying-player", flyingKickPlayerMessage); flyingKickVehicleMessage = getString("messages.kick.flying-vehicle", flyingKickVehicleMessage); } diff --git a/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch index dcddacb58b..2d71b44b85 100644 --- a/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6c60cf4ff4e7d5716c0487767b7632a59607ce23..357d9293b66eee667f49e566f6f7b5449666986e 100644 +index 13b10732917ffb823688336e888a329c774cc251..039a95a62e115f7095c38eb9a161dc0ff054a50a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -29,7 +29,7 @@ index 6c60cf4ff4e7d5716c0487767b7632a59607ce23..357d9293b66eee667f49e566f6f7b544 } catch (Throwable throwable) { @@ -1704,6 +1709,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (!originTag.isEmpty()) { - origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); + origin = new org.bukkit.Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); } + + spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status diff --git a/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 6d4d4e2c69..ff527489f7 100644 --- a/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cfd03f29e6c46c66bf3ad9253c88e27b30f313c1..b1d4f955a59313d7274e39870c9a7300fe012d08 100644 +index 2b5384d43a4bceb0113e88a2e75b3b201fc49393..598a6907432ad8a7fe3b8c6389d3e5251efc913a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -703,7 +703,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -707,7 +707,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.enter("blockEntities"); timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { diff --git a/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch index cb8773c582..f58baf0eab 100644 --- a/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 295b8390cbc31fc1fcb225f80ec2ff8f0df44321..5884b04f7e84048a9710736bd14237140ebf2cf7 100644 +index 5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b..cee8740e644c492e3d71fd58791e7d52d57e856d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -1,5 +1,6 @@ @@ -16,7 +16,7 @@ index 295b8390cbc31fc1fcb225f80ec2ff8f0df44321..5884b04f7e84048a9710736bd1423714 import com.google.common.base.Throwables; import java.io.File; -@@ -264,4 +265,9 @@ public class PaperConfig { +@@ -265,4 +266,9 @@ public class PaperConfig { private static void suggestPlayersWhenNull() { suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions); } diff --git a/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch index 1935a953ac..42a588cf8a 100644 --- a/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -72,10 +72,10 @@ index 69c0a4c7bfb1c753d544dcd074ad832d3e5ef3a0..eaed020982bd19dab72872849170fa62 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b1d4f955a59313d7274e39870c9a7300fe012d08..ad1841f16ea3ecfbd9c6047483a4b7bd061c1981 100644 +index 598a6907432ad8a7fe3b8c6389d3e5251efc913a..e095444d026c277c69a5d533c7b1f537ac84121e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -640,6 +640,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -644,6 +644,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.playSound(entityhuman, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, soundeffect, soundcategory, f, f1); } diff --git a/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch index bae6f78aee..746819fb84 100644 --- a/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd042f704c 100644 +index e095444d026c277c69a5d533c7b1f537ac84121e..94219fe1e01c6e48123544f4cc14fad1ac6de834 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -71,7 +71,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -30,7 +30,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd public Map capturedTileEntities = new HashMap<>(); public List captureDrops; public long ticksPerAnimalSpawns; -@@ -323,7 +323,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -327,7 +327,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -39,7 +39,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, blockposition, i); this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); -@@ -343,7 +343,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -347,7 +347,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(blockposition)) { @@ -48,7 +48,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); captured = true; } -@@ -601,7 +601,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -605,7 +605,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public IBlockData getType(BlockPosition blockposition) { // CraftBukkit start - tree generation if (captureTreeGeneration) { diff --git a/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch index 8525a40dc1..fb09bf9179 100644 --- a/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..a781ac0cf8766e915c10ebd3823cbe5b0d1c5230 100644 +index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..74950d74e6a11d5552369e830f9fdd63c4306221 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -65,7 +65,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -14,7 +14,7 @@ index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..a781ac0cf8766e915c10ebd3823cbe5b protected final float bO = 0.02F; private int g; - private final GameProfile bQ; -+ private final GameProfile bQ; public final void setProfile(final GameProfile profile) { this.bQ = profile; } // Paper - OBFHELPER ++ private GameProfile bQ; public final void setProfile(final GameProfile profile) { this.bQ = profile; } // Paper - OBFHELPER private ItemStack bS; private final ItemCooldown bT; @Nullable @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928fa06ee119 100644 +index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..44850b387f84aa9a3d1ec47555026b6088fc167e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ @@ -60,7 +60,15 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -1216,8 +1218,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -41,6 +43,7 @@ import net.minecraft.server.EnumColor; + import net.minecraft.server.EnumGamemode; + import net.minecraft.server.GenericAttributes; + import net.minecraft.server.IChatBaseComponent; ++import net.minecraft.server.MCUtil; + import net.minecraft.server.MapIcon; + import net.minecraft.server.MinecraftKey; + import net.minecraft.server.NBTTagCompound; +@@ -1216,8 +1219,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -75,7 +83,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1258,8 +1265,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1258,8 +1266,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -90,7 +98,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1268,6 +1280,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1268,6 +1281,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } @@ -126,7 +134,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f + reregisterPlayer(handle); + + //Respawn the player then update their position and selected slot -+ connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); ++ //connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); // TODO: Fix this if you care to make it work + handle.updateAbilities(); + connection.sendPacket(new net.minecraft.server.PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0)); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().updateClient(handle); diff --git a/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch index a2139ce940..87ddc9131f 100644 --- a/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch +++ b/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make player data saving configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5884b04f7e84048a9710736bd14237140ebf2cf7..ba341e0174cdc3b5b8bc83b7430270181ea92793 100644 +index cee8740e644c492e3d71fd58791e7d52d57e856d..f22bed69f690f6e4754b87dd61cebe9c6627b12d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -270,4 +270,13 @@ public class PaperConfig { +@@ -271,4 +271,13 @@ public class PaperConfig { private static void authenticationServersDownKickMessage() { authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } diff --git a/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch index edee7f024d..1eea3b243a 100644 --- a/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4f0dabdb6683402d9fd0ea789381928fa06ee119..ec0cb22d53733bed33019b257ac06ca9dc80d19e 100644 +index 44850b387f84aa9a3d1ec47555026b6088fc167e..ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -141,6 +141,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 4f0dabdb6683402d9fd0ea789381928fa06ee119..ec0cb22d53733bed33019b257ac06ca9 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1485,7 +1486,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1486,7 +1487,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch index b5d2d74d2f..39200dad29 100644 --- a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0216-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 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2c6943de6 100644 +index 022b05be76768cf0fb702ac5f9fa48c5e474391c..0c677b8e1b1a103c7d727dba19fff1f74b7ed382 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -22,7 +22,7 @@ index 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2 public final ChunkProviderServer chunkProvider; // Paper - public boolean tickingEntities; private final MinecraftServer server; -@@ -1311,12 +1311,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1310,12 +1310,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) { diff --git a/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch index f9025282c6..cfcfb0363a 100644 --- a/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch @@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas. I would love to see this change in Vanilla, so Mojang please pull :) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ba341e0174cdc3b5b8bc83b7430270181ea92793..26ab855dcf38446a3d8577108bd16fdbb76126b2 100644 +index f22bed69f690f6e4754b87dd61cebe9c6627b12d..c8a7d8092a2849b62a8d83d7970756fd76100025 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -279,4 +279,12 @@ public class PaperConfig { +@@ -280,4 +280,12 @@ public class PaperConfig { "such as inventories, experience points, advancements and the like will not be saved when they log out."); } } diff --git a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch index 1932c4e2b8..057f304cd2 100644 --- a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch @@ -5,11 +5,69 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. +diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java +index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..d94874b02ddcb640c9d94c99d83e77b2e55dce73 100644 +--- a/src/main/java/net/minecraft/server/EntityHuman.java ++++ b/src/main/java/net/minecraft/server/EntityHuman.java +@@ -1085,7 +1085,9 @@ public abstract class EntityHuman extends EntityLiving { + if (flag5) { + if (i > 0) { + if (entity instanceof EntityLiving) { ++ ((EntityLiving) entity).knockingBackEntity = this; // Paper + ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ ((EntityLiving) entity).knockingBackEntity = null; // Paper + } else { + entity.h((double) (-MathHelper.sin(this.yaw * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 0.017453292F) * (float) i * 0.5F)); + } +@@ -1109,7 +1111,9 @@ public abstract class EntityHuman extends EntityLiving { + if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) { + // CraftBukkit start - Only apply knockback if the damage hits + if (entityliving.damageEntity(DamageSource.playerAttack(this).sweep(), f4)) { ++ ((EntityLiving) entity).knockingBackEntity = this; // Paper + entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ ((EntityLiving) entity).knockingBackEntity = null; // Paper + } + // CraftBukkit end + } +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java +index 3997dc6d979bf5a027861397b948aa4e8486fc58..57521337ea5ad4b944cf7303d2b3f9b34431116a 100644 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java ++++ b/src/main/java/net/minecraft/server/EntityInsentient.java +@@ -1479,7 +1479,9 @@ public abstract class EntityInsentient extends EntityLiving { + + if (flag) { + if (f1 > 0.0F && entity instanceof EntityLiving) { ++ ((EntityLiving) entity).knockingBackEntity = this; // Paper + ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ ((EntityLiving) entity).knockingBackEntity = null; // Paper + this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D)); + } + diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..324a98bf245f410983840ef9970e7215e84f7465 100644 +index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92dece2982e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1531,6 +1531,16 @@ public abstract class EntityLiving extends Entity { +@@ -1239,7 +1239,9 @@ public abstract class EntityLiving extends Entity { + } + + this.aw = (float) (MathHelper.d(d1, d0) * 57.2957763671875D - (double) this.yaw); ++ this.knockingBackEntity = entity1 instanceof EntityLiving ? ((EntityLiving) entity1) : null; // Paper + this.a(0.4F, d0, d1); ++ this.knockingBackEntity = null; // Paper + } else { + this.aw = (float) ((int) (Math.random() * 2.0D) * 180); + } +@@ -1287,7 +1289,9 @@ public abstract class EntityLiving extends Entity { + } + + protected void f(EntityLiving entityliving) { ++ ((EntityLiving) entityliving).knockingBackEntity = this; // Paper + entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ()); ++ ((EntityLiving) entityliving).knockingBackEntity = null; // Paper + } + + private boolean f(DamageSource damagesource) { +@@ -1531,8 +1535,19 @@ public abstract class EntityLiving extends Entity { Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f); this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z); @@ -19,10 +77,13 @@ index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..324a98bf245f410983840ef9970e7215 + org.bukkit.util.Vector delta = new org.bukkit.util.Vector(currentMot.x - vec3d.x, currentMot.y - vec3d.y, currentMot.z - vec3d.z); + // Restore old velocity to be able to access it in the event + this.setMot(vec3d); -+ if (entity == null || new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent((LivingEntity) getBukkitEntity(), entity.getBukkitEntity(), f, delta).callEvent()) { ++ if (knockingBackEntity == null || new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent((LivingEntity) getBukkitEntity(), knockingBackEntity.getBukkitEntity(), f, delta).callEvent()) { + this.setMot(vec3d.x + delta.getX(), vec3d.y + delta.getY(), vec3d.z + delta.getZ()); + } + // Paper end } } ++ EntityLiving knockingBackEntity; // Paper + @Nullable + protected SoundEffect getSoundHurt(DamageSource damagesource) { diff --git a/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch index 3ed7f9cd81..3a3ca0adfb 100644 --- a/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 324a98bf245f410983840ef9970e7215e84f7465..3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927 100644 +index d0a389e6dc73202a3fa7c82eace1c92dece2982e..b80068b184b32256f1944b9863454726852cd502 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -118,7 +118,7 @@ public abstract class EntityLiving extends Entity { @@ -18,7 +18,7 @@ index 324a98bf245f410983840ef9970e7215e84f7465..3edd63cbfc3d4bf058f7fb56a4ed4a04 protected int bk; protected int bl; private BlockPosition bE; -@@ -3149,10 +3149,12 @@ public abstract class EntityLiving extends Entity { +@@ -3154,10 +3154,12 @@ public abstract class EntityLiving extends Entity { return this.activeItem; } diff --git a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch index 076008d167..474051f838 100644 --- a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -19,7 +19,7 @@ index 33ce9a500430a01650e69a3568c8b03db325a936..cea15d50ed89430ee8d8cff9de21e1fc + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..785146bfb64fe1a467120d706aff7450cb9a8b96 100644 +index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a14f4fa278 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java @@ -28,10 +28,10 @@ public class EnderDragonBattle { @@ -46,3 +46,21 @@ index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..785146bfb64fe1a467120d706aff7450 this.world = worldserver; if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) { if (nbttagcompound.b("Dragon")) { +@@ -376,7 +380,7 @@ public class EnderDragonBattle { + + private void a(BlockPosition blockposition) { + this.world.triggerEffect(3000, blockposition, 0); +- WorldGenerator.END_GATEWAY.b((WorldGenFeatureConfiguration) WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); ++ WorldGenerator.END_GATEWAY.b(WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); // Paper - decompile error + } + + private void a(boolean flag) { +@@ -388,7 +392,7 @@ public class EnderDragonBattle { + } + } + +- worldgenendtrophy.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); ++ worldgenendtrophy.b(WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); // Paper - decompile error + } + + private EntityEnderDragon o() { diff --git a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch index 90a0c96744..f22644abc7 100644 --- a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4893daca7ea64504731cfab455e09b0a11c65857..1f3e5c384a66bb0767cc18bdbe99b942f30faa55 100644 +index d94874b02ddcb640c9d94c99d83e77b2e55dce73..1249a7ae8fa8d6ea33cbc276717f1e4553f73b85 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -155,7 +155,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -114,10 +114,10 @@ index 70339603aa3e256470be241bf033f3471e2090ea..ef1ea58c252d063ce282d244236a5106 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf38772dc20766 100644 +index 0c677b8e1b1a103c7d727dba19fff1f74b7ed382..8a42f9ed3e1579b8b034de9321e5545505298d6b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -968,7 +968,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -967,7 +967,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { for (TileEntity tileentity : chunk.getTileEntities().values()) { if (tileentity instanceof IInventory) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) { @@ -126,7 +126,7 @@ index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf3877 } } } -@@ -1026,7 +1026,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1025,7 +1025,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { @@ -155,10 +155,10 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ec0cb22d53733bed33019b257ac06ca9dc80d19e..5575c44d6f427661de1fec2c69932b446284c54d 100644 +index ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3..0ba5b2a444660f280b673dbd0db9ded38fa6a839 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -788,7 +788,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { diff --git a/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch index ce7537874f..99513fb60b 100644 --- a/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index dbc7db5c52752c52b3e84b370bbf38772dc20766..781b84535c105987d4b65e744977c87049b2a1a4 100644 +index 8a42f9ed3e1579b8b034de9321e5545505298d6b..c37b69b1632a72e3c7df5fd2643c0b3ff517d06b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -958,7 +958,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -957,7 +957,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch index d82bdcfc29..a850ab78a0 100644 --- a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 357d9293b66eee667f49e566f6f7b5449666986e..09567fe1628f9d2393e7902782e3cdc91531bb18 100644 +index 039a95a62e115f7095c38eb9a161dc0ff054a50a..2fcf43b7a2c5af2f7965a8556a3be9a086dc6420 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2429,7 +2429,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index f4b8a2c0b8..634e4ac662 100644 --- a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 09567fe1628f9d2393e7902782e3cdc91531bb18..c84bf924c9d1c98b469f279302d8595cece71960 100644 +index 2fcf43b7a2c5af2f7965a8556a3be9a086dc6420..f735c8cc9f68451ec64c2024769c37955e2ea963 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -40,7 +40,7 @@ index 4ae3e91677ecf9c2104a229b4e8b229d18b87aa4..458802dc4b1f923b159168efff0546bb protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6f91878fedd3bf8daedc16bcde7ac1fd042f704c..8148ecad0e313d2e6c0307915aaa670e7ad5a317 100644 +index 8d9dcdce1f395025ce7f644ba25212a83a438be4..3f91ae81cf87b5455a79fa94111cecae77b9986c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -52,20 +52,20 @@ index 6f91878fedd3bf8daedc16bcde7ac1fd042f704c..8148ecad0e313d2e6c0307915aaa670e public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 781b84535c105987d4b65e744977c87049b2a1a4..ac0bcde5ccc9ebb88922d8b82381b03675b87ae6 100644 +index c37b69b1632a72e3c7df5fd2643c0b3ff517d06b..9177f300e734afc5e4739655cdcb8b33866ff6cc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -84,6 +84,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -83,6 +83,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { + public final Convertable.ConversionSession convertable; public final UUID uuid; - boolean hasPhysicsEvent = true; // Paper + private static Throwable getAddToWorldStackTrace(Entity entity) { + return new Throwable(entity + " Added to world at " + new java.util.Date()); + } - public Chunk getChunkIfLoaded(int x, int z) { + @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkProvider.getChunkAt(x, z, false); -@@ -920,8 +923,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -919,8 +922,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -95,7 +95,7 @@ index 781b84535c105987d4b65e744977c87049b2a1a4..ac0bcde5ccc9ebb88922d8b82381b036 // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit return false; } else if (this.isUUIDTaken(entity)) { -@@ -1081,7 +1104,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1080,7 +1103,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 547cd38154..82bb93105b 100644 --- a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -19,10 +19,10 @@ index 387e0dcb9f01ad947daaa19211331a96742ce004..eaaa51e4bf761f41fd516402ce1ad0f9 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8148ecad0e313d2e6c0307915aaa670e7ad5a317..66ce6afd46be67a131091d16b6a1221bbff333b5 100644 +index 2437b73f70594e6745a1a071e23ef1626aeddfef..ba725d77e49e4e60a951fd8bb65b8422a46d0b71 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -836,6 +836,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -840,6 +840,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // Paper end } } diff --git a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch index bf5699bc00..afd2d5c6f4 100644 --- a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac5943b9df 100644 +index 26d446077bb563ca3c5bb0339695b3364a3e41bf..88a1db211286fc8a6164312d7eb0839c00969e0e 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java @@ -453,6 +453,7 @@ public abstract class BlockBase { @@ -17,7 +17,7 @@ index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac 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 c84bf924c9d1c98b469f279302d8595cece71960..3b718673e250a1f9e12ce58481ed533151ad3754 100644 +index f735c8cc9f68451ec64c2024769c37955e2ea963..f35ebacaf7c3a583d48efe58db9583c12c9c31a1 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 @@ -108,7 +108,7 @@ index 86f6f082fe2991ea9065b09c9680b76ca1cf7154..b6e2a3d8d0cf510f497c6f974356fafa if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c(new IllegalArgumentException()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 66ce6afd46be67a131091d16b6a1221bbff333b5..f6cb503b8eb329cb6bfaa960f812da3c99ce45a8 100644 +index ba725d77e49e4e60a951fd8bb65b8422a46d0b71..753b9f61a2f7a1851e18748500d745906e3adee8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -170,6 +170,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch index 31cd188c18..e8239176a3 100644 --- a/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -58,7 +58,7 @@ index a27f91e6c3d1f5dd0adf8a3b48a640cc63676114..3ba19f75d24a1539c94f4fed9b8f90ae return; } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3b718673e250a1f9e12ce58481ed533151ad3754..c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1 100644 +index f35ebacaf7c3a583d48efe58db9583c12c9c31a1..e41c0a5891ef10ab7537f0f00ee6ab3e418d762c 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/0258-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch index 3abc5efc8b..5ad7dc6a8e 100644 --- a/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch @@ -80,10 +80,10 @@ index 28039aa8421207ce04840cc90e03d21bc8b7269f..17b8c4445af2bd2ed907d05ed3c396d4 public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) { if (nbttagcompound != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ac0bcde5ccc9ebb88922d8b82381b03675b87ae6..d81d6f7b984dc3587baadc96fc33f087b3594dcc 100644 +index 9177f300e734afc5e4739655cdcb8b33866ff6cc..972a2fc6febc43156b8aa0917b881c6c604ec2c1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1001,6 +1001,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1000,6 +1000,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { List[] aentityslice = chunk.getEntitySlices(); // Spigot int i = aentityslice.length; @@ -91,7 +91,7 @@ index ac0bcde5ccc9ebb88922d8b82381b03675b87ae6..d81d6f7b984dc3587baadc96fc33f087 for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot Iterator iterator = entityslice.iterator(); -@@ -1013,11 +1014,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1012,11 +1013,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { throw (IllegalStateException) SystemUtils.c(new IllegalStateException("Removing entity while ticking!")); } diff --git a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch index f019e41cd0..b55cf6a49f 100644 --- a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -51,7 +51,7 @@ index 3ba19f75d24a1539c94f4fed9b8f90aecc918cdc..f7be161c8557ae3848227b1a61e27374 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 c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1..7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603 100644 +index e41c0a5891ef10ab7537f0f00ee6ab3e418d762c..413dd5456d14842ab48143b6ee35e37dcb5ca3db 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -195,6 +195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -63,10 +63,10 @@ index c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1..7ccaaa9f2fe2a663674d2cd8a2bd759f 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 d81d6f7b984dc3587baadc96fc33f087b3594dcc..ba0bb12dd5c5068d31c8a925e31804ddf2cec5da 100644 +index 972a2fc6febc43156b8aa0917b881c6c604ec2c1..afba8d654bd227ad60ec502de8834c45f239f479 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1153,6 +1153,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1152,6 +1152,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -74,7 +74,7 @@ index d81d6f7b984dc3587baadc96fc33f087b3594dcc..ba0bb12dd5c5068d31c8a925e31804dd new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1165,6 +1166,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1164,6 +1165,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.removeEntityFromChunk(entity); this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); diff --git a/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch index 3f1bf012fe..1f0031f56d 100644 --- a/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 26ab855dcf38446a3d8577108bd16fdbb76126b2..adef07d4d521b4aaa6f3389b04aa27e29bec0229 100644 +index c8a7d8092a2849b62a8d83d7970756fd76100025..2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -287,4 +287,18 @@ public class PaperConfig { +@@ -288,4 +288,18 @@ public class PaperConfig { Bukkit.getLogger().log(Level.INFO, "Using Aikar's Alternative Luck Formula to apply Luck attribute to all loot pool calculations. See https://luckformula.emc.gs"); } } diff --git a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch index db1e261ddf..0a95da6266 100644 --- a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch @@ -64,7 +64,7 @@ index aada95b9d02d8ca0b870ec08875b5b719a543212..d68ee8d5dc5f8a75dc465f155acccb79 ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f6cb503b8eb329cb6bfaa960f812da3c99ce45a8..a47de606a82b840180bd203816955fb657cc7c6c 100644 +index aaa68008aacf2e528e6c2dc7e0307ee7dc35da12..7b7785f79ed176967d4c91c2d77c6f6ce73b30b8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -210,6 +210,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -86,10 +86,10 @@ index f6cb503b8eb329cb6bfaa960f812da3c99ce45a8..a47de606a82b840180bd203816955fb6 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 ba0bb12dd5c5068d31c8a925e31804ddf2cec5da..14ec04c6503cca58f64fc2a82a9fd715a06dcefb 100644 +index afba8d654bd227ad60ec502de8834c45f239f479..f6c459facde67500499365af6da9f43adcd80606 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1484,15 +1484,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1483,15 +1483,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition)); } diff --git a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch index 850f230060..ae4b0dfde2 100644 --- a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228dd4f25e6 100644 +index 2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9..1b21911c3e4fd1d4a3305176bb8477c370256906 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -24,6 +24,7 @@ import org.bukkit.configuration.file.YamlConfiguration; +@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration; import co.aikar.timings.Timings; import co.aikar.timings.TimingsManager; import org.spigotmc.SpigotConfig; @@ -20,7 +20,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228 public class PaperConfig { -@@ -288,6 +289,14 @@ public class PaperConfig { +@@ -289,6 +290,14 @@ public class PaperConfig { } } @@ -36,7 +36,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 790d7df8691537a976086b5507db4f97054706de..a7be2875faa968d2e3939974f62c977ca03e9c5b 100644 +index d122fefe0d3b785a5aad6ceceba221279439fe7b..f33624e65a56bd7cf4432eecdd6834fa3f32cda5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -900,6 +900,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant +Date: Thu, 23 Aug 2018 11:45:32 -0400 +Subject: [PATCH] Optimize CraftBlockData Creation + +Avoids a hashmap lookup by cacheing a reference to the CraftBlockData +and cloning it when one is needed. + +diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java +index 88a1db211286fc8a6164312d7eb0839c00969e0e..aa4bfc9fe8e917c1c19838b0a7b045a11fc9300b 100644 +--- a/src/main/java/net/minecraft/server/BlockBase.java ++++ b/src/main/java/net/minecraft/server/BlockBase.java +@@ -323,6 +323,14 @@ public abstract class BlockBase { + this.o = blockbase_info.t; + this.p = blockbase_info.u; + } ++ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time ++ private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData; ++ ++ public org.bukkit.craftbukkit.block.data.CraftBlockData createCraftBlockData() { ++ if (cachedCraftBlockData == null) cachedCraftBlockData = org.bukkit.craftbukkit.block.data.CraftBlockData.createData(getBlockData()); ++ return (org.bukkit.craftbukkit.block.data.CraftBlockData) cachedCraftBlockData.clone(); ++ } ++ // Paper end + + public void a() { + if (!this.getBlock().o()) { +diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +index c7eed6b572cef2c735b1eb2f587c24876047cf94..bbded5671e986be34ebe3100e4c10ee0d5741764 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +@@ -553,7 +553,17 @@ public class CraftBlockData implements BlockData { + return craft; + } + ++ // Paper start - optimize creating BlockData to not need a map lookup ++ static { ++ // Initialize cached data for all IBlockData instances after registration ++ Block.REGISTRY_ID.iterator().forEachRemaining(IBlockData::createCraftBlockData); ++ } + public static CraftBlockData fromData(IBlockData data) { ++ return data.createCraftBlockData(); ++ } ++ ++ public static CraftBlockData createData(IBlockData data) { ++ // Paper end + return MAP.getOrDefault(data.getBlock().getClass(), CraftBlockData::new).apply(data); + } + } diff --git a/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch index 51df1d92fa..eb583d4137 100644 --- a/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927..4f80c46e327006a3d9028ca25db8554fba7b57ea 100644 +index b80068b184b32256f1944b9863454726852cd502..12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3436,6 +3436,23 @@ public abstract class EntityLiving extends Entity { +@@ -3441,6 +3441,23 @@ public abstract class EntityLiving extends Entity { this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND); } // Paper start diff --git a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index 11bffc82a9..400cf1fe09 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1f3e5c384a66bb0767cc18bdbe99b942f30faa55..0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612 100644 +index 1249a7ae8fa8d6ea33cbc276717f1e4553f73b85..af554396fdb25719c158a81ccab76e91f5df2ff5 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -2006,14 +2006,17 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2010,14 +2010,17 @@ public abstract class EntityHuman extends EntityLiving { this.datawatcher.set(EntityHuman.bs, nbttagcompound); } @@ -27,10 +27,10 @@ index 1f3e5c384a66bb0767cc18bdbe99b942f30faa55..0fd29c42179c7ac0c89cfd35b257ab0a this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5575c44d6f427661de1fec2c69932b446284c54d..3ec69b90b5e49407fc986741f189b6ea108a2118 100644 +index 0ba5b2a444660f280b673dbd0db9ded38fa6a839..7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1944,6 +1944,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1945,6 +1945,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index f544dc1e61..44df65ab89 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -27,7 +27,7 @@ index 6281f7900afab3ef1c9ba3c034b91cbfa1900f50..3c2f8407906879c8dca07b538f59f4bb 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 7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603..4e3ea0a00b903b09e2f4d62a330f9faf5ff15f67 100644 +index 413dd5456d14842ab48143b6ee35e37dcb5ca3db..a704feb0c19b56964d017f9e0ea3f26bc3e975f8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1460,6 +1460,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -47,10 +47,10 @@ index 7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603..4e3ea0a00b903b09e2f4d62a330f9faf protected void k(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index d5c09152acc93b25d626284071599afdbd76b709..51e9f4a6e09474a7489d2872a800308ee3f02e46 100644 +index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..74c58c3f82a94a3ec5e53c7f92e54cee80dc9e8a 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -701,7 +701,8 @@ public class EntityArmorStand extends EntityLiving { +@@ -664,7 +664,8 @@ public class EntityArmorStand extends EntityLiving { @Override public void killEntity() { @@ -119,7 +119,7 @@ index c2a3bd8f25e91f79723074d93f6a646a8ce76d8c..4934e71225fe1242615660a379e797e2 public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7e429d1b0 100644 +index 12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38..c00031656bb6d2f986f555c68bb2fa9b9b0c0e6d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -95,7 +95,7 @@ public abstract class EntityLiving extends Entity { @@ -139,7 +139,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 @Override public float getBukkitYaw() { -@@ -1248,13 +1249,17 @@ public abstract class EntityLiving extends Entity { +@@ -1250,13 +1251,17 @@ public abstract class EntityLiving extends Entity { if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback if (this.dk()) { if (!this.f(damagesource)) { @@ -161,7 +161,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 } } else if (flag1) { this.c(damagesource); -@@ -1392,6 +1397,7 @@ public abstract class EntityLiving extends Entity { +@@ -1396,6 +1401,7 @@ public abstract class EntityLiving extends Entity { Entity entity = damagesource.getEntity(); EntityLiving entityliving = this.getKillingEntity(); @@ -169,7 +169,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 if (this.aV >= 0 && entityliving != null) { entityliving.a(this, this.aV, damagesource); } -@@ -1403,16 +1409,36 @@ public abstract class EntityLiving extends Entity { +@@ -1407,16 +1413,36 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.entityWakeup(); } @@ -208,7 +208,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 } } -@@ -1420,7 +1446,7 @@ public abstract class EntityLiving extends Entity { +@@ -1424,7 +1450,7 @@ public abstract class EntityLiving extends Entity { if (!this.world.isClientSide) { boolean flag = false; @@ -217,7 +217,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { BlockPosition blockposition = this.getChunkCoordinates(); IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); -@@ -1441,7 +1467,8 @@ public abstract class EntityLiving extends Entity { +@@ -1445,7 +1471,8 @@ public abstract class EntityLiving extends Entity { } } @@ -227,7 +227,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 Entity entity = damagesource.getEntity(); int i; -@@ -1454,22 +1481,26 @@ public abstract class EntityLiving extends Entity { +@@ -1458,22 +1485,26 @@ public abstract class EntityLiving extends Entity { boolean flag = this.lastDamageByPlayerTime > 0; this.dropInventory(); // CraftBukkit - from below @@ -257,7 +257,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 // CraftBukkit start public int getExpReward() { -@@ -1549,6 +1580,7 @@ public abstract class EntityLiving extends Entity { +@@ -1554,6 +1585,7 @@ public abstract class EntityLiving extends Entity { return SoundEffects.ENTITY_GENERIC_HURT; } @@ -265,7 +265,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 @Nullable protected SoundEffect getSoundDeath() { return SoundEffects.ENTITY_GENERIC_DEATH; -@@ -2068,10 +2100,12 @@ public abstract class EntityLiving extends Entity { +@@ -2073,10 +2105,12 @@ public abstract class EntityLiving extends Entity { } @@ -357,10 +357,10 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3ec69b90b5e49407fc986741f189b6ea108a2118..e112a87792a76ccbc25caa1253c54db601de76aa 100644 +index 7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75..51e7c6d82248b5c0938d37607c64a9c10cb4de4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1738,7 +1738,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1739,7 +1739,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { diff --git a/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index b4461e819f..9e95ad585c 100644 --- a/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Uses an EnumMap as well as a Set paired List for O(1) contains calls. diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index ae0ac8d383ca11a683465d8c83a8b8a66e567079..4c656f434f2637a6af4cdb9efe3414de81e4ea9b 100644 +index ae0ac8d383ca11a683465d8c83a8b8a66e567079..30aeb45d63394b7d91c2dd7b92cfc9cefa3c088c 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -69,7 +69,7 @@ public class BiomeBase { - protected final Map>> r; - protected final List> s = Lists.newArrayList(); - private final Map, StructureFeature> u; -- private final Map> v; -+ private final Map> v = Maps.newEnumMap(EnumCreatureType.class); // Paper - private final Map, BiomeBase.e> w = Maps.newHashMap(); - private final List x; - private final ThreadLocal y = ThreadLocal.withInitial(() -> { +@@ -119,7 +119,7 @@ public class BiomeBase { + this.r.put(worldgenstage_decoration, Lists.newArrayList()); + } + +- this.v = Maps.newHashMap(); ++ this.v = Maps.newEnumMap(EnumCreatureType.class); // Paper + EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); + + i = aenumcreaturetype.length; @@ -127,7 +127,7 @@ public class BiomeBase { for (j = 0; j < i; ++j) { EnumCreatureType enumcreaturetype = aenumcreaturetype[j]; @@ -27,6 +27,15 @@ index ae0ac8d383ca11a683465d8c83a8b8a66e567079..4c656f434f2637a6af4cdb9efe3414de } } else { +@@ -150,7 +150,7 @@ public class BiomeBase { + this.u = (Map) list.stream().collect(Collectors.toMap((structurefeature) -> { + return structurefeature.b; + }, Function.identity())); +- this.v = map2; ++ this.v = Maps.newEnumMap(EnumCreatureType.class); this.v.putAll(map2); // Paper + this.x = list1; + this.l = (String) optional.orElse(null); // Paper - decompile fix + Stream stream = map1.values().stream().flatMap(Collection::stream).filter((worldgenfeatureconfigured) -> { @@ -433,6 +433,38 @@ public class BiomeBase { return this.l; } diff --git a/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch b/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch deleted file mode 100644 index cdcdcc4d14..0000000000 --- a/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch +++ /dev/null @@ -1,242 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Mon, 17 Sep 2018 23:37:31 -0400 -Subject: [PATCH] Optimize Server World Map - -Minecraft moved worlds to a hashmap in 1.13.1. -This creates inconsistent order for iteration of the map. - -This patch restores World management to be back as an Array. - -.values() will allow us to iterate as it was pre 1.13.1 by -ArrayList, giving consistent ordering and effecient iteration performance. - -KeySet and EntrySet iteration is proxied to the List iterator, -and should retain manipulation behavior but nothing should be doing that. - -Getting a World by dimension ID is now back a constant time operation. - -Hopefully no other plugins try to mess with this map, as we are only handling -known NMS used methods, but we can add more if naughty plugins are found later. - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldMap.java b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0f0c5330c364909c85cc8cf58fb5c478ffdaeb25 ---- /dev/null -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java -@@ -0,0 +1,193 @@ -+package com.destroystokyo.paper; -+ -+import net.minecraft.server.DimensionManager; -+import net.minecraft.server.ResourceKey; -+import net.minecraft.server.World; -+import net.minecraft.server.WorldServer; -+ -+import javax.annotation.Nonnull; -+import java.util.AbstractSet; -+import java.util.ArrayList; -+import java.util.Collection; -+import java.util.HashMap; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Map; -+import java.util.Set; -+ -+public class PaperWorldMap extends HashMap, WorldServer> { -+ private final List worlds = new ArrayList<>(); -+ private final List worldsIterable = new ArrayList() { -+ @Override -+ public Iterator iterator() { -+ Iterator iterator = super.iterator(); -+ return new Iterator() { -+ private WorldServer last; -+ -+ @Override -+ public boolean hasNext() { -+ return iterator.hasNext(); -+ } -+ -+ @Override -+ public WorldServer next() { -+ this.last = iterator.next(); -+ return last; -+ } -+ -+ @Override -+ public void remove() { -+ worlds.set(last.worldProvider.getDimensionManager().getDimensionID() + 1, null); -+ } -+ }; -+ } -+ }; -+ @Override -+ public int size() { -+ return worldsIterable.size(); -+ } -+ -+ @Override -+ public boolean isEmpty() { -+ return worldsIterable.isEmpty(); -+ } -+ -+ @Override -+ public WorldServer get(Object key) { -+ // Will hit the below method -+ return key instanceof ResourceKey ? get((ResourceKey) key) : null; -+ } -+ // TODO figure out what to do with dimension ids -+ public WorldServer get(ResourceKey key) { -+ int id = key.getDimensionID()+1; -+ return worlds.size() > id ? worlds.get(id) : null; -+ } -+ -+ @Override -+ public boolean containsKey(Object key) { -+ // will hit below method -+ return key instanceof DimensionManager && containsKey((DimensionManager) key); -+ } -+ public boolean containsKey(DimensionManager key) { -+ return get(key) != null; -+ } -+ -+ @Override -+ public WorldServer put(ResourceKey key, WorldServer value) { -+ while (worlds.size() <= key.getDimensionID()+1) { -+ worlds.add(null); -+ } -+ WorldServer old = worlds.set(key.getDimensionID()+1, value); -+ if (old != null) { -+ worldsIterable.remove(old); -+ } -+ worldsIterable.add(value); -+ return old; -+ } -+ -+ @Override -+ public void putAll(Map, ? extends WorldServer> m) { -+ for (Entry, ? extends WorldServer> e : m.entrySet()) { -+ put(e.getKey(), e.getValue()); -+ } -+ } -+ -+ @Override -+ public WorldServer remove(Object key) { -+ return key instanceof DimensionManager ? remove((DimensionManager) key) : null; -+ } -+ -+ public WorldServer remove(DimensionManager key) { -+ WorldServer old; -+ if (key.getDimensionID()+1 == worlds.size() - 1) { -+ old = worlds.remove(key.getDimensionID()+1); -+ } else { -+ old = worlds.set(key.getDimensionID() + 1, null); -+ } -+ if (old != null) { -+ worldsIterable.remove(old); -+ } -+ return old; -+ } -+ -+ @Override -+ public void clear() { -+ throw new RuntimeException("What the hell are you doing?"); -+ } -+ -+ @Override -+ public boolean containsValue(Object value) { -+ return value instanceof WorldServer && get(((WorldServer) value).getDimensionKey()) != null; -+ } -+ -+ @Nonnull -+ @Override -+ public Set> keySet() { -+ return new AbstractSet>() { -+ @Override -+ public Iterator> iterator() { -+ Iterator iterator = worldsIterable.iterator(); -+ return new Iterator>() { -+ -+ @Override -+ public boolean hasNext() { -+ return iterator.hasNext(); -+ } -+ -+ @Override -+ public ResourceKey next() { -+ return iterator.next().getDimensionKey(); -+ } -+ -+ @Override -+ public void remove() { -+ iterator.remove(); -+ } -+ }; -+ } -+ -+ @Override -+ public int size() { -+ return worlds.size(); -+ } -+ }; -+ } -+ -+ @Override -+ public Collection values() { -+ return worldsIterable; -+ } -+ -+ @Override -+ public Set, WorldServer>> entrySet() { -+ return new AbstractSet, WorldServer>>() { -+ @Override -+ public Iterator, WorldServer>> iterator() { -+ Iterator iterator = worldsIterable.iterator(); -+ return new Iterator, WorldServer>>() { -+ -+ @Override -+ public boolean hasNext() { -+ return iterator.hasNext(); -+ } -+ -+ @Override -+ public Entry, WorldServer> next() { -+ WorldServer entry = iterator.next(); -+ return new SimpleEntry<>(entry.getDimensionKey(), entry); -+ } -+ -+ @Override -+ public void remove() { -+ iterator.remove(); -+ } -+ }; -+ } -+ -+ @Override -+ public int size() { -+ return worldsIterable.size(); -+ } -+ }; -+ } -+} -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a7be2875faa968d2e3939974f62c977ca03e9c5b..1d4ec1412db104a6437b57afe192063188fabd10 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -91,7 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant, WorldServer> worldServer; -+ public final Map, WorldServer> worldServer = new com.destroystokyo.paper.PaperWorldMap(); // Paper; - private PlayerList playerList; - private volatile boolean isRunning; - private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart -@@ -441,7 +441,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant +Date: Wed, 10 Oct 2018 21:22:44 -0500 +Subject: [PATCH] Check Drowned for Villager Aggression Config + + +diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java +index 1f1f77776d840c6fa1156239a1da9bb97a328fb1..e6425bdf1a85e773f5555db1aebe7e159f7cd37c 100644 +--- a/src/main/java/net/minecraft/server/EntityDrowned.java ++++ b/src/main/java/net/minecraft/server/EntityDrowned.java +@@ -29,7 +29,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { + this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D)); + this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityDrowned.class})).a(EntityPigZombie.class)); + this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::j)); +- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); ++ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); // Paper + this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); + this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bv)); + } diff --git a/Spigot-Server-Patches/0308-Here-s-Johnny.patch b/Spigot-Server-Patches/0308-Here-s-Johnny.patch new file mode 100644 index 0000000000..ce187e9c8f --- /dev/null +++ b/Spigot-Server-Patches/0308-Here-s-Johnny.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Fri, 12 Oct 2018 01:37:22 -0500 +Subject: [PATCH] Here's Johnny! + + +diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java +index 9c152b79164710d3d4175d0acbc9548d61390097..58315906b641ba46ce73b6fefc43ea333bb0a088 100644 +--- a/src/main/java/net/minecraft/server/EntityVindicator.java ++++ b/src/main/java/net/minecraft/server/EntityVindicator.java +@@ -11,7 +11,7 @@ public class EntityVindicator extends EntityIllagerAbstract { + private static final Predicate b = (enumdifficulty) -> { + return enumdifficulty == EnumDifficulty.NORMAL || enumdifficulty == EnumDifficulty.HARD; + }; +- private boolean bv; ++ private boolean bv; public boolean isJohnny() { return bv; } public void setJohnny(boolean johnny) { bv = johnny; } // Paper - OBFHELPER + + public EntityVindicator(EntityTypes entitytypes, World world) { + super(entitytypes, world); +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java +index 951d47929893fce38183b81cf4ec6a7d4204acd1..5ff957ced7a86f4fa3a0751b4eed5a6fdc525da4 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java +@@ -25,4 +25,14 @@ public class CraftVindicator extends CraftIllager implements Vindicator { + public EntityType getType() { + return EntityType.VINDICATOR; + } ++ ++ // Paper start ++ public boolean isJohnny() { ++ return getHandle().isJohnny(); ++ } ++ ++ public void setJohnny(boolean johnny) { ++ getHandle().setJohnny(johnny); ++ } ++ // Paper end + } diff --git a/Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 96% rename from Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch index 189701cc38..c826b39ad4 100644 --- a/Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b49a1a6f5017c9e183a7d08b16e89899c25a9717 100644 +index 3c28dc61f97a65a0440c122ac5777cb9e24cdb3a..6f660388aa0d56577ad1c3f463c96d925c964821 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -405,4 +405,9 @@ public class PaperWorldConfig { +@@ -399,4 +399,9 @@ public class PaperWorldConfig { waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5); log("Water over lava flow speed: " + waterOverLavaFlowSpeed); } diff --git a/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch similarity index 93% rename from Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch index 92ecb5f738..695aa03bb2 100644 --- a/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4e3ea0a00b903b09e2f4d62a330f9faf5ff15f67..58ecc49ba91cdb9c100ce3319434f2110b9a5892 100644 +index a704feb0c19b56964d017f9e0ea3f26bc3e975f8..41c14d367e0b51e109001167d3c7b40676f364b8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2256,6 +2256,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from Spigot-Server-Patches/0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 97% rename from Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index dd6bcdf540..d4913bb167 100644 --- a/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -12,7 +12,7 @@ server threads Allow usage of a single thread executor by not using ForkJoin so single core CPU's. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1d4ec1412db104a6437b57afe192063188fabd10..e4f033d5ad66da5a38e5bfee861e9ea3399f30fe 100644 +index a7be2875faa968d2e3939974f62c977ca03e9c5b..29f7e78fc21ccca1a080055fe616996d1ede666f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -176,6 +176,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { +@@ -1,5 +1,6 @@ + package net.minecraft.server; + ++import io.netty.channel.ChannelFuture; // Paper + import java.io.IOException; + + public interface Packet { +@@ -11,6 +12,20 @@ public interface Packet { void a(T t0); // Paper start @@ -323,7 +330,7 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..c5edf8c4b01cc7ddac06797133e6fd13 + * @param player Null if not at PLAY stage yet + * @param future Can be null if packet was cancelled + */ -+ default void onPacketDispatchFinish(@javax.annotation.Nullable EntityPlayer player, @javax.annotation.Nullable io.netty.channel.ChannelFuture future) {} ++ default void onPacketDispatchFinish(@javax.annotation.Nullable EntityPlayer player, @javax.annotation.Nullable ChannelFuture future) {} + default boolean hasFinishListener() { return false; } + default boolean isReady() { return true; } + default java.util.List getExtraPackets() { return null; } diff --git a/Spigot-Server-Patches/0336-Handle-Oversized-Tile-Entities-in-chunks.patch b/Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0336-Handle-Oversized-Tile-Entities-in-chunks.patch rename to Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch diff --git a/Spigot-Server-Patches/0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch similarity index 100% rename from Spigot-Server-Patches/0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch rename to Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch diff --git a/Spigot-Server-Patches/0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch similarity index 100% rename from Spigot-Server-Patches/0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch rename to Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch diff --git a/Spigot-Server-Patches/0339-Allow-Saving-of-Oversized-Chunks.patch b/Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0339-Allow-Saving-of-Oversized-Chunks.patch rename to Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch diff --git a/Spigot-Server-Patches/0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 100% rename from Spigot-Server-Patches/0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch diff --git a/Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch similarity index 96% rename from Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch index 0260bb0ebc..f653f441e9 100644 --- a/Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch @@ -46,7 +46,7 @@ index 02c09f39848399a86d46bd17569b4f01a7b5ab1f..ed9b2f9adfecdc6d1b9925579ec51065 double[] adouble = new double[]{1.0D}; double d0 = vec3d1.x - vec3d.x; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6d06a5c258981db3bc645087b37a5a8339bc06eb..a76a618ecec1c9ed4afe39b942d44dad15d23fbc 100644 +index 505ba8e298a825ce69cc60c76cb040edeb0acdbd..e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1426,6 +1426,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -66,10 +66,10 @@ index 6d06a5c258981db3bc645087b37a5a8339bc06eb..a76a618ecec1c9ed4afe39b942d44dad return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1481cbafa1b4e48822d9e0fa2735b9829440fca3..79cf31d6fcd0e82ee146c489448a93a6e55e4190 100644 +index 0b4e39d93f28ec5c7835bace2ea969a6e99ac2a3..4c011f93c600d87951fe1dc8bf6b84fac7a532cb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3489,6 +3489,37 @@ public abstract class EntityLiving extends Entity { +@@ -3494,6 +3494,37 @@ public abstract class EntityLiving extends Entity { return world.rayTrace(raytrace); } diff --git a/Spigot-Server-Patches/0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch b/Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch similarity index 100% rename from Spigot-Server-Patches/0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch rename to Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch diff --git a/Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch similarity index 95% rename from Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch rename to Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch index a542d274e1..6fec15969b 100644 --- a/Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch @@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a76a618ecec1c9ed4afe39b942d44dad15d23fbc..70e520d7fe8150aa67e81b4983a165f00fe8a554 100644 +index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e7b7e95ab 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -72,10 +72,10 @@ index e4651eb2a94080bfa431b0b775ae8019fc922538..4b8dd6c1a9c796ded5ee0a63ccecebca }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 14ec04c6503cca58f64fc2a82a9fd715a06dcefb..a72f16cbcbc226854043bfec07e1e57dbe33c62c 100644 +index f6c459facde67500499365af6da9f43adcd80606..1b0c99de1cfe7de1096a3af043dccf0ba3f0ccfe 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -923,6 +923,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -922,6 +922,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot diff --git a/Spigot-Server-Patches/0344-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch similarity index 100% rename from Spigot-Server-Patches/0344-Update-entity-Metadata-for-all-tracked-players.patch rename to Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch diff --git a/Spigot-Server-Patches/0345-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0345-Implement-PlayerPostRespawnEvent.patch rename to Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch diff --git a/Spigot-Server-Patches/0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from Spigot-Server-Patches/0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/Spigot-Server-Patches/0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 100% rename from Spigot-Server-Patches/0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch diff --git a/Spigot-Server-Patches/0348-Server-Tick-Events.patch b/Spigot-Server-Patches/0349-Server-Tick-Events.patch similarity index 93% rename from Spigot-Server-Patches/0348-Server-Tick-Events.patch rename to Spigot-Server-Patches/0349-Server-Tick-Events.patch index 0217e2a927..8c10f39258 100644 --- a/Spigot-Server-Patches/0348-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0349-Server-Tick-Events.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4c610db03f4d8bae0e310d6a0680cefb7bc74872..b6e103bf140d04e9f3bda4112252da5d5fedcf6d 100644 +index b336cd541b8e3a9ebe3d89a487160d18a294dade..544bc9660b1104e7782bd9e06252d0bd9b2e700d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1120,6 +1120,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant, 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 c14d51f1ec37d7b40172ce8cc1c66a7a4f4a3bd5..4e926d5f483ad0d0fae5ceddf0b279128c030a5e 100644 +index 18305112c8fcf1de1a21d9afea1a987859615dc7..638d7303f55e99293703bca80c43f8f00a43c550 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableList; @@ -209,7 +209,7 @@ index c14d51f1ec37d7b40172ce8cc1c66a7a4f4a3bd5..4e926d5f483ad0d0fae5ceddf0b27912 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -989,8 +991,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -988,8 +990,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0359-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch similarity index 100% rename from Spigot-Server-Patches/0359-improve-CraftWorld-isChunkLoaded.patch rename to Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch diff --git a/Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 96% rename from Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch index cfe67f23c2..6cbe5687fb 100644 --- a/Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2debafdc1bb539a49c3f0723b696ea56e9b3eb16..91c9a027dd7aef8253f3d707c95e4ed917d32580 100644 +index 36df7068075e3ead6c7669a448fb885ad94c9fa3..8c61c0f0e60c32743c438fcdce76b236cc2a56c4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -449,4 +449,10 @@ public class PaperWorldConfig { +@@ -443,4 +443,10 @@ public class PaperWorldConfig { break; } } @@ -21,7 +21,7 @@ index 2debafdc1bb539a49c3f0723b696ea56e9b3eb16..91c9a027dd7aef8253f3d707c95e4ed9 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 09d2b5d07c16c186534fdf02ae9242bfee7655d5..adfcc92a0f059e724e51a17468939a87938797ab 100644 +index 21d014f1cae27c769471caad7f9e28f727213e07..e197bbca9891659998488c08c981619311055fc5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -608,6 +608,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0) { -+ try { -+ world.saveIncrementally(serverAutoSave); -+ } catch (ExceptionWorldConflict exceptionWorldConflict) { -+ MinecraftServer.LOGGER.warn(exceptionWorldConflict.getMessage()); -+ } ++ world.saveIncrementally(serverAutoSave); + } + } + // Paper end @@ -261,10 +257,10 @@ index 6dda11ffc022aa9bc7481506811a710a184f5e78..39d89d6209123ae2146ae292009cad44 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 58c6f9194dbd767650117594eee3ae0ba3a00dce..c2fffa60b3d020e4c70a2cabcf61ec36fb9edc65 100644 +index aeb787c68121e8aeca868def9c39010a527d0f70..13d0d358ced5f1617fc17f6706d359d0cf6c796d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -769,11 +769,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -768,11 +768,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { return !this.server.a(this, blockposition, entityhuman) && this.getWorldBorder().a(blockposition); } @@ -309,7 +305,7 @@ index 58c6f9194dbd767650117594eee3ae0ba3a00dce..c2fffa60b3d020e4c70a2cabcf61ec36 try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel")); -@@ -799,6 +831,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -798,6 +830,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit end } diff --git a/Spigot-Server-Patches/0370-Anti-Xray.patch b/Spigot-Server-Patches/0371-Anti-Xray.patch similarity index 99% rename from Spigot-Server-Patches/0370-Anti-Xray.patch rename to Spigot-Server-Patches/0371-Anti-Xray.patch index fc10c0f704..a6cf99e56d 100644 --- a/Spigot-Server-Patches/0370-Anti-Xray.patch +++ b/Spigot-Server-Patches/0371-Anti-Xray.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b947b31fc3b135f116af97907d5301619cc33070..43925ed1e5c210399ba9fedb7bf890a6bd617e4a 100644 +index c52fa7bfa82bcd03203f9a2311f09c9b7e5d9911..b3d080aa109d0ed77a3318d07474ec7e46aaa054 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,9 @@ @@ -18,7 +18,7 @@ index b947b31fc3b135f116af97907d5301619cc33070..43925ed1e5c210399ba9fedb7bf890a6 import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -470,4 +472,31 @@ public class PaperWorldConfig { +@@ -464,4 +466,31 @@ public class PaperWorldConfig { private void maxAutoSaveChunksPerTick() { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -98,7 +98,7 @@ index 0000000000000000000000000000000000000000..df7e4183d8842f5be8ae9d0698f8fa90 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java new file mode 100644 -index 0000000000000000000000000000000000000000..4ecd180fa84376319ef78bf9b21bf669b22ff817 +index 0000000000000000000000000000000000000000..c0d7767adb996edf9f645be591e4eee1d1dddf97 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java @@ -0,0 +1,620 @@ @@ -197,7 +197,7 @@ index 0000000000000000000000000000000000000000..4ecd180fa84376319ef78bf9b21bf669 + IBlockData blockData = ChunkSection.GLOBAL_PALETTE.getObject(i); + + if (blockData != null) { -+ solidGlobal[i] = blockData.getBlock().isOccluding(blockData, emptyChunk, zeroPos) ++ solidGlobal[i] = blockData.isOccluding(emptyChunk, zeroPos) + && blockData.getBlock() != Blocks.SPAWNER && blockData.getBlock() != Blocks.BARRIER && blockData.getBlock() != Blocks.SHULKER_BOX; + // shulker box checks TE. + } @@ -1382,7 +1382,7 @@ index ee8df274d43be753887fb77e4203e2ee30ea02b3..9f91c02b444874e690eacb0cfa0c8101 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8773b521db869f26525af7b4342955ade835b8ef..1434a6e2830aa455bb6ccfd2ce8c034b8d300414 100644 +index c40d7ef4682c686282094330a0954bd09596c9d5..350178efcbacea6261df98d694c49dde8fa57d97 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1414,7 +1414,7 @@ index 8773b521db869f26525af7b4342955ade835b8ef..1434a6e2830aa455bb6ccfd2ce8c034b this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -402,6 +406,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -406,6 +410,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit end IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1423,10 +1423,10 @@ index 8773b521db869f26525af7b4342955ade835b8ef..1434a6e2830aa455bb6ccfd2ce8c034b if (iblockdata1 == null) { // CraftBukkit start - remove blockstate if failed (or the same) diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c2fffa60b3d020e4c70a2cabcf61ec36fb9edc65..789fd7d3d7679408d11a20cca6db96ecb86a067d 100644 +index 13d0d358ced5f1617fc17f6706d359d0cf6c796d..abda45b1e833ef9d795f11670cf650ed2479673c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -96,7 +96,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -95,7 +95,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // Add env and gen to constructor, WorldData -> WorldDataServer public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { diff --git a/Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 94% rename from Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 134323c6db..fde8ce6bdf 100644 --- a/Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 43925ed1e5c210399ba9fedb7bf890a6bd617e4a..16727e92f591725c8f8cefb250b7ab8c64a19472 100644 +index b3d080aa109d0ed77a3318d07474ec7e46aaa054..1b60c649310f44fdf4533dfde50703b544c8d946 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -473,6 +473,16 @@ public class PaperWorldConfig { +@@ -467,6 +467,16 @@ public class PaperWorldConfig { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } diff --git a/Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch similarity index 95% rename from Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch rename to Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch index 5f2519a433..8129975d20 100644 --- a/Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch +++ b/Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch @@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 16727e92f591725c8f8cefb250b7ab8c64a19472..a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b 100644 +index 1b60c649310f44fdf4533dfde50703b544c8d946..1bbea57d94dfe493741a4b32d5a7b71e6cb77305 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -509,4 +509,9 @@ public class PaperWorldConfig { +@@ -503,4 +503,9 @@ public class PaperWorldConfig { } log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius); } diff --git a/Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 81% rename from Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch index cee98a020d..12552ee96b 100644 --- a/Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -5,10 +5,10 @@ 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 789fd7d3d7679408d11a20cca6db96ecb86a067d..2738d61709a956e83ab7b4e05063a99bcbb7e01b 100644 +index abda45b1e833ef9d795f11670cf650ed2479673c..ed5b69682fc80d8ff9a0e068d45456a75cbe3891 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1320,6 +1320,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1319,6 +1319,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) { @@ -16,7 +16,7 @@ index 789fd7d3d7679408d11a20cca6db96ecb86a067d..2738d61709a956e83ab7b4e05063a99b Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { -@@ -1330,6 +1331,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1329,6 +1330,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0374-offset-item-frame-ticking.patch b/Spigot-Server-Patches/0375-offset-item-frame-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0374-offset-item-frame-ticking.patch rename to Spigot-Server-Patches/0375-offset-item-frame-ticking.patch diff --git a/Spigot-Server-Patches/0375-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0376-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 100% rename from Spigot-Server-Patches/0375-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0376-Avoid-hopper-searches-if-there-are-no-items.patch diff --git a/Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch similarity index 99% rename from Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch rename to Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch index 31aeb65004..5d19c0d713 100644 --- a/Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch @@ -121,7 +121,7 @@ tasks required to be executed by the chunk load task (i.e lighting and some poi tasks). diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index fa1c920ea6092259149f9e7f9cd7cc1ed27bf338..98acbfa44dd9042b26fdf719d7748f92d201c928 100644 +index 03bb2102d6952df04753ba9986aad9b494568e2d..2956a831af9b8cbc87c8761838db5b36389a7ad2 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -57,6 +57,17 @@ public class WorldTimingsHandler { @@ -140,7 +140,7 @@ index fa1c920ea6092259149f9e7f9cd7cc1ed27bf338..98acbfa44dd9042b26fdf719d7748f92 + public final Timing chunkUnloadDataSave; + public WorldTimingsHandler(World server) { - String name = server.worldData.getName() +" - "; + String name = server.getWorld().getName() +" - "; @@ -110,6 +121,17 @@ public class WorldTimingsHandler { @@ -199,7 +199,7 @@ index af810987846efcd2bffbd23c31481b2d31c168dd..331493a172f58e71b464d635efdba461 doChunkInfo(sender, args); break; diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 1aa7d0cfaf5697daeeb98e237387f27e76bca16f..8c2202fbc1c38e6cd19005d010e365ae14233f51 100644 +index f9b1b198299166759fe0bd0a36d8d88c626e06a4..bf86444c479f346e7d56f10a7c0ebefd62f08f59 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -1,5 +1,6 @@ @@ -209,7 +209,7 @@ index 1aa7d0cfaf5697daeeb98e237387f27e76bca16f..8c2202fbc1c38e6cd19005d010e365ae import com.google.common.base.Strings; import com.google.common.base.Throwables; -@@ -346,4 +347,54 @@ public class PaperConfig { +@@ -347,4 +348,54 @@ public class PaperConfig { maxBookPageSize = getInt("settings.book-size.page-max", maxBookPageSize); maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); } @@ -334,14 +334,13 @@ index 0000000000000000000000000000000000000000..5af0ac3d9e87c06053e65433060f1577 +} diff --git a/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java new file mode 100644 -index 0000000000000000000000000000000000000000..a6434b4e28a73ecab4350862c5747b7494761ba0 +index 0000000000000000000000000000000000000000..1917d7be7dfddc93c95b9fd864cf13f9a24c8f96 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java -@@ -0,0 +1,607 @@ +@@ -0,0 +1,606 @@ +package com.destroystokyo.paper.io; + +import net.minecraft.server.ChunkCoordIntPair; -+import net.minecraft.server.ExceptionWorldConflict; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.NBTTagCompound; +import net.minecraft.server.RegionFile; @@ -882,15 +881,15 @@ index 0000000000000000000000000000000000000000..a6434b4e28a73ecab4350862c5747b74 + } + + // check if another process is writing -+ try { -+ this.world.checkSession(); -+ } catch (final ExceptionWorldConflict ex) { ++ /*try { TODO: Can we restore this? ++ ((WorldServer)this.world).checkSession(); ++ } catch (final Exception ex) { + LOGGER.fatal("Couldn't save chunk; already in use by another instance of Minecraft?", ex); + // we don't need to set the write counter to -1 as we know at this stage there's no point in re-scheduling + // writes since they'll fail anyways. + return; + } -+ ++*/ + for (;;) { + final long writeCounter; + final NBTTagCompound data; @@ -2916,7 +2915,7 @@ index fa03834dacacf7ae6a326c88007256a261153c27..c0d2df8ef3b4d0224ede2b7a4ef4e3f9 } } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 5658b2a3c4601d07545b08b0a7179c8f3b051bd4..b2e8ddc9ff1bf5f519d971455d48a2faad3638f2 100644 +index 99801463d958540b5148e55c1e44f90a1078c371..9615c4d324e42f7f91a7e60b6151c16d20e9c739 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -696,4 +696,9 @@ public final class MCUtil { @@ -2942,7 +2941,7 @@ index ca45b10b5dd7003314ff4c3294f13d2c53d9e678..32a4d1d036ed01e556348361407b7ea2 DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataConverterRegistry.a(), minecraftsessionservice, gameprofilerepository, usercache, WorldLoadListenerLogger::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c6e96ebe3d3372e1c0868de46dd3b099dbd66bf3..aa9b16e75123dfff4c2ea9501a9ae2e584f85803 100644 +index 1c28fdb8fb98cecb3c473fa0ea31edce7bbf002b..3a9e872922de10b597cc898ba76f3fbfd46e41bb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -808,7 +808,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2738d61709a956e83ab7b4e05063a99bcbb7e01b..88a7217101070222c3c9a07ce6a6d7d75573144d 100644 +index ed5b69682fc80d8ff9a0e068d45456a75cbe3891..6e9a5b77ef7e67534b64781ee9db6b6d3e33e879 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -94,6 +94,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -93,6 +93,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { return this.chunkProvider.getChunkAt(x, z, false); } @@ -3976,7 +3975,7 @@ index 2738d61709a956e83ab7b4e05063a99bcbb7e01b..88a7217101070222c3c9a07ce6a6d7d7 // Add env and gen to constructor, WorldData -> WorldDataServer public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor -@@ -141,6 +214,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -140,6 +213,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.dragonBattle = null; } this.getServer().addWorld(this.getWorld()); // CraftBukkit @@ -3985,7 +3984,7 @@ index 2738d61709a956e83ab7b4e05063a99bcbb7e01b..88a7217101070222c3c9a07ce6a6d7d7 } // CraftBukkit start -@@ -1570,7 +1645,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1569,7 +1644,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { } MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> { diff --git a/Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 91% rename from Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch rename to Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch index 684a858e98..78b6285e23 100644 --- a/Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch @@ -21,7 +21,7 @@ index 795b24c8d102417ae7e730254ecddefc06dbe0df..e382315c91540ac24821e432ee31a824 return; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2edda551f85 100644 +index 350178efcbacea6261df98d694c49dde8fa57d97..37a06b96b9d5c98b23e5da7352f549f4a959abbd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -103,6 +103,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -38,7 +38,7 @@ index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2ed protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper -@@ -1033,14 +1040,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1037,14 +1044,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public boolean p(BlockPosition blockposition) { @@ -55,7 +55,7 @@ index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2ed return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity, enumdirection); } -@@ -1161,7 +1168,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1165,7 +1172,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -65,13 +65,13 @@ index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2ed 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 88a7217101070222c3c9a07ce6a6d7d75573144d..3e42d52d2256c85b7dcbbd0e363fa1e1c789b1bf 100644 +index 6e9a5b77ef7e67534b64781ee9db6b6d3e33e879..85a025bd20cbcf5547b0c9e0f8d4a62f5bcfc358 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -91,7 +91,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -90,7 +90,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } - public Chunk getChunkIfLoaded(int x, int z) { + @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI - return this.chunkProvider.getChunkAt(x, z, false); + return this.chunkProvider.getChunkAtIfLoadedImmediately(x, z); // Paper } diff --git a/Spigot-Server-Patches/0378-Reduce-sync-loads.patch b/Spigot-Server-Patches/0379-Reduce-sync-loads.patch similarity index 97% rename from Spigot-Server-Patches/0378-Reduce-sync-loads.patch rename to Spigot-Server-Patches/0379-Reduce-sync-loads.patch index 7d7d74706d..3e6485f9a0 100644 --- a/Spigot-Server-Patches/0378-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0379-Reduce-sync-loads.patch @@ -298,10 +298,10 @@ index edd901bb53385fa3d189a0057d57f98bf8b7115c..707db4febac59a4d09d6420ea2add469 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 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8830669ac 100644 +index 37a06b96b9d5c98b23e5da7352f549f4a959abbd..b2852df57368294c8965fbc50a496a8f465304ae 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1101,7 +1101,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1105,7 +1105,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 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8 if (chunk != null) { chunk.a(entity, axisalignedbb, list, predicate); -@@ -1122,7 +1122,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1126,7 +1126,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 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8 if (chunk != null) { chunk.a(entitytypes, axisalignedbb, list, predicate); -@@ -1145,7 +1145,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1149,7 +1149,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -329,10 +329,10 @@ index 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8 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 3e42d52d2256c85b7dcbbd0e363fa1e1c789b1bf..0dd249f94905c30b5320109a3f0b17cac70def8d 100644 +index 85a025bd20cbcf5547b0c9e0f8d4a62f5bcfc358..7e01a4953c7fcff3a1199c7ca4c7731748418d69 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -166,6 +166,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -165,6 +165,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { }; public final com.destroystokyo.paper.io.chunk.ChunkTaskManager asyncChunkTaskManager; // Paper end diff --git a/Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch b/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch similarity index 97% rename from Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch rename to Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch index 47adb6a101..f12dba254c 100644 --- a/Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch +++ b/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f9410dd51 100644 +index 1bbea57d94dfe493741a4b32d5a7b71e6cb77305..f7a52481fa00a45fdebe6715dfde85c0f91fb8c0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,10 +1,15 @@ @@ -24,7 +24,7 @@ index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -514,4 +519,52 @@ public class PaperWorldConfig { +@@ -508,4 +513,52 @@ public class PaperWorldConfig { private void disableRelativeProjectileVelocity() { disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false); } diff --git a/Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 96% rename from Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index 4091fbc5f1..ef4223df2d 100644 --- a/Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,7 +7,7 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aa9b16e75123dfff4c2ea9501a9ae2e584f85803..bdb98d308df3e3481697d03f882e048d6df46946 100644 +index 824e9df675edd664ceb11c8cdb39f035df237ce3..13edd764d79a5974ec58392e70d049172c1090f4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -513,11 +513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper @@ -85,7 +85,7 @@ index bdb98d308df3e3481697d03f882e048d6df46946..82d0492fd208ca7991d07cdc62966352 this.methodProfiler.a(() -> { return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 54285237ed5a096b2e46cabd78f7dcd5128133a8..543bbd1610fb2e6df4e8ad7fbf9f2cf9b4c6cbe6 100644 +index 2b06c95b4fac97513e706ef073fdd7418e1f092c..67fda8bd5a0ad6fea2df0066c61e006c8a49980c 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -62,6 +62,7 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -481,10 +481,10 @@ index 5ebba482a65cfe6079484a99f016f968c59df8ee..d017904561d093bf8f0061f646a75aa5 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ddd66c2519d67585df06d68612a0c8a8830669ac..9b751727d137316290f363e39993f75293fd0887 100644 +index b2852df57368294c8965fbc50a496a8f465304ae..41302dc5a2f30987dab448d2715f9eeea8174dfc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1133,8 +1133,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1137,8 +1137,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return list; } diff --git a/Spigot-Server-Patches/0399-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch similarity index 100% rename from Spigot-Server-Patches/0399-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch diff --git a/Spigot-Server-Patches/0400-Prevent-bees-loading-chunks-checking-hive-position.patch b/Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from Spigot-Server-Patches/0400-Prevent-bees-loading-chunks-checking-hive-position.patch rename to Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/Spigot-Server-Patches/0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from Spigot-Server-Patches/0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/Spigot-Server-Patches/0402-Guard-against-serializing-mismatching-chunk-coordina.patch b/Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from Spigot-Server-Patches/0402-Guard-against-serializing-mismatching-chunk-coordina.patch rename to Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 93% rename from Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch rename to Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch index 8087a97ce9..596ba2a611 100644 --- a/Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch +++ b/Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch @@ -23,10 +23,10 @@ index 48e8b005bd9589135eff03a110ecce8776ab208a..74d4c28246e7db850e6d993e07a84b2a EntityHuman entityhuman = (EntityHuman) this.getPlayers().get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0dd249f94905c30b5320109a3f0b17cac70def8d..1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c 100644 +index 7e01a4953c7fcff3a1199c7ca4c7731748418d69..cdb558edd9aa176a7750403afd6634e29ada616f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -173,6 +173,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -172,6 +172,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // Paper end diff --git a/Spigot-Server-Patches/0404-Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch similarity index 100% rename from Spigot-Server-Patches/0404-Fix-items-not-falling-correctly.patch rename to Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch diff --git a/Spigot-Server-Patches/0405-Lag-compensate-eating.patch b/Spigot-Server-Patches/0406-Lag-compensate-eating.patch similarity index 89% rename from Spigot-Server-Patches/0405-Lag-compensate-eating.patch rename to Spigot-Server-Patches/0406-Lag-compensate-eating.patch index 97c8f1a7b7..838167719f 100644 --- a/Spigot-Server-Patches/0405-Lag-compensate-eating.patch +++ b/Spigot-Server-Patches/0406-Lag-compensate-eating.patch @@ -7,7 +7,7 @@ When the server is lagging, players will wait longer when eating. Change to also use a time check instead if it passes. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad06a19ad8 100644 +index 8dc2e28b2386a3b9512dfcc382f9deb534381392..ce586a89b3d812e5c6ff371c2abcb15df8de99d9 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -119,7 +119,7 @@ public abstract class EntityLiving extends Entity { @@ -19,7 +19,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad protected int bl; private BlockPosition bE; private Optional bF; -@@ -3012,6 +3012,11 @@ public abstract class EntityLiving extends Entity { +@@ -3017,6 +3017,11 @@ public abstract class EntityLiving extends Entity { return ((Byte) this.datawatcher.get(EntityLiving.an) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND; } @@ -31,7 +31,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad private void u() { if (this.isHandRaised()) { if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) { -@@ -3021,7 +3026,13 @@ public abstract class EntityLiving extends Entity { +@@ -3026,7 +3031,13 @@ public abstract class EntityLiving extends Entity { this.b(this.activeItem, 5); } @@ -46,7 +46,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad this.s(); } } else { -@@ -3071,7 +3082,10 @@ public abstract class EntityLiving extends Entity { +@@ -3076,7 +3087,10 @@ public abstract class EntityLiving extends Entity { if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag this.activeItem = itemstack; @@ -58,7 +58,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad if (!this.world.isClientSide) { this.c(1, true); this.c(2, enumhand == EnumHand.OFF_HAND); -@@ -3095,7 +3109,10 @@ public abstract class EntityLiving extends Entity { +@@ -3100,7 +3114,10 @@ public abstract class EntityLiving extends Entity { } } else if (!this.isHandRaised() && !this.activeItem.isEmpty()) { this.activeItem = ItemStack.b; @@ -70,7 +70,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad } } -@@ -3217,7 +3234,10 @@ public abstract class EntityLiving extends Entity { +@@ -3222,7 +3239,10 @@ public abstract class EntityLiving extends Entity { } this.activeItem = ItemStack.b; diff --git a/Spigot-Server-Patches/0406-Optimize-call-to-getFluid-for-explosions.patch b/Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from Spigot-Server-Patches/0406-Optimize-call-to-getFluid-for-explosions.patch rename to Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch diff --git a/Spigot-Server-Patches/0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from Spigot-Server-Patches/0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch similarity index 96% rename from Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch rename to Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch index 1f4cded065..cecf2bb12b 100644 --- a/Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch @@ -13,20 +13,8 @@ Adds water Mobs to activation range config and nerfs fish Adds flying monsters to control ghast and phantoms Adds villagers as separate config -diff --git a/src/main/java/net/minecraft/server/BehaviorController.java b/src/main/java/net/minecraft/server/BehaviorController.java -index ae2905b403a63396d9cdc61444586ea5548f2974..5ba4f96eec81dc6552aa195eaf544fe400441458 100644 ---- a/src/main/java/net/minecraft/server/BehaviorController.java -+++ b/src/main/java/net/minecraft/server/BehaviorController.java -@@ -379,6 +379,7 @@ public class BehaviorController { - - } - -+ public boolean hasActivity(Activity activity) { return c(activity); } // Paper - OBFHELPER - public boolean c(Activity activity) { - return this.j.contains(activity); - } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4fbe3d2547de278b537c12940a8351c8d1521d1b..1eb5c6085fece782db0533ff8b7c5629b284c083 100644 +index ef492fe260ef1d00f83b2f298a4fab4fd71ea4b5..2935c23d3cac78a8b5fbd33024d9bbf0de565ac2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -192,6 +192,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -80,7 +68,7 @@ index c94197a50269622e8995685119bac984c45e6833..11d384729326af693a9a679195acbd59 protected EntityCreature(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 081baca9a101d188e4810d04f69811d52de7a107..9f6f2caf25825bb135037c6205cb578dd375b9f8 100644 +index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c40846ba7c2f9 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -47,7 +47,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -111,7 +99,7 @@ index 081baca9a101d188e4810d04f69811d52de7a107..9f6f2caf25825bb135037c6205cb578d if (this.isPassenger() && this.getVehicle() instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) this.getVehicle(); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3d30dcfdf124ff634afff3db17375bad06a19ad8..27b92664cee1c685b5b6b9b385150bb5fdb9fa7a 100644 +index ce586a89b3d812e5c6ff371c2abcb15df8de99d9..3662752ce3a300b1d35b5214a8cf602ab6399edb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -97,7 +97,7 @@ public abstract class EntityLiving extends Entity { @@ -330,7 +318,7 @@ index 50487dbf0ac162d7608b67b4fb50fa7f8bfba69d..04b28555b1bb68536e40bb6526136787 return this.c; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9b751727d137316290f363e39993f75293fd0887..7d13f7a8b7272ad2ac86e706c1b8c7649cccb01c 100644 +index 41302dc5a2f30987dab448d2715f9eeea8174dfc..6d3b851f65858f6d768aa64c0bef71e18c45f0a2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -81,6 +81,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -347,7 +335,7 @@ index 9b751727d137316290f363e39993f75293fd0887..7d13f7a8b7272ad2ac86e706c1b8c764 public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..97af8f8e3c48694c390036bb1455e6d22fcd1c49 100644 +index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..5dcc1ba547db7cc53a08426a7ad119ae88690136 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -2,24 +2,34 @@ package org.spigotmc; @@ -636,14 +624,14 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..97af8f8e3c48694c390036bb1455e6d2 + + if (config.villagersActiveForPanic) { + for (Activity activity : VILLAGER_PANIC_IMMUNITIES) { -+ if (behaviorController.hasActivity(activity)) { ++ if (behaviorController.c(activity)) { + return 20*5; + } + } + } + + if (config.villagersWorkImmunityAfter > 0 && inactiveFor >= config.villagersWorkImmunityAfter) { -+ if (behaviorController.hasActivity(Activity.WORK)) { ++ if (behaviorController.c(Activity.WORK)) { + return config.villagersWorkImmunityFor; + } + } diff --git a/Spigot-Server-Patches/0409-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-Server-Patches/0409-Add-effect-to-block-break-naturally.patch rename to Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-Server-Patches/0410-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch similarity index 100% rename from Spigot-Server-Patches/0410-Tracking-Range-Improvements.patch rename to Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch diff --git a/Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch similarity index 94% rename from Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch rename to Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch index a9befce1d6..3cc0b86e7f 100644 --- a/Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch +++ b/Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch @@ -13,7 +13,7 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1eb5c6085fece782db0533ff8b7c5629b284c083..097bab174bd05ee42c172e8926f5c66000bed239 100644 +index 2935c23d3cac78a8b5fbd33024d9bbf0de565ac2..9cf05a78871fba00c2453dc103d822271a8fec0b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2531,6 +2531,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from Spigot-Server-Patches/0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 97% rename from Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 0ca1c3c83b..c49febe093 100644 --- a/Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -65,7 +65,7 @@ index 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b197 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7d13f7a8b7272ad2ac86e706c1b8c7649cccb01c..50848896588e16bf2a498ba28ab30919a081afd5 100644 +index 91f8927892a7c8f4456163d9de5e307f0e15cf54..276c805b60630952bcc1e467bb501926f214ed10 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -319,6 +319,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0414-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch similarity index 100% rename from Spigot-Server-Patches/0414-Allow-overriding-the-java-version-check.patch rename to Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch diff --git a/Spigot-Server-Patches/0415-Add-ThrownEggHatchEvent.patch b/Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-Server-Patches/0415-Add-ThrownEggHatchEvent.patch rename to Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch similarity index 97% rename from Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch rename to Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch index be5febc5c1..94fadc2a2e 100644 --- a/Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch @@ -230,7 +230,7 @@ index 900b551f6f76862443b09c1e76ad596eda5655f4..1cb45f97b644347d16b66b46113b1e44 public interface a { diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 5862e2026b685df80de45c529f1367382a2a60b0..a5cd127c0f133b0ef136f4efad9d71eab2edf8e4 100644 +index 00827c335e9413e986d7f07d0adbcef0d106a553..c66a8011dde4932e03ea91194ea92a7263e48428 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -29,7 +29,7 @@ public class EntityTurtle extends EntityAnimal { @@ -243,10 +243,10 @@ index 5862e2026b685df80de45c529f1367382a2a60b0..a5cd127c0f133b0ef136f4efad9d71ea // TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 50848896588e16bf2a498ba28ab30919a081afd5..d2b3e06dda10fc321768301c35f319767796d7d5 100644 +index ce55c4729024ce9e226d9dd14f7c3ea4bde7ca34..e52ec352fb98cd030d7c13362d0bf950c60c6372 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1460,10 +1460,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1464,10 +1464,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public abstract TagRegistry p(); public BlockPosition a(int i, int j, int k, int l) { @@ -267,10 +267,10 @@ index 50848896588e16bf2a498ba28ab30919a081afd5..d2b3e06dda10fc321768301c35f31976 public boolean isSavingDisabled() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c..3266ecf2ad975613942a9cd127440dd898b12ff5 100644 +index cdb558edd9aa176a7750403afd6634e29ada616f..ce1f2b1dda28d706744aece90b96518495e288a4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -558,7 +558,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -557,7 +557,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { }); } @@ -284,7 +284,7 @@ index 1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c..3266ecf2ad975613942a9cd127440dd8 ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); boolean flag = this.isRaining(); int j = chunkcoordintpair.d(); -@@ -566,10 +571,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -565,10 +570,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); gameprofilerfiller.enter("thunder"); @@ -297,7 +297,7 @@ index 1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c..3266ecf2ad975613942a9cd127440dd8 if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper -@@ -592,59 +597,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -591,59 +596,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exitEnter("iceandsnow"); diff --git a/Spigot-Server-Patches/0417-Entity-Jump-API.patch b/Spigot-Server-Patches/0418-Entity-Jump-API.patch similarity index 94% rename from Spigot-Server-Patches/0417-Entity-Jump-API.patch rename to Spigot-Server-Patches/0418-Entity-Jump-API.patch index 63f5a0bfae..50977959fd 100644 --- a/Spigot-Server-Patches/0417-Entity-Jump-API.patch +++ b/Spigot-Server-Patches/0418-Entity-Jump-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 27b92664cee1c685b5b6b9b385150bb5fdb9fa7a..e4c7f4c100e1b8d4470da954a3b72f9e0ec5b494 100644 +index 3662752ce3a300b1d35b5214a8cf602ab6399edb..be102d9fed4596f2e53cca102c5a779ded2bf26f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2748,8 +2748,10 @@ public abstract class EntityLiving extends Entity { +@@ -2753,8 +2753,10 @@ public abstract class EntityLiving extends Entity { } else if (this.aN() && (!this.onGround || d7 > d8)) { this.c((Tag) TagsFluid.LAVA); } else if ((this.onGround || flag && d7 <= d8) && this.jumpTicks == 0) { diff --git a/Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 93% rename from Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch index f635e4ca9e..c59b4d906c 100644 --- a/Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4bfe2fb948ee204f8c5a8c316141904a8a6a8b16..3496f615aa9857aa704767f460b1b166295ccf39 100644 +index 1757cf8e0883e8908b97e0a7beb1e6ecec10d8e6..4c12e1b65a0e7e1a7aa1bbaf433f4881cef314f2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -596,4 +596,9 @@ public class PaperWorldConfig { +@@ -590,4 +590,9 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } @@ -32,7 +32,7 @@ index e5b8d45ed9f62c28b0429859593d881546ccead2..77f8d5e6662fa75e622f07b3e6efae04 } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 097bab174bd05ee42c172e8926f5c66000bed239..45df15c6c96dcda115fff827f2443ac8b07b1ad7 100644 +index 9cf05a78871fba00c2453dc103d822271a8fec0b..f55ae42b1445ed0fe8e29f5d47c9b3464011c023 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -194,6 +194,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch similarity index 99% rename from Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch rename to Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch index 9497aa062c..57daa6a3af 100644 --- a/Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch +++ b/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch @@ -398,7 +398,7 @@ index d4d5bc19e167a5271f8eb8d010f8a52b23b942df..859e31c63f94bdc7729c6d475990750b }); private final int[] b = new int[256]; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 82d0492fd208ca7991d07cdc6296635290d5af3b..52f4d5bff6a50a0f220a25045ec73a10f58bb006 100644 +index 7ca38adcaa619a95c183bed13be566105442afd5..bd39bdcfeec7fb275a8ec80d467bad413e5356ce 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -106,7 +106,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant WorldDataServer public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor -@@ -189,12 +198,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -188,12 +197,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { convertable = convertable_conversionsession; uuid = WorldUUID.getUUID(convertable_conversionsession.folder.toFile()); // CraftBukkit end diff --git a/Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch b/Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 97% rename from Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch rename to Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch index 29e9629656..15f3e87478 100644 --- a/Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per world and the world age for the start day. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9e8485679bd36481c2bd2f0c7cfa49892f0e4baf..2688b3018eaab4e7ba95754164f83065a98e53fc 100644 +index 92a15842ac189049b2afef2f0ecf8ac964949bed..4281c125661c7a717e5a787510f593a16f6ad730 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -584,10 +584,21 @@ public class PaperWorldConfig { +@@ -578,10 +578,21 @@ public class PaperWorldConfig { } public boolean disablePillagerPatrols = false; diff --git a/Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch b/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch similarity index 89% rename from Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch rename to Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch index 501c1f82c0..a02c5160fc 100644 --- a/Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch +++ b/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch @@ -11,7 +11,7 @@ Vs behavior of non ticking of just overwriting state. We will now simply log a warning when this happens instead of crashing the server. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 45df15c6c96dcda115fff827f2443ac8b07b1ad7..0f775f417d5c8418ea895329b50313cc3350ea58 100644 +index f55ae42b1445ed0fe8e29f5d47c9b3464011c023..d4bb4e73ce8867ce56dce0ea84dea2dff91846d4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -59,6 +59,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -23,10 +23,10 @@ index 45df15c6c96dcda115fff827f2443ac8b07b1ad7..0f775f417d5c8418ea895329b50313cc private boolean locked = false; @Override diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b8e635e351773663f62bd07193c6b0aceef0a3f3..17f9e9119723561a4b01efbb91d651fbc9c8726e 100644 +index 61e988dc83d6f2c2e9f583aa3b88c26732cd6736..fca8194f27d5a8707296600bca7027a80c13877c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -532,6 +532,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -531,6 +531,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { Entity entity2; while ((entity2 = (Entity) this.entitiesToAdd.poll()) != null) { @@ -34,7 +34,7 @@ index b8e635e351773663f62bd07193c6b0aceef0a3f3..17f9e9119723561a4b01efbb91d651fb this.registerEntity(entity2); } -@@ -1228,6 +1229,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1227,6 +1228,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { public void unregisterEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot @@ -54,7 +54,7 @@ index b8e635e351773663f62bd07193c6b0aceef0a3f3..17f9e9119723561a4b01efbb91d651fb // Spigot start if ( entity instanceof EntityHuman ) { -@@ -1294,9 +1308,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1293,9 +1307,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void registerEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot diff --git a/Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch b/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch similarity index 90% rename from Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch rename to Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch index 8baef3ad57..06161dd93a 100644 --- a/Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch +++ b/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch @@ -15,10 +15,10 @@ 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 17f9e9119723561a4b01efbb91d651fbc9c8726e..f792ff541793855d9ed0b60f5990b6fdfa303995 100644 +index fca8194f27d5a8707296600bca7027a80c13877c..59afafecabd59ede1398c124769262f7568426ed 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1387,9 +1387,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1386,9 +1386,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } private void removeEntityFromChunk(Entity entity) { diff --git a/Spigot-Server-Patches/0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/Spigot-Server-Patches/0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to Spigot-Server-Patches/0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/Spigot-Server-Patches/0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/Spigot-Server-Patches/0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 100% rename from Spigot-Server-Patches/0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to Spigot-Server-Patches/0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch diff --git a/Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 92% rename from Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index ff50f90ba8..19dd500727 100644 --- a/Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -26,10 +26,10 @@ index fe3aab87de4e1eb60b19352499790fd9b571e169..c9be4ae99458863bf91687c3667d67bc EntityTypes entitytypes = entity.getEntityType(); int i = entitytypes.getChunkRange() * 16; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f792ff541793855d9ed0b60f5990b6fdfa303995..2609ae63556053adccdce19677d2e52aaab4ebf6 100644 +index 59afafecabd59ede1398c124769262f7568426ed..4f2c8a9fbfa4596f5414dd742affc4cc45deab5a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1353,7 +1353,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1352,7 +1352,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } @@ -38,7 +38,7 @@ index f792ff541793855d9ed0b60f5990b6fdfa303995..2609ae63556053adccdce19677d2e52a // CraftBukkit start - SPIGOT-5278 if (entity instanceof EntityDrowned) { this.navigators.add(((EntityDrowned) entity).navigationWater); -@@ -1364,6 +1364,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1363,6 +1363,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.navigators.add(((EntityInsentient) entity).getNavigation()); } entity.valid = true; // CraftBukkit diff --git a/Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch similarity index 98% rename from Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch rename to Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch index 7d9181fa4f..1df4dcaada 100644 --- a/Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch @@ -14,7 +14,7 @@ movement will load only the chunk the player enters anyways and avoids loading massive amounts of surrounding chunks due to large AABB lookups. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0f775f417d5c8418ea895329b50313cc3350ea58..a64e21964ed6131d2fc62345e04a30885e1d9a74 100644 +index d4bb4e73ce8867ce56dce0ea84dea2dff91846d4..8f1e8728502d1dcae1fb538875f72460fc926d7c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -80,6 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0434-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch similarity index 100% rename from Spigot-Server-Patches/0434-Don-t-tick-dead-players.patch rename to Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch diff --git a/Spigot-Server-Patches/0435-Dead-Player-s-shouldn-t-be-able-to-move.patch b/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 100% rename from Spigot-Server-Patches/0435-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch diff --git a/Spigot-Server-Patches/0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 100% rename from Spigot-Server-Patches/0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch diff --git a/Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch similarity index 88% rename from Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch rename to Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch index 36ff7c0f7b..a9aa089fe2 100644 --- a/Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5 100644 +index 4281c125661c7a717e5a787510f593a16f6ad730..a11d356733901521ee0523629f0cffc1d94391bc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -622,4 +622,9 @@ public class PaperWorldConfig { +@@ -616,4 +616,9 @@ public class PaperWorldConfig { private void zombieVillagerInfectionChance() { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } @@ -28,7 +28,7 @@ index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 52f4d5bff6a50a0f220a25045ec73a10f58bb006..2bfda68d2bdf54a6fedb237086a2182ac37d1627 100644 +index bd39bdcfeec7fb275a8ec80d467bad413e5356ce..16c9ed590a20279dd21512b29f8f5f64a4be1eff 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -663,7 +663,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant(); commands.put("paper", new PaperCommand("paper")); @@ -87,7 +87,7 @@ index 5814c0da1fe82ccf9a74c6418bee021543749d86..c31a97c6ae0dd1493039158e67c5f3ba version = getInt("config-version", 20); set("config-version", 20); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5c45a88a6659873ec0cc1a62ebe7b5d700c079bd..852dc6a5edcf88adcf8d04f1109d7eaff1bea8f9 100644 +index 9e68d293ab8d67e9450a6633beccfba881d2287a..f61a2f30e43120beecfa6056c0c14985411d9b7d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -107,6 +107,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant list = this.tracker.getPassengers(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e4e946c0b3c6b73f02567fffaaabf06312cbea91..45715f50deb7c3c31a1d2f9795ad026e4938dc47 100644 +index 3e42cd6ec6ecfc04a6e2e9c96459e1a88e504e39..084f36bb29a3fa28dbac1fa6f50849e5722ab9fe 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1531,6 +1531,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant (max 5) to automatically fix all light data in the chunks. diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f5374ec369d 100644 +index 182b440ba4802d199b8e44f7779b3401ace495d5..cc3fc5200f75f80a60b4cbc260e3a0bc4bb3a869 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -20,6 +20,7 @@ import org.bukkit.command.Command; @@ -45,7 +45,7 @@ index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f53 case "ver": case "version": Command ver = org.bukkit.Bukkit.getServer().getCommandMap().getCommand("version"); -@@ -160,6 +164,75 @@ public class PaperCommand extends Command { +@@ -160,6 +164,77 @@ public class PaperCommand extends Command { return true; } @@ -94,10 +94,12 @@ index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f53 + } + lightengine.a(world.paperConfig.lightQueueSize + 16 * 256); // ensure full chunk can fit into queue + sender.sendMessage("Updating Light " + coord); ++ int cx = chunk.getPos().x << 4; ++ int cz = chunk.getPos().z << 4; + for (int y = 0; y < world.getHeight(); y++) { + for (int x = 0; x < 16; x++) { + for (int z = 0; z < 16; z++) { -+ BlockPosition pos = new BlockPosition(chunk.getPos().getBlockX() + x, y, chunk.getPos().getBlockZ() + z); ++ BlockPosition pos = new BlockPosition(cx + x, y, cz + z); + lightengine.a(pos); + } + } @@ -107,7 +109,7 @@ index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f53 + if (visibleChunk != null) { + world.getChunkProvider().playerChunkMap.addLightTask(visibleChunk, () -> { + MinecraftServer.getServer().processQueue.add(() -> { -+ visibleChunk.sendPacketToTrackedPlayers(new PacketPlayOutLightUpdate(chunk.getPos(), lightengine), false); ++ visibleChunk.sendPacketToTrackedPlayers(new PacketPlayOutLightUpdate(chunk.getPos(), lightengine, true), false); + updateLight(sender, world, lightengine, queue); + }); + }); diff --git a/Spigot-Server-Patches/0483-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from Spigot-Server-Patches/0483-Fix-PotionEffect-ignores-icon-flag.patch rename to Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/Spigot-Server-Patches/0484-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from Spigot-Server-Patches/0484-Optimize-brigadier-child-sorting-performance.patch rename to Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch diff --git a/Spigot-Server-Patches/0485-Don-t-toString-block-unless-actually-showing-the-mes.patch b/Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch similarity index 100% rename from Spigot-Server-Patches/0485-Don-t-toString-block-unless-actually-showing-the-mes.patch rename to Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch diff --git a/Spigot-Server-Patches/0486-Potential-bed-API.patch b/Spigot-Server-Patches/0487-Potential-bed-API.patch similarity index 100% rename from Spigot-Server-Patches/0486-Potential-bed-API.patch rename to Spigot-Server-Patches/0487-Potential-bed-API.patch diff --git a/Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch similarity index 96% rename from Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch rename to Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch index c04562f746..5da518c142 100644 --- a/Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,7 +10,7 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 45715f50deb7c3c31a1d2f9795ad026e4938dc47..10e6572afa5b5cf65673b65541ef2fafb0b2aaae 100644 +index 9745f0812b65d9137458741ca5803324670deeef..96e617049ab7c69a0d8ffbade894f187566c21b1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -773,6 +773,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { +@@ -1,6 +1,8 @@ + package net.minecraft.server; + + import com.google.common.collect.Lists; ++import io.netty.channel.ChannelFuture; // Paper ++ + import java.io.IOException; + import java.util.Iterator; + import java.util.List; +@@ -17,14 +19,43 @@ public class PacketPlayOutLightUpdate implements Packet { private List h; private boolean i; @@ -265,7 +274,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d + } + + @Override -+ public void onPacketDispatchFinish(EntityPlayer player, io.netty.channel.ChannelFuture future) { ++ public void onPacketDispatchFinish(EntityPlayer player, ChannelFuture future) { + if (remainingSends.decrementAndGet() <= 0) { + // incase of any race conditions, schedule this delayed + MCUtil.scheduleTask(5, () -> { @@ -296,7 +305,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d for (int i = 0; i < 18; ++i) { NibbleArray nibblearray = lightengine.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, -1 + i)); -@@ -35,7 +64,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -35,7 +66,7 @@ public class PacketPlayOutLightUpdate implements Packet { this.e |= 1 << i; } else { this.c |= 1 << i; @@ -305,7 +314,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d } } -@@ -44,7 +73,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -44,7 +75,7 @@ public class PacketPlayOutLightUpdate implements Packet { this.f |= 1 << i; } else { this.d |= 1 << i; @@ -314,7 +323,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d } } } -@@ -57,8 +86,8 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -57,8 +88,8 @@ public class PacketPlayOutLightUpdate implements Packet { this.i = flag; this.c = i; this.d = j; @@ -325,7 +334,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d for (int k = 0; k < 18; ++k) { NibbleArray nibblearray; -@@ -66,7 +95,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -66,7 +97,7 @@ public class PacketPlayOutLightUpdate implements Packet { if ((this.c & 1 << k) != 0) { nibblearray = lightengine.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, -1 + k)); if (nibblearray != null && !nibblearray.c()) { @@ -334,7 +343,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d } else { this.c &= ~(1 << k); if (nibblearray != null) { -@@ -78,7 +107,7 @@ public class PacketPlayOutLightUpdate implements Packet { +@@ -78,7 +109,7 @@ public class PacketPlayOutLightUpdate implements Packet { if ((this.d & 1 << k) != 0) { nibblearray = lightengine.a(EnumSkyBlock.BLOCK).a(SectionPosition.a(chunkcoordintpair, -1 + k)); if (nibblearray != null && !nibblearray.c()) { diff --git a/Spigot-Server-Patches/0491-Reduce-MutableInt-allocations-from-light-engine.patch b/Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from Spigot-Server-Patches/0491-Reduce-MutableInt-allocations-from-light-engine.patch rename to Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/Spigot-Server-Patches/0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 100% rename from Spigot-Server-Patches/0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch diff --git a/Spigot-Server-Patches/0493-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch similarity index 100% rename from Spigot-Server-Patches/0493-Ensure-safe-gateway-teleport.patch rename to Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch diff --git a/Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch similarity index 95% rename from Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch rename to Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch index bbfc2ca385..42c9b660a1 100644 --- a/Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch +++ b/Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option for console having all permissions diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index e1c9e559b25792296b6b8f6dd1070035d10d82f2..08f744ee5e83d317f872f9c48e2037a24327d76f 100644 +index 44f431bee68275d48aad75367aaec40a7ca59bea..06adb1fa670e7d755560abae67d46447d63370f0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -416,4 +416,9 @@ public class PaperConfig { +@@ -417,4 +417,9 @@ public class PaperConfig { allowBlockPermanentBreakingExploits = getBoolean("allow-perm-block-break-exploits", allowBlockPermanentBreakingExploits); } diff --git a/Spigot-Server-Patches/0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch similarity index 100% rename from Spigot-Server-Patches/0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch rename to Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch diff --git a/Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 99% rename from Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 32810a5190..bba3a80635 100644 --- a/Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -617,7 +617,7 @@ index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a2 for (int i = 0; i < this.inventory.getSize(); ++i) { ItemStack itemstack = this.inventory.getItem(i); diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 2f9c014454cf5fe771c6da84ad4af7e7790fdc7d..2e58e58548f0fc7af98b0c6294bf855f54705f9b 100644 +index a68e4fc411ae84f12b1ca7443fa66f6325712af8..ce17f5114e997b48073bb078336dc43bdae190a7 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -654,6 +654,7 @@ public final class MCUtil { @@ -1231,10 +1231,10 @@ index 745633509d3f948d46529d5439ec14cd01a05563..5ae74d0856f7fb4a7ee35e5d778d78fe net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b28e5abea5d2585d9beff574dd82651e7d20275b..663f9136c4101bb48944ed5ea952f6375e8b2781 100644 +index 6032a67b3f242580d8de5e77554e3ec317d3019d..b602fc8e7747b839a853310c5d5592d3ac4c0855 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -741,6 +741,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); } diff --git a/Spigot-Server-Patches/0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 100% rename from Spigot-Server-Patches/0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch diff --git a/Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 100% rename from Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch diff --git a/Spigot-Server-Patches/0499-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch similarity index 100% rename from Spigot-Server-Patches/0499-Improve-Chunk-Status-Transition-Speed.patch rename to Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch diff --git a/Spigot-Server-Patches/0500-Fix-villager-trading-demand-MC-163962.patch b/Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from Spigot-Server-Patches/0500-Fix-villager-trading-demand-MC-163962.patch rename to Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch diff --git a/Spigot-Server-Patches/0501-Maps-shouldn-t-load-chunks.patch b/Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0501-Maps-shouldn-t-load-chunks.patch rename to Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch diff --git a/Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 91% rename from Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch index 96bcd2c18e..4bcf7fe0cc 100644 --- a/Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch +++ b/Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch @@ -19,10 +19,10 @@ index 90be8c6091dc590a020721f45c7ff7b137cc806d..faa556d4358bc9890ae80c18ee10c38a } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d0493919e71159ac6b38a64b2411fea722b53306..b79302b83921111d5fa32794babf1fa57b7bbcb1 100644 +index 00df3260d4f208052515fcd2613be1d6f92e7b1f..4a4508f45b76379dfa567036696d3bf1f4a5c4f4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -303,8 +303,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -302,8 +302,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.worldDataServer.setThundering(flag1); } diff --git a/Spigot-Server-Patches/0503-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0503-Optimize-Bit-Operations-by-inlining.patch rename to Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch diff --git a/Spigot-Server-Patches/0504-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch similarity index 99% rename from Spigot-Server-Patches/0504-Optimize-Light-Engine.patch rename to Spigot-Server-Patches/0505-Optimize-Light-Engine.patch index 3c31180a4f..04e66be87d 100644 --- a/Spigot-Server-Patches/0504-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch @@ -1307,10 +1307,10 @@ index 35f4d2d9591e625ab0bbeab7b606761e74965eec..698d82dd736529a8cbfad5c6bed70ab9 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 b79302b83921111d5fa32794babf1fa57b7bbcb1..bed2cbabc0ac921bfdc4c6e4a04973a5411ebaa0 100644 +index 4a4508f45b76379dfa567036696d3bf1f4a5c4f4..f24c4def3799d2787b1bc14b2dea532e6a93d6ee 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -709,6 +709,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -708,6 +708,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exit(); timings.chunkTicksBlocks.stopTiming(); // Paper diff --git a/Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 97% rename from Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 4738b38c7b..a2cfef7290 100644 --- a/Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0746932a3191669052f15270f5c94efbce0bd0c2..0f4fca90fd6c3788a5762c96c344899cb1665466 100644 +index 65f9ec884c7e36b7d1340dcfdf186ee0669178e4..b04fe735839de47e4101dade366a668c9237f6b6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -639,4 +639,13 @@ public class PaperWorldConfig { +@@ -633,4 +633,13 @@ public class PaperWorldConfig { private void viewDistance() { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/Spigot-Server-Patches/0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from Spigot-Server-Patches/0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/Spigot-Server-Patches/0507-Fix-missing-chunks-due-to-integer-overflow.patch b/Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from Spigot-Server-Patches/0507-Fix-missing-chunks-due-to-integer-overflow.patch rename to Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/Spigot-Server-Patches/0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from Spigot-Server-Patches/0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 97% rename from Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch rename to Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch index 8e81d5690d..ab41639c15 100644 --- a/Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch @@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840 This patch also fixes rail duping and carpet duping. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 08f744ee5e83d317f872f9c48e2037a24327d76f..f9831b1ac15c9fa08c7201a43fe9f1824ddc03c3 100644 +index 06adb1fa670e7d755560abae67d46447d63370f0..3b0f3127bcee8e9290b4640bcd4ec0d17fb43f43 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -421,4 +421,9 @@ public class PaperConfig { +@@ -422,4 +422,9 @@ public class PaperConfig { consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions); } diff --git a/Spigot-Server-Patches/0510-Fix-sand-duping.patch b/Spigot-Server-Patches/0511-Fix-sand-duping.patch similarity index 100% rename from Spigot-Server-Patches/0510-Fix-sand-duping.patch rename to Spigot-Server-Patches/0511-Fix-sand-duping.patch diff --git a/Spigot-Server-Patches/0511-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from Spigot-Server-Patches/0511-Prevent-position-desync-in-playerconnection-causing-.patch rename to Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch similarity index 100% rename from Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch rename to Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch diff --git a/Spigot-Server-Patches/0513-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-Server-Patches/0513-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-Server-Patches/0514-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-Server-Patches/0514-Expose-Arrow-getItemStack.patch rename to Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch diff --git a/Spigot-Server-Patches/0515-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from Spigot-Server-Patches/0515-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/Spigot-Server-Patches/0516-Add-PrepareGrindstoneEvent.patch b/Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch similarity index 100% rename from Spigot-Server-Patches/0516-Add-PrepareGrindstoneEvent.patch rename to Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch diff --git a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch b/removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch similarity index 53% rename from Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch rename to removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch index b792c77dbf..dca49d7957 100644 --- a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch +++ b/removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch @@ -20,7 +20,7 @@ index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..bc3df01aab3e79be9c2836820e0eacc6 + } } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afdbd76b709 100644 +index 61d7d507aaac3e7e5a885387ae89c67dfb1c9844..42b9a339e9c35db596ec78881c32c801c2d739f4 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -44,6 +44,12 @@ public class EntityArmorStand extends EntityLiving { @@ -37,11 +37,11 @@ index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afd public EntityArmorStand(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -55,6 +61,7 @@ public class EntityArmorStand extends EntityLiving { - this.rightArmPose = EntityArmorStand.bt; - this.leftLegPose = EntityArmorStand.bu; - this.rightLegPose = EntityArmorStand.bv; + this.rightArmPose = EntityArmorStand.bu; + this.leftLegPose = EntityArmorStand.bv; + this.rightLegPose = EntityArmorStand.bw; + if (world != null) this.canTick = world.paperConfig.armorStandTick; // Paper - armour stand ticking - this.G = 0.0F; + this.H = 0.0F; } @@ -135,6 +142,7 @@ public class EntityArmorStand extends EntityLiving { @@ -136,11 +136,125 @@ index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afd public void setRightLegPose(Vector3f vector3f) { this.rightLegPose = vector3f; - this.datawatcher.set(EntityArmorStand.bo, vector3f); + this.datawatcher.set(EntityArmorStand.bp, vector3f); + this.noTickPoseDirty = true; // Paper - Allow updates when not ticking } public Vector3f r() { +diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java +index a4051c1f0cdcf179e7afe60d301982412da7ed64..990aea604d02db723193722ed692c3a3725f987d 100644 +--- a/src/main/java/net/minecraft/server/EntityLiving.java ++++ b/src/main/java/net/minecraft/server/EntityLiving.java +@@ -2329,52 +2329,7 @@ public abstract class EntityLiving extends Entity { + } + } + +- EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); +- int k = aenumitemslot.length; +- +- for (int l = 0; l < k; ++l) { +- EnumItemSlot enumitemslot = aenumitemslot[l]; +- ItemStack itemstack; +- +- switch (enumitemslot.a()) { +- case HAND: +- itemstack = (ItemStack) this.bu.get(enumitemslot.b()); +- break; +- case ARMOR: +- itemstack = (ItemStack) this.bv.get(enumitemslot.b()); +- break; +- default: +- continue; +- } +- +- ItemStack itemstack1 = this.getEquipment(enumitemslot); +- +- if (!ItemStack.matches(itemstack1, itemstack)) { +- // Paper start - PlayerArmorChangeEvent +- if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { +- final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); +- final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); +- new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); +- } +- // Paper end +- ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); +- if (!itemstack.isEmpty()) { +- this.getAttributeMap().a(itemstack.a(enumitemslot)); +- } +- +- if (!itemstack1.isEmpty()) { +- this.getAttributeMap().b(itemstack1.a(enumitemslot)); +- } +- +- switch (enumitemslot.a()) { +- case HAND: +- this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); +- break; +- case ARMOR: +- this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); +- } +- } +- } ++ updateEntityEquipment(); // Paper - split into own method + + if (this.ticksLived % 20 == 0) { + this.getCombatTracker().g(); +@@ -2475,6 +2430,55 @@ public abstract class EntityLiving extends Entity { + } + } + ++ // Paper start - split into own method from above ++ public void updateEntityEquipment() { ++ EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); ++ int k = aenumitemslot.length; ++ for (int l = 0; l < k; ++l) { ++ EnumItemSlot enumitemslot = aenumitemslot[l]; ++ ItemStack itemstack; ++ ++ switch (enumitemslot.a()) { ++ case HAND: ++ itemstack = (ItemStack) this.bu.get(enumitemslot.b()); ++ break; ++ case ARMOR: ++ itemstack = (ItemStack) this.bv.get(enumitemslot.b()); ++ break; ++ default: ++ continue; ++ } ++ ++ ItemStack itemstack1 = this.getEquipment(enumitemslot); ++ ++ if (!ItemStack.matches(itemstack1, itemstack)) { ++ // Paper start - PlayerArmorChangeEvent ++ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { ++ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); ++ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); ++ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); ++ } ++ // Paper end ++ ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); ++ if (!itemstack.isEmpty()) { ++ this.getAttributeMap().a(itemstack.a(enumitemslot)); ++ } ++ ++ if (!itemstack1.isEmpty()) { ++ this.getAttributeMap().b(itemstack1.a(enumitemslot)); ++ } ++ ++ switch (enumitemslot.a()) { ++ case HAND: ++ this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); ++ break; ++ case ARMOR: ++ this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); ++ } ++ } ++ } ++ } ++ + protected float f(float f, float f1) { + float f2 = MathHelper.g(f - this.aI); + diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index d1d689e5d78c569313c4059c4652724605dc07d2..ac105270d5c7e2070f52782fc7dbdcd381db33a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java From c3640b1dc0b92b07b5aaafcf3f01009cbe2c07d4 Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Fri, 26 Jun 2020 14:04:38 +0200 Subject: [PATCH 14/95] [1.16] Make it run (#3626) * She compiles! Also readded the armorstand ticking patch, thanks cat * Update mob goal api * Misc fixes to make it run drop per playing mob spawns for now --- .../0202-Add-Mob-Goal-API.patch | 14 +- .../0206-Potential-bed-API.patch | 28 +-- .../0002-Paper-config-files.patch | 4 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 60 ++++++ Spigot-Server-Patches/0009-Timings-v2.patch | 11 +- .../0022-Optimize-TileEntity-Ticking.patch | 41 +++- .../0088-Configurable-Player-Collision.patch | 8 +- ...ok-reference-on-Craft-Entity-removal.patch | 8 +- .../0132-String-based-Action-Bar-API.patch | 17 +- .../0235-RangedEntity-API.patch | 4 +- .../0263-Add-TNTPrimeEvent.patch | 4 +- ...Allow-disabling-armour-stand-ticking.patch | 176 ++++++++++++++++++ ...timize-BlockPosition-helper-methods.patch} | 0 ...tore-vanlla-default-mob-spawn-range.patch} | 0 ...-124320.patch => 0276-Fix-MC-124320.patch} | 0 ...tch => 0277-Slime-Pathfinder-Events.patch} | 0 ...e-speed-for-water-flowing-over-lava.patch} | 8 +- ...79-Optimize-CraftBlockData-Creation.patch} | 0 ... => 0280-Optimize-RegistryMaterials.patch} | 11 +- ...ch => 0281-Add-PhantomPreSpawnEvent.patch} | 0 ....patch => 0282-Add-More-Creeper-API.patch} | 0 ...=> 0283-Inventory-removeItemAnySlot.patch} | 0 ...oadChunk-int-int-false-load-unconve.patch} | 0 ...ray-tracing-methods-to-LivingEntity.patch} | 4 +- ...-attack-cooldown-methods-for-Player.patch} | 2 +- ....patch => 0287-Improve-death-events.patch} | 8 +- ...w-chests-to-be-placed-with-NBT-data.patch} | 0 ...I.patch => 0289-Mob-Pathfinding-API.patch} | 0 ...nt-chunk-loading-from-Fluid-Flowing.patch} | 0 ...for-CanPlaceOn-and-CanDestroy-NBT-v.patch} | 0 ...nt-Mob-AI-Rules-from-Loading-Chunks.patch} | 0 ...ning-from-loading-generating-chunks.patch} | 0 ...-Biome-Mob-Lookups-for-Mob-Spawning.patch} | 0 ...t-furnace-cook-speed-multiplier-API.patch} | 0 ....patch => 0296-PreSpawnerSpawnEvent.patch} | 0 ...rseException-in-Entity-and-TE-names.patch} | 0 ...=> 0298-Honor-EntityAgeable.ageLock.patch} | 0 ...le-connection-throttle-kick-message.patch} | 0 ...> 0300-Hook-into-CB-plugin-rewrites.patch} | 0 ...01-Allow-setting-the-vex-s-summoner.patch} | 0 ...I.patch => 0302-Add-sun-related-API.patch} | 0 ...Turtle-API.patch => 0303-Turtle-API.patch} | 0 ...her-worlds-for-shooter-of-projectil.patch} | 0 ...ator-target-events-and-improve-impl.patch} | 0 ...-Add-Velocity-IP-Forwarding-Support.patch} | 20 +- ...PI.patch => 0307-Add-more-Witch-API.patch} | 0 ...wned-for-Villager-Aggression-Config.patch} | 0 ...-Johnny.patch => 0309-Here-s-Johnny.patch} | 0 ...vent-players-from-moving-into-unloa.patch} | 4 +- ...1-Reset-players-airTicks-on-respawn.patch} | 0 ...after-profile-lookups-if-not-needed.patch} | 0 ...r-Thread-Pool-and-Thread-Priorities.patch} | 4 +- ...=> 0314-Optimize-World-Time-Updates.patch} | 2 +- ...tore-custom-InventoryHolder-support.patch} | 0 ...=> 0316-Use-Vanilla-Minecart-Speeds.patch} | 0 ...0317-Fix-SpongeAbsortEvent-handling.patch} | 0 ...-allow-digging-into-unloaded-chunks.patch} | 0 ...mits.patch => 0319-Book-Size-Limits.patch} | 0 ...ult-permission-message-configurable.patch} | 0 ...revent-rayTrace-from-loading-chunks.patch} | 0 ...-Large-Packets-disconnecting-client.patch} | 14 +- ...ntity-dismount-during-teleportation.patch} | 4 +- ...I.patch => 0324-Add-more-Zombie-API.patch} | 2 +- ...0325-Add-PlayerConnectionCloseEvent.patch} | 8 +- ...revent-Enderman-from-loading-chunks.patch} | 0 ...replace-OfflinePlayer-getLastPlayed.patch} | 4 +- ...tch => 0328-Fix-PlayerEditBookEvent.patch} | 0 ...ehicle-tracking-issue-on-disconnect.patch} | 0 ...nRetractEvent-for-all-empty-pistons.patch} | 0 ...remove-from-being-called-on-Players.patch} | 2 +- ...ent.patch => 0332-BlockDestroyEvent.patch} | 2 +- ...m-Shapeless-Custom-Crafting-Recipes.patch} | 0 ...h => 0334-Fix-sign-edit-memory-leak.patch} | 0 ... 0335-Limit-Client-Sign-length-more.patch} | 0 ...onvertSigns-boolean-every-sign-save.patch} | 0 ...Manager-and-add-advanced-packet-sup.patch} | 34 ++-- ...e-Oversized-Tile-Entities-in-chunks.patch} | 0 ...-Fix-Whitelist-On-Off-inconsistency.patch} | 2 +- ...t-tick-at-start-of-drowning-process.patch} | 0 ...41-Allow-Saving-of-Oversized-Chunks.patch} | 6 +- ...ggleEvent-when-whitelist-is-toggled.patch} | 2 +- ...43-Add-LivingEntity-getTargetEntity.patch} | 4 +- ...ngth-when-serialising-BungeeCord-te.patch} | 0 ...=> 0345-Entity-getEntitySpawnReason.patch} | 2 +- ...ty-Metadata-for-all-tracked-players.patch} | 0 ...47-Implement-PlayerPostRespawnEvent.patch} | 2 +- ...for-pickupDelay-breaks-picking-up-i.patch} | 0 ...-and-setters-for-EntityItem-owner-a.patch} | 0 ...ts.patch => 0350-Server-Tick-Events.patch} | 2 +- ...351-PlayerDeathEvent-getItemsToKeep.patch} | 0 ...Optimize-Captured-TileEntity-Lookup.patch} | 2 +- ...API.patch => 0353-Add-Heightmap-API.patch} | 2 +- ...> 0354-Mob-Spawner-API-Enhancements.patch} | 0 ...ayer-View-Distance-API-placeholders.patch} | 4 +- ...-to-changed-postToMainThread-method.patch} | 0 ...-item-frames-are-modified-MC-123450.patch} | 0 ...sPrimaryThread-and-MinecraftServer-.patch} | 2 +- ...-entity-loss-due-to-unloaded-chunks.patch} | 0 ... 0360-Duplicate-UUID-Resolve-Option.patch} | 4 +- ...61-improve-CraftWorld-isChunkLoaded.patch} | 0 ...e-Keep-Spawn-Loaded-range-per-world.patch} | 4 +- ...ityAreaEffectCloud-from-going-negat.patch} | 0 ....patch => 0364-ChunkMapDistance-CME.patch} | 0 ...0365-Implement-CraftBlockSoundGroup.patch} | 0 ...d.patch => 0366-Chunk-debug-command.patch} | 0 ...ptions-from-dispenser-entity-spawns.patch} | 0 ...68-Fix-World-isChunkGenerated-calls.patch} | 0 ...te-location-if-we-failed-to-read-it.patch} | 0 ...aletteBlock-instead-of-ReentrantLoc.patch} | 0 ...ch => 0371-incremental-chunk-saving.patch} | 4 +- ...1-Anti-Xray.patch => 0372-Anti-Xray.patch} | 4 +- ...l-Spawned-mobs-towards-natural-spaw.patch} | 4 +- ...urable-projectile-relative-velocity.patch} | 4 +- ...being-ticked-when-notifying-navigat.patch} | 0 ...h => 0376-offset-item-frame-ticking.patch} | 0 ...pper-searches-if-there-are-no-items.patch} | 0 ...8-Asynchronous-chunk-IO-and-loading.patch} | 16 +- ...tChunkIfLoadedImmediately-in-places.patch} | 0 ...ads.patch => 0380-Reduce-sync-loads.patch} | 0 ...ement-alternative-item-despawn-rate.patch} | 4 +- ...f-we-have-a-custom-Bukkit-generator.patch} | 2 +- ...-158900.patch => 0383-Fix-MC-158900.patch} | 2 +- ...revent-consuming-the-wrong-itemstack.patch | 8 +- .../0387-Generator-Settings.patch | 8 +- ...-sneak-when-changing-worlds-MC-10657.patch | 6 +- ...d-option-to-disable-pillager-patrols.patch | 4 +- ...or-when-player-hand-set-to-empty-typ.patch | 2 +- ...5656-Fix-Follow-Range-Initial-Target.patch | 8 +- .../0399-Optimize-Hoppers.patch | 4 +- ...layerDeathEvent-shouldDropExperience.patch | 4 +- .../0406-Lag-compensate-eating.patch | 12 +- .../0409-Entity-Activation-Range-2.0.patch | 2 +- .../0411-Tracking-Range-Improvements.patch | 4 +- ...e-getChunkAt-calls-for-loaded-chunks.patch | 4 +- .../0418-Entity-Jump-API.patch | 4 +- ...n-to-nerf-pigmen-from-nether-portals.patch | 4 +- .../0420-Make-the-GUI-graph-fancier.patch | 2 +- ...to-allow-iron-golems-to-spawn-in-air.patch | 2 +- ...-chance-of-villager-zombie-infection.patch | 4 +- ...imise-TickListServer-by-rewriting-it.patch | 2 +- ...spawn-settings-and-per-player-option.patch | 6 +- ...nnections-shouldn-t-hold-up-shutdown.patch | 2 +- ...-PlayerChunkMap-adds-crashing-server.patch | 4 +- ...ptimize-Collision-to-not-load-chunks.patch | 2 +- .../0435-Don-t-tick-dead-players.patch | 4 +- ...d-Player-s-shouldn-t-be-able-to-move.patch | 2 +- ...hunkMap-memory-use-for-visibleChunks.patch | 20 +- .../0438-Increase-Light-Queue-Size.patch | 6 +- ...asks-Speed-up-processing-of-chunk-lo.patch | 8 +- ...move-existing-players-to-world-spawn.patch | 10 +- ...Add-Raw-Byte-ItemStack-Serialization.patch | 6 +- .../0447-Improved-Watchdog-Support.patch | 10 +- ...vent-opening-inventories-when-frozen.patch | 8 +- ...-entity-collision-code-if-not-needed.patch | 4 +- ...imise-entity-hard-collision-checking.patch | 4 +- ...oviderServer-s-chunk-level-checking-.patch | 2 +- ...-Implement-Player-Client-Options-API.patch | 6 +- ...-Chunk-Post-Processing-deadlock-risk.patch | 10 +- ...61-Broadcast-join-message-to-console.patch | 2 +- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 14 +- ...Load-Chunks-for-Login-Asynchronously.patch | 14 +- ...PlayerAttackEntityCooldownResetEvent.patch | 2 +- ...allbacks-to-schedule-for-Callback-Ex.patch | 4 +- ...ntom-creative-and-insomniac-controls.patch | 4 +- ...m-duplication-issues-and-teleport-is.patch | 6 +- .../0470-Implement-Brigadier-Mojang-API.patch | 6 +- .../0471-Villager-Restocks-API.patch | 25 +-- ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- .../0474-Sync-position-on-teleportation.patch | 2 +- .../0477-Implement-Mob-Goal-API.patch | 35 ++-- ...tance-map-to-optimise-entity-tracker.patch | 24 +-- ...-isOutsideRange-to-use-distance-maps.patch | 33 ++-- ...No-Tick-view-distance-implementation.patch | 56 +++--- .../0482-Add-villager-reputation-API.patch | 2 +- .../0483-Fix-Light-Command.patch | 4 +- ...Wait-for-Async-Tasks-during-shutdown.patch | 2 +- ...llocation-of-Vec3D-by-entity-tracker.patch | 4 +- ...ound-for-Client-Lag-Spikes-MC-162253.patch | 13 +- ...k-Priority-Urgency-System-for-Chunks.patch | 44 ++--- ...-packets-to-nearby-locations-sounds-.patch | 2 +- ...mprove-Chunk-Status-Transition-Speed.patch | 10 +- .../0505-Optimize-Light-Engine.patch | 8 +- ...unk-Unloads-based-on-Player-Movement.patch | 4 +- ...-desync-in-playerconnection-causing-.patch | 2 +- .../0513-Fix-enderdragon-exp-dupe.patch | 2 +- ...implement-PlayerRecipeBookClickEvent.patch | 2 +- ...ement-optional-per-player-mob-spawns.patch | 10 +- 187 files changed, 711 insertions(+), 411 deletions(-) create mode 100644 Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch rename Spigot-Server-Patches/{0273-Optimize-BlockPosition-helper-methods.patch => 0274-Optimize-BlockPosition-helper-methods.patch} (100%) rename Spigot-Server-Patches/{0274-Restore-vanlla-default-mob-spawn-range.patch => 0275-Restore-vanlla-default-mob-spawn-range.patch} (100%) rename Spigot-Server-Patches/{0275-Fix-MC-124320.patch => 0276-Fix-MC-124320.patch} (100%) rename Spigot-Server-Patches/{0276-Slime-Pathfinder-Events.patch => 0277-Slime-Pathfinder-Events.patch} (100%) rename Spigot-Server-Patches/{0277-Configurable-speed-for-water-flowing-over-lava.patch => 0278-Configurable-speed-for-water-flowing-over-lava.patch} (90%) rename Spigot-Server-Patches/{0278-Optimize-CraftBlockData-Creation.patch => 0279-Optimize-CraftBlockData-Creation.patch} (100%) rename Spigot-Server-Patches/{0279-Optimize-RegistryMaterials.patch => 0280-Optimize-RegistryMaterials.patch} (74%) rename Spigot-Server-Patches/{0280-Add-PhantomPreSpawnEvent.patch => 0281-Add-PhantomPreSpawnEvent.patch} (100%) rename Spigot-Server-Patches/{0281-Add-More-Creeper-API.patch => 0282-Add-More-Creeper-API.patch} (100%) rename Spigot-Server-Patches/{0282-Inventory-removeItemAnySlot.patch => 0283-Inventory-removeItemAnySlot.patch} (100%) rename Spigot-Server-Patches/{0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch => 0284-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch} (100%) rename Spigot-Server-Patches/{0284-Add-ray-tracing-methods-to-LivingEntity.patch => 0285-Add-ray-tracing-methods-to-LivingEntity.patch} (96%) rename Spigot-Server-Patches/{0285-Expose-attack-cooldown-methods-for-Player.patch => 0286-Expose-attack-cooldown-methods-for-Player.patch} (95%) rename Spigot-Server-Patches/{0286-Improve-death-events.patch => 0287-Improve-death-events.patch} (98%) rename Spigot-Server-Patches/{0287-Allow-chests-to-be-placed-with-NBT-data.patch => 0288-Allow-chests-to-be-placed-with-NBT-data.patch} (100%) rename Spigot-Server-Patches/{0288-Mob-Pathfinding-API.patch => 0289-Mob-Pathfinding-API.patch} (100%) rename Spigot-Server-Patches/{0289-Prevent-chunk-loading-from-Fluid-Flowing.patch => 0290-Prevent-chunk-loading-from-Fluid-Flowing.patch} (100%) rename Spigot-Server-Patches/{0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch => 0291-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch} (100%) rename Spigot-Server-Patches/{0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch => 0292-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch} (100%) rename Spigot-Server-Patches/{0292-Prevent-mob-spawning-from-loading-generating-chunks.patch => 0293-Prevent-mob-spawning-from-loading-generating-chunks.patch} (100%) rename Spigot-Server-Patches/{0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch => 0294-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch} (100%) rename Spigot-Server-Patches/{0294-Implement-furnace-cook-speed-multiplier-API.patch => 0295-Implement-furnace-cook-speed-multiplier-API.patch} (100%) rename Spigot-Server-Patches/{0295-PreSpawnerSpawnEvent.patch => 0296-PreSpawnerSpawnEvent.patch} (100%) rename Spigot-Server-Patches/{0296-Catch-JsonParseException-in-Entity-and-TE-names.patch => 0297-Catch-JsonParseException-in-Entity-and-TE-names.patch} (100%) rename Spigot-Server-Patches/{0297-Honor-EntityAgeable.ageLock.patch => 0298-Honor-EntityAgeable.ageLock.patch} (100%) rename Spigot-Server-Patches/{0298-Configurable-connection-throttle-kick-message.patch => 0299-Configurable-connection-throttle-kick-message.patch} (100%) rename Spigot-Server-Patches/{0299-Hook-into-CB-plugin-rewrites.patch => 0300-Hook-into-CB-plugin-rewrites.patch} (100%) rename Spigot-Server-Patches/{0300-Allow-setting-the-vex-s-summoner.patch => 0301-Allow-setting-the-vex-s-summoner.patch} (100%) rename Spigot-Server-Patches/{0301-Add-sun-related-API.patch => 0302-Add-sun-related-API.patch} (100%) rename Spigot-Server-Patches/{0302-Turtle-API.patch => 0303-Turtle-API.patch} (100%) rename Spigot-Server-Patches/{0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch => 0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch} (100%) rename Spigot-Server-Patches/{0304-Call-player-spectator-target-events-and-improve-impl.patch => 0305-Call-player-spectator-target-events-and-improve-impl.patch} (100%) rename Spigot-Server-Patches/{0305-Add-Velocity-IP-Forwarding-Support.patch => 0306-Add-Velocity-IP-Forwarding-Support.patch} (95%) rename Spigot-Server-Patches/{0306-Add-more-Witch-API.patch => 0307-Add-more-Witch-API.patch} (100%) rename Spigot-Server-Patches/{0307-Check-Drowned-for-Villager-Aggression-Config.patch => 0308-Check-Drowned-for-Villager-Aggression-Config.patch} (100%) rename Spigot-Server-Patches/{0308-Here-s-Johnny.patch => 0309-Here-s-Johnny.patch} (100%) rename Spigot-Server-Patches/{0309-Add-option-to-prevent-players-from-moving-into-unloa.patch => 0310-Add-option-to-prevent-players-from-moving-into-unloa.patch} (96%) rename Spigot-Server-Patches/{0310-Reset-players-airTicks-on-respawn.patch => 0311-Reset-players-airTicks-on-respawn.patch} (100%) rename Spigot-Server-Patches/{0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch => 0312-Don-t-sleep-after-profile-lookups-if-not-needed.patch} (100%) rename Spigot-Server-Patches/{0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch => 0313-Improve-Server-Thread-Pool-and-Thread-Priorities.patch} (95%) rename Spigot-Server-Patches/{0313-Optimize-World-Time-Updates.patch => 0314-Optimize-World-Time-Updates.patch} (96%) rename Spigot-Server-Patches/{0314-Restore-custom-InventoryHolder-support.patch => 0315-Restore-custom-InventoryHolder-support.patch} (100%) rename Spigot-Server-Patches/{0315-Use-Vanilla-Minecart-Speeds.patch => 0316-Use-Vanilla-Minecart-Speeds.patch} (100%) rename Spigot-Server-Patches/{0316-Fix-SpongeAbsortEvent-handling.patch => 0317-Fix-SpongeAbsortEvent-handling.patch} (100%) rename Spigot-Server-Patches/{0317-Don-t-allow-digging-into-unloaded-chunks.patch => 0318-Don-t-allow-digging-into-unloaded-chunks.patch} (100%) rename Spigot-Server-Patches/{0318-Book-Size-Limits.patch => 0319-Book-Size-Limits.patch} (100%) rename Spigot-Server-Patches/{0319-Make-the-default-permission-message-configurable.patch => 0320-Make-the-default-permission-message-configurable.patch} (100%) rename Spigot-Server-Patches/{0320-Prevent-rayTrace-from-loading-chunks.patch => 0321-Prevent-rayTrace-from-loading-chunks.patch} (100%) rename Spigot-Server-Patches/{0321-Handle-Large-Packets-disconnecting-client.patch => 0322-Handle-Large-Packets-disconnecting-client.patch} (87%) rename Spigot-Server-Patches/{0322-force-entity-dismount-during-teleportation.patch => 0323-force-entity-dismount-during-teleportation.patch} (97%) rename Spigot-Server-Patches/{0323-Add-more-Zombie-API.patch => 0324-Add-more-Zombie-API.patch} (98%) rename Spigot-Server-Patches/{0324-Add-PlayerConnectionCloseEvent.patch => 0325-Add-PlayerConnectionCloseEvent.patch} (93%) rename Spigot-Server-Patches/{0325-Prevent-Enderman-from-loading-chunks.patch => 0326-Prevent-Enderman-from-loading-chunks.patch} (100%) rename Spigot-Server-Patches/{0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch => 0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch} (97%) rename Spigot-Server-Patches/{0327-Fix-PlayerEditBookEvent.patch => 0328-Fix-PlayerEditBookEvent.patch} (100%) rename Spigot-Server-Patches/{0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch => 0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch} (100%) rename Spigot-Server-Patches/{0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch => 0330-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch} (100%) rename Spigot-Server-Patches/{0330-Block-Entity-remove-from-being-called-on-Players.patch => 0331-Block-Entity-remove-from-being-called-on-Players.patch} (93%) rename Spigot-Server-Patches/{0331-BlockDestroyEvent.patch => 0332-BlockDestroyEvent.patch} (95%) rename Spigot-Server-Patches/{0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch => 0333-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch} (100%) rename Spigot-Server-Patches/{0333-Fix-sign-edit-memory-leak.patch => 0334-Fix-sign-edit-memory-leak.patch} (100%) rename Spigot-Server-Patches/{0334-Limit-Client-Sign-length-more.patch => 0335-Limit-Client-Sign-length-more.patch} (100%) rename Spigot-Server-Patches/{0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch => 0336-Don-t-check-ConvertSigns-boolean-every-sign-save.patch} (100%) rename Spigot-Server-Patches/{0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => 0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (93%) rename Spigot-Server-Patches/{0337-Handle-Oversized-Tile-Entities-in-chunks.patch => 0338-Handle-Oversized-Tile-Entities-in-chunks.patch} (100%) rename Spigot-Server-Patches/{0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch => 0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch} (94%) rename Spigot-Server-Patches/{0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch => 0340-Set-Zombie-last-tick-at-start-of-drowning-process.patch} (100%) rename Spigot-Server-Patches/{0340-Allow-Saving-of-Oversized-Chunks.patch => 0341-Allow-Saving-of-Oversized-Chunks.patch} (98%) rename Spigot-Server-Patches/{0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => 0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (88%) rename Spigot-Server-Patches/{0342-Add-LivingEntity-getTargetEntity.patch => 0343-Add-LivingEntity-getTargetEntity.patch} (98%) rename Spigot-Server-Patches/{0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch => 0344-Use-proper-max-length-when-serialising-BungeeCord-te.patch} (100%) rename Spigot-Server-Patches/{0344-Entity-getEntitySpawnReason.patch => 0345-Entity-getEntitySpawnReason.patch} (98%) rename Spigot-Server-Patches/{0345-Update-entity-Metadata-for-all-tracked-players.patch => 0346-Update-entity-Metadata-for-all-tracked-players.patch} (100%) rename Spigot-Server-Patches/{0346-Implement-PlayerPostRespawnEvent.patch => 0347-Implement-PlayerPostRespawnEvent.patch} (95%) rename Spigot-Server-Patches/{0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => 0348-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (100%) rename Spigot-Server-Patches/{0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch => 0349-Implement-getters-and-setters-for-EntityItem-owner-a.patch} (100%) rename Spigot-Server-Patches/{0349-Server-Tick-Events.patch => 0350-Server-Tick-Events.patch} (93%) rename Spigot-Server-Patches/{0350-PlayerDeathEvent-getItemsToKeep.patch => 0351-PlayerDeathEvent-getItemsToKeep.patch} (100%) rename Spigot-Server-Patches/{0351-Optimize-Captured-TileEntity-Lookup.patch => 0352-Optimize-Captured-TileEntity-Lookup.patch} (93%) rename Spigot-Server-Patches/{0352-Add-Heightmap-API.patch => 0353-Add-Heightmap-API.patch} (96%) rename Spigot-Server-Patches/{0353-Mob-Spawner-API-Enhancements.patch => 0354-Mob-Spawner-API-Enhancements.patch} (100%) rename Spigot-Server-Patches/{0354-Per-Player-View-Distance-API-placeholders.patch => 0355-Per-Player-View-Distance-API-placeholders.patch} (95%) rename Spigot-Server-Patches/{0355-Fix-CB-call-to-changed-postToMainThread-method.patch => 0356-Fix-CB-call-to-changed-postToMainThread-method.patch} (100%) rename Spigot-Server-Patches/{0356-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => 0357-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (100%) rename Spigot-Server-Patches/{0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch => 0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch} (95%) rename Spigot-Server-Patches/{0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch => 0359-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch} (100%) rename Spigot-Server-Patches/{0359-Duplicate-UUID-Resolve-Option.patch => 0360-Duplicate-UUID-Resolve-Option.patch} (98%) rename Spigot-Server-Patches/{0360-improve-CraftWorld-isChunkLoaded.patch => 0361-improve-CraftWorld-isChunkLoaded.patch} (100%) rename Spigot-Server-Patches/{0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch => 0362-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (98%) rename Spigot-Server-Patches/{0362-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch => 0363-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch} (100%) rename Spigot-Server-Patches/{0363-ChunkMapDistance-CME.patch => 0364-ChunkMapDistance-CME.patch} (100%) rename Spigot-Server-Patches/{0364-Implement-CraftBlockSoundGroup.patch => 0365-Implement-CraftBlockSoundGroup.patch} (100%) rename Spigot-Server-Patches/{0365-Chunk-debug-command.patch => 0366-Chunk-debug-command.patch} (100%) rename Spigot-Server-Patches/{0366-Catch-exceptions-from-dispenser-entity-spawns.patch => 0367-Catch-exceptions-from-dispenser-entity-spawns.patch} (100%) rename Spigot-Server-Patches/{0367-Fix-World-isChunkGenerated-calls.patch => 0368-Fix-World-isChunkGenerated-calls.patch} (100%) rename Spigot-Server-Patches/{0368-Show-blockstate-location-if-we-failed-to-read-it.patch => 0369-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename Spigot-Server-Patches/{0369-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch => 0370-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch} (100%) rename Spigot-Server-Patches/{0370-incremental-chunk-saving.patch => 0371-incremental-chunk-saving.patch} (99%) rename Spigot-Server-Patches/{0371-Anti-Xray.patch => 0372-Anti-Xray.patch} (99%) rename Spigot-Server-Patches/{0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => 0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (94%) rename Spigot-Server-Patches/{0373-Configurable-projectile-relative-velocity.patch => 0374-Configurable-projectile-relative-velocity.patch} (95%) rename Spigot-Server-Patches/{0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch => 0375-Mark-entities-as-being-ticked-when-notifying-navigat.patch} (100%) rename Spigot-Server-Patches/{0375-offset-item-frame-ticking.patch => 0376-offset-item-frame-ticking.patch} (100%) rename Spigot-Server-Patches/{0376-Avoid-hopper-searches-if-there-are-no-items.patch => 0377-Avoid-hopper-searches-if-there-are-no-items.patch} (100%) rename Spigot-Server-Patches/{0377-Asynchronous-chunk-IO-and-loading.patch => 0378-Asynchronous-chunk-IO-and-loading.patch} (99%) rename Spigot-Server-Patches/{0378-Use-getChunkIfLoadedImmediately-in-places.patch => 0379-Use-getChunkIfLoadedImmediately-in-places.patch} (100%) rename Spigot-Server-Patches/{0379-Reduce-sync-loads.patch => 0380-Reduce-sync-loads.patch} (100%) rename Spigot-Server-Patches/{0380-Implement-alternative-item-despawn-rate.patch => 0381-Implement-alternative-item-despawn-rate.patch} (97%) rename Spigot-Server-Patches/{0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch => 0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch} (96%) rename Spigot-Server-Patches/{0382-Fix-MC-158900.patch => 0383-Fix-MC-158900.patch} (94%) rename Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch => removed/1.16/0384-implement-optional-per-player-mob-spawns.patch (99%) diff --git a/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch b/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch index e3475cd019..07f5fd15f3 100644 --- a/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch +++ b/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch @@ -223,10 +223,10 @@ index 0000000000000000000000000000000000000000..e21f7574763dd4f13794f91bbef192ef +} diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java new file mode 100644 -index 0000000000000000000000000000000000000000..d23ad96ee436ae57231bbf88eed19487dec06780 +index 0000000000000000000000000000000000000000..d7f1b2c84aebe8ed04084b9249ed08d5e52a6ecd --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -@@ -0,0 +1,198 @@ +@@ -0,0 +1,208 @@ +package com.destroystokyo.paper.entity.ai; + +import com.destroystokyo.paper.entity.RangedEntity; @@ -315,7 +315,15 @@ index 0000000000000000000000000000000000000000..d23ad96ee436ae57231bbf88eed19487 + GoalKey PHANTOM_ATTACK_STRATEGY = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_attack_strategy")); + GoalKey PHANTOM_CIRCLE_AROUND_ANCHOR = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_circle_around_anchor")); + GoalKey PHANTOM_SWEEP_ATTACK = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_sweep_attack")); ++ /** ++ * @deprecated removed in 1.16 ++ */ ++ @Deprecated + GoalKey ANGER = GoalKey.of(PigZombie.class, NamespacedKey.minecraft("anger")); ++ /** ++ * @deprecated removed in 1.16 ++ */ ++ @Deprecated + GoalKey ANGER_OTHER = GoalKey.of(PigZombie.class, NamespacedKey.minecraft("anger_other")); + GoalKey POLARBEAR_ATTACK_PLAYERS = GoalKey.of(PolarBear.class, NamespacedKey.minecraft("polarbear_attack_players")); + GoalKey POLARBEAR_HURT_BY = GoalKey.of(PolarBear.class, NamespacedKey.minecraft("polarbear_hurt_by")); @@ -424,6 +432,8 @@ index 0000000000000000000000000000000000000000..d23ad96ee436ae57231bbf88eed19487 + GoalKey WATER = GoalKey.of(Creature.class, NamespacedKey.minecraft("water")); + GoalKey WATER_JUMP = GoalKey.of(Dolphin.class, NamespacedKey.minecraft("water_jump")); + GoalKey ZOMBIE_ATTACK = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack")); ++ GoalKey STROLL_VILLAGE_GOLEM = GoalKey.of(Creature.class, NamespacedKey.minecraft("stroll_village_golem")); ++ GoalKey UNIVERSAL_ANGER_RESET = GoalKey.of(Mob.class, NamespacedKey.minecraft("universal_anger_reset")); +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java index 95ad0122605b40e28352fa6205528eeb5c453a50..a9c10228eeeaac89361c695a5ab90161b6358ca1 100644 diff --git a/Spigot-API-Patches/0206-Potential-bed-API.patch b/Spigot-API-Patches/0206-Potential-bed-API.patch index dd2041922b..4c287e622b 100644 --- a/Spigot-API-Patches/0206-Potential-bed-API.patch +++ b/Spigot-API-Patches/0206-Potential-bed-API.patch @@ -8,21 +8,13 @@ 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/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 1f94cbee36b6a952b2ecca8efbeaf7deee640a81..c0d38f5a39610cbc523d210b76f17fa17c0d7e62 100644 +index 1f94cbee36b6a952b2ecca8efbeaf7deee640a81..e6cdd4bc2d934ab932651e17f144d7004835bdc3 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -239,6 +239,43 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -239,6 +239,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getSleepTicks(); -+ /** -+ * Gets the Location where the player will spawn at their bed, null if -+ * they have not slept in one or their current bed spawn is invalid. -+ * -+ * @return Bed Spawn Location if bed exists, otherwise null. -+ */ -+ @Nullable -+ public Location getBedSpawnLocation(); + + // Paper start - Potential bed api + /** @@ -35,22 +27,6 @@ index 1f94cbee36b6a952b2ecca8efbeaf7deee640a81..c0d38f5a39610cbc523d210b76f17fa1 + @Nullable + public Location getPotentialBedLocation(); + // Paper end -+ -+ /** -+ * Sets the Location where the player will spawn at their bed. -+ * -+ * @param location where to set the respawn location -+ */ -+ public void setBedSpawnLocation(@Nullable Location location); -+ -+ /** -+ * Sets the Location where the player will spawn at their bed. -+ * -+ * @param location where to set the respawn location -+ * @param force whether to forcefully set the respawn location even if a -+ * valid bed is not present -+ */ -+ public void setBedSpawnLocation(@Nullable Location location, boolean force); + /** * Attempts to make the entity sleep at the given location. diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index d9b98eb286..ce7387973a 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -555,7 +555,7 @@ index 062a82c37723b7f032103ba2904877ae79b1ae01..5585b5646b5f3650aa3b795be06f9206 } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 27e6872c675647d7e61040b76183dac4e347a40c..1964130ae411ff7d5e1b456a23629804d294a5d0 100644 +index 27e6872c675647d7e61040b76183dac4e347a40c..aa68eb71b131c1d529ded6c651621cfab071b3c4 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -148,6 +148,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -564,7 +564,7 @@ index 27e6872c675647d7e61040b76183dac4e347a40c..1964130ae411ff7d5e1b456a23629804 // Spigot end + // Paper start + try { -+ com.destroystokyo.paper.PaperConfig.init((File) options.valueOf("paper-settings")); ++ com.destroystokyo.paper.PaperConfig.init((java.io.File) options.valueOf("paper-settings")); + } catch (Exception e) { + DedicatedServer.LOGGER.error("Unable to load server configuration", e); + return false; diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 7629074599..b5c9286276 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -193,6 +193,19 @@ index 6c2ed9c1b8567abcdb11bdc3dbaeed217a2f61e7..ae0ac8d383ca11a683465d8c83a8b8a6 return this.getTemperature() - (f + (float) blockposition.getY() - 64.0F) * 0.05F / 30.0F; } else { +diff --git a/src/main/java/net/minecraft/server/Biomes.java b/src/main/java/net/minecraft/server/Biomes.java +index 0aa66addb2cb472b2ab90000d3f0e0f967353e0f..eaa527f4fe289a9492b12591154a60e5aa045252 100644 +--- a/src/main/java/net/minecraft/server/Biomes.java ++++ b/src/main/java/net/minecraft/server/Biomes.java +@@ -88,7 +88,7 @@ public abstract class Biomes { + private static BiomeBase a(int i, String s, BiomeBase biomebase) { + IRegistry.a(IRegistry.BIOME, i, s, biomebase); + if (biomebase.b()) { +- BiomeBase.d.a(biomebase, IRegistry.BIOME.a(IRegistry.BIOME.get(new MinecraftKey(biomebase.l)))); ++ BiomeBase.reg.a(biomebase, IRegistry.BIOME.a(IRegistry.BIOME.get(new MinecraftKey(biomebase.l)))); + } + + return biomebase; diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java index 771841e08591955e61c7bcc5b09c8457652c1b9c..8162c11d14b8e88c2b572f9ddf6b7a15977047f8 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java @@ -403,6 +416,19 @@ index 8b1f9116afd92b13426eb0e97066297705d202fb..a9dc8466278f9ec2becbcb643e6e1c97 this.b(); this.g.set(false); })); +diff --git a/src/main/java/net/minecraft/server/LootEntryAbstract.java b/src/main/java/net/minecraft/server/LootEntryAbstract.java +index 8cc8c60d3297a4ed98f3950a3971d83499ad1dfa..788078c209b8bcbd551cf0a52eb6172928d7b5f9 100644 +--- a/src/main/java/net/minecraft/server/LootEntryAbstract.java ++++ b/src/main/java/net/minecraft/server/LootEntryAbstract.java +@@ -36,7 +36,7 @@ public abstract class LootEntryAbstract implements LootEntryChildren { + + // CraftBukkit start + @Override +- public final void a(JsonObject jsonobject, T t0, JsonSerializationContext jsonserializationcontext) { ++ public void a(JsonObject jsonobject, T t0, JsonSerializationContext jsonserializationcontext) { // Paper - remove final + if (!org.apache.commons.lang3.ArrayUtils.isEmpty(t0.d)) { + jsonobject.add("conditions", jsonserializationcontext.serialize(t0.d)); + } diff --git a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java b/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java index 3aa5cc4281cdba8738890e9ffd5c7a129e60c310..32a98e758b9df48005ddc5283eacdc5123a32c39 100644 --- a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java @@ -473,6 +499,27 @@ index 829a7ae0a2b77205fb8e8c5754d0d4333afa224d..8b9e47b4c7f5dc464fa617a59583df9e default String asString() { return this.toString(); +diff --git a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +index db66d4ac7dc1bede8b674cd9ad8f56dd989b6693..c9be8c7f40917056091f63d36311a10d6302acbb 100644 +--- a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java ++++ b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +@@ -11,6 +11,7 @@ import java.io.InputStream; + import java.io.OutputStream; + import java.util.zip.GZIPInputStream; + import java.util.zip.GZIPOutputStream; ++import io.netty.buffer.ByteBufInputStream; // Paper + + public class NBTCompressedStreamTools { + +@@ -75,7 +76,7 @@ public class NBTCompressedStreamTools { + + public static NBTTagCompound a(DataInput datainput, NBTReadLimiter nbtreadlimiter) throws IOException { + // Spigot start +- if ( datainput instanceof io.netty.buffer.ByteBufInputStream ) ++ if ( datainput instanceof ByteBufInputStream) // Paper + { + datainput = new DataInputStream(new org.spigotmc.LimitStream((InputStream) datainput, nbtreadlimiter)); + } diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java index b8bb5027ecccfc9b664145a1bfe3755f1a8af3eb..ad8a506bb430b26fe147a657a2f826daf9bf4d45 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java @@ -549,6 +596,19 @@ index 2dc20b5c930c6845af41b35d69cdb03db639d63e..6cdd4d46d987132c3c241800b5d59cee this.e = 0; this.f = 0; +diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java +index 68510457b527e61bf60bf1e7dfd664578172c00a..eefad79a01de61eff5e0bd3f709bfda030ebe20d 100644 +--- a/src/main/java/net/minecraft/server/StructureGenerator.java ++++ b/src/main/java/net/minecraft/server/StructureGenerator.java +@@ -42,7 +42,7 @@ public abstract class StructureGenerator + private static > F a(String s, F f0, WorldGenStage.Decoration worldgenstage_decoration) { + StructureGenerator.a.put(s.toLowerCase(Locale.ROOT), f0); + StructureGenerator.u.put(f0, worldgenstage_decoration); +- return (StructureGenerator) IRegistry.a(IRegistry.STRUCTURE_FEATURE, s.toLowerCase(Locale.ROOT), (Object) f0); ++ return (F) IRegistry.>a(IRegistry.STRUCTURE_FEATURE, s.toLowerCase(Locale.ROOT), f0); // Paper - decomp fix + } + + public StructureGenerator(Codec codec) { diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java index a1a5460e429356b52a75037c809cec85bd99084a..80ee8d196436e271833503a0e123401d1b3314a9 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 27c2861da2..0585ff032f 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -544,13 +544,14 @@ index 0000000000000000000000000000000000000000..d4ebcf8f66197299256bd6b65710a148 +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 -index 0000000000000000000000000000000000000000..03bb2102d6952df04753ba9986aad9b494568e2d +index 0000000000000000000000000000000000000000..944fd203e9f39d6c6fc9e270940c76c98067273a --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -@@ -0,0 +1,118 @@ +@@ -0,0 +1,119 @@ +package co.aikar.timings; + +import net.minecraft.server.World; ++import net.minecraft.server.WorldDataServer; +import net.minecraft.server.WorldServer; + +/** @@ -608,7 +609,7 @@ index 0000000000000000000000000000000000000000..03bb2102d6952df04753ba9986aad9b4 + public final Timing miscMobSpawning; + + public WorldTimingsHandler(World server) { -+ String name = server.getWorld().getName() +" - "; ++ String name = ((WorldDataServer) server.getWorldData()).getName() + " - "; + + mobSpawn = Timings.ofSafe(name + "mobSpawn"); + doChunkUnload = Timings.ofSafe(name + "doChunkUnload"); @@ -663,7 +664,7 @@ index 0000000000000000000000000000000000000000..03bb2102d6952df04753ba9986aad9b4 + } + + public static Timing getTickList(WorldServer worldserver, String timingsType) { -+ return Timings.ofSafe(worldserver.getWorld().getName() + " - Scheduled " + timingsType); ++ return Timings.ofSafe(((WorldDataServer) worldserver.getWorldData()).getName() + " - Scheduled " + timingsType); + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -923,7 +924,7 @@ index 903cbd10fba18e61a4dc3ced71e22a665b78f177..423e4d12aba9197b936e69dfd4146cee int k = 0; CustomFunction.c[] acustomfunction_c = customfunction.b(); diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 1964130ae411ff7d5e1b456a23629804d294a5d0..4cf4ef11ce295aec3b7d0bf07b64a1ecdca3c39a 100644 +index aa68eb71b131c1d529ded6c651621cfab071b3c4..9cba62efdb051c9850bbf28b0be17a7e00ed83c9 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -28,7 +28,7 @@ import org.apache.logging.log4j.Level; diff --git a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch index 976618f7f4..131e4e0ffb 100644 --- a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch @@ -4,8 +4,45 @@ Date: Sun, 8 Mar 2015 22:55:25 -0600 Subject: [PATCH] Optimize TileEntity Ticking +diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java +index d4ebcf8f66197299256bd6b65710a1488c90ea41..c9164dfdb27ddf3709129c8aec54903a1df121ff 100644 +--- a/src/main/java/co/aikar/timings/TimingsExport.java ++++ b/src/main/java/co/aikar/timings/TimingsExport.java +@@ -109,7 +109,7 @@ public class TimingsExport extends Thread { + pair("end", System.currentTimeMillis() / 1000), + pair("online-mode", Bukkit.getServer().getOnlineMode()), + pair("sampletime", (System.currentTimeMillis() - TimingsManager.timingStart) / 1000), +- pair("datapacks", toArrayMapper(MinecraftServer.getServer().getResourcePackRepository().d(), pack -> { ++ pair("datapacks", toArrayMapper(MinecraftServer.getServer().getResourcePackRepository().e(), pack -> { + // Don't feel like obf helper'ing these, non fatal if its temp missed. + return ChatColor.stripColor(CraftChatMessage.fromComponent(pack.a(true))); + })) +@@ -148,8 +148,8 @@ public class TimingsExport extends Thread { + ); + + parent.put("worlds", toObjectMapper(MinecraftServer.getServer().getWorlds(), world -> { +- if (world.getWorldData().getName().equals("worldeditregentempworld")) return null; +- return pair(world.getWorldData().getName(), createObject( ++ if (world.getWorld().getName().equals("worldeditregentempworld")) return null; ++ return pair(world.getWorld().getName(), createObject( + pair("gamerules", toObjectMapper(world.getWorld().getGameRules(), rule -> { + return pair(rule, world.getWorld().getGameRuleValue(rule)); + })), +diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java +index 1441d096d44ea653539ba20ccda94eb62ffc32df..b9d0d2d42850c3a5d093429cd0d02ac47848f04b 100644 +--- a/src/main/java/net/minecraft/server/BlockChest.java ++++ b/src/main/java/net/minecraft/server/BlockChest.java +@@ -11,7 +11,7 @@ public class BlockChest extends BlockChestAbstract implements I + + public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING; + public static final BlockStateEnum c = BlockProperties.aF; +- public static final BlockStateBoolean d = BlockProperties.C; ++ public static final BlockStateBoolean d = BlockProperties.C; public static final BlockStateBoolean waterlogged() { return d; } // Paper OBFHELPER + protected static final VoxelShape e = Block.a(1.0D, 0.0D, 0.0D, 15.0D, 14.0D, 15.0D); + protected static final VoxelShape f = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 16.0D); + protected static final VoxelShape g = Block.a(0.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..cc15686573f3a54ff0145b3486679b772157d191 100644 +index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..832fe1d41d69f44e4de1a6f4d037d3e104cac7af 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -70,7 +107,7 @@ index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..cc15686573f3a54ff0145b3486679b77 } private void a(SoundEffect soundeffect) { -+ if (!this.getBlock().hasProperty(BlockChest.c)) { return; } // Paper - this can be delayed, double check exists - Fixes GH-2074 ++ if (!this.getBlock().get(BlockChest.waterlogged())) { return; } // Paper - this can be delayed, double check exists - Fixes GH-2074 BlockPropertyChestType blockpropertychesttype = (BlockPropertyChestType) this.getBlock().get(BlockChest.c); if (blockpropertychesttype != BlockPropertyChestType.LEFT) { diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index b4645d220e..341daae8d7 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -57,7 +57,7 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19 packetdataserializer.a(this.c); packetdataserializer.a(this.d); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 42e7394326237fcb466ac9727b5ac732518cf1b9..32be0e35918398f2fd5f62c2cb87c4597985b7b3 100644 +index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a6326c8d9 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -75,6 +75,7 @@ public abstract class PlayerList { @@ -73,7 +73,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..32be0e35918398f2fd5f62c2cb87c459 entityplayer.syncInventory(); + // Paper start - Add to collideRule team if needed -+ final Scoreboard scoreboard = this.getServer().getWorldServer(DimensionManager.OVERWORLD).getScoreboard(); ++ final Scoreboard scoreboard = this.getServer().getWorldServer(World.OVERWORLD).getScoreboard(); + final ScoreboardTeam collideRuleTeam = scoreboard.getTeam(collideRuleTeamName); + if (this.collideRuleTeamName != null && collideRuleTeam != null && entityplayer.getScoreboardTeam() == null) { + scoreboard.addPlayerToTeam(entityplayer.getName(), collideRuleTeam); @@ -88,7 +88,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..32be0e35918398f2fd5f62c2cb87c459 + // Paper start - Remove from collideRule team if needed + if (this.collideRuleTeamName != null) { -+ final Scoreboard scoreBoard = this.server.getWorldServer(DimensionManager.OVERWORLD).getScoreboard(); ++ final Scoreboard scoreBoard = this.server.getWorldServer(World.OVERWORLD).getScoreboard(); + final ScoreboardTeam team = scoreBoard.getTeam(this.collideRuleTeamName); + if (entityplayer.getScoreboardTeam() == team && team != null) { + scoreBoard.removePlayerFromTeam(entityplayer.getName(), team); @@ -105,7 +105,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..32be0e35918398f2fd5f62c2cb87c459 + // Paper start - Remove collideRule team if it exists + if (this.collideRuleTeamName != null) { -+ final Scoreboard scoreboard = this.getServer().getWorldServer(DimensionManager.OVERWORLD).getScoreboard(); ++ final Scoreboard scoreboard = this.getServer().getWorldServer(World.OVERWORLD).getScoreboard(); + final ScoreboardTeam team = scoreboard.getTeam(this.collideRuleTeamName); + if (team != null) scoreboard.removeTeam(team); + } diff --git a/Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch index ae755561c9..1c1a2e5f48 100644 --- a/Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch +++ b/Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove FishingHook reference on Craft Entity removal diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index 591650712199f904af2c66b0d7e36ce31d87e1a3..f7b5320fc6c8a9dec40c69907c020d96fd3bfa00 100644 +index 591650712199f904af2c66b0d7e36ce31d87e1a3..b3c293a55e199d862526d35b6e85afc760f2b6fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -48,4 +48,15 @@ public class CraftFishHook extends CraftProjectile implements FishHook { @@ -17,10 +17,10 @@ index 591650712199f904af2c66b0d7e36ce31d87e1a3..f7b5320fc6c8a9dec40c69907c020d96 + @Override + public void remove() { + super.remove(); -+ if (getHandle().owner != null) { -+ getHandle().owner.hookedFish = null; ++ if (getHandle().getOwner() != null) { ++ getHandle().getOwner().hookedFish = null; + } + } + // Paper end -+ ++ } diff --git a/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch index 062d9f5804..5d436e4b05 100644 --- a/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch @@ -4,8 +4,21 @@ Date: Tue, 27 Dec 2016 15:02:42 -0500 Subject: [PATCH] String based Action Bar API +diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java +index 275c1d2d1eb2649de9a9b5aece6e88c21362efba..d72ba7f76c42fd525a5b59a999a0c08e35d0ef78 100644 +--- a/src/main/java/net/minecraft/server/SystemUtils.java ++++ b/src/main/java/net/minecraft/server/SystemUtils.java +@@ -48,7 +48,7 @@ public class SystemUtils { + private static final ExecutorService e = a("Main"); + private static final ExecutorService f = n(); + public static LongSupplier a = System::nanoTime; +- public static final UUID b = new UUID(0L, 0L); ++ public static final UUID b = new UUID(0L, 0L); public static final UUID getNullUUID() {return b;} // Paper OBFHELPER + private static final Logger LOGGER = LogManager.getLogger(); + + public static Collector, ?, Map> a() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 20cb63419a049ce9dcaf2f0c99274501ebf9aa8c..527c116c23a505eead00e73a39ce9f932eb4ad8d 100644 +index 20cb63419a049ce9dcaf2f0c99274501ebf9aa8c..2118f7a8ea87191fd6fb5324c3c29f8beb43f3f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -219,6 +219,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -15,7 +28,7 @@ index 20cb63419a049ce9dcaf2f0c99274501ebf9aa8c..527c116c23a505eead00e73a39ce9f93 + @Override + public void sendActionBar(String message) { + if (getHandle().playerConnection == null || message == null || message.isEmpty()) return; -+ getHandle().playerConnection.sendPacket(new PacketPlayOutChat(new net.minecraft.server.ChatComponentText(message), net.minecraft.server.ChatMessageType.GAME_INFO)); ++ getHandle().playerConnection.sendPacket(new PacketPlayOutChat(new net.minecraft.server.ChatComponentText(message), net.minecraft.server.ChatMessageType.GAME_INFO, SystemUtils.getNullUUID())); + } + + @Override diff --git a/Spigot-Server-Patches/0235-RangedEntity-API.patch b/Spigot-Server-Patches/0235-RangedEntity-API.patch index 4d28a11045..3996603c6f 100644 --- a/Spigot-Server-Patches/0235-RangedEntity-API.patch +++ b/Spigot-Server-Patches/0235-RangedEntity-API.patch @@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..696660b089ba355f865e5051237eefd0 + } +} diff --git a/src/main/java/net/minecraft/server/IRangedEntity.java b/src/main/java/net/minecraft/server/IRangedEntity.java -index b4178ce1e86ad40b64a229e066f058a8e848324d..9b79ac77db880930fcb86744924bf0baa92bef31 100644 +index b4178ce1e86ad40b64a229e066f058a8e848324d..fbfed5140539384bdd31e0f2777a3f92690d2576 100644 --- a/src/main/java/net/minecraft/server/IRangedEntity.java +++ b/src/main/java/net/minecraft/server/IRangedEntity.java @@ -2,5 +2,8 @@ package net.minecraft.server; @@ -43,7 +43,7 @@ index b4178ce1e86ad40b64a229e066f058a8e848324d..9b79ac77db880930fcb86744924bf0ba + void a(EntityLiving entityliving, float f); default void rangedAttack(EntityLiving entityliving, float f) { a(entityliving, f); } // Paper - OBFHELPER + + // - see EntitySkeletonAbstract melee goal -+ void q(boolean flag); default void setChargingAttack(boolean charging) { q(charging); }; // Paper ++ void setAggressive(boolean flag); default void setChargingAttack(boolean charging) { setAggressive(charging); }; // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java index 6e41dfd92344e3de71642879993cf25a5dd8b30a..390183fffd952e583a7d7df9ae618458fb48d278 100644 diff --git a/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch index 307b17b5b8..2d395c9953 100644 --- a/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch +++ b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch @@ -115,7 +115,7 @@ index c6fe9c1f7ef06c4524533130b493ca5e72bd1693..7b601955f3fd36f06c838b896b455a60 world.a(blockposition, false); } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 05b7cdb33b45a4f503cd7fe4130b54d59e7b6452..279807dc5045e765fe7496315494b2cb231d08f9 100644 +index 05b7cdb33b45a4f503cd7fe4130b54d59e7b6452..3cb8ce58c4675564fb239338d6c40ea511a9a97c 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -11,6 +11,7 @@ import org.bukkit.craftbukkit.block.CraftBlock; @@ -131,7 +131,7 @@ index 05b7cdb33b45a4f503cd7fe4130b54d59e7b6452..279807dc5045e765fe7496315494b2cb craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.b); } + // Paper start - TNTPrimeEvent -+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.x, blockposition.y, blockposition.z); ++ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); + if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.EXPLOSION, explosionSource.getSource().getBukkitEntity()).callEvent()) + continue; + // Paper end diff --git a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch new file mode 100644 index 0000000000..5e88bdb174 --- /dev/null +++ b/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch @@ -0,0 +1,176 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kashike +Date: Wed, 15 Aug 2018 01:26:09 -0700 +Subject: [PATCH] Allow disabling armour stand ticking + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..bc3df01aab3e79be9c2836820e0eacc69ea6c1f4 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -393,4 +393,10 @@ public class PaperWorldConfig { + private void armorStandEntityLookups() { + armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); + } ++ ++ public boolean armorStandTick = true; ++ private void armorStandTick() { ++ this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); ++ log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); ++ } + } +diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java +index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afdbd76b709 100644 +--- a/src/main/java/net/minecraft/server/EntityArmorStand.java ++++ b/src/main/java/net/minecraft/server/EntityArmorStand.java +@@ -44,6 +44,12 @@ public class EntityArmorStand extends EntityLiving { + public Vector3f leftLegPose; + public Vector3f rightLegPose; + public boolean canMove = true; // Paper ++ // Paper start - Allow ArmorStands not to tick ++ public boolean canTick = true; ++ public boolean canTickSetByAPI = false; ++ private boolean noTickPoseDirty = false; ++ private boolean noTickEquipmentDirty = false; ++ // Paper end + + public EntityArmorStand(EntityTypes entitytypes, World world) { + super(entitytypes, world); +@@ -55,6 +61,7 @@ public class EntityArmorStand extends EntityLiving { + this.rightArmPose = EntityArmorStand.bt; + this.leftLegPose = EntityArmorStand.bu; + this.rightLegPose = EntityArmorStand.bv; ++ if (world != null) this.canTick = world.paperConfig.armorStandTick; // Paper - armour stand ticking + this.G = 0.0F; + } + +@@ -135,6 +142,7 @@ public class EntityArmorStand extends EntityLiving { + this.armorItems.set(enumitemslot.b(), itemstack); + } + ++ this.noTickEquipmentDirty = true; // Paper - Allow equipment to be updated even when tick disabled + } + + @Override +@@ -215,6 +223,7 @@ public class EntityArmorStand extends EntityLiving { + } + + nbttagcompound.set("Pose", this.B()); ++ if (this.canTickSetByAPI) nbttagcompound.setBoolean("Paper.CanTickOverride", this.canTick); // Paper - persist no tick setting + } + + @Override +@@ -246,6 +255,12 @@ public class EntityArmorStand extends EntityLiving { + this.setBasePlate(nbttagcompound.getBoolean("NoBasePlate")); + this.setMarker(nbttagcompound.getBoolean("Marker")); + this.noclip = !this.A(); ++ // Paper start - persist no tick ++ if (nbttagcompound.hasKey("Paper.CanTickOverride")) { ++ this.canTick = nbttagcompound.getBoolean("Paper.CanTickOverride"); ++ this.canTickSetByAPI = true; ++ } ++ // Paper end + NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Pose"); + + this.g(nbttagcompound1); +@@ -600,7 +615,29 @@ public class EntityArmorStand extends EntityLiving { + + @Override + public void tick() { ++ // Paper start ++ if (!this.canTick) { ++ if (this.noTickPoseDirty) { ++ this.noTickPoseDirty = false; ++ this.updatePose(); ++ } ++ ++ if (this.noTickEquipmentDirty) { ++ this.noTickEquipmentDirty = false; ++ this.updateEntityEquipment(); ++ } ++ ++ return; ++ } ++ // Paper end ++ + super.tick(); ++ // Paper start - Split into separate method ++ updatePose(); ++ } ++ ++ public void updatePose() { ++ // Paper end + Vector3f vector3f = (Vector3f) this.datawatcher.get(EntityArmorStand.c); + + if (!this.headPose.equals(vector3f)) { +@@ -723,31 +760,37 @@ public class EntityArmorStand extends EntityLiving { + public void setHeadPose(Vector3f vector3f) { + this.headPose = vector3f; + this.datawatcher.set(EntityArmorStand.c, vector3f); ++ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking + } + + public void setBodyPose(Vector3f vector3f) { + this.bodyPose = vector3f; + this.datawatcher.set(EntityArmorStand.d, vector3f); ++ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking + } + + public void setLeftArmPose(Vector3f vector3f) { + this.leftArmPose = vector3f; + this.datawatcher.set(EntityArmorStand.e, vector3f); ++ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking + } + + public void setRightArmPose(Vector3f vector3f) { + this.rightArmPose = vector3f; + this.datawatcher.set(EntityArmorStand.f, vector3f); ++ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking + } + + public void setLeftLegPose(Vector3f vector3f) { + this.leftLegPose = vector3f; + this.datawatcher.set(EntityArmorStand.g, vector3f); ++ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking + } + + public void setRightLegPose(Vector3f vector3f) { + this.rightLegPose = vector3f; + this.datawatcher.set(EntityArmorStand.bo, vector3f); ++ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking + } + + public Vector3f r() { +diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java +index b80068b184b32256f1944b9863454726852cd502..f65a0b943843ea365384825c5a848305f303d8f9 100644 +--- a/src/main/java/net/minecraft/server/EntityLiving.java ++++ b/src/main/java/net/minecraft/server/EntityLiving.java +@@ -2503,6 +2503,7 @@ public abstract class EntityLiving extends Entity { + } + } + ++ public void updateEntityEquipment() { q(); }; // Paper + private void q() { + Map map = this.r(); + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +index d1d689e5d78c569313c4059c4652724605dc07d2..ac105270d5c7e2070f52782fc7dbdcd381db33a5 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +@@ -297,5 +297,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { + public boolean isSlotDisabled(org.bukkit.inventory.EquipmentSlot slot) { + return getHandle().isSlotDisabled(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot)); + } ++ ++ @Override ++ public boolean canTick() { ++ return this.getHandle().canTick; ++ } ++ ++ @Override ++ public void setCanTick(final boolean tick) { ++ this.getHandle().canTick = tick; ++ this.getHandle().canTickSetByAPI = true; ++ } + // Paper end + } diff --git a/Spigot-Server-Patches/0273-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch similarity index 100% rename from Spigot-Server-Patches/0273-Optimize-BlockPosition-helper-methods.patch rename to Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch diff --git a/Spigot-Server-Patches/0274-Restore-vanlla-default-mob-spawn-range.patch b/Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch similarity index 100% rename from Spigot-Server-Patches/0274-Restore-vanlla-default-mob-spawn-range.patch rename to Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch diff --git a/Spigot-Server-Patches/0275-Fix-MC-124320.patch b/Spigot-Server-Patches/0276-Fix-MC-124320.patch similarity index 100% rename from Spigot-Server-Patches/0275-Fix-MC-124320.patch rename to Spigot-Server-Patches/0276-Fix-MC-124320.patch diff --git a/Spigot-Server-Patches/0276-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch similarity index 100% rename from Spigot-Server-Patches/0276-Slime-Pathfinder-Events.patch rename to Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch diff --git a/Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch similarity index 90% rename from Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch rename to Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch index adaf8e0573..32045df15b 100644 --- a/Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Configurable speed for water flowing over lava diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..3c28dc61f97a65a0440c122ac5777cb9e24cdb3a 100644 +index bc3df01aab3e79be9c2836820e0eacc69ea6c1f4..487b0d5cd608e84a793eba5fdbd50a9f3d95c79b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -393,4 +393,10 @@ public class PaperWorldConfig { - private void armorStandEntityLookups() { - armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); +@@ -399,4 +399,10 @@ public class PaperWorldConfig { + this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); + log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); } + + public int waterOverLavaFlowSpeed; diff --git a/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch b/Spigot-Server-Patches/0279-Optimize-CraftBlockData-Creation.patch similarity index 100% rename from Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch rename to Spigot-Server-Patches/0279-Optimize-CraftBlockData-Creation.patch diff --git a/Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch b/Spigot-Server-Patches/0280-Optimize-RegistryMaterials.patch similarity index 74% rename from Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch rename to Spigot-Server-Patches/0280-Optimize-RegistryMaterials.patch index 4b245994fa..3a6e2f060e 100644 --- a/Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch +++ b/Spigot-Server-Patches/0280-Optimize-RegistryMaterials.patch @@ -8,7 +8,7 @@ Use larger initial sizes to increase bucket capacity on the BiMap BiMap.get was seen to be using a good bit of CPU time. diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java -index c60140a283df47edf23fe4f54a2c1d2fca7593f8..7189204ee57343b3381e8c83eb5a5281a0e0962f 100644 +index c60140a283df47edf23fe4f54a2c1d2fca7593f8..79817e3ffcac372e00b92c5b6bcb44653fcb73db 100644 --- a/src/main/java/net/minecraft/server/RegistryMaterials.java +++ b/src/main/java/net/minecraft/server/RegistryMaterials.java @@ -25,9 +25,9 @@ import org.apache.logging.log4j.Logger; @@ -42,3 +42,12 @@ index c60140a283df47edf23fe4f54a2c1d2fca7593f8..7189204ee57343b3381e8c83eb5a5281 builder.add(Pair.of(registrymaterials.c(t0).get(), t0)); } +@@ -191,7 +191,7 @@ public class RegistryMaterials extends IRegistryWritable { + + registrymaterials.bb.entrySet().stream().filter((entry) -> { + return registrymaterials.c((ResourceKey) entry.getKey()); +- }).forEach(com_google_common_collect_immutablemap_builder::put); ++ }).forEach(entry1 -> com_google_common_collect_immutablemap_builder.put((java.util.Map.Entry,? extends T>) entry1)); // Paper - compiler fix (expand method reference + add cast) + return com_google_common_collect_immutablemap_builder.build(); + }); + } diff --git a/Spigot-Server-Patches/0280-Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/0281-Add-PhantomPreSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0280-Add-PhantomPreSpawnEvent.patch rename to Spigot-Server-Patches/0281-Add-PhantomPreSpawnEvent.patch diff --git a/Spigot-Server-Patches/0281-Add-More-Creeper-API.patch b/Spigot-Server-Patches/0282-Add-More-Creeper-API.patch similarity index 100% rename from Spigot-Server-Patches/0281-Add-More-Creeper-API.patch rename to Spigot-Server-Patches/0282-Add-More-Creeper-API.patch diff --git a/Spigot-Server-Patches/0282-Inventory-removeItemAnySlot.patch b/Spigot-Server-Patches/0283-Inventory-removeItemAnySlot.patch similarity index 100% rename from Spigot-Server-Patches/0282-Inventory-removeItemAnySlot.patch rename to Spigot-Server-Patches/0283-Inventory-removeItemAnySlot.patch diff --git a/Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0284-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 100% rename from Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to Spigot-Server-Patches/0284-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch diff --git a/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 96% rename from Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch rename to Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch index eb583d4137..30b898d441 100644 --- a/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b80068b184b32256f1944b9863454726852cd502..12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38 100644 +index f65a0b943843ea365384825c5a848305f303d8f9..c3f3a392f2b15a806c706b1e518282225b45bbc3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3441,6 +3441,23 @@ public abstract class EntityLiving extends Entity { +@@ -3442,6 +3442,23 @@ public abstract class EntityLiving extends Entity { this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND); } // Paper start diff --git a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch similarity index 95% rename from Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch rename to Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch index 400cf1fe09..1d92e8adc8 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch @@ -27,7 +27,7 @@ index 1249a7ae8fa8d6ea33cbc276717f1e4553f73b85..af554396fdb25719c158a81ccab76e91 this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0ba5b2a444660f280b673dbd0db9ded38fa6a839..7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75 100644 +index 071a95a6ce704a8d3828cfb01ab7dc666a4622a0..8a6cda5df562baefb2bc245192e9ab539e1b6022 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1945,6 +1945,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0287-Improve-death-events.patch similarity index 98% rename from Spigot-Server-Patches/0286-Improve-death-events.patch rename to Spigot-Server-Patches/0287-Improve-death-events.patch index 44df65ab89..ce9249bb62 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0287-Improve-death-events.patch @@ -47,10 +47,10 @@ index 413dd5456d14842ab48143b6ee35e37dcb5ca3db..a704feb0c19b56964d017f9e0ea3f26b protected void k(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..74c58c3f82a94a3ec5e53c7f92e54cee80dc9e8a 100644 +index d5c09152acc93b25d626284071599afdbd76b709..51e9f4a6e09474a7489d2872a800308ee3f02e46 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -664,7 +664,8 @@ public class EntityArmorStand extends EntityLiving { +@@ -701,7 +701,8 @@ public class EntityArmorStand extends EntityLiving { @Override public void killEntity() { @@ -119,7 +119,7 @@ index c2a3bd8f25e91f79723074d93f6a646a8ce76d8c..4934e71225fe1242615660a379e797e2 public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38..c00031656bb6d2f986f555c68bb2fa9b9b0c0e6d 100644 +index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db0956a52f31 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -95,7 +95,7 @@ public abstract class EntityLiving extends Entity { @@ -357,7 +357,7 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75..51e7c6d82248b5c0938d37607c64a9c10cb4de4d 100644 +index 8a6cda5df562baefb2bc245192e9ab539e1b6022..0e1f5c75b6ab37ce3cfbeaecdc3dd64e8c05e18e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1739,7 +1739,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 100% rename from Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch rename to Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch diff --git a/Spigot-Server-Patches/0288-Mob-Pathfinding-API.patch b/Spigot-Server-Patches/0289-Mob-Pathfinding-API.patch similarity index 100% rename from Spigot-Server-Patches/0288-Mob-Pathfinding-API.patch rename to Spigot-Server-Patches/0289-Mob-Pathfinding-API.patch diff --git a/Spigot-Server-Patches/0289-Prevent-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/0290-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 100% rename from Spigot-Server-Patches/0289-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to Spigot-Server-Patches/0290-Prevent-chunk-loading-from-Fluid-Flowing.patch diff --git a/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0291-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 100% rename from Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to Spigot-Server-Patches/0291-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch diff --git a/Spigot-Server-Patches/0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0292-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to Spigot-Server-Patches/0292-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch diff --git a/Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/0293-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to Spigot-Server-Patches/0293-Prevent-mob-spawning-from-loading-generating-chunks.patch diff --git a/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0294-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to Spigot-Server-Patches/0294-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/Spigot-Server-Patches/0294-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/0295-Implement-furnace-cook-speed-multiplier-API.patch similarity index 100% rename from Spigot-Server-Patches/0294-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-Server-Patches/0295-Implement-furnace-cook-speed-multiplier-API.patch diff --git a/Spigot-Server-Patches/0295-PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0295-PreSpawnerSpawnEvent.patch rename to Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch diff --git a/Spigot-Server-Patches/0296-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 100% rename from Spigot-Server-Patches/0296-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch diff --git a/Spigot-Server-Patches/0297-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch similarity index 100% rename from Spigot-Server-Patches/0297-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch diff --git a/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch similarity index 100% rename from Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch diff --git a/Spigot-Server-Patches/0299-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from Spigot-Server-Patches/0299-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch diff --git a/Spigot-Server-Patches/0300-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch similarity index 100% rename from Spigot-Server-Patches/0300-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch diff --git a/Spigot-Server-Patches/0301-Add-sun-related-API.patch b/Spigot-Server-Patches/0302-Add-sun-related-API.patch similarity index 100% rename from Spigot-Server-Patches/0301-Add-sun-related-API.patch rename to Spigot-Server-Patches/0302-Add-sun-related-API.patch diff --git a/Spigot-Server-Patches/0302-Turtle-API.patch b/Spigot-Server-Patches/0303-Turtle-API.patch similarity index 100% rename from Spigot-Server-Patches/0302-Turtle-API.patch rename to Spigot-Server-Patches/0303-Turtle-API.patch diff --git a/Spigot-Server-Patches/0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 100% rename from Spigot-Server-Patches/0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch diff --git a/Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch similarity index 100% rename from Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch rename to Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch diff --git a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch similarity index 95% rename from Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch index 662903f8f2..033456ab17 100644 --- a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch @@ -130,10 +130,18 @@ index 0000000000000000000000000000000000000000..fdd8708f974700c7cde6e436c2f189d9 + } +} diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index e0f0a1e91a037f93b239e779aa8fd92be8a8c01f..57520943befea80b334ccf2385057b88131ddd8e 100644 +index e0f0a1e91a037f93b239e779aa8fd92be8a8c01f..7d65ce89622b00a121ce0353f697b07d9e99d0ce 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -41,6 +41,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -25,6 +25,7 @@ import org.bukkit.craftbukkit.util.Waitable; + import org.bukkit.event.player.AsyncPlayerPreLoginEvent; + import org.bukkit.event.player.PlayerPreLoginEvent; + // CraftBukkit end ++import io.netty.buffer.Unpooled; // Paper + + public class LoginListener implements PacketLoginInListener { + +@@ -41,6 +42,7 @@ public class LoginListener implements PacketLoginInListener { private SecretKey loginKey; private EntityPlayer l; public String hostname = ""; // CraftBukkit - add field @@ -141,14 +149,14 @@ index e0f0a1e91a037f93b239e779aa8fd92be8a8c01f..57520943befea80b334ccf2385057b88 public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) { this.g = LoginListener.EnumProtocolState.HELLO; -@@ -192,6 +193,14 @@ public class LoginListener implements PacketLoginInListener { +@@ -192,6 +194,14 @@ public class LoginListener implements PacketLoginInListener { this.g = LoginListener.EnumProtocolState.KEY; this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e)); } else { + // Paper start - Velocity support + if (com.destroystokyo.paper.PaperConfig.velocitySupport) { + this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt(); -+ PacketLoginOutCustomPayload packet = new PacketLoginOutCustomPayload(this.velocityLoginMessageId, com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, new PacketDataSerializer(io.netty.buffer.Unpooled.EMPTY_BUFFER)); ++ PacketLoginOutCustomPayload packet = new PacketLoginOutCustomPayload(this.velocityLoginMessageId, com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, new PacketDataSerializer(Unpooled.EMPTY_BUFFER)); + this.networkManager.sendPacket(packet); + return; + } @@ -156,7 +164,7 @@ index e0f0a1e91a037f93b239e779aa8fd92be8a8c01f..57520943befea80b334ccf2385057b88 // Spigot start // Paper start - Cache authenticator threads authenticatorPool.execute(new Runnable() { -@@ -284,6 +293,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -284,6 +294,12 @@ public class LoginListener implements PacketLoginInListener { public class LoginHandler { public void fireEvents() throws Exception { @@ -169,7 +177,7 @@ index e0f0a1e91a037f93b239e779aa8fd92be8a8c01f..57520943befea80b334ccf2385057b88 String playerName = i.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); java.util.UUID uniqueId = i.getId(); -@@ -331,6 +346,35 @@ public class LoginListener implements PacketLoginInListener { +@@ -331,6 +347,35 @@ public class LoginListener implements PacketLoginInListener { // Spigot end public void a(PacketLoginInCustomPayload packetloginincustompayload) { diff --git a/Spigot-Server-Patches/0306-Add-more-Witch-API.patch b/Spigot-Server-Patches/0307-Add-more-Witch-API.patch similarity index 100% rename from Spigot-Server-Patches/0306-Add-more-Witch-API.patch rename to Spigot-Server-Patches/0307-Add-more-Witch-API.patch diff --git a/Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 100% rename from Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch rename to Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch diff --git a/Spigot-Server-Patches/0308-Here-s-Johnny.patch b/Spigot-Server-Patches/0309-Here-s-Johnny.patch similarity index 100% rename from Spigot-Server-Patches/0308-Here-s-Johnny.patch rename to Spigot-Server-Patches/0309-Here-s-Johnny.patch diff --git a/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 96% rename from Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch index c826b39ad4..189701cc38 100644 --- a/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3c28dc61f97a65a0440c122ac5777cb9e24cdb3a..6f660388aa0d56577ad1c3f463c96d925c964821 100644 +index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b49a1a6f5017c9e183a7d08b16e89899c25a9717 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -399,4 +399,9 @@ public class PaperWorldConfig { +@@ -405,4 +405,9 @@ public class PaperWorldConfig { waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5); log("Water over lava flow speed: " + waterOverLavaFlowSpeed); } diff --git a/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch similarity index 100% rename from Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch diff --git a/Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0312-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0312-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0313-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 95% rename from Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to Spigot-Server-Patches/0313-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index d4913bb167..7866e45930 100644 --- a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0313-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -12,7 +12,7 @@ server threads Allow usage of a single thread executor by not using ForkJoin so single core CPU's. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a7be2875faa968d2e3939974f62c977ca03e9c5b..29f7e78fc21ccca1a080055fe616996d1ede666f 100644 +index f33624e65a56bd7cf4432eecdd6834fa3f32cda5..4d6b4c26029ea72d92934fff35211ef562c17a4b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -176,6 +176,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> { +@@ -12,6 +12,7 @@ import io.netty.channel.epoll.EpollEventLoopGroup; + import io.netty.channel.local.LocalChannel; + import io.netty.channel.local.LocalServerChannel; + import io.netty.channel.nio.NioEventLoopGroup; ++import io.netty.handler.codec.EncoderException; // Paper + import io.netty.handler.timeout.TimeoutException; + import io.netty.util.AttributeKey; + import io.netty.util.concurrent.Future; +@@ -97,6 +98,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { + // Paper start -+ if (throwable instanceof io.netty.handler.codec.EncoderException && throwable.getCause() instanceof PacketEncoder.PacketTooLargeException) { ++ if (throwable instanceof EncoderException && throwable.getCause() instanceof PacketEncoder.PacketTooLargeException) { + if (((PacketEncoder.PacketTooLargeException) throwable.getCause()).getPacket().packetTooLarge(this)) { + return; + } else { diff --git a/Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch similarity index 97% rename from Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch rename to Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch index a61ae61a23..740c3bde4d 100644 --- a/Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch @@ -91,10 +91,10 @@ index af554396fdb25719c158a81ccab76e91f5df2ff5..5ef91da9733fd9276e7bd819a11a0548 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c00031656bb6d2f986f555c68bb2fa9b9b0c0e6d..0b4e39d93f28ec5c7835bace2ea969a6e99ac2a3 100644 +index f5f043f0a5bafb7e432a541f9ef6db0956a52f31..ed001440151078e20a449ba073d71e873ff0ad9a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2891,11 +2891,13 @@ public abstract class EntityLiving extends Entity { +@@ -2892,11 +2892,13 @@ public abstract class EntityLiving extends Entity { return ((Byte) this.datawatcher.get(EntityLiving.an) & 4) != 0; } diff --git a/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch similarity index 98% rename from Spigot-Server-Patches/0323-Add-more-Zombie-API.patch rename to Spigot-Server-Patches/0324-Add-more-Zombie-API.patch index 80105a9fa1..56e5ab6168 100644 --- a/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index df98f2244a161c0e66e80f92c91760409734dc69..081baca9a101d188e4810d04f69811d52de7a107 100644 +index 7c9b437d950623a978ca3d45c8ca57b39a897179..dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -1423,6 +1423,8 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0324-Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/0325-Add-PlayerConnectionCloseEvent.patch similarity index 93% rename from Spigot-Server-Patches/0324-Add-PlayerConnectionCloseEvent.patch rename to Spigot-Server-Patches/0325-Add-PlayerConnectionCloseEvent.patch index 56d5df397c..c87e62b8ae 100644 --- a/Spigot-Server-Patches/0324-Add-PlayerConnectionCloseEvent.patch +++ b/Spigot-Server-Patches/0325-Add-PlayerConnectionCloseEvent.patch @@ -34,10 +34,10 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent is undefined. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 57520943befea80b334ccf2385057b88131ddd8e..8c5c57ecd98a286a4992a36effae95596b37fc8a 100644 +index 7d65ce89622b00a121ce0353f697b07d9e99d0ce..50163f7291474062bde81631c9220e8a9f5bb718 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -34,9 +34,9 @@ public class LoginListener implements PacketLoginInListener { +@@ -35,9 +35,9 @@ public class LoginListener implements PacketLoginInListener { private final byte[] e = new byte[4]; private final MinecraftServer server; public final NetworkManager networkManager; @@ -50,10 +50,10 @@ index 57520943befea80b334ccf2385057b88131ddd8e..8c5c57ecd98a286a4992a36effae9559 private SecretKey loginKey; private EntityPlayer l; diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index cd97b6a24010165d9435a5c62b6f896278674418..64d61eca4bbb4a9e18d78c8d2a55114134f56b6f 100644 +index e7b4c7f2d7b0eed4c145f6476f35b637d861551e..c84ee96cbed69cca311dd546e562a5322a03fd20 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -335,6 +335,26 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -336,6 +336,26 @@ public class NetworkManager extends SimpleChannelInboundHandler> { this.i().a(new ChatMessage("multiplayer.disconnect.generic")); } this.packetQueue.clear(); // Free up packet queue. diff --git a/Spigot-Server-Patches/0325-Prevent-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/0326-Prevent-Enderman-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0325-Prevent-Enderman-from-loading-chunks.patch rename to Spigot-Server-Patches/0326-Prevent-Enderman-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 97% rename from Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 6a9ea81f60..b93257f141 100644 --- a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -28,7 +28,7 @@ index 80a9faf3b02c51efc1f55beebce173309628b9ab..ccf1a64d33038a73360f68a814bd4602 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8c1d836538c678feca56076753e8781eadcd6d1d..a6606eff5ac89c54bdcbee0d3bf124d737d9735b 100644 +index e9e6e89145cc3d6b2b497132030c47515bfee5ab..a6f0b39717164d6b3ab15843b13ef52a24dde5d6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -97,6 +97,7 @@ public abstract class PlayerList { @@ -106,7 +106,7 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 51e7c6d82248b5c0938d37607c64a9c10cb4de4d..d61a255abede0ae19519d83117a877d1a04307bf 100644 +index 0e1f5c75b6ab37ce3cfbeaecdc3dd64e8c05e18e..13636096a166150e1e3c0d88a31badf202f702d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0327-Fix-PlayerEditBookEvent.patch b/Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch similarity index 100% rename from Spigot-Server-Patches/0327-Fix-PlayerEditBookEvent.patch rename to Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch diff --git a/Spigot-Server-Patches/0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 100% rename from Spigot-Server-Patches/0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch diff --git a/Spigot-Server-Patches/0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch b/Spigot-Server-Patches/0330-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch similarity index 100% rename from Spigot-Server-Patches/0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch rename to Spigot-Server-Patches/0330-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch diff --git a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch similarity index 93% rename from Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch rename to Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch index 785bf43239..6bde405c37 100644 --- a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,7 +12,7 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d61a255abede0ae19519d83117a877d1a04307bf..b9dcd216dd9e4eeee824b252446afdac3ca44d24 100644 +index 13636096a166150e1e3c0d88a31badf202f702d7..64c48af6dcdb6e8121d55a015fdeed63ef3f5ec3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1990,6 +1990,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0331-BlockDestroyEvent.patch b/Spigot-Server-Patches/0332-BlockDestroyEvent.patch similarity index 95% rename from Spigot-Server-Patches/0331-BlockDestroyEvent.patch rename to Spigot-Server-Patches/0332-BlockDestroyEvent.patch index 3c0fe7d7e7..d88b83399d 100644 --- a/Spigot-Server-Patches/0331-BlockDestroyEvent.patch +++ b/Spigot-Server-Patches/0332-BlockDestroyEvent.patch @@ -11,7 +11,7 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f0b3de717d5e425fb08c5afdfb3571fb6b8ab556..5e253b3609de30ac6a0a8f156c6f6d07a5bb99ce 100644 +index 7b7785f79ed176967d4c91c2d77c6f6ce73b30b8..d683ec109b23ae4c14efaa23bfe923cf2c453f87 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -533,8 +533,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/Spigot-Server-Patches/0333-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 100% rename from Spigot-Server-Patches/0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to Spigot-Server-Patches/0333-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch diff --git a/Spigot-Server-Patches/0333-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch similarity index 100% rename from Spigot-Server-Patches/0333-Fix-sign-edit-memory-leak.patch rename to Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch diff --git a/Spigot-Server-Patches/0334-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch similarity index 100% rename from Spigot-Server-Patches/0334-Limit-Client-Sign-length-more.patch rename to Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch diff --git a/Spigot-Server-Patches/0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/Spigot-Server-Patches/0336-Don-t-check-ConvertSigns-boolean-every-sign-save.patch similarity index 100% rename from Spigot-Server-Patches/0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch rename to Spigot-Server-Patches/0336-Don-t-check-ConvertSigns-boolean-every-sign-save.patch diff --git a/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 93% rename from Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index 398c7ed464..8e265a904a 100644 --- a/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -28,10 +28,10 @@ and then catch exceptions and close if they fire. Part of this commit was authored by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40e4902f29 100644 +index c84ee96cbed69cca311dd546e562a5322a03fd20..e27c96a1f53f6a2929b8daed9844320da6c57234 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -64,6 +64,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -65,6 +65,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { public int protocolVersion; public java.net.InetSocketAddress virtualHost; private static boolean enableExplicitFlush = Boolean.getBoolean("paper.explicit-flush"); @@ -42,7 +42,7 @@ index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40 // Paper end public NetworkManager(EnumProtocolDirection enumprotocoldirection) { -@@ -87,6 +91,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -88,6 +92,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } public void setProtocol(EnumProtocol enumprotocol) { @@ -50,7 +50,7 @@ index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40 this.channel.attr(NetworkManager.c).set(enumprotocol); this.channel.config().setAutoRead(true); NetworkManager.LOGGER.debug("Enabled auto read"); -@@ -157,19 +162,82 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -158,19 +163,82 @@ public class NetworkManager extends SimpleChannelInboundHandler> { Validate.notNull(packetlistener, "packetListener", new Object[0]); this.packetListener = packetlistener; } @@ -138,7 +138,7 @@ index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40 } private void dispatchPacket(Packet packet, @Nullable GenericFutureListener> genericFutureListener) { this.b(packet, genericFutureListener); } // Paper - OBFHELPER -@@ -183,51 +251,116 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -184,51 +252,116 @@ public class NetworkManager extends SimpleChannelInboundHandler> { this.channel.config().setAutoRead(false); } @@ -265,7 +265,7 @@ index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40 public void a() { this.o(); -@@ -256,9 +389,21 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -257,9 +390,21 @@ public class NetworkManager extends SimpleChannelInboundHandler> { return this.socketAddress; } @@ -287,7 +287,7 @@ index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40 // Spigot End if (this.channel.isOpen()) { this.channel.close(); // We can't wait as this may be called from an event loop. -@@ -326,7 +471,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -327,7 +472,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { public void handleDisconnection() { if (this.channel != null && !this.channel.isOpen()) { if (this.o) { @@ -296,7 +296,7 @@ index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40 } else { this.o = true; if (this.j() != null) { -@@ -334,7 +479,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { +@@ -335,7 +480,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } else if (this.i() != null) { this.i().a(new ChatMessage("multiplayer.disconnect.generic")); } @@ -338,7 +338,7 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..545dbe6ddcce1d172f465b4a7ab85654 return false; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a6606eff5ac89c54bdcbee0d3bf124d737d9735b..7b3ac5620d5556a55838f1d57b3cbc11955a5712 100644 +index a6f0b39717164d6b3ab15843b13ef52a24dde5d6..3a5641f9187fc21f367f7a3cd12cec8e4c80dd97 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -166,6 +166,7 @@ public abstract class PlayerList { @@ -358,10 +358,18 @@ index a6606eff5ac89c54bdcbee0d3bf124d737d9735b..7b3ac5620d5556a55838f1d57b3cbc11 entityplayer.getStatisticManager().c(); entityplayer.B().a(entityplayer); diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index 7abb122943b8a5ce0e888d16d1592a127bb9bb6f..8055a8aab682cfd81fc45f587d3578e25a2128f0 100644 +index 7abb122943b8a5ce0e888d16d1592a127bb9bb6f..0438126662e7c635d9a4f7b8c54fe7c50403ffe8 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java +++ b/src/main/java/net/minecraft/server/ServerConnection.java -@@ -40,10 +40,12 @@ public class ServerConnection { +@@ -15,6 +15,7 @@ import io.netty.channel.epoll.EpollServerSocketChannel; + import io.netty.channel.nio.NioEventLoopGroup; + import io.netty.channel.socket.ServerSocketChannel; + import io.netty.channel.socket.nio.NioServerSocketChannel; ++import io.netty.handler.flush.FlushConsolidationHandler; // Paper + import io.netty.handler.timeout.ReadTimeoutHandler; + import java.io.IOException; + import java.net.InetAddress; +@@ -40,10 +41,12 @@ public class ServerConnection { private final List connectedChannels = Collections.synchronizedList(Lists.newArrayList()); // Paper start - prevent blocking on adding a new network manager while the server is ticking private final java.util.Queue pending = new java.util.concurrent.ConcurrentLinkedQueue<>(); @@ -374,11 +382,11 @@ index 7abb122943b8a5ce0e888d16d1592a127bb9bb6f..8055a8aab682cfd81fc45f587d3578e2 } } // Paper end -@@ -78,6 +80,7 @@ public class ServerConnection { +@@ -78,6 +81,7 @@ public class ServerConnection { ; } -+ if (!disableFlushConsolidation) channel.pipeline().addFirst(new io.netty.handler.flush.FlushConsolidationHandler()); // Paper ++ if (!disableFlushConsolidation) channel.pipeline().addFirst(new FlushConsolidationHandler()); // Paper channel.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new LegacyPingHandler(ServerConnection.this)).addLast("splitter", new PacketSplitter()).addLast("decoder", new PacketDecoder(EnumProtocolDirection.SERVERBOUND)).addLast("prepender", new PacketPrepender()).addLast("encoder", new PacketEncoder(EnumProtocolDirection.CLIENTBOUND)); NetworkManager networkmanager = new NetworkManager(EnumProtocolDirection.SERVERBOUND); diff --git a/Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch b/Spigot-Server-Patches/0338-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch rename to Spigot-Server-Patches/0338-Handle-Oversized-Tile-Entities-in-chunks.patch diff --git a/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch similarity index 94% rename from Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch rename to Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index 135948b87f..9926dbd007 100644 --- a/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -11,7 +11,7 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7b3ac5620d5556a55838f1d57b3cbc11955a5712..ce2cf5f9432c9e20d351914646a78974d1f17b03 100644 +index 3a5641f9187fc21f367f7a3cd12cec8e4c80dd97..5c6ea9df899a0649abde8c54e6f844eaf53d27dd 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -931,9 +931,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0340-Set-Zombie-last-tick-at-start-of-drowning-process.patch similarity index 100% rename from Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch rename to Spigot-Server-Patches/0340-Set-Zombie-last-tick-at-start-of-drowning-process.patch diff --git a/Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch b/Spigot-Server-Patches/0341-Allow-Saving-of-Oversized-Chunks.patch similarity index 98% rename from Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch rename to Spigot-Server-Patches/0341-Allow-Saving-of-Oversized-Chunks.patch index 4eef91158a..b0975133d8 100644 --- a/Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch +++ b/Spigot-Server-Patches/0341-Allow-Saving-of-Oversized-Chunks.patch @@ -31,10 +31,10 @@ this fix, as the data will remain in the oversized file. Once the server returns to a jar with this fix, the data will be restored. diff --git a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java -index db66d4ac7dc1bede8b674cd9ad8f56dd989b6693..2322c0c8c5aacebb6317eab8ce4245554f6d9d55 100644 +index c9be8c7f40917056091f63d36311a10d6302acbb..f48b62af436de47484eb1cf496e97a29168586b0 100644 --- a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +++ b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java -@@ -69,6 +69,7 @@ public class NBTCompressedStreamTools { +@@ -70,6 +70,7 @@ public class NBTCompressedStreamTools { } @@ -42,7 +42,7 @@ index db66d4ac7dc1bede8b674cd9ad8f56dd989b6693..2322c0c8c5aacebb6317eab8ce424555 public static NBTTagCompound a(DataInputStream datainputstream) throws IOException { return a((DataInput) datainputstream, NBTReadLimiter.a); } -@@ -89,6 +90,7 @@ public class NBTCompressedStreamTools { +@@ -90,6 +91,7 @@ public class NBTCompressedStreamTools { } } diff --git a/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 88% rename from Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index a94c7e1b1e..44c6785dac 100644 --- a/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ce2cf5f9432c9e20d351914646a78974d1f17b03..e4651eb2a94080bfa431b0b775ae8019fc922538 100644 +index 5c6ea9df899a0649abde8c54e6f844eaf53d27dd..d4048812723bed08e5bb2aadc651a92570d4bb2a 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1049,6 +1049,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch similarity index 98% rename from Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch index f653f441e9..82e2cdcb00 100644 --- a/Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch @@ -66,10 +66,10 @@ index 505ba8e298a825ce69cc60c76cb040edeb0acdbd..e87fa15250a57c9b7ed4f4b530289b7b return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 0b4e39d93f28ec5c7835bace2ea969a6e99ac2a3..4c011f93c600d87951fe1dc8bf6b84fac7a532cb 100644 +index ed001440151078e20a449ba073d71e873ff0ad9a..f74e9ffda092ef4a2e30c316e682af154921b5df 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3494,6 +3494,37 @@ public abstract class EntityLiving extends Entity { +@@ -3495,6 +3495,37 @@ public abstract class EntityLiving extends Entity { return world.rayTrace(raytrace); } diff --git a/Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch b/Spigot-Server-Patches/0344-Use-proper-max-length-when-serialising-BungeeCord-te.patch similarity index 100% rename from Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch rename to Spigot-Server-Patches/0344-Use-proper-max-length-when-serialising-BungeeCord-te.patch diff --git a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch similarity index 98% rename from Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch rename to Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch index 6fec15969b..d14abfca1f 100644 --- a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch @@ -59,7 +59,7 @@ index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e4651eb2a94080bfa431b0b775ae8019fc922538..4b8dd6c1a9c796ded5ee0a63ccecebca9ac2b8ca 100644 +index d4048812723bed08e5bb2aadc651a92570d4bb2a..5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -263,7 +263,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch similarity index 100% rename from Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch rename to Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch diff --git a/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch similarity index 95% rename from Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch rename to Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch index 085f34bbd9..ef396b3065 100644 --- a/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4b8dd6c1a9c796ded5ee0a63ccecebca9ac2b8ca..8d067082ad52397d11822277438f00a43d7f3e09 100644 +index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b24b91718 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -665,9 +665,14 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0348-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to Spigot-Server-Patches/0348-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0349-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 100% rename from Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0349-Implement-getters-and-setters-for-EntityItem-owner-a.patch diff --git a/Spigot-Server-Patches/0349-Server-Tick-Events.patch b/Spigot-Server-Patches/0350-Server-Tick-Events.patch similarity index 93% rename from Spigot-Server-Patches/0349-Server-Tick-Events.patch rename to Spigot-Server-Patches/0350-Server-Tick-Events.patch index 8c10f39258..27fb4a9787 100644 --- a/Spigot-Server-Patches/0349-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0350-Server-Tick-Events.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b336cd541b8e3a9ebe3d89a487160d18a294dade..544bc9660b1104e7782bd9e06252d0bd9b2e700d 100644 +index 6b288bc8d4153e12b35f422f171e15a2ef7d0851..060d64c207dc353d6103080f6756ac9501a4ed04 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1120,6 +1120,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant(this.queue, (long)0.10e6); //0.1ms -+ this.workers[i].setName("Async chunk loader thread #" + i + " for world: " + world.getWorldData().getName()); ++ this.workers[i].setName("Async chunk loader thread #" + i + " for world: " + world.getWorld().getName()); + this.workers[i].setPriority(Thread.NORM_PRIORITY - 1); + this.workers[i].setUncaughtExceptionHandler((final Thread thread, final Throwable throwable) -> { + PaperFileIOThread.LOGGER.fatal("Thread '" + thread.getName() + "' threw an uncaught exception!", throwable); diff --git a/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 100% rename from Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch rename to Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch diff --git a/Spigot-Server-Patches/0379-Reduce-sync-loads.patch b/Spigot-Server-Patches/0380-Reduce-sync-loads.patch similarity index 100% rename from Spigot-Server-Patches/0379-Reduce-sync-loads.patch rename to Spigot-Server-Patches/0380-Reduce-sync-loads.patch diff --git a/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch b/Spigot-Server-Patches/0381-Implement-alternative-item-despawn-rate.patch similarity index 97% rename from Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch rename to Spigot-Server-Patches/0381-Implement-alternative-item-despawn-rate.patch index f12dba254c..47adb6a101 100644 --- a/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch +++ b/Spigot-Server-Patches/0381-Implement-alternative-item-despawn-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1bbea57d94dfe493741a4b32d5a7b71e6cb77305..f7a52481fa00a45fdebe6715dfde85c0f91fb8c0 100644 +index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f9410dd51 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,10 +1,15 @@ @@ -24,7 +24,7 @@ index 1bbea57d94dfe493741a4b32d5a7b71e6cb77305..f7a52481fa00a45fdebe6715dfde85c0 import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -508,4 +513,52 @@ public class PaperWorldConfig { +@@ -514,4 +519,52 @@ public class PaperWorldConfig { private void disableRelativeProjectileVelocity() { disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false); } diff --git a/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 96% rename from Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index ef4223df2d..0069c641dd 100644 --- a/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,7 +7,7 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 824e9df675edd664ceb11c8cdb39f035df237ce3..13edd764d79a5974ec58392e70d049172c1090f4 100644 +index 3a9e872922de10b597cc898ba76f3fbfd46e41bb..8b7dcb88e04fbad29538e8d2945020fca02b4143 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -513,11 +513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant bF; -@@ -3017,6 +3017,11 @@ public abstract class EntityLiving extends Entity { +@@ -3018,6 +3018,11 @@ public abstract class EntityLiving extends Entity { return ((Byte) this.datawatcher.get(EntityLiving.an) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND; } @@ -31,7 +31,7 @@ index 8dc2e28b2386a3b9512dfcc382f9deb534381392..ce586a89b3d812e5c6ff371c2abcb15d private void u() { if (this.isHandRaised()) { if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) { -@@ -3026,7 +3031,13 @@ public abstract class EntityLiving extends Entity { +@@ -3027,7 +3032,13 @@ public abstract class EntityLiving extends Entity { this.b(this.activeItem, 5); } @@ -46,7 +46,7 @@ index 8dc2e28b2386a3b9512dfcc382f9deb534381392..ce586a89b3d812e5c6ff371c2abcb15d this.s(); } } else { -@@ -3076,7 +3087,10 @@ public abstract class EntityLiving extends Entity { +@@ -3077,7 +3088,10 @@ public abstract class EntityLiving extends Entity { if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag this.activeItem = itemstack; @@ -58,7 +58,7 @@ index 8dc2e28b2386a3b9512dfcc382f9deb534381392..ce586a89b3d812e5c6ff371c2abcb15d if (!this.world.isClientSide) { this.c(1, true); this.c(2, enumhand == EnumHand.OFF_HAND); -@@ -3100,7 +3114,10 @@ public abstract class EntityLiving extends Entity { +@@ -3101,7 +3115,10 @@ public abstract class EntityLiving extends Entity { } } else if (!this.isHandRaised() && !this.activeItem.isEmpty()) { this.activeItem = ItemStack.b; @@ -70,7 +70,7 @@ index 8dc2e28b2386a3b9512dfcc382f9deb534381392..ce586a89b3d812e5c6ff371c2abcb15d } } -@@ -3222,7 +3239,10 @@ public abstract class EntityLiving extends Entity { +@@ -3223,7 +3240,10 @@ public abstract class EntityLiving extends Entity { } this.activeItem = ItemStack.b; diff --git a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch index cecf2bb12b..18d6ec6a24 100644 --- a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch @@ -99,7 +99,7 @@ index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c4084 if (this.isPassenger() && this.getVehicle() instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) this.getVehicle(); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ce586a89b3d812e5c6ff371c2abcb15df8de99d9..3662752ce3a300b1d35b5214a8cf602ab6399edb 100644 +index 415cec5f0435967dccd8df258d116b490a84276f..b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -97,7 +97,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch index f5237e2f23..04e1d99662 100644 --- a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch +++ b/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index f7e57fd1ce5881c056c104d5a6a9a74e34e3ffc3..fe3aab87de4e1eb60b19352499790fd9b571e169 100644 +index cdb72b225226083ca45ade798f54989422e5281c..0e9de6f12b56db5eb8759798a686ba6c68172323 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1735,6 +1735,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1716,6 +1716,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getEntityType().getChunkRange() * 16; diff --git a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch index c49febe093..36d290d292 100644 --- a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,7 +7,7 @@ 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 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b1977150d73f 100644 +index 707db4febac59a4d09d6420ea2add469cf54c2ec..a5325aef96117d569e95ff4a15650d6a1ab8ac49 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -447,6 +447,12 @@ public class ChunkProviderServer extends IChunkProvider { @@ -65,7 +65,7 @@ index 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b197 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 91f8927892a7c8f4456163d9de5e307f0e15cf54..276c805b60630952bcc1e467bb501926f214ed10 100644 +index 6d3b851f65858f6d768aa64c0bef71e18c45f0a2..ce55c4729024ce9e226d9dd14f7c3ea4bde7ca34 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -319,6 +319,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0418-Entity-Jump-API.patch b/Spigot-Server-Patches/0418-Entity-Jump-API.patch index 50977959fd..4384d36a0a 100644 --- a/Spigot-Server-Patches/0418-Entity-Jump-API.patch +++ b/Spigot-Server-Patches/0418-Entity-Jump-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3662752ce3a300b1d35b5214a8cf602ab6399edb..be102d9fed4596f2e53cca102c5a779ded2bf26f 100644 +index b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122..58e14a10f5424fefd7c2e1ce644e1712e49eea62 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2753,8 +2753,10 @@ public abstract class EntityLiving extends Entity { +@@ -2754,8 +2754,10 @@ public abstract class EntityLiving extends Entity { } else if (this.aN() && (!this.onGround || d7 > d8)) { this.c((Tag) TagsFluid.LAVA); } else if ((this.onGround || flag && d7 <= d8) && this.jumpTicks == 0) { diff --git a/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch index c59b4d906c..d4f46389d9 100644 --- a/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1757cf8e0883e8908b97e0a7beb1e6ecec10d8e6..4c12e1b65a0e7e1a7aa1bbaf433f4881cef314f2 100644 +index 3a63ed18c38030b7c0f1e681b9066283879592a1..c1f7d7f0db97e1667917a00febabb043cd66dfc8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -590,4 +590,9 @@ public class PaperWorldConfig { +@@ -591,4 +591,9 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } diff --git a/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch index 57daa6a3af..2fc4240668 100644 --- a/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch +++ b/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch @@ -398,7 +398,7 @@ index d4d5bc19e167a5271f8eb8d010f8a52b23b942df..859e31c63f94bdc7729c6d475990750b }); private final int[] b = new int[256]; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7ca38adcaa619a95c183bed13be566105442afd5..bd39bdcfeec7fb275a8ec80d467bad413e5356ce 100644 +index 620ee43ada7543e21f6c10afec424cff6017f2cd..3681bc9657b2ecbd27bb45153b4e608d077f36dc 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -106,7 +106,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0b6bb4b2a679c6a3589ce30becbf2af498804aff..ea287e9c21ee1b4cf692d8c7b3df530766f2d26a 100644 +index 2f96bf6af8ad4e13bfd9b8b6e00867eb89123a78..870b5352528384b0bb612cd5379683ee142fb99f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -723,6 +723,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch index 5e3107254e..1592f85347 100644 --- a/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch +++ b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 59f5ef6e14b738a408dc8462ba99605ec1ae82e9..52b5c47452a46cd6e61e1dd7c135620e36472c73 100644 +index f39a10a1fee5baf92d661b63c4487140eff244d2..418f8351f603acf1ceffa38d6010fc692b8f66e7 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -472,7 +472,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -466,7 +466,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void playerTick() { try { diff --git a/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch b/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch index d151045776..c449e4aa8a 100644 --- a/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,7 +7,7 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 8af8676888e4deff66094053d14203c2f5b20ab1..0bf9de73e800cbbe0553bf491cb1546bb1677b63 100644 +index 5ef91da9733fd9276e7bd819a11a0548e01b17f0..2db0cfd6c32c58beadc71d4be487776500c1b8a6 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -952,7 +952,7 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 6241b79ad7..c741550e38 100644 --- a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0437-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 ba9f75bd8f6fe1990d485548f4481bd1762d93af..e14e8bcf235339c1537a1e0a7702a364ee784c93 100644 +index db4ac5658844bcdb5a6a68ed74f862d055a5567d..76084e6dd282da8332bdafbf9a96bcc64827e705 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -741,7 +741,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end @@ -70,7 +70,7 @@ index ba9f75bd8f6fe1990d485548f4481bd1762d93af..e14e8bcf235339c1537a1e0a7702a364 if (optional.isPresent()) { diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index b2e8ddc9ff1bf5f519d971455d48a2faad3638f2..2f9c014454cf5fe771c6da84ad4af7e7790fdc7d 100644 +index 9615c4d324e42f7f91a7e60b6151c16d20e9c739..a68e4fc411ae84f12b1ca7443fa66f6325712af8 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -598,7 +598,7 @@ public final class MCUtil { @@ -83,7 +83,7 @@ index b2e8ddc9ff1bf5f519d971455d48a2faad3638f2..2f9c014454cf5fe771c6da84ad4af7e7 List allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71efd606b8f6 100644 +index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9fa3f92b21 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -56,8 +56,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -122,7 +122,7 @@ index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71ef private final Long2ObjectLinkedOpenHashMap pendingUnload; final LongSet loadedChunks; // Paper - private -> package public final WorldServer world; -@@ -130,7 +155,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -129,7 +154,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i, boolean flag) { super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag); @@ -131,7 +131,7 @@ index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71ef this.pendingUnload = new Long2ObjectLinkedOpenHashMap(); this.loadedChunks = new LongOpenHashSet(); this.unloadQueue = new LongOpenHashSet(); -@@ -222,9 +247,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -203,9 +228,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return (PlayerChunk) this.updatingChunks.get(i); } @@ -185,7 +185,7 @@ index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71ef } protected IntSupplier c(long i) { -@@ -412,8 +480,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -393,8 +461,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end protected void save(boolean flag) { @@ -196,7 +196,7 @@ index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71ef MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -441,7 +510,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -422,7 +491,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // this.i(); // Paper - nuke IOWorker PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); } else { @@ -205,7 +205,7 @@ index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71ef IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkSave().getNow(null); // CraftBukkit - decompile error if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { -@@ -612,7 +681,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -593,7 +662,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (!this.updatingChunksModified) { return false; } else { @@ -227,7 +227,7 @@ index c9be4ae99458863bf91687c3667d67bc6b37b0f0..9d4c5f32036118bf7c5081c55bea71ef this.updatingChunksModified = false; return true; } -@@ -1080,12 +1162,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1061,12 +1143,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } protected Iterable f() { diff --git a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch index a9aa089fe2..a88ccf7cda 100644 --- a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4281c125661c7a717e5a787510f593a16f6ad730..a11d356733901521ee0523629f0cffc1d94391bc 100644 +index 69b3faf28d019fca90734c4d0944ead8fd97ab87..21940f2034744ea417a43fcebc92b21298753d2d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -616,4 +616,9 @@ public class PaperWorldConfig { +@@ -617,4 +617,9 @@ public class PaperWorldConfig { private void zombieVillagerInfectionChance() { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } @@ -28,7 +28,7 @@ index 4281c125661c7a717e5a787510f593a16f6ad730..a11d356733901521ee0523629f0cffc1 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bd39bdcfeec7fb275a8ec80d467bad413e5356ce..16c9ed590a20279dd21512b29f8f5f64a4be1eff 100644 +index 3681bc9657b2ecbd27bb45153b4e608d077f36dc..962061aa4de1cad05acac4fe09ecedbb81c55d9b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -663,7 +663,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); if (optional.isPresent()) { -@@ -780,6 +782,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -765,6 +767,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 e14e8bcf235339c1537a1e0a7702a364ee784c93..d1f832db33f21f8ba910d2c0c163af78 } } } -@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -921,6 +924,41 @@ public class ChunkProviderServer extends IChunkProvider { super.executeTask(runnable); } diff --git a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch index eead6cc505..950ea7f1e5 100644 --- a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch @@ -10,10 +10,10 @@ larger than the keep loaded range. By skipping this, we avoid potential for a large spike on server start. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c3921296106a3bc 100644 +index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86fa144863d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -118,7 +118,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -113,7 +113,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.serverStatisticManager = minecraftserver.getPlayerList().getStatisticManager(this); this.advancementDataPlayer = minecraftserver.getPlayerList().f(this); this.G = 1.0F; @@ -22,7 +22,7 @@ index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c392129 this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -171,6 +171,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -165,6 +165,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end @@ -30,7 +30,7 @@ index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c392129 private void b(WorldServer worldserver) { BlockPosition blockposition = worldserver.getSpawn(); -@@ -346,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -340,7 +341,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { position = Vec3D.a(((WorldServer) world).getSpawn()); } this.world = world; @@ -40,7 +40,7 @@ index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c392129 this.playerInteractManager.a((WorldServer) world); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ea287e9c21ee1b4cf692d8c7b3df530766f2d26a..7a65b4f2cc6f3430bdad9df95b035ff29c8a2700 100644 +index 870b5352528384b0bb612cd5379683ee142fb99f..0524370c393dff4794abc0dfb28630c533a39ce1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -134,6 +134,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch index de3da19075..d989df9a55 100644 --- a/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch @@ -30,10 +30,10 @@ index 64150130fa0081786190eada4cd2d1312a51572d..00725529793d6c2fe26ecacf900355b4 try { return new ItemStack(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java -index 2322c0c8c5aacebb6317eab8ce4245554f6d9d55..3e6f878cdbbf5ebfa7fb390745ead135c1c4dee8 100644 +index f48b62af436de47484eb1cf496e97a29168586b0..c948e590eeff0aea53573532f8c507d638cc0bdf 100644 --- a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +++ b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java -@@ -14,6 +14,7 @@ import java.util.zip.GZIPOutputStream; +@@ -15,6 +15,7 @@ import io.netty.buffer.ByteBufInputStream; // Paper public class NBTCompressedStreamTools { @@ -41,7 +41,7 @@ index 2322c0c8c5aacebb6317eab8ce4245554f6d9d55..3e6f878cdbbf5ebfa7fb390745ead135 public static NBTTagCompound a(InputStream inputstream) throws IOException { DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new GZIPInputStream(inputstream))); Throwable throwable = null; -@@ -43,6 +44,7 @@ public class NBTCompressedStreamTools { +@@ -44,6 +45,7 @@ public class NBTCompressedStreamTools { return nbttagcompound; } diff --git a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch index db289a8e73..54af482e20 100644 --- a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch @@ -67,7 +67,7 @@ index 95e6a6de7ccfc4445d0ac19c5f874c0d533b1712..cc6e6f245ee5e73bd570cf42381bf55e throwable = throwable.getCause(); } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 4fa8d40d84884f17b4bbcc357a6bb902f8f668cd..22ee001a8d5a3c93303d036daa7ee12a6ec802bb 100644 +index 87753a94792af94454f76a2beb1ab9f1027f514f..4c561181a977fd0244325880bb6a8cd6a54dcacc 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -261,10 +261,10 @@ index f61a2f30e43120beecfa6056c0c14985411d9b7d..3e42cd6ec6ecfc04a6e2e9c96459e1a8 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 9d4c5f32036118bf7c5081c55bea71efd606b8f6..ba100e5c96d5279ab5f30c6e10f3cbd7b6b4443e 100644 +index ad4a07283a67ed4db770c59bb5884b9fa3f92b21..295c8e7eeb4fc634aaa2ca788e6540a647755f88 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -486,6 +486,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -467,6 +467,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { MutableBoolean mutableboolean = new MutableBoolean(); do { @@ -273,7 +273,7 @@ index 9d4c5f32036118bf7c5081c55bea71efd606b8f6..ba100e5c96d5279ab5f30c6e10f3cbd7 list.stream().map((playerchunk) -> { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7a65b4f2cc6f3430bdad9df95b035ff29c8a2700..a212c3bb7c80948cc329f21c3916f52ec02e06bf 100644 +index 0524370c393dff4794abc0dfb28630c533a39ce1..57f408b7b7a50f057f53c9cbea93adbeba97123c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -430,7 +430,7 @@ public abstract class PlayerList { @@ -286,7 +286,7 @@ index 7a65b4f2cc6f3430bdad9df95b035ff29c8a2700..a212c3bb7c80948cc329f21c3916f52e // Paper start - Remove from collideRule team if needed diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 3299ac0b0115cb1166c1ee449bd49292e553b7af..dc7a4eabf83d5b74ccde170764dcd1e99f958ee0 100644 +index 5579044782f155f587de1e2ea5115bde6053f722..e8075ad6b5395c7dce12741fe85dafd13f72cf41 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java @@ -119,6 +119,7 @@ public class SystemUtils { diff --git a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch index eb861c8fa2..8dfd1e0e0f 100644 --- a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a941b11b58 100644 +index b2a933ff60163527bd19449f8650a86fa144863d..0ecc967e149ef988f0451b2202cd01b85debf74c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -423,7 +423,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -417,7 +417,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { containerUpdateDelay = world.paperConfig.containerUpdateTickRate; } // Paper end @@ -17,7 +17,7 @@ index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a9 this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.activeContainer = this.defaultContainer; } -@@ -1278,7 +1278,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1272,7 +1272,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } else { // CraftBukkit start this.activeContainer = container; @@ -26,7 +26,7 @@ index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a9 // CraftBukkit end container.addSlotListener(this); return OptionalInt.of(this.containerCounter); -@@ -2073,7 +2073,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2066,7 +2066,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @Override diff --git a/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch index 4d6eff6ae4..b40bc1eb33 100644 --- a/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch @@ -7,10 +7,10 @@ Will not run if max entity craming is disabled and the max collisions per entity is less than or equal to 0 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index be102d9fed4596f2e53cca102c5a779ded2bf26f..9e877999abd8ba4b548dd6e06b04f5f0a99f92dd 100644 +index 58e14a10f5424fefd7c2e1ce644e1712e49eea62..22b033b85f34673928f47a65962d2bb6d34e6976 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2819,10 +2819,16 @@ public abstract class EntityLiving extends Entity { +@@ -2820,10 +2820,16 @@ public abstract class EntityLiving extends Entity { protected void doTick() {} protected void collideNearby() { diff --git a/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch index c98e680103..97b1e036f0 100644 --- a/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch +++ b/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch @@ -133,7 +133,7 @@ index 8f1e8728502d1dcae1fb538875f72460fc926d7c..c879e5d9acd400db5b7fdb770e5f8cc4 this.id = Entity.entityCount.incrementAndGet(); this.passengers = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index ac12d782539a5f502e8996eb39eb2ddbab46f756..43e3755f0fa75b5f72ec620f3f6647ef6bce38c5 100644 +index 96f898acdeae1917a4aaf99ec4a48bccf3904488..73e9859e675902d9fc5942547966b52426a496a2 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -844,6 +844,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { @@ -190,7 +190,7 @@ index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..24705eef5514bfb078bea6f87e5457e7 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0c00b0f6e2729467d21272142660319b50adcbf2..cd5d8f892516a8c3746ab315fa3f00eccd165deb 100644 +index d2e7eb96d09fae86c3702a4e1d7905eb5eb96cb8..61206ea84e924bb9a5cb7dde924f70d345c4dfa6 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1109,6 +1109,32 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch index 368e1ea8c2..394cbaf797 100644 --- a/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch +++ b/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch @@ -9,7 +9,7 @@ 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 d1f832db33f21f8ba910d2c0c163af78718d298f..91755cd7313d87bae85584dff140acbc6467428f 100644 +index 638a874a275677ede28953badb387b770c0600d6..e24f3711017aa5194ef7bf4e8d90f150cfb083ff 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -618,21 +618,29 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch index e95a98c467..c5ffe3b92a 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch @@ -98,7 +98,7 @@ index 2db0cfd6c32c58beadc71d4be487776500c1b8a6..3fa9e7b52b24629c96436fdd46d4e8c2 protected static final DataWatcherObject br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad512e774f 100644 +index 0ecc967e149ef988f0451b2202cd01b85debf74c..41ec990baa4a2ca149cd6edd16943a9ac27cde91 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -118,7 +118,7 @@ index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1682,6 +1683,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1676,6 +1677,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public String locale = null; // CraftBukkit - lowercase // Paper - default to null public void a(PacketPlayInSettings packetplayinsettings) { @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 021345ddef4d382021ab8cbba91f4b58851aeabd..6032a67b3f242580d8de5e77554e3ec317d3019d 100644 +index da57b00affb56766ebe25774323d49fed3374af0..0321b54f3defc983f1ebe47bf2888cbba39d102c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ diff --git a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch index f7dc818e08..24ea52cc26 100644 --- a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/Spigot-Server-Patches/0459-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 91755cd7313d87bae85584dff140acbc6467428f..0080a0cbe58d1a81c434ef97659428c8bf1ec290 100644 +index e24f3711017aa5194ef7bf4e8d90f150cfb083ff..7af4c3e2aaf0775640d51f88b3cf821ba38a950b 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -994,6 +994,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -979,6 +979,7 @@ public class ChunkProviderServer extends IChunkProvider { return super.executeNext() || execChunkTask; // Paper } } finally { @@ -37,10 +37,10 @@ index 91755cd7313d87bae85584dff140acbc6467428f..0080a0cbe58d1a81c434ef97659428c8 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ba100e5c96d5279ab5f30c6e10f3cbd7b6b4443e..a44702e805c24fba63ef17534032fc29fb4a2c3f 100644 +index 295c8e7eeb4fc634aaa2ca788e6540a647755f88..26230476a107e3f9c12b9ede628173e900d28f18 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -133,6 +133,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -132,6 +132,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; // CraftBukkit end @@ -49,7 +49,7 @@ index ba100e5c96d5279ab5f30c6e10f3cbd7b6b4443e..a44702e805c24fba63ef17534032fc29 // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); -@@ -995,7 +997,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -976,7 +978,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return Either.left(chunk); }); }, (runnable) -> { diff --git a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch index a1cd06dfcd..ee9cb483aa 100644 --- a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a212c3bb7c80948cc329f21c3916f52ec02e06bf..769f8c147c8104ab21a33abb1471f76f3729f2b2 100644 +index 57f408b7b7a50f057f53c9cbea93adbeba97123c..607408c48b0afc9944dc384cd2a441d4d8286d8c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -212,9 +212,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 0b03e2d326..1de373fe31 100644 --- a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ef35e07fd8b27a66710140c1422f88ad512e774f..56cf64709ae520287f6687fe7c2f55040cc769a1 100644 +index 41ec990baa4a2ca149cd6edd16943a9ac27cde91..6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -104,6 +104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -99,6 +99,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -40,10 +40,10 @@ index ef35e07fd8b27a66710140c1422f88ad512e774f..56cf64709ae520287f6687fe7c2f5504 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index a44702e805c24fba63ef17534032fc29fb4a2c3f..ee38ab87ba477e8bf5b739759371439b299f21f3 100644 +index 26230476a107e3f9c12b9ede628173e900d28f18..d0a5335b6315f3c8f8b431f53ad69a53caf9fd63 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1534,6 +1534,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1515,6 +1515,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { .printStackTrace(); return; } @@ -52,7 +52,7 @@ index a44702e805c24fba63ef17534032fc29fb4a2c3f..ee38ab87ba477e8bf5b739759371439b if (!(entity instanceof EntityComplexPart)) { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 769f8c147c8104ab21a33abb1471f76f3729f2b2..f8c12055330794039347336fe2ab9ab52f413323 100644 +index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233ad093822 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -201,6 +201,12 @@ public abstract class PlayerList { @@ -95,8 +95,8 @@ index 769f8c147c8104ab21a33abb1471f76f3729f2b2..f8c12055330794039347336fe2ab9ab5 + // Paper start + } -+ public void onPlayerJoinFinish(EntityPlayer entityplayer, WorldServer worldserver, String s1) { ++ public void onPlayerJoinFinish(EntityPlayer entityplayer, WorldServer worldserver1, String s1) { + // Paper end entityplayer.syncInventory(); // Paper start - Add to collideRule team if needed - final Scoreboard scoreboard = this.getServer().getWorldServer(DimensionManager.OVERWORLD).getScoreboard(); + final Scoreboard scoreboard = this.getServer().getWorldServer(World.OVERWORLD).getScoreboard(); diff --git a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch index d578d77d2b..07e65166dd 100644 --- a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch @@ -5,7 +5,7 @@ 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 0080a0cbe58d1a81c434ef97659428c8bf1ec290..eebd4c50a7324250d3ebe7060739a71af4243f72 100644 +index 7af4c3e2aaf0775640d51f88b3cf821ba38a950b..4c6b056cb1a2040251acc09ef2eb6bfd893a0300 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -604,7 +604,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -31,7 +31,7 @@ index c879e5d9acd400db5b7fdb770e5f8cc419e3bb23..228666eccfb924d2844c911e734eef4b public void c(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 56cf64709ae520287f6687fe7c2f55040cc769a1..0a5f784e851414f84e5a94b53f5616531f533109 100644 +index 6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8..f816af5c421c21e183435b3d3907883a0480f6fb 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -42,7 +42,7 @@ index 56cf64709ae520287f6687fe7c2f55040cc769a1..0a5f784e851414f84e5a94b53f561653 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; public final Deque removeQueue = new ArrayDeque<>(); // Paper -@@ -105,6 +106,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -100,6 +101,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper @@ -51,10 +51,10 @@ index 56cf64709ae520287f6687fe7c2f55040cc769a1..0a5f784e851414f84e5a94b53f561653 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 8c5c57ecd98a286a4992a36effae95596b37fc8a..28a3040ac9cf705d05ec459a29cd7147770389be 100644 +index 50163f7291474062bde81631c9220e8a9f5bb718..ebab6961b752ca0b1c1b28f85abb33c7b4d70e3c 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -65,7 +65,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -66,7 +66,7 @@ public class LoginListener implements PacketLoginInListener { } // Paper end } else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) { @@ -63,7 +63,7 @@ index 8c5c57ecd98a286a4992a36effae95596b37fc8a..28a3040ac9cf705d05ec459a29cd7147 if (entityplayer == null) { this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; -@@ -164,7 +164,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -165,7 +165,7 @@ public class LoginListener implements PacketLoginInListener { } this.networkManager.sendPacket(new PacketLoginOutSuccess(this.i)); @@ -110,7 +110,7 @@ index 651ecb50c2b06ca81cb9a2286d77fd41a17b5140..1099a46aa05f12572100994ea251f0d5 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f8c12055330794039347336fe2ab9ab52f413323..e0a95fde93d4a2339831cb8ea0918174e9914e34 100644 +index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d004171100027e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -18,6 +18,7 @@ import java.util.Map; diff --git a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch index 616e678815..884e0323b1 100644 --- a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 9e877999abd8ba4b548dd6e06b04f5f0a99f92dd..19e4d9ae15ca77fbcee3b6d6436ba69c80c3b79f 100644 +index 22b033b85f34673928f47a65962d2bb6d34e6976..14606a12c472e0e58f76023a53a4129536ac5cc4 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1825,7 +1825,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch index a30bd0be70..bd14db1cc9 100644 --- a/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch +++ b/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch @@ -14,10 +14,10 @@ Use an ArrayDeque to store this Queue We make sure to also implement a pattern that is recursion safe too. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ee38ab87ba477e8bf5b739759371439b299f21f3..b55c94788014b8085b45082162866f0210191622 100644 +index d0a5335b6315f3c8f8b431f53ad69a53caf9fd63..3355e2110d98c7ca514a1abf9461f1bb13ab7a30 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -112,24 +112,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -111,24 +111,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { diff --git a/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch b/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch index 48bc1c6eda..d8a2b711ee 100644 --- a/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch +++ b/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a11d356733901521ee0523629f0cffc1d94391bc..b5535da444b2a3aac783dd12baed88ee80f527e5 100644 +index 21940f2034744ea417a43fcebc92b21298753d2d..dfe4baf1973c38e4a443a2b1d6b1eb19140137e1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -621,4 +621,11 @@ public class PaperWorldConfig { +@@ -622,4 +622,11 @@ public class PaperWorldConfig { private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); } diff --git a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch index ea4c6ea2ed..1282804bfc 100644 --- a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -66,10 +66,10 @@ index 465abc3d4fe2386aa57565e4441fac7f55e26924..3ff93f1498896ec1c92eb8273fb1e656 public float a(Explosion explosion, IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, Fluid fluid, float f) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 74c58c3f82a94a3ec5e53c7f92e54cee80dc9e8a..f1893ad3a7bcb1996a0ae590ea33573fe03bcd17 100644 +index 51e9f4a6e09474a7489d2872a800308ee3f02e46..250bccee4a27801b41c50d59e93396c696ab6974 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -542,7 +542,7 @@ public class EntityArmorStand extends EntityLiving { +@@ -557,7 +557,7 @@ public class EntityArmorStand extends EntityLiving { for (i = 0; i < this.handItems.size(); ++i) { itemstack = (ItemStack) this.handItems.get(i); if (!itemstack.isEmpty()) { @@ -78,7 +78,7 @@ index 74c58c3f82a94a3ec5e53c7f92e54cee80dc9e8a..f1893ad3a7bcb1996a0ae590ea33573f this.handItems.set(i, ItemStack.b); } } -@@ -550,7 +550,7 @@ public class EntityArmorStand extends EntityLiving { +@@ -565,7 +565,7 @@ public class EntityArmorStand extends EntityLiving { for (i = 0; i < this.armorItems.size(); ++i) { itemstack = (ItemStack) this.armorItems.get(i); if (!itemstack.isEmpty()) { diff --git a/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch index 6320ed5d7e..bb66708621 100644 --- a/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch +++ b/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch @@ -69,7 +69,7 @@ index 4b6f45501106f49f118a93e5027734cdb7ff2727..fa0f247e51c20ea0e3cbaccbc8dbb2a1 public boolean hasPermission(int i) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1099a46aa05f12572100994ea251f0d55c66ef80..37defd033c3377b1166b8e97bbbf9ef1be25a565 100644 +index 1099a46aa05f12572100994ea251f0d55c66ef80..ea314328bbb4512054eb9243453cfce88984fd2b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -584,8 +584,12 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -82,7 +82,7 @@ index 1099a46aa05f12572100994ea251f0d55c66ef80..37defd033c3377b1166b8e97bbbf9ef1 + com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent suggestEvent = new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent(this.getPlayer(), suggestions, buffer); + suggestEvent.setCancelled(suggestions.isEmpty()); + if (!suggestEvent.callEvent()) return; -+ this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (Suggestions) suggestEvent.getSuggestions())); // CraftBukkit - decompile error // Paper ++ this.networkManager.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), (com.mojang.brigadier.suggestion.Suggestions) suggestEvent.getSuggestions())); // CraftBukkit - decompile error // Paper + // Paper end }); }); @@ -92,7 +92,7 @@ index 1099a46aa05f12572100994ea251f0d55c66ef80..37defd033c3377b1166b8e97bbbf9ef1 builder = builder.createOffset(builder.getInput().lastIndexOf(' ') + 1); completions.forEach(builder::suggest); - player.playerConnection.sendPacket(new PacketPlayOutTabComplete(packetplayintabcomplete.b(), builder.buildFuture().join())); -+ Suggestions suggestions = builder.buildFuture().join(); ++ com.mojang.brigadier.suggestion.Suggestions suggestions = builder.buildFuture().join(); + com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent suggestEvent = new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent(this.getPlayer(), suggestions, buffer); + suggestEvent.setCancelled(suggestions.isEmpty()); + if (!suggestEvent.callEvent()) return; diff --git a/Spigot-Server-Patches/0471-Villager-Restocks-API.patch b/Spigot-Server-Patches/0471-Villager-Restocks-API.patch index e53dcfff63..6353e61e2a 100644 --- a/Spigot-Server-Patches/0471-Villager-Restocks-API.patch +++ b/Spigot-Server-Patches/0471-Villager-Restocks-API.patch @@ -5,23 +5,18 @@ Subject: [PATCH] Villager Restocks API diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 8d3811ead268635c4b728f5c9b8dd6c9b8ec6124..86b75e31ea1ed9deecae9756c6f838c302dd8df6 100644 +index 8d3811ead268635c4b728f5c9b8dd6c9b8ec6124..9f28c7e4bd70abc280a8cf3cbf5ccc84246aff12 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -992,4 +992,13 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - - return optional.isPresent() ? i - (Long) optional.get() < 24000L : false; - } -+ -+ // Paper start -+ public int getRestocksToday(){ -+ return this.bL; -+ } -+ public void setRestocksToday(int restocksToday){ -+ this.bL = restocksToday; -+ } -+ // Paper end - } +@@ -44,7 +44,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + private long bH; + private int bI; + private long bJ; +- private int bK; ++ private int bK; public int getRestocksToday(){ return this.bK; } public void setRestocksToday(int restocksToday){ this.bK = restocksToday; } // Paper OBFHELPER + private long bL; + private boolean bM; + private static final ImmutableList> bN = ImmutableList.of(MemoryModuleType.HOME, MemoryModuleType.JOB_SITE, MemoryModuleType.POTENTIAL_JOB_SITE, MemoryModuleType.MEETING_POINT, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.VISIBLE_VILLAGER_BABIES, MemoryModuleType.NEAREST_PLAYERS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, MemoryModuleType.WALK_TARGET, new MemoryModuleType[]{MemoryModuleType.LOOK_TARGET, MemoryModuleType.INTERACTION_TARGET, MemoryModuleType.BREED_TARGET, MemoryModuleType.PATH, MemoryModuleType.INTERACTABLE_DOORS, MemoryModuleType.OPENED_DOORS, MemoryModuleType.NEAREST_BED, MemoryModuleType.HURT_BY, MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.NEAREST_HOSTILE, MemoryModuleType.SECONDARY_JOB_SITE, MemoryModuleType.HIDING_PLACE, MemoryModuleType.HEARD_BELL_TIME, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.LAST_SLEPT, MemoryModuleType.LAST_WOKEN, MemoryModuleType.LAST_WORKED_AT_POI, MemoryModuleType.GOLEM_LAST_SEEN_TIME}); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java index fe726e7884c9f091d73c8f5d2cb58a87a16649f8..a8384081c03884c86578dca677914d77441c1863 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java diff --git a/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch index da017c88ed..771e5cd275 100644 --- a/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 37defd033c3377b1166b8e97bbbf9ef1be25a565..64a948510265b881b2aefdfbdb54ec0d413d2766 100644 +index ea314328bbb4512054eb9243453cfce88984fd2b..2ab3f2ffb7266bc6a566620b4f3db31a98b9208e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -697,7 +697,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch index 8fb536336d..deb6decefc 100644 --- a/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch +++ b/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch @@ -13,7 +13,7 @@ it is triggering a massive movement velocity. This will ensure that the servers position is synchronized anytime player is teleported. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 64a948510265b881b2aefdfbdb54ec0d413d2766..383a9bdec4d476bbde5a7c63a9915d2ed4c136a4 100644 +index 2ab3f2ffb7266bc6a566620b4f3db31a98b9208e..553c7313e2b699be88ea01460fd299421c42b176 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -501,6 +501,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch index b64bdc934c..66878ad0d6 100644 --- a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch @@ -24,10 +24,10 @@ index f578acae6fbe1ad7a0c05b96ba489482687ec1df..2b24688310f14b6a9e3fe04fe8b41cd1 diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java new file mode 100644 -index 0000000000000000000000000000000000000000..9ee1a8d5f494680ac9d4c45d7b1255e28a77c566 +index 0000000000000000000000000000000000000000..4ec476669d98ab2f03859e763cfe55904563238f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java -@@ -0,0 +1,345 @@ +@@ -0,0 +1,349 @@ +package com.destroystokyo.paper.entity.ai; + +import com.google.common.collect.BiMap; @@ -251,6 +251,10 @@ index 0000000000000000000000000000000000000000..9ee1a8d5f494680ac9d4c45d7b1255e2 + bukkitMap.put(EntityZombie.class, Zombie.class); + bukkitMap.put(EntityZombieHusk.class, Husk.class); + bukkitMap.put(EntityZombieVillager.class, ZombieVillager.class); ++ bukkitMap.put(EntityHoglin.class, Hoglin.class); ++ bukkitMap.put(EntityPiglin.class, Piglin.class); ++ bukkitMap.put(EntityStrider.class, Strider.class); ++ bukkitMap.put(EntityZoglin.class, Zoglin.class); + } + + public static String getUsableName(Class clazz) { @@ -851,16 +855,12 @@ index 715186249545ab2af5284ef71ab59e5ebccad8e1..7c3a66e5e6c4dece0807cc349a69d79f } diff --git a/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java b/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java new file mode 100644 -index 0000000000000000000000000000000000000000..bca3fa43562d21fc16f0c987b8f3a4abe56278a3 +index 0000000000000000000000000000000000000000..232c382b586b0812c9f7161565c0d382177adf7d --- /dev/null +++ b/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java -@@ -0,0 +1,96 @@ +@@ -0,0 +1,103 @@ +package com.destroystokyo.paper.entity.ai; + -+import com.destroystokyo.paper.entity.ai.GoalKey; -+import com.destroystokyo.paper.entity.ai.MobGoalHelper; -+import com.destroystokyo.paper.entity.ai.VanillaGoal; -+ +import net.minecraft.server.EntityInsentient; +import net.minecraft.server.PathfinderGoal; + @@ -882,11 +882,17 @@ index 0000000000000000000000000000000000000000..bca3fa43562d21fc16f0c987b8f3a4ab + + @Test + public void testKeys() { ++ List> deprecated = new ArrayList<>(); + List> keys = new ArrayList<>(); + for (Field field : VanillaGoal.class.getFields()) { + if (field.getType().equals(GoalKey.class)) { + try { -+ keys.add((GoalKey) field.get(null)); ++ GoalKey goalKey = (GoalKey) field.get(null); ++ if (field.getAnnotation(Deprecated.class) != null) { ++ deprecated.add(goalKey); ++ } else { ++ keys.add(goalKey); ++ } + } catch (IllegalAccessException e) { + System.out.println("Skipping " + field.getName() + ": " + e.getMessage()); + } @@ -925,6 +931,11 @@ index 0000000000000000000000000000000000000000..bca3fa43562d21fc16f0c987b8f3a4ab + shouldFail = true; + } + ++ if (deprecated.size() != 0) { ++ System.out.println("Deprecated (might want to remove them at some point): "); ++ deprecated.forEach(System.out::println); ++ } ++ + if (shouldFail) Assert.fail("See above"); + } + @@ -939,12 +950,12 @@ index 0000000000000000000000000000000000000000..bca3fa43562d21fc16f0c987b8f3a4ab + classes = scanResult.getSubclasses("net.minecraft.server.EntityInsentient").loadClasses(); + } + -+ boolean shouldFail =false; ++ boolean shouldFail = false; + for (Class nmsClass : classes) { + Class bukkitClass = MobGoalHelper.toBukkitClass((Class) nmsClass); -+ if(bukkitClass == null) { ++ if (bukkitClass == null) { + shouldFail = true; -+ System.out.println("Missing bukkitMap.put(" + nmsClass.getSimpleName() + ".class, "+nmsClass.getSimpleName().replace("Entity","")+".class);"); ++ System.out.println("Missing bukkitMap.put(" + nmsClass.getSimpleName() + ".class, " + nmsClass.getSimpleName().replace("Entity", "") + ".class);"); + } + } + diff --git a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch index 50eee86471..942ac7f30a 100644 --- a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch @@ -56,10 +56,10 @@ index 3e42cd6ec6ecfc04a6e2e9c96459e1a88e504e39..084f36bb29a3fa28dbac1fa6f50849e5 return i; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831451f34ee 100644 +index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd2367073c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -145,21 +145,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -144,21 +144,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); @@ -116,10 +116,10 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 } // Paper end -@@ -196,6 +230,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -194,6 +228,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + this.l = supplier; this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); - this.playerMobDistanceMap = this.world.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + // Paper start - use distance map to optimise entity tracker + this.playerEntityTrackerTrackMaps = new com.destroystokyo.paper.util.misc.PlayerAreaMap[TRACKING_RANGE_TYPES.length]; + this.entityTrackerTrackRanges = new int[TRACKING_RANGE_TYPES.length]; @@ -161,8 +161,8 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 + // Paper end - use distance map to optimise entity tracker } - public void updatePlayerMobTypeMap(Entity entity) { -@@ -1431,17 +1504,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { +@@ -1412,17 +1485,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public void movePlayer(EntityPlayer entityplayer) { @@ -181,7 +181,7 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 int i = MathHelper.floor(entityplayer.locX()) >> 4; int j = MathHelper.floor(entityplayer.locZ()) >> 4; -@@ -1557,7 +1620,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1538,7 +1601,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); @@ -190,7 +190,7 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 if (entity instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) entity; -@@ -1600,7 +1663,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1581,7 +1644,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = null; // Paper - We're no longer tracked } @@ -228,7 +228,7 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 List list = Lists.newArrayList(); List list1 = this.world.getPlayers(); -@@ -1668,23 +1761,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1649,23 +1742,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PacketDebug.a(this.world, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -272,7 +272,7 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 Iterator iterator; Entity entity1; -@@ -1722,7 +1823,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1703,7 +1804,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public class EntityTracker { @@ -281,7 +281,7 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 private final Entity tracker; private final int trackingDistance; private SectionPosition e; -@@ -1739,6 +1840,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1720,6 +1821,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.e = SectionPosition.a(entity); } @@ -324,7 +324,7 @@ index b55c94788014b8085b45082162866f0210191622..38d7cfdbf96679fb2a56c3b36f374831 public boolean equals(Object object) { return object instanceof PlayerChunkMap.EntityTracker ? ((PlayerChunkMap.EntityTracker) object).tracker.getId() == this.tracker.getId() : false; } -@@ -1839,7 +1976,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1820,7 +1957,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int j = entity.getEntityType().getChunkRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper diff --git a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch index 39ef2d3f6b..ebbeb73be7 100644 --- a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -77,7 +77,7 @@ index 32d3887e2542c4ebba4a7498167fbe4b497a71ce..7e57a53ec614a2f7d2672edff9d7c0e0 public String c() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e84316c49 100644 +index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc70394eb7323f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -728,6 +728,36 @@ public class ChunkProviderServer extends IChunkProvider { @@ -117,7 +117,7 @@ index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e 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 -@@ -757,15 +787,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -742,15 +772,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper //Collections.shuffle(list); // Paper @@ -134,7 +134,7 @@ index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e 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(); -@@ -781,9 +803,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -766,9 +788,9 @@ public class ChunkProviderServer extends IChunkProvider { Chunk chunk = (Chunk) optional1.get(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); @@ -147,10 +147,10 @@ index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0a5f784e851414f84e5a94b53f5616531f533109..fb2b64628b974758cace770ce6debe5e88318ae8 100644 +index f816af5c421c21e183435b3d3907883a0480f6fb..8177781a9cbba57097c5873fd917ff5d9954ccf8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -113,6 +113,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -108,6 +108,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper @@ -191,10 +191,10 @@ index 9cb2ff09da0b8832e58eed4d70741853a25c9011..7f660d3c528f5fb4150e4ee8b2991343 // Paper start diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d933bbc4170 100644 +index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f382d0bc9 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -159,6 +159,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -158,6 +158,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); } // Paper end - use distance map to optimise tracker @@ -212,7 +212,7 @@ index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d93 void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -172,6 +183,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -171,6 +182,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.add(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -222,7 +222,7 @@ index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d93 } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -180,6 +194,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -179,6 +193,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[i].remove(player); } // Paper end - use distance map to optimise tracker @@ -233,7 +233,7 @@ index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d93 } void updateMaps(EntityPlayer player) { -@@ -194,6 +212,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -193,6 +211,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -243,7 +243,7 @@ index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d93 } // Paper end -@@ -225,7 +246,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -224,7 +245,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.mailboxWorldGen = this.p.a(threadedmailbox, false); this.mailboxMain = this.p.a(mailbox, false); this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getDimensionManager().hasSkyLight(), threadedmailbox1, this.p.a(threadedmailbox1, false)); @@ -252,7 +252,7 @@ index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d93 this.l = supplier; this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); -@@ -269,6 +290,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -267,8 +288,41 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[ordinal] = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); } // Paper end - use distance map to optimise entity tracker @@ -290,16 +290,11 @@ index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d93 + // Paper end - optimise PlayerChunkMap#isOutsideRange } - public void updatePlayerMobTypeMap(Entity entity) { -@@ -288,6 +341,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - return entityPlayer.mobCounts[enumCreatureType.ordinal()]; - } - + private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { double d0 = (double) (chunkcoordintpair.x * 16 + 8); double d1 = (double) (chunkcoordintpair.z * 16 + 8); -@@ -466,6 +520,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -447,6 +501,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } else { if (playerchunk != null) { playerchunk.a(j); @@ -307,7 +302,7 @@ index 38d7cfdbf96679fb2a56c3b36f374831451f34ee..b55e8f94ef45b526c55bc5ba2a991d93 } if (playerchunk != null) { -@@ -1433,30 +1488,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1414,30 +1469,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return isOutsideOfRange(chunkcoordintpair, false); } diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index 3bb1b60f35..6ad897a5c6 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -9,7 +9,7 @@ Per-Player is absent due to difficulty of maintaining the diff required to make it happen. diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java -index d4ebcf8f66197299256bd6b65710a1488c90ea41..a3b41ce5fc70948d4804659a472cb622bb9bbc07 100644 +index c9164dfdb27ddf3709129c8aec54903a1df121ff..e33e889c291d37a821a4fbd40d9aac7bb079de0d 100644 --- a/src/main/java/co/aikar/timings/TimingsExport.java +++ b/src/main/java/co/aikar/timings/TimingsExport.java @@ -153,7 +153,8 @@ public class TimingsExport extends Thread { @@ -23,10 +23,10 @@ index d4ebcf8f66197299256bd6b65710a1488c90ea41..a3b41ce5fc70948d4804659a472cb622 })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b5535da444b2a3aac783dd12baed88ee80f527e5..65f9ec884c7e36b7d1340dcfdf186ee0669178e4 100644 +index dfe4baf1973c38e4a443a2b1d6b1eb19140137e1..6b1b4780a8553dfd7da32c3e9e76b142122f6a74 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -628,4 +628,9 @@ public class PaperWorldConfig { +@@ -629,4 +629,9 @@ public class PaperWorldConfig { phantomIgnoreCreative = getBoolean("phantoms-do-not-spawn-on-creative-players", phantomIgnoreCreative); phantomOnlyAttackInsomniacs = getBoolean("phantoms-only-attack-insomniacs", phantomOnlyAttackInsomniacs); } @@ -115,10 +115,10 @@ index 7e57a53ec614a2f7d2672edff9d7c0e0dca42377..c072f61e8c88eac8335acd660d8ff0e2 if (flag1) { ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index fb2b64628b974758cace770ce6debe5e88318ae8..0e3ceb60e503c74fc65b1d08371645ffbb26ef5c 100644 +index 8177781a9cbba57097c5873fd917ff5d9954ccf8..9f2eb5ea511f7b854ff06e321015a464771c86bc 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -115,6 +115,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -110,6 +110,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks @@ -221,7 +221,7 @@ index 7f660d3c528f5fb4150e4ee8b29913436f125b06..40347212ad1bcf857d5b8ddb0ee6a698 public CompletableFuture> a(ChunkStatus chunkstatus, PlayerChunkMap playerchunkmap) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e7b0d4947 100644 +index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d275cc71da3 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -95,7 +95,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -233,7 +233,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -170,6 +170,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -169,6 +169,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -256,7 +256,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -186,6 +202,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -185,6 +201,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -276,7 +276,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -198,6 +227,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -197,6 +226,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerMobSpawnMap.remove(player); this.playerChunkTickRangeMap.remove(player); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -288,7 +288,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e } void updateMaps(EntityPlayer player) { -@@ -215,6 +249,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -214,6 +248,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -308,7 +308,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e } // Paper end -@@ -322,6 +369,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -320,6 +367,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } }); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -353,8 +353,8 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e + // Paper end - no-tick view distance } - public void updatePlayerMobTypeMap(Entity entity) { -@@ -1139,15 +1225,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER +@@ -1120,15 +1206,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { completablefuture1.thenAcceptAsync((either) -> { either.mapLeft((chunk) -> { this.u.getAndIncrement(); @@ -372,11 +372,13 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e }); return completablefuture1; } -@@ -1243,31 +1325,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1223,32 +1305,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + } } - protected void setViewDistance(int i) { +- protected void setViewDistance(int i) { - int j = MathHelper.clamp(i + 1, 3, 33); ++ public void setViewDistance(int i) { // Paper - public + int j = MathHelper.clamp(i + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32 if (j != this.viewDistance) { @@ -424,7 +426,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e protected void sendChunk(EntityPlayer entityplayer, ChunkCoordIntPair chunkcoordintpair, Packet[] apacket, boolean flag, boolean flag1) { if (entityplayer.world == this.world) { -@@ -1275,7 +1363,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1256,7 +1344,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunk playerchunk = this.getVisibleChunk(chunkcoordintpair.pair()); if (playerchunk != null) { @@ -433,7 +435,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e if (chunk != null) { this.a(entityplayer, apacket, chunk); -@@ -1536,6 +1624,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1517,6 +1605,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end - optimise isOutsideOfRange @@ -441,7 +443,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e private boolean b(EntityPlayer entityplayer) { return entityplayer.isSpectator() && !this.world.getGameRules().getBoolean(GameRules.SPECTATORS_GENERATE_CHUNKS); } -@@ -1563,13 +1652,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1544,13 +1633,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.removePlayerFromDistanceMaps(entityplayer); // Paper - distance maps } @@ -456,7 +458,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e } -@@ -1577,7 +1660,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1558,7 +1641,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { SectionPosition sectionposition = SectionPosition.a((Entity) entityplayer); entityplayer.a(sectionposition); @@ -465,7 +467,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e return sectionposition; } -@@ -1622,6 +1705,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1603,6 +1686,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int k1; int l1; @@ -473,7 +475,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e if (Math.abs(i1 - i) <= this.viewDistance * 2 && Math.abs(j1 - j) <= this.viewDistance * 2) { k1 = Math.min(i, i1) - this.viewDistance; l1 = Math.min(j, j1) - this.viewDistance; -@@ -1659,7 +1743,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1640,7 +1724,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.sendChunk(entityplayer, chunkcoordintpair1, new Packet[2], false, true); } } @@ -482,7 +484,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e this.updateMaps(entityplayer); // Paper - distance maps -@@ -1667,11 +1751,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1648,11 +1732,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public Stream a(ChunkCoordIntPair chunkcoordintpair, boolean flag) { @@ -533,7 +535,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e } protected void addEntity(Entity entity) { -@@ -1829,6 +1948,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1810,6 +1929,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -541,7 +543,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e private void a(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { if (apacket[0] == null) { apacket[0] = new PacketPlayOutMapChunk(chunk, 65535, true); -@@ -2014,7 +2134,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1995,7 +2115,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ); PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair()); @@ -551,7 +553,7 @@ index b55e8f94ef45b526c55bc5ba2a991d933bbc4170..6cde6d684f6a3ced1eb2aa554559672e } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e0a95fde93d4a2339831cb8ea0918174e9914e34..bdee3540b675f8036c5c6a59d6f53057bbdd6a85 100644 +index c263ad3f9f127d798a6c0cdcb3d004171100027e..1514d24ae0da9fd9622333ff8702a0da140bd691 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -176,7 +176,7 @@ public abstract class PlayerList { @@ -582,7 +584,7 @@ index e0a95fde93d4a2339831cb8ea0918174e9914e34..bdee3540b675f8036c5c6a59d6f53057 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cd5d8f892516a8c3746ab315fa3f00eccd165deb..7fcf3d8b7decfa2e1df2f28fbecef9de8887c724 100644 +index 61206ea84e924bb9a5cb7dde924f70d345c4dfa6..6b74ba5241c9eaf7d9531dbcae4bbc4796979fa2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -506,8 +506,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -646,7 +648,7 @@ index e044534d3cb47cf1228c5e5fa8920df8264fd0b5..745633509d3f948d46529d5439ec14cd 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 97af8f8e3c48694c390036bb1455e6d22fcd1c49..901aac23ae2878f4b05e986e8a363b95371ca6c3 100644 +index 5dcc1ba547db7cc53a08426a7ad119ae88690136..f78e44e05f7a97a7da190aa4b5aa6fb8340728ea 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -201,7 +201,7 @@ public class ActivationRange diff --git a/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch b/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch index ada8c81cd8..1709aec599 100644 --- a/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch +++ b/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch @@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..0f10c333d88f2e1c56a6c7f22d421084 + } +} diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 86b75e31ea1ed9deecae9756c6f838c302dd8df6..91c19ee2926957c530b3ebc7680eeea451464e24 100644 +index 9f28c7e4bd70abc280a8cf3cbf5ccc84246aff12..bf019043a9338aca8d91da809f1d5520531386e7 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -959,6 +959,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation diff --git a/Spigot-Server-Patches/0483-Fix-Light-Command.patch b/Spigot-Server-Patches/0483-Fix-Light-Command.patch index 83aced7713..aa628605d8 100644 --- a/Spigot-Server-Patches/0483-Fix-Light-Command.patch +++ b/Spigot-Server-Patches/0483-Fix-Light-Command.patch @@ -136,7 +136,7 @@ index 40347212ad1bcf857d5b8ddb0ee6a698e2568201..e5751adde516544722b95016f64b2a46 // Paper start - per player view distance // there can be potential desync with player's last mapped section and the view distance map, so use the diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 6cde6d684f6a3ced1eb2aa554559672e7b0d4947..31f122aeef8df2eae5e8aab12f0b3316a67daa3b 100644 +index ecc5992beebbc7088b3c398ec7c2e85e9fdf2ed9..044f7a101a8154759f7469b8a864ea09a7919853 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -96,6 +96,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -152,7 +152,7 @@ index 6cde6d684f6a3ced1eb2aa554559672e7b0d4947..31f122aeef8df2eae5e8aab12f0b3316 public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -287,11 +293,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -286,11 +292,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { Mailbox mailbox = Mailbox.a("main", iasynctaskhandler::a); this.worldLoadListener = worldloadlistener; diff --git a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch index 5da518c142..76948ca425 100644 --- a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,7 +10,7 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9745f0812b65d9137458741ca5803324670deeef..96e617049ab7c69a0d8ffbade894f187566c21b1 100644 +index 084f36bb29a3fa28dbac1fa6f50849e5722ab9fe..e1d8a0e885cc9d7270c973cf947b4ab09f9e200b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -773,6 +773,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant newState) -> { -@@ -1955,12 +1955,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1936,12 +1936,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index bba3a80635..1b441a47c7 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -23,7 +23,7 @@ Chunks in front of the player have higher priority, to help with fast traveling players keep up with their movement. diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java -index b5c2e1f4a2b5fdcaa6bb01f4b3b6847cd5b73ae8..6209b33d8497ec56bbde507e523db0649c66f590 100644 +index 49a594e5f345096cb3b9913b8ee2760795c5f012..bcb7ce2692c5bc1a6214c3a384949666107864fb 100644 --- a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java +++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java @@ -4,7 +4,10 @@ import com.destroystokyo.paper.io.PaperFileIOThread; @@ -484,7 +484,7 @@ index c072f61e8c88eac8335acd660d8ff0e2f9db819e..4c4108705e9d25912e57a7b3c28b4f1a 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 a6363b73522f9d27534b6e80f4b3789e84316c49..604e7004b659daed2844ba1a76bf09288ec549e5 100644 +index c265631a2a581a913ab460f816fc70394eb7323f..a165b863003fddef179f95b2d987ac7873ede1e8 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -443,6 +443,26 @@ public class ChunkProviderServer extends IChunkProvider { @@ -570,7 +570,7 @@ index a6363b73522f9d27534b6e80f4b3789e84316c49..604e7004b659daed2844ba1a76bf0928 boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a23a9b5005 100644 +index 9f2eb5ea511f7b854ff06e321015a464771c86bc..c4295e4f2753111764ef0ca8f079aec145d4e87c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -55,6 +55,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -586,9 +586,9 @@ index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a2 private float lastHealthSent = -1.0E8F; private int lastFoodSent = -99999999; private boolean lastSentSaturationZero = true; -@@ -136,6 +142,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -130,6 +136,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + this.canPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); - this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper } + // Paper start + public BlockPosition getPointInFront(double inFront) { @@ -608,7 +608,7 @@ index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a2 // Yes, this doesn't match Vanilla, but it's the best we can do for now. // If this is an issue, PRs are welcome -@@ -484,6 +505,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -478,6 +499,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn) super.tick(); } @@ -882,7 +882,7 @@ index e5751adde516544722b95016f64b2a46c16e77ce..04dea2c9fd9337631a6289c7242338e1 } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb60426067b2ba89 100644 +index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592e862f6d5 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -51,6 +51,7 @@ import org.apache.commons.lang3.mutable.MutableBoolean; @@ -901,7 +901,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 public final ChunkGenerator chunkGenerator; private final Supplier l; public final Supplier getWorldPersistentDataSupplier() { return this.l; } // Paper - OBFHELPER private final VillagePlace m; -@@ -125,6 +127,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -124,6 +126,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void execute(Runnable runnable) { @@ -909,7 +909,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 if (queued == null) { queued = new java.util.ArrayDeque<>(); } -@@ -133,6 +136,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -132,6 +135,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void run() { @@ -917,7 +917,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 if (queued == null) { return; } -@@ -287,6 +291,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -286,6 +290,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.world = worldserver; this.chunkGenerator = chunkgenerator; this.executor = iasynctaskhandler; @@ -933,7 +933,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 ThreadedMailbox threadedmailbox = ThreadedMailbox.a(executor, "worldgen"); iasynctaskhandler.getClass(); -@@ -381,6 +394,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -379,6 +392,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet newState) -> { @@ -941,7 +941,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 if (newState.size() != 1) { return; } -@@ -399,7 +413,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -397,7 +411,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(rangeX, rangeZ); PlayerChunkMap.this.world.getChunkProvider().removeTicketAtLevel(TicketType.PLAYER, chunkPos, 31, chunkPos); // entity ticking level, TODO check on update @@ -954,7 +954,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 this.playerViewDistanceNoTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); this.playerViewDistanceBroadcastMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -416,6 +434,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -414,6 +432,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }); // Paper end - no-tick view distance } @@ -1069,9 +1069,9 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 + } + // Paper end - public void updatePlayerMobTypeMap(Entity entity) { - if (!this.world.paperConfig.perPlayerMobSpawns) { -@@ -545,6 +673,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER + private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { +@@ -526,6 +654,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { List>> list = Lists.newArrayList(); int j = chunkcoordintpair.x; int k = chunkcoordintpair.z; @@ -1079,7 +1079,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 for (int l = -i; l <= i; ++l) { for (int i1 = -i; i1 <= i; ++i1) { -@@ -563,6 +692,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -544,6 +673,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkStatus chunkstatus = (ChunkStatus) intfunction.apply(j1); CompletableFuture> completablefuture = playerchunk.a(chunkstatus, this); @@ -1094,7 +1094,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 list.add(completablefuture); } -@@ -1027,14 +1164,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1008,14 +1145,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; CompletableFuture chunkSaveFuture = this.world.asyncChunkTaskManager.getChunkSaveFuture(chunkcoordintpair.x, chunkcoordintpair.z); @@ -1122,7 +1122,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 return ret; // Paper end } -@@ -1171,7 +1316,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1152,7 +1297,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { long i = playerchunk.i().pair(); playerchunk.getClass(); @@ -1132,7 +1132,7 @@ index 45e89468d72adba2cf7c079a12b8f3848f56e807..1eb138f003730f9d1048683beb604260 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 383a9bdec4d476bbde5a7c63a9915d2ed4c136a4..e34290011bb5d7bcfb677b70fdec1a525a082e0e 100644 +index 553c7313e2b699be88ea01460fd299421c42b176..66dd1b3bfeebab8dd0f4e823dd0daea903343413 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1301,6 +1301,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1144,7 +1144,7 @@ index 383a9bdec4d476bbde5a7c63a9915d2ed4c136a4..e34290011bb5d7bcfb677b70fdec1a52 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index bdee3540b675f8036c5c6a59d6f53057bbdd6a85..34e218f054eee7d3e2ea064e0758d93f140f270b 100644 +index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435edfc91f2e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -199,8 +199,8 @@ public abstract class PlayerList { @@ -1231,7 +1231,7 @@ index 745633509d3f948d46529d5439ec14cd01a05563..5ae74d0856f7fb4a7ee35e5d778d78fe net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6032a67b3f242580d8de5e77554e3ec317d3019d..b602fc8e7747b839a853310c5d5592d3ac4c0855 100644 +index 0321b54f3defc983f1ebe47bf2888cbba39d102c..1b84d4f26da310c94510fa4c0da9a68ec8c6b71c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch index d4b5d55f70..2050876f0c 100644 --- a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,7 +11,7 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 34e218f054eee7d3e2ea064e0758d93f140f270b..54d5bb4309600ed87a6f7dfc64415fb8854c0f75 100644 +index 84707b373bcd9c4eb302b149f242435edfc91f2e..9f4d9ee0100bca5f62f6a3778257e4da97ca2d28 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1062,16 +1062,40 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch index bbd4ac1ce4..58a948c24c 100644 --- a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch +++ b/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch @@ -54,10 +54,10 @@ index 04dea2c9fd9337631a6289c7242338e166d6bc1e..446c401b3139f8c6c0e70d883340f014 // Paper start - no-tick view distance public final Chunk getSendingChunk() { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 1eb138f003730f9d1048683beb60426067b2ba89..e9703cee3b175b220917b83d80e9904b1af17abe 100644 +index 9419cb575fde265718eafe20bbe8a592e862f6d5..bf60b43bf3cb75b7545193958e5508415fa55986 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -740,7 +740,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -721,7 +721,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return either.mapLeft((list) -> { return (Chunk) list.get(list.size() / 2); }); @@ -66,7 +66,7 @@ index 1eb138f003730f9d1048683beb60426067b2ba89..e9703cee3b175b220917b83d80e9904b } @Nullable -@@ -1090,7 +1090,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1071,7 +1071,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { IChunkAccess ichunkaccess = (IChunkAccess) optional.get(); if (ichunkaccess.getChunkStatus().b(chunkstatus)) { @@ -75,7 +75,7 @@ index 1eb138f003730f9d1048683beb60426067b2ba89..e9703cee3b175b220917b83d80e9904b if (chunkstatus == ChunkStatus.LIGHT) { completablefuture1 = this.b(playerchunk, chunkstatus); -@@ -1106,7 +1106,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1087,7 +1087,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return this.b(playerchunk, chunkstatus); } } @@ -84,7 +84,7 @@ index 1eb138f003730f9d1048683beb60426067b2ba89..e9703cee3b175b220917b83d80e9904b } } -@@ -1224,6 +1224,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1205,6 +1205,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); }); }, (runnable) -> { diff --git a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch index 04e66be87d..3f222f6058 100644 --- a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0505-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 604e7004b659daed2844ba1a76bf09288ec549e5..ef980f9859d1d7d0d5e13d0d70e998055f92135e 100644 +index a165b863003fddef179f95b2d987ac7873ede1e8..70fdce2946b94fad32cd7d31f990c4d7916a6e53 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1044,7 +1044,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -1029,7 +1029,7 @@ public class ChunkProviderServer extends IChunkProvider { if (ChunkProviderServer.this.tickDistanceManager()) { return true; } else { @@ -1281,10 +1281,10 @@ index 446c401b3139f8c6c0e70d883340f0140d94b752..a3bce8f13bf278af2d6870891daa9bf6 if (getCurrentPriority() != priority) { this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index e9703cee3b175b220917b83d80e9904b1af17abe..3b2c3d55ef7bd31d8562623fe40d76c9d4eee7c8 100644 +index bf60b43bf3cb75b7545193958e5508415fa55986..46f8fe23cf4442334d344365baba77b2a6394e1b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -653,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -634,6 +634,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end } diff --git a/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch index a2cfef7290..6c2d7d593e 100644 --- a/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 65f9ec884c7e36b7d1340dcfdf186ee0669178e4..b04fe735839de47e4101dade366a668c9237f6b6 100644 +index 6b1b4780a8553dfd7da32c3e9e76b142122f6a74..c1e36576d572b779500d2cb2566076be894ca8a2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -633,4 +633,13 @@ public class PaperWorldConfig { +@@ -634,4 +634,13 @@ public class PaperWorldConfig { private void viewDistance() { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch index faf47ee8f1..3521403e1a 100644 --- a/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,7 +14,7 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e34290011bb5d7bcfb677b70fdec1a525a082e0e..bcb0ea6704b185a41f92d6cab24e4cf4ff91ebbc 100644 +index 66dd1b3bfeebab8dd0f4e823dd0daea903343413..0cb2efb10694c81786a95301f3da86121ea27b17 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1097,6 +1097,11 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch index 9fcd5db58b..654d69e3c6 100644 --- a/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch +++ b/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch @@ -7,7 +7,7 @@ Properly track death stage when unloading/loading in the dragon diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 43e3755f0fa75b5f72ec620f3f6647ef6bce38c5..3a37e481729abc890cb2f9884b8501f630c3cf32 100644 +index 73e9859e675902d9fc5942547966b52426a496a2..63a759cc18b5b765bc9d34f71dd775fd35dee280 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -830,6 +830,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { diff --git a/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch index d7f11254f3..a36bc58783 100644 --- a/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index bcb0ea6704b185a41f92d6cab24e4cf4ff91ebbc..92802301e420da4eb64b0d942f914ee30c9b784b 100644 +index 0cb2efb10694c81786a95301f3da86121ea27b17..eeb870107031b38e25b5fb85ea731a7db1d6c2d1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2515,9 +2515,15 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch b/removed/1.16/0384-implement-optional-per-player-mob-spawns.patch similarity index 99% rename from Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch rename to removed/1.16/0384-implement-optional-per-player-mob-spawns.patch index 8a0e0c71d8..8fa2daabda 100644 --- a/Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch +++ b/removed/1.16/0384-implement-optional-per-player-mob-spawns.patch @@ -5,10 +5,10 @@ Subject: [PATCH] implement optional per player mob spawns diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index 98acbfa44dd9042b26fdf719d7748f92d201c928..a94ebf7c76f167d3b66f7d243910c13d4bfaaba3 100644 +index a27dc38d1a29ed1d63d2f44b7984c2b65be487d9..96aaaab5b7685c874463505f9d25e8a0a01a6e7c 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -@@ -56,6 +56,7 @@ public class WorldTimingsHandler { +@@ -57,6 +57,7 @@ public class WorldTimingsHandler { public final Timing miscMobSpawning; @@ -16,7 +16,7 @@ index 98acbfa44dd9042b26fdf719d7748f92d201c928..a94ebf7c76f167d3b66f7d243910c13d public final Timing poiUnload; public final Timing chunkUnload; -@@ -121,6 +122,7 @@ public class WorldTimingsHandler { +@@ -122,6 +123,7 @@ public class WorldTimingsHandler { miscMobSpawning = Timings.ofSafe(name + "Mob spawning - Misc"); @@ -25,10 +25,10 @@ index 98acbfa44dd9042b26fdf719d7748f92d201c928..a94ebf7c76f167d3b66f7d243910c13d poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f7a52481fa00a45fdebe6715dfde85c0f91fb8c0..884549b7a0f3c8084bdf9da98611e8abc942cf45 100644 +index cf9d980e61be199a34cff98f805e511f9410dd51..3d9a48e56194225cf39e31d13d26ec17afedadaf 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -561,4 +561,9 @@ public class PaperWorldConfig { +@@ -567,4 +567,9 @@ public class PaperWorldConfig { } } } From c63757c131d824c2fc8c130b620971a79726e8b5 Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Fri, 26 Jun 2020 18:20:03 +0200 Subject: [PATCH 15/95] [WIP|1.16] Misc fixes (#3627) --- SHIT_TO_CHECK.md | 5 +- Spigot-API-Patches/0004-Timings-v2.patch | 8 +-- .../0006-Add-getTPS-method.patch | 8 +-- .../0014-Expose-server-CommandMap.patch | 8 +-- ...eload-permissions.yml-and-require-co.patch | 8 +-- ...8-Allow-Reloading-of-Command-Aliases.patch | 8 +-- ...n-option-to-prevent-player-names-fro.patch | 8 +-- ...upstream-javadoc-warnings-and-errors.patch | 18 +++--- .../0055-Basic-PlayerProfile-API.patch | 8 +-- .../0088-getPlayerUniqueId-API.patch | 8 +-- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +- ...ault-permission-message-configurable.patch | 8 +-- ...lip-some-Spigot-API-null-annotations.patch | 12 ++-- ...186-Expose-the-internal-current-tick.patch | 8 +-- .../0192-Add-tick-times-API.patch | 8 +-- ...193-Expose-MinecraftServer-isRunning.patch | 8 +-- .../0202-Add-Mob-Goal-API.patch | 8 +-- .../0203-World-view-distance-api.patch | 4 +- .../0002-Paper-config-files.patch | 16 ++--- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 30 ++++++++- Spigot-Server-Patches/0004-MC-Utils.patch | 12 ++-- Spigot-Server-Patches/0009-Timings-v2.patch | 42 ++++++------ ...5-Allow-for-toggling-of-spawn-chunks.patch | 4 +- ...ient-crashes-server-lists-and-Mojang.patch | 6 +- .../0018-Implement-Paper-VersionChecker.patch | 4 +- .../0020-Player-affects-spawning-API.patch | 4 +- ...023-Further-improve-server-tick-loop.patch | 14 ++-- ...event-tile-entity-and-entity-crashes.patch | 8 +-- .../0032-Optimize-explosions.patch | 8 +-- .../0041-Disable-spigot-tick-limiters.patch | 4 +- ...44-Ensure-commands-are-not-ran-async.patch | 4 +- .../0046-Expose-server-CommandMap.patch | 4 +- .../0052-Add-velocity-warnings.patch | 4 +- .../0054-Add-exception-reporting-event.patch | 12 ++-- .../0058-Complete-resource-pack-API.patch | 4 +- ...ading-permissions.yml-before-plugins.patch | 6 +- ...llow-Reloading-of-Custom-Permissions.patch | 4 +- .../0062-Remove-Metadata-on-reload.patch | 4 +- .../0066-Add-World-Util-Methods.patch | 4 +- ...th-absorb-values-and-repair-bad-data.patch | 4 +- ...Location-getType-and-getBlockData-fo.patch | 6 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 10 +-- ...g-BlockPlaceEvent-triggering-physics.patch | 4 +- ...Remove-unused-World-Tile-Entity-List.patch | 12 ++-- .../0088-Configurable-Player-Collision.patch | 4 +- ...92-Implement-PlayerLocaleChangeEvent.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 6 +- .../0100-Optimize-UserCache-Thread-Safe.patch | 4 +- ...r-redstone-torch-rapid-clock-removal.patch | 4 +- ...setting-for-proxy-online-mode-status.patch | 4 +- ...1-Allow-Reloading-of-Command-Aliases.patch | 4 +- ...imize-World.isLoaded-BlockPosition-Z.patch | 4 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 6 +- ...PI-for-Reason-Source-Triggering-play.patch | 4 +- ...le-async-calls-to-restart-the-server.patch | 10 +-- ...n-option-to-prevent-player-names-fro.patch | 4 +- ...oleAppender-for-console-improvements.patch | 18 +++--- .../0152-Add-UnknownCommandEvent.patch | 4 +- .../0153-Basic-PlayerProfile-API.patch | 10 +-- ...65-Fix-MC-117075-TE-Unload-Lag-Spike.patch | 4 +- ...dEffects-only-to-players-who-can-see.patch | 4 +- ...e-implementations-for-captured-block.patch | 8 +-- .../0182-AsyncTabCompleteEvent.patch | 4 +- .../0188-PreCreatureSpawnEvent.patch | 6 +- ...nt-extended-PaperServerListPingEvent.patch | 4 +- .../0205-getPlayerUniqueId-API.patch | 4 +- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +- ...Item-entities-with-World.spawnEntity.patch | 4 +- .../0233-Expand-Explosions-API.patch | 4 +- ...7-Implement-World.getEntity-UUID-API.patch | 4 +- ...t-armor-stands-from-doing-entity-loo.patch | 4 +- ...3-Vanished-players-don-t-have-rights.patch | 8 +-- ...ead-Entities-in-entityList-iteration.patch | 10 +-- .../0265-Add-hand-to-bucket-events.patch | 4 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 10 +-- ...loadChunk-int-int-false-load-unconve.patch | 4 +- ...e-attack-cooldown-methods-for-Player.patch | 4 +- .../0287-Improve-death-events.patch | 4 +- ...wning-from-loading-generating-chunks.patch | 6 +- .../0302-Add-sun-related-API.patch | 4 +- ...6-Add-Velocity-IP-Forwarding-Support.patch | 4 +- ...er-Thread-Pool-and-Thread-Priorities.patch | 4 +- .../0314-Optimize-World-Time-Updates.patch | 4 +- ...ault-permission-message-configurable.patch | 4 +- ...-remove-from-being-called-on-Players.patch | 4 +- .../0332-BlockDestroyEvent.patch | 4 +- .../0350-Server-Tick-Events.patch | 6 +- ...-Optimize-Captured-TileEntity-Lookup.patch | 4 +- .../0353-Add-Heightmap-API.patch | 8 +-- ...layer-View-Distance-API-placeholders.patch | 4 +- ...isPrimaryThread-and-MinecraftServer-.patch | 8 +-- ...361-improve-CraftWorld-isChunkLoaded.patch | 4 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 10 +-- ...368-Fix-World-isChunkGenerated-calls.patch | 6 +- .../0371-incremental-chunk-saving.patch | 6 +- Spigot-Server-Patches/0372-Anti-Xray.patch | 8 +-- ...78-Asynchronous-chunk-IO-and-loading.patch | 14 ++-- ...etChunkIfLoadedImmediately-in-places.patch | 8 +-- .../0380-Reduce-sync-loads.patch | 8 +-- ...if-we-have-a-custom-Bukkit-generator.patch | 6 +- ...hanging-entities-that-are-not-ItemFr.patch | 4 +- ...391-Expose-the-internal-current-tick.patch | 4 +- ...ftMagicNumbers.isSupportedApiVersion.patch | 4 +- .../0399-Optimize-Hoppers.patch | 8 +-- .../0409-Entity-Activation-Range-2.0.patch | 6 +- ...e-getChunkAt-calls-for-loaded-chunks.patch | 4 +- .../0417-Optimise-random-block-ticking.patch | 4 +- ...hunkMap-memory-use-for-visibleChunks.patch | 10 +-- .../0438-Increase-Light-Queue-Size.patch | 4 +- ...asks-Speed-up-processing-of-chunk-lo.patch | 16 ++--- ...-Add-tick-times-API-and-mspt-command.patch | 10 +-- ...442-Expose-MinecraftServer-isRunning.patch | 4 +- ...Add-Raw-Byte-ItemStack-Serialization.patch | 4 +- .../0447-Improved-Watchdog-Support.patch | 36 +++++------ ...imise-entity-hard-collision-checking.patch | 4 +- ...-Implement-Player-Client-Options-API.patch | 4 +- .../0473-Expose-game-version.patch | 4 +- .../0477-Implement-Mob-Goal-API.patch | 4 +- ...tance-map-to-optimise-entity-tracker.patch | 4 +- ...No-Tick-view-distance-implementation.patch | 8 +-- ...Wait-for-Async-Tasks-during-shutdown.patch | 8 +-- ...and-End-Portal-Frames-from-being-des.patch | 4 +- ...k-Priority-Urgency-System-for-Chunks.patch | 6 +- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 22 +++---- Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch | 64 +++++++++++++++++++ work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 128 files changed, 524 insertions(+), 435 deletions(-) create mode 100644 Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch diff --git a/SHIT_TO_CHECK.md b/SHIT_TO_CHECK.md index 98771cea37..9c54b6de4c 100644 --- a/SHIT_TO_CHECK.md +++ b/SHIT_TO_CHECK.md @@ -1,9 +1,8 @@ # Shit to check -* Mini: "Allow disabling armour stand ticking": Not sure if the equipment update actually works, vanilla shifted a bunch of shit * Mini: "Optimize World Server Map": Figure out how to fill PaperWorldMap, it needs a dim key which doesnt exist anymore? * Mini: "MC-50319": fix if still works -* Mini: I definetly dropped a patch I didnt want to drop, we need to go thru in the end and see if all patches are still in, lol * Make sure the flat bedrock setting doesn't do anything stupid * Check DataBits foreach -* Update MobGoalHelper \ No newline at end of file +* lighting is bork (load chunk, fly away, come back, everything or parts are black) +* block actions (particles/sounds) are bork (no chest opening, no bell, no noteblock) diff --git a/Spigot-API-Patches/0004-Timings-v2.patch b/Spigot-API-Patches/0004-Timings-v2.patch index a1ab67634c..98898540ff 100644 --- a/Spigot-API-Patches/0004-Timings-v2.patch +++ b/Spigot-API-Patches/0004-Timings-v2.patch @@ -2778,10 +2778,10 @@ index 0000000000000000000000000000000000000000..5989ee21297935651b0edd44b8239e65 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index ae21e0f97d3d078e3b9ce9f60590c20e5012396e..755869366e7546fa8aefe7d7a1a602bab91a458c 100644 +index c1ecd19dd062276f5680b903309efce194559ae9..0b6ff0fe323397bb257f55bd2db21eba4ccc50f7 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -618,7 +618,6 @@ public final class Bukkit { +@@ -640,7 +640,6 @@ public final class Bukkit { */ public static void reload() { server.reload(); @@ -2790,10 +2790,10 @@ index ae21e0f97d3d078e3b9ce9f60590c20e5012396e..755869366e7546fa8aefe7d7a1a602ba /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index f6fb72fab398ae8ca8b746154ff3c8fcad378faf..fad4e929264e2be534d3c4a90a5d557fd6c5807b 100644 +index 5a99e36393f885003569977461923a9f6fa23402..113536d4c86a5aa863c4db2416caa41ca6bc55c0 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1300,6 +1300,26 @@ public interface Server extends PluginMessageRecipient { +@@ -1328,6 +1328,26 @@ public interface Server extends PluginMessageRecipient { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/Spigot-API-Patches/0006-Add-getTPS-method.patch b/Spigot-API-Patches/0006-Add-getTPS-method.patch index 6dc0d5c200..2530d8c06a 100644 --- a/Spigot-API-Patches/0006-Add-getTPS-method.patch +++ b/Spigot-API-Patches/0006-Add-getTPS-method.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getTPS method diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 755869366e7546fa8aefe7d7a1a602bab91a458c..6c3aa418589903925d92d48a79f9f3d2461f78d7 100644 +index 0b6ff0fe323397bb257f55bd2db21eba4ccc50f7..15543603c168623572b1a26e41eb20058770784d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1369,6 +1369,17 @@ public final class Bukkit { +@@ -1401,6 +1401,17 @@ public final class Bukkit { return server.getEntity(uuid); } @@ -27,10 +27,10 @@ index 755869366e7546fa8aefe7d7a1a602bab91a458c..6c3aa418589903925d92d48a79f9f3d2 * Get the advancement specified by this key. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index fad4e929264e2be534d3c4a90a5d557fd6c5807b..f0dba56dcd8adb50725356810d316e74527939d8 100644 +index 113536d4c86a5aa863c4db2416caa41ca6bc55c0..3af00d77f9015f2eccab3047676b70c1af68daa7 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1148,6 +1148,16 @@ public interface Server extends PluginMessageRecipient { +@@ -1176,6 +1176,16 @@ public interface Server extends PluginMessageRecipient { @Nullable Entity getEntity(@NotNull UUID uuid); diff --git a/Spigot-API-Patches/0014-Expose-server-CommandMap.patch b/Spigot-API-Patches/0014-Expose-server-CommandMap.patch index 64791486f7..dc662b9ea8 100644 --- a/Spigot-API-Patches/0014-Expose-server-CommandMap.patch +++ b/Spigot-API-Patches/0014-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 6c3aa418589903925d92d48a79f9f3d2461f78d7..6b951d5adf9a665fd8bf8560a3fd7deb14897b34 100644 +index 15543603c168623572b1a26e41eb20058770784d..b46222ed2822fea563585462e43ee73ba2bb9b37 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1543,6 +1543,19 @@ public final class Bukkit { +@@ -1575,6 +1575,19 @@ public final class Bukkit { return server.getUnsafe(); } @@ -29,10 +29,10 @@ index 6c3aa418589903925d92d48a79f9f3d2461f78d7..6b951d5adf9a665fd8bf8560a3fd7deb public static Server.Spigot spigot() { return server.spigot(); diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index f0dba56dcd8adb50725356810d316e74527939d8..af21bb1aa133c6ab119f23c098d17a5bc4e9cd47 100644 +index 3af00d77f9015f2eccab3047676b70c1af68daa7..d3c498ad0e7681422ef2117be41c6603ebce0e0a 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1158,6 +1158,15 @@ public interface Server extends PluginMessageRecipient { +@@ -1186,6 +1186,15 @@ public interface Server extends PluginMessageRecipient { public double[] getTPS(); // Paper end diff --git a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch b/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch index b3744bc53b..d23e579ff7 100644 --- a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch +++ b/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 39423f3a689a69de666537603e97d50244827f64..423fecf5411c05a55f22951437ff77af4bd29318 100644 +index 7b1978a258cbf74983dc2512092653ed4ff64e98..a0473d6b5339513f10749c0498b2ef5a0d710b14 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1574,6 +1574,13 @@ public final class Bukkit { +@@ -1606,6 +1606,13 @@ public final class Bukkit { public static org.bukkit.command.CommandMap getCommandMap() { return server.getCommandMap(); } @@ -24,10 +24,10 @@ index 39423f3a689a69de666537603e97d50244827f64..423fecf5411c05a55f22951437ff77af @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b09d010853a67db16787d9e764f1e2949cb33050..38d7da7378f9dc387ce9b52f1527db929901670e 100644 +index e3385abec44c603201aa37e3b3180cf88d378b52..a13c5014e0815d1de0bab184ea365bc6f97dcd8f 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1388,4 +1388,6 @@ public interface Server extends PluginMessageRecipient { +@@ -1416,4 +1416,6 @@ public interface Server extends PluginMessageRecipient { @NotNull Spigot spigot(); // Spigot end diff --git a/Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch b/Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch index a5593ab833..840e64ab7d 100644 --- a/Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-API-Patches/0038-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 423fecf5411c05a55f22951437ff77af4bd29318..0ec517701677a844c72b065e0ce453a0408102a5 100644 +index a0473d6b5339513f10749c0498b2ef5a0d710b14..6f2b67774a989ade2ec8acafd9f5288d51fb2102 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1581,6 +1581,15 @@ public final class Bukkit { +@@ -1613,6 +1613,15 @@ public final class Bukkit { public static void reloadPermissions() { server.reloadPermissions(); } @@ -26,10 +26,10 @@ index 423fecf5411c05a55f22951437ff77af4bd29318..0ec517701677a844c72b065e0ce453a0 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 38d7da7378f9dc387ce9b52f1527db929901670e..93bb91fad3a27632f2d6d02f1e08ddbca6152a43 100644 +index a13c5014e0815d1de0bab184ea365bc6f97dcd8f..339463eb75e3cb4a9d025892835d54b6ce76c478 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1390,4 +1390,6 @@ public interface Server extends PluginMessageRecipient { +@@ -1418,4 +1418,6 @@ public interface Server extends PluginMessageRecipient { // Spigot end void reloadPermissions(); // Paper diff --git a/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch index b0c301af1d..302fc85168 100644 --- a/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 0ec517701677a844c72b065e0ce453a0408102a5..ded9df9a31fb9ac847a60b4eba182ac487252aca 100644 +index 6f2b67774a989ade2ec8acafd9f5288d51fb2102..c5b6e5fa0cfd876733b2010494ad7bbeafc789f8 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1590,6 +1590,16 @@ public final class Bukkit { +@@ -1622,6 +1622,16 @@ public final class Bukkit { public static boolean reloadCommandAliases() { return server.reloadCommandAliases(); } @@ -27,10 +27,10 @@ index 0ec517701677a844c72b065e0ce453a0408102a5..ded9df9a31fb9ac847a60b4eba182ac4 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 93bb91fad3a27632f2d6d02f1e08ddbca6152a43..112098f9bab1b091538d74f558113830c8cdce90 100644 +index 339463eb75e3cb4a9d025892835d54b6ce76c478..457007005f9ff5f6818c559635379a2e698fc4d7 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1392,4 +1392,14 @@ public interface Server extends PluginMessageRecipient { +@@ -1420,4 +1420,14 @@ public interface Server extends PluginMessageRecipient { void reloadPermissions(); // Paper boolean reloadCommandAliases(); // Paper diff --git a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch index 83edd7cf6f..a64705604b 100644 --- a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7ef36f0cd 100644 +index 480386b2405953c3a06958a9728b38371d75662b..55d114e3a17ea623ecc0d9fa87b14c3ffc65e6be 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2013,6 +2013,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2077,6 +2077,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -17,7 +17,7 @@ index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); -@@ -2029,6 +2030,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2093,6 +2094,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -25,7 +25,7 @@ index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); -@@ -2079,6 +2081,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2143,6 +2145,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -33,7 +33,7 @@ index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -2099,6 +2102,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2163,6 +2166,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -41,7 +41,7 @@ index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -2155,6 +2159,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2219,6 +2223,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -49,7 +49,7 @@ index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); -@@ -2177,6 +2182,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2241,6 +2246,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -57,7 +57,7 @@ index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); -@@ -2200,6 +2206,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2264,6 +2270,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param force whether to send the particle to players within an extended * range and encourage their client to render it regardless of * settings @@ -65,7 +65,7 @@ index 75d62402181934d316582023fdc012ea3c74306a..a636956c4772f4e38eaa71553d3dfbd7 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force); -@@ -2225,6 +2232,7 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2289,6 +2296,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param force whether to send the particle to players within an extended * range and encourage their client to render it regardless of * settings diff --git a/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch b/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch index e6b95f463e..bc1cd82b9c 100644 --- a/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch +++ b/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch @@ -267,10 +267,10 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index ded9df9a31fb9ac847a60b4eba182ac487252aca..5d4fb5b9d55bfbe6bc9a9082b5cb85aa9ee86de2 100644 +index c5b6e5fa0cfd876733b2010494ad7bbeafc789f8..d27405a8cfa590c13f5a3976c74c05655ae1f93d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1600,6 +1600,40 @@ public final class Bukkit { +@@ -1632,6 +1632,40 @@ public final class Bukkit { public static boolean suggestPlayerNamesWhenNullTabCompletions() { return server.suggestPlayerNamesWhenNullTabCompletions(); } @@ -312,10 +312,10 @@ index ded9df9a31fb9ac847a60b4eba182ac487252aca..5d4fb5b9d55bfbe6bc9a9082b5cb85aa @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 112098f9bab1b091538d74f558113830c8cdce90..6778ac8e5a16eb20574732acb0cc0038ec286467 100644 +index 457007005f9ff5f6818c559635379a2e698fc4d7..24922e5699241e29bc615dcffadce21c89f6ff35 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1401,5 +1401,33 @@ public interface Server extends PluginMessageRecipient { +@@ -1429,5 +1429,33 @@ public interface Server extends PluginMessageRecipient { * @return true if player names should be suggested */ boolean suggestPlayerNamesWhenNullTabCompletions(); diff --git a/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch b/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch index e70a1220e4..da536f8e89 100644 --- a/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch +++ b/Spigot-API-Patches/0088-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 5d4fb5b9d55bfbe6bc9a9082b5cb85aa9ee86de2..f5fac807cce22819cba5878a6e2664f0f82f1ae3 100644 +index d27405a8cfa590c13f5a3976c74c05655ae1f93d..4b6b1bce3a728d74f8b791efd2d981e907e202bc 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -467,6 +467,20 @@ public final class Bukkit { +@@ -489,6 +489,20 @@ public final class Bukkit { return server.getPlayer(id); } @@ -34,10 +34,10 @@ index 5d4fb5b9d55bfbe6bc9a9082b5cb85aa9ee86de2..f5fac807cce22819cba5878a6e2664f0 * Gets the plugin manager for interfacing with plugins. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 6778ac8e5a16eb20574732acb0cc0038ec286467..11fffc514ed1f0b00b09c0cdb5272ea79340972c 100644 +index 24922e5699241e29bc615dcffadce21c89f6ff35..a2420771ca49acc08826ca60fcda7495c80cf1d5 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -396,6 +396,18 @@ public interface Server extends PluginMessageRecipient { +@@ -416,6 +416,18 @@ public interface Server extends PluginMessageRecipient { @Nullable public Player getPlayer(@NotNull UUID id); diff --git a/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch index cc17754d68..6083ef3906 100644 --- a/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/0096-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 3150f7d81c87b57944231bd95bb2e49af51f7eca..c478db22ade86ca58551ba94043dd1c2fd08004e 100644 +index c422cfa1b599bc4c158dea178e5677c4b4545d99..6e311dd8f1105c28be7259855e0b19ae182badfd 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2437,7 +2437,57 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2501,7 +2501,57 @@ public interface World extends PluginMessageRecipient, Metadatable { * the type of this depends on {@link Particle#getDataType()} * @param Type */ diff --git a/Spigot-API-Patches/0163-Make-the-default-permission-message-configurable.patch b/Spigot-API-Patches/0163-Make-the-default-permission-message-configurable.patch index 07a9decd26..cf14442dad 100644 --- a/Spigot-API-Patches/0163-Make-the-default-permission-message-configurable.patch +++ b/Spigot-API-Patches/0163-Make-the-default-permission-message-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index f5fac807cce22819cba5878a6e2664f0f82f1ae3..e83f0852d187524a0068a81875323b01e3fd5cbd 100644 +index 4b6b1bce3a728d74f8b791efd2d981e907e202bc..e372ca2339bc25d6110bf95e159703630acca215 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1615,6 +1615,15 @@ public final class Bukkit { +@@ -1647,6 +1647,15 @@ public final class Bukkit { return server.suggestPlayerNamesWhenNullTabCompletions(); } @@ -25,10 +25,10 @@ index f5fac807cce22819cba5878a6e2664f0f82f1ae3..e83f0852d187524a0068a81875323b01 * Creates a PlayerProfile for the specified uuid, with name as null * @param uuid UUID to create profile for diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 11fffc514ed1f0b00b09c0cdb5272ea79340972c..fa855cacec894a0efb254e8a9729a9787464f17d 100644 +index a2420771ca49acc08826ca60fcda7495c80cf1d5..8bbb2efe835b575733b560fe5e2b824e1a859d09 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1414,6 +1414,13 @@ public interface Server extends PluginMessageRecipient { +@@ -1442,6 +1442,13 @@ public interface Server extends PluginMessageRecipient { */ boolean suggestPlayerNamesWhenNullTabCompletions(); diff --git a/Spigot-API-Patches/0177-Flip-some-Spigot-API-null-annotations.patch b/Spigot-API-Patches/0177-Flip-some-Spigot-API-null-annotations.patch index 002ce7578a..903a238460 100644 --- a/Spigot-API-Patches/0177-Flip-some-Spigot-API-null-annotations.patch +++ b/Spigot-API-Patches/0177-Flip-some-Spigot-API-null-annotations.patch @@ -9,10 +9,10 @@ a ton of noise to plugin developers. These do not help plugin developers if they bring moise noise than value. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index e83f0852d187524a0068a81875323b01e3fd5cbd..6658c12b87472a7fa58a6ca70ab0189083e75242 100644 +index e372ca2339bc25d6110bf95e159703630acca215..12603c91046abf1ab58e8b797904b2cdafa7c9af 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1211,7 +1211,7 @@ public final class Bukkit { +@@ -1243,7 +1243,7 @@ public final class Bukkit { * * @return the scoreboard manager or null if no worlds are loaded. */ @@ -21,7 +21,7 @@ index e83f0852d187524a0068a81875323b01e3fd5cbd..6658c12b87472a7fa58a6ca70ab01890 public static ScoreboardManager getScoreboardManager() { return server.getScoreboardManager(); } -@@ -1508,7 +1508,7 @@ public final class Bukkit { +@@ -1540,7 +1540,7 @@ public final class Bukkit { * @param clazz the class of the tag entries * @return the tag or null */ @@ -62,10 +62,10 @@ index 6e1a1124a6e528c1a94ccb1d09bc5dccf056b0b8..77d9cd0a1f54b5eb233eddbcff1bfa76 if (this.world == null) { return null; diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index fa855cacec894a0efb254e8a9729a9787464f17d..df37b9ee57ff8cd194401719bc48f868d6b1ee7e 100644 +index 8bbb2efe835b575733b560fe5e2b824e1a859d09..b46644bc97122814f80a44e6ff0b848f4cf132b7 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1014,7 +1014,7 @@ public interface Server extends PluginMessageRecipient { +@@ -1042,7 +1042,7 @@ public interface Server extends PluginMessageRecipient { * * @return the scoreboard manager or null if no worlds are loaded. */ @@ -74,7 +74,7 @@ index fa855cacec894a0efb254e8a9729a9787464f17d..df37b9ee57ff8cd194401719bc48f868 ScoreboardManager getScoreboardManager(); /** -@@ -1284,7 +1284,7 @@ public interface Server extends PluginMessageRecipient { +@@ -1312,7 +1312,7 @@ public interface Server extends PluginMessageRecipient { * @param clazz the class of the tag entries * @return the tag or null */ diff --git a/Spigot-API-Patches/0186-Expose-the-internal-current-tick.patch b/Spigot-API-Patches/0186-Expose-the-internal-current-tick.patch index bc3db05170..127f1d96b7 100644 --- a/Spigot-API-Patches/0186-Expose-the-internal-current-tick.patch +++ b/Spigot-API-Patches/0186-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 6658c12b87472a7fa58a6ca70ab0189083e75242..b997340686e86e05847bedcbf125e070c569b90a 100644 +index 12603c91046abf1ab58e8b797904b2cdafa7c9af..6a0fee5e81e4d97b624af2718595b63e4d7a95b2 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1657,6 +1657,10 @@ public final class Bukkit { +@@ -1689,6 +1689,10 @@ public final class Bukkit { public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) { return server.createProfile(uuid, name); } @@ -20,10 +20,10 @@ index 6658c12b87472a7fa58a6ca70ab0189083e75242..b997340686e86e05847bedcbf125e070 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index df37b9ee57ff8cd194401719bc48f868d6b1ee7e..80f9abdca71bba79cbf09035cfd5534e41002a27 100644 +index b46644bc97122814f80a44e6ff0b848f4cf132b7..ea6c86c8979ea6253b00c99b4f9cfcd1621beff0 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1448,5 +1448,12 @@ public interface Server extends PluginMessageRecipient { +@@ -1476,5 +1476,12 @@ public interface Server extends PluginMessageRecipient { */ @NotNull com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name); diff --git a/Spigot-API-Patches/0192-Add-tick-times-API.patch b/Spigot-API-Patches/0192-Add-tick-times-API.patch index efbcbd05c5..4f61829ae9 100644 --- a/Spigot-API-Patches/0192-Add-tick-times-API.patch +++ b/Spigot-API-Patches/0192-Add-tick-times-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add tick times API diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index b997340686e86e05847bedcbf125e070c569b90a..c3c2d9c6b546459a614b5fdf5ec3debf4ebcabcf 100644 +index 6a0fee5e81e4d97b624af2718595b63e4d7a95b2..eb2fb4cdc4e7585017acfce0198bb0746d2255cc 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1412,6 +1412,25 @@ public final class Bukkit { +@@ -1444,6 +1444,25 @@ public final class Bukkit { public static double[] getTPS() { return server.getTPS(); } @@ -35,10 +35,10 @@ index b997340686e86e05847bedcbf125e070c569b90a..c3c2d9c6b546459a614b5fdf5ec3debf /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 80f9abdca71bba79cbf09035cfd5534e41002a27..bfa83c9bb4d5f1ff4591e80fd38942d6c88cf960 100644 +index ea6c86c8979ea6253b00c99b4f9cfcd1621beff0..8cb38856d85e9239a132234fdc6af88f3adfe5b7 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1188,6 +1188,21 @@ public interface Server extends PluginMessageRecipient { +@@ -1216,6 +1216,21 @@ public interface Server extends PluginMessageRecipient { */ @NotNull public double[] getTPS(); diff --git a/Spigot-API-Patches/0193-Expose-MinecraftServer-isRunning.patch b/Spigot-API-Patches/0193-Expose-MinecraftServer-isRunning.patch index 0013b87f41..e05aaa4e54 100644 --- a/Spigot-API-Patches/0193-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-API-Patches/0193-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index c3c2d9c6b546459a614b5fdf5ec3debf4ebcabcf..ea3e5d6fa56a7ff259a9ce55a8e31d3921768b8b 100644 +index eb2fb4cdc4e7585017acfce0198bb0746d2255cc..600334831293793840511992048c43bff1febc24 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1680,6 +1680,15 @@ public final class Bukkit { +@@ -1712,6 +1712,15 @@ public final class Bukkit { public static int getCurrentTick() { return server.getCurrentTick(); } @@ -26,10 +26,10 @@ index c3c2d9c6b546459a614b5fdf5ec3debf4ebcabcf..ea3e5d6fa56a7ff259a9ce55a8e31d39 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index bfa83c9bb4d5f1ff4591e80fd38942d6c88cf960..9ceaac0e859e347b07fa9f4c6507a73deb280670 100644 +index 8cb38856d85e9239a132234fdc6af88f3adfe5b7..f44a582e954625a12b19d4e142865e5d3154edd5 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1470,5 +1470,12 @@ public interface Server extends PluginMessageRecipient { +@@ -1498,5 +1498,12 @@ public interface Server extends PluginMessageRecipient { * @return Current tick */ int getCurrentTick(); diff --git a/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch b/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch index 07f5fd15f3..49e0b5175e 100644 --- a/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch +++ b/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch @@ -436,10 +436,10 @@ index 0000000000000000000000000000000000000000..d7f1b2c84aebe8ed04084b9249ed08d5 + GoalKey UNIVERSAL_ANGER_RESET = GoalKey.of(Mob.class, NamespacedKey.minecraft("universal_anger_reset")); +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 95ad0122605b40e28352fa6205528eeb5c453a50..a9c10228eeeaac89361c695a5ab90161b6358ca1 100644 +index c0421b5a09c25ad4f23387b8b0e035871a9d367b..329e2dd1c057788d6bb5a1adc7ee9282820e927d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1701,6 +1701,16 @@ public final class Bukkit { +@@ -1733,6 +1733,16 @@ public final class Bukkit { public static boolean isStopping() { return server.isStopping(); } @@ -457,10 +457,10 @@ index 95ad0122605b40e28352fa6205528eeb5c453a50..a9c10228eeeaac89361c695a5ab90161 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index c3fb1c27187b5283e2fd5c2b894bbc889a48544d..cc06492f46ba5776221cd2614c1dcd8f33cc8faf 100644 +index 0ad848c42039eeed64cc0b8372d3a9331e61d286..b464cc1a70aca3450a5de84a657a1e069a1a8ab6 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1487,5 +1487,13 @@ public interface Server extends PluginMessageRecipient { +@@ -1515,5 +1515,13 @@ public interface Server extends PluginMessageRecipient { * @return true if server is in the process of being shutdown */ boolean isStopping(); diff --git a/Spigot-API-Patches/0203-World-view-distance-api.patch b/Spigot-API-Patches/0203-World-view-distance-api.patch index 402b218254..31cfeddffb 100644 --- a/Spigot-API-Patches/0203-World-view-distance-api.patch +++ b/Spigot-API-Patches/0203-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 143fcbcdbfad551cd4392f54cf189fe3bee41706..ec719d5c0741f3489884709169fee93ef02244bb 100644 +index 90e41bead6a51ab1f272af806c396d8411a96eb7..71c1e93ea15f0a926a9ad822d09a076f8b800988 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -3279,6 +3279,34 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -3343,6 +3343,34 @@ public interface World extends PluginMessageRecipient, Metadatable { int getViewDistance(); // Spigot end diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index ce7387973a..ed15fc3e73 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -615,10 +615,10 @@ index 62f62c2c98fbaff163d9079091e6f39db2d77fa0..484e78746aa62bb0b12968165bf8e056 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 74ad1325727bdc41ed5b2e67058aeaa4fe6db4f2..03dc3dd41015dc210d2781c207261fc310c65519 100644 +index d5e1da2eeea7c06289f52509af844df59e8a29b2..63d3d43f74bed94cd03aa3b7254e66302be861d5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -76,6 +76,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -77,6 +77,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean populating; public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot @@ -627,7 +627,7 @@ index 74ad1325727bdc41ed5b2e67058aeaa4fe6db4f2..03dc3dd41015dc210d2781c207261fc3 public final SpigotTimings.WorldTimingsHandler timings; // Spigot public static BlockPosition lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -92,6 +94,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -93,6 +95,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot @@ -636,10 +636,10 @@ index 74ad1325727bdc41ed5b2e67058aeaa4fe6db4f2..03dc3dd41015dc210d2781c207261fc3 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 9aa648bb5ec42730f6ce85902b91a079084e7f8e..d9dda69118a5319da28cf3011fe5d8a64da08a5c 100644 +index f306530642c56020c390afbcdddf5cbf343a7b2b..f20a68bafc5abb76c60fba85c228bf15f05d309a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -793,6 +793,7 @@ public final class CraftServer implements Server { +@@ -801,6 +801,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -647,7 +647,7 @@ index 9aa648bb5ec42730f6ce85902b91a079084e7f8e..d9dda69118a5319da28cf3011fe5d8a6 for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -820,6 +821,7 @@ public final class CraftServer implements Server { +@@ -834,6 +835,7 @@ public final class CraftServer implements Server { world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns(); } world.spigotConfig.init(); // Spigot @@ -655,7 +655,7 @@ index 9aa648bb5ec42730f6ce85902b91a079084e7f8e..d9dda69118a5319da28cf3011fe5d8a6 } pluginManager.clearPlugins(); -@@ -827,6 +829,7 @@ public final class CraftServer implements Server { +@@ -841,6 +843,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -663,7 +663,7 @@ index 9aa648bb5ec42730f6ce85902b91a079084e7f8e..d9dda69118a5319da28cf3011fe5d8a6 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2055,4 +2058,35 @@ public final class CraftServer implements Server { +@@ -2074,4 +2077,35 @@ public final class CraftServer implements Server { { return spigot; } diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index b5c9286276..c8b68936a1 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -193,6 +193,32 @@ index 6c2ed9c1b8567abcdb11bdc3dbaeed217a2f61e7..ae0ac8d383ca11a683465d8c83a8b8a6 return this.getTemperature() - (f + (float) blockposition.getY() - 64.0F) * 0.05F / 30.0F; } else { +diff --git a/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java b/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java +index 2ac69bf2ae5cbb763fc95c948725373a5c9b95b3..fdc66fc1e3440b6678a1318e9a109f2b41bc8847 100644 +--- a/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java ++++ b/src/main/java/net/minecraft/server/BiomeFrozenDeepOcean.java +@@ -58,7 +58,7 @@ public class BiomeFrozenDeepOcean extends BiomeBase { + } + + if (blockposition.getY() > 64) { +- float f1 = (float) (BiomeFrozenDeepOcean.e.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D); ++ float f1 = (float) (BiomeFrozenDeepOcean.NOISE_GENERATOR_3.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D); // Paper - rename + + return f - (f1 + (float) blockposition.getY() - 64.0F) * 0.05F / 30.0F; + } else { +diff --git a/src/main/java/net/minecraft/server/BiomeFrozenOcean.java b/src/main/java/net/minecraft/server/BiomeFrozenOcean.java +index 0d0ccaec8c497c9d222c7593684ed2d913d1881e..4b18e29ccb0cb15568367abb507b844011bd7f80 100644 +--- a/src/main/java/net/minecraft/server/BiomeFrozenOcean.java ++++ b/src/main/java/net/minecraft/server/BiomeFrozenOcean.java +@@ -57,7 +57,7 @@ public final class BiomeFrozenOcean extends BiomeBase { + } + + if (blockposition.getY() > 64) { +- float f1 = (float) (BiomeFrozenOcean.e.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D); ++ float f1 = (float) (BiomeFrozenOcean.NOISE_GENERATOR_3.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D); // Paper - rename + + return f - (f1 + (float) blockposition.getY() - 64.0F) * 0.05F / 30.0F; + } else { diff --git a/src/main/java/net/minecraft/server/Biomes.java b/src/main/java/net/minecraft/server/Biomes.java index 0aa66addb2cb472b2ab90000d3f0e0f967353e0f..eaa527f4fe289a9492b12591154a60e5aa045252 100644 --- a/src/main/java/net/minecraft/server/Biomes.java @@ -471,10 +497,10 @@ index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d55 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a5f26a51ba612bc62d406cbefa858af75bd062da..7ea0118d108dd71fa1b0336e471ac4cc36722ff8 100644 +index 1360385091332ddf032b075990e59eee5543feb1..bae5ddbd97bd3f3422c699c42f025337b7cef574 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1550,9 +1550,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot @@ -4381,7 +4381,7 @@ index 03dc3dd41015dc210d2781c207261fc310c65519..42294c7c7de146be08d38eddafd8d099 this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -245,6 +246,39 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -247,6 +248,39 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return (Chunk) this.getChunkAt(i, j, ChunkStatus.FULL); } @@ -4421,7 +4421,7 @@ index 03dc3dd41015dc210d2781c207261fc310c65519..42294c7c7de146be08d38eddafd8d099 @Override public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) { IChunkAccess ichunkaccess = this.getChunkProvider().getChunkAt(i, j, chunkstatus, flag); -@@ -403,8 +437,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -405,8 +439,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void a(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 0585ff032f..b13cff8af6 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1118,7 +1118,7 @@ index dccb315440f7429fe881bd0d12af8f1ae8e35c3d..96a95413f74592ef0a8e9367fd3ed81f if (!this.world.isClientSide && this.dN() && this.aC()) { this.damageEntity(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 10ba89eeb31adedadd34746b86843accd1869597..04d1af26aaa7005c9dcf84abfb796b848108bbf0 100644 +index 64994a9635efa36ec09623c3869f22faed09b21c..fc92fbb05e442d453d6d5dd4e36143a576f55b6b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -1141,7 +1141,7 @@ index 10ba89eeb31adedadd34746b86843accd1869597..04d1af26aaa7005c9dcf84abfb796b84 private final ResourcePackRepository resourcePackRepository; private final ScoreboardServer scoreboardServer; @Nullable -@@ -713,6 +713,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { -@@ -1026,14 +1047,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -1218,7 +1218,7 @@ index 10ba89eeb31adedadd34746b86843accd1869597..04d1af26aaa7005c9dcf84abfb796b84 } this.methodProfiler.enter("snooper"); -@@ -1046,6 +1065,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; - public File bukkitDataPackFolder; -@@ -154,7 +154,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant playerView; public int reloadCount; diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch index 1c944d8c51..b0b0cc331a 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch @@ -153,7 +153,7 @@ index 1ce85ab949213efb9eae6daddca6ac8fb15dd472..d2977022d163edc5518dd4737c30cffd } finally { if (filechannel != null) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index c3632b2607ace821b02895a1668bd6050f6c12d6..50be743513145bd2c8b9c65af219f60099cbb09f 100644 +index f27ffc56d548c09b7a1fced6d87623d493a21543..e08de74543535072e63ecfc9bd3ada95c9dbfeb7 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -14,6 +14,7 @@ import org.apache.logging.log4j.LogManager; @@ -164,7 +164,7 @@ index c3632b2607ace821b02895a1668bd6050f6c12d6..50be743513145bd2c8b9c65af219f600 import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit end -@@ -263,6 +264,7 @@ public final class SpawnerCreature { +@@ -268,6 +269,7 @@ public final class SpawnerCreature { } } catch (Exception exception) { SpawnerCreature.LOGGER.warn("Failed to create mob", exception); @@ -172,7 +172,7 @@ index c3632b2607ace821b02895a1668bd6050f6c12d6..50be743513145bd2c8b9c65af219f600 return null; } } -@@ -368,6 +370,7 @@ public final class SpawnerCreature { +@@ -373,6 +375,7 @@ public final class SpawnerCreature { entity = biomebase_biomemeta.c.a(generatoraccess.getMinecraftWorld()); } catch (Exception exception) { SpawnerCreature.LOGGER.warn("Failed to create mob", exception); @@ -201,7 +201,7 @@ index 045c16654e60f2312e9b6f7b0de2c9e921321201..b1081e441023f5d24091321b1267b565 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5197cdb3219638b499f0eb2a25f35e789983a3e8..f80b0b95ce650b01ecb10d3a2f7c66421ca29178 100644 +index a1e1dc72cd6a556505a6f0d7feee2527947c00dd..c01f0e897ab8741c7fd68245458acdb8559e843e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,10 @@ @@ -215,7 +215,7 @@ index 5197cdb3219638b499f0eb2a25f35e789983a3e8..f80b0b95ce650b01ecb10d3a2f7c6642 import com.google.common.collect.Lists; import com.mojang.serialization.Codec; import java.io.IOException; -@@ -718,8 +723,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -720,8 +725,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.exit(); } catch (Throwable throwable) { // Paper start - Prevent tile entity and entity crashes @@ -228,7 +228,7 @@ index 5197cdb3219638b499f0eb2a25f35e789983a3e8..f80b0b95ce650b01ecb10d3a2f7c6642 tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); continue; -@@ -790,8 +798,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -792,8 +800,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/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch index 88c0c54360..93c04ef6dc 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch @@ -22,7 +22,7 @@ index b468182266c39b9defa1aa287290f75f7db44b9a..a0806ddc407d21340c82fe4d00bb7ad1 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 15312df00ea7d88ca1733b5b8a5dd8f204728811..f2963832700db877af9d4efd5b277348303afe63 100644 +index b63cf312a9e9ea4b0659a799abfe21f6f1d98fdb..8a2523e56c74d9d3b75501cef10f3495d460f36d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -136,6 +136,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -36,7 +36,7 @@ index 15312df00ea7d88ca1733b5b8a5dd8f204728811..f2963832700db877af9d4efd5b277348 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1769,6 +1773,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1773,6 +1777,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index 45b97d4ef5..c36ea2c9f0 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -30,10 +30,10 @@ index a62f4bbb973b9cb6d1ee53f56a0897d70ae176af..f207abbe757ad403a29a7a012903aaa8 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index af17df4810ef30eba640028dd0b2047ed387eff0..3b61bb5da6adc04eed934885be7ece2b3f4ea74c 100644 +index 1de3ac4242f388f2331c5a02e17b1709491dcbc7..228106442d8f6d425a0d15c816532223749e03be 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -395,6 +395,7 @@ public final class CraftServer implements Server { +@@ -397,6 +397,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { helpMap.clear(); helpMap.initializeGeneralTopics(); @@ -41,7 +41,7 @@ index af17df4810ef30eba640028dd0b2047ed387eff0..3b61bb5da6adc04eed934885be7ece2b } Plugin[] plugins = pluginManager.getPlugins(); -@@ -414,7 +415,7 @@ public final class CraftServer implements Server { +@@ -416,7 +417,7 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index 8d2c6f913e..d6793e5e70 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-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 3b61bb5da6adc04eed934885be7ece2b3f4ea74c..e1c39accfbdd1ac4bcfdfa9bc159f6d62a36fb50 100644 +index 228106442d8f6d425a0d15c816532223749e03be..73f140771bac6bfda57bbd402a1603cedf8c38b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2144,5 +2144,23 @@ public final class CraftServer implements Server { +@@ -2163,5 +2163,23 @@ public final class CraftServer implements Server { return null; } } diff --git a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch index 79a205c301..707acd3c59 100644 --- a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0062-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 e1c39accfbdd1ac4bcfdfa9bc159f6d62a36fb50..c8073b635ff03e2d76b1def6fd3144b88a385722 100644 +index 73f140771bac6bfda57bbd402a1603cedf8c38b5..2bb31a684906044b159e959dd8acd85efc660b02 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -849,8 +849,18 @@ public final class CraftServer implements Server { +@@ -863,8 +863,18 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } diff --git a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch index 6e941f70ac..0244b49d5d 100644 --- a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..6e05a7deaae13f29c24fb6e364c62948a20d83a8 100644 +index c01f0e897ab8741c7fd68245458acdb8559e843e..ee1f5c1e1bc9440a743a361bf3aaa991dddbc9cd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -283,6 +283,22 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -285,6 +285,22 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return chunk == null ? null : chunk.getFluid(blockposition); } diff --git a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch index ed71b1160a..e1b9ccac8c 100644 --- a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,10 +44,10 @@ index f1080e7d10d5105e3f4010489393f6150c7c4a75..374e4a3dcb656d6a84e05bb9260d3198 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f2963832700db877af9d4efd5b277348303afe63..5b3c8cc669eef72cec04d36de156405421cd21e5 100644 +index 8a2523e56c74d9d3b75501cef10f3495d460f36d..93690040efd7de5223cd81415cfa9aeb4bec30ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1589,6 +1589,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1590,6 +1590,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index ff7be580c3..e371673a9f 100644 --- a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -192,10 +192,10 @@ index c5d7a013e65c2c81b14ceb2476c1c6dfe3239f0d..ee8df274d43be753887fb77e4203e2ee @Override public Fluid getFluid(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6479a62d81daacde6e1e72cb57bd99f9c59b5ae7..042f10ba2c6a3283203fdc5e79f78f3dbf6ccc22 100644 +index ee1f5c1e1bc9440a743a361bf3aaa991dddbc9cd..1e72dd313e1fe0f701f3d14fffdc9a6a8db78934 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -179,7 +179,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -181,7 +181,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public static boolean isValidLocation(BlockPosition blockposition) { @@ -204,7 +204,7 @@ index 6479a62d81daacde6e1e72cb57bd99f9c59b5ae7..042f10ba2c6a3283203fdc5e79f78f3d } public static boolean k(BlockPosition blockposition) { -@@ -195,7 +195,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -197,7 +197,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public static boolean isOutsideWorld(BlockPosition blockposition) { diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 6e99c30c0b..6c9a38a51a 100644 --- a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -32,10 +32,10 @@ index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c410 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 704d59e53f4cf6f94202d6db36b3f7dba3a29c59..5f89477c664662447c1aafbf734a15aee0084f17 100644 +index e1af87a172d011a212aaafc55ef651ff60df35b6..db0184af459472c73df5990699def5bdaef573c2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1175,6 +1175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0611194eac072ce8dcd350dadffbc9da267d6cff..e236a3b3aa11bc5c3bab92959b90827447aa282c 100644 +index 1e72dd313e1fe0f701f3d14fffdc9a6a8db78934..948e477e112cd1e27c74a29c6330b07f9b710ffe 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -439,7 +439,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -441,7 +441,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start iblockdata1.b(this, blockposition, j); // Don't call an event for the old block to limit event spam CraftWorld world = ((WorldServer) this).getWorld(); @@ -56,7 +56,7 @@ index 0611194eac072ce8dcd350dadffbc9da267d6cff..e236a3b3aa11bc5c3bab92959b908274 BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata)); this.getServer().getPluginManager().callEvent(event); -@@ -541,7 +541,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -543,7 +543,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); diff --git a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index f4e225d016..0d3122c07c 100644 --- a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b6242cee9f5ab7c4fc9e32d682eb271f4604db41..45daedbba9829193bdc5e7a8f33b6e29c6fbbe10 100644 +index 948e477e112cd1e27c74a29c6330b07f9b710ffe..58277457ef879c48f3678efeb2a646e116320754 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -499,6 +499,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -501,6 +501,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} public void applyPhysics(BlockPosition blockposition, Block block) { diff --git a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch index 94c5479f1b..86348d8109 100644 --- a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0086-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 d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93512a4855 100644 +index 58277457ef879c48f3678efeb2a646e116320754..bd7214e4679044461f141f3000f1dab648a24051 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 { @@ -18,7 +18,7 @@ index d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93 public final List tileEntityListTick = Lists.newArrayList(); protected final List tileEntityListPending = Lists.newArrayList(); protected final java.util.Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); -@@ -664,9 +664,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -666,9 +666,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { }, tileentity::getPosition}); } @@ -30,7 +30,7 @@ index d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93 this.tileEntityListTick.add(tileentity); } -@@ -702,7 +702,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -704,7 +704,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { this.tileEntityListTick.removeAll(this.tileEntityListUnload); @@ -39,7 +39,7 @@ index d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93 this.tileEntityListUnload.clear(); } -@@ -763,7 +763,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -765,7 +765,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); // Spigot end @@ -48,7 +48,7 @@ index d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93 if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition()); } -@@ -793,7 +793,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -795,7 +795,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 d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93 this.a(tileentity1); } // CraftBukkit end -@@ -935,7 +935,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -937,7 +937,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } else { if (tileentity != null) { this.tileEntityListPending.remove(tileentity); diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index 341daae8d7..619287ad8b 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -19,10 +19,10 @@ index 7d726757d1083011a09c9f2ca37c33a81360e964..3d9a98936cfe933fd71fb82f07e1ba54 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5f89477c664662447c1aafbf734a15aee0084f17..26a796513e66d1593d2d7e47062b26bfe07796e9 100644 +index db0184af459472c73df5990699def5bdaef573c2..e4b92f63c9ac6f0c2bb52056645c91b86e9d8424 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -436,6 +436,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcepackrepository, Proxy proxy, DataFixer datafixer, DataPackResources datapackresources, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory) { super("Server"); @@ -25,7 +25,7 @@ index 02e5a4214e46f31ba38d1ab814eeacce850dfaa1..f020b087599abe370b9da2381be4e6fa this.m = new GameProfilerSwitcher(SystemUtils.a, this::ag); this.methodProfiler = GameProfilerDisabled.a; this.serverPing = new ServerPing(); -@@ -2036,7 +2038,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions diff --git a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch index 54ed5e6c21..3bf20dc4fb 100644 --- a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0109-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 c8073b635ff03e2d76b1def6fd3144b88a385722..ff4cbded970340c0c5321f1c6c3494dc3267e14e 100644 +index 2bb31a684906044b159e959dd8acd85efc660b02..fc309214f335ed455c89523ea6a388ba87c7e088 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1462,7 +1462,8 @@ public final class CraftServer implements Server { +@@ -1476,7 +1476,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/0121-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch index 55ce75a528..c9239582a1 100644 --- a/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0121-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 ff4cbded970340c0c5321f1c6c3494dc3267e14e..f18fb72b62a2c04f03a06de2bbcdee5b7a971aa4 100644 +index fc309214f335ed455c89523ea6a388ba87c7e088..acfa657c62005b04eb9fb438f63240a923c2530f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2173,5 +2173,24 @@ public final class CraftServer implements Server { +@@ -2192,5 +2192,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch index da9b98b915..fa5e04ac16 100644 --- a/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8f7222639bcc5b4b1b8af4aa69a100a37766cb4e..2b5384d43a4bceb0113e88a2e75b3b201fc49393 100644 +index 87a0e66029e10a22ea6e681c7d1e143b9bc5c2c8..5f23a7b952a5938ffa489bbf4f3d64caa8d0f4a6 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -285,6 +285,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -287,6 +287,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return chunk == null ? null : chunk.getFluid(blockposition); } diff --git a/Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch index 8fdabbc692..d112ce4280 100644 --- a/Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,11 +7,11 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 752f3f22f983f9baccaef2e4d30800132fa53125..dc33b91a517b8cfeeed06781fb62f5baa6113aa7 100644 +index 004c768d03e6fde2bcc32f39ba2a36ea2ab1e882..c791e4861163e0340fe3986ec5b7f6ed4900fa3b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -279,6 +279,48 @@ public class CraftWorld implements World { - private int waterAnimalSpawn = -1; +@@ -280,6 +280,48 @@ public class CraftWorld implements World { + private int waterAmbientSpawn = -1; private int ambientSpawn = -1; + // Paper start - Provide fast information methods diff --git a/Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 2b7cf57b6e..d24e571f4c 100644 --- a/Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -278,10 +278,10 @@ index ba42ca08ca61832cb07bebcfa0b1e5422d7b30e9..623cd63711c6cb79dce7a46056e193fd } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index dc33b91a517b8cfeeed06781fb62f5baa6113aa7..7c4514ad1969f7f79bb474606df0f2c3c5888b1a 100644 +index c791e4861163e0340fe3986ec5b7f6ed4900fa3b..802dd32711a429b06f082528c60dd55a170b2ae0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1807,7 +1807,7 @@ public class CraftWorld implements World { +@@ -1808,7 +1808,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/0143-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch index 9cbb7bc520..7eaa9bf50e 100644 --- a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9c9dc07a3b6dbfc5c4e0abc9a094de7230c34452..d710082d0aefa0d4a3dccbf5839969bc4d056e7b 100644 +index 28ade7187d6fd61adbfe65a1944426168b131c4c..878a9de29c728a0b49fb8ee15be85516176795bd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -91,6 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -215,7 +215,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant capturedTileEntities = new HashMap<>(); public List captureDrops; public long ticksPerAnimalSpawns; -@@ -327,7 +327,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -329,7 +329,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -39,7 +39,7 @@ index e095444d026c277c69a5d533c7b1f537ac84121e..94219fe1e01c6e48123544f4cc14fad1 if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, blockposition, i); this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); -@@ -347,7 +347,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -349,7 +349,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(blockposition)) { @@ -48,7 +48,7 @@ index e095444d026c277c69a5d533c7b1f537ac84121e..94219fe1e01c6e48123544f4cc14fad1 this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); captured = true; } -@@ -605,7 +605,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -607,7 +607,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public IBlockData getType(BlockPosition blockposition) { // CraftBukkit start - tree generation if (captureTreeGeneration) { diff --git a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch index 3ac0269414..5890668a62 100644 --- a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch @@ -72,10 +72,10 @@ index b2eac041c3ff7d8a7c4524dac381ab95045f28af..fa5c640239451579fba35ad7b0979739 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d9464d759c6df200a9bceeee028baa15dd2b86b3..f51a59f5c1a0c8e34921fbf79c86f999c9951ee6 100644 +index 4786a8eaca956435f2f76ee9d5fb9e66658c24a1..3c22cf8fb454acaff282d8cd6c636f918de76e9e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1765,7 +1765,7 @@ public final class CraftServer implements Server { +@@ -1784,7 +1784,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch index e07c6528c5..c4bc9d0189 100644 --- a/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch @@ -47,10 +47,10 @@ index efd4d2844c4ad638837a1fd971927758908e7db1..45cd44335427a818a580158d57025289 entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch); return entity1; diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 50be743513145bd2c8b9c65af219f60099cbb09f..4b1a5e92cc05df06edd6d2d7eab5ca70b70ede79 100644 +index e08de74543535072e63ecfc9bd3ada95c9dbfeb7..137fa3e51390e95f5939f2251e0d170accbfb469 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -180,7 +180,12 @@ public final class SpawnerCreature { +@@ -185,7 +185,12 @@ public final class SpawnerCreature { j1 = biomebase_biomemeta.d + worldserver.random.nextInt(1 + biomebase_biomemeta.e - biomebase_biomemeta.d); } @@ -64,7 +64,7 @@ index 50be743513145bd2c8b9c65af219f60099cbb09f..4b1a5e92cc05df06edd6d2d7eab5ca70 EntityInsentient entityinsentient = a(worldserver, biomebase_biomemeta.c); if (entityinsentient == null) { -@@ -234,8 +239,24 @@ public final class SpawnerCreature { +@@ -239,8 +244,24 @@ public final class SpawnerCreature { } } diff --git a/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch index 7b693c305a..1056998835 100644 --- a/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 12aaacc19006f99ccd59f98b55dbab8b4134c654..790d7df8691537a976086b5507db4f97054706de 100644 +index 62ca208a95434ca1d8970b01f7291647e0b1f93f..30d04825b8a65e0af66f3591ee6baaa433893b54 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -190,7 +190,7 @@ index 12aaacc19006f99ccd59f98b55dbab8b4134c654..790d7df8691537a976086b5507db4f97 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1121,7 +1124,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { this.T = i; this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount())); diff --git a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch index 3777a5b872..17486f5157 100644 --- a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0205-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 f51a59f5c1a0c8e34921fbf79c86f999c9951ee6..98475ce12d6b370b69466f1869d8be07d5130806 100644 +index 3c22cf8fb454acaff282d8cd6c636f918de76e9e..ce3d5e9fd1853ab9519da93ce297ca0bceb9acf8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1466,6 +1466,26 @@ public final class CraftServer implements Server { +@@ -1480,6 +1480,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch index 39200dad29..92e6e6d47f 100644 --- a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -43,10 +43,10 @@ index 022b05be76768cf0fb702ac5f9fa48c5e474391c..0c677b8e1b1a103c7d727dba19fff1f7 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 7c4514ad1969f7f79bb474606df0f2c3c5888b1a..81546c69e375ffdd46634a5826fd0d016e9e9218 100644 +index 802dd32711a429b06f082528c60dd55a170b2ae0..03dbef19dce5626fb7810d62a996471921c1c207 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2295,11 +2295,17 @@ public class CraftWorld implements World { +@@ -2320,11 +2320,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/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 4a3a2eaec3..503f23e28f 100644 --- a/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0220-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 81546c69e375ffdd46634a5826fd0d016e9e9218..2aea66553dceadc504abcf5701f8c82b24d1bda7 100644 +index 03dbef19dce5626fb7810d62a996471921c1c207..f2748cdccfc11936118d4c2e03425286ca25e82f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1489,6 +1489,10 @@ public class CraftWorld implements World { +@@ -1490,6 +1490,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/0233-Expand-Explosions-API.patch b/Spigot-Server-Patches/0233-Expand-Explosions-API.patch index 40adbd62bd..3ce512455a 100644 --- a/Spigot-Server-Patches/0233-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0233-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 2aea66553dceadc504abcf5701f8c82b24d1bda7..648af70dcb89908c0d9bf259f208861ceee884ca 100644 +index f2748cdccfc11936118d4c2e03425286ca25e82f..89c8d3e6e6b7e1b1ac52aa2921e4dbf398ecb15a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -881,6 +881,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/0237-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0237-Implement-World.getEntity-UUID-API.patch index 8f874ea40f..ebc742694e 100644 --- a/Spigot-Server-Patches/0237-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0237-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 648af70dcb89908c0d9bf259f208861ceee884ca..66c89831796db1bbdd6c83cba786b27ef339ec9b 100644 +index 89c8d3e6e6b7e1b1ac52aa2921e4dbf398ecb15a..5510281bef051280fb9495f21cade571d7547042 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1295,6 +1295,15 @@ public class CraftWorld implements World { +@@ -1296,6 +1296,15 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 82bb93105b..79d3ed4320 100644 --- a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -19,10 +19,10 @@ index 387e0dcb9f01ad947daaa19211331a96742ce004..eaaa51e4bf761f41fd516402ce1ad0f9 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2437b73f70594e6745a1a071e23ef1626aeddfef..ba725d77e49e4e60a951fd8bb65b8422a46d0b71 100644 +index 5540fc6eee8115400774b7a792b9d3b45eb01e34..2e19fbddb6ede4abf02c79b4e72d11f89db05433 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -840,6 +840,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -842,6 +842,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // Paper end } } diff --git a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch index afd2d5c6f4..60335073d2 100644 --- a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch @@ -42,7 +42,7 @@ index 5ac7957016d1ca6bc78ced0bcf3767d358677f45..ca92579304d060e2b718aab6f3e3f006 if (!this.noclip) { diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java -index cdf80e50de0840002f62f4c1df4fbcc4e13675d7..f85d80d7bb3e4e92bb8d281dfe577f663ebe9da1 100644 +index cdf80e50de0840002f62f4c1df4fbcc4e13675d7..ea5f5845a8d202e62da3ae1bfb1e4dbd7f5e185e 100644 --- a/src/main/java/net/minecraft/server/IProjectile.java +++ b/src/main/java/net/minecraft/server/IProjectile.java @@ -129,8 +129,14 @@ public abstract class IProjectile extends Entity { @@ -51,7 +51,7 @@ index cdf80e50de0840002f62f4c1df4fbcc4e13675d7..f85d80d7bb3e4e92bb8d281dfe577f66 Entity entity1 = this.getShooter(); - + // Paper start - Cancel hit for vanished players -+ if (entity1 instanceof EntityPlayer) { ++ if (entity1 instanceof EntityPlayer && entity instanceof EntityPlayer) { + org.bukkit.entity.Player collided = (org.bukkit.entity.Player) entity.getBukkitEntity(); + org.bukkit.entity.Player shooter = (org.bukkit.entity.Player) entity1.getBukkitEntity(); + if (!shooter.canSee(collided)) return false; @@ -108,10 +108,10 @@ index 86f6f082fe2991ea9065b09c9680b76ca1cf7154..b6e2a3d8d0cf510f497c6f974356fafa if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c(new IllegalArgumentException()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ba725d77e49e4e60a951fd8bb65b8422a46d0b71..753b9f61a2f7a1851e18748500d745906e3adee8 100644 +index 2e19fbddb6ede4abf02c79b4e72d11f89db05433..ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -170,6 +170,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -172,6 +172,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } diff --git a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch index b55cf6a49f..c6c9c812ba 100644 --- a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -83,10 +83,10 @@ index 972a2fc6febc43156b8aa0917b881c6c604ec2c1..afba8d654bd227ad60ec502de8834c45 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 66c89831796db1bbdd6c83cba786b27ef339ec9b..411d7a3f7d4d54fbf748888e24f2032c4d091250 100644 +index 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17cd847efc0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1031,6 +1031,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 66c89831796db1bbdd6c83cba786b27ef339ec9b..411d7a3f7d4d54fbf748888e24f2032c Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1050,6 +1051,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 66c89831796db1bbdd6c83cba786b27ef339ec9b..411d7a3f7d4d54fbf748888e24f2032c Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1076,6 +1078,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 66c89831796db1bbdd6c83cba786b27ef339ec9b..411d7a3f7d4d54fbf748888e24f2032c Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { -@@ -1099,6 +1102,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/0265-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch index 0a95da6266..668c1e7123 100644 --- a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch @@ -64,10 +64,10 @@ index aada95b9d02d8ca0b870ec08875b5b719a543212..d68ee8d5dc5f8a75dc465f155acccb79 ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index aaa68008aacf2e528e6c2dc7e0307ee7dc35da12..7b7785f79ed176967d4c91c2d77c6f6ce73b30b8 100644 +index ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af..cc4421aa61d7d87c164c1f88ad8b5fa0df7176f1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -210,6 +210,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -212,6 +212,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } // Paper end diff --git a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch index ae4b0dfde2..ae46ccf04c 100644 --- a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,10 +36,10 @@ index 2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9..1b21911c3e4fd1d4a3305176bb8477c3 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d122fefe0d3b785a5aad6ceceba221279439fe7b..f33624e65a56bd7cf4432eecdd6834fa3f32cda5 100644 +index 30d04825b8a65e0af66f3591ee6baaa433893b54..3a7e2d1b2a11edbf430333bb8f4788c073dcf18e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -900,6 +900,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index fb7e4e2f02b62f7cfeec6a619a4c2943cc071c46..199103ab72b0666b23f78961dd7435c3ff210339 100644 +index 52c3740d03a0dda9abfcf99785f5b8269c166c83..e488edef15a0dcb78cc3d8d53ecd93ba60e0d401 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -340,6 +340,29 @@ public class CraftWorld implements World { +@@ -341,6 +341,29 @@ public class CraftWorld implements World { return getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING); } diff --git a/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch index 52c1bdd29c..1a67d68e43 100644 --- a/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch @@ -40,10 +40,10 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 64c48af6dcdb6e8121d55a015fdeed63ef3f5ec3..da57b00affb56766ebe25774323d49fed3374af0 100644 +index 06b4eafd8337dc8fe2da0de72e501cba7aca0785..8ffef87f77d137622e656c3ffd5a0ecb6cd4ab68 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1999,6 +1999,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2003,6 +2003,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } diff --git a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 80ce8cf281..7a81706b8b 100644 --- a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled synchronously when the server gets shut down. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 060d64c207dc353d6103080f6756ac9501a4ed04..21d014f1cae27c769471caad7f9e28f727213e07 100644 +index cc493d5d8b621bb69aedc5d2c5121d9199074575..19680baafcc8a5a18ec3f58da694372117c7e969 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2065,7 +2065,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; + public boolean serverAutoSave = false; // Paper - public File bukkitDataPackFolder; public CommandDispatcher vanillaCommandDispatcher; private boolean forceTicks; -@@ -1144,14 +1145,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper -@@ -1037,14 +1044,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1039,14 +1046,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public boolean p(BlockPosition blockposition) { @@ -55,7 +55,7 @@ index 350178efcbacea6261df98d694c49dde8fa57d97..37a06b96b9d5c98b23e5da7352f549f4 return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity, enumdirection); } -@@ -1165,7 +1172,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1167,7 +1174,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { diff --git a/Spigot-Server-Patches/0380-Reduce-sync-loads.patch b/Spigot-Server-Patches/0380-Reduce-sync-loads.patch index 3e6485f9a0..e0b0f912d4 100644 --- a/Spigot-Server-Patches/0380-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0380-Reduce-sync-loads.patch @@ -298,10 +298,10 @@ index edd901bb53385fa3d189a0057d57f98bf8b7115c..707db4febac59a4d09d6420ea2add469 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 37a06b96b9d5c98b23e5da7352f549f4a959abbd..b2852df57368294c8965fbc50a496a8f465304ae 100644 +index 2278835e15449c72d1bbbf0a2694c386554242e3..dd3dd03200ad8f0219d6673abfe8fc87341a0fe6 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1105,7 +1105,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1107,7 +1107,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 37a06b96b9d5c98b23e5da7352f549f4a959abbd..b2852df57368294c8965fbc50a496a8f if (chunk != null) { chunk.a(entity, axisalignedbb, list, predicate); -@@ -1126,7 +1126,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1128,7 +1128,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 37a06b96b9d5c98b23e5da7352f549f4a959abbd..b2852df57368294c8965fbc50a496a8f if (chunk != null) { chunk.a(entitytypes, axisalignedbb, list, predicate); -@@ -1149,7 +1149,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1151,7 +1151,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { diff --git a/Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index 0069c641dd..67ed4f398b 100644 --- a/Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,10 +7,10 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3a9e872922de10b597cc898ba76f3fbfd46e41bb..8b7dcb88e04fbad29538e8d2945020fca02b4143 100644 +index 7c1fb8786db9df10530f78d0fa2a1391d4d7308d..7ed6cdb1eff72ef056fb7495c8f2812717e96ad9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -513,11 +513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper @@ -481,10 +481,10 @@ index 5ebba482a65cfe6079484a99f016f968c59df8ee..d017904561d093bf8f0061f646a75aa5 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b2852df57368294c8965fbc50a496a8f465304ae..41302dc5a2f30987dab448d2715f9eeea8174dfc 100644 +index dd3dd03200ad8f0219d6673abfe8fc87341a0fe6..4317c901419d13ed6f5737543399d4e340e30bc4 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1137,8 +1137,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1139,8 +1139,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return list; } diff --git a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch index 18d6ec6a24..a7cbbff0bc 100644 --- a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch @@ -318,12 +318,12 @@ index 50487dbf0ac162d7608b67b4fb50fa7f8bfba69d..04b28555b1bb68536e40bb6526136787 return this.c; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 41302dc5a2f30987dab448d2715f9eeea8174dfc..6d3b851f65858f6d768aa64c0bef71e18c45f0a2 100644 +index 4317c901419d13ed6f5737543399d4e340e30bc4..97840c0a673402f258e172873fd6756bc23f298b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -81,6 +81,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - public long ticksPerMonsterSpawns; +@@ -82,6 +82,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public long ticksPerWaterSpawns; + public long ticksPerWaterAmbientSpawns; public long ticksPerAmbientSpawns; + // Paper start + public int wakeupInactiveRemainingAnimals; diff --git a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 36d290d292..0e9f068a2e 100644 --- a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -65,10 +65,10 @@ index 707db4febac59a4d09d6420ea2add469cf54c2ec..a5325aef96117d569e95ff4a15650d6a } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6d3b851f65858f6d768aa64c0bef71e18c45f0a2..ce55c4729024ce9e226d9dd14f7c3ea4bde7ca34 100644 +index 97840c0a673402f258e172873fd6756bc23f298b..73e0bf2d0851d2e10cd5b45a4bb90eba104bdc3d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -319,6 +319,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -321,6 +321,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @Override public Chunk getChunkAt(int i, int j) { diff --git a/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch index 94fadc2a2e..4a31249890 100644 --- a/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch @@ -243,10 +243,10 @@ index 00827c335e9413e986d7f07d0adbcef0d106a553..c66a8011dde4932e03ea91194ea92a72 // TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ce55c4729024ce9e226d9dd14f7c3ea4bde7ca34..e52ec352fb98cd030d7c13362d0bf950c60c6372 100644 +index 73e0bf2d0851d2e10cd5b45a4bb90eba104bdc3d..93df6a29035bb3cc96409b145a2e1433d38bbe99 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1464,10 +1464,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1466,10 +1466,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public abstract TagRegistry p(); public BlockPosition a(int i, int j, int k, int l) { diff --git a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index c741550e38..8d21720384 100644 --- a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -243,7 +243,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f 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 84c6dfcd87d9d893e846c08c9d14e01fbfb15fb2..e044534d3cb47cf1228c5e5fa8920df8264fd0b5 100644 +index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435d26202f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -73,6 +73,7 @@ import net.minecraft.server.GameRules; @@ -254,7 +254,7 @@ index 84c6dfcd87d9d893e846c08c9d14e01fbfb15fb2..e044534d3cb47cf1228c5e5fa8920df8 import net.minecraft.server.MinecraftKey; import net.minecraft.server.MinecraftServer; import net.minecraft.server.MovingObjectPosition; -@@ -292,6 +293,7 @@ public class CraftWorld implements World { +@@ -293,6 +294,7 @@ public class CraftWorld implements World { return ret; } public int getTileEntityCount() { @@ -262,7 +262,7 @@ index 84c6dfcd87d9d893e846c08c9d14e01fbfb15fb2..e044534d3cb47cf1228c5e5fa8920df8 // We don't use the full world tile entity list, so we must iterate chunks Long2ObjectLinkedOpenHashMap chunks = world.getChunkProvider().playerChunkMap.visibleChunks; int size = 0; -@@ -303,11 +305,13 @@ public class CraftWorld implements World { +@@ -304,11 +306,13 @@ public class CraftWorld implements World { size += chunk.tileEntities.size(); } return size; @@ -276,7 +276,7 @@ index 84c6dfcd87d9d893e846c08c9d14e01fbfb15fb2..e044534d3cb47cf1228c5e5fa8920df8 int ret = 0; for (PlayerChunk chunkHolder : world.getChunkProvider().playerChunkMap.visibleChunks.values()) { -@@ -316,7 +320,7 @@ public class CraftWorld implements World { +@@ -317,7 +321,7 @@ public class CraftWorld implements World { } } @@ -285,7 +285,7 @@ index 84c6dfcd87d9d893e846c08c9d14e01fbfb15fb2..e044534d3cb47cf1228c5e5fa8920df8 } public int getPlayerCount() { return world.players.size(); -@@ -436,6 +440,14 @@ public class CraftWorld implements World { +@@ -437,6 +441,14 @@ public class CraftWorld implements World { @Override public Chunk[] getLoadedChunks() { diff --git a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch index a88ccf7cda..2066ee0df1 100644 --- a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch @@ -28,10 +28,10 @@ index 69b3faf28d019fca90734c4d0944ead8fd97ab87..21940f2034744ea417a43fcebc92b212 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3681bc9657b2ecbd27bb45153b4e608d077f36dc..962061aa4de1cad05acac4fe09ecedbb81c55d9b 100644 +index aecc0fee6924922f1599a99a643c1d2437e22fc6..29104c3a2f5231c8870208327facca2d33bfc9c3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -663,7 +663,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { @@ -187,7 +187,7 @@ index 962061aa4de1cad05acac4fe09ecedbb81c55d9b..9e68d293ab8d67e9450a6633beccfba8 return !this.canOversleep(); }); isOversleep = false;MinecraftTimings.serverOversleep.stopTiming(); -@@ -1205,13 +1224,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant S a(Function function) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new Thread(() -> { -@@ -738,6 +740,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant list = this.tracker.getPassengers(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3e42cd6ec6ecfc04a6e2e9c96459e1a88e504e39..084f36bb29a3fa28dbac1fa6f50849e5722ab9fe 100644 +index 57f7dfc6a5316cfec5cce9c60e7b91d94c505f50..735beaf6fa6e6ccf2137b64a0b5179ada2907011 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1527,6 +1527,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 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 745633509d3f948d46529d5439ec14cd01a05563..5ae74d0856f7fb4a7ee35e5d778d78fecaf99730 100644 +index 8a37871bea36bd34b514428acea1acad2ba5897e..b973bd8f60412232df53ac52d97135de6a6f083b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2486,6 +2486,10 @@ public class CraftWorld implements World { +@@ -2511,6 +2511,10 @@ public class CraftWorld implements World { return future; } @@ -1231,7 +1231,7 @@ index 745633509d3f948d46529d5439ec14cd01a05563..5ae74d0856f7fb4a7ee35e5d778d78fe net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0321b54f3defc983f1ebe47bf2888cbba39d102c..1b84d4f26da310c94510fa4c0da9a68ec8c6b71c 100644 +index f553647b4351b2684f522b40b1e533511efc8ae9..784be20585913ee11fca2c83f169268bf1eb1f20 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index 7a51bfb672..bad1994720 100644 --- a/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0507-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 7c1e50e57cdb62364369455ca21b41456e8a010f..94005471723187cba438670a7e52363959ad4d02 100644 +index d7b56da8a910026006dc08306e92a11e407659ce..a62ca5f24c0a49af6b42c473cbaced86cfe39d3c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -342,7 +342,7 @@ public final class CraftServer implements Server { +@@ -344,7 +344,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,8 +34,8 @@ index 7c1e50e57cdb62364369455ca21b41456e8a010f..94005471723187cba438670a7e523639 minimumAPI = configuration.getString("settings.minimum-api"); loadIcon(); } -@@ -819,7 +819,7 @@ public final class CraftServer implements Server { - waterAnimalSpawn = configuration.getInt("spawn-limits.water-animals"); +@@ -827,7 +827,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")); - TicketType.PLUGIN.loadPeriod = configuration.getInt("chunk-gc.period-in-ticks"); @@ -44,10 +44,10 @@ index 7c1e50e57cdb62364369455ca21b41456e8a010f..94005471723187cba438670a7e523639 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 5ae74d0856f7fb4a7ee35e5d778d78fecaf99730..7096886c20e870061587860a663a184b21650246 100644 +index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed552ba8bd8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -400,9 +400,22 @@ public class CraftWorld implements World { +@@ -401,9 +401,22 @@ public class CraftWorld implements World { @Override public Chunk getChunkAt(int x, int z) { @@ -71,7 +71,7 @@ index 5ae74d0856f7fb4a7ee35e5d778d78fecaf99730..7096886c20e870061587860a663a184b @Override public Chunk getChunkAt(Block block) { Preconditions.checkArgument(block != null, "null block"); -@@ -476,7 +489,7 @@ public class CraftWorld implements World { +@@ -477,7 +490,7 @@ public class CraftWorld implements World { public boolean unloadChunkRequest(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot if (isChunkLoaded(x, z)) { @@ -80,7 +80,7 @@ index 5ae74d0856f7fb4a7ee35e5d778d78fecaf99730..7096886c20e870061587860a663a184b } return true; -@@ -553,10 +566,12 @@ public class CraftWorld implements World { +@@ -554,10 +567,12 @@ public class CraftWorld implements World { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot // Paper start - Optimize this method ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z); @@ -94,7 +94,7 @@ index 5ae74d0856f7fb4a7ee35e5d778d78fecaf99730..7096886c20e870061587860a663a184b if (immediate == null) { immediate = world.getChunkProvider().playerChunkMap.getUnloadingChunk(x, z); } -@@ -564,7 +579,7 @@ public class CraftWorld implements World { +@@ -565,7 +580,7 @@ public class CraftWorld implements World { if (!(immediate instanceof ProtoChunkExtension) && !(immediate instanceof net.minecraft.server.Chunk)) { return false; // not full status } @@ -103,7 +103,7 @@ index 5ae74d0856f7fb4a7ee35e5d778d78fecaf99730..7096886c20e870061587860a663a184b world.getChunkAt(x, z); // make sure we're at ticket level 32 or lower return true; } -@@ -591,7 +606,7 @@ public class CraftWorld implements World { +@@ -592,7 +607,7 @@ public class CraftWorld implements World { // we do this so we do not re-read the chunk data on disk } @@ -112,7 +112,7 @@ index 5ae74d0856f7fb4a7ee35e5d778d78fecaf99730..7096886c20e870061587860a663a184b world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -2492,6 +2507,7 @@ public class CraftWorld implements World { +@@ -2517,6 +2532,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/0518-FIX-DIS-SHIT.patch b/Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch new file mode 100644 index 0000000000..1cdc3195cb --- /dev/null +++ b/Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch @@ -0,0 +1,64 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MiniDigger +Date: Fri, 26 Jun 2020 16:51:44 +0200 +Subject: [PATCH] FIX DIS SHIT + + +diff --git a/src/main/java/net/minecraft/server/SensorHoglinSpecific.java b/src/main/java/net/minecraft/server/SensorHoglinSpecific.java +index 40900c51dfdc20b2ce1516f78efd14f61643291a..f5d12bf371bf196d69c8a6569c64015a1d75b042 100644 +--- a/src/main/java/net/minecraft/server/SensorHoglinSpecific.java ++++ b/src/main/java/net/minecraft/server/SensorHoglinSpecific.java +@@ -19,7 +19,7 @@ public class SensorHoglinSpecific extends Sensor { + protected void a(WorldServer worldserver, EntityHoglin entityhoglin) { + BehaviorController behaviorcontroller = entityhoglin.getBehaviorController(); + +- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, this.b(worldserver, entityhoglin)); ++ // behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, this.bb(worldserver, entityhoglin)); // Paper - fix dis shit (for now) + rename + Optional optional = Optional.empty(); + int i = 0; + List list = Lists.newArrayList(); +@@ -42,12 +42,12 @@ public class SensorHoglinSpecific extends Sensor { + } + + behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, optional); +- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, (Object) list); +- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, (Object) i); +- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, (Object) list.size()); ++ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, list); // Paper - decomp fix ++ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, i); // Paper - decomp fix ++ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, list.size()); // Paper - decomp fix + } + +- private Optional b(WorldServer worldserver, EntityHoglin entityhoglin) { ++ private Optional bb(WorldServer worldserver, EntityHoglin entityhoglin) { // Paper - rename + return BlockPosition.a(entityhoglin.getChunkCoordinates(), 8, 4, (blockposition) -> { + return worldserver.getType(blockposition).a((Tag) TagsBlock.HOGLIN_REPELLENTS); + }); +diff --git a/src/main/java/net/minecraft/server/SensorPiglinSpecific.java b/src/main/java/net/minecraft/server/SensorPiglinSpecific.java +index 2b11bc960a004714a9d725575d2470588d5801fb..4cc50f38e901f5dde4576a91cf4d6797fb45631a 100644 +--- a/src/main/java/net/minecraft/server/SensorPiglinSpecific.java ++++ b/src/main/java/net/minecraft/server/SensorPiglinSpecific.java +@@ -21,7 +21,7 @@ public class SensorPiglinSpecific extends Sensor { + protected void a(WorldServer worldserver, EntityLiving entityliving) { + BehaviorController behaviorcontroller = entityliving.getBehaviorController(); + +- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, c(worldserver, entityliving)); ++// behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, c(worldserver, entityliving)); // Paper - fix dis shit (for now) + Optional optional = Optional.empty(); + Optional optional1 = Optional.empty(); + Optional optional2 = Optional.empty(); +@@ -92,10 +92,10 @@ public class SensorPiglinSpecific extends Sensor { + behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, optional4); + behaviorcontroller.setMemory(MemoryModuleType.NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD, optional5); + behaviorcontroller.setMemory(MemoryModuleType.NEAREST_PLAYER_HOLDING_WANTED_ITEM, optional6); +- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_ADULT_PIGLINS, (Object) list1); +- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, (Object) list); +- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, (Object) list.size()); +- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, (Object) i); ++ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_ADULT_PIGLINS, list1); // Paper - decomp fix ++ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, list); // Paper - decomp fix ++ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, list.size()); // Paper - decomp fix ++ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, i); // Paper - decomp fix + } + + private static Optional c(WorldServer worldserver, EntityLiving entityliving) { diff --git a/work/Bukkit b/work/Bukkit index 8edeffe67d..edc7a378c9 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 8edeffe67d1821afd48d16cd0ec2572251f24ee8 +Subproject commit edc7a378c9258ef533f90de135e250ca91b1ae02 diff --git a/work/CraftBukkit b/work/CraftBukkit index d1fb662ec5..4ff609e60c 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit d1fb662ec53c4fd8bc718039b76a3e9a11346371 +Subproject commit 4ff609e60c191f107682681b5e3a8262f8a4c844 diff --git a/work/Spigot b/work/Spigot index 8fc58f10ab..16d78990fe 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 8fc58f10ab171ca1979afa2065909214a0ffab32 +Subproject commit 16d78990fe27633e0ec129216f96d3b50f770025 From 387571da58d80594d86119413c7a249c3a870830 Mon Sep 17 00:00:00 2001 From: Nassim Date: Fri, 26 Jun 2020 21:34:52 +0200 Subject: [PATCH 16/95] Some fixes (#3630) * Fix block action sending * Fix chest property check --- SHIT_TO_CHECK.md | 2 +- Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch | 4 ++-- ...Optimize-sending-packets-to-nearby-locations-sounds-.patch | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SHIT_TO_CHECK.md b/SHIT_TO_CHECK.md index 9c54b6de4c..d6eeb9a774 100644 --- a/SHIT_TO_CHECK.md +++ b/SHIT_TO_CHECK.md @@ -5,4 +5,4 @@ * Make sure the flat bedrock setting doesn't do anything stupid * Check DataBits foreach * lighting is bork (load chunk, fly away, come back, everything or parts are black) -* block actions (particles/sounds) are bork (no chest opening, no bell, no noteblock) +* chunk generation seems slow with a lot of it happening \ No newline at end of file diff --git a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch index 131e4e0ffb..0b53216477 100644 --- a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch @@ -42,7 +42,7 @@ index 1441d096d44ea653539ba20ccda94eb62ffc32df..b9d0d2d42850c3a5d093429cd0d02ac4 protected static final VoxelShape f = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 16.0D); protected static final VoxelShape g = Block.a(0.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..832fe1d41d69f44e4de1a6f4d037d3e104cac7af 100644 +index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..a016d97be93c4218136f803cc9a7f986d70309d2 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -107,7 +107,7 @@ index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..832fe1d41d69f44e4de1a6f4d037d3e1 } private void a(SoundEffect soundeffect) { -+ if (!this.getBlock().get(BlockChest.waterlogged())) { return; } // Paper - this can be delayed, double check exists - Fixes GH-2074 ++ if (!this.getBlock().b(BlockChest.c)) { return; } // Paper - this can be delayed, double check exists - Fixes GH-2074 BlockPropertyChestType blockpropertychesttype = (BlockPropertyChestType) this.getBlock().get(BlockChest.c); if (blockpropertychesttype != BlockPropertyChestType.LEFT) { diff --git a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch index 2050876f0c..496951e4ac 100644 --- a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,7 +11,7 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 84707b373bcd9c4eb302b149f242435edfc91f2e..9f4d9ee0100bca5f62f6a3778257e4da97ca2d28 100644 +index 84707b373bcd9c4eb302b149f242435edfc91f2e..bbc5e21c0dd6e790493fc2d4d3b0df4c114712e5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1062,16 +1062,40 @@ public abstract class PlayerList { @@ -57,7 +57,7 @@ index 84707b373bcd9c4eb302b149f242435edfc91f2e..9f4d9ee0100bca5f62f6a3778257e4da // CraftBukkit end - if (entityplayer != entityhuman && entityplayer.world.getDimensionKey() == resourcekey) { -+ if (entityplayer != entityhuman && entityplayer.world.getDimensionKey() == resourcekey && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) { // Paper ++ if (entityplayer != entityhuman && entityplayer.world.getDimensionKey() == resourcekey && (!(entityhuman instanceof EntityPlayer) || entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity()))) { // Paper double d4 = d0 - entityplayer.locX(); double d5 = d1 - entityplayer.locY(); double d6 = d2 - entityplayer.locZ(); From 4c1712f8683d8aecaa1563b319a09351e759ec10 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 14:11:08 -0700 Subject: [PATCH 17/95] Fix packed data reading in anti-xray --- .../0519-fixup-Anti-Xray.patch | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Spigot-Server-Patches/0519-fixup-Anti-Xray.patch diff --git a/Spigot-Server-Patches/0519-fixup-Anti-Xray.patch b/Spigot-Server-Patches/0519-fixup-Anti-Xray.patch new file mode 100644 index 0000000000..5b46ee8dae --- /dev/null +++ b/Spigot-Server-Patches/0519-fixup-Anti-Xray.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Fri, 26 Jun 2020 14:10:10 -0700 +Subject: [PATCH] fixup! Anti-Xray + + +diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java +index c5a7b186e96901d55680283500f423025ededbe8..8b8c2a0156fd936ea422b64ca6372fa6bd31be32 100644 +--- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java ++++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java +@@ -42,13 +42,9 @@ public final class DataBitsReader { + bitInLongIndex += bitsPerObject; + + if (bitInLongIndex > 63) { +- bitInLongIndex -= 64; ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); +- +- if (bitInLongIndex > 0) { +- value |= current << bitsPerObject - bitInLongIndex & mask; +- } + } + + return value; +diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java +index 2eff19f6aaa31245f80910c6fbb541e32c672a31..5260882a319d5f897dd20e149d17077cb3f843ea 100644 +--- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java ++++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java +@@ -60,14 +60,9 @@ public final class DataBitsWriter { + + if (bitInLongIndex > 63) { + finish(); +- bitInLongIndex -= 64; ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); +- +- if (bitInLongIndex > 0) { +- current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex; +- dirty = true; +- } + } + } + +@@ -76,7 +71,7 @@ public final class DataBitsWriter { + + if (bitInLongIndex > 63) { + finish(); +- bitInLongIndex -= 64; ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); + } From 37df424eda968701c20cb138e30d897f626b354a Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 14:31:38 -0700 Subject: [PATCH 18/95] Fix the entity knockback by entity patch --- ...plement-EntityKnockbackByEntityEvent.patch | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch diff --git a/Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch new file mode 100644 index 0000000000..64c61e00a5 --- /dev/null +++ b/Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch @@ -0,0 +1,93 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Fri, 26 Jun 2020 14:28:49 -0700 +Subject: [PATCH] fixup! Implement EntityKnockbackByEntityEvent + + +diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java +index 3fa9e7b52b24629c96436fdd46d4e8c28c35f00e..2cada09ced1660526e9c112c2c8d92bbf9d6ea98 100644 +--- a/src/main/java/net/minecraft/server/EntityHuman.java ++++ b/src/main/java/net/minecraft/server/EntityHuman.java +@@ -1094,9 +1094,7 @@ public abstract class EntityHuman extends EntityLiving { + if (flag5) { + if (i > 0) { + if (entity instanceof EntityLiving) { +- ((EntityLiving) entity).knockingBackEntity = this; // Paper +- ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); +- ((EntityLiving) entity).knockingBackEntity = null; // Paper ++ ((EntityLiving) entity).doKnockback((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); // Paper + } else { + entity.h((double) (-MathHelper.sin(this.yaw * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 0.017453292F) * (float) i * 0.5F)); + } +@@ -1120,9 +1118,7 @@ public abstract class EntityHuman extends EntityLiving { + if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) { + // CraftBukkit start - Only apply knockback if the damage hits + if (entityliving.damageEntity(DamageSource.playerAttack(this).sweep(), f4)) { +- ((EntityLiving) entity).knockingBackEntity = this; // Paper +- entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); +- ((EntityLiving) entity).knockingBackEntity = null; // Paper ++ entityliving.doKnockback(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); + } + // CraftBukkit end + } +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java +index 61323f9b15350b1d227b2f3de67c40846ba7c2f9..677f88a44a92509d932f9bb7b1258a6ccecde256 100644 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java ++++ b/src/main/java/net/minecraft/server/EntityInsentient.java +@@ -1493,9 +1493,7 @@ public abstract class EntityInsentient extends EntityLiving { + + if (flag) { + if (f1 > 0.0F && entity instanceof EntityLiving) { +- ((EntityLiving) entity).knockingBackEntity = this; // Paper +- ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); +- ((EntityLiving) entity).knockingBackEntity = null; // Paper ++ ((EntityLiving) entity).doKnockback(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); + this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D)); + } + +diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java +index 14606a12c472e0e58f76023a53a4129536ac5cc4..7a2140e4b901027997b2884275b35b43fe2175bc 100644 +--- a/src/main/java/net/minecraft/server/EntityLiving.java ++++ b/src/main/java/net/minecraft/server/EntityLiving.java +@@ -1240,9 +1240,7 @@ public abstract class EntityLiving extends Entity { + } + + this.aw = (float) (MathHelper.d(d1, d0) * 57.2957763671875D - (double) this.yaw); +- this.knockingBackEntity = entity1 instanceof EntityLiving ? ((EntityLiving) entity1) : null; // Paper +- this.a(0.4F, d0, d1); +- this.knockingBackEntity = null; // Paper ++ this.doKnockback(0.4F, d0, d1, entity1); // Paper + } else { + this.aw = (float) ((int) (Math.random() * 2.0D) * 180); + } +@@ -1294,9 +1292,7 @@ public abstract class EntityLiving extends Entity { + } + + protected void f(EntityLiving entityliving) { +- ((EntityLiving) entityliving).knockingBackEntity = this; // Paper +- entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ()); +- ((EntityLiving) entityliving).knockingBackEntity = null; // Paper ++ entityliving.doKnockback(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ(), this); + } + + private boolean f(DamageSource damagesource) { +@@ -1559,6 +1555,11 @@ public abstract class EntityLiving extends Entity { + } + + public void a(float f, double d0, double d1) { ++ // Paper start - add knockbacking entity parameter ++ this.doKnockback(f, d0, d1, null); ++ } ++ public void doKnockback(float f, double d0, double d1, Entity knockingBackEntity) { ++ // Paper end - add knockbacking entity parameter + f = (float) ((double) f * (1.0D - this.b(GenericAttributes.KNOCKBACK_RESISTANCE))); + if (f > 0.0F) { + this.impulse = true; +@@ -1578,7 +1579,6 @@ public abstract class EntityLiving extends Entity { + // Paper end + } + } +- EntityLiving knockingBackEntity; // Paper + + @Nullable + protected SoundEffect getSoundHurt(DamageSource damagesource) { From 368fc7c8c0029b09fa6179218a06528cbe95fd0b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 14:33:49 -0700 Subject: [PATCH 19/95] Pass predicate from default get hard colliding entities method --- ...plement-EntityKnockbackByEntityEvent.patch | 58 ++++++------ ...e-attack-cooldown-methods-for-Player.patch | 4 +- .../0287-Improve-death-events.patch | 14 +-- .../0302-Add-sun-related-API.patch | 4 +- Spigot-Server-Patches/0372-Anti-Xray.patch | 23 ++--- ...imise-entity-hard-collision-checking.patch | 4 +- .../0519-fixup-Anti-Xray.patch | 54 ----------- ...plement-EntityKnockbackByEntityEvent.patch | 93 ------------------- 8 files changed, 51 insertions(+), 203 deletions(-) delete mode 100644 Spigot-Server-Patches/0519-fixup-Anti-Xray.patch delete mode 100644 Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch diff --git a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch index 057f304cd2..1d7c7cf31d 100644 --- a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch @@ -6,68 +6,75 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..d94874b02ddcb640c9d94c99d83e77b2e55dce73 100644 +index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..08141147f9795546e9397abed95834ed5e69a126 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1085,7 +1085,9 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1085,7 +1085,7 @@ public abstract class EntityHuman extends EntityLiving { if (flag5) { if (i > 0) { if (entity instanceof EntityLiving) { -+ ((EntityLiving) entity).knockingBackEntity = this; // Paper - ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -+ ((EntityLiving) entity).knockingBackEntity = null; // Paper +- ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ ((EntityLiving) entity).doKnockback((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); // Paper } else { entity.h((double) (-MathHelper.sin(this.yaw * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 0.017453292F) * (float) i * 0.5F)); } -@@ -1109,7 +1111,9 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1109,7 +1109,7 @@ public abstract class EntityHuman extends EntityLiving { if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits if (entityliving.damageEntity(DamageSource.playerAttack(this).sweep(), f4)) { -+ ((EntityLiving) entity).knockingBackEntity = this; // Paper - entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -+ ((EntityLiving) entity).knockingBackEntity = null; // Paper +- entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ entityliving.doKnockback(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); } // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 3997dc6d979bf5a027861397b948aa4e8486fc58..57521337ea5ad4b944cf7303d2b3f9b34431116a 100644 +index 3997dc6d979bf5a027861397b948aa4e8486fc58..75dca66206ecab6bcea32a05e33a638316786692 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1479,7 +1479,9 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1479,7 +1479,7 @@ public abstract class EntityInsentient extends EntityLiving { if (flag) { if (f1 > 0.0F && entity instanceof EntityLiving) { -+ ((EntityLiving) entity).knockingBackEntity = this; // Paper - ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -+ ((EntityLiving) entity).knockingBackEntity = null; // Paper +- ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ ((EntityLiving) entity).doKnockback(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D)); } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92dece2982e 100644 +index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..a62f769ab509edd30717cfca785449acecdf295e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1239,7 +1239,9 @@ public abstract class EntityLiving extends Entity { +@@ -1239,7 +1239,7 @@ public abstract class EntityLiving extends Entity { } this.aw = (float) (MathHelper.d(d1, d0) * 57.2957763671875D - (double) this.yaw); -+ this.knockingBackEntity = entity1 instanceof EntityLiving ? ((EntityLiving) entity1) : null; // Paper - this.a(0.4F, d0, d1); -+ this.knockingBackEntity = null; // Paper +- this.a(0.4F, d0, d1); ++ this.doKnockback(0.4F, d0, d1, entity1); // Paper } else { this.aw = (float) ((int) (Math.random() * 2.0D) * 180); } -@@ -1287,7 +1289,9 @@ public abstract class EntityLiving extends Entity { +@@ -1287,7 +1287,7 @@ public abstract class EntityLiving extends Entity { } protected void f(EntityLiving entityliving) { -+ ((EntityLiving) entityliving).knockingBackEntity = this; // Paper - entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ()); -+ ((EntityLiving) entityliving).knockingBackEntity = null; // Paper +- entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ()); ++ entityliving.doKnockback(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ(), this); } private boolean f(DamageSource damagesource) { -@@ -1531,8 +1535,19 @@ public abstract class EntityLiving extends Entity { +@@ -1524,6 +1524,11 @@ public abstract class EntityLiving extends Entity { + } + + public void a(float f, double d0, double d1) { ++ // Paper start - add knockbacking entity parameter ++ this.doKnockback(f, d0, d1, null); ++ } ++ public void doKnockback(float f, double d0, double d1, Entity knockingBackEntity) { ++ // Paper end - add knockbacking entity parameter + f = (float) ((double) f * (1.0D - this.b(GenericAttributes.KNOCKBACK_RESISTANCE))); + if (f > 0.0F) { + this.impulse = true; +@@ -1531,6 +1536,16 @@ public abstract class EntityLiving extends Entity { Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f); this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z); @@ -83,7 +90,4 @@ index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92d + // Paper end } } -+ EntityLiving knockingBackEntity; // Paper - @Nullable - protected SoundEffect getSoundHurt(DamageSource damagesource) { diff --git a/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch index d64f12e381..936f79eab8 100644 --- a/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1249a7ae8fa8d6ea33cbc276717f1e4553f73b85..af554396fdb25719c158a81ccab76e91f5df2ff5 100644 +index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d87f2d3f2 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -2010,14 +2010,17 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2006,14 +2006,17 @@ public abstract class EntityHuman extends EntityLiving { this.datawatcher.set(EntityHuman.bs, nbttagcompound); } diff --git a/Spigot-Server-Patches/0287-Improve-death-events.patch b/Spigot-Server-Patches/0287-Improve-death-events.patch index 5814fe2bea..db3b1c1ba2 100644 --- a/Spigot-Server-Patches/0287-Improve-death-events.patch +++ b/Spigot-Server-Patches/0287-Improve-death-events.patch @@ -119,7 +119,7 @@ index c2a3bd8f25e91f79723074d93f6a646a8ce76d8c..4934e71225fe1242615660a379e797e2 public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db0956a52f31 100644 +index 4b249a644c680a7cc64b0d31cf453f94ff2b6a0c..d6a98bb7fc107649c179cded2d37c06a41146a89 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -95,7 +95,7 @@ public abstract class EntityLiving extends Entity { @@ -139,7 +139,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 @Override public float getBukkitYaw() { -@@ -1250,13 +1251,17 @@ public abstract class EntityLiving extends Entity { +@@ -1248,13 +1249,17 @@ public abstract class EntityLiving extends Entity { if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback if (this.dk()) { if (!this.f(damagesource)) { @@ -161,7 +161,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 } } else if (flag1) { this.c(damagesource); -@@ -1396,6 +1401,7 @@ public abstract class EntityLiving extends Entity { +@@ -1392,6 +1397,7 @@ public abstract class EntityLiving extends Entity { Entity entity = damagesource.getEntity(); EntityLiving entityliving = this.getKillingEntity(); @@ -169,7 +169,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 if (this.aV >= 0 && entityliving != null) { entityliving.a(this, this.aV, damagesource); } -@@ -1407,16 +1413,36 @@ public abstract class EntityLiving extends Entity { +@@ -1403,16 +1409,36 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.entityWakeup(); } @@ -208,7 +208,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 } } -@@ -1424,7 +1450,7 @@ public abstract class EntityLiving extends Entity { +@@ -1420,7 +1446,7 @@ public abstract class EntityLiving extends Entity { if (!this.world.isClientSide) { boolean flag = false; @@ -217,7 +217,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { BlockPosition blockposition = this.getChunkCoordinates(); IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); -@@ -1445,7 +1471,8 @@ public abstract class EntityLiving extends Entity { +@@ -1441,7 +1467,8 @@ public abstract class EntityLiving extends Entity { } } @@ -227,7 +227,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 Entity entity = damagesource.getEntity(); int i; -@@ -1458,22 +1485,26 @@ public abstract class EntityLiving extends Entity { +@@ -1454,22 +1481,26 @@ public abstract class EntityLiving extends Entity { boolean flag = this.lastDamageByPlayerTime > 0; this.dropInventory(); // CraftBukkit - from below diff --git a/Spigot-Server-Patches/0302-Add-sun-related-API.patch b/Spigot-Server-Patches/0302-Add-sun-related-API.patch index 6e95ba1203..a4e0a0c7c7 100644 --- a/Spigot-Server-Patches/0302-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0302-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 1b824bd3757b7e6723254c9cb2badaafbd2de2de..7c9b437d950623a978ca3d45c8ca57b39a897179 100644 +index 7a49e69bcc805330adbae7ec886f666e2b7e8310..4b196b031c382aa665520b46ebc146f6f6e830e4 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1511,6 +1511,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1509,6 +1509,7 @@ public abstract class EntityInsentient extends EntityLiving { } diff --git a/Spigot-Server-Patches/0372-Anti-Xray.patch b/Spigot-Server-Patches/0372-Anti-Xray.patch index 35e3bced8e..57a2ee2216 100644 --- a/Spigot-Server-Patches/0372-Anti-Xray.patch +++ b/Spigot-Server-Patches/0372-Anti-Xray.patch @@ -847,10 +847,10 @@ index 0000000000000000000000000000000000000000..e61421d87a19bf2f6ce8836b48c445ff +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java new file mode 100644 -index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f423025ededbe8 +index 0000000000000000000000000000000000000000..8b8c2a0156fd936ea422b64ca6372fa6bd31be32 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java -@@ -0,0 +1,56 @@ +@@ -0,0 +1,52 @@ +package com.destroystokyo.paper.antixray; + +public final class DataBitsReader { @@ -895,13 +895,9 @@ index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f42302 + bitInLongIndex += bitsPerObject; + + if (bitInLongIndex > 63) { -+ bitInLongIndex -= 64; ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); -+ -+ if (bitInLongIndex > 0) { -+ value |= current << bitsPerObject - bitInLongIndex & mask; -+ } + } + + return value; @@ -909,10 +905,10 @@ index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f42302 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java new file mode 100644 -index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e32c672a31 +index 0000000000000000000000000000000000000000..5260882a319d5f897dd20e149d17077cb3f843ea --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java -@@ -0,0 +1,84 @@ +@@ -0,0 +1,79 @@ +package com.destroystokyo.paper.antixray; + +public final class DataBitsWriter { @@ -975,14 +971,9 @@ index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e3 + + if (bitInLongIndex > 63) { + finish(); -+ bitInLongIndex -= 64; ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); -+ -+ if (bitInLongIndex > 0) { -+ current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex; -+ dirty = true; -+ } + } + } + @@ -991,7 +982,7 @@ index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e3 + + if (bitInLongIndex > 63) { + finish(); -+ bitInLongIndex -= 64; ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); + } diff --git a/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch index ce1921df3a..9e7fa6941c 100644 --- a/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch +++ b/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch @@ -145,7 +145,7 @@ index 96f898acdeae1917a4aaf99ec4a48bccf3904488..73e9859e675902d9fc5942547966b524 return this.children; } diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java -index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..24705eef5514bfb078bea6f87e5457e73cee2d5e 100644 +index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..267a6baae89c181eed545e6758fac7115eb3882f 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java +++ b/src/main/java/net/minecraft/server/IEntityAccess.java @@ -53,24 +53,36 @@ public interface IEntityAccess { @@ -157,7 +157,7 @@ index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..24705eef5514bfb078bea6f87e5457e7 + * Not guaranteed to only return hard colliding entites + */ + default List getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate) { -+ return this.getEntities(entity, axisalignedbb); ++ return this.getEntities(entity, axisalignedbb, predicate); + } + // Paper end - optimise hard collision + diff --git a/Spigot-Server-Patches/0519-fixup-Anti-Xray.patch b/Spigot-Server-Patches/0519-fixup-Anti-Xray.patch deleted file mode 100644 index 5b46ee8dae..0000000000 --- a/Spigot-Server-Patches/0519-fixup-Anti-Xray.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Fri, 26 Jun 2020 14:10:10 -0700 -Subject: [PATCH] fixup! Anti-Xray - - -diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java -index c5a7b186e96901d55680283500f423025ededbe8..8b8c2a0156fd936ea422b64ca6372fa6bd31be32 100644 ---- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java -+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java -@@ -42,13 +42,9 @@ public final class DataBitsReader { - bitInLongIndex += bitsPerObject; - - if (bitInLongIndex > 63) { -- bitInLongIndex -= 64; -+ bitInLongIndex = 0; - longInDataBitsIndex += 8; - init(); -- -- if (bitInLongIndex > 0) { -- value |= current << bitsPerObject - bitInLongIndex & mask; -- } - } - - return value; -diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java -index 2eff19f6aaa31245f80910c6fbb541e32c672a31..5260882a319d5f897dd20e149d17077cb3f843ea 100644 ---- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java -+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java -@@ -60,14 +60,9 @@ public final class DataBitsWriter { - - if (bitInLongIndex > 63) { - finish(); -- bitInLongIndex -= 64; -+ bitInLongIndex = 0; - longInDataBitsIndex += 8; - init(); -- -- if (bitInLongIndex > 0) { -- current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex; -- dirty = true; -- } - } - } - -@@ -76,7 +71,7 @@ public final class DataBitsWriter { - - if (bitInLongIndex > 63) { - finish(); -- bitInLongIndex -= 64; -+ bitInLongIndex = 0; - longInDataBitsIndex += 8; - init(); - } diff --git a/Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch deleted file mode 100644 index 64c61e00a5..0000000000 --- a/Spigot-Server-Patches/0520-fixup-Implement-EntityKnockbackByEntityEvent.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Fri, 26 Jun 2020 14:28:49 -0700 -Subject: [PATCH] fixup! Implement EntityKnockbackByEntityEvent - - -diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 3fa9e7b52b24629c96436fdd46d4e8c28c35f00e..2cada09ced1660526e9c112c2c8d92bbf9d6ea98 100644 ---- a/src/main/java/net/minecraft/server/EntityHuman.java -+++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1094,9 +1094,7 @@ public abstract class EntityHuman extends EntityLiving { - if (flag5) { - if (i > 0) { - if (entity instanceof EntityLiving) { -- ((EntityLiving) entity).knockingBackEntity = this; // Paper -- ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -- ((EntityLiving) entity).knockingBackEntity = null; // Paper -+ ((EntityLiving) entity).doKnockback((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); // Paper - } else { - entity.h((double) (-MathHelper.sin(this.yaw * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 0.017453292F) * (float) i * 0.5F)); - } -@@ -1120,9 +1118,7 @@ public abstract class EntityHuman extends EntityLiving { - if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) { - // CraftBukkit start - Only apply knockback if the damage hits - if (entityliving.damageEntity(DamageSource.playerAttack(this).sweep(), f4)) { -- ((EntityLiving) entity).knockingBackEntity = this; // Paper -- entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -- ((EntityLiving) entity).knockingBackEntity = null; // Paper -+ entityliving.doKnockback(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); - } - // CraftBukkit end - } -diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 61323f9b15350b1d227b2f3de67c40846ba7c2f9..677f88a44a92509d932f9bb7b1258a6ccecde256 100644 ---- a/src/main/java/net/minecraft/server/EntityInsentient.java -+++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1493,9 +1493,7 @@ public abstract class EntityInsentient extends EntityLiving { - - if (flag) { - if (f1 > 0.0F && entity instanceof EntityLiving) { -- ((EntityLiving) entity).knockingBackEntity = this; // Paper -- ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -- ((EntityLiving) entity).knockingBackEntity = null; // Paper -+ ((EntityLiving) entity).doKnockback(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); - this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D)); - } - -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 14606a12c472e0e58f76023a53a4129536ac5cc4..7a2140e4b901027997b2884275b35b43fe2175bc 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1240,9 +1240,7 @@ public abstract class EntityLiving extends Entity { - } - - this.aw = (float) (MathHelper.d(d1, d0) * 57.2957763671875D - (double) this.yaw); -- this.knockingBackEntity = entity1 instanceof EntityLiving ? ((EntityLiving) entity1) : null; // Paper -- this.a(0.4F, d0, d1); -- this.knockingBackEntity = null; // Paper -+ this.doKnockback(0.4F, d0, d1, entity1); // Paper - } else { - this.aw = (float) ((int) (Math.random() * 2.0D) * 180); - } -@@ -1294,9 +1292,7 @@ public abstract class EntityLiving extends Entity { - } - - protected void f(EntityLiving entityliving) { -- ((EntityLiving) entityliving).knockingBackEntity = this; // Paper -- entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ()); -- ((EntityLiving) entityliving).knockingBackEntity = null; // Paper -+ entityliving.doKnockback(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ(), this); - } - - private boolean f(DamageSource damagesource) { -@@ -1559,6 +1555,11 @@ public abstract class EntityLiving extends Entity { - } - - public void a(float f, double d0, double d1) { -+ // Paper start - add knockbacking entity parameter -+ this.doKnockback(f, d0, d1, null); -+ } -+ public void doKnockback(float f, double d0, double d1, Entity knockingBackEntity) { -+ // Paper end - add knockbacking entity parameter - f = (float) ((double) f * (1.0D - this.b(GenericAttributes.KNOCKBACK_RESISTANCE))); - if (f > 0.0F) { - this.impulse = true; -@@ -1578,7 +1579,6 @@ public abstract class EntityLiving extends Entity { - // Paper end - } - } -- EntityLiving knockingBackEntity; // Paper - - @Nullable - protected SoundEffect getSoundHurt(DamageSource damagesource) { From 4fd1bd8aeecb7cb300f6f086b125b060016ad8fe Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 14:36:48 -0700 Subject: [PATCH 20/95] Fix the piston duplication option when it is on --- .../0510-Fix-piston-physics-inconsistency-MC-188840.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch index ab41639c15..33fa3d9944 100644 --- a/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch @@ -46,7 +46,7 @@ index 06adb1fa670e7d755560abae67d46447d63370f0..3b0f3127bcee8e9290b4640bcd4ec0d1 + } } diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index 6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b..0fb6debc0cd5f522614f32f3df1b5f37a415a0f5 100644 +index 6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b..c3133814f1349b2f70b12967b1b5abc88f71f98c 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java @@ -368,12 +368,24 @@ public class BlockPiston extends BlockDirectional { @@ -63,12 +63,13 @@ index 6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b..0fb6debc0cd5f522614f32f3df1b5f37 blockposition3 = blockposition3.shift(enumdirection1); map.remove(blockposition3); world.setTypeAndData(blockposition3, (IBlockData) Blocks.MOVING_PISTON.getBlockData().set(BlockPiston.FACING, enumdirection), 68); +- world.setTileEntity(blockposition3, BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false)); + // Paper start - fix a variety of piston desync dupes + if (!allowDesync) { + iblockdata1 = world.getType(oldPos); + map.replace(oldPos, iblockdata1); + } - world.setTileEntity(blockposition3, BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false)); ++ world.setTileEntity(blockposition3, BlockPistonMoving.a(allowDesync ? list1.get(k) : iblockdata1, enumdirection, flag, false)); + if (!allowDesync) { + world.setTypeAndData(oldPos, Blocks.AIR.getBlockData(), 2 | 4 | 16 | 1024); // set air to prevent later physics updates from seeing this block + } From 028bff252f0005b45869b69e4d870f84ab9058bf Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 15:54:39 -0700 Subject: [PATCH 21/95] fix recursion for leashing an abstract horse --- .../0063-Undead-horse-leashing.patch | 17 +++++++---------- ...Implement-EntityKnockbackByEntityEvent.patch | 4 ++-- .../0302-Add-sun-related-API.patch | 4 ++-- .../0324-Add-more-Zombie-API.patch | 4 ++-- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch b/Spigot-Server-Patches/0063-Undead-horse-leashing.patch index 6ee9eccf47..b9bb06206b 100644 --- a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/0063-Undead-horse-leashing.patch @@ -20,7 +20,7 @@ index 04430aae52205ee167662004e45c145b9d2e8bed..dd21221534542d0265fa7d2178ab69c2 + } } diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d396405fac 100644 +index 364697e0155012c300219ad94a3995809e6c2f8f..d45d025fa74a5ff53f0828f51639e19613e30186 100644 --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java @@ -106,6 +106,13 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven @@ -29,7 +29,7 @@ index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d3 + // Paper start + @Override -+ public boolean canLeash(EntityHuman entityhuman) { ++ public boolean a(EntityHuman entityhuman) { + return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper + } + // Paper end @@ -38,18 +38,15 @@ index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d3 protected void t(float f) { if (f > 6.0F && this.fa()) { diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9715f10c790c0210435622ab9997ac40f98da185..f2cd6824790d7e76f8f10e2630bcd5ebbf2a4238 100644 +index 9715f10c790c0210435622ab9997ac40f98da185..2f85d9799d67d3fb1d340179d8dbd03771467329 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1283,6 +1283,11 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1282,7 +1282,7 @@ public abstract class EntityInsentient extends EntityLiving { + } - public boolean a(EntityHuman entityhuman) { -+ // Paper start - allow overriding -+ return this.canLeash(entityhuman); -+ } -+ public boolean canLeash(EntityHuman entityhuman) { -+ // Paper end - allow overriding +- public boolean a(EntityHuman entityhuman) { ++ public boolean a(EntityHuman entityhuman) { // Paper - overriden in EntityHorseAbstract return !this.isLeashed() && !(this instanceof IMonster); } diff --git a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch index 1d7c7cf31d..f95ced4cfa 100644 --- a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch @@ -28,10 +28,10 @@ index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..08141147f9795546e9397abed95834ed // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 3997dc6d979bf5a027861397b948aa4e8486fc58..75dca66206ecab6bcea32a05e33a638316786692 100644 +index e434e23bf5b22a623ed7b915711bdb31b7e90b61..424157dcf536527e80faf5428f18f7e66d4216b6 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1479,7 +1479,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1474,7 +1474,7 @@ public abstract class EntityInsentient extends EntityLiving { if (flag) { if (f1 > 0.0F && entity instanceof EntityLiving) { diff --git a/Spigot-Server-Patches/0302-Add-sun-related-API.patch b/Spigot-Server-Patches/0302-Add-sun-related-API.patch index a4e0a0c7c7..f2a4068ec2 100644 --- a/Spigot-Server-Patches/0302-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0302-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 7a49e69bcc805330adbae7ec886f666e2b7e8310..4b196b031c382aa665520b46ebc146f6f6e830e4 100644 +index c23e634dca6aab051b432a5fee2756afa80fb776..5a61167999f7d2fc271659762de9f4e861564542 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1509,6 +1509,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1504,6 +1504,7 @@ public abstract class EntityInsentient extends EntityLiving { } diff --git a/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch index 56e5ab6168..27cb3458af 100644 --- a/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 7c9b437d950623a978ca3d45c8ca57b39a897179..dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34 100644 +index 5a61167999f7d2fc271659762de9f4e861564542..513c987a56e8d2bda0bda8771285c7c8d5ca88e1 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1423,6 +1423,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1418,6 +1418,8 @@ public abstract class EntityInsentient extends EntityLiving { this.datawatcher.set(EntityInsentient.b, flag ? (byte) (b0 | 2) : (byte) (b0 & -3)); } From f6227a0fc9a5879410a1de5c58206fc233581834 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Sat, 27 Jun 2020 04:27:03 +0200 Subject: [PATCH 22/95] Fix Anti-Xray --- Spigot-Server-Patches/0372-Anti-Xray.patch | 44 +++++++++------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/Spigot-Server-Patches/0372-Anti-Xray.patch b/Spigot-Server-Patches/0372-Anti-Xray.patch index 35e3bced8e..0e6bb715a4 100644 --- a/Spigot-Server-Patches/0372-Anti-Xray.patch +++ b/Spigot-Server-Patches/0372-Anti-Xray.patch @@ -847,10 +847,10 @@ index 0000000000000000000000000000000000000000..e61421d87a19bf2f6ce8836b48c445ff +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java new file mode 100644 -index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f423025ededbe8 +index 0000000000000000000000000000000000000000..298ea423084dbcc1b61f991bcd82b8ae51bf0977 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java -@@ -0,0 +1,56 @@ +@@ -0,0 +1,51 @@ +package com.destroystokyo.paper.antixray; + +public final class DataBitsReader { @@ -891,28 +891,23 @@ index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f42302 + } + + public int read() { -+ int value = (int) (current >>> bitInLongIndex) & mask; -+ bitInLongIndex += bitsPerObject; -+ -+ if (bitInLongIndex > 63) { -+ bitInLongIndex -= 64; ++ if (bitInLongIndex + bitsPerObject > 64) { ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); -+ -+ if (bitInLongIndex > 0) { -+ value |= current << bitsPerObject - bitInLongIndex & mask; -+ } + } + ++ int value = (int) (current >>> bitInLongIndex) & mask; ++ bitInLongIndex += bitsPerObject; + return value; + } +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java new file mode 100644 -index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e32c672a31 +index 0000000000000000000000000000000000000000..333763936897befda5bb6c077944d2667f922799 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java -@@ -0,0 +1,84 @@ +@@ -0,0 +1,79 @@ +package com.destroystokyo.paper.antixray; + +public final class DataBitsWriter { @@ -969,29 +964,24 @@ index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e3 + } + + public void write(int value) { ++ if (bitInLongIndex + bitsPerObject > 64) { ++ finish(); ++ bitInLongIndex = 0; ++ longInDataBitsIndex += 8; ++ init(); ++ } ++ + current = current & ~(mask << bitInLongIndex) | (value & mask) << bitInLongIndex; + dirty = true; + bitInLongIndex += bitsPerObject; -+ -+ if (bitInLongIndex > 63) { -+ finish(); -+ bitInLongIndex -= 64; -+ longInDataBitsIndex += 8; -+ init(); -+ -+ if (bitInLongIndex > 0) { -+ current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex; -+ dirty = true; -+ } -+ } + } + + public void skip() { + bitInLongIndex += bitsPerObject; + -+ if (bitInLongIndex > 63) { ++ if (bitInLongIndex > 64) { + finish(); -+ bitInLongIndex -= 64; ++ bitInLongIndex = bitsPerObject; + longInDataBitsIndex += 8; + init(); + } From bf478c36c74f99c1095e81f57731810d25bd24b9 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 20:05:12 -0700 Subject: [PATCH 23/95] fix async chunk loading disregardling light data --- ...78-Asynchronous-chunk-IO-and-loading.patch | 23 +++++++++--------- .../0411-Tracking-Range-Improvements.patch | 4 ++-- ...-PlayerChunkMap-adds-crashing-server.patch | 4 ++-- ...hunkMap-memory-use-for-visibleChunks.patch | 4 ++-- ...-Chunk-Post-Processing-deadlock-risk.patch | 4 ++-- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 4 ++-- ...tance-map-to-optimise-entity-tracker.patch | 16 ++++++------- ...-isOutsideRange-to-use-distance-maps.patch | 4 ++-- ...No-Tick-view-distance-implementation.patch | 24 +++++++++---------- ...llocation-of-Vec3D-by-entity-tracker.patch | 4 ++-- ...ound-for-Client-Lag-Spikes-MC-162253.patch | 4 ++-- ...k-Priority-Urgency-System-for-Chunks.patch | 6 ++--- ...mprove-Chunk-Status-Transition-Speed.patch | 4 ++-- 13 files changed, 53 insertions(+), 52 deletions(-) diff --git a/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch index 24c69d24a1..77ee8c6d09 100644 --- a/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch @@ -3046,7 +3046,7 @@ index 3e1c1253ad5e2fa68fd8a0bac100c2e7536ea080..b6868b6b23a09e8e0dfe7a5e378dca22 completablefuture = (CompletableFuture) this.statusFutures.get(i); if (completablefuture != null) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f54989422e5281c 100644 +index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..a10006efc52f093196e7d67a3281a87d4c5df19b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -64,7 +64,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -3224,7 +3224,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 this.lightEngine.a(ichunkaccess.getPos()); this.lightEngine.queueUpdate(); this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null); -@@ -573,19 +641,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -573,19 +641,21 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } private CompletableFuture> f(ChunkCoordIntPair chunkcoordintpair) { @@ -3241,6 +3241,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 + if (ioThrowable != null) { + com.destroystokyo.paper.util.SneakyThrow.sneaky(ioThrowable); + } ++ chunkHolder.tasks.forEach(Runnable::run); + // Paper end - if (nbttagcompound != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings @@ -3254,7 +3255,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 protochunk.setLastSaved(this.world.getTime()); this.a(chunkcoordintpair, protochunk.getChunkStatus().getType()); -@@ -609,7 +678,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -609,7 +679,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.g(chunkcoordintpair); return Either.left(new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.world)); // Paper - Anti-Xray - Add parameter @@ -3288,7 +3289,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 } private void g(ChunkCoordIntPair chunkcoordintpair) { -@@ -836,6 +930,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -836,6 +931,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public boolean saveChunk(IChunkAccess ichunkaccess) { @@ -3296,7 +3297,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 this.m.a(ichunkaccess.getPos()); if (!ichunkaccess.isNeedsSaving()) { return false; -@@ -848,6 +943,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -848,6 +944,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkStatus chunkstatus = ichunkaccess.getChunkStatus(); if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { @@ -3304,7 +3305,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 if (this.h(chunkcoordintpair)) { return false; } -@@ -855,12 +951,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -855,12 +952,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (chunkstatus == ChunkStatus.EMPTY && ichunkaccess.h().values().stream().noneMatch(StructureStart::e)) { return false; } @@ -3327,7 +3328,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 this.a(chunkcoordintpair, chunkstatus.getType()); return true; } catch (Exception exception) { -@@ -869,6 +973,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -869,6 +974,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return false; } } @@ -3335,7 +3336,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 } private boolean h(ChunkCoordIntPair chunkcoordintpair) { -@@ -998,6 +1103,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -998,6 +1104,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -3371,7 +3372,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 @Nullable public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); -@@ -1019,33 +1153,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1019,33 +1154,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - chunk status cache "api" public ChunkStatus getChunkStatusOnDiskIfCached(ChunkCoordIntPair chunkPos) { @@ -3438,7 +3439,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 } public IChunkAccess getUnloadingChunk(int chunkX, int chunkZ) { -@@ -1054,6 +1210,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1054,6 +1211,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end @@ -3478,7 +3479,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { // Spigot start return isOutsideOfRange(chunkcoordintpair, false); -@@ -1399,6 +1588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1399,6 +1589,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } diff --git a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch index 04e1d99662..cb8dc9afe4 100644 --- a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch +++ b/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index cdb72b225226083ca45ade798f54989422e5281c..0e9de6f12b56db5eb8759798a686ba6c68172323 100644 +index a10006efc52f093196e7d67a3281a87d4c5df19b..89d3890ab80da90fea2fb6e0a871bae2ff5f5ef1 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1716,6 +1716,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1717,6 +1717,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getEntityType().getChunkRange() * 16; diff --git a/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index 1cc643236e..6a77ce981e 100644 --- a/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding Stack will identify any causer of this and warn instead of crashing. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 0e9de6f12b56db5eb8759798a686ba6c68172323..00de0d10842006f4fe9f64e136d03fd06fef6d1b 100644 +index 89d3890ab80da90fea2fb6e0a871bae2ff5f5ef1..1379c65d0b07544242d5ee32841b208ace43197f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1423,6 +1423,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1424,6 +1424,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { protected void addEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot diff --git a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 8d21720384..a56b084a09 100644 --- a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -83,7 +83,7 @@ index 9615c4d324e42f7f91a7e60b6151c16d20e9c739..a68e4fc411ae84f12b1ca7443fa66f63 List allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9fa3f92b21 100644 +index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b7a9759b4 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -56,8 +56,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -227,7 +227,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f this.updatingChunksModified = false; return true; } -@@ -1061,12 +1143,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1062,12 +1144,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } protected Iterable f() { diff --git a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch index 24ea52cc26..1265cee4b7 100644 --- a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch @@ -37,7 +37,7 @@ index e24f3711017aa5194ef7bf4e8d90f150cfb083ff..7af4c3e2aaf0775640d51f88b3cf821b } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 295c8e7eeb4fc634aaa2ca788e6540a647755f88..26230476a107e3f9c12b9ede628173e900d28f18 100644 +index 517d752f96b595ce26092616cb9087e356c194b7..372b4d9ce7325f3d158f8199d1ec0dd2670f57ce 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -132,6 +132,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -49,7 +49,7 @@ index 295c8e7eeb4fc634aaa2ca788e6540a647755f88..26230476a107e3f9c12b9ede628173e9 // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); -@@ -976,7 +978,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -977,7 +979,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return Either.left(chunk); }); }, (runnable) -> { diff --git a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 1de373fe31..fb57339bb1 100644 --- a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -40,10 +40,10 @@ index 41ec990baa4a2ca149cd6edd16943a9ac27cde91..6f26d468bcb68328a3e0ee7f627dc8f2 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 26230476a107e3f9c12b9ede628173e900d28f18..d0a5335b6315f3c8f8b431f53ad69a53caf9fd63 100644 +index 372b4d9ce7325f3d158f8199d1ec0dd2670f57ce..ccd11698b13e771cd1d90dc73108b055f4e4f53c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1515,6 +1515,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1516,6 +1516,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { .printStackTrace(); return; } diff --git a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch index 8c97ee6ece..d018e82224 100644 --- a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch @@ -56,7 +56,7 @@ index 57f7dfc6a5316cfec5cce9c60e7b91d94c505f50..735beaf6fa6e6ccf2137b64a0b5179ad return i; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd2367073c 100644 +index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fceb9ddacf 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -144,21 +144,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -162,7 +162,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd } private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { -@@ -1412,17 +1485,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1413,17 +1486,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public void movePlayer(EntityPlayer entityplayer) { @@ -181,7 +181,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd int i = MathHelper.floor(entityplayer.locX()) >> 4; int j = MathHelper.floor(entityplayer.locZ()) >> 4; -@@ -1538,7 +1601,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1539,7 +1602,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); @@ -190,7 +190,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd if (entity instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) entity; -@@ -1581,7 +1644,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1582,7 +1645,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = null; // Paper - We're no longer tracked } @@ -228,7 +228,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd List list = Lists.newArrayList(); List list1 = this.world.getPlayers(); -@@ -1649,23 +1742,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1650,23 +1743,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PacketDebug.a(this.world, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -272,7 +272,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd Iterator iterator; Entity entity1; -@@ -1703,7 +1804,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1704,7 +1805,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public class EntityTracker { @@ -281,7 +281,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd private final Entity tracker; private final int trackingDistance; private SectionPosition e; -@@ -1720,6 +1821,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1721,6 +1822,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.e = SectionPosition.a(entity); } @@ -324,7 +324,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd public boolean equals(Object object) { return object instanceof PlayerChunkMap.EntityTracker ? ((PlayerChunkMap.EntityTracker) object).tracker.getId() == this.tracker.getId() : false; } -@@ -1820,7 +1957,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1821,7 +1958,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int j = entity.getEntityType().getChunkRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper diff --git a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch index ebbeb73be7..f7d0899a1a 100644 --- a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -191,7 +191,7 @@ index 9cb2ff09da0b8832e58eed4d70741853a25c9011..7f660d3c528f5fb4150e4ee8b2991343 // Paper start diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f382d0bc9 100644 +index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185cec1eb680 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -158,6 +158,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -302,7 +302,7 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f } if (playerchunk != null) { -@@ -1414,30 +1469,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1415,30 +1470,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return isOutsideOfRange(chunkcoordintpair, false); } diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index 10e726035d..33df15d7aa 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -221,7 +221,7 @@ index 7f660d3c528f5fb4150e4ee8b29913436f125b06..40347212ad1bcf857d5b8ddb0ee6a698 public CompletableFuture> a(ChunkStatus chunkstatus, PlayerChunkMap playerchunkmap) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d275cc71da3 100644 +index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de5757f380 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -95,7 +95,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -354,7 +354,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER -@@ -1120,15 +1206,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1121,15 +1207,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { completablefuture1.thenAcceptAsync((either) -> { either.mapLeft((chunk) -> { this.u.getAndIncrement(); @@ -372,7 +372,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 }); return completablefuture1; } -@@ -1223,32 +1305,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1224,32 +1306,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -426,7 +426,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 protected void sendChunk(EntityPlayer entityplayer, ChunkCoordIntPair chunkcoordintpair, Packet[] apacket, boolean flag, boolean flag1) { if (entityplayer.world == this.world) { -@@ -1256,7 +1344,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1257,7 +1345,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunk playerchunk = this.getVisibleChunk(chunkcoordintpair.pair()); if (playerchunk != null) { @@ -435,7 +435,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 if (chunk != null) { this.a(entityplayer, apacket, chunk); -@@ -1517,6 +1605,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1518,6 +1606,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end - optimise isOutsideOfRange @@ -443,7 +443,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 private boolean b(EntityPlayer entityplayer) { return entityplayer.isSpectator() && !this.world.getGameRules().getBoolean(GameRules.SPECTATORS_GENERATE_CHUNKS); } -@@ -1544,13 +1633,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1545,13 +1634,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.removePlayerFromDistanceMaps(entityplayer); // Paper - distance maps } @@ -458,7 +458,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } -@@ -1558,7 +1641,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1559,7 +1642,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { SectionPosition sectionposition = SectionPosition.a((Entity) entityplayer); entityplayer.a(sectionposition); @@ -467,7 +467,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 return sectionposition; } -@@ -1603,6 +1686,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1604,6 +1687,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int k1; int l1; @@ -475,7 +475,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 if (Math.abs(i1 - i) <= this.viewDistance * 2 && Math.abs(j1 - j) <= this.viewDistance * 2) { k1 = Math.min(i, i1) - this.viewDistance; l1 = Math.min(j, j1) - this.viewDistance; -@@ -1640,7 +1724,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1641,7 +1725,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.sendChunk(entityplayer, chunkcoordintpair1, new Packet[2], false, true); } } @@ -484,7 +484,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 this.updateMaps(entityplayer); // Paper - distance maps -@@ -1648,11 +1732,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1649,11 +1733,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public Stream a(ChunkCoordIntPair chunkcoordintpair, boolean flag) { @@ -535,7 +535,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } protected void addEntity(Entity entity) { -@@ -1810,6 +1929,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1811,6 +1930,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -543,7 +543,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 private void a(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { if (apacket[0] == null) { apacket[0] = new PacketPlayOutMapChunk(chunk, 65535, true); -@@ -1995,7 +2115,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1996,7 +2116,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ); PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair()); diff --git a/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index a66e9b0b8f..f0b118d867 100644 --- a/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -39,10 +39,10 @@ index 0c46297e6ff229538d77b2f481e4ab13ea14c48e..f75c09d44a19f84588f21a55ea8f0dd8 if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.isOnGround()) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index fa0d4b0eda8d722503dd1732bf14e4a5c1e6f948..ece6ae302519ceddab0594d12ec40ec7a9b84209 100644 +index 6fe15ed9440cb34829052aee13b175398b2f4e8a..e272567d8bf064802d2ce434397d0d2c8595bcce 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -2111,9 +2111,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2112,9 +2112,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public void updatePlayer(EntityPlayer entityplayer) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (entityplayer != this.tracker) { diff --git a/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch index 7583d69a1f..c6ccac7cf5 100644 --- a/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch +++ b/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch @@ -37,10 +37,10 @@ index 860dc98ab4f84c470b27726314943936d23fcb79..8d45588ecfa33b8c7335df3db58ed686 return chunksection == Chunk.a || chunksection.c(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ece6ae302519ceddab0594d12ec40ec7a9b84209..7cba79ce0b3718b73fd7fd839732d1a7ef85941e 100644 +index e272567d8bf064802d2ce434397d0d2c8595bcce..dcbc97e5b00ffaf12984cd9b34fb513403822132 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1936,12 +1936,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1937,12 +1937,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 893a3db060..8517bd072b 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -882,7 +882,7 @@ index e5751adde516544722b95016f64b2a46c16e77ce..04dea2c9fd9337631a6289c7242338e1 } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592e862f6d5 100644 +index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2618adf9e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -51,6 +51,7 @@ import org.apache.commons.lang3.mutable.MutableBoolean; @@ -1094,7 +1094,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 list.add(completablefuture); } -@@ -1008,14 +1145,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1009,14 +1146,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; CompletableFuture chunkSaveFuture = this.world.asyncChunkTaskManager.getChunkSaveFuture(chunkcoordintpair.x, chunkcoordintpair.z); @@ -1122,7 +1122,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 return ret; // Paper end } -@@ -1152,7 +1297,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1153,7 +1298,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { long i = playerchunk.i().pair(); playerchunk.getClass(); diff --git a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch index 58a948c24c..92fe8aa19c 100644 --- a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch +++ b/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch @@ -54,7 +54,7 @@ index 04dea2c9fd9337631a6289c7242338e166d6bc1e..446c401b3139f8c6c0e70d883340f014 // Paper start - no-tick view distance public final Chunk getSendingChunk() { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 9419cb575fde265718eafe20bbe8a592e862f6d5..bf60b43bf3cb75b7545193958e5508415fa55986 100644 +index 0f0f6b73b97fc9eef95cf680b85d7ac2618adf9e..77e804086f52527c43499af44d59aebb5b246f61 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -721,7 +721,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -84,7 +84,7 @@ index 9419cb575fde265718eafe20bbe8a592e862f6d5..bf60b43bf3cb75b7545193958e550841 } } -@@ -1205,6 +1205,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1206,6 +1206,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); }); }, (runnable) -> { From 654f3e9d3efd6b2d0c9c1e2d0f4c336d3494a629 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 21:57:36 -0700 Subject: [PATCH 24/95] Re-Add per player mob spawning --- ...ement-optional-per-player-mob-spawns.patch | 26 +++++------ ...event-consuming-the-wrong-itemstack.patch} | 2 +- ...ssanger-entities-once-from-spawners.patch} | 0 ... => 0387-Fix-nether-portal-creation.patch} | 0 ...gs.patch => 0388-Generator-Settings.patch} | 8 ++-- ...-161754.patch => 0389-Fix-MC-161754.patch} | 0 ...e-improvement-for-Chunk.getEntities.patch} | 0 ...anging-entities-that-are-not-ItemFr.patch} | 0 ...92-Expose-the-internal-current-tick.patch} | 0 ...sneak-when-changing-worlds-MC-10657.patch} | 4 +- ...-option-to-disable-pillager-patrols.patch} | 4 +- ...r-when-player-hand-set-to-empty-typ.patch} | 2 +- ...=> 0396-PlayerLaunchProjectileEvent.patch} | 0 ...tMagicNumbers.isSupportedApiVersion.patch} | 0 ...k-loads-when-villagers-try-to-find-.patch} | 0 ...656-Fix-Follow-Range-Initial-Target.patch} | 4 +- ...pers.patch => 0400-Optimize-Hoppers.patch} | 4 +- ...ayerDeathEvent-shouldDropExperience.patch} | 4 +- ...ading-chunks-checking-hive-position.patch} | 0 ...hunks-from-Hoppers-and-other-things.patch} | 0 ...ializing-mismatching-chunk-coordina.patch} | 0 ...imise-IEntityAccess-getPlayerByUUID.patch} | 0 ...406-Fix-items-not-falling-correctly.patch} | 0 ...patch => 0407-Lag-compensate-eating.patch} | 2 +- ...ize-call-to-getFluid-for-explosions.patch} | 0 ...-in-stack-not-having-effects-when-d.patch} | 0 ...=> 0410-Entity-Activation-Range-2.0.patch} | 4 +- ...Add-effect-to-block-break-naturally.patch} | 0 ...=> 0412-Tracking-Range-Improvements.patch} | 4 +- ...-items-vanishing-through-end-portal.patch} | 0 ...et-gravity-in-void.-Fixes-MC-167279.patch} | 0 ...-getChunkAt-calls-for-loaded-chunks.patch} | 2 +- ...w-overriding-the-java-version-check.patch} | 0 ...tch => 0417-Add-ThrownEggHatchEvent.patch} | 0 ... 0418-Optimise-random-block-ticking.patch} | 0 ...p-API.patch => 0419-Entity-Jump-API.patch} | 2 +- ...-to-nerf-pigmen-from-nether-portals.patch} | 4 +- ... => 0421-Make-the-GUI-graph-fancier.patch} | 2 +- ...22-add-hand-to-BlockMultiPlaceEvent.patch} | 0 ...3-Prevent-teleporting-dead-entities.patch} | 0 ...ipwire-hook-placement-before-update.patch} | 0 ...o-allow-iron-golems-to-spawn-in-air.patch} | 2 +- ...chance-of-villager-zombie-infection.patch} | 4 +- ...tch => 0427-Optimise-Chunk-getFluid.patch} | 0 ...mise-TickListServer-by-rewriting-it.patch} | 2 +- ...pawn-settings-and-per-player-option.patch} | 6 +-- ...e-Entity-is-never-double-registered.patch} | 0 ...ring-entities-from-unloading-chunks.patch} | 0 ...nections-shouldn-t-hold-up-shutdown.patch} | 0 ...ow-bees-to-load-chunks-for-beehives.patch} | 0 ...PlayerChunkMap-adds-crashing-server.patch} | 4 +- ...timize-Collision-to-not-load-chunks.patch} | 0 ...tch => 0436-Don-t-tick-dead-players.patch} | 4 +- ...-Player-s-shouldn-t-be-able-to-move.patch} | 2 +- ...unkMap-memory-use-for-visibleChunks.patch} | 18 ++++---- ...h => 0439-Increase-Light-Queue-Size.patch} | 4 +- ...sks-Speed-up-processing-of-chunk-lo.patch} | 8 ++-- ...ove-existing-players-to-world-spawn.patch} | 8 ++-- ...Add-tick-times-API-and-mspt-command.patch} | 0 ...43-Expose-MinecraftServer-isRunning.patch} | 0 ...dd-Raw-Byte-ItemStack-Serialization.patch} | 0 ...5-Remove-streams-from-Mob-AI-System.patch} | 0 ...ons-until-after-entity-ticking-is-d.patch} | 0 ... => 0447-Async-command-map-building.patch} | 0 ...h => 0448-Improved-Watchdog-Support.patch} | 4 +- ....patch => 0449-Optimize-Pathfinding.patch} | 0 ...0-Reduce-Either-Optional-allocation.patch} | 0 ...451-Remove-streams-from-PairedQueue.patch} | 0 ...-memory-footprint-of-NBTTagCompound.patch} | 0 ...ent-opening-inventories-when-frozen.patch} | 8 ++-- ...54-Optimise-ArraySetSorted-removeIf.patch} | 0 ...entity-collision-code-if-not-needed.patch} | 2 +- ...mise-entity-hard-collision-checking.patch} | 0 ...viderServer-s-chunk-level-checking-.patch} | 2 +- ...teleport-command-to-valid-locations.patch} | 0 ...Implement-Player-Client-Options-API.patch} | 6 +-- ...Chunk-Post-Processing-deadlock-risk.patch} | 10 ++--- ...ayer-is-attempted-to-be-removed-fro.patch} | 0 ...2-Broadcast-join-message-to-console.patch} | 0 ...-Broken-behavior-of-PlayerJoinEvent.patch} | 8 ++-- ...oad-Chunks-for-Login-Asynchronously.patch} | 6 +-- ...awn-point-if-spawn-in-unloaded-worl.patch} | 0 ...layerAttackEntityCooldownResetEvent.patch} | 2 +- ...llbacks-to-schedule-for-Callback-Ex.patch} | 4 +- ...-fire-BlockFade-on-worldgen-threads.patch} | 0 ...tom-creative-and-insomniac-controls.patch} | 4 +- ...-duplication-issues-and-teleport-is.patch} | 0 ...0471-Implement-Brigadier-Mojang-API.patch} | 0 ...patch => 0472-Villager-Restocks-API.patch} | 0 ...ickItem-Packet-and-kick-for-invalid.patch} | 0 ...n.patch => 0474-Expose-game-version.patch} | 0 ...0475-Sync-position-on-teleportation.patch} | 0 ...> 0476-Optimize-Voxel-Shape-Merging.patch} | 0 ...per-thread-native-byte-buffer-cache.patch} | 0 ...atch => 0478-Implement-Mob-Goal-API.patch} | 0 ...ance-map-to-optimise-entity-tracker.patch} | 24 +++++----- ...isOutsideRange-to-use-distance-maps.patch} | 33 ++++++++------ ...e-operations-for-updating-light-dat.patch} | 0 ...o-Tick-view-distance-implementation.patch} | 44 +++++++++---------- ...=> 0483-Add-villager-reputation-API.patch} | 0 ...and.patch => 0484-Fix-Light-Command.patch} | 4 +- ...-Fix-PotionEffect-ignores-icon-flag.patch} | 0 ...brigadier-child-sorting-performance.patch} | 0 ...ock-unless-actually-showing-the-mes.patch} | 0 ...API.patch => 0488-Potential-bed-API.patch} | 0 ...ait-for-Async-Tasks-during-shutdown.patch} | 0 ...er-respects-game-and-entity-rules-f.patch} | 0 ...nd-End-Portal-Frames-from-being-des.patch} | 0 ...e-NibbleArray-to-use-pooled-buffers.patch} | 0 ...leInt-allocations-from-light-engine.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 4 +- ...> 0495-Ensure-safe-gateway-teleport.patch} | 0 ...-for-console-having-all-permissions.patch} | 0 ...und-for-Client-Lag-Spikes-MC-162253.patch} | 4 +- ...-Priority-Urgency-System-for-Chunks.patch} | 36 +++++++-------- ...n-Full-Status-Chunk-NBT-Memory-Leak.patch} | 0 ...packets-to-nearby-locations-sounds-.patch} | 0 ...prove-Chunk-Status-Transition-Speed.patch} | 10 ++--- ...x-villager-trading-demand-MC-163962.patch} | 0 ... => 0503-Maps-shouldn-t-load-chunks.patch} | 0 ...okup-for-Treasure-Maps-Fixes-lag-fr.patch} | 0 ...Optimize-Bit-Operations-by-inlining.patch} | 0 ...patch => 0506-Optimize-Light-Engine.patch} | 8 ++-- ...nk-Unloads-based-on-Player-Movement.patch} | 4 +- ...Plugin-Tickets-to-API-Chunk-Methods.patch} | 0 ...sing-chunks-due-to-integer-overflow.patch} | 0 ...r-runTaskTimerAsynchronously-Plugin.patch} | 0 ...ton-physics-inconsistency-MC-188840.patch} | 0 ...uping.patch => 0512-Fix-sand-duping.patch} | 0 ...desync-in-playerconnection-causing-.patch} | 0 ...ch => 0514-Fix-enderdragon-exp-dupe.patch} | 0 ...older-method-without-block-snapshot.patch} | 0 ...h => 0516-Expose-Arrow-getItemStack.patch} | 0 ...mplement-PlayerRecipeBookClickEvent.patch} | 0 ... => 0518-Add-PrepareGrindstoneEvent.patch} | 0 ...DIS-SHIT.patch => 0519-FIX-DIS-SHIT.patch} | 0 136 files changed, 185 insertions(+), 182 deletions(-) rename {removed/1.16 => Spigot-Server-Patches}/0384-implement-optional-per-player-mob-spawns.patch (97%) rename Spigot-Server-Patches/{0384-Prevent-consuming-the-wrong-itemstack.patch => 0385-Prevent-consuming-the-wrong-itemstack.patch} (96%) rename Spigot-Server-Patches/{0385-only-add-passanger-entities-once-from-spawners.patch => 0386-only-add-passanger-entities-once-from-spawners.patch} (100%) rename Spigot-Server-Patches/{0386-Fix-nether-portal-creation.patch => 0387-Fix-nether-portal-creation.patch} (100%) rename Spigot-Server-Patches/{0387-Generator-Settings.patch => 0388-Generator-Settings.patch} (94%) rename Spigot-Server-Patches/{0388-Fix-MC-161754.patch => 0389-Fix-MC-161754.patch} (100%) rename Spigot-Server-Patches/{0389-Performance-improvement-for-Chunk.getEntities.patch => 0390-Performance-improvement-for-Chunk.getEntities.patch} (100%) rename Spigot-Server-Patches/{0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch => 0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch} (100%) rename Spigot-Server-Patches/{0391-Expose-the-internal-current-tick.patch => 0392-Expose-the-internal-current-tick.patch} (100%) rename Spigot-Server-Patches/{0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch => 0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch} (90%) rename Spigot-Server-Patches/{0393-Add-option-to-disable-pillager-patrols.patch => 0394-Add-option-to-disable-pillager-patrols.patch} (91%) rename Spigot-Server-Patches/{0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch => 0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch} (95%) rename Spigot-Server-Patches/{0395-PlayerLaunchProjectileEvent.patch => 0396-PlayerLaunchProjectileEvent.patch} (100%) rename Spigot-Server-Patches/{0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch => 0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch} (100%) rename Spigot-Server-Patches/{0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch => 0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch} (100%) rename Spigot-Server-Patches/{0398-MC-145656-Fix-Follow-Range-Initial-Target.patch => 0399-MC-145656-Fix-Follow-Range-Initial-Target.patch} (95%) rename Spigot-Server-Patches/{0399-Optimize-Hoppers.patch => 0400-Optimize-Hoppers.patch} (99%) rename Spigot-Server-Patches/{0400-PlayerDeathEvent-shouldDropExperience.patch => 0401-PlayerDeathEvent-shouldDropExperience.patch} (84%) rename Spigot-Server-Patches/{0401-Prevent-bees-loading-chunks-checking-hive-position.patch => 0402-Prevent-bees-loading-chunks-checking-hive-position.patch} (100%) rename Spigot-Server-Patches/{0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => 0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (100%) rename Spigot-Server-Patches/{0403-Guard-against-serializing-mismatching-chunk-coordina.patch => 0404-Guard-against-serializing-mismatching-chunk-coordina.patch} (100%) rename Spigot-Server-Patches/{0404-Optimise-IEntityAccess-getPlayerByUUID.patch => 0405-Optimise-IEntityAccess-getPlayerByUUID.patch} (100%) rename Spigot-Server-Patches/{0405-Fix-items-not-falling-correctly.patch => 0406-Fix-items-not-falling-correctly.patch} (100%) rename Spigot-Server-Patches/{0406-Lag-compensate-eating.patch => 0407-Lag-compensate-eating.patch} (97%) rename Spigot-Server-Patches/{0407-Optimize-call-to-getFluid-for-explosions.patch => 0408-Optimize-call-to-getFluid-for-explosions.patch} (100%) rename Spigot-Server-Patches/{0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch => 0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch} (100%) rename Spigot-Server-Patches/{0409-Entity-Activation-Range-2.0.patch => 0410-Entity-Activation-Range-2.0.patch} (99%) rename Spigot-Server-Patches/{0410-Add-effect-to-block-break-naturally.patch => 0411-Add-effect-to-block-break-naturally.patch} (100%) rename Spigot-Server-Patches/{0411-Tracking-Range-Improvements.patch => 0412-Tracking-Range-Improvements.patch} (95%) rename Spigot-Server-Patches/{0412-Fix-items-vanishing-through-end-portal.patch => 0413-Fix-items-vanishing-through-end-portal.patch} (100%) rename Spigot-Server-Patches/{0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => 0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (100%) rename Spigot-Server-Patches/{0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch => 0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (97%) rename Spigot-Server-Patches/{0415-Allow-overriding-the-java-version-check.patch => 0416-Allow-overriding-the-java-version-check.patch} (100%) rename Spigot-Server-Patches/{0416-Add-ThrownEggHatchEvent.patch => 0417-Add-ThrownEggHatchEvent.patch} (100%) rename Spigot-Server-Patches/{0417-Optimise-random-block-ticking.patch => 0418-Optimise-random-block-ticking.patch} (100%) rename Spigot-Server-Patches/{0418-Entity-Jump-API.patch => 0419-Entity-Jump-API.patch} (96%) rename Spigot-Server-Patches/{0419-Add-option-to-nerf-pigmen-from-nether-portals.patch => 0420-Add-option-to-nerf-pigmen-from-nether-portals.patch} (95%) rename Spigot-Server-Patches/{0420-Make-the-GUI-graph-fancier.patch => 0421-Make-the-GUI-graph-fancier.patch} (99%) rename Spigot-Server-Patches/{0421-add-hand-to-BlockMultiPlaceEvent.patch => 0422-add-hand-to-BlockMultiPlaceEvent.patch} (100%) rename Spigot-Server-Patches/{0422-Prevent-teleporting-dead-entities.patch => 0423-Prevent-teleporting-dead-entities.patch} (100%) rename Spigot-Server-Patches/{0423-Validate-tripwire-hook-placement-before-update.patch => 0424-Validate-tripwire-hook-placement-before-update.patch} (100%) rename Spigot-Server-Patches/{0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => 0425-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (95%) rename Spigot-Server-Patches/{0425-Configurable-chance-of-villager-zombie-infection.patch => 0426-Configurable-chance-of-villager-zombie-infection.patch} (94%) rename Spigot-Server-Patches/{0426-Optimise-Chunk-getFluid.patch => 0427-Optimise-Chunk-getFluid.patch} (100%) rename Spigot-Server-Patches/{0427-Optimise-TickListServer-by-rewriting-it.patch => 0428-Optimise-TickListServer-by-rewriting-it.patch} (99%) rename Spigot-Server-Patches/{0428-Pillager-patrol-spawn-settings-and-per-player-option.patch => 0429-Pillager-patrol-spawn-settings-and-per-player-option.patch} (96%) rename Spigot-Server-Patches/{0429-Ensure-Entity-is-never-double-registered.patch => 0430-Ensure-Entity-is-never-double-registered.patch} (100%) rename Spigot-Server-Patches/{0430-Fix-unregistering-entities-from-unloading-chunks.patch => 0431-Fix-unregistering-entities-from-unloading-chunks.patch} (100%) rename Spigot-Server-Patches/{0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch => 0432-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (100%) rename Spigot-Server-Patches/{0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch => 0433-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (100%) rename Spigot-Server-Patches/{0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => 0434-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (94%) rename Spigot-Server-Patches/{0434-Optimize-Collision-to-not-load-chunks.patch => 0435-Optimize-Collision-to-not-load-chunks.patch} (100%) rename Spigot-Server-Patches/{0435-Don-t-tick-dead-players.patch => 0436-Don-t-tick-dead-players.patch} (85%) rename Spigot-Server-Patches/{0436-Dead-Player-s-shouldn-t-be-able-to-move.patch => 0437-Dead-Player-s-shouldn-t-be-able-to-move.patch} (90%) rename Spigot-Server-Patches/{0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch => 0438-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch} (96%) rename Spigot-Server-Patches/{0438-Increase-Light-Queue-Size.patch => 0439-Increase-Light-Queue-Size.patch} (92%) rename Spigot-Server-Patches/{0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch => 0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch} (97%) rename Spigot-Server-Patches/{0440-Don-t-move-existing-players-to-world-spawn.patch => 0441-Don-t-move-existing-players-to-world-spawn.patch} (90%) rename Spigot-Server-Patches/{0441-Add-tick-times-API-and-mspt-command.patch => 0442-Add-tick-times-API-and-mspt-command.patch} (100%) rename Spigot-Server-Patches/{0442-Expose-MinecraftServer-isRunning.patch => 0443-Expose-MinecraftServer-isRunning.patch} (100%) rename Spigot-Server-Patches/{0443-Add-Raw-Byte-ItemStack-Serialization.patch => 0444-Add-Raw-Byte-ItemStack-Serialization.patch} (100%) rename Spigot-Server-Patches/{0444-Remove-streams-from-Mob-AI-System.patch => 0445-Remove-streams-from-Mob-AI-System.patch} (100%) rename Spigot-Server-Patches/{0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch => 0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch} (100%) rename Spigot-Server-Patches/{0446-Async-command-map-building.patch => 0447-Async-command-map-building.patch} (100%) rename Spigot-Server-Patches/{0447-Improved-Watchdog-Support.patch => 0448-Improved-Watchdog-Support.patch} (99%) rename Spigot-Server-Patches/{0448-Optimize-Pathfinding.patch => 0449-Optimize-Pathfinding.patch} (100%) rename Spigot-Server-Patches/{0449-Reduce-Either-Optional-allocation.patch => 0450-Reduce-Either-Optional-allocation.patch} (100%) rename Spigot-Server-Patches/{0450-Remove-streams-from-PairedQueue.patch => 0451-Remove-streams-from-PairedQueue.patch} (100%) rename Spigot-Server-Patches/{0451-Reduce-memory-footprint-of-NBTTagCompound.patch => 0452-Reduce-memory-footprint-of-NBTTagCompound.patch} (100%) rename Spigot-Server-Patches/{0452-Prevent-opening-inventories-when-frozen.patch => 0453-Prevent-opening-inventories-when-frozen.patch} (92%) rename Spigot-Server-Patches/{0453-Optimise-ArraySetSorted-removeIf.patch => 0454-Optimise-ArraySetSorted-removeIf.patch} (100%) rename Spigot-Server-Patches/{0454-Don-t-run-entity-collision-code-if-not-needed.patch => 0455-Don-t-run-entity-collision-code-if-not-needed.patch} (93%) rename Spigot-Server-Patches/{0455-Optimise-entity-hard-collision-checking.patch => 0456-Optimise-entity-hard-collision-checking.patch} (100%) rename Spigot-Server-Patches/{0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch => 0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch} (96%) rename Spigot-Server-Patches/{0457-Restrict-vanilla-teleport-command-to-valid-locations.patch => 0458-Restrict-vanilla-teleport-command-to-valid-locations.patch} (100%) rename Spigot-Server-Patches/{0458-Implement-Player-Client-Options-API.patch => 0459-Implement-Player-Client-Options-API.patch} (97%) rename Spigot-Server-Patches/{0459-Fix-Chunk-Post-Processing-deadlock-risk.patch => 0460-Fix-Chunk-Post-Processing-deadlock-risk.patch} (88%) rename Spigot-Server-Patches/{0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch => 0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch} (100%) rename Spigot-Server-Patches/{0461-Broadcast-join-message-to-console.patch => 0462-Broadcast-join-message-to-console.patch} (100%) rename Spigot-Server-Patches/{0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch => 0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch} (94%) rename Spigot-Server-Patches/{0463-Load-Chunks-for-Login-Asynchronously.patch => 0464-Load-Chunks-for-Login-Asynchronously.patch} (98%) rename Spigot-Server-Patches/{0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch => 0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch} (100%) rename Spigot-Server-Patches/{0465-Add-PlayerAttackEntityCooldownResetEvent.patch => 0466-Add-PlayerAttackEntityCooldownResetEvent.patch} (94%) rename Spigot-Server-Patches/{0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch => 0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch} (93%) rename Spigot-Server-Patches/{0467-Don-t-fire-BlockFade-on-worldgen-threads.patch => 0468-Don-t-fire-BlockFade-on-worldgen-threads.patch} (100%) rename Spigot-Server-Patches/{0468-Add-phantom-creative-and-insomniac-controls.patch => 0469-Add-phantom-creative-and-insomniac-controls.patch} (96%) rename Spigot-Server-Patches/{0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch => 0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch} (100%) rename Spigot-Server-Patches/{0470-Implement-Brigadier-Mojang-API.patch => 0471-Implement-Brigadier-Mojang-API.patch} (100%) rename Spigot-Server-Patches/{0471-Villager-Restocks-API.patch => 0472-Villager-Restocks-API.patch} (100%) rename Spigot-Server-Patches/{0472-Validate-PickItem-Packet-and-kick-for-invalid.patch => 0473-Validate-PickItem-Packet-and-kick-for-invalid.patch} (100%) rename Spigot-Server-Patches/{0473-Expose-game-version.patch => 0474-Expose-game-version.patch} (100%) rename Spigot-Server-Patches/{0474-Sync-position-on-teleportation.patch => 0475-Sync-position-on-teleportation.patch} (100%) rename Spigot-Server-Patches/{0475-Optimize-Voxel-Shape-Merging.patch => 0476-Optimize-Voxel-Shape-Merging.patch} (100%) rename Spigot-Server-Patches/{0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch => 0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch} (100%) rename Spigot-Server-Patches/{0477-Implement-Mob-Goal-API.patch => 0478-Implement-Mob-Goal-API.patch} (100%) rename Spigot-Server-Patches/{0478-Use-distance-map-to-optimise-entity-tracker.patch => 0479-Use-distance-map-to-optimise-entity-tracker.patch} (95%) rename Spigot-Server-Patches/{0479-Optimize-isOutsideRange-to-use-distance-maps.patch => 0480-Optimize-isOutsideRange-to-use-distance-maps.patch} (94%) rename Spigot-Server-Patches/{0480-Stop-copy-on-write-operations-for-updating-light-dat.patch => 0481-Stop-copy-on-write-operations-for-updating-light-dat.patch} (100%) rename Spigot-Server-Patches/{0481-No-Tick-view-distance-implementation.patch => 0482-No-Tick-view-distance-implementation.patch} (95%) rename Spigot-Server-Patches/{0482-Add-villager-reputation-API.patch => 0483-Add-villager-reputation-API.patch} (100%) rename Spigot-Server-Patches/{0483-Fix-Light-Command.patch => 0484-Fix-Light-Command.patch} (98%) rename Spigot-Server-Patches/{0484-Fix-PotionEffect-ignores-icon-flag.patch => 0485-Fix-PotionEffect-ignores-icon-flag.patch} (100%) rename Spigot-Server-Patches/{0485-Optimize-brigadier-child-sorting-performance.patch => 0486-Optimize-brigadier-child-sorting-performance.patch} (100%) rename Spigot-Server-Patches/{0486-Don-t-toString-block-unless-actually-showing-the-mes.patch => 0487-Don-t-toString-block-unless-actually-showing-the-mes.patch} (100%) rename Spigot-Server-Patches/{0487-Potential-bed-API.patch => 0488-Potential-bed-API.patch} (100%) rename Spigot-Server-Patches/{0488-Wait-for-Async-Tasks-during-shutdown.patch => 0489-Wait-for-Async-Tasks-during-shutdown.patch} (100%) rename Spigot-Server-Patches/{0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch => 0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch} (100%) rename Spigot-Server-Patches/{0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (100%) rename Spigot-Server-Patches/{0491-Optimize-NibbleArray-to-use-pooled-buffers.patch => 0492-Optimize-NibbleArray-to-use-pooled-buffers.patch} (100%) rename Spigot-Server-Patches/{0492-Reduce-MutableInt-allocations-from-light-engine.patch => 0493-Reduce-MutableInt-allocations-from-light-engine.patch} (100%) rename Spigot-Server-Patches/{0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (96%) rename Spigot-Server-Patches/{0494-Ensure-safe-gateway-teleport.patch => 0495-Ensure-safe-gateway-teleport.patch} (100%) rename Spigot-Server-Patches/{0495-Add-option-for-console-having-all-permissions.patch => 0496-Add-option-for-console-having-all-permissions.patch} (100%) rename Spigot-Server-Patches/{0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch => 0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch} (97%) rename Spigot-Server-Patches/{0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch => 0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch} (98%) rename Spigot-Server-Patches/{0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch => 0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch} (100%) rename Spigot-Server-Patches/{0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch => 0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch} (100%) rename Spigot-Server-Patches/{0500-Improve-Chunk-Status-Transition-Speed.patch => 0501-Improve-Chunk-Status-Transition-Speed.patch} (93%) rename Spigot-Server-Patches/{0501-Fix-villager-trading-demand-MC-163962.patch => 0502-Fix-villager-trading-demand-MC-163962.patch} (100%) rename Spigot-Server-Patches/{0502-Maps-shouldn-t-load-chunks.patch => 0503-Maps-shouldn-t-load-chunks.patch} (100%) rename Spigot-Server-Patches/{0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch => 0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch} (100%) rename Spigot-Server-Patches/{0504-Optimize-Bit-Operations-by-inlining.patch => 0505-Optimize-Bit-Operations-by-inlining.patch} (100%) rename Spigot-Server-Patches/{0505-Optimize-Light-Engine.patch => 0506-Optimize-Light-Engine.patch} (99%) rename Spigot-Server-Patches/{0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch => 0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch} (97%) rename Spigot-Server-Patches/{0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch => 0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch} (100%) rename Spigot-Server-Patches/{0508-Fix-missing-chunks-due-to-integer-overflow.patch => 0509-Fix-missing-chunks-due-to-integer-overflow.patch} (100%) rename Spigot-Server-Patches/{0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch => 0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch} (100%) rename Spigot-Server-Patches/{0510-Fix-piston-physics-inconsistency-MC-188840.patch => 0511-Fix-piston-physics-inconsistency-MC-188840.patch} (100%) rename Spigot-Server-Patches/{0511-Fix-sand-duping.patch => 0512-Fix-sand-duping.patch} (100%) rename Spigot-Server-Patches/{0512-Prevent-position-desync-in-playerconnection-causing-.patch => 0513-Prevent-position-desync-in-playerconnection-causing-.patch} (100%) rename Spigot-Server-Patches/{0513-Fix-enderdragon-exp-dupe.patch => 0514-Fix-enderdragon-exp-dupe.patch} (100%) rename Spigot-Server-Patches/{0514-Inventory-getHolder-method-without-block-snapshot.patch => 0515-Inventory-getHolder-method-without-block-snapshot.patch} (100%) rename Spigot-Server-Patches/{0515-Expose-Arrow-getItemStack.patch => 0516-Expose-Arrow-getItemStack.patch} (100%) rename Spigot-Server-Patches/{0516-Add-and-implement-PlayerRecipeBookClickEvent.patch => 0517-Add-and-implement-PlayerRecipeBookClickEvent.patch} (100%) rename Spigot-Server-Patches/{0517-Add-PrepareGrindstoneEvent.patch => 0518-Add-PrepareGrindstoneEvent.patch} (100%) rename Spigot-Server-Patches/{0518-FIX-DIS-SHIT.patch => 0519-FIX-DIS-SHIT.patch} (100%) diff --git a/removed/1.16/0384-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch similarity index 97% rename from removed/1.16/0384-implement-optional-per-player-mob-spawns.patch rename to Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch index 8fa2daabda..ff9fe569e2 100644 --- a/removed/1.16/0384-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch @@ -617,7 +617,7 @@ index b9fe08301409bc1f0d61a7566c26e720ff720d80..18a806ebbf092b904983691529ce5edf return this.bf; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index cdb72b225226083ca45ade798f54989422e5281c..f7e57fd1ce5881c056c104d5a6a9a74e34e3ffc3 100644 +index a10006efc52f093196e7d67a3281a87d4c5df19b..ab5413a39147180af2eb33512fc992a5dcbb69bf 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -80,7 +80,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -656,7 +656,7 @@ index cdb72b225226083ca45ade798f54989422e5281c..f7e57fd1ce5881c056c104d5a6a9a74e private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f237b5b2bf 100644 +index 8130e14b5d6c3e8b0a1234668d5c855e82f3a5dc..c5845013a79036704d084cfb903589cb9e8767cd 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -29,6 +29,11 @@ public final class SpawnerCreature { @@ -683,7 +683,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 }); } } -@@ -120,13 +130,33 @@ public final class SpawnerCreature { +@@ -125,13 +135,33 @@ public final class SpawnerCreature { continue; } @@ -718,7 +718,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } } -@@ -135,22 +165,34 @@ public final class SpawnerCreature { +@@ -140,22 +170,34 @@ public final class SpawnerCreature { } public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a) { @@ -755,7 +755,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 int k = 0; while (k < 3) { -@@ -190,13 +232,13 @@ public final class SpawnerCreature { +@@ -195,13 +237,13 @@ public final class SpawnerCreature { // Paper start Boolean doSpawning = a(worldserver, enumcreaturetype, structuremanager, chunkgenerator, biomebase_biomemeta, blockposition_mutableblockposition, d2); if (doSpawning == null) { @@ -771,7 +771,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } entityinsentient.setPositionRotation(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F); -@@ -204,13 +246,18 @@ public final class SpawnerCreature { +@@ -209,13 +251,18 @@ public final class SpawnerCreature { groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); // CraftBukkit start if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) { @@ -793,7 +793,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } if (entityinsentient.c(k1)) { -@@ -232,6 +279,7 @@ public final class SpawnerCreature { +@@ -237,6 +284,7 @@ public final class SpawnerCreature { } } @@ -801,20 +801,18 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } private static boolean a(WorldServer worldserver, IChunkAccess ichunkaccess, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, double d0) { -@@ -471,10 +519,10 @@ public final class SpawnerCreature { +@@ -476,8 +524,8 @@ public final class SpawnerCreature { public static class d { - private final int a; +- private final Object2IntOpenHashMap b; + private final int a; final int getSpawnerChunks() { return this.a; } // Paper - OBFHELPER - private final Object2IntOpenHashMap b; ++ private final Object2IntOpenHashMap b; final Object2IntMap getEntityCountsByType() { return this.b; } // Paper - OBFHELPER private final SpawnerCreatureProbabilities c; -- private final Object2IntMap d; -+ private final Object2IntMap d; final Object2IntMap getEntityCountsByType() { return this.d; } // Paper - OBFHELPER + private final Object2IntMap d; @Nullable - private BlockPosition e; - @Nullable -@@ -535,7 +583,7 @@ public final class SpawnerCreature { +@@ -540,7 +588,7 @@ public final class SpawnerCreature { // CraftBukkit start private boolean a(EnumCreatureType enumcreaturetype, int limit) { diff --git a/Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch similarity index 96% rename from Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch rename to Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch index c4b7098eea..d439b641ef 100644 --- a/Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch +++ b/Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f74e9ffda092ef4a2e30c316e682af154921b5df..961a383174cd40da079869a2a1f0252c27fff6b4 100644 +index eeca12bd7c6e59b872303fda1378a69d03dcf783..d354e9b504b6872f20a9e433522827589bd4778a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -3068,10 +3068,13 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch b/Spigot-Server-Patches/0386-only-add-passanger-entities-once-from-spawners.patch similarity index 100% rename from Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch rename to Spigot-Server-Patches/0386-only-add-passanger-entities-once-from-spawners.patch diff --git a/Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch b/Spigot-Server-Patches/0387-Fix-nether-portal-creation.patch similarity index 100% rename from Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch rename to Spigot-Server-Patches/0387-Fix-nether-portal-creation.patch diff --git a/Spigot-Server-Patches/0387-Generator-Settings.patch b/Spigot-Server-Patches/0388-Generator-Settings.patch similarity index 94% rename from Spigot-Server-Patches/0387-Generator-Settings.patch rename to Spigot-Server-Patches/0388-Generator-Settings.patch index 31fe76617b..04d445d5d6 100644 --- a/Spigot-Server-Patches/0387-Generator-Settings.patch +++ b/Spigot-Server-Patches/0388-Generator-Settings.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Generator Settings diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cf9d980e61be199a34cff98f805e511f9410dd51..547ec8d90425feb6089091a930a49a43bed01e1a 100644 +index 3d9a48e56194225cf39e31d13d26ec17afedadaf..a9d7e81ef123a7da7785a4b8dc868a0e256a61d0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -567,4 +567,9 @@ public class PaperWorldConfig { - } - } +@@ -572,4 +572,9 @@ public class PaperWorldConfig { + private void perPlayerMobSpawns() { + perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false); } + + public boolean generateFlatBedrock; diff --git a/Spigot-Server-Patches/0388-Fix-MC-161754.patch b/Spigot-Server-Patches/0389-Fix-MC-161754.patch similarity index 100% rename from Spigot-Server-Patches/0388-Fix-MC-161754.patch rename to Spigot-Server-Patches/0389-Fix-MC-161754.patch diff --git a/Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch b/Spigot-Server-Patches/0390-Performance-improvement-for-Chunk.getEntities.patch similarity index 100% rename from Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch rename to Spigot-Server-Patches/0390-Performance-improvement-for-Chunk.getEntities.patch diff --git a/Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 100% rename from Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to Spigot-Server-Patches/0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch diff --git a/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch similarity index 100% rename from Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch rename to Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch diff --git a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 90% rename from Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index b9d30be328..68c118c658 100644 --- a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3a3ffe5a544d9f73b0ac512f67629b1169110395..55675fafaaadd3739e51bccce1c66ffab2d2d5c2 100644 +index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c75bb1fe7 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1012,6 +1012,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1018,6 +1018,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; diff --git a/Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch similarity index 91% rename from Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch rename to Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch index e5b7568f01..d11e1de6e9 100644 --- a/Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch +++ b/Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable pillager patrols diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 547ec8d90425feb6089091a930a49a43bed01e1a..886c56fbe90559464439cec6198776cd5b037c74 100644 +index a9d7e81ef123a7da7785a4b8dc868a0e256a61d0..f8a617a62e62d088077712bfb66656c28b82a3c5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -572,4 +572,9 @@ public class PaperWorldConfig { +@@ -577,4 +577,9 @@ public class PaperWorldConfig { private void generatorSettings() { generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); } diff --git a/Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 95% rename from Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index 58309948d3..4cefa8b120 100644 --- a/Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -7,7 +7,7 @@ Fixes an AssertionError when setting the player's item in hand to null or a new Fixes GH-2718 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 961a383174cd40da079869a2a1f0252c27fff6b4..dd7df1795eb0186e256c26684b7d9116de9bc9bf 100644 +index d354e9b504b6872f20a9e433522827589bd4778a..12b27c44d77b72fa4a4d42cfe3db8394a47d9c9b 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2040,6 +2040,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/0396-PlayerLaunchProjectileEvent.patch similarity index 100% rename from Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch rename to Spigot-Server-Patches/0396-PlayerLaunchProjectileEvent.patch diff --git a/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 100% rename from Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to Spigot-Server-Patches/0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch diff --git a/Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/Spigot-Server-Patches/0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to Spigot-Server-Patches/0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch b/Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 95% rename from Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch index 63337f940f..88873b8767 100644 --- a/Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch +++ b/Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch @@ -5,10 +5,10 @@ Subject: [PATCH] MC-145656 Fix Follow Range Initial Target diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 886c56fbe90559464439cec6198776cd5b037c74..1a05e5169da4f21a88405cd8a36dec9fc868e059 100644 +index f8a617a62e62d088077712bfb66656c28b82a3c5..5c5a79d0ea00c9c4c2e93d524291f48f92e77857 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -577,4 +577,9 @@ public class PaperWorldConfig { +@@ -582,4 +582,9 @@ public class PaperWorldConfig { private void pillagerSettings() { disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols); } diff --git a/Spigot-Server-Patches/0399-Optimize-Hoppers.patch b/Spigot-Server-Patches/0400-Optimize-Hoppers.patch similarity index 99% rename from Spigot-Server-Patches/0399-Optimize-Hoppers.patch rename to Spigot-Server-Patches/0400-Optimize-Hoppers.patch index 21e516ee5e..e7445e555b 100644 --- a/Spigot-Server-Patches/0399-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0400-Optimize-Hoppers.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1a05e5169da4f21a88405cd8a36dec9fc868e059..3a63ed18c38030b7c0f1e681b9066283879592a1 100644 +index 5c5a79d0ea00c9c4c2e93d524291f48f92e77857..4bfe2fb948ee204f8c5a8c316141904a8a6a8b16 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -582,4 +582,13 @@ public class PaperWorldConfig { +@@ -587,4 +587,13 @@ public class PaperWorldConfig { private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); } diff --git a/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch similarity index 84% rename from Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch index f5522024ae..8659debca7 100644 --- a/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 55675fafaaadd3739e51bccce1c66ffab2d2d5c2..ce3ed590f96312e18d631afee40f3821dad986ae 100644 +index b33041765051f519807081607d2a8f1c75bb1fe7..dd78cfd8e9031558a6986c1929da330458d28597 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -685,7 +685,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -691,7 +691,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.eW(); } // SPIGOT-5478 must be called manually now diff --git a/Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch b/Spigot-Server-Patches/0402-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch rename to Spigot-Server-Patches/0402-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch b/Spigot-Server-Patches/0404-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch rename to Spigot-Server-Patches/0404-Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0405-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 100% rename from Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch rename to Spigot-Server-Patches/0405-Optimise-IEntityAccess-getPlayerByUUID.patch diff --git a/Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/0406-Fix-items-not-falling-correctly.patch similarity index 100% rename from Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch rename to Spigot-Server-Patches/0406-Fix-items-not-falling-correctly.patch diff --git a/Spigot-Server-Patches/0406-Lag-compensate-eating.patch b/Spigot-Server-Patches/0407-Lag-compensate-eating.patch similarity index 97% rename from Spigot-Server-Patches/0406-Lag-compensate-eating.patch rename to Spigot-Server-Patches/0407-Lag-compensate-eating.patch index 9b7e40cf00..0efa064d22 100644 --- a/Spigot-Server-Patches/0406-Lag-compensate-eating.patch +++ b/Spigot-Server-Patches/0407-Lag-compensate-eating.patch @@ -7,7 +7,7 @@ When the server is lagging, players will wait longer when eating. Change to also use a time check instead if it passes. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dd7df1795eb0186e256c26684b7d9116de9bc9bf..415cec5f0435967dccd8df258d116b490a84276f 100644 +index 12b27c44d77b72fa4a4d42cfe3db8394a47d9c9b..b213a13c18ad483472808f4fe9743f74821a25cd 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -119,7 +119,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch b/Spigot-Server-Patches/0408-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch rename to Spigot-Server-Patches/0408-Optimize-call-to-getFluid-for-explosions.patch diff --git a/Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/Spigot-Server-Patches/0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to Spigot-Server-Patches/0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch similarity index 99% rename from Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch rename to Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch index a7cbbff0bc..a84a7566fa 100644 --- a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch @@ -68,7 +68,7 @@ index c94197a50269622e8995685119bac984c45e6833..11d384729326af693a9a679195acbd59 protected EntityCreature(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c40846ba7c2f9 100644 +index 513c987a56e8d2bda0bda8771285c7c8d5ca88e1..f638b21a3b457323600baeecab4a04ca76d0e813 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -47,7 +47,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -99,7 +99,7 @@ index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c4084 if (this.isPassenger() && this.getVehicle() instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) this.getVehicle(); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 415cec5f0435967dccd8df258d116b490a84276f..b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122 100644 +index b213a13c18ad483472808f4fe9743f74821a25cd..66bca610fbb8afc6f5b4430318c66d29af55fc19 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -97,7 +97,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch rename to Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch similarity index 95% rename from Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch rename to Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch index cb8dc9afe4..d6a3c237e6 100644 --- a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch +++ b/Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index a10006efc52f093196e7d67a3281a87d4c5df19b..89d3890ab80da90fea2fb6e0a871bae2ff5f5ef1 100644 +index ab5413a39147180af2eb33512fc992a5dcbb69bf..b530316b582390c4c464bb1f3df48597c8bf7569 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1717,6 +1717,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1736,6 +1736,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getEntityType().getChunkRange() * 16; diff --git a/Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0413-Fix-items-vanishing-through-end-portal.patch similarity index 100% rename from Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch rename to Spigot-Server-Patches/0413-Fix-items-vanishing-through-end-portal.patch diff --git a/Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 97% rename from Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 0e9f068a2e..0fe3d50adb 100644 --- a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,7 +7,7 @@ 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 707db4febac59a4d09d6420ea2add469cf54c2ec..a5325aef96117d569e95ff4a15650d6a1ab8ac49 100644 +index 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b1977150d73f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -447,6 +447,12 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0416-Allow-overriding-the-java-version-check.patch similarity index 100% rename from Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch rename to Spigot-Server-Patches/0416-Allow-overriding-the-java-version-check.patch diff --git a/Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch b/Spigot-Server-Patches/0417-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch rename to Spigot-Server-Patches/0417-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch rename to Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch diff --git a/Spigot-Server-Patches/0418-Entity-Jump-API.patch b/Spigot-Server-Patches/0419-Entity-Jump-API.patch similarity index 96% rename from Spigot-Server-Patches/0418-Entity-Jump-API.patch rename to Spigot-Server-Patches/0419-Entity-Jump-API.patch index 4384d36a0a..3e5df22702 100644 --- a/Spigot-Server-Patches/0418-Entity-Jump-API.patch +++ b/Spigot-Server-Patches/0419-Entity-Jump-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122..58e14a10f5424fefd7c2e1ce644e1712e49eea62 100644 +index 66bca610fbb8afc6f5b4430318c66d29af55fc19..e0a4866048276c44079e0b9034c1acea1f0498fa 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2754,8 +2754,10 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 95% rename from Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch index d4f46389d9..b554afd515 100644 --- a/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3a63ed18c38030b7c0f1e681b9066283879592a1..c1f7d7f0db97e1667917a00febabb043cd66dfc8 100644 +index 4bfe2fb948ee204f8c5a8c316141904a8a6a8b16..3496f615aa9857aa704767f460b1b166295ccf39 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -591,4 +591,9 @@ public class PaperWorldConfig { +@@ -596,4 +596,9 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } diff --git a/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch similarity index 99% rename from Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch rename to Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch index 2fc4240668..0975f95bb0 100644 --- a/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch +++ b/Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch @@ -398,7 +398,7 @@ index d4d5bc19e167a5271f8eb8d010f8a52b23b942df..859e31c63f94bdc7729c6d475990750b }); private final int[] b = new int[256]; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 620ee43ada7543e21f6c10afec424cff6017f2cd..3681bc9657b2ecbd27bb45153b4e608d077f36dc 100644 +index 4207b2c2a1bed03e00d792015c15f32b2eca7085..aecc0fee6924922f1599a99a643c1d2437e22fc6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -106,7 +106,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b7a9759b4 100644 +index 6ac39fc6cafdcbf7883e868ecb58a2ebfad41601..bb4d54ebee573964cf3026888da108584b12972f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -56,8 +56,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -122,7 +122,7 @@ index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b private final Long2ObjectLinkedOpenHashMap pendingUnload; final LongSet loadedChunks; // Paper - private -> package public final WorldServer world; -@@ -129,7 +154,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -130,7 +155,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i, boolean flag) { super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag); @@ -131,7 +131,7 @@ index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b this.pendingUnload = new Long2ObjectLinkedOpenHashMap(); this.loadedChunks = new LongOpenHashSet(); this.unloadQueue = new LongOpenHashSet(); -@@ -203,9 +228,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -222,9 +247,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return (PlayerChunk) this.updatingChunks.get(i); } @@ -185,7 +185,7 @@ index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b } protected IntSupplier c(long i) { -@@ -393,8 +461,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -412,8 +480,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end protected void save(boolean flag) { @@ -196,7 +196,7 @@ index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -422,7 +491,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -441,7 +510,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // this.i(); // Paper - nuke IOWorker PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); } else { @@ -205,7 +205,7 @@ index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkSave().getNow(null); // CraftBukkit - decompile error if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { -@@ -593,7 +662,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -612,7 +681,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (!this.updatingChunksModified) { return false; } else { @@ -227,7 +227,7 @@ index 1379c65d0b07544242d5ee32841b208ace43197f..31f72f0c0f00a62f9e636a9cd0362c7b this.updatingChunksModified = false; return true; } -@@ -1062,12 +1144,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1081,12 +1163,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } protected Iterable f() { diff --git a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch similarity index 92% rename from Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch rename to Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch index 2066ee0df1..7d2f0a1ac1 100644 --- a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 69b3faf28d019fca90734c4d0944ead8fd97ab87..21940f2034744ea417a43fcebc92b21298753d2d 100644 +index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -617,4 +617,9 @@ public class PaperWorldConfig { +@@ -622,4 +622,9 @@ public class PaperWorldConfig { private void zombieVillagerInfectionChance() { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } diff --git a/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch similarity index 97% rename from Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch rename to Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index fd4fb62d24..b2d753d00a 100644 --- a/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -56,7 +56,7 @@ index 8508b3e10e60a4ce36d471b1d3f7ffc836a6ddf7..aad1420dc63c16b558ad1ca34accf8a7 + } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b770c0600d6 100644 +index e14e8bcf235339c1537a1e0a7702a364ee784c93..d1f832db33f21f8ba910d2c0c163af78718d298f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -694,6 +694,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -75,7 +75,7 @@ index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77 this.world.timings.doChunkUnload.stopTiming(); // Spigot this.world.getMethodProfiler().exit(); this.clearCache(); -@@ -741,7 +743,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 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77 Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); if (optional.isPresent()) { -@@ -765,6 +767,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 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77 } } } -@@ -921,6 +924,41 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider { super.executeTask(runnable); } diff --git a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch similarity index 90% rename from Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch rename to Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch index 950ea7f1e5..613c53abca 100644 --- a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch @@ -10,10 +10,10 @@ larger than the keep loaded range. By skipping this, we avoid potential for a large spike on server start. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86fa144863d 100644 +index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c3921296106a3bc 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -113,7 +113,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -118,7 +118,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.serverStatisticManager = minecraftserver.getPlayerList().getStatisticManager(this); this.advancementDataPlayer = minecraftserver.getPlayerList().f(this); this.G = 1.0F; @@ -22,7 +22,7 @@ index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86f this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -165,6 +165,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -171,6 +171,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end @@ -30,7 +30,7 @@ index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86f private void b(WorldServer worldserver) { BlockPosition blockposition = worldserver.getSpawn(); -@@ -340,7 +341,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -346,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { position = Vec3D.a(((WorldServer) world).getSpawn()); } this.world = world; diff --git a/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch similarity index 100% rename from Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch rename to Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch diff --git a/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch similarity index 100% rename from Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch rename to Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch diff --git a/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0444-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch rename to Spigot-Server-Patches/0444-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch b/Spigot-Server-Patches/0445-Remove-streams-from-Mob-AI-System.patch similarity index 100% rename from Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch rename to Spigot-Server-Patches/0445-Remove-streams-from-Mob-AI-System.patch diff --git a/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch b/Spigot-Server-Patches/0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch similarity index 100% rename from Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch rename to Spigot-Server-Patches/0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch diff --git a/Spigot-Server-Patches/0446-Async-command-map-building.patch b/Spigot-Server-Patches/0447-Async-command-map-building.patch similarity index 100% rename from Spigot-Server-Patches/0446-Async-command-map-building.patch rename to Spigot-Server-Patches/0447-Async-command-map-building.patch diff --git a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch similarity index 99% rename from Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch rename to Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch index 574cfc3aaf..42b65beb77 100644 --- a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch @@ -261,10 +261,10 @@ index 5bef465bfe90b08524862b13f9e22dcf9e3438cd..57f7dfc6a5316cfec5cce9c60e7b91d9 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ad4a07283a67ed4db770c59bb5884b9fa3f92b21..295c8e7eeb4fc634aaa2ca788e6540a647755f88 100644 +index bb4d54ebee573964cf3026888da108584b12972f..09f94bd242318155dbb46e12224ad3e47eed40cf 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -467,6 +467,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -486,6 +486,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { MutableBoolean mutableboolean = new MutableBoolean(); do { diff --git a/Spigot-Server-Patches/0448-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0449-Optimize-Pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0448-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0449-Optimize-Pathfinding.patch diff --git a/Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch b/Spigot-Server-Patches/0450-Reduce-Either-Optional-allocation.patch similarity index 100% rename from Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch rename to Spigot-Server-Patches/0450-Reduce-Either-Optional-allocation.patch diff --git a/Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch b/Spigot-Server-Patches/0451-Remove-streams-from-PairedQueue.patch similarity index 100% rename from Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch rename to Spigot-Server-Patches/0451-Remove-streams-from-PairedQueue.patch diff --git a/Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch b/Spigot-Server-Patches/0452-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch rename to Spigot-Server-Patches/0452-Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch similarity index 92% rename from Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch rename to Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch index 8dfd1e0e0f..eb861c8fa2 100644 --- a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b2a933ff60163527bd19449f8650a86fa144863d..0ecc967e149ef988f0451b2202cd01b85debf74c 100644 +index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a941b11b58 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -417,7 +417,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -423,7 +423,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { containerUpdateDelay = world.paperConfig.containerUpdateTickRate; } // Paper end @@ -17,7 +17,7 @@ index b2a933ff60163527bd19449f8650a86fa144863d..0ecc967e149ef988f0451b2202cd01b8 this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.activeContainer = this.defaultContainer; } -@@ -1272,7 +1272,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1278,7 +1278,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } else { // CraftBukkit start this.activeContainer = container; @@ -26,7 +26,7 @@ index b2a933ff60163527bd19449f8650a86fa144863d..0ecc967e149ef988f0451b2202cd01b8 // CraftBukkit end container.addSlotListener(this); return OptionalInt.of(this.containerCounter); -@@ -2066,7 +2066,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2073,7 +2073,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @Override diff --git a/Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch b/Spigot-Server-Patches/0454-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch rename to Spigot-Server-Patches/0454-Optimise-ArraySetSorted-removeIf.patch diff --git a/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 93% rename from Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch rename to Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch index b40bc1eb33..ba59d2269d 100644 --- a/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch @@ -7,7 +7,7 @@ Will not run if max entity craming is disabled and the max collisions per entity is less than or equal to 0 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 58e14a10f5424fefd7c2e1ce644e1712e49eea62..22b033b85f34673928f47a65962d2bb6d34e6976 100644 +index e0a4866048276c44079e0b9034c1acea1f0498fa..40ac2b8153dbbb10b732123f95b9c0a3a807e54e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2820,10 +2820,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0456-Optimise-entity-hard-collision-checking.patch similarity index 100% rename from Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch rename to Spigot-Server-Patches/0456-Optimise-entity-hard-collision-checking.patch diff --git a/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch similarity index 96% rename from Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch rename to Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch index 394cbaf797..368e1ea8c2 100644 --- a/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch +++ b/Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch @@ -9,7 +9,7 @@ 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 638a874a275677ede28953badb387b770c0600d6..e24f3711017aa5194ef7bf4e8d90f150cfb083ff 100644 +index d1f832db33f21f8ba910d2c0c163af78718d298f..91755cd7313d87bae85584dff140acbc6467428f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -618,21 +618,29 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch b/Spigot-Server-Patches/0458-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 100% rename from Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to Spigot-Server-Patches/0458-Restrict-vanilla-teleport-command-to-valid-locations.patch diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch similarity index 97% rename from Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch rename to Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch index 75857a269e..c55903d29f 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch @@ -85,7 +85,7 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb + } +} diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 2db0cfd6c32c58beadc71d4be487776500c1b8a6..3fa9e7b52b24629c96436fdd46d4e8c28c35f00e 100644 +index 22acfe1350eb122b7eaa7209f519e4f4f1469b6c..2cada09ced1660526e9c112c2c8d92bbf9d6ea98 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -36,7 +36,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -98,7 +98,7 @@ index 2db0cfd6c32c58beadc71d4be487776500c1b8a6..3fa9e7b52b24629c96436fdd46d4e8c2 protected static final DataWatcherObject br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0ecc967e149ef988f0451b2202cd01b85debf74c..41ec990baa4a2ca149cd6edd16943a9ac27cde91 100644 +index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad512e774f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -118,7 +118,7 @@ index 0ecc967e149ef988f0451b2202cd01b85debf74c..41ec990baa4a2ca149cd6edd16943a9a private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1676,6 +1677,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1682,6 +1683,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public String locale = null; // CraftBukkit - lowercase // Paper - default to null public void a(PacketPlayInSettings packetplayinsettings) { diff --git a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0460-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 88% rename from Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to Spigot-Server-Patches/0460-Fix-Chunk-Post-Processing-deadlock-risk.patch index 1265cee4b7..5174e53798 100644 --- a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/Spigot-Server-Patches/0460-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 e24f3711017aa5194ef7bf4e8d90f150cfb083ff..7af4c3e2aaf0775640d51f88b3cf821ba38a950b 100644 +index 91755cd7313d87bae85584dff140acbc6467428f..0080a0cbe58d1a81c434ef97659428c8bf1ec290 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -979,6 +979,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -994,6 +994,7 @@ public class ChunkProviderServer extends IChunkProvider { return super.executeNext() || execChunkTask; // Paper } } finally { @@ -37,10 +37,10 @@ index e24f3711017aa5194ef7bf4e8d90f150cfb083ff..7af4c3e2aaf0775640d51f88b3cf821b } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 517d752f96b595ce26092616cb9087e356c194b7..372b4d9ce7325f3d158f8199d1ec0dd2670f57ce 100644 +index 09f94bd242318155dbb46e12224ad3e47eed40cf..4ab719930f5b35c0ae221e9345f1e2eda7d9d719 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -132,6 +132,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -133,6 +133,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; // CraftBukkit end @@ -49,7 +49,7 @@ index 517d752f96b595ce26092616cb9087e356c194b7..372b4d9ce7325f3d158f8199d1ec0dd2 // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); -@@ -977,7 +979,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -996,7 +998,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return Either.left(chunk); }); }, (runnable) -> { diff --git a/Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/Spigot-Server-Patches/0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to Spigot-Server-Patches/0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch similarity index 100% rename from Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch rename to Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch diff --git a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 94% rename from Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index fb57339bb1..a2fea6c07c 100644 --- a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 41ec990baa4a2ca149cd6edd16943a9ac27cde91..6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8 100644 +index ef35e07fd8b27a66710140c1422f88ad512e774f..56cf64709ae520287f6687fe7c2f55040cc769a1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -99,6 +99,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -104,6 +104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -40,10 +40,10 @@ index 41ec990baa4a2ca149cd6edd16943a9ac27cde91..6f26d468bcb68328a3e0ee7f627dc8f2 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 372b4d9ce7325f3d158f8199d1ec0dd2670f57ce..ccd11698b13e771cd1d90dc73108b055f4e4f53c 100644 +index 4ab719930f5b35c0ae221e9345f1e2eda7d9d719..8de86684dda275585826617b41d6792f233b814c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1516,6 +1516,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1535,6 +1535,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { .printStackTrace(); return; } diff --git a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch similarity index 98% rename from Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch rename to Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch index 07e65166dd..d8b2d1dc99 100644 --- a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch @@ -5,7 +5,7 @@ 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 7af4c3e2aaf0775640d51f88b3cf821ba38a950b..4c6b056cb1a2040251acc09ef2eb6bfd893a0300 100644 +index 0080a0cbe58d1a81c434ef97659428c8bf1ec290..eebd4c50a7324250d3ebe7060739a71af4243f72 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -604,7 +604,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -31,7 +31,7 @@ index c879e5d9acd400db5b7fdb770e5f8cc419e3bb23..228666eccfb924d2844c911e734eef4b public void c(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8..f816af5c421c21e183435b3d3907883a0480f6fb 100644 +index 56cf64709ae520287f6687fe7c2f55040cc769a1..0a5f784e851414f84e5a94b53f5616531f533109 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -42,7 +42,7 @@ index 6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8..f816af5c421c21e183435b3d3907883a public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; public final Deque removeQueue = new ArrayDeque<>(); // Paper -@@ -100,6 +101,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -105,6 +106,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper diff --git a/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 100% rename from Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to Spigot-Server-Patches/0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch diff --git a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 94% rename from Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch index 884e0323b1..6559567b47 100644 --- a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 22b033b85f34673928f47a65962d2bb6d34e6976..14606a12c472e0e58f76023a53a4129536ac5cc4 100644 +index 40ac2b8153dbbb10b732123f95b9c0a3a807e54e..7a2140e4b901027997b2884275b35b43fe2175bc 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1825,7 +1825,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 93% rename from Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch index bd14db1cc9..fa113669a2 100644 --- a/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch +++ b/Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch @@ -14,10 +14,10 @@ Use an ArrayDeque to store this Queue We make sure to also implement a pattern that is recursion safe too. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index d0a5335b6315f3c8f8b431f53ad69a53caf9fd63..3355e2110d98c7ca514a1abf9461f1bb13ab7a30 100644 +index 8de86684dda275585826617b41d6792f233b814c..850602a32d371bd030665732b762b4bcbd49e25e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -111,24 +111,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -112,24 +112,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { diff --git a/Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch b/Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch similarity index 96% rename from Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch rename to Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch index d8a2b711ee..76796703ef 100644 --- a/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch +++ b/Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 21940f2034744ea417a43fcebc92b21298753d2d..dfe4baf1973c38e4a443a2b1d6b1eb19140137e1 100644 +index e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5..5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -622,4 +622,11 @@ public class PaperWorldConfig { +@@ -627,4 +627,11 @@ public class PaperWorldConfig { private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); } diff --git a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 100% rename from Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to Spigot-Server-Patches/0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch diff --git a/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch similarity index 100% rename from Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch rename to Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch diff --git a/Spigot-Server-Patches/0471-Villager-Restocks-API.patch b/Spigot-Server-Patches/0472-Villager-Restocks-API.patch similarity index 100% rename from Spigot-Server-Patches/0471-Villager-Restocks-API.patch rename to Spigot-Server-Patches/0472-Villager-Restocks-API.patch diff --git a/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/Spigot-Server-Patches/0473-Expose-game-version.patch b/Spigot-Server-Patches/0474-Expose-game-version.patch similarity index 100% rename from Spigot-Server-Patches/0473-Expose-game-version.patch rename to Spigot-Server-Patches/0474-Expose-game-version.patch diff --git a/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch similarity index 100% rename from Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch rename to Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch diff --git a/Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch b/Spigot-Server-Patches/0476-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch rename to Spigot-Server-Patches/0476-Optimize-Voxel-Shape-Merging.patch diff --git a/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to Spigot-Server-Patches/0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch similarity index 100% rename from Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch rename to Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch diff --git a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch similarity index 95% rename from Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch rename to Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch index d018e82224..4f5ccf8d37 100644 --- a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch @@ -56,10 +56,10 @@ index 57f7dfc6a5316cfec5cce9c60e7b91d94c505f50..735beaf6fa6e6ccf2137b64a0b5179ad return i; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fceb9ddacf 100644 +index 850602a32d371bd030665732b762b4bcbd49e25e..a7be3f6d2a11c1e1b310f0fcdbe2e485a2113c59 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -144,21 +144,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -145,21 +145,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); @@ -116,10 +116,10 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc } // Paper end -@@ -194,6 +228,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.l = supplier; +@@ -196,6 +230,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); + this.playerMobDistanceMap = this.world.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + // Paper start - use distance map to optimise entity tracker + this.playerEntityTrackerTrackMaps = new com.destroystokyo.paper.util.misc.PlayerAreaMap[TRACKING_RANGE_TYPES.length]; + this.entityTrackerTrackRanges = new int[TRACKING_RANGE_TYPES.length]; @@ -161,8 +161,8 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc + // Paper end - use distance map to optimise entity tracker } - private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { -@@ -1413,17 +1486,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + public void updatePlayerMobTypeMap(Entity entity) { +@@ -1432,17 +1505,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public void movePlayer(EntityPlayer entityplayer) { @@ -181,7 +181,7 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc int i = MathHelper.floor(entityplayer.locX()) >> 4; int j = MathHelper.floor(entityplayer.locZ()) >> 4; -@@ -1539,7 +1602,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1558,7 +1621,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); @@ -190,7 +190,7 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc if (entity instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) entity; -@@ -1582,7 +1645,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1601,7 +1664,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = null; // Paper - We're no longer tracked } @@ -228,7 +228,7 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc List list = Lists.newArrayList(); List list1 = this.world.getPlayers(); -@@ -1650,23 +1743,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1669,23 +1762,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PacketDebug.a(this.world, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -272,7 +272,7 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc Iterator iterator; Entity entity1; -@@ -1704,7 +1805,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1723,7 +1824,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public class EntityTracker { @@ -281,7 +281,7 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc private final Entity tracker; private final int trackingDistance; private SectionPosition e; -@@ -1721,6 +1822,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1740,6 +1841,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.e = SectionPosition.a(entity); } @@ -324,7 +324,7 @@ index 1009ad80c6cd869c1f2b77b7bc1570907af983cf..43209c7392f675f3b9301f654b53b3fc public boolean equals(Object object) { return object instanceof PlayerChunkMap.EntityTracker ? ((PlayerChunkMap.EntityTracker) object).tracker.getId() == this.tracker.getId() : false; } -@@ -1821,7 +1958,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1840,7 +1977,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int j = entity.getEntityType().getChunkRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper diff --git a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 94% rename from Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch rename to Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch index f7d0899a1a..01bde81e3a 100644 --- a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -77,7 +77,7 @@ index 32d3887e2542c4ebba4a7498167fbe4b497a71ce..7e57a53ec614a2f7d2672edff9d7c0e0 public String c() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc70394eb7323f 100644 +index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e84316c49 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -728,6 +728,36 @@ public class ChunkProviderServer extends IChunkProvider { @@ -117,7 +117,7 @@ index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc7039 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 -@@ -742,15 +772,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -757,15 +787,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper //Collections.shuffle(list); // Paper @@ -134,7 +134,7 @@ index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc7039 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(); -@@ -766,9 +788,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -781,9 +803,9 @@ public class ChunkProviderServer extends IChunkProvider { Chunk chunk = (Chunk) optional1.get(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); @@ -147,10 +147,10 @@ index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc7039 } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f816af5c421c21e183435b3d3907883a0480f6fb..8177781a9cbba57097c5873fd917ff5d9954ccf8 100644 +index 0a5f784e851414f84e5a94b53f5616531f533109..fb2b64628b974758cace770ce6debe5e88318ae8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -108,6 +108,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -113,6 +113,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper @@ -191,10 +191,10 @@ index 9cb2ff09da0b8832e58eed4d70741853a25c9011..7f660d3c528f5fb4150e4ee8b2991343 // Paper start diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185cec1eb680 100644 +index a7be3f6d2a11c1e1b310f0fcdbe2e485a2113c59..026562c72d7e95345d9369c6d6331cf6cedb8f17 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -158,6 +158,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -159,6 +159,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); } // Paper end - use distance map to optimise tracker @@ -212,7 +212,7 @@ index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185c void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -171,6 +182,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -172,6 +183,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.add(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -222,7 +222,7 @@ index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185c } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -179,6 +193,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -180,6 +194,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[i].remove(player); } // Paper end - use distance map to optimise tracker @@ -233,7 +233,7 @@ index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185c } void updateMaps(EntityPlayer player) { -@@ -193,6 +211,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -194,6 +212,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -243,7 +243,7 @@ index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185c } // Paper end -@@ -224,7 +245,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -225,7 +246,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.mailboxWorldGen = this.p.a(threadedmailbox, false); this.mailboxMain = this.p.a(mailbox, false); this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getDimensionManager().hasSkyLight(), threadedmailbox1, this.p.a(threadedmailbox1, false)); @@ -252,7 +252,7 @@ index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185c this.l = supplier; this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); -@@ -267,8 +288,41 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -269,6 +290,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[ordinal] = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); } // Paper end - use distance map to optimise entity tracker @@ -290,11 +290,16 @@ index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185c + // Paper end - optimise PlayerChunkMap#isOutsideRange } + public void updatePlayerMobTypeMap(Entity entity) { +@@ -288,6 +341,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + return entityPlayer.mobCounts[enumCreatureType.ordinal()]; + } + + private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { double d0 = (double) (chunkcoordintpair.x * 16 + 8); double d1 = (double) (chunkcoordintpair.z * 16 + 8); -@@ -447,6 +501,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -466,6 +520,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } else { if (playerchunk != null) { playerchunk.a(j); @@ -302,7 +307,7 @@ index 43209c7392f675f3b9301f654b53b3fceb9ddacf..31ab5510fcaaf9640098d9ab1f56185c } if (playerchunk != null) { -@@ -1415,30 +1470,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1434,30 +1489,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return isOutsideOfRange(chunkcoordintpair, false); } diff --git a/Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch b/Spigot-Server-Patches/0481-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to Spigot-Server-Patches/0481-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch similarity index 95% rename from Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch rename to Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch index 33df15d7aa..6322caba16 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch @@ -23,10 +23,10 @@ index c9164dfdb27ddf3709129c8aec54903a1df121ff..e33e889c291d37a821a4fbd40d9aac7b })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index dfe4baf1973c38e4a443a2b1d6b1eb19140137e1..6b1b4780a8553dfd7da32c3e9e76b142122f6a74 100644 +index 5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162..0746932a3191669052f15270f5c94efbce0bd0c2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -629,4 +629,9 @@ public class PaperWorldConfig { +@@ -634,4 +634,9 @@ public class PaperWorldConfig { phantomIgnoreCreative = getBoolean("phantoms-do-not-spawn-on-creative-players", phantomIgnoreCreative); phantomOnlyAttackInsomniacs = getBoolean("phantoms-only-attack-insomniacs", phantomOnlyAttackInsomniacs); } @@ -115,10 +115,10 @@ index 7e57a53ec614a2f7d2672edff9d7c0e0dca42377..c072f61e8c88eac8335acd660d8ff0e2 if (flag1) { ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8177781a9cbba57097c5873fd917ff5d9954ccf8..9f2eb5ea511f7b854ff06e321015a464771c86bc 100644 +index fb2b64628b974758cace770ce6debe5e88318ae8..0e3ceb60e503c74fc65b1d08371645ffbb26ef5c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -110,6 +110,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -115,6 +115,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks @@ -221,7 +221,7 @@ index 7f660d3c528f5fb4150e4ee8b29913436f125b06..40347212ad1bcf857d5b8ddb0ee6a698 public CompletableFuture> a(ChunkStatus chunkstatus, PlayerChunkMap playerchunkmap) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de5757f380 100644 +index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09cc6e60a9 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -95,7 +95,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -233,7 +233,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -169,6 +169,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -170,6 +170,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -256,7 +256,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -185,6 +201,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -186,6 +202,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -276,7 +276,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -197,6 +226,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -198,6 +227,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerMobSpawnMap.remove(player); this.playerChunkTickRangeMap.remove(player); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -288,7 +288,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de } void updateMaps(EntityPlayer player) { -@@ -214,6 +248,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -215,6 +249,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -308,7 +308,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de } // Paper end -@@ -320,6 +367,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -322,6 +369,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } }); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -353,8 +353,8 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de + // Paper end - no-tick view distance } - private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER -@@ -1121,15 +1207,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + public void updatePlayerMobTypeMap(Entity entity) { +@@ -1140,15 +1226,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { completablefuture1.thenAcceptAsync((either) -> { either.mapLeft((chunk) -> { this.u.getAndIncrement(); @@ -372,7 +372,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de }); return completablefuture1; } -@@ -1224,32 +1306,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1243,32 +1325,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -426,7 +426,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de protected void sendChunk(EntityPlayer entityplayer, ChunkCoordIntPair chunkcoordintpair, Packet[] apacket, boolean flag, boolean flag1) { if (entityplayer.world == this.world) { -@@ -1257,7 +1345,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1276,7 +1364,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunk playerchunk = this.getVisibleChunk(chunkcoordintpair.pair()); if (playerchunk != null) { @@ -435,7 +435,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de if (chunk != null) { this.a(entityplayer, apacket, chunk); -@@ -1518,6 +1606,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1537,6 +1625,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end - optimise isOutsideOfRange @@ -443,7 +443,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de private boolean b(EntityPlayer entityplayer) { return entityplayer.isSpectator() && !this.world.getGameRules().getBoolean(GameRules.SPECTATORS_GENERATE_CHUNKS); } -@@ -1545,13 +1634,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1564,13 +1653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.removePlayerFromDistanceMaps(entityplayer); // Paper - distance maps } @@ -458,7 +458,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de } -@@ -1559,7 +1642,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1578,7 +1661,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { SectionPosition sectionposition = SectionPosition.a((Entity) entityplayer); entityplayer.a(sectionposition); @@ -467,7 +467,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de return sectionposition; } -@@ -1604,6 +1687,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1623,6 +1706,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int k1; int l1; @@ -475,7 +475,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de if (Math.abs(i1 - i) <= this.viewDistance * 2 && Math.abs(j1 - j) <= this.viewDistance * 2) { k1 = Math.min(i, i1) - this.viewDistance; l1 = Math.min(j, j1) - this.viewDistance; -@@ -1641,7 +1725,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1660,7 +1744,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.sendChunk(entityplayer, chunkcoordintpair1, new Packet[2], false, true); } } @@ -484,7 +484,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de this.updateMaps(entityplayer); // Paper - distance maps -@@ -1649,11 +1733,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1668,11 +1752,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public Stream a(ChunkCoordIntPair chunkcoordintpair, boolean flag) { @@ -535,7 +535,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de } protected void addEntity(Entity entity) { -@@ -1811,6 +1930,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1830,6 +1949,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -543,7 +543,7 @@ index 31ab5510fcaaf9640098d9ab1f56185cec1eb680..03e94dbd750ee3181472bb74c3fbc7de private void a(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { if (apacket[0] == null) { apacket[0] = new PacketPlayOutMapChunk(chunk, 65535, true); -@@ -1996,7 +2116,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2015,7 +2135,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ); PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair()); diff --git a/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch b/Spigot-Server-Patches/0483-Add-villager-reputation-API.patch similarity index 100% rename from Spigot-Server-Patches/0482-Add-villager-reputation-API.patch rename to Spigot-Server-Patches/0483-Add-villager-reputation-API.patch diff --git a/Spigot-Server-Patches/0483-Fix-Light-Command.patch b/Spigot-Server-Patches/0484-Fix-Light-Command.patch similarity index 98% rename from Spigot-Server-Patches/0483-Fix-Light-Command.patch rename to Spigot-Server-Patches/0484-Fix-Light-Command.patch index aa628605d8..e4180ffedb 100644 --- a/Spigot-Server-Patches/0483-Fix-Light-Command.patch +++ b/Spigot-Server-Patches/0484-Fix-Light-Command.patch @@ -136,7 +136,7 @@ index 40347212ad1bcf857d5b8ddb0ee6a698e2568201..e5751adde516544722b95016f64b2a46 // Paper start - per player view distance // there can be potential desync with player's last mapped section and the view distance map, so use the diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ecc5992beebbc7088b3c398ec7c2e85e9fdf2ed9..044f7a101a8154759f7469b8a864ea09a7919853 100644 +index fe343f70ce8024c86363637fda8e5c09cc6e60a9..750749f8533e95b33a6f555900c23bb11b3fda40 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -96,6 +96,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -152,7 +152,7 @@ index ecc5992beebbc7088b3c398ec7c2e85e9fdf2ed9..044f7a101a8154759f7469b8a864ea09 public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -286,11 +292,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -287,11 +293,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { Mailbox mailbox = Mailbox.a("main", iasynctaskhandler::a); this.worldLoadListener = worldloadlistener; diff --git a/Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0485-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch rename to Spigot-Server-Patches/0485-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0486-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch rename to Spigot-Server-Patches/0486-Optimize-brigadier-child-sorting-performance.patch diff --git a/Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch b/Spigot-Server-Patches/0487-Don-t-toString-block-unless-actually-showing-the-mes.patch similarity index 100% rename from Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch rename to Spigot-Server-Patches/0487-Don-t-toString-block-unless-actually-showing-the-mes.patch diff --git a/Spigot-Server-Patches/0487-Potential-bed-API.patch b/Spigot-Server-Patches/0488-Potential-bed-API.patch similarity index 100% rename from Spigot-Server-Patches/0487-Potential-bed-API.patch rename to Spigot-Server-Patches/0488-Potential-bed-API.patch diff --git a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch rename to Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch diff --git a/Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/Spigot-Server-Patches/0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to Spigot-Server-Patches/0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/Spigot-Server-Patches/0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 100% rename from Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to Spigot-Server-Patches/0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch diff --git a/Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch b/Spigot-Server-Patches/0492-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 100% rename from Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to Spigot-Server-Patches/0492-Optimize-NibbleArray-to-use-pooled-buffers.patch diff --git a/Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch b/Spigot-Server-Patches/0493-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch rename to Spigot-Server-Patches/0493-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 96% rename from Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index f0b118d867..25023a5205 100644 --- a/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -39,10 +39,10 @@ index 0c46297e6ff229538d77b2f481e4ab13ea14c48e..f75c09d44a19f84588f21a55ea8f0dd8 if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.isOnGround()) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 6fe15ed9440cb34829052aee13b175398b2f4e8a..e272567d8bf064802d2ce434397d0d2c8595bcce 100644 +index 750749f8533e95b33a6f555900c23bb11b3fda40..2938a7d46a471aca89b3dc3d8cad0659aea7c69f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -2112,9 +2112,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2131,9 +2131,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public void updatePlayer(EntityPlayer entityplayer) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (entityplayer != this.tracker) { diff --git a/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0495-Ensure-safe-gateway-teleport.patch similarity index 100% rename from Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch rename to Spigot-Server-Patches/0495-Ensure-safe-gateway-teleport.patch diff --git a/Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0496-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch rename to Spigot-Server-Patches/0496-Add-option-for-console-having-all-permissions.patch diff --git a/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch similarity index 97% rename from Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch rename to Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch index c6ccac7cf5..6e53596b7f 100644 --- a/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch +++ b/Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch @@ -37,10 +37,10 @@ index 860dc98ab4f84c470b27726314943936d23fcb79..8d45588ecfa33b8c7335df3db58ed686 return chunksection == Chunk.a || chunksection.c(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index e272567d8bf064802d2ce434397d0d2c8595bcce..dcbc97e5b00ffaf12984cd9b34fb513403822132 100644 +index 2938a7d46a471aca89b3dc3d8cad0659aea7c69f..6dd64ce8794b8c2b5704556532159135e85a4b6c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1937,12 +1937,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1956,12 +1956,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 98% rename from Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 8517bd072b..bc95ef1881 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -484,7 +484,7 @@ index c072f61e8c88eac8335acd660d8ff0e2f9db819e..4c4108705e9d25912e57a7b3c28b4f1a 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 c265631a2a581a913ab460f816fc70394eb7323f..a165b863003fddef179f95b2d987ac7873ede1e8 100644 +index a6363b73522f9d27534b6e80f4b3789e84316c49..604e7004b659daed2844ba1a76bf09288ec549e5 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -443,6 +443,26 @@ public class ChunkProviderServer extends IChunkProvider { @@ -570,7 +570,7 @@ index c265631a2a581a913ab460f816fc70394eb7323f..a165b863003fddef179f95b2d987ac78 boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 9f2eb5ea511f7b854ff06e321015a464771c86bc..c4295e4f2753111764ef0ca8f079aec145d4e87c 100644 +index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a23a9b5005 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -55,6 +55,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -586,9 +586,9 @@ index 9f2eb5ea511f7b854ff06e321015a464771c86bc..c4295e4f2753111764ef0ca8f079aec1 private float lastHealthSent = -1.0E8F; private int lastFoodSent = -99999999; private boolean lastSentSaturationZero = true; -@@ -130,6 +136,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.canPickUpLoot = true; +@@ -136,6 +142,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.maxHealthCache = this.getMaxHealth(); + this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper } + // Paper start + public BlockPosition getPointInFront(double inFront) { @@ -608,7 +608,7 @@ index 9f2eb5ea511f7b854ff06e321015a464771c86bc..c4295e4f2753111764ef0ca8f079aec1 // Yes, this doesn't match Vanilla, but it's the best we can do for now. // If this is an issue, PRs are welcome -@@ -478,6 +499,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -484,6 +505,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn) super.tick(); } @@ -882,7 +882,7 @@ index e5751adde516544722b95016f64b2a46c16e77ce..04dea2c9fd9337631a6289c7242338e1 } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2618adf9e 100644 +index 6dd64ce8794b8c2b5704556532159135e85a4b6c..ae42793b5a2f5bb06f068d0365378776901a4351 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -51,6 +51,7 @@ import org.apache.commons.lang3.mutable.MutableBoolean; @@ -901,7 +901,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 public final ChunkGenerator chunkGenerator; private final Supplier l; public final Supplier getWorldPersistentDataSupplier() { return this.l; } // Paper - OBFHELPER private final VillagePlace m; -@@ -124,6 +126,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -125,6 +127,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void execute(Runnable runnable) { @@ -909,7 +909,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 if (queued == null) { queued = new java.util.ArrayDeque<>(); } -@@ -132,6 +135,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -133,6 +136,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void run() { @@ -917,7 +917,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 if (queued == null) { return; } -@@ -286,6 +290,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -287,6 +291,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.world = worldserver; this.chunkGenerator = chunkgenerator; this.executor = iasynctaskhandler; @@ -933,7 +933,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 ThreadedMailbox threadedmailbox = ThreadedMailbox.a(executor, "worldgen"); iasynctaskhandler.getClass(); -@@ -379,6 +392,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -381,6 +394,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet newState) -> { @@ -941,7 +941,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 if (newState.size() != 1) { return; } -@@ -397,7 +411,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -399,7 +413,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(rangeX, rangeZ); PlayerChunkMap.this.world.getChunkProvider().removeTicketAtLevel(TicketType.PLAYER, chunkPos, 31, chunkPos); // entity ticking level, TODO check on update @@ -954,7 +954,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 this.playerViewDistanceNoTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); this.playerViewDistanceBroadcastMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -414,6 +432,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -416,6 +434,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }); // Paper end - no-tick view distance } @@ -1069,9 +1069,9 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 + } + // Paper end - private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER - private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { -@@ -526,6 +654,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + public void updatePlayerMobTypeMap(Entity entity) { + if (!this.world.paperConfig.perPlayerMobSpawns) { +@@ -545,6 +673,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { List>> list = Lists.newArrayList(); int j = chunkcoordintpair.x; int k = chunkcoordintpair.z; @@ -1079,7 +1079,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 for (int l = -i; l <= i; ++l) { for (int i1 = -i; i1 <= i; ++i1) { -@@ -544,6 +673,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -563,6 +692,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkStatus chunkstatus = (ChunkStatus) intfunction.apply(j1); CompletableFuture> completablefuture = playerchunk.a(chunkstatus, this); @@ -1094,7 +1094,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 list.add(completablefuture); } -@@ -1009,14 +1146,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1028,14 +1165,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; CompletableFuture chunkSaveFuture = this.world.asyncChunkTaskManager.getChunkSaveFuture(chunkcoordintpair.x, chunkcoordintpair.z); @@ -1122,7 +1122,7 @@ index dcbc97e5b00ffaf12984cd9b34fb513403822132..0f0f6b73b97fc9eef95cf680b85d7ac2 return ret; // Paper end } -@@ -1153,7 +1298,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1172,7 +1317,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { long i = playerchunk.i().pair(); playerchunk.getClass(); diff --git a/Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 100% rename from Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to Spigot-Server-Patches/0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch diff --git a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 100% rename from Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch diff --git a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch similarity index 93% rename from Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch rename to Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch index 92fe8aa19c..0de038ba5a 100644 --- a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch +++ b/Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch @@ -54,10 +54,10 @@ index 04dea2c9fd9337631a6289c7242338e166d6bc1e..446c401b3139f8c6c0e70d883340f014 // Paper start - no-tick view distance public final Chunk getSendingChunk() { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 0f0f6b73b97fc9eef95cf680b85d7ac2618adf9e..77e804086f52527c43499af44d59aebb5b246f61 100644 +index ae42793b5a2f5bb06f068d0365378776901a4351..0e684a040b1a6cee056e8716c2a69620fc440af3 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -721,7 +721,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -740,7 +740,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return either.mapLeft((list) -> { return (Chunk) list.get(list.size() / 2); }); @@ -66,7 +66,7 @@ index 0f0f6b73b97fc9eef95cf680b85d7ac2618adf9e..77e804086f52527c43499af44d59aebb } @Nullable -@@ -1071,7 +1071,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1090,7 +1090,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { IChunkAccess ichunkaccess = (IChunkAccess) optional.get(); if (ichunkaccess.getChunkStatus().b(chunkstatus)) { @@ -75,7 +75,7 @@ index 0f0f6b73b97fc9eef95cf680b85d7ac2618adf9e..77e804086f52527c43499af44d59aebb if (chunkstatus == ChunkStatus.LIGHT) { completablefuture1 = this.b(playerchunk, chunkstatus); -@@ -1087,7 +1087,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1106,7 +1106,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return this.b(playerchunk, chunkstatus); } } @@ -84,7 +84,7 @@ index 0f0f6b73b97fc9eef95cf680b85d7ac2618adf9e..77e804086f52527c43499af44d59aebb } } -@@ -1206,6 +1206,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1225,6 +1225,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); }); }, (runnable) -> { diff --git a/Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch b/Spigot-Server-Patches/0502-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch rename to Spigot-Server-Patches/0502-Fix-villager-trading-demand-MC-163962.patch diff --git a/Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch b/Spigot-Server-Patches/0503-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch rename to Spigot-Server-Patches/0503-Maps-shouldn-t-load-chunks.patch diff --git a/Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/Spigot-Server-Patches/0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to Spigot-Server-Patches/0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch rename to Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch diff --git a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0506-Optimize-Light-Engine.patch similarity index 99% rename from Spigot-Server-Patches/0505-Optimize-Light-Engine.patch rename to Spigot-Server-Patches/0506-Optimize-Light-Engine.patch index 3f222f6058..ef8f6e59ba 100644 --- a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0506-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 a165b863003fddef179f95b2d987ac7873ede1e8..70fdce2946b94fad32cd7d31f990c4d7916a6e53 100644 +index 604e7004b659daed2844ba1a76bf09288ec549e5..ef980f9859d1d7d0d5e13d0d70e998055f92135e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1029,7 +1029,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -1044,7 +1044,7 @@ public class ChunkProviderServer extends IChunkProvider { if (ChunkProviderServer.this.tickDistanceManager()) { return true; } else { @@ -1281,10 +1281,10 @@ index 446c401b3139f8c6c0e70d883340f0140d94b752..a3bce8f13bf278af2d6870891daa9bf6 if (getCurrentPriority() != priority) { this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index bf60b43bf3cb75b7545193958e5508415fa55986..46f8fe23cf4442334d344365baba77b2a6394e1b 100644 +index 0e684a040b1a6cee056e8716c2a69620fc440af3..8c5639fa55404474df8656d3f6ad2db1bc71e3da 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -634,6 +634,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -653,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end } diff --git a/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 97% rename from Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 6c2d7d593e..4738b38c7b 100644 --- a/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6b1b4780a8553dfd7da32c3e9e76b142122f6a74..c1e36576d572b779500d2cb2566076be894ca8a2 100644 +index 0746932a3191669052f15270f5c94efbce0bd0c2..0f4fca90fd6c3788a5762c96c344899cb1665466 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -634,4 +634,13 @@ public class PaperWorldConfig { +@@ -639,4 +639,13 @@ public class PaperWorldConfig { private void viewDistance() { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch b/Spigot-Server-Patches/0509-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch rename to Spigot-Server-Patches/0509-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/Spigot-Server-Patches/0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to Spigot-Server-Patches/0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0511-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch rename to Spigot-Server-Patches/0511-Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/Spigot-Server-Patches/0511-Fix-sand-duping.patch b/Spigot-Server-Patches/0512-Fix-sand-duping.patch similarity index 100% rename from Spigot-Server-Patches/0511-Fix-sand-duping.patch rename to Spigot-Server-Patches/0512-Fix-sand-duping.patch diff --git a/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch rename to Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0514-Fix-enderdragon-exp-dupe.patch similarity index 100% rename from Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch rename to Spigot-Server-Patches/0514-Fix-enderdragon-exp-dupe.patch diff --git a/Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-Server-Patches/0515-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-Server-Patches/0515-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0516-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch rename to Spigot-Server-Patches/0516-Expose-Arrow-getItemStack.patch diff --git a/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch b/Spigot-Server-Patches/0518-Add-PrepareGrindstoneEvent.patch similarity index 100% rename from Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch rename to Spigot-Server-Patches/0518-Add-PrepareGrindstoneEvent.patch diff --git a/Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch b/Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch similarity index 100% rename from Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch rename to Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch From c29c36e782237d6b879d19eb7e845500570789c5 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 22:12:11 -0700 Subject: [PATCH 25/95] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3284612a SPIGOT-5853: Add DragonBattle#generateEndPortal() e4db04ae SPIGOT-5841: New map colours broken CraftBukkit Changes: d4243510 SPIGOT-5853: DragonBattle#getEndPortalLocation() throws NPE on new world 1601ec31 SPIGOT-5845: ChatColor.RESET does not work in ItemMeta to reset italics 4d92db6f CraftChatMessageTest does not need AbstractTestingBase 71045d3d SPIGOT-5828: Unlock worlds on unload dbc347b9 SPIGOT-5841: New map colours broken 14053c70 SPIGOT-5847: BlockFadeEvent cannot be triggered asynchronously from another thread Spigot Changes: 6f4ff1b6 SPIGOT-5851: ChatColor (HEX) doesn't appear correctly in the ActionBar d94a518a SPIGOT-5848: PlayerSpawnLocationEvent throws NPE when setting a location of another world --- .../0002-Paper-config-files.patch | 4 ++-- Spigot-Server-Patches/0009-Timings-v2.patch | 12 +++++------ ...023-Further-improve-server-tick-loop.patch | 4 ++-- .../0042-Add-PlayerInitialSpawnEvent.patch | 9 +++++---- .../0046-Expose-server-CommandMap.patch | 4 ++-- ...llow-Reloading-of-Custom-Permissions.patch | 4 ++-- ...dDebugInfo-not-initialized-on-client.patch | 4 ++-- .../0088-Configurable-Player-Collision.patch | 8 ++++---- ...091-Prevent-Fire-from-loading-chunks.patch | 14 ++++++------- ...setting-for-proxy-online-mode-status.patch | 4 ++-- ...1-Allow-Reloading-of-Command-Aliases.patch | 4 ++-- .../0136-Enforce-Sync-Player-Saves.patch | 4 ++-- ...le-async-calls-to-restart-the-server.patch | 6 +++--- ...n-option-to-prevent-player-names-fro.patch | 4 ++-- ...oleAppender-for-console-improvements.patch | 6 +++--- .../0153-Basic-PlayerProfile-API.patch | 4 ++-- .../0161-ProfileWhitelistVerifyEvent.patch | 6 +++--- .../0182-AsyncTabCompleteEvent.patch | 4 ++-- .../0205-getPlayerUniqueId-API.patch | 4 ++-- ...to-disable-ender-dragon-legacy-check.patch | 20 +------------------ .../0238-InventoryCloseEvent-Reason-API.patch | 8 ++++---- .../0263-Add-TNTPrimeEvent.patch | 6 +++--- ...70-Use-ConcurrentHashMap-in-JsonList.patch | 4 ++-- ...ault-permission-message-configurable.patch | 4 ++-- ...-Manager-and-add-advanced-packet-sup.patch | 6 +++--- ...0-Fix-Whitelist-On-Off-inconsistency.patch | 4 ++-- ...oggleEvent-when-whitelist-is-toggled.patch | 4 ++-- .../0345-Entity-getEntitySpawnReason.patch | 4 ++-- ...347-Implement-PlayerPostRespawnEvent.patch | 8 ++++---- ...isPrimaryThread-and-MinecraftServer-.patch | 4 ++-- .../0383-Fix-MC-158900.patch | 4 ++-- ...392-Expose-the-internal-current-tick.patch | 4 ++-- ...-sneak-when-changing-worlds-MC-10657.patch | 4 ++-- ...ptimize-Collision-to-not-load-chunks.patch | 4 ++-- ...-Add-tick-times-API-and-mspt-command.patch | 4 ++-- ...443-Expose-MinecraftServer-isRunning.patch | 4 ++-- .../0448-Improved-Watchdog-Support.patch | 8 ++++---- ...62-Broadcast-join-message-to-console.patch | 4 ++-- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 10 +++++----- ...Load-Chunks-for-Login-Asynchronously.patch | 20 +++++++++---------- ...t-fire-BlockFade-on-worldgen-threads.patch | 8 ++++---- .../0478-Implement-Mob-Goal-API.patch | 4 ++-- ...No-Tick-view-distance-implementation.patch | 8 ++++---- ...k-Priority-Urgency-System-for-Chunks.patch | 12 +++++------ ...-packets-to-nearby-locations-sounds-.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 48 files changed, 136 insertions(+), 153 deletions(-) diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index ed15fc3e73..221868c1de 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -636,7 +636,7 @@ index d5e1da2eeea7c06289f52509af844df59e8a29b2..63d3d43f74bed94cd03aa3b7254e6630 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 f306530642c56020c390afbcdddf5cbf343a7b2b..f20a68bafc5abb76c60fba85c228bf15f05d309a 100644 +index 87fe70ed5f333d84018020b42fe375ce247451b4..a85b7a93a974263e2c3d7546ddfe4707781ef165 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -801,6 +801,7 @@ public final class CraftServer implements Server { @@ -663,7 +663,7 @@ index f306530642c56020c390afbcdddf5cbf343a7b2b..f20a68bafc5abb76c60fba85c228bf15 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2074,4 +2077,35 @@ public final class CraftServer implements Server { +@@ -2075,4 +2078,35 @@ public final class CraftServer implements Server { { return spigot; } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index b13cff8af6..5c2cf20ab2 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1489,7 +1489,7 @@ index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf43 PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f51bae1a01b6ac158f808d85bc77cb03a8f19aa3..7464ef739bf673baab8661e561abbe9266b888c4 100644 +index 500977885d4cfbfd9d86824074d3f1903e1fc6cb..c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1499,7 +1499,7 @@ index f51bae1a01b6ac158f808d85bc77cb03a8f19aa3..7464ef739bf673baab8661e561abbe92 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -940,10 +941,11 @@ public abstract class PlayerList { +@@ -941,10 +942,11 @@ public abstract class PlayerList { } public void savePlayers() { @@ -1758,10 +1758,10 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98f // 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 f20a68bafc5abb76c60fba85c228bf15f05d309a..36e44309d5c8467c79da981ea957c17ebabe9595 100644 +index a85b7a93a974263e2c3d7546ddfe4707781ef165..0094d9251251845fbacff6d458443385627ca0c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2047,12 +2047,31 @@ public final class CraftServer implements Server { +@@ -2048,12 +2048,31 @@ public final class CraftServer implements Server { private final Spigot spigot = new Spigot() { @@ -1963,10 +1963,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 af2462a8bbf617a0c949d9e3536581d7500e90ee..51782a02c0882acca208b71bbd75946f6396dcce 100644 +index c5216d62660631f54d50575c30717f4052c10f8f..661c8b3c81be46ef2c9488bb52d1963c7f0e89e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1761,6 +1761,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1757,6 +1757,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index 1bd79f8a89..75ad04ddf8 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -140,10 +140,10 @@ index 1fcdbbbc7b60edd1e87bab5f1c5d19a6755de17c..0f2011a776619301dd6a133b9a4044b4 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 0f49da25bb6a1aaad18cbd57d0d312769fe50c3e..9cf0d095db124976c7777ff78a6a1f1f46f4a363 100644 +index 3e2328079f5f98f3f10cc1badd1059a3703eb2d7..0f5af8365abe99971a815285703a3b598f130a0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2044,6 +2044,17 @@ public final class CraftServer implements Server { +@@ -2045,6 +2045,17 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch index 78170682aa..2c0b62349f 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch @@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and improve setPosition to use raw diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1e942e8ef 100644 +index c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd..29a7866190fea78c025c2e59a48ed92239f6a446 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -143,14 +143,14 @@ public abstract class PlayerList { +@@ -143,7 +143,7 @@ public abstract class PlayerList { // Spigot start - spawn location event Player bukkitPlayer = entityplayer.getBukkitEntity(); @@ -21,9 +21,10 @@ index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1 Bukkit.getPluginManager().callEvent(ev); Location loc = ev.getSpawnLocation(); - worldserver = ((CraftWorld) loc.getWorld()).getHandle(); +@@ -151,7 +151,7 @@ public abstract class PlayerList { - entityplayer.spawnIn(worldserver); + entityplayer.spawnIn(worldserver1); + entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); - entityplayer.setPosition(loc.getX(), loc.getY(), loc.getZ()); + entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world) entityplayer.setYawPitch(loc.getYaw(), loc.getPitch()); diff --git a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch index 349e370b9e..2ef1a03e15 100644 --- a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0046-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 35f0527f6dbd06660a1ca4ce528ac1e8c056bb16..3768215d57f4025bdb83913e45b12119d53e1002 100644 +index 5ff0456b781b6a6fbc674e2c532b73f3245f5fd5..3a0e0139db61405e8307abb3d17d1836f45bd8a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1698,6 +1698,7 @@ public final class CraftServer implements Server { +@@ -1699,6 +1699,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index d6793e5e70..13f18882d7 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-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 228106442d8f6d425a0d15c816532223749e03be..73f140771bac6bfda57bbd402a1603cedf8c38b5 100644 +index 30701934a3b7cc7d2a502fe7c3c251a9f268a9bc..72fb341e77b73ace8555cfc1bfdb3bbab726f1e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2163,5 +2163,23 @@ public final class CraftServer implements Server { +@@ -2164,5 +2164,23 @@ public final class CraftServer implements Server { return null; } } diff --git a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch index ed2c6e14c1..8325abf6c0 100644 --- a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 80fec11079b71569dbfcfd399df325a1e942e8ef..42e7394326237fcb466ac9727b5ac732518cf1b9 100644 +index 29a7866190fea78c025c2e59a48ed92239f6a446..5945786f5093ac8f6cd7cde74f6cb746efffbb1e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -173,6 +173,7 @@ public abstract class PlayerList { +@@ -174,6 +174,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index 619287ad8b..ef5783bcfb 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -57,7 +57,7 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19 packetdataserializer.a(this.c); packetdataserializer.a(this.d); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a6326c8d9 100644 +index 5945786f5093ac8f6cd7cde74f6cb746efffbb1e..9d3b8be7a854828d6e3009e0ad4726c7f134b5e3 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -75,6 +75,7 @@ public abstract class PlayerList { @@ -68,7 +68,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) { this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this); -@@ -304,6 +305,13 @@ public abstract class PlayerList { +@@ -305,6 +306,13 @@ public abstract class PlayerList { } entityplayer.syncInventory(); @@ -82,7 +82,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a // CraftBukkit - Moved from above, added world PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), worldserver1.worldDataServer.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ()); } -@@ -421,6 +429,16 @@ public abstract class PlayerList { +@@ -422,6 +430,16 @@ public abstract class PlayerList { entityplayer.playerTick(); // SPIGOT-924 // CraftBukkit end @@ -99,7 +99,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1058,6 +1076,13 @@ public abstract class PlayerList { +@@ -1059,6 +1077,13 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch index 94a30fc38d..f1ba6191ea 100644 --- a/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch @@ -7,10 +7,10 @@ This causes the nether to spam unload/reload chunks, plus overall bad behavior. diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6 100644 +index 9f139dd2dbf9706cb018ee26c1315dc29067d68e..9c3b79c1314dedae06278328b6ca722d5ff1e60d 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java -@@ -95,7 +95,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -99,7 +99,7 @@ public class BlockFire extends BlockFireAbstract { BlockStateBoolean blockstateboolean = (BlockStateBoolean) BlockFire.p.get(enumdirection); if (blockstateboolean != null) { @@ -19,7 +19,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 } } -@@ -175,6 +175,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -179,6 +179,7 @@ public class BlockFire extends BlockFireAbstract { } blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, l, j1, i1); @@ -27,7 +27,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 int l1 = this.a((IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition); if (l1 > 0) { -@@ -220,10 +221,16 @@ public class BlockFire extends BlockFireAbstract { +@@ -224,10 +225,16 @@ public class BlockFire extends BlockFireAbstract { } private void trySpread(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition @@ -46,7 +46,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 // CraftBukkit start org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -269,7 +276,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -273,7 +280,7 @@ public class BlockFire extends BlockFireAbstract { for (int j = 0; j < i; ++j) { EnumDirection enumdirection = aenumdirection[j]; @@ -55,7 +55,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 return true; } } -@@ -287,7 +294,12 @@ public class BlockFire extends BlockFireAbstract { +@@ -291,7 +298,12 @@ public class BlockFire extends BlockFireAbstract { for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[k]; @@ -69,7 +69,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 i = Math.max(this.getFlameChance(iblockdata), i); } -@@ -298,7 +310,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -302,7 +314,7 @@ public class BlockFire extends BlockFireAbstract { @Override protected boolean e(IBlockData iblockdata) { diff --git a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch index 3bf20dc4fb..dc525623d1 100644 --- a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0109-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 2bb31a684906044b159e959dd8acd85efc660b02..fc309214f335ed455c89523ea6a388ba87c7e088 100644 +index 9fdceeeeece358b2456cd66bc585821b7252691e..a201460235816698ee03d5ba5e78cbe505436216 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1476,7 +1476,8 @@ public final class CraftServer implements Server { +@@ -1477,7 +1477,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/0121-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch index c9239582a1..1c15c39733 100644 --- a/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0121-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 fc309214f335ed455c89523ea6a388ba87c7e088..acfa657c62005b04eb9fb438f63240a923c2530f 100644 +index a201460235816698ee03d5ba5e78cbe505436216..56855cbb8daff88c643d97f1e12b0386d1f8ff8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2192,5 +2192,24 @@ public final class CraftServer implements Server { +@@ -2193,5 +2193,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch index aaeb34f775..8c18b6c7fe 100644 --- a/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch @@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 32be0e35918398f2fd5f62c2cb87c4597985b7b3..414e23fc24e90829b71def39b186f1913ce8300d 100644 +index 9d3b8be7a854828d6e3009e0ad4726c7f134b5e3..0da963896038d7b04fe0d410ab5d09a07edae9ab 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -960,11 +960,13 @@ public abstract class PlayerList { +@@ -961,11 +961,13 @@ public abstract class PlayerList { } public void savePlayers() { diff --git a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch index 7eaa9bf50e..04ddd8432c 100644 --- a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch @@ -73,10 +73,10 @@ index 28ade7187d6fd61adbfe65a1944426168b131c4c..878a9de29c728a0b49fb8ee15be85516 // Spigot Start private static double calcTps(double avg, double exp, double tps) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f5831148b5f8e2921306074f710d4b90398e896e..4945adff2f014cb679a61b8fb44d7d48971f20bf 100644 +index 0da963896038d7b04fe0d410ab5d09a07edae9ab..ec57eed04d43287249a6fe105556118c39ea0c48 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1071,10 +1071,15 @@ public abstract class PlayerList { +@@ -1072,10 +1072,15 @@ public abstract class PlayerList { entityplayer.playerInteractManager.b(worldserver.getMinecraftServer().getSaveData().getGameType()); } @@ -93,7 +93,7 @@ index f5831148b5f8e2921306074f710d4b90398e896e..4945adff2f014cb679a61b8fb44d7d48 } // CraftBukkit end -@@ -1086,6 +1091,7 @@ public abstract class PlayerList { +@@ -1087,6 +1092,7 @@ public abstract class PlayerList { } // Paper end } diff --git a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch index 99a48df1de..bf74e8c60f 100644 --- a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,10 +20,10 @@ index c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index acfa657c62005b04eb9fb438f63240a923c2530f..07906b1f25f9547896bc790c22b52a343ff9c940 100644 +index 56855cbb8daff88c643d97f1e12b0386d1f8ff8c..fe331321c126150ae7288dd29f12d87c31483d49 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2211,5 +2211,10 @@ public final class CraftServer implements Server { +@@ -2212,5 +2212,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch index f118ea2637..cafc134884 100644 --- a/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -245,7 +245,7 @@ index 878a9de29c728a0b49fb8ee15be85516176795bd..b06bb3dccda23ebed1532e17f9699b9b public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4945adff2f014cb679a61b8fb44d7d48971f20bf..da86c825de669a6b9cea773b23d277f56a2daee5 100644 +index ec57eed04d43287249a6fe105556118c39ea0c48..49d57f83dc22603b24ab2369ca4ba3a5c9e8b092 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -79,8 +79,7 @@ public abstract class PlayerList { @@ -259,7 +259,7 @@ index 4945adff2f014cb679a61b8fb44d7d48971f20bf..da86c825de669a6b9cea773b23d277f5 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 07906b1f25f9547896bc790c22b52a343ff9c940..1c9b5c376c0750974f52d526414d094fcf3a3e11 100644 +index fe331321c126150ae7288dd29f12d87c31483d49..db41896b45f1608fbeb962d3ffe25d9608b36cc4 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 07906b1f25f9547896bc790c22b52a343ff9c940..1c9b5c376c0750974f52d526414d094f import net.minecraft.server.Advancement; import net.minecraft.server.ArgumentEntity; import net.minecraft.server.BiomeManager; -@@ -1195,9 +1195,13 @@ public final class CraftServer implements Server { +@@ -1196,9 +1196,13 @@ public final class CraftServer implements Server { return logger; } diff --git a/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch index b04c53b0a8..480d6b0367 100644 --- a/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch @@ -560,7 +560,7 @@ index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f72625466 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 71f2a8cfc2e077ce7c576957fd1d36f6612a4ebf..4786a8eaca956435f2f76ee9d5fb9e66658c24a1 100644 +index 60a44992a962e15686f89247823389d3757d8b8c..feea84de7d2184caf24d79faee8874f7698e826e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -225,6 +225,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -573,7 +573,7 @@ index 71f2a8cfc2e077ce7c576957fd1d36f6612a4ebf..4786a8eaca956435f2f76ee9d5fb9e66 public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2228,5 +2231,24 @@ public final class CraftServer implements Server { +@@ -2229,5 +2232,24 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch index a27e3a6867..c4174c8d9a 100644 --- a/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 21f583302e9d8da8c9a9651ce40c64dc8abfa512..70339603aa3e256470be241bf033f3471e2090ea 100644 +index 49d57f83dc22603b24ab2369ca4ba3a5c9e8b092..0f20704c889f28d8e7560b33d366eb8948565071 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -541,7 +541,7 @@ public abstract class PlayerList { +@@ -542,7 +542,7 @@ public abstract class PlayerList { if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot } else if (!this.isWhitelisted(gameprofile)) { chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); @@ -17,7 +17,7 @@ index 21f583302e9d8da8c9a9651ce40c64dc8abfa512..70339603aa3e256470be241bf033f347 } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { IpBanEntry ipbanentry = this.l.get(socketaddress); -@@ -922,9 +922,25 @@ public abstract class PlayerList { +@@ -923,9 +923,25 @@ public abstract class PlayerList { this.server.getCommandDispatcher().a(entityplayer); } diff --git a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch index 5890668a62..8d68a6c3ab 100644 --- a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch @@ -72,10 +72,10 @@ index b2eac041c3ff7d8a7c4524dac381ab95045f28af..fa5c640239451579fba35ad7b0979739 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4786a8eaca956435f2f76ee9d5fb9e66658c24a1..3c22cf8fb454acaff282d8cd6c636f918de76e9e 100644 +index feea84de7d2184caf24d79faee8874f7698e826e..17c92071fabd385e1955fec793eba0b0c5cdd2b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1784,7 +1784,7 @@ public final class CraftServer implements Server { +@@ -1785,7 +1785,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch index 17486f5157..76e67cdb62 100644 --- a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0205-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 3c22cf8fb454acaff282d8cd6c636f918de76e9e..ce3d5e9fd1853ab9519da93ce297ca0bceb9acf8 100644 +index 17c92071fabd385e1955fec793eba0b0c5cdd2b6..499e7d6fecc6223df057fa644f8c449fda910f0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1480,6 +1480,26 @@ public final class CraftServer implements Server { +@@ -1481,6 +1481,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch index 474051f838..621e22b74d 100644 --- a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -19,7 +19,7 @@ index 33ce9a500430a01650e69a3568c8b03db325a936..cea15d50ed89430ee8d8cff9de21e1fc + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a14f4fa278 100644 +index 356defd19ebba5b051b7dbdcc21f0139bbdc4a84..69faefbdbf338b38311cd2a5d3183a104ec36f86 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java @@ -28,10 +28,10 @@ public class EnderDragonBattle { @@ -46,21 +46,3 @@ index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a1 this.world = worldserver; if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) { if (nbttagcompound.b("Dragon")) { -@@ -376,7 +380,7 @@ public class EnderDragonBattle { - - private void a(BlockPosition blockposition) { - this.world.triggerEffect(3000, blockposition, 0); -- WorldGenerator.END_GATEWAY.b((WorldGenFeatureConfiguration) WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); -+ WorldGenerator.END_GATEWAY.b(WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); // Paper - decompile error - } - - private void a(boolean flag) { -@@ -388,7 +392,7 @@ public class EnderDragonBattle { - } - } - -- worldgenendtrophy.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); -+ worldgenendtrophy.b(WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); // Paper - decompile error - } - - private EntityEnderDragon o() { diff --git a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch index f22644abc7..ce46018fb3 100644 --- a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index d94874b02ddcb640c9d94c99d83e77b2e55dce73..1249a7ae8fa8d6ea33cbc276717f1e4553f73b85 100644 +index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481f02956dc 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -155,7 +155,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -101,10 +101,10 @@ index e78306cb187b5f08e32888ebd55c4c486fc8dad2..2cbb0e0e1046efeff7f417d0c976754b this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 70339603aa3e256470be241bf033f3471e2090ea..ef1ea58c252d063ce282d244236a510655538a11 100644 +index 0f20704c889f28d8e7560b33d366eb8948565071..e3611d01c0e20938f8b4ef01ade03a2e3434ed9f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -419,7 +419,7 @@ public abstract class PlayerList { +@@ -420,7 +420,7 @@ public abstract class PlayerList { entityplayer.a(StatisticList.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it @@ -155,7 +155,7 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3..0ba5b2a444660f280b673dbd0db9ded38fa6a839 100644 +index b5d2ce40431247112baaded01e860c1832bf8fd8..bb6635be243a270752e1c47a9646a13ea6707baf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch index 2d395c9953..86b01ed819 100644 --- a/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch +++ b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf21750928302 100644 +index 9c3b79c1314dedae06278328b6ca722d5ff1e60d..a11a775a929c5f868f1b84c56d7e1715a91db236 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -16,7 +16,7 @@ index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf217 import java.util.Map; import java.util.Random; -@@ -249,7 +250,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -253,7 +254,7 @@ public class BlockFire extends BlockFireAbstract { world.setTypeAndData(blockposition, this.a(world, blockposition, l), 3); } else { @@ -25,7 +25,7 @@ index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf217 } Block block = iblockdata.getBlock(); -@@ -257,6 +258,13 @@ public class BlockFire extends BlockFireAbstract { +@@ -261,6 +262,13 @@ public class BlockFire extends BlockFireAbstract { if (block instanceof BlockTNT) { BlockTNT blocktnt = (BlockTNT) block; diff --git a/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch index 01382c17f6..089f727bb8 100644 --- a/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch @@ -122,10 +122,10 @@ index 5b01e4edb3c0f8bc785b70128cbe31b14356e4fb..9213bfb78e92b838189161045e394558 this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ef1ea58c252d063ce282d244236a510655538a11..8c1d836538c678feca56076753e8781eadcd6d1d 100644 +index e3611d01c0e20938f8b4ef01ade03a2e3434ed9f..2acea235633fb6b48c68711bc1cec5b61e7bf140 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -542,7 +542,7 @@ public abstract class PlayerList { +@@ -543,7 +543,7 @@ public abstract class PlayerList { } else if (!this.isWhitelisted(gameprofile)) { chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted diff --git a/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch index fe4dadfe8d..70a4d2e765 100644 --- a/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch @@ -29,10 +29,10 @@ index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 02395d71bc8b457240720cc76a481f9ea1613d79..ce60435cc83dbe0ce0e791de256b67f82052e97b 100644 +index 02dc825a40bc8f289cd4b93ba2e88ee534784730..b97e8c2a42c608b1798c4a1964111c312a125097 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2254,6 +2254,11 @@ public final class CraftServer implements Server { +@@ -2255,6 +2255,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index 8e265a904a..d48e28ee16 100644 --- a/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -338,10 +338,10 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..545dbe6ddcce1d172f465b4a7ab85654 return false; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a6f0b39717164d6b3ab15843b13ef52a24dde5d6..3a5641f9187fc21f367f7a3cd12cec8e4c80dd97 100644 +index f436f30c1e07ac42e35a007cde5a92cc0568e7ff..1950ca8af7335317ec40cf2dfd026115cc29054e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -166,6 +166,7 @@ public abstract class PlayerList { +@@ -167,6 +167,7 @@ public abstract class PlayerList { boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); // Spigot - view distance @@ -349,7 +349,7 @@ index a6f0b39717164d6b3ab15843b13ef52a24dde5d6..3a5641f9187fc21f367f7a3cd12cec8e playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); -@@ -175,6 +176,7 @@ public abstract class PlayerList { +@@ -176,6 +177,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23))); // Paper - fix this rule not being initialized on the client diff --git a/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index 9926dbd007..29b6652eb2 100644 --- a/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -11,10 +11,10 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3a5641f9187fc21f367f7a3cd12cec8e4c80dd97..5c6ea9df899a0649abde8c54e6f844eaf53d27dd 100644 +index 1950ca8af7335317ec40cf2dfd026115cc29054e..0815a8e580465c0fe2700efad67370d1ff514fbf 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -931,9 +931,9 @@ public abstract class PlayerList { +@@ -932,9 +932,9 @@ public abstract class PlayerList { } public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) { boolean isOp = this.operators.d(gameprofile); diff --git a/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index 44c6785dac..97f1c59747 100644 --- a/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5c6ea9df899a0649abde8c54e6f844eaf53d27dd..d4048812723bed08e5bb2aadc651a92570d4bb2a 100644 +index 0815a8e580465c0fe2700efad67370d1ff514fbf..4d9c84348770dea9307488317cf5c36913367ca1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1049,6 +1049,7 @@ public abstract class PlayerList { +@@ -1050,6 +1050,7 @@ public abstract class PlayerList { } public void setHasWhitelist(boolean flag) { diff --git a/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch index d14abfca1f..ede122005a 100644 --- a/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch @@ -59,10 +59,10 @@ index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d4048812723bed08e5bb2aadc651a92570d4bb2a..5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1 100644 +index 4d9c84348770dea9307488317cf5c36913367ca1..4ae901a3516840574a1c31e1002e8c6b248a7d54 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -263,7 +263,7 @@ public abstract class PlayerList { +@@ -264,7 +264,7 @@ public abstract class PlayerList { // CraftBukkit start WorldServer finalWorldServer = worldserver1; Entity entity = EntityTypes.a(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { diff --git a/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch index ef396b3065..2c859b2e55 100644 --- a/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b24b91718 100644 +index 4ae901a3516840574a1c31e1002e8c6b248a7d54..ce1768e1c47179dfc119d7fa315c30510715f1d6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -665,9 +665,14 @@ public abstract class PlayerList { +@@ -666,9 +666,14 @@ public abstract class PlayerList { // this.a(entityplayer1, entityplayer, worldserver1); // CraftBukkit - removed boolean flag2 = false; @@ -24,7 +24,7 @@ index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b WorldServer worldserver1 = this.server.getWorldServer(entityplayer.getSpawnDimension()); if (worldserver1 != null) { Optional optional; -@@ -708,6 +713,7 @@ public abstract class PlayerList { +@@ -709,6 +714,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 @@ -32,7 +32,7 @@ index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b } else { location.setWorld(worldserver.getWorld()); } -@@ -765,6 +771,13 @@ public abstract class PlayerList { +@@ -766,6 +772,13 @@ public abstract class PlayerList { if (entityplayer.playerConnection.isDisconnected()) { this.savePlayerFile(entityplayer); } diff --git a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 7a81706b8b..d00a141ff7 100644 --- a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -29,10 +29,10 @@ index cc493d5d8b621bb69aedc5d2c5121d9199074575..19680baafcc8a5a18ec3f58da6943721 public boolean isDebugging() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ce60435cc83dbe0ce0e791de256b67f82052e97b..d3a3b47fe86579abc1c5d17284717c79a43cf058 100644 +index b97e8c2a42c608b1798c4a1964111c312a125097..1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1780,7 +1780,7 @@ public final class CraftServer implements Server { +@@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { diff --git a/Spigot-Server-Patches/0383-Fix-MC-158900.patch b/Spigot-Server-Patches/0383-Fix-MC-158900.patch index fce6bbf7c2..3b2a5f288f 100644 --- a/Spigot-Server-Patches/0383-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0383-Fix-MC-158900.patch @@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5b3d2bd35ca3f98b8c04ea841023d68b24b91718..18e6b4dad0e78c53e3e39544c343863f79c75274 100644 +index ce1768e1c47179dfc119d7fa315c30510715f1d6..47ec41f114aa09a50f8876d11da7db981e2be2f2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -532,8 +532,10 @@ public abstract class PlayerList { +@@ -533,8 +533,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); diff --git a/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch index 97ad55d39f..a3c6c7bbb8 100644 --- a/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0392-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 d3a3b47fe86579abc1c5d17284717c79a43cf058..c8e79fc2593ba8a7465b06e7e91d1b645da0f84c 100644 +index 1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e..ba3a3c487f0cefa1c0d7394998800a4c4d6486cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2277,5 +2277,10 @@ public final class CraftServer implements Server { +@@ -2278,5 +2278,10 @@ public final class CraftServer implements Server { } return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name); } diff --git a/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 68c118c658..464bc79b1f 100644 --- a/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -18,10 +18,10 @@ index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 18e6b4dad0e78c53e3e39544c343863f79c75274..2f96bf6af8ad4e13bfd9b8b6e00867eb89123a78 100644 +index 47ec41f114aa09a50f8876d11da7db981e2be2f2..9e635fa562264ee9454adb6dd7fc47f45d8b3242 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -760,6 +760,8 @@ public abstract class PlayerList { +@@ -761,6 +761,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect)); } diff --git a/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch index 1968670320..c4a82f1093 100644 --- a/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch @@ -40,10 +40,10 @@ index b27260270de80de371a5a71fa0516aa43c44c83e..1cc40b1f0af9e617b2a71bcc442543e1 Stream c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 2f96bf6af8ad4e13bfd9b8b6e00867eb89123a78..870b5352528384b0bb612cd5379683ee142fb99f 100644 +index 9e635fa562264ee9454adb6dd7fc47f45d8b3242..4189c315176415b121c6e8f8d3c9682caded2189 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -723,6 +723,7 @@ public abstract class PlayerList { +@@ -724,6 +724,7 @@ public abstract class PlayerList { entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // CraftBukkit end diff --git a/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch index e69eb93329..8f26ee76b0 100644 --- a/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch @@ -147,10 +147,10 @@ index 98e3acdc618ceda35e8086746aed698d304321c0..5bef465bfe90b08524862b13f9e22dcf + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c8e79fc2593ba8a7465b06e7e91d1b645da0f84c..05730e5812536e7e2b8dce4bc794b46e9e412d29 100644 +index ba3a3c487f0cefa1c0d7394998800a4c4d6486cb..e7414b9e2307171edc7b2b7583f7d2972b3a5503 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2127,6 +2127,16 @@ public final class CraftServer implements Server { +@@ -2128,6 +2128,16 @@ public final class CraftServer implements Server { net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() }; } diff --git a/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch index 0266d48ad0..55a6d0ae37 100644 --- a/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-Server-Patches/0443-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 05730e5812536e7e2b8dce4bc794b46e9e412d29..71b5c80b462d2d4de737ab608650b0ec9965ace3 100644 +index e7414b9e2307171edc7b2b7583f7d2972b3a5503..43f8a547ab40d427bdeac0edac4040f5ff5576b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2292,5 +2292,10 @@ public final class CraftServer implements Server { +@@ -2293,5 +2293,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } diff --git a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch index 42b65beb77..2053fa68ac 100644 --- a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch @@ -273,10 +273,10 @@ index bb4d54ebee573964cf3026888da108584b12972f..09f94bd242318155dbb46e12224ad3e4 list.stream().map((playerchunk) -> { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0524370c393dff4794abc0dfb28630c533a39ce1..57f408b7b7a50f057f53c9cbea93adbeba97123c 100644 +index 29b802b9b1435479ca2a4b57267967f848162424..8da0d7f543dccc30955cdbc20a34a070d269b8ac 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -430,7 +430,7 @@ public abstract class PlayerList { +@@ -431,7 +431,7 @@ public abstract class PlayerList { cserver.getPluginManager().callEvent(playerQuitEvent); entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); @@ -318,10 +318,10 @@ index 93df6a29035bb3cc96409b145a2e1433d38bbe99..418ba04a837ee2b17cc679edd35ba098 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/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 71b5c80b462d2d4de737ab608650b0ec9965ace3..604723d6f93b694f59f9844486d2b0c8f24a39af 100644 +index 43f8a547ab40d427bdeac0edac4040f5ff5576b5..bae1c62cb5c440ec9f915f602d58635bfbfa361c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1780,7 +1780,7 @@ public final class CraftServer implements Server { +@@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { diff --git a/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch index ee9cb483aa..f95b2371b0 100644 --- a/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 57f408b7b7a50f057f53c9cbea93adbeba97123c..607408c48b0afc9944dc384cd2a441d4d8286d8c 100644 +index 8da0d7f543dccc30955cdbc20a34a070d269b8ac..06c675ce3b61766dbb7b456fd6aa46f55357e1b8 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -212,9 +212,9 @@ public abstract class PlayerList { +@@ -213,9 +213,9 @@ public abstract class PlayerList { joinMessage = playerJoinEvent.getJoinMessage(); if (joinMessage != null && joinMessage.length() > 0) { diff --git a/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index a2fea6c07c..10609b6df6 100644 --- a/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -52,10 +52,10 @@ index 4ab719930f5b35c0ae221e9345f1e2eda7d9d719..8de86684dda275585826617b41d6792f if (!(entity instanceof EntityComplexPart)) { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233ad093822 100644 +index 06c675ce3b61766dbb7b456fd6aa46f55357e1b8..a2c9cb6b5c06a76b5fafb75ef51293832f0f4620 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -201,6 +201,12 @@ public abstract class PlayerList { +@@ -202,6 +202,12 @@ public abstract class PlayerList { this.j.put(entityplayer.getUniqueID(), entityplayer); // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below @@ -68,7 +68,7 @@ index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233 // CraftBukkit start PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); cserver.getPluginManager().callEvent(playerJoinEvent); -@@ -235,6 +241,8 @@ public abstract class PlayerList { +@@ -236,6 +242,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer1})); } entityplayer.sentListPacket = true; @@ -77,7 +77,7 @@ index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233 // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -260,6 +268,11 @@ public abstract class PlayerList { +@@ -261,6 +269,11 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobeffect)); } @@ -89,7 +89,7 @@ index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233 if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -308,6 +321,10 @@ public abstract class PlayerList { +@@ -309,6 +322,10 @@ public abstract class PlayerList { } } diff --git a/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch index d8b2d1dc99..504dbf107b 100644 --- a/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch @@ -110,7 +110,7 @@ index 651ecb50c2b06ca81cb9a2286d77fd41a17b5140..1099a46aa05f12572100994ea251f0d5 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d004171100027e 100644 +index a2c9cb6b5c06a76b5fafb75ef51293832f0f4620..78a4dfb1f62183df0e80787442036e69d40e4461 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -18,6 +18,7 @@ import java.util.Map; @@ -156,7 +156,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // CraftBukkit end if (nbttagcompound != null) { -@@ -184,6 +191,53 @@ public abstract class PlayerList { +@@ -185,6 +192,53 @@ public abstract class PlayerList { entityplayer.B().a(entityplayer); this.sendScoreboard(worldserver1.getScoreboard(), entityplayer); this.server.invalidatePingSample(); @@ -210,7 +210,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 ChatMessage chatmessage; if (entityplayer.getProfile().getName().equalsIgnoreCase(s)) { -@@ -205,7 +259,7 @@ public abstract class PlayerList { +@@ -206,7 +260,7 @@ public abstract class PlayerList { entityplayer.supressTrackerForLogin = true; worldserver.addPlayerJoin(entityplayer); this.server.getBossBattleCustomData().a(entityplayer); // see commented out section below worldserver.addPlayerJoin(entityplayer); @@ -219,7 +219,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // Paper end // CraftBukkit start PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); -@@ -242,7 +296,6 @@ public abstract class PlayerList { +@@ -243,7 +297,6 @@ public abstract class PlayerList { } entityplayer.sentListPacket = true; entityplayer.supressTrackerForLogin = false; // Paper @@ -227,7 +227,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -269,9 +322,10 @@ public abstract class PlayerList { +@@ -270,9 +323,10 @@ public abstract class PlayerList { } // Paper start - move vehicle into method so it can be called above - short circuit around that code @@ -239,7 +239,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // Paper end if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); -@@ -420,6 +474,7 @@ public abstract class PlayerList { +@@ -421,6 +475,7 @@ public abstract class PlayerList { protected void savePlayerFile(EntityPlayer entityplayer) { if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -247,7 +247,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -444,7 +499,7 @@ public abstract class PlayerList { +@@ -445,7 +500,7 @@ public abstract class PlayerList { entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); @@ -256,7 +256,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -497,6 +552,13 @@ public abstract class PlayerList { +@@ -498,6 +553,13 @@ public abstract class PlayerList { // this.p.remove(uuid); // CraftBukkit end } @@ -270,7 +270,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // CraftBukkit start // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -514,7 +576,7 @@ public abstract class PlayerList { +@@ -515,7 +577,7 @@ public abstract class PlayerList { cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end @@ -279,7 +279,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -533,6 +595,13 @@ public abstract class PlayerList { +@@ -534,6 +596,13 @@ public abstract class PlayerList { list.add(entityplayer); } } diff --git a/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch index bceae8f952..31efcfdd5a 100644 --- a/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads Caused a deadlock diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 1e6159f211fb445e45bab3ca1a3bf21750928302..70bcf165b187ba5b3d832f6ad2df87cc51e59bea 100644 +index a11a775a929c5f868f1b84c56d7e1715a91db236..a8875a9a5fa6b285b41f3de1bc81c44f35ea5cce 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -35,6 +35,7 @@ public class BlockFire extends BlockFireAbstract { @@ -15,9 +15,9 @@ index 1e6159f211fb445e45bab3ca1a3bf21750928302..70bcf165b187ba5b3d832f6ad2df87cc // CraftBukkit start + if (!(generatoraccess instanceof WorldServer)) return this.canPlace(iblockdata, generatoraccess, blockposition) ? (IBlockData) this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)) : Blocks.AIR.getBlockData(); // Paper - don't fire events in world generation if (!this.canPlace(iblockdata, generatoraccess, blockposition)) { - CraftBlockState blockState = CraftBlockState.getBlockState(generatoraccess, blockposition); - blockState.setData(Blocks.AIR.getBlockData()); -@@ -46,7 +47,7 @@ public class BlockFire extends BlockFireAbstract { + // Suppress during worldgen + if (!(generatoraccess instanceof World)) { +@@ -50,7 +51,7 @@ public class BlockFire extends BlockFireAbstract { return blockState.getHandle(); } } diff --git a/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch index 25841e366e..f192011904 100644 --- a/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch @@ -838,10 +838,10 @@ index 96f4401044cacf88e8e00b5b18821c105e634fba..112d8bab65bf41263a477c5faa717687 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 893088011b8e15449c3c9003e52a884b61221acc..1cae2af41e866c22a4f7524250cccdd9f99f6cb9 100644 +index 666ed0e87379a5bb9ea95cd95c23eca2df02610f..2b17f2143ee9259c988f65c4db6e82b14dd70876 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2304,5 +2304,11 @@ public final class CraftServer implements Server { +@@ -2305,5 +2305,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch index 6322caba16..9f26f4aeab 100644 --- a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch @@ -553,10 +553,10 @@ index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c263ad3f9f127d798a6c0cdcb3d004171100027e..1514d24ae0da9fd9622333ff8702a0da140bd691 100644 +index 78a4dfb1f62183df0e80787442036e69d40e4461..33d7f60ab0d8bbe90bc561093ed0e764420b0595 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -176,7 +176,7 @@ public abstract class PlayerList { +@@ -177,7 +177,7 @@ public abstract class PlayerList { // Spigot - view distance networkmanager.queueImmunity = true; // Paper @@ -565,7 +565,7 @@ index c263ad3f9f127d798a6c0cdcb3d004171100027e..1514d24ae0da9fd9622333ff8702a0da entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -818,7 +818,7 @@ public abstract class PlayerList { +@@ -819,7 +819,7 @@ public abstract class PlayerList { // CraftBukkit start WorldData worlddata = worldserver1.getWorldData(); entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver1.getTypeKey(), worldserver1.getDimensionKey(), BiomeManager.a(worldserver1.getSeed()), entityplayer1.playerInteractManager.getGameMode(), entityplayer1.playerInteractManager.c(), worldserver1.isDebugWorld(), worldserver1.isFlatWorld(), flag)); @@ -574,7 +574,7 @@ index c263ad3f9f127d798a6c0cdcb3d004171100027e..1514d24ae0da9fd9622333ff8702a0da entityplayer1.spawnIn(worldserver1); entityplayer1.dead = false; entityplayer1.playerConnection.teleport(new Location(worldserver1.getWorld(), entityplayer1.locX(), entityplayer1.locY(), entityplayer1.locZ(), entityplayer1.yaw, entityplayer1.pitch)); -@@ -1285,7 +1285,7 @@ public abstract class PlayerList { +@@ -1286,7 +1286,7 @@ public abstract class PlayerList { public void a(int i) { this.viewDistance = i; diff --git a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index bc95ef1881..e0365afd97 100644 --- a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1144,10 +1144,10 @@ index 553c7313e2b699be88ea01460fd299421c42b176..66dd1b3bfeebab8dd0f4e823dd0daea9 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435edfc91f2e 100644 +index 33d7f60ab0d8bbe90bc561093ed0e764420b0595..8490376b014ac26bda473ea1e0c7a1063c9c70d2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -199,8 +199,8 @@ public abstract class PlayerList { +@@ -200,8 +200,8 @@ public abstract class PlayerList { final ChunkCoordIntPair pos = new ChunkCoordIntPair(chunkX, chunkZ); PlayerChunkMap playerChunkMap = finalWorldserver.getChunkProvider().playerChunkMap; playerChunkMap.chunkDistanceManager.addTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); @@ -1158,7 +1158,7 @@ index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435e PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pos.pair()); if (updatingChunk != null) { return updatingChunk.getEntityTickingFuture(); -@@ -213,7 +213,6 @@ public abstract class PlayerList { +@@ -214,7 +214,6 @@ public abstract class PlayerList { entityplayer, finalWorldserver, finalWorldserver1, networkmanager, playerconnection, nbttagcompound, networkmanager.getSocketAddress().toString(), lastKnownName ); @@ -1166,7 +1166,7 @@ index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435e }; }); } -@@ -617,6 +616,7 @@ public abstract class PlayerList { +@@ -618,6 +617,7 @@ public abstract class PlayerList { SocketAddress socketaddress = loginlistener.networkManager.getSocketAddress(); EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(World.OVERWORLD), gameprofile, new PlayerInteractManager(this.server.getWorldServer(World.OVERWORLD))); @@ -1174,7 +1174,7 @@ index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435e Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); -@@ -812,6 +812,7 @@ public abstract class PlayerList { +@@ -813,6 +813,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper @@ -1231,7 +1231,7 @@ index 8a37871bea36bd34b514428acea1acad2ba5897e..b973bd8f60412232df53ac52d97135de net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f553647b4351b2684f522b40b1e533511efc8ae9..784be20585913ee11fca2c83f169268bf1eb1f20 100644 +index 9e26a15746fcdf80b581b81f836d9df51759f601..2e2b28b145b50549345be5a9c754302d5e645274 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch index 496951e4ac..b52cac350b 100644 --- a/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,10 +11,10 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 84707b373bcd9c4eb302b149f242435edfc91f2e..bbc5e21c0dd6e790493fc2d4d3b0df4c114712e5 100644 +index 8490376b014ac26bda473ea1e0c7a1063c9c70d2..35d7ac60f61ffb493fe4f32b63511b2b86805243 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1062,16 +1062,40 @@ public abstract class PlayerList { +@@ -1063,16 +1063,40 @@ public abstract class PlayerList { } public void sendPacketNearby(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, double d3, ResourceKey resourcekey, Packet packet) { diff --git a/work/Bukkit b/work/Bukkit index edc7a378c9..3284612a10 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit edc7a378c9258ef533f90de135e250ca91b1ae02 +Subproject commit 3284612a10e704b4658aa087213a3fa9670b6926 diff --git a/work/CraftBukkit b/work/CraftBukkit index 4ff609e60c..d424351010 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 4ff609e60c191f107682681b5e3a8262f8a4c844 +Subproject commit d4243510102530684b860dbe927311bf47c488db diff --git a/work/Spigot b/work/Spigot index 16d78990fe..6f4ff1b691 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 16d78990fe27633e0ec129216f96d3b50f770025 +Subproject commit 6f4ff1b691828e538ae534eac66e80a1bf2c1adf From 030f1c137550171a06f2a1fa82024249cda065e6 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 22:37:38 -0700 Subject: [PATCH 26/95] Hide sync chunk writes behind flag --- ...0-Hide-sync-chunk-writes-behind-flag.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch diff --git a/Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch b/Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch new file mode 100644 index 0000000000..143846f239 --- /dev/null +++ b/Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Fri, 26 Jun 2020 22:35:08 -0700 +Subject: [PATCH] Hide sync chunk writes behind flag + +Syncing writes on each write call has terrible performance +on harddrives. + +-DPaper.enable-sync-chunk-writes=true to enable + +diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java +index 1122861a8f9c12668e7bd9d65e63fc9166a66d1a..6786fd0947724069366a2375c710ec518a92f2b1 100644 +--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java ++++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java +@@ -98,7 +98,7 @@ public class DedicatedServerProperties extends PropertyManager { + return MathHelper.clamp(integer, 1, 29999984); + }, 29999984); +- this.syncChunkWrites = this.getBoolean("sync-chunk-writes", true); ++ this.syncChunkWrites = this.getBoolean("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag + this.enableJmxMonitoring = this.getBoolean("enable-jmx-monitoring", false); + this.enableStatus = this.getBoolean("enable-status", true); + this.entityBroadcastRangePercentage = this.a("entity-broadcast-range-percentage", (integer) -> { From 989d44ebe3ab2c8db2cd9c1cdaadbd291cc887ef Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 27 Jun 2020 11:41:45 -0400 Subject: [PATCH 27/95] organize patches --- ...Allow-disabling-armour-stand-ticking.patch | 278 ------------------ ...ets-from-world-player-list-not-serve.patch | 0 ...ro-tick-instant-grow-farms-MC-113809.patch | 0 ...-Fix-spawn-radius-being-treated-as-0.patch | 0 .../0429-Seed-based-feature-search.patch | 0 ...-Villager-AI-optimizations-DROP-1.16.patch | 0 6 files changed, 278 deletions(-) delete mode 100644 removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch rename removed/1.16/{ => No longer Needed}/0276-Send-nearby-packets-from-world-player-list-not-serve.patch (100%) rename removed/1.16/{ => No longer Needed}/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch (100%) rename removed/1.16/{ => No longer Needed}/0412-Fix-spawn-radius-being-treated-as-0.patch (100%) rename removed/1.16/{ => No longer Needed}/0429-Seed-based-feature-search.patch (100%) rename removed/1.16/{ => No longer Needed}/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch (100%) diff --git a/removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch b/removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch deleted file mode 100644 index dca49d7957..0000000000 --- a/removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch +++ /dev/null @@ -1,278 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kashike -Date: Wed, 15 Aug 2018 01:26:09 -0700 -Subject: [PATCH] Allow disabling armour stand ticking - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..bc3df01aab3e79be9c2836820e0eacc69ea6c1f4 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -393,4 +393,10 @@ public class PaperWorldConfig { - private void armorStandEntityLookups() { - armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); - } -+ -+ public boolean armorStandTick = true; -+ private void armorStandTick() { -+ this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); -+ log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); -+ } - } -diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 61d7d507aaac3e7e5a885387ae89c67dfb1c9844..42b9a339e9c35db596ec78881c32c801c2d739f4 100644 ---- a/src/main/java/net/minecraft/server/EntityArmorStand.java -+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -44,6 +44,12 @@ public class EntityArmorStand extends EntityLiving { - public Vector3f leftLegPose; - public Vector3f rightLegPose; - public boolean canMove = true; // Paper -+ // Paper start - Allow ArmorStands not to tick -+ public boolean canTick = true; -+ public boolean canTickSetByAPI = false; -+ private boolean noTickPoseDirty = false; -+ private boolean noTickEquipmentDirty = false; -+ // Paper end - - public EntityArmorStand(EntityTypes entitytypes, World world) { - super(entitytypes, world); -@@ -55,6 +61,7 @@ public class EntityArmorStand extends EntityLiving { - this.rightArmPose = EntityArmorStand.bu; - this.leftLegPose = EntityArmorStand.bv; - this.rightLegPose = EntityArmorStand.bw; -+ if (world != null) this.canTick = world.paperConfig.armorStandTick; // Paper - armour stand ticking - this.H = 0.0F; - } - -@@ -135,6 +142,7 @@ public class EntityArmorStand extends EntityLiving { - this.armorItems.set(enumitemslot.b(), itemstack); - } - -+ this.noTickEquipmentDirty = true; // Paper - Allow equipment to be updated even when tick disabled - } - - @Override -@@ -215,6 +223,7 @@ public class EntityArmorStand extends EntityLiving { - } - - nbttagcompound.set("Pose", this.B()); -+ if (this.canTickSetByAPI) nbttagcompound.setBoolean("Paper.CanTickOverride", this.canTick); // Paper - persist no tick setting - } - - @Override -@@ -246,6 +255,12 @@ public class EntityArmorStand extends EntityLiving { - this.setBasePlate(nbttagcompound.getBoolean("NoBasePlate")); - this.setMarker(nbttagcompound.getBoolean("Marker")); - this.noclip = !this.A(); -+ // Paper start - persist no tick -+ if (nbttagcompound.hasKey("Paper.CanTickOverride")) { -+ this.canTick = nbttagcompound.getBoolean("Paper.CanTickOverride"); -+ this.canTickSetByAPI = true; -+ } -+ // Paper end - NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Pose"); - - this.g(nbttagcompound1); -@@ -600,7 +615,29 @@ public class EntityArmorStand extends EntityLiving { - - @Override - public void tick() { -+ // Paper start -+ if (!this.canTick) { -+ if (this.noTickPoseDirty) { -+ this.noTickPoseDirty = false; -+ this.updatePose(); -+ } -+ -+ if (this.noTickEquipmentDirty) { -+ this.noTickEquipmentDirty = false; -+ this.updateEntityEquipment(); -+ } -+ -+ return; -+ } -+ // Paper end -+ - super.tick(); -+ // Paper start - Split into separate method -+ updatePose(); -+ } -+ -+ public void updatePose() { -+ // Paper end - Vector3f vector3f = (Vector3f) this.datawatcher.get(EntityArmorStand.c); - - if (!this.headPose.equals(vector3f)) { -@@ -723,31 +760,37 @@ public class EntityArmorStand extends EntityLiving { - public void setHeadPose(Vector3f vector3f) { - this.headPose = vector3f; - this.datawatcher.set(EntityArmorStand.c, vector3f); -+ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking - } - - public void setBodyPose(Vector3f vector3f) { - this.bodyPose = vector3f; - this.datawatcher.set(EntityArmorStand.d, vector3f); -+ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking - } - - public void setLeftArmPose(Vector3f vector3f) { - this.leftArmPose = vector3f; - this.datawatcher.set(EntityArmorStand.e, vector3f); -+ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking - } - - public void setRightArmPose(Vector3f vector3f) { - this.rightArmPose = vector3f; - this.datawatcher.set(EntityArmorStand.f, vector3f); -+ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking - } - - public void setLeftLegPose(Vector3f vector3f) { - this.leftLegPose = vector3f; - this.datawatcher.set(EntityArmorStand.g, vector3f); -+ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking - } - - public void setRightLegPose(Vector3f vector3f) { - this.rightLegPose = vector3f; - this.datawatcher.set(EntityArmorStand.bp, vector3f); -+ this.noTickPoseDirty = true; // Paper - Allow updates when not ticking - } - - public Vector3f r() { -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a4051c1f0cdcf179e7afe60d301982412da7ed64..990aea604d02db723193722ed692c3a3725f987d 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2329,52 +2329,7 @@ public abstract class EntityLiving extends Entity { - } - } - -- EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); -- int k = aenumitemslot.length; -- -- for (int l = 0; l < k; ++l) { -- EnumItemSlot enumitemslot = aenumitemslot[l]; -- ItemStack itemstack; -- -- switch (enumitemslot.a()) { -- case HAND: -- itemstack = (ItemStack) this.bu.get(enumitemslot.b()); -- break; -- case ARMOR: -- itemstack = (ItemStack) this.bv.get(enumitemslot.b()); -- break; -- default: -- continue; -- } -- -- ItemStack itemstack1 = this.getEquipment(enumitemslot); -- -- if (!ItemStack.matches(itemstack1, itemstack)) { -- // Paper start - PlayerArmorChangeEvent -- if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { -- final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); -- final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); -- new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); -- } -- // Paper end -- ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); -- if (!itemstack.isEmpty()) { -- this.getAttributeMap().a(itemstack.a(enumitemslot)); -- } -- -- if (!itemstack1.isEmpty()) { -- this.getAttributeMap().b(itemstack1.a(enumitemslot)); -- } -- -- switch (enumitemslot.a()) { -- case HAND: -- this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); -- break; -- case ARMOR: -- this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); -- } -- } -- } -+ updateEntityEquipment(); // Paper - split into own method - - if (this.ticksLived % 20 == 0) { - this.getCombatTracker().g(); -@@ -2475,6 +2430,55 @@ public abstract class EntityLiving extends Entity { - } - } - -+ // Paper start - split into own method from above -+ public void updateEntityEquipment() { -+ EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); -+ int k = aenumitemslot.length; -+ for (int l = 0; l < k; ++l) { -+ EnumItemSlot enumitemslot = aenumitemslot[l]; -+ ItemStack itemstack; -+ -+ switch (enumitemslot.a()) { -+ case HAND: -+ itemstack = (ItemStack) this.bu.get(enumitemslot.b()); -+ break; -+ case ARMOR: -+ itemstack = (ItemStack) this.bv.get(enumitemslot.b()); -+ break; -+ default: -+ continue; -+ } -+ -+ ItemStack itemstack1 = this.getEquipment(enumitemslot); -+ -+ if (!ItemStack.matches(itemstack1, itemstack)) { -+ // Paper start - PlayerArmorChangeEvent -+ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { -+ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); -+ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); -+ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); -+ } -+ // Paper end -+ ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); -+ if (!itemstack.isEmpty()) { -+ this.getAttributeMap().a(itemstack.a(enumitemslot)); -+ } -+ -+ if (!itemstack1.isEmpty()) { -+ this.getAttributeMap().b(itemstack1.a(enumitemslot)); -+ } -+ -+ switch (enumitemslot.a()) { -+ case HAND: -+ this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); -+ break; -+ case ARMOR: -+ this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); -+ } -+ } -+ } -+ } -+ - protected float f(float f, float f1) { - float f2 = MathHelper.g(f - this.aI); - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -index d1d689e5d78c569313c4059c4652724605dc07d2..ac105270d5c7e2070f52782fc7dbdcd381db33a5 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -@@ -297,5 +297,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { - public boolean isSlotDisabled(org.bukkit.inventory.EquipmentSlot slot) { - return getHandle().isSlotDisabled(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot)); - } -+ -+ @Override -+ public boolean canTick() { -+ return this.getHandle().canTick; -+ } -+ -+ @Override -+ public void setCanTick(final boolean tick) { -+ this.getHandle().canTick = tick; -+ this.getHandle().canTickSetByAPI = true; -+ } - // Paper end - } diff --git a/removed/1.16/0276-Send-nearby-packets-from-world-player-list-not-serve.patch b/removed/1.16/No longer Needed/0276-Send-nearby-packets-from-world-player-list-not-serve.patch similarity index 100% rename from removed/1.16/0276-Send-nearby-packets-from-world-player-list-not-serve.patch rename to removed/1.16/No longer Needed/0276-Send-nearby-packets-from-world-player-list-not-serve.patch diff --git a/removed/1.16/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch b/removed/1.16/No longer Needed/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch similarity index 100% rename from removed/1.16/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch rename to removed/1.16/No longer Needed/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch diff --git a/removed/1.16/0412-Fix-spawn-radius-being-treated-as-0.patch b/removed/1.16/No longer Needed/0412-Fix-spawn-radius-being-treated-as-0.patch similarity index 100% rename from removed/1.16/0412-Fix-spawn-radius-being-treated-as-0.patch rename to removed/1.16/No longer Needed/0412-Fix-spawn-radius-being-treated-as-0.patch diff --git a/removed/1.16/0429-Seed-based-feature-search.patch b/removed/1.16/No longer Needed/0429-Seed-based-feature-search.patch similarity index 100% rename from removed/1.16/0429-Seed-based-feature-search.patch rename to removed/1.16/No longer Needed/0429-Seed-based-feature-search.patch diff --git a/removed/1.16/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch b/removed/1.16/No longer Needed/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch similarity index 100% rename from removed/1.16/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch rename to removed/1.16/No longer Needed/0468-Port-20w15a-Villager-AI-optimizations-DROP-1.16.patch From 52f850363902fee93f1cb8272a78aa6155d67ca6 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 27 Jun 2020 12:44:50 -0400 Subject: [PATCH 28/95] someone left this in? --- scripts/importmcdev.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 06ad7ab9b9..269f68bcd4 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -94,7 +94,6 @@ done # import FileName -import VoxelShapeSpliterator ######################################################## ######################################################## From 501c1c78006ba7bac39ad3ba81c7944ec7dd520a Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 27 Jun 2020 14:35:52 -0400 Subject: [PATCH 29/95] port 4 patches --- ...mit-lightning-strike-effect-distance.patch | 93 +++++++++++++ ...22-Add-permission-for-command-blocks.patch | 79 +++++++++++ ...sure-Entity-AABB-s-are-never-invalid.patch | 129 ++++++++++++++++++ ...WorldBorder-collision-checks-and-air.patch | 63 +++++++++ 4 files changed, 364 insertions(+) create mode 100644 Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch create mode 100644 Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch create mode 100644 Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch create mode 100644 Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch diff --git a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch new file mode 100644 index 0000000000..537284d2e1 --- /dev/null +++ b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch @@ -0,0 +1,93 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kickash32 +Date: Sat, 27 Jun 2020 12:37:58 -0400 +Subject: [PATCH] Limit lightning strike effect distance + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 0f4fca90fd6c3788a5762c96c344899cb1665466..4a59d42b778e681e93f1243ecd16c5cf46160b97 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -1,11 +1,5 @@ + package com.destroystokyo.paper; + +-import java.util.Arrays; +-import java.util.EnumMap; +-import java.util.HashMap; +-import java.util.List; +-import java.util.Map; +- + import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; + import org.bukkit.Bukkit; + import org.bukkit.Material; +@@ -13,6 +7,12 @@ import org.bukkit.configuration.ConfigurationSection; + import org.bukkit.configuration.file.YamlConfiguration; + import org.spigotmc.SpigotWorldConfig; + ++import java.util.Arrays; ++import java.util.EnumMap; ++import java.util.HashMap; ++import java.util.List; ++import java.util.Map; ++ + import static com.destroystokyo.paper.PaperConfig.log; + import static com.destroystokyo.paper.PaperConfig.logError; + +@@ -648,4 +648,26 @@ public class PaperWorldConfig { + delayChunkUnloadsBy *= 20; + } + } ++ ++ public double sqrMaxThunderDistance; ++ public double sqrMaxLightningImpactSoundDistance; ++ public double maxLightningFlashDistance; ++ private void lightningStrikeDistanceLimit() { ++ sqrMaxThunderDistance = getInt("lightning-strike-distance-limit.sound", -1); ++ if (sqrMaxThunderDistance > 0) { ++ sqrMaxThunderDistance *= sqrMaxThunderDistance; ++ } ++ ++ sqrMaxLightningImpactSoundDistance = getInt("lightning-strike-distance-limit.impact-sound", -1); ++ if (sqrMaxLightningImpactSoundDistance < 0) { ++ sqrMaxLightningImpactSoundDistance = 32 * 32; //Vanilla value ++ } else { ++ sqrMaxLightningImpactSoundDistance *= sqrMaxLightningImpactSoundDistance; ++ } ++ ++ maxLightningFlashDistance = getInt("lightning-strike-distance-limit.flash", -1); ++ if (maxLightningFlashDistance < 0) { ++ maxLightningFlashDistance = 512; // Vanilla value ++ } ++ } + } +diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java +index 6f979e5f1f1567b140e9689298aff85de34f7413..ebcb9f48f47d1ab1e972bed1bc7cb0ee305a29f2 100644 +--- a/src/main/java/net/minecraft/server/EntityLightning.java ++++ b/src/main/java/net/minecraft/server/EntityLightning.java +@@ -56,6 +56,17 @@ public class EntityLightning extends Entity { + double deltaX = this.locX() - player.locX(); + double deltaZ = this.locZ() - player.locZ(); + double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; ++ // Paper start - Limit lightning strike effect distance ++ if (distanceSquared <= this.world.paperConfig.sqrMaxLightningImpactSoundDistance) { ++ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, ++ SoundCategory.WEATHER, this.locX(), this.locY(), this.locZ(), 2.0f, 0.5F + this.random.nextFloat() * 0.2F)); ++ } ++ ++ if (world.paperConfig.sqrMaxThunderDistance != -1 && distanceSquared >= world.paperConfig.sqrMaxThunderDistance) { ++ continue; ++ } ++ ++ // Paper end + if (distanceSquared > viewDistance * viewDistance) { + double deltaLength = Math.sqrt(distanceSquared); + double relativeX = player.locX() + (deltaX / deltaLength) * viewDistance; +@@ -66,7 +77,7 @@ public class EntityLightning extends Entity { + } + } + // CraftBukkit end +- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); ++// this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper + } + + --this.lifeTicks; diff --git a/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch b/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch new file mode 100644 index 0000000000..c551f07021 --- /dev/null +++ b/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch @@ -0,0 +1,79 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kickash32 +Date: Sat, 27 Jun 2020 13:15:53 -0400 +Subject: [PATCH] Add permission for command blocks + + +diff --git a/src/main/java/net/minecraft/server/BlockCommand.java b/src/main/java/net/minecraft/server/BlockCommand.java +index dd7066d1a72f5c6f54c1f40a7b694deb827410dc..6b353a99c04e0312f520f8559c05ddaf51c26aaf 100644 +--- a/src/main/java/net/minecraft/server/BlockCommand.java ++++ b/src/main/java/net/minecraft/server/BlockCommand.java +@@ -105,7 +105,7 @@ public class BlockCommand extends BlockTileEntity { + public EnumInteractionResult interact(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) { + TileEntity tileentity = world.getTileEntity(blockposition); + +- if (tileentity instanceof TileEntityCommand && entityhuman.isCreativeAndOp()) { ++ if (tileentity instanceof TileEntityCommand && (entityhuman.isCreativeAndOp() || (entityhuman.isCreative() && entityhuman.getBukkitEntity().hasPermission("minecraft.commandblock")))) { // Paper - command block permission + entityhuman.a((TileEntityCommand) tileentity); + return EnumInteractionResult.a(world.isClientSide); + } else { +diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +index 7e13b1cf6d92c3e0f2dab1ba1d42bd4f250e256c..3820acd65f3cd488dba964e6d9c458852570f4a0 100644 +--- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java ++++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +@@ -179,7 +179,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { + } + + public EnumInteractionResult a(EntityHuman entityhuman) { +- if (!entityhuman.isCreativeAndOp()) { ++ if (!entityhuman.isCreativeAndOp() && !entityhuman.isCreative() && !entityhuman.getBukkitEntity().hasPermission("minecraft.commandblock")) { // Paper - command block permission + return EnumInteractionResult.PASS; + } else { + if (entityhuman.getWorld().isClientSide) { +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index eeb870107031b38e25b5fb85ea731a7db1d6c2d1..103bda41422f0db700b150116c1417736823e763 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -613,7 +613,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + PlayerConnectionUtils.ensureMainThread(packetplayinsetcommandblock, this, this.player.getWorldServer()); + if (!this.minecraftServer.getEnableCommandBlock()) { + this.player.sendMessage(new ChatMessage("advMode.notEnabled"), SystemUtils.b); +- } else if (!this.player.isCreativeAndOp()) { ++ } else if (!this.player.isCreativeAndOp() && !this.player.isCreative() && !this.player.getBukkitEntity().hasPermission("minecraft.commandblock")) { // Paper - command block permission + this.player.sendMessage(new ChatMessage("advMode.notAllowed"), SystemUtils.b); + } else { + CommandBlockListenerAbstract commandblocklistenerabstract = null; +@@ -676,7 +676,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + PlayerConnectionUtils.ensureMainThread(packetplayinsetcommandminecart, this, this.player.getWorldServer()); + if (!this.minecraftServer.getEnableCommandBlock()) { + this.player.sendMessage(new ChatMessage("advMode.notEnabled"), SystemUtils.b); +- } else if (!this.player.isCreativeAndOp()) { ++ } else if (!this.player.isCreativeAndOp() && !this.player.isCreative() && !this.player.getBukkitEntity().hasPermission("minecraft.commandblock")) { // Paper - command block permission + this.player.sendMessage(new ChatMessage("advMode.notAllowed"), SystemUtils.b); + } else { + CommandBlockListenerAbstract commandblocklistenerabstract = packetplayinsetcommandminecart.a(this.player.world); +diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java +index 734855c1db3215d90b2743988f64af68aacb388e..6d192b27440ddfd34555005dafefbce6bbb67236 100644 +--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java ++++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java +@@ -353,7 +353,7 @@ public class PlayerInteractManager { + TileEntity tileentity = this.world.getTileEntity(blockposition); + Block block = iblockdata.getBlock(); + +- if ((block instanceof BlockCommand || block instanceof BlockStructure || block instanceof BlockJigsaw) && !this.player.isCreativeAndOp()) { ++ if ((block instanceof BlockCommand || block instanceof BlockStructure || block instanceof BlockJigsaw) && !this.player.isCreativeAndOp() && !(block instanceof BlockCommand && (this.player.isCreative() && this.player.getBukkitEntity().hasPermission("minecraft.commandblock")))) { // Paper - command block permission + this.world.notify(blockposition, iblockdata, iblockdata, 3); + return false; + } else if (this.player.a((World) this.world, blockposition, this.gamemode)) { +diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java +index 525ebf961e5da0687183a5e2ead23ed92cbd9d79..a4a809f302c5ff9c76cde5fc0add2ceec1bdf9b5 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java +@@ -16,6 +16,7 @@ public final class CraftDefaultPermissions { + DefaultPermissions.registerPermission(ROOT + ".nbt.copy", "Gives the user the ability to copy NBT in creative", org.bukkit.permissions.PermissionDefault.TRUE, parent); + DefaultPermissions.registerPermission(ROOT + ".debugstick", "Gives the user the ability to use the debug stick in creative", org.bukkit.permissions.PermissionDefault.OP, parent); + DefaultPermissions.registerPermission(ROOT + ".debugstick.always", "Gives the user the ability to use the debug stick in all game modes", org.bukkit.permissions.PermissionDefault.FALSE, parent); ++ DefaultPermissions.registerPermission(ROOT + ".commandblock", "Gives the user the ability to use command blocks.", org.bukkit.permissions.PermissionDefault.OP, parent); // Paper + // Spigot end + parent.recalculatePermissibles(); + } diff --git a/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch b/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch new file mode 100644 index 0000000000..6972f06be5 --- /dev/null +++ b/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch @@ -0,0 +1,129 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kickash32 +Date: Sat, 27 Jun 2020 13:32:39 -0400 +Subject: [PATCH] Ensure Entity AABB's are never invalid + + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index b11383b35662b1e59b89e916e55340cee2726944..2aa40f2a41e21526eb86acd903de024665109ab6 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -1,53 +1,54 @@ + package net.minecraft.server; + ++import co.aikar.timings.MinecraftTimings; ++import co.aikar.timings.Timing; + import com.google.common.collect.Iterables; + import com.google.common.collect.Lists; + import com.google.common.collect.Sets; + import it.unimi.dsi.fastutil.objects.Object2DoubleArrayMap; + import it.unimi.dsi.fastutil.objects.Object2DoubleMap; +-import java.util.Arrays; +-import java.util.Collection; +-import java.util.Collections; +-import java.util.Iterator; +-import java.util.List; +-import java.util.Locale; +-import java.util.Optional; +-import java.util.Random; +-import java.util.Set; +-import java.util.UUID; +-import java.util.concurrent.atomic.AtomicInteger; +-import java.util.stream.Stream; +-import javax.annotation.Nullable; + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; +- +-// CraftBukkit start + import org.bukkit.Bukkit; + import org.bukkit.Server; + import org.bukkit.block.BlockFace; + import org.bukkit.command.CommandSender; +-import org.bukkit.entity.Hanging; +-import org.bukkit.entity.LivingEntity; +-import org.bukkit.entity.Vehicle; +-import co.aikar.timings.MinecraftTimings; // Paper +-import co.aikar.timings.Timing; // Paper +-import org.bukkit.event.entity.EntityCombustByEntityEvent; +-import org.bukkit.event.hanging.HangingBreakByEntityEvent; +-import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; +-import org.bukkit.event.vehicle.VehicleEnterEvent; +-import org.bukkit.event.vehicle.VehicleExitEvent; + import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.entity.CraftEntity; + import org.bukkit.craftbukkit.entity.CraftPlayer; + import org.bukkit.craftbukkit.event.CraftEventFactory; ++import org.bukkit.entity.Hanging; ++import org.bukkit.entity.LivingEntity; + import org.bukkit.entity.Pose; ++import org.bukkit.entity.Vehicle; + import org.bukkit.event.entity.EntityAirChangeEvent; ++import org.bukkit.event.entity.EntityCombustByEntityEvent; + import org.bukkit.event.entity.EntityCombustEvent; + import org.bukkit.event.entity.EntityDropItemEvent; + import org.bukkit.event.entity.EntityPortalEvent; + import org.bukkit.event.entity.EntityPoseChangeEvent; ++import org.bukkit.event.hanging.HangingBreakByEntityEvent; + import org.bukkit.event.player.PlayerTeleportEvent; ++import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; ++import org.bukkit.event.vehicle.VehicleEnterEvent; ++import org.bukkit.event.vehicle.VehicleExitEvent; + import org.bukkit.plugin.PluginManager; ++ ++import javax.annotation.Nullable; ++import java.util.Arrays; ++import java.util.Collection; ++import java.util.Collections; ++import java.util.Iterator; ++import java.util.List; ++import java.util.Locale; ++import java.util.Optional; ++import java.util.Random; ++import java.util.Set; ++import java.util.UUID; ++import java.util.concurrent.atomic.AtomicInteger; ++import java.util.stream.Stream; ++ ++// CraftBukkit start + // CraftBukkit end + + public abstract class Entity implements INamableTileEntity, ICommandListener, KeyedObject { // Paper +@@ -425,10 +426,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + + public void setPosition(double d0, double d1, double d2) { + this.setPositionRaw(d0, d1, d2); +- float f = this.size.width / 2.0F; +- float f1 = this.size.height; ++ // Paper start - move into setPositionRaw ++ //float f = this.size.width / 2.0F; ++ //float f1 = this.size.height; + +- this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f)); ++ //this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f)); ++ // Paper end + if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit + } + +@@ -2901,6 +2904,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + return new AxisAlignedBB(vec3d, vec3d1); + } + ++ public final void setBoundingBox(AxisAlignedBB axisalignedbb) { a(axisalignedbb); } // Paper - OBFHELPER + public void a(AxisAlignedBB axisalignedbb) { + // CraftBukkit start - block invalid bounding boxes + double minX = axisalignedbb.minX, +@@ -3339,6 +3343,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + + public void setPositionRaw(double d0, double d1, double d2) { ++ // Paper start - never allow AABB to become desynced from position ++ // hanging has its own special logic ++ if (!(this instanceof EntityHanging) && (this.loc.x != d0 || this.loc.y != d1 || this.loc.z != d2)) { ++ float f = this.size.width / 2.0F; ++ float f1 = this.size.height; ++ this.setBoundingBox(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f)); ++ } ++ // Paper end + if (this.loc.x != d0 || this.loc.y != d1 || this.loc.z != d2) { + this.loc = new Vec3D(d0, d1, d2); + int i = MathHelper.floor(d0); diff --git a/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch b/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch new file mode 100644 index 0000000000..8cf756dfec --- /dev/null +++ b/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch @@ -0,0 +1,63 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kickash32 +Date: Sat, 27 Jun 2020 14:23:16 -0400 +Subject: [PATCH] Optimize WorldBorder collision checks and air + + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 2aa40f2a41e21526eb86acd903de024665109ab6..38887c1b7849926fab0a3b2db0e7b81388364172 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -854,7 +854,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + AxisAlignedBB axisalignedbb = this.getBoundingBox(); + VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this); + VoxelShape voxelshape = this.world.getWorldBorder().c(); +- Stream stream = VoxelShapes.c(voxelshape, VoxelShapes.a(axisalignedbb.shrink(1.0E-7D)), OperatorBoolean.AND) ? Stream.empty() : Stream.of(voxelshape); ++ Stream stream = !this.world.getWorldBorder().isInBounds(axisalignedbb) ? Stream.empty() : Stream.of(voxelshape); // Paper + Stream stream1 = this.world.c(this, axisalignedbb.b(vec3d), (entity) -> { + return true; + }); +diff --git a/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java b/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java +index ed0f3ddbcb7d6ce8a59ae3829f4cb11ae75046cb..e841611bb7c36dffec44bb9e74a0a9657a113263 100644 +--- a/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java ++++ b/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java +@@ -128,10 +128,10 @@ public class VoxelShapeSpliterator extends AbstractSpliterator { + AxisAlignedBB axisalignedbb = this.a.getBoundingBox(); + + if (!a(worldborder, axisalignedbb)) { +- VoxelShape voxelshape = worldborder.c(); +- +- if (!b(voxelshape, axisalignedbb) && a(voxelshape, axisalignedbb)) { +- consumer.accept(voxelshape); ++ // Paper start ++ if (worldborder.isInBounds(axisalignedbb.shrink(1.0E-7D)) && !worldborder.isInBounds(axisalignedbb.grow(1.0E-7D))) { ++ consumer.accept(worldborder.asVoxelShape()); ++ // Paper end + return true; + } + } +diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java +index aeee4f11828e54ff9e873e452e19299822b1ec86..1fa7061f7adb539b6786fa11a0090f2c188ba9f2 100644 +--- a/src/main/java/net/minecraft/server/VoxelShapes.java ++++ b/src/main/java/net/minecraft/server/VoxelShapes.java +@@ -242,7 +242,7 @@ public final class VoxelShapes { + IBlockData iblockdata = iworldreader.getTypeIfLoaded(blockposition_mutableblockposition); // Paper + if (iblockdata == null) return 0.0D; // Paper + +- if ((k2 != 1 || iblockdata.d()) && (k2 != 2 || iblockdata.a(Blocks.MOVING_PISTON))) { ++ if (!iblockdata.isAir() && (k2 != 1 || iblockdata.d()) && (k2 != 2 || iblockdata.a(Blocks.MOVING_PISTON))) { // Paper + d0 = iblockdata.b((IBlockAccess) iworldreader, blockposition_mutableblockposition, voxelshapecollision).a(enumdirection_enumaxis2, axisalignedbb.d((double) (-blockposition_mutableblockposition.getX()), (double) (-blockposition_mutableblockposition.getY()), (double) (-blockposition_mutableblockposition.getZ())), d0); + if (Math.abs(d0) < 1.0E-7D) { + return 0.0D; +diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java +index 0ef92a320d132b443e76276b2c34a4626cf187db..b651eb87bb23deeb2a3f4a1c626ddde9b11a7b9e 100644 +--- a/src/main/java/net/minecraft/server/WorldBorder.java ++++ b/src/main/java/net/minecraft/server/WorldBorder.java +@@ -42,6 +42,7 @@ public class WorldBorder { + return (double) chunkcoordintpair.f() > this.e() && (double) chunkcoordintpair.d() < this.g() && (double) chunkcoordintpair.g() > this.f() && (double) chunkcoordintpair.e() < this.h(); + } + ++ public final boolean isInBounds(AxisAlignedBB aabb) { return this.a(aabb); } // Paper - OBFHELPER + public boolean a(AxisAlignedBB axisalignedbb) { + return axisalignedbb.maxX > this.e() && axisalignedbb.minX < this.g() && axisalignedbb.maxZ > this.f() && axisalignedbb.minZ < this.h(); + } From 2192ff1bf72c94b1b7edd2bc2b357b5a46ecbd2d Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 27 Jun 2020 14:38:26 -0400 Subject: [PATCH 30/95] fix headers --- .../0521-Limit-lightning-strike-effect-distance.patch | 6 +++--- .../0522-Add-permission-for-command-blocks.patch | 4 ++-- .../0523-Ensure-Entity-AABB-s-are-never-invalid.patch | 4 ++-- ...0524-Optimize-WorldBorder-collision-checks-and-air.patch | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch index 537284d2e1..bf393f3268 100644 --- a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kickash32 -Date: Sat, 27 Jun 2020 12:37:58 -0400 -Subject: [PATCH] Limit lightning strike effect distance +From: Aikar +Date: Mon, 17 Sep 2018 23:05:31 -0400 +Subject: [PATCH] Support Overriding World Seeds diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch b/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch index c551f07021..62c5a9bc12 100644 --- a/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch +++ b/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kickash32 -Date: Sat, 27 Jun 2020 13:15:53 -0400 +From: Mariell Hoversholm +Date: Sat, 16 May 2020 10:05:30 +0200 Subject: [PATCH] Add permission for command blocks diff --git a/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch b/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch index 6972f06be5..ddd6881757 100644 --- a/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch +++ b/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kickash32 -Date: Sat, 27 Jun 2020 13:32:39 -0400 +From: Aikar +Date: Sun, 10 May 2020 22:12:46 -0400 Subject: [PATCH] Ensure Entity AABB's are never invalid diff --git a/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch b/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch index 8cf756dfec..7aa9002a7b 100644 --- a/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch +++ b/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kickash32 -Date: Sat, 27 Jun 2020 14:23:16 -0400 +From: Spottedleaf +Date: Sun, 10 May 2020 22:49:05 -0400 Subject: [PATCH] Optimize WorldBorder collision checks and air From 5958abd63f978ab897253b0595a1e60c4a3fbcd7 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 27 Jun 2020 14:40:54 -0400 Subject: [PATCH 31/95] delete ported patches --- ...mit-lightning-strike-effect-distance.patch | 83 ------------------- ...sure-Entity-AABB-s-are-never-invalid.patch | 55 ------------ ...WorldBorder-collision-checks-and-air.patch | 61 -------------- ...24-Add-permission-for-command-blocks.patch | 79 ------------------ 4 files changed, 278 deletions(-) delete mode 100644 removed/1.16/0311-Limit-lightning-strike-effect-distance.patch delete mode 100644 removed/1.16/0513-Ensure-Entity-AABB-s-are-never-invalid.patch delete mode 100644 removed/1.16/0516-Optimize-WorldBorder-collision-checks-and-air.patch delete mode 100644 removed/1.16/0524-Add-permission-for-command-blocks.patch diff --git a/removed/1.16/0311-Limit-lightning-strike-effect-distance.patch b/removed/1.16/0311-Limit-lightning-strike-effect-distance.patch deleted file mode 100644 index 417f5f6430..0000000000 --- a/removed/1.16/0311-Limit-lightning-strike-effect-distance.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Trigary -Date: Fri, 14 Sep 2018 17:42:08 +0200 -Subject: [PATCH] Limit lightning strike effect distance - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b8789c8ecc5a6e4117bb7ce0d5487a6e5774b67f 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -242,6 +242,28 @@ public class PaperWorldConfig { - } - } - -+ public double sqrMaxThunderDistance; -+ public double sqrMaxLightningImpactSoundDistance; -+ public double maxLightningFlashDistance; -+ private void lightningStrikeDistanceLimit() { -+ sqrMaxThunderDistance = getInt("lightning-strike-distance-limit.sound", -1); -+ if (sqrMaxThunderDistance > 0) { -+ sqrMaxThunderDistance *= sqrMaxThunderDistance; -+ } -+ -+ sqrMaxLightningImpactSoundDistance = getInt("lightning-strike-distance-limit.impact-sound", -1); -+ if (sqrMaxLightningImpactSoundDistance < 0) { -+ sqrMaxLightningImpactSoundDistance = 32 * 32; //Vanilla value -+ } else { -+ sqrMaxLightningImpactSoundDistance *= sqrMaxLightningImpactSoundDistance; -+ } -+ -+ maxLightningFlashDistance = getInt("lightning-strike-distance-limit.flash", -1); -+ if (maxLightningFlashDistance < 0) { -+ maxLightningFlashDistance = 512; // Vanilla value -+ } -+ } -+ - public int fixedInhabitedTime; - private void fixedInhabitedTime() { - if (PaperConfig.version < 16) { -diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index 7c518983a9c21a9b221e1fa1b0baa3d5c9ccadbf..bdb534deb47a945d5cbfad688eeab5e3388a4df5 100644 ---- a/src/main/java/net/minecraft/server/EntityLightning.java -+++ b/src/main/java/net/minecraft/server/EntityLightning.java -@@ -64,6 +64,17 @@ public class EntityLightning extends Entity { - double deltaX = this.locX() - player.locX(); - double deltaZ = this.locZ() - player.locZ(); - double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; -+ // Paper start - Limit lightning strike effect distance -+ if (distanceSquared <= this.world.paperConfig.sqrMaxLightningImpactSoundDistance) { -+ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, -+ SoundCategory.WEATHER, this.locX(), this.locY(), this.locZ(), 2.0f, 0.5F + this.random.nextFloat() * 0.2F)); -+ } -+ -+ if (world.paperConfig.sqrMaxThunderDistance != -1 && distanceSquared >= world.paperConfig.sqrMaxThunderDistance) { -+ continue; -+ } -+ -+ // Paper end - if (distanceSquared > viewDistance * viewDistance) { - double deltaLength = Math.sqrt(distanceSquared); - double relativeX = player.locX() + (deltaX / deltaLength) * viewDistance; -@@ -74,7 +85,7 @@ public class EntityLightning extends Entity { - } - } - // CraftBukkit end -- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); -+ //this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper - Limit lightning strike effect distance (the packet is now sent from inside the loop) - } - - --this.lifeTicks; -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6e878c9b9dee511812df5ea2491d953f677c3f58..271a1ef3d0aae7c1d0b373963504e70f2843cd24 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1276,7 +1276,7 @@ public class WorldServer extends World { - } - // CraftBukkit end - this.globalEntityList.add(entitylightning); -- this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX(), entitylightning.locY(), entitylightning.locZ(), 512.0D, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension -+ this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX(), entitylightning.locY(), entitylightning.locZ(), paperConfig.maxLightningFlashDistance, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension, limit lightning strike effect distance - } - - @Override diff --git a/removed/1.16/0513-Ensure-Entity-AABB-s-are-never-invalid.patch b/removed/1.16/0513-Ensure-Entity-AABB-s-are-never-invalid.patch deleted file mode 100644 index ed3bac4005..0000000000 --- a/removed/1.16/0513-Ensure-Entity-AABB-s-are-never-invalid.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sun, 10 May 2020 22:12:46 -0400 -Subject: [PATCH] Ensure Entity AABB's are never invalid - -If anything used setPositionRaw, it left potential for an AABB -to be left stale at their old location, which could cause massive -AABB boxes if movement ever then got called on the new position. - -This guarantees any time we set the entities position, we also -update their AABB. - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b176dc26d15065aebc91c75e8a96745f589c0b87..c81b9d814d50a026872d2711f76649c00d65888b 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -416,10 +416,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - - public void setPosition(double d0, double d1, double d2) { - this.setPositionRaw(d0, d1, d2); -- float f = this.size.width / 2.0F; -- float f1 = this.size.height; -- -- this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f)); -+ // Paper start - move into setPositionRaw -+ //float f = this.size.width / 2.0F; -+ //float f1 = this.size.height; -+ //this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f)); -+ // Paper end - if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit - } - -@@ -2981,6 +2982,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return new AxisAlignedBB(vec3d, vec3d1); - } - -+ public final void setBoundingBox(AxisAlignedBB axisalignedbb) { a(axisalignedbb); } // Paper - OBFHELPER - public void a(AxisAlignedBB axisalignedbb) { - // CraftBukkit start - block invalid bounding boxes - double minX = axisalignedbb.minX, -@@ -3439,6 +3441,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - } - - public void setPositionRaw(double d0, double d1, double d2) { -+ // Paper start - never allow AABB to become desynced from position -+ // hanging has its own special logic -+ if (!(this instanceof EntityHanging) && (locX != d0 || locY != d1 || locZ != d2)) { -+ float f = this.size.width / 2.0F; -+ float f1 = this.size.height; -+ this.setBoundingBox(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f)); -+ } -+ // Paper end - this.locX = d0; - this.locY = d1; - this.locZ = d2; diff --git a/removed/1.16/0516-Optimize-WorldBorder-collision-checks-and-air.patch b/removed/1.16/0516-Optimize-WorldBorder-collision-checks-and-air.patch deleted file mode 100644 index 25658a705b..0000000000 --- a/removed/1.16/0516-Optimize-WorldBorder-collision-checks-and-air.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Sun, 10 May 2020 22:49:05 -0400 -Subject: [PATCH] Optimize WorldBorder collision checks and air - - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c81b9d814d50a026872d2711f76649c00d65888b..e0ab058bf947ea10b37eadf6122292e708bd3809 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -845,7 +845,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - AxisAlignedBB axisalignedbb = this.getBoundingBox(); - VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this); - VoxelShape voxelshape = this.world.getWorldBorder().a(); -- Stream stream = VoxelShapes.c(voxelshape, VoxelShapes.a(axisalignedbb.shrink(1.0E-7D)), OperatorBoolean.AND) ? Stream.empty() : Stream.of(voxelshape); -+ Stream stream = !this.world.getWorldBorder().isInBounds(axisalignedbb) ? Stream.empty() : Stream.of(this.world.getWorldBorder().a()); // Paper - Stream stream1 = this.world.b(this, axisalignedbb.a(vec3d), (Set) ImmutableSet.of()); - StreamAccumulator streamaccumulator = new StreamAccumulator<>(Stream.concat(stream1, stream)); - Vec3D vec3d1 = vec3d.g() == 0.0D ? vec3d : a(this, vec3d, axisalignedbb, this.world, voxelshapecollision, streamaccumulator); -diff --git a/src/main/java/net/minecraft/server/ICollisionAccess.java b/src/main/java/net/minecraft/server/ICollisionAccess.java -index 5a21205a49606b294de4cd27b60438c6a5b3c526..63dd5e98b6af1d9a9fa9d01621ce5bc33c0d7502 100644 ---- a/src/main/java/net/minecraft/server/ICollisionAccess.java -+++ b/src/main/java/net/minecraft/server/ICollisionAccess.java -@@ -95,12 +95,12 @@ public interface ICollisionAccess extends IBlockAccess { - if (true) { //public boolean tryAdvance(Consumer consumer) {*/ // Paper - if (entity != null) { - // Paper end -- VoxelShape voxelshape1 = ICollisionAccess.this.getWorldBorder().a(); -- boolean flag = VoxelShapes.c(voxelshape1, VoxelShapes.a(entity.getBoundingBox().shrink(1.0E-7D)), OperatorBoolean.AND); -- boolean flag1 = VoxelShapes.c(voxelshape1, VoxelShapes.a(entity.getBoundingBox().g(1.0E-7D)), OperatorBoolean.AND); -+ //VoxelShape voxelshape1 = ICollisionAccess.this.getWorldBorder().a(); // Paper - only make if collides -+ boolean flag = !ICollisionAccess.this.getWorldBorder().isInBounds(entity.getBoundingBox().shrink(1.0E-7D)); // Paper -+ boolean flag1 = !ICollisionAccess.this.getWorldBorder().isInBounds(entity.getBoundingBox().g(1.0E-7D)); // Paper - - if (!flag && flag1) { -- collisions.add(voxelshape1);// Paper -+ collisions.add(ICollisionAccess.this.getWorldBorder().a());// Paper - if (returnFast) return collisions; - } - } -@@ -133,7 +133,7 @@ public interface ICollisionAccess extends IBlockAccess { - //IBlockData iblockdata = iblockaccess.getType(blockposition_mutableblockposition); // moved up - // Paper end - -- if ((j2 != 1 || iblockdata.f()) && (j2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { -+ if (!iblockdata.isAir() && (j2 != 1 || iblockdata.f()) && (j2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { // Paper - fast track air - VoxelShape voxelshape2 = iblockdata.b((IBlockAccess) ICollisionAccess.this, blockposition_mutableblockposition, voxelshapecollision); - - // Paper start - Lithium Collision Optimizations -diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 4c20db5a3f9e159997a9851691aca421241d6d95..535d08ffb1d20570b19307c8619cfd39b4541356 100644 ---- a/src/main/java/net/minecraft/server/WorldBorder.java -+++ b/src/main/java/net/minecraft/server/WorldBorder.java -@@ -40,6 +40,7 @@ public class WorldBorder { - return (double) chunkcoordintpair.f() > this.c() && (double) chunkcoordintpair.d() < this.e() && (double) chunkcoordintpair.g() > this.d() && (double) chunkcoordintpair.e() < this.f(); - } - -+ public final boolean isInBounds(AxisAlignedBB aabb) { return this.a(aabb); } // Paper - OBFHELPER - public boolean a(AxisAlignedBB axisalignedbb) { - return axisalignedbb.maxX > this.c() && axisalignedbb.minX < this.e() && axisalignedbb.maxZ > this.d() && axisalignedbb.minZ < this.f(); - } diff --git a/removed/1.16/0524-Add-permission-for-command-blocks.patch b/removed/1.16/0524-Add-permission-for-command-blocks.patch deleted file mode 100644 index 0a39da8a7c..0000000000 --- a/removed/1.16/0524-Add-permission-for-command-blocks.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mariell Hoversholm -Date: Sat, 16 May 2020 10:05:30 +0200 -Subject: [PATCH] Add permission for command blocks - - -diff --git a/src/main/java/net/minecraft/server/BlockCommand.java b/src/main/java/net/minecraft/server/BlockCommand.java -index d0f75c8f93d3ceb1ee358baeb51f64e7e575bbc0..48cc48bd999c02268fa3270401c0df77a327ab13 100644 ---- a/src/main/java/net/minecraft/server/BlockCommand.java -+++ b/src/main/java/net/minecraft/server/BlockCommand.java -@@ -110,7 +110,7 @@ public class BlockCommand extends BlockTileEntity { - public EnumInteractionResult interact(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) { - TileEntity tileentity = world.getTileEntity(blockposition); - -- if (tileentity instanceof TileEntityCommand && entityhuman.isCreativeAndOp()) { -+ if (tileentity instanceof TileEntityCommand && (entityhuman.isCreativeAndOp() || (entityhuman.isCreative() && entityhuman.getBukkitEntity().hasPermission("minecraft.commandblock")))) { // Paper - command block permission - entityhuman.a((TileEntityCommand) tileentity); - return EnumInteractionResult.SUCCESS; - } else { -diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -index ef2a496eda45ae5ee8fe52ef09e77c2906069d2e..6a0d70033b4eec384795b5cccd76bce2265ffbfc 100644 ---- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -+++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -@@ -178,7 +178,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { - } - - public boolean a(EntityHuman entityhuman) { -- if (!entityhuman.isCreativeAndOp()) { -+ if (!entityhuman.isCreativeAndOp() && !entityhuman.isCreative() && !entityhuman.getBukkitEntity().hasPermission("minecraft.commandblock")) { // Paper - command block permission - return false; - } else { - if (entityhuman.getWorld().isClientSide) { -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1f9d231fb93e30286205f7a0a4c898a0e153bd95..d52fbda79fe1c52d3ddb53c0f1c1f521d7620702 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -612,7 +612,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - PlayerConnectionUtils.ensureMainThread(packetplayinsetcommandblock, this, this.player.getWorldServer()); - if (!this.minecraftServer.getEnableCommandBlock()) { - this.player.sendMessage(new ChatMessage("advMode.notEnabled", new Object[0])); -- } else if (!this.player.isCreativeAndOp()) { -+ } else if (!this.player.isCreativeAndOp() && !this.player.isCreative() && !this.player.getBukkitEntity().hasPermission("minecraft.commandblock")) { // Paper - command block permission - this.player.sendMessage(new ChatMessage("advMode.notAllowed", new Object[0])); - } else { - CommandBlockListenerAbstract commandblocklistenerabstract = null; -@@ -675,7 +675,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - PlayerConnectionUtils.ensureMainThread(packetplayinsetcommandminecart, this, this.player.getWorldServer()); - if (!this.minecraftServer.getEnableCommandBlock()) { - this.player.sendMessage(new ChatMessage("advMode.notEnabled", new Object[0])); -- } else if (!this.player.isCreativeAndOp()) { -+ } else if (!this.player.isCreativeAndOp() && !this.player.isCreative() && !this.player.getBukkitEntity().hasPermission("minecraft.commandblock")) { // Paper - command block permission - this.player.sendMessage(new ChatMessage("advMode.notAllowed", new Object[0])); - } else { - CommandBlockListenerAbstract commandblocklistenerabstract = packetplayinsetcommandminecart.a(this.player.world); -diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index f11ef84df85c1e7ada9c62247b7882f19ae32089..6df8434612d4afe411b2c435f4c847b9183570f8 100644 ---- a/src/main/java/net/minecraft/server/PlayerInteractManager.java -+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -350,7 +350,7 @@ public class PlayerInteractManager { - TileEntity tileentity = this.world.getTileEntity(blockposition); - Block block = iblockdata.getBlock(); - -- if ((block instanceof BlockCommand || block instanceof BlockStructure || block instanceof BlockJigsaw) && !this.player.isCreativeAndOp()) { -+ if ((block instanceof BlockCommand || block instanceof BlockStructure || block instanceof BlockJigsaw) && !this.player.isCreativeAndOp() && !(block instanceof BlockCommand && (this.player.isCreative() && this.player.getBukkitEntity().hasPermission("minecraft.commandblock")))) { // Paper - command block permission - this.world.notify(blockposition, iblockdata, iblockdata, 3); - return false; - } else if (this.player.a((World) this.world, blockposition, this.gamemode)) { -diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java -index 525ebf961e5da0687183a5e2ead23ed92cbd9d79..a4a809f302c5ff9c76cde5fc0add2ceec1bdf9b5 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java -@@ -16,6 +16,7 @@ public final class CraftDefaultPermissions { - DefaultPermissions.registerPermission(ROOT + ".nbt.copy", "Gives the user the ability to copy NBT in creative", org.bukkit.permissions.PermissionDefault.TRUE, parent); - DefaultPermissions.registerPermission(ROOT + ".debugstick", "Gives the user the ability to use the debug stick in creative", org.bukkit.permissions.PermissionDefault.OP, parent); - DefaultPermissions.registerPermission(ROOT + ".debugstick.always", "Gives the user the ability to use the debug stick in all game modes", org.bukkit.permissions.PermissionDefault.FALSE, parent); -+ DefaultPermissions.registerPermission(ROOT + ".commandblock", "Gives the user the ability to use command blocks.", org.bukkit.permissions.PermissionDefault.OP, parent); // Paper - // Spigot end - parent.recalculatePermissibles(); - } From 527dd9f1850c635a2d1c36713ed13f1038e82a64 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 27 Jun 2020 15:02:40 -0400 Subject: [PATCH 32/95] fixup --- ...mit-lightning-strike-effect-distance.patch | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch index bf393f3268..ec643279e8 100644 --- a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch @@ -1,38 +1,13 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Mon, 17 Sep 2018 23:05:31 -0400 -Subject: [PATCH] Support Overriding World Seeds +From: Trigary +Date: Fri, 14 Sep 2018 17:42:08 +0200 +Subject: [PATCH] Limit lightning strike effect distance diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index 0f4fca90fd6c3788a5762c96c344899cb1665466..4a59d42b778e681e93f1243ecd16c5cf46160b97 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -1,11 +1,5 @@ - package com.destroystokyo.paper; - --import java.util.Arrays; --import java.util.EnumMap; --import java.util.HashMap; --import java.util.List; --import java.util.Map; -- - import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; - import org.bukkit.Bukkit; - import org.bukkit.Material; -@@ -13,6 +7,12 @@ import org.bukkit.configuration.ConfigurationSection; - import org.bukkit.configuration.file.YamlConfiguration; - import org.spigotmc.SpigotWorldConfig; - -+import java.util.Arrays; -+import java.util.EnumMap; -+import java.util.HashMap; -+import java.util.List; -+import java.util.Map; -+ - import static com.destroystokyo.paper.PaperConfig.log; - import static com.destroystokyo.paper.PaperConfig.logError; - @@ -648,4 +648,26 @@ public class PaperWorldConfig { delayChunkUnloadsBy *= 20; } From e94688ca39b5f80a5ac8b65b88da2c675abeff4e Mon Sep 17 00:00:00 2001 From: Omer Uddin Date: Sat, 27 Jun 2020 16:00:08 -0400 Subject: [PATCH 33/95] Fix comment mistake --- .../0521-Limit-lightning-strike-effect-distance.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch index ec643279e8..01281d012f 100644 --- a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch @@ -62,7 +62,7 @@ index 6f979e5f1f1567b140e9689298aff85de34f7413..ebcb9f48f47d1ab1e972bed1bc7cb0ee } // CraftBukkit end - this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); -+// this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper ++// this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper - Limit lightning strike effect distance (the packet is now sent from inside the loop) } --this.lifeTicks; From 986ebc68fc454b38aff259ea06e5888ecb9f2398 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 27 Jun 2020 17:37:09 -0400 Subject: [PATCH 34/95] Updated Upstream (CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 983305bb SPIGOT-5856: Soul Campfire BlockState cannot be cast to Campfire --- ...-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch | 4 ++-- .../0046-Provide-E-TE-Chunk-count-stat-methods.patch | 2 +- .../0094-Additional-world.getNearbyEntities-API-s.patch | 2 +- Spigot-API-Patches/0111-Expand-Explosions-API.patch | 2 +- Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch | 2 +- .../0131-Provide-Chunk-Coordinates-as-a-Long-API.patch | 2 +- Spigot-API-Patches/0132-Async-Chunks-API.patch | 2 +- .../0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch | 2 +- Spigot-API-Patches/0138-isChunkGenerated-API.patch | 2 +- Spigot-API-Patches/0157-Add-sun-related-API.patch | 2 +- Spigot-API-Patches/0180-Add-Heightmap-API.patch | 2 +- Spigot-API-Patches/0200-Expose-game-version.patch | 4 ++-- Spigot-API-Patches/0205-Spawn-Reason-API.patch | 2 +- ...Show-Paper-in-client-crashes-server-lists-and-Mojang.patch | 2 +- .../0019-Add-version-history-to-version-command.patch | 2 +- Spigot-Server-Patches/0020-Player-affects-spawning-API.patch | 2 +- .../0024-Only-refresh-abilities-if-needed.patch | 2 +- Spigot-Server-Patches/0025-Entity-Origin-API.patch | 2 +- Spigot-Server-Patches/0034-Disable-thunder.patch | 2 +- Spigot-Server-Patches/0035-Disable-ice-and-snow.patch | 2 +- .../0043-Configurable-Disabling-Cat-Chest-Detection.patch | 2 +- .../0044-Ensure-commands-are-not-ran-async.patch | 2 +- .../0048-Player-Tab-List-and-Title-APIs.patch | 2 +- ...50-Change-implementation-of-tile-entity-removal-list.patch | 2 +- Spigot-Server-Patches/0052-Add-velocity-warnings.patch | 2 +- .../0053-Configurable-inter-world-teleportation-safety.patch | 2 +- Spigot-Server-Patches/0058-Complete-resource-pack-API.patch | 2 +- .../0060-Default-loading-permissions.yml-before-plugins.patch | 2 +- Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch | 2 +- ...-handle-NaN-health-absorb-values-and-repair-bad-data.patch | 2 +- .../0071-Configurable-spawn-chances-for-skeleton-horses.patch | 2 +- .../0085-Workaround-for-setting-passengers-on-players.patch | 2 +- .../0092-Implement-PlayerLocaleChangeEvent.patch | 2 +- Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch | 2 +- .../0127-Bound-Treasure-Maps-to-World-Border.patch | 2 +- Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch | 2 +- Spigot-Server-Patches/0149-Item-canEntityPickup.patch | 2 +- Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch | 2 +- ...Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch | 2 +- ...0174-Expose-client-protocol-version-and-virtual-host.patch | 2 +- .../0181-API-to-get-a-BlockState-without-a-snapshot.patch | 2 +- .../0186-Ability-to-apply-mending-to-XP-API.patch | 2 +- Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch | 2 +- .../0209-Flag-to-disable-the-channel-limit.patch | 2 +- .../0211-Configurable-sprint-interruption-on-attack.patch | 2 +- Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch | 2 +- .../0234-LivingEntity-Hand-Raised-Item-Use-API.patch | 2 +- ...-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch | 2 +- Spigot-Server-Patches/0256-EntityTransformedEvent.patch | 2 +- .../0268-Add-Early-Warning-Feature-to-WatchDog.patch | 2 +- .../0271-Use-a-Queue-for-Queueing-Commands.patch | 2 +- .../0273-Allow-disabling-armour-stand-ticking.patch | 2 +- .../0285-Add-ray-tracing-methods-to-LivingEntity.patch | 2 +- .../0286-Expose-attack-cooldown-methods-for-Player.patch | 2 +- Spigot-Server-Patches/0287-Improve-death-events.patch | 2 +- .../0288-Allow-chests-to-be-placed-with-NBT-data.patch | 2 +- ...MC-50319-Check-other-worlds-for-shooter-of-projectil.patch | 2 +- .../0306-Add-Velocity-IP-Forwarding-Support.patch | 2 +- .../0323-force-entity-dismount-during-teleportation.patch | 4 ++-- ...0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch | 4 ++-- ...331-Block-Entity-remove-from-being-called-on-Players.patch | 2 +- .../0343-Add-LivingEntity-getTargetEntity.patch | 2 +- .../0355-Per-Player-View-Distance-API-placeholders.patch | 2 +- ...Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch | 2 +- .../0374-Configurable-projectile-relative-velocity.patch | 2 +- .../0441-Don-t-move-existing-players-to-world-spawn.patch | 2 +- .../0459-Implement-Player-Client-Options-API.patch | 2 +- Spigot-Server-Patches/0474-Expose-game-version.patch | 2 +- .../0489-Wait-for-Async-Tasks-during-shutdown.patch | 2 +- .../0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch | 2 +- .../0521-Limit-lightning-strike-effect-distance.patch | 4 ++-- work/CraftBukkit | 2 +- 72 files changed, 77 insertions(+), 77 deletions(-) diff --git a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 912e4c6277..d2902a8edc 100644 --- a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses Change Javadoc to be accurate diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 6b951d5adf9a665fd8bf8560a3fd7deb14897b34..39423f3a689a69de666537603e97d50244827f64 100644 +index b46222ed2822fea563585462e43ee73ba2bb9b37..7b1978a258cbf74983dc2512092653ed4ff64e98 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -274,6 +274,26 @@ public final class Bukkit { @@ -37,7 +37,7 @@ index 6b951d5adf9a665fd8bf8560a3fd7deb14897b34..39423f3a689a69de666537603e97d502 * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index af21bb1aa133c6ab119f23c098d17a5bc4e9cd47..b09d010853a67db16787d9e764f1e2949cb33050 100644 +index d3c498ad0e7681422ef2117be41c6603ebce0e0a..e3385abec44c603201aa37e3b3180cf88d378b52 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -225,6 +225,26 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch index 6632e4ba1a..ca1b41a18b 100644 --- a/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 9c7c74eb30d2f54843f5e103530f5b2592e8414e..75d62402181934d316582023fdc012ea3c74306a 100644 +index c79e083a97b849f9cdd3f9646c4f2892976b2a55..480386b2405953c3a06958a9728b38371d75662b 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable; diff --git a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch b/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch index b3278c8a90..ef34a0f2af 100644 --- a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch +++ b/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index a636956c4772f4e38eaa71553d3dfbd7ef36f0cd..3150f7d81c87b57944231bd95bb2e49af51f7eca 100644 +index 55d114e3a17ea623ecc0d9fa87b14c3ffc65e6be..c422cfa1b599bc4c158dea178e5677c4b4545d99 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,9 @@ diff --git a/Spigot-API-Patches/0111-Expand-Explosions-API.patch b/Spigot-API-Patches/0111-Expand-Explosions-API.patch index 11871fe62c..f5574a6e8c 100644 --- a/Spigot-API-Patches/0111-Expand-Explosions-API.patch +++ b/Spigot-API-Patches/0111-Expand-Explosions-API.patch @@ -106,7 +106,7 @@ index 4cf22afc3c1f1cc19b6e5350043431215908a612..ac3c8eef58872c2de840a4b7ba7d77c2 * 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 c478db22ade86ca58551ba94043dd1c2fd08004e..42129f705a3e821872538183ec38bbd179a4cfae 100644 +index 6e311dd8f1105c28be7259855e0b19ae182badfd..4cbea0cc7b2594ebbc555edb00a86dac6d293f91 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1354,6 +1354,88 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch b/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch index cf2bc25a7e..121bb131ba 100644 --- a/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch +++ b/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 42129f705a3e821872538183ec38bbd179a4cfae..f321f7a3b7afc3969edf2675a7872ffe31fb657f 100644 +index 4cbea0cc7b2594ebbc555edb00a86dac6d293f91..2e52059cdf2431baac09db521b02fbc4c594eb60 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -914,6 +914,17 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch b/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch index 4f42606789..0e7fd480ef 100644 --- a/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch +++ b/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch @@ -44,7 +44,7 @@ index 95e485eea693e7648e63d198c8591d89e02e6755..0bbef14a9fc2a3ec03b4db59c8d8e1ee * Gets the world containing this chunk * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index f321f7a3b7afc3969edf2675a7872ffe31fb657f..008fb638b5b0601109c72c322caa7669403ae273 100644 +index 2e52059cdf2431baac09db521b02fbc4c594eb60..fe8b255aeb46e30d0a954dcd0e3e6ac29b4fd33d 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -207,6 +207,22 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0132-Async-Chunks-API.patch b/Spigot-API-Patches/0132-Async-Chunks-API.patch index c9e79329ad..9ad138ffec 100644 --- a/Spigot-API-Patches/0132-Async-Chunks-API.patch +++ b/Spigot-API-Patches/0132-Async-Chunks-API.patch @@ -8,7 +8,7 @@ Adds API's to load or generate chunks asynchronously. Also adds utility methods to Entity to teleport asynchronously. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 008fb638b5b0601109c72c322caa7669403ae273..fbd9546731aaf5673603646136c668dbc59821b1 100644 +index fe8b255aeb46e30d0a954dcd0e3e6ac29b4fd33d..eef7750fdebb4fbd156d729e4cc87f7b3d0a2ad4 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -221,6 +221,467 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch b/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch index 2ac345f8a0..5ed1265989 100644 --- a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch +++ b/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch @@ -48,7 +48,7 @@ index f87ecd0a753b0f730ee33c0dd699b7388e8c6697..07e532cde37255ffb2db368453bb69ee * @return A new location where X/Y/Z are the center of the block */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index fbd9546731aaf5673603646136c668dbc59821b1..85bd7d8926d313a313f17c5dea644615daf72c62 100644 +index eef7750fdebb4fbd156d729e4cc87f7b3d0a2ad4..656615290c3378a853ea298d0a3b5f8d28c6a177 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -90,6 +90,38 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0138-isChunkGenerated-API.patch b/Spigot-API-Patches/0138-isChunkGenerated-API.patch index 69599faeb2..5733dadbe9 100644 --- a/Spigot-API-Patches/0138-isChunkGenerated-API.patch +++ b/Spigot-API-Patches/0138-isChunkGenerated-API.patch @@ -34,7 +34,7 @@ index 07e532cde37255ffb2db368453bb69ee0a410931..6e1a1124a6e528c1a94ccb1d09bc5dcc /** * Sets the position of this Location and returns itself diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 85bd7d8926d313a313f17c5dea644615daf72c62..933f2729276b37b4c82cda986e39292cc2e86c4e 100644 +index 656615290c3378a853ea298d0a3b5f8d28c6a177..40dd88b538e9d9f7684f65415cf18e9b416e28de 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -254,6 +254,17 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0157-Add-sun-related-API.patch b/Spigot-API-Patches/0157-Add-sun-related-API.patch index 14fe94f7f4..8fda90ee4c 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 933f2729276b37b4c82cda986e39292cc2e86c4e..e3d4da353e5f876f0456106b350838917f492051 100644 +index 40dd88b538e9d9f7684f65415cf18e9b416e28de..8d951577c0797d299951f7fd2448121710f07e6b 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1755,6 +1755,16 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0180-Add-Heightmap-API.patch b/Spigot-API-Patches/0180-Add-Heightmap-API.patch index f270b314cb..65fbbc79ef 100644 --- a/Spigot-API-Patches/0180-Add-Heightmap-API.patch +++ b/Spigot-API-Patches/0180-Add-Heightmap-API.patch @@ -89,7 +89,7 @@ index 77d9cd0a1f54b5eb233eddbcff1bfa76bc182e9a..5904750329a5c7061de6e4fe32335b0d * Creates explosion at this location with given power * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index e3d4da353e5f876f0456106b350838917f492051..143fcbcdbfad551cd4392f54cf189fe3bee41706 100644 +index 8d951577c0797d299951f7fd2448121710f07e6b..90e41bead6a51ab1f272af806c396d8411a96eb7 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -160,6 +160,87 @@ public interface World extends PluginMessageRecipient, Metadatable { diff --git a/Spigot-API-Patches/0200-Expose-game-version.patch b/Spigot-API-Patches/0200-Expose-game-version.patch index c2e98ecdc8..50ff8c84fa 100644 --- a/Spigot-API-Patches/0200-Expose-game-version.patch +++ b/Spigot-API-Patches/0200-Expose-game-version.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index ea3e5d6fa56a7ff259a9ce55a8e31d3921768b8b..95ad0122605b40e28352fa6205528eeb5c453a50 100644 +index 600334831293793840511992048c43bff1febc24..c0421b5a09c25ad4f23387b8b0e035871a9d367b 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -118,6 +118,18 @@ public final class Bukkit { @@ -28,7 +28,7 @@ index ea3e5d6fa56a7ff259a9ce55a8e31d3921768b8b..95ad0122605b40e28352fa6205528eeb * Gets a view of all currently logged in players. This {@linkplain * Collections#unmodifiableCollection(Collection) view} is a reused diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 9ceaac0e859e347b07fa9f4c6507a73deb280670..c3fb1c27187b5283e2fd5c2b894bbc889a48544d 100644 +index f44a582e954625a12b19d4e142865e5d3154edd5..0ad848c42039eeed64cc0b8372d3a9331e61d286 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -97,6 +97,16 @@ public interface Server extends PluginMessageRecipient { diff --git a/Spigot-API-Patches/0205-Spawn-Reason-API.patch b/Spigot-API-Patches/0205-Spawn-Reason-API.patch index b3dd53923a..5be9eb6a70 100644 --- a/Spigot-API-Patches/0205-Spawn-Reason-API.patch +++ b/Spigot-API-Patches/0205-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 ec719d5c0741f3489884709169fee93ef02244bb..920f3eb82f1492bd59896e03b65a4df2e46c854d 100644 +index 71c1e93ea15f0a926a9ad822d09a076f8b800988..75c9225bd07b4c4b6dcd702c52294a7637eb6884 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,8 @@ diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 039465e80f..2297b9c636 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -32,7 +32,7 @@ index fc92fbb05e442d453d6d5dd4e36143a576f55b6b..1fcdbbbc7b60edd1e87bab5f1c5d19a6 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 36e44309d5c8467c79da981ea957c17ebabe9595..0f49da25bb6a1aaad18cbd57d0d312769fe50c3e 100644 +index 0094d9251251845fbacff6d458443385627ca0c8..3e2328079f5f98f3f10cc1badd1059a3703eb2d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -224,7 +224,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; diff --git a/Spigot-Server-Patches/0019-Add-version-history-to-version-command.patch b/Spigot-Server-Patches/0019-Add-version-history-to-version-command.patch index eacd5dd137..887372cc14 100644 --- a/Spigot-Server-Patches/0019-Add-version-history-to-version-command.patch +++ b/Spigot-Server-Patches/0019-Add-version-history-to-version-command.patch @@ -192,7 +192,7 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 4cf4ef11ce295aec3b7d0bf07b64a1ecdca3c39a..b091db5901d75769e406c454b205f102c82ca021 100644 +index 9cba62efdb051c9850bbf28b0be17a7e00ed83c9..ce285b97cbdc9d74504d073fc659c295300dd720 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -156,6 +156,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch index 0d87ba3ad8..eecc42f3de 100644 --- a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch @@ -119,7 +119,7 @@ index 4f7dc23d67e97f9a2b8983750299fc43b0ed6db9..a4a48dbee002e96a5644d9a033f9f233 public void c() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 51782a02c0882acca208b71bbd75946f6396dcce..d5d9022e05cd0a93bde89962f4291ad92ac0b3d2 100644 +index 661c8b3c81be46ef2c9488bb52d1963c7f0e89e2..032b1ac672a604691c625e43008927e3a68d2160 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1669,7 +1669,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch index 1f728ac664..56f24685d9 100644 --- a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f6da0875d944d89d047bb44c47b51337b15f91a7..5697c624148cf654e68153f08b688842eff3a207 100644 +index 032b1ac672a604691c625e43008927e3a68d2160..a39b11bb15e15c17e4617d3ef212845f8fe87a38 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1355,12 +1355,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0025-Entity-Origin-API.patch index c3f4dc7b4c..4098e0b825 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0025-Entity-Origin-API.patch @@ -101,7 +101,7 @@ index ad8a506bb430b26fe147a657a2f826daf9bf4d45..ad4807e0bdd6409bd798f995da8f43ce if (i >= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2b39fb903c1cf6ded8aa170f5bd25f4fadb1195a..db3b35eac5584b8319fc0d4cbb28408b2d0f620b 100644 +index dd02f7b8c0c0055a506bceab68cec98faf4a7641..eb53a8232371433aabe300af5629cf1735ff18fb 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1088,6 +1088,11 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0034-Disable-thunder.patch b/Spigot-Server-Patches/0034-Disable-thunder.patch index de52bd4656..17b96b8f9b 100644 --- a/Spigot-Server-Patches/0034-Disable-thunder.patch +++ b/Spigot-Server-Patches/0034-Disable-thunder.patch @@ -19,7 +19,7 @@ index 25e0717186366af580e512eedfd403b8efc64a75..41436a4ead736dc925ca77d4cabf925f + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index db3b35eac5584b8319fc0d4cbb28408b2d0f620b..0ec10ad5caa86b5c5e84084aeec0ccb0113b3f10 100644 +index eb53a8232371433aabe300af5629cf1735ff18fb..8c33ad47feeb1ab25e656d3171a829b149198322 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -471,7 +471,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch index 5270b0f064..04b37519ed 100644 --- a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch @@ -19,7 +19,7 @@ index 41436a4ead736dc925ca77d4cabf925f4e492d68..f53d8b96757cbedc5fbb16195952a7da + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0ec10ad5caa86b5c5e84084aeec0ccb0113b3f10..ac66ee26861ffa4795a00f328deefab5962fad88 100644 +index 8c33ad47feeb1ab25e656d3171a829b149198322..9eec2ec61777222c1290ad3112b003409001e51a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -495,7 +495,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch index 6cfac5dd48..4f50672d2c 100644 --- a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch +++ b/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch @@ -20,7 +20,7 @@ index a4da22ea65d5fdba38f8dc331919088f9ca99aed..345ac63e281bb3372b2ae879d587d658 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 1441d096d44ea653539ba20ccda94eb62ffc32df..eddf67805ad472cfdd45c1f3c6068b0530cae97d 100644 +index b9d0d2d42850c3a5d093429cd0d02ac47848f04b..44b9bfcdc7f2cbf4dc6e28c258506d9f84783b0e 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java @@ -268,6 +268,11 @@ public class BlockChest extends BlockChestAbstract implements I diff --git a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch index fb01eaf978..6e574907f6 100644 --- a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch @@ -48,7 +48,7 @@ index 890b0fc7baf51ed6896d979021b3956c5c279c40..b468182266c39b9defa1aa287290f75f } 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 9cf0d095db124976c7777ff78a6a1f1f46f4a363..35f0527f6dbd06660a1ca4ce528ac1e8c056bb16 100644 +index 0f5af8365abe99971a815285703a3b598f130a0d..5ff0456b781b6a6fbc674e2c532b73f3245f5fd5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -752,6 +752,29 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch index 09675053d0..85a52b1a18 100644 --- a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch @@ -52,7 +52,7 @@ index 3a6e780007bc1b1fa799166daa01d3a9e15c7ab0..535056c64ef866e645b1bfbd149b50c5 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5697c624148cf654e68153f08b688842eff3a207..682dd0d53f393c326e3da9b99fbff21953535161 100644 +index a39b11bb15e15c17e4617d3ef212845f8fe87a38..d4c919288d6f926938fb67a2085eabb635907cda 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch index c213db22c9..57470af925 100644 --- a/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Change implementation of (tile)entity removal list use sets for faster removal diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 54143a64c4c41d7bdc3476f676ea45143b3e98ca..5197cdb3219638b499f0eb2a25f35e789983a3e8 100644 +index 864df4fbcb0f4a09fc12b270955c36d779aeb7d4..a1e1dc72cd6a556505a6f0d7feee2527947c00dd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -37,7 +37,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch b/Spigot-Server-Patches/0052-Add-velocity-warnings.patch index 91454078aa..561eb5c866 100644 --- a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0052-Add-velocity-warnings.patch @@ -5,7 +5,7 @@ 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 3768215d57f4025bdb83913e45b12119d53e1002..1de3ac4242f388f2331c5a02e17b1709491dcbc7 100644 +index 3a0e0139db61405e8307abb3d17d1836f45bd8a3..0188028d62015691575eea68f58e4b2acbcbb4a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -260,6 +260,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch index b4466a814e..3879aa458b 100644 --- a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch @@ -30,7 +30,7 @@ index cd47a4ca069df26969de3051c2aac80540093818..abbf59bb91021821876a8960e8f77fac + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 682dd0d53f393c326e3da9b99fbff21953535161..15312df00ea7d88ca1733b5b8a5dd8f204728811 100644 +index d4c919288d6f926938fb67a2085eabb635907cda..e89de0309c7e9fa406a9507785dcfcb6ba0167d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -762,7 +762,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch index 93c04ef6dc..e2044f436c 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch @@ -22,7 +22,7 @@ index b468182266c39b9defa1aa287290f75f7db44b9a..a0806ddc407d21340c82fe4d00bb7ad1 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b63cf312a9e9ea4b0659a799abfe21f6f1d98fdb..8a2523e56c74d9d3b75501cef10f3495d460f36d 100644 +index e89de0309c7e9fa406a9507785dcfcb6ba0167d7..1476ea7fde24bbc659b7cd7e0b8244306ab6b24a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -136,6 +136,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index c36ea2c9f0..91714aa1e6 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -30,7 +30,7 @@ index a62f4bbb973b9cb6d1ee53f56a0897d70ae176af..f207abbe757ad403a29a7a012903aaa8 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1de3ac4242f388f2331c5a02e17b1709491dcbc7..228106442d8f6d425a0d15c816532223749e03be 100644 +index 0188028d62015691575eea68f58e4b2acbcbb4a9..30701934a3b7cc7d2a502fe7c3c251a9f268a9bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -397,6 +397,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch index 707acd3c59..f90a119904 100644 --- a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch @@ -7,7 +7,7 @@ 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 73f140771bac6bfda57bbd402a1603cedf8c38b5..2bb31a684906044b159e959dd8acd85efc660b02 100644 +index 72fb341e77b73ace8555cfc1bfdb3bbab726f1e6..9fdceeeeece358b2456cd66bc585821b7252691e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -863,8 +863,18 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch index e1b9ccac8c..2e333e5054 100644 --- a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,7 +44,7 @@ index f1080e7d10d5105e3f4010489393f6150c7c4a75..374e4a3dcb656d6a84e05bb9260d3198 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8a2523e56c74d9d3b75501cef10f3495d460f36d..93690040efd7de5223cd81415cfa9aeb4bec30ef 100644 +index 1476ea7fde24bbc659b7cd7e0b8244306ab6b24a..9f358b46e5d34ad288205f1155c6183b457a3225 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1590,6 +1590,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch index a8b4c0db91..9949e7e988 100644 --- a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch @@ -22,7 +22,7 @@ index 7de7b74ff69bba1cbad24623d7eeff6c79812bab..6ef0e1399e9ff260712db1a044068c12 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ac66ee26861ffa4795a00f328deefab5962fad88..9e8f22f41889c8592033925c180f46413cfaec14 100644 +index 4548a38464fac65a88da26e95660542eeb482ccb..20200408da6cae15576926f79de22b955781201d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -475,7 +475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch index 54bfd5eeb9..14d58ffd60 100644 --- a/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5b3c8cc669eef72cec04d36de156405421cd21e5..cff5600687d88e3eab06a00bdd7810fa35f3c7cc 100644 +index 9f358b46e5d34ad288205f1155c6183b457a3225..41a73db6040af29c9e087ac2ca425f5d28d0142a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -771,6 +771,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch index 849f610454..81c3758344 100644 --- a/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch @@ -40,7 +40,7 @@ index d4673ac51ffc720362e849ec2da17daaceded4ca..898ac661042381b99b98991f493538c0 this.cg = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 81bd6bd8ef63f99e6a6b9a114e7f4cbe02a3c05c..7c8adeb5c3394bebbcb85c285ca63251c0ffaf0c 100644 +index 41a73db6040af29c9e087ac2ca425f5d28d0142a..43b50d56f87a1ac52eae1529875834ab85733aa4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1776,8 +1776,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch index 2f5a4b5477..02c51f9ac9 100644 --- a/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch @@ -25,7 +25,7 @@ index 637632b1324e2cdc80cecc4a5a94dc9379312f30..05aae52e662f7effbfb358a5fa6e33c3 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index ab0f9a9d69c801e47002039c41c7c3393fc2f403..967aec7ce9a7fbbb42b51d1ed281db005e107c2c 100644 +index 534295965ee701611b5e12a10f14a69e8226376a..5e5bb5aaa3d8f4e8f4b00ba8bee059ec79f82b43 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -20,6 +20,7 @@ public abstract class TileEntity implements KeyedObject { // Paper diff --git a/Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch index c10ce5e97c..230f55e10f 100644 --- a/Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch @@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 68510457b527e61bf60bf1e7dfd664578172c00a..3880559505af742f1ab36f7959dc7fbd1e5da1b3 100644 +index eefad79a01de61eff5e0bd3f709bfda030ebe20d..6eb81504146af614a806add6e5effe0c2b111c8a 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -138,6 +138,7 @@ public abstract class StructureGenerator diff --git a/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch index 5d436e4b05..4f04a64c28 100644 --- a/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch @@ -18,7 +18,7 @@ index 275c1d2d1eb2649de9a9b5aece6e88c21362efba..d72ba7f76c42fd525a5b59a999a0c08e public static Collector, ?, Map> a() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 20cb63419a049ce9dcaf2f0c99274501ebf9aa8c..2118f7a8ea87191fd6fb5324c3c29f8beb43f3f3 100644 +index 43b50d56f87a1ac52eae1529875834ab85733aa4..a490d6330474a77d81a0e25ac74ea36c183e7cf0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -219,6 +219,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0149-Item-canEntityPickup.patch b/Spigot-Server-Patches/0149-Item-canEntityPickup.patch index 2f36a0331f..60f3a133e4 100644 --- a/Spigot-Server-Patches/0149-Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/0149-Item-canEntityPickup.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index f2cd6824790d7e76f8f10e2630bcd5ebbf2a4238..3997dc6d979bf5a027861397b948aa4e8486fc58 100644 +index 2f85d9799d67d3fb1d340179d8dbd03771467329..e434e23bf5b22a623ed7b915711bdb31b7e90b61 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -539,6 +539,11 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch index 3be84e12c0..fba9b708c9 100644 --- a/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch @@ -5,7 +5,7 @@ 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 1c9b5c376c0750974f52d526414d094fcf3a3e11..71f2a8cfc2e077ce7c576957fd1d36f6612a4ebf 100644 +index db41896b45f1608fbeb962d3ffe25d9608b36cc4..60a44992a962e15686f89247823389d3757d8b8c 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; diff --git a/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index ff1195fa4c..18f2ba9a85 100644 --- a/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -28,7 +28,7 @@ index 2acc2a98bd8df6d81b5865b768265a210597b57b..55cdd9061b2c70abe8458de497dd61e1 org.ow2.asm asm diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 49b5c226dcbd4ef7d2a3418ef2c7e98bb689ccfb..f6544e4fb0eacce7f3579998e8ec0743b7f46c65 100644 +index af839f432d410601fbbe06b665e4e0fad801c17d..13ae03d48a2a838ee9eb016072f3486d3c7192ef 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -131,8 +131,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch index 887cc01a21..67bef8099a 100644 --- a/Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch @@ -103,7 +103,7 @@ index 4f008e4723d2cb0bcabb2d5621203d63c40c4923..8545146fb1f093f821e3b966d9337049 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 527c116c23a505eead00e73a39ce9f932eb4ad8d..09ac19363ecfdebe2b124fdf68a95265ae085cfe 100644 +index a490d6330474a77d81a0e25ac74ea36c183e7cf0..626ef32032eb6327baa92c363ce6bb4705b6b5f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -186,6 +186,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch index 321d2d8401..063fe2ea56 100644 --- a/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 967aec7ce9a7fbbb42b51d1ed281db005e107c2c..54285237ed5a096b2e46cabd78f7dcd5128133a8 100644 +index 5e5bb5aaa3d8f4e8f4b00ba8bee059ec79f82b43..2b06c95b4fac97513e706ef073fdd7418e1f092c 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -231,7 +231,12 @@ public abstract class TileEntity implements KeyedObject { // Paper diff --git a/Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch index 26b317150a..1c4c46e459 100644 --- a/Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch @@ -43,7 +43,7 @@ index e7fb982913f391bafd608c4626086cd9cab7fad7..7f2d8de12473c5413bbfc10ea0947d6a return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 09ac19363ecfdebe2b124fdf68a95265ae085cfe..734274db8f8c53d7e5310f2c16b1c64a42a6277c 100644 +index 626ef32032eb6327baa92c363ce6bb4705b6b5f1..f27fb59e752d25807859396560b213162870998e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1058,8 +1058,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch index fb09bf9179..5569d1e292 100644 --- a/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..44850b387f84aa9a3d1ec47555026b6088fc167e 100644 +index f27fb59e752d25807859396560b213162870998e..53c52e4922538f1dd50764d8cbaa178d1f0692f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ diff --git a/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch index 1eea3b243a..761f9e2e23 100644 --- a/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 44850b387f84aa9a3d1ec47555026b6088fc167e..ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3 100644 +index 53c52e4922538f1dd50764d8cbaa178d1f0692f9..b5d2ce40431247112baaded01e860c1832bf8fd8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch index b50568c135..4055fbd39f 100644 --- a/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch @@ -20,7 +20,7 @@ index 77cdbfadf9c3eddb6a02460c321fa816d1bab8ac..171c8e3031cf4bf4da062663089cc0cb + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index a781ac0cf8766e915c10ebd3823cbe5b0d1c5230..59f7fced6213c218cd19863be99964eb496b6fe6 100644 +index 74950d74e6a11d5552369e830f9fdd63c4306221..e05e56f464c643925abfdf04bd745e3932ca001d 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1091,7 +1091,11 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch index 686dbb752d..a5613c4683 100644 --- a/Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch +++ b/Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch @@ -7,7 +7,7 @@ Called when a player is firing a bow and the server is choosing an arrow to use. Plugins can skip selection of certain arrows and control which is used. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 59f7fced6213c218cd19863be99964eb496b6fe6..4893daca7ea64504731cfab455e09b0a11c65857 100644 +index e05e56f464c643925abfdf04bd745e3932ca001d..a1cfa610eb3cc368b9641feeab709a4f5985ffbe 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -2045,6 +2045,17 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch index 3a3ca0adfb..a39fa8287f 100644 --- a/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d0a389e6dc73202a3fa7c82eace1c92dece2982e..b80068b184b32256f1944b9863454726852cd502 100644 +index a62f769ab509edd30717cfca785449acecdf295e..92fcaf425b5ef398fcac6ecf115502a5cf657ebb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -118,7 +118,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 634e4ac662..c4b3220ef3 100644 --- a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -40,7 +40,7 @@ index 4ae3e91677ecf9c2104a229b4e8b229d18b87aa4..458802dc4b1f923b159168efff0546bb protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8d9dcdce1f395025ce7f644ba25212a83a438be4..3f91ae81cf87b5455a79fa94111cecae77b9986c 100644 +index 324967c892ff8878326af4229668fcbde37ef202..5540fc6eee8115400774b7a792b9d3b45eb01e34 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0256-EntityTransformedEvent.patch b/Spigot-Server-Patches/0256-EntityTransformedEvent.patch index 222965c2e8..7ecaec4d42 100644 --- a/Spigot-Server-Patches/0256-EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/0256-EntityTransformedEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EntityTransformedEvent diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 3997dc6d979bf5a027861397b948aa4e8486fc58..a38a1f3447accd51dcd295fb28c4108cb87ad832 100644 +index 424157dcf536527e80faf5428f18f7e66d4216b6..c23e634dca6aab051b432a5fee2756afa80fb776 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -1244,6 +1244,7 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch index ae46ccf04c..48e36efc08 100644 --- a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch @@ -48,7 +48,7 @@ index 30d04825b8a65e0af66f3591ee6baaa433893b54..3a7e2d1b2a11edbf430333bb8f4788c0 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 ce3d5e9fd1853ab9519da93ce297ca0bceb9acf8..c38224cfef7d3f8d3586398b2514d2b1527b868e 100644 +index 499e7d6fecc6223df057fa644f8c449fda910f0b..ddb4dd94ccc2fe3d85e84f5f80f8362cc5bf90ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -803,6 +803,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch b/Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch index 2eddd0e535..e805d87b65 100644 --- a/Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch +++ b/Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands Lists are bad as Queues mmmkay. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index f6544e4fb0eacce7f3579998e8ec0743b7f46c65..715063432bb3a18421f7ac00723f6695f8a56a8c 100644 +index 13ae03d48a2a838ee9eb016072f3486d3c7192ef..e923835634f7440e5b88a9d5c62a70fcec8b688a 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -38,7 +38,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch index 5e88bdb174..233fcd1150 100644 --- a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch @@ -142,7 +142,7 @@ index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afd public Vector3f r() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b80068b184b32256f1944b9863454726852cd502..f65a0b943843ea365384825c5a848305f303d8f9 100644 +index 92fcaf425b5ef398fcac6ecf115502a5cf657ebb..f2604e867321ca5d84fe0cd7aeed7cf6e5741919 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2503,6 +2503,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch index 30b898d441..e9dee421a8 100644 --- a/Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f65a0b943843ea365384825c5a848305f303d8f9..c3f3a392f2b15a806c706b1e518282225b45bbc3 100644 +index f2604e867321ca5d84fe0cd7aeed7cf6e5741919..4b249a644c680a7cc64b0d31cf453f94ff2b6a0c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -3442,6 +3442,23 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch index 936f79eab8..e5b310871a 100644 --- a/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch @@ -27,7 +27,7 @@ index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5bcdcde0ac3b82a85662a5671d1db414b39a8e34..014eac2f7c6f5023ba7f935fe99fc06db0736d82 100644 +index bb6635be243a270752e1c47a9646a13ea6707baf..5412e83e0c531d477e6df99eae8fea645044b1f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1949,6 +1949,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0287-Improve-death-events.patch b/Spigot-Server-Patches/0287-Improve-death-events.patch index db3b1c1ba2..3f3c7958c4 100644 --- a/Spigot-Server-Patches/0287-Improve-death-events.patch +++ b/Spigot-Server-Patches/0287-Improve-death-events.patch @@ -357,7 +357,7 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 014eac2f7c6f5023ba7f935fe99fc06db0736d82..a9360c76f720ad64f21b46ca68e2caa24f0a8839 100644 +index 5412e83e0c531d477e6df99eae8fea645044b1f3..8ac369d5edf139b2457fa1da03e3473b907976f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1740,7 +1740,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch index 230ef63e3b..9ed2eeb582 100644 --- a/Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch @@ -17,7 +17,7 @@ index 95e801a9a7ca405ff7e80c920fa78493d0ef5374..a075a41d954836864a5186b383e967a9 for (BlockState blockstate : blocks) { blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index cc15686573f3a54ff0145b3486679b772157d191..aaa40c8a8013806f41f15fcc4682e1ca4d44e956 100644 +index a016d97be93c4218136f803cc9a7f986d70309d2..f6f2743892b5b933e6ba0cc25b24e0d471b305c9 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -292,7 +292,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic diff --git a/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index 32df6d42f5..b9d23093d8 100644 --- a/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -11,7 +11,7 @@ If the projectile fails to find the shooter in the current world, check other worlds. diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java -index f85d80d7bb3e4e92bb8d281dfe577f663ebe9da1..ceecb0520a63d2eff5f4cadf45fa49f56eaea8dd 100644 +index ea5f5845a8d202e62da3ae1bfb1e4dbd7f5e185e..ef7e036943bfbd869bd5d71bcb2ecc6c35c18294 100644 --- a/src/main/java/net/minecraft/server/IProjectile.java +++ b/src/main/java/net/minecraft/server/IProjectile.java @@ -29,7 +29,18 @@ public abstract class IProjectile extends Entity { diff --git a/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch index 84d2f46778..13d96d6178 100644 --- a/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch @@ -289,7 +289,7 @@ index ae74dc9e183e66062455cf2a18ab43ae87976046..7eb230f1b27eddf48f1b12fc78877a36 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 c38224cfef7d3f8d3586398b2514d2b1527b868e..02395d71bc8b457240720cc76a481f9ea1613d79 100644 +index ddb4dd94ccc2fe3d85e84f5f80f8362cc5bf90ef..02dc825a40bc8f289cd4b93ba2e88ee534784730 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -675,7 +675,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch index 740c3bde4d..ba780e95be 100644 --- a/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch @@ -72,7 +72,7 @@ index 41c14d367e0b51e109001167d3c7b40676f364b8..505ba8e298a825ce69cc60c76cb040ed if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index af554396fdb25719c158a81ccab76e91f5df2ff5..5ef91da9733fd9276e7bd819a11a0548e01b17f0 100644 +index afc665bfe9d527ca8d19f3ab9df0900d87f2d3f2..7916421fe1dd8eadfd1c9bd15c4bbbb7331faca6 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -942,9 +942,11 @@ public abstract class EntityHuman extends EntityLiving { @@ -91,7 +91,7 @@ index af554396fdb25719c158a81ccab76e91f5df2ff5..5ef91da9733fd9276e7bd819a11a0548 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f5f043f0a5bafb7e432a541f9ef6db0956a52f31..ed001440151078e20a449ba073d71e873ff0ad9a 100644 +index d6a98bb7fc107649c179cded2d37c06a41146a89..84de18a6c207612ec3d3cca61749934b1d421155 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2892,11 +2892,13 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index b93257f141..a5d669d660 100644 --- a/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -28,7 +28,7 @@ index 80a9faf3b02c51efc1f55beebce173309628b9ab..ccf1a64d33038a73360f68a814bd4602 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e9e6e89145cc3d6b2b497132030c47515bfee5ab..a6f0b39717164d6b3ab15843b13ef52a24dde5d6 100644 +index 2acea235633fb6b48c68711bc1cec5b61e7bf140..f436f30c1e07ac42e35a007cde5a92cc0568e7ff 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -97,6 +97,7 @@ public abstract class PlayerList { @@ -106,7 +106,7 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0e1f5c75b6ab37ce3cfbeaecdc3dd64e8c05e18e..13636096a166150e1e3c0d88a31badf202f702d7 100644 +index 8ac369d5edf139b2457fa1da03e3473b907976f6..4266884ba7790f673704937305d787d19a61401a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch index 1f104f395b..a62d38fb8d 100644 --- a/Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,7 +12,7 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e32a9794c73bd35050819bc61e746cce5a7e453a..06b4eafd8337dc8fe2da0de72e501cba7aca0785 100644 +index 4266884ba7790f673704937305d787d19a61401a..f05f7cbdb0f42601faab8c68a4c75247bd964823 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1994,6 +1994,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch index 82e2cdcb00..ad1d8b6d13 100644 --- a/Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch @@ -66,7 +66,7 @@ index 505ba8e298a825ce69cc60c76cb040edeb0acdbd..e87fa15250a57c9b7ed4f4b530289b7b return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ed001440151078e20a449ba073d71e873ff0ad9a..f74e9ffda092ef4a2e30c316e682af154921b5df 100644 +index 84de18a6c207612ec3d3cca61749934b1d421155..eeca12bd7c6e59b872303fda1378a69d03dcf783 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -3495,6 +3495,37 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch index 1a67d68e43..3988c22a7d 100644 --- a/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch @@ -40,7 +40,7 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 06b4eafd8337dc8fe2da0de72e501cba7aca0785..8ffef87f77d137622e656c3ffd5a0ecb6cd4ab68 100644 +index f05f7cbdb0f42601faab8c68a4c75247bd964823..cafa091b84caa6b24078962552b6bb34aca284c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2003,6 +2003,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 134323c6db..6e939e4efb 100644 --- a/Spigot-Server-Patches/0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -38,7 +38,7 @@ index 43925ed1e5c210399ba9fedb7bf890a6bd617e4a..16727e92f591725c8f8cefb250b7ab8c public EngineMode engineMode; public int maxChunkSectionIndex; diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 32d45b54fc4e67555a7f016ac72787a8ad4818f3..86e906361ed998ba94ff6e1cbe21860a88626c3b 100644 +index 6426f67afb3cc3522ff79b1c8515c1f97cd2f0c1..8130e14b5d6c3e8b0a1234668d5c855e82f3a5dc 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -48,6 +48,13 @@ public final class SpawnerCreature { diff --git a/Spigot-Server-Patches/0374-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0374-Configurable-projectile-relative-velocity.patch index 5f2519a433..76dd42a186 100644 --- a/Spigot-Server-Patches/0374-Configurable-projectile-relative-velocity.patch +++ b/Spigot-Server-Patches/0374-Configurable-projectile-relative-velocity.patch @@ -39,7 +39,7 @@ index 16727e92f591725c8f8cefb250b7ab8c64a19472..a6e68b2ab8890d9d2a842ca0a6b565a1 + } } diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java -index ceecb0520a63d2eff5f4cadf45fa49f56eaea8dd..ecdc717b3013749ed2384a143d6b6eef07f6f642 100644 +index ef7e036943bfbd869bd5d71bcb2ecc6c35c18294..a961f5d5d4f56cc43d883862e50e3430a2138968 100644 --- a/src/main/java/net/minecraft/server/IProjectile.java +++ b/src/main/java/net/minecraft/server/IProjectile.java @@ -114,7 +114,7 @@ public abstract class IProjectile extends Entity { diff --git a/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch index 613c53abca..79407d403e 100644 --- a/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch @@ -40,7 +40,7 @@ index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c392129 this.playerInteractManager.a((WorldServer) world); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 870b5352528384b0bb612cd5379683ee142fb99f..0524370c393dff4794abc0dfb28630c533a39ce1 100644 +index 4189c315176415b121c6e8f8d3c9682caded2189..29b802b9b1435479ca2a4b57267967f848162424 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -134,6 +134,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch index c55903d29f..a2fdb0c7b6 100644 --- a/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8ffef87f77d137622e656c3ffd5a0ecb6cd4ab68..f553647b4351b2684f522b40b1e533511efc8ae9 100644 +index cafa091b84caa6b24078962552b6bb34aca284c3..9e26a15746fcdf80b581b81f836d9df51759f601 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ diff --git a/Spigot-Server-Patches/0474-Expose-game-version.patch b/Spigot-Server-Patches/0474-Expose-game-version.patch index d899b34e55..37b208deb0 100644 --- a/Spigot-Server-Patches/0474-Expose-game-version.patch +++ b/Spigot-Server-Patches/0474-Expose-game-version.patch @@ -5,7 +5,7 @@ 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 604723d6f93b694f59f9844486d2b0c8f24a39af..893088011b8e15449c3c9003e52a884b61221acc 100644 +index bae1c62cb5c440ec9f915f602d58635bfbfa361c..666ed0e87379a5bb9ea95cd95c23eca2df02610f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -516,6 +516,13 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch index d1a927254d..da052fc7bc 100644 --- a/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,7 +22,7 @@ index 735beaf6fa6e6ccf2137b64a0b5179ada2907011..b474f45b6d551e45f8894b3971baade3 // 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 1cae2af41e866c22a4f7524250cccdd9f99f6cb9..d7b56da8a910026006dc08306e92a11e407659ce 100644 +index 2b17f2143ee9259c988f65c4db6e82b14dd70876..40e6b8c8a90d6939cbacb088b9bc27dedd511b7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -932,6 +932,35 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index bad1994720..2a8f4861f6 100644 --- a/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,7 +22,7 @@ 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 d7b56da8a910026006dc08306e92a11e407659ce..a62ca5f24c0a49af6b42c473cbaced86cfe39d3c 100644 +index 40e6b8c8a90d6939cbacb088b9bc27dedd511b7d..0c6bc282652840536695c019f9a2b9a7391a1168 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -344,7 +344,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch index 01281d012f..4d2af37153 100644 --- a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit lightning strike effect distance diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0f4fca90fd6c3788a5762c96c344899cb1665466..4a59d42b778e681e93f1243ecd16c5cf46160b97 100644 +index 0f4fca90fd6c3788a5762c96c344899cb1665466..708448a72503c5878070d3aef710aa8f6b118be1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -648,4 +648,26 @@ public class PaperWorldConfig { @@ -36,7 +36,7 @@ index 0f4fca90fd6c3788a5762c96c344899cb1665466..4a59d42b778e681e93f1243ecd16c5cf + } } diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index 6f979e5f1f1567b140e9689298aff85de34f7413..ebcb9f48f47d1ab1e972bed1bc7cb0ee305a29f2 100644 +index 6f979e5f1f1567b140e9689298aff85de34f7413..b1b8748fa95aab25562c2f5397cb6454737fa508 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -56,6 +56,17 @@ public class EntityLightning extends Entity { diff --git a/work/CraftBukkit b/work/CraftBukkit index d424351010..983305bb4a 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit d4243510102530684b860dbe927311bf47c488db +Subproject commit 983305bb4a8601367e31f44b691f6e598bde9d0c From 68aa46cc55b1e95eb0a48fafc93e9beb2c495d8c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 27 Jun 2020 18:18:31 -0400 Subject: [PATCH 35/95] Remove unneeded patch --- .../0373-Fix-some-generation-concurrency-issues.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename removed/1.16/{ => No longer Needed}/0373-Fix-some-generation-concurrency-issues.patch (100%) diff --git a/removed/1.16/0373-Fix-some-generation-concurrency-issues.patch b/removed/1.16/No longer Needed/0373-Fix-some-generation-concurrency-issues.patch similarity index 100% rename from removed/1.16/0373-Fix-some-generation-concurrency-issues.patch rename to removed/1.16/No longer Needed/0373-Fix-some-generation-concurrency-issues.patch From 78c5491f14903c2574a1cba94161b343c40d98ee Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 27 Jun 2020 20:32:49 -0400 Subject: [PATCH 36/95] Fix Piglin issue --- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 43 +++++++++++++ Spigot-Server-Patches/0004-MC-Utils.patch | 4 +- ...064-Handle-Item-Meta-Inconsistencies.patch | 2 +- ...mplement-ensureServerConversions-API.patch | 4 +- .../0160-Implement-getI18NDisplayName.patch | 4 +- ...-get-a-BlockState-without-a-snapshot.patch | 2 +- ...0222-ItemStack-getMaxItemUseDuration.patch | 2 +- .../0250-Improve-BlockPosition-inlining.patch | 2 +- ...on-t-call-getItemMeta-on-hasItemMeta.patch | 4 +- ...ptimize-BlockPosition-helper-methods.patch | 2 +- .../0365-Implement-CraftBlockSoundGroup.patch | 4 +- ...-Add-effect-to-block-break-naturally.patch | 6 +- .../0418-Optimise-random-block-ticking.patch | 2 +- ...imise-TickListServer-by-rewriting-it.patch | 2 +- ...-Optimize-Bit-Operations-by-inlining.patch | 2 +- Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch | 64 ------------------- ...-Hide-sync-chunk-writes-behind-flag.patch} | 0 ...it-lightning-strike-effect-distance.patch} | 0 ...1-Add-permission-for-command-blocks.patch} | 0 ...ure-Entity-AABB-s-are-never-invalid.patch} | 0 ...orldBorder-collision-checks-and-air.patch} | 0 21 files changed, 64 insertions(+), 85 deletions(-) delete mode 100644 Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch rename Spigot-Server-Patches/{0520-Hide-sync-chunk-writes-behind-flag.patch => 0519-Hide-sync-chunk-writes-behind-flag.patch} (100%) rename Spigot-Server-Patches/{0521-Limit-lightning-strike-effect-distance.patch => 0520-Limit-lightning-strike-effect-distance.patch} (100%) rename Spigot-Server-Patches/{0522-Add-permission-for-command-blocks.patch => 0521-Add-permission-for-command-blocks.patch} (100%) rename Spigot-Server-Patches/{0523-Ensure-Entity-AABB-s-are-never-invalid.patch => 0522-Ensure-Entity-AABB-s-are-never-invalid.patch} (100%) rename Spigot-Server-Patches/{0524-Optimize-WorldBorder-collision-checks-and-air.patch => 0523-Optimize-WorldBorder-collision-checks-and-air.patch} (100%) diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index c8b68936a1..a4ccf6663a 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -232,6 +232,49 @@ index 0aa66addb2cb472b2ab90000d3f0e0f967353e0f..eaa527f4fe289a9492b12591154a60e5 } return biomebase; +diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java +index 8eb94bcb605f882c9ce096fc758df5e3ae3ab28d..886b43e2b8f21c358b4d6785c677f14c91d191f3 100644 +--- a/src/main/java/net/minecraft/server/BlockPosition.java ++++ b/src/main/java/net/minecraft/server/BlockPosition.java +@@ -220,8 +220,8 @@ public class BlockPosition extends BaseBlockPosition { + }; + } + +- public static Iterable a(BlockPosition blockposition, int i, int j, int k) { +- int l = i + j + k; ++ public static Iterable a(BlockPosition blockposition, int p_i, int p_j, int p_k) { // Paper - decompile issues - variable name conflicts to inner class field refs ++ int l_decompiled = p_i + p_j + p_k; // Paper - decompile issues + int i1 = blockposition.getX(); + int j1 = blockposition.getY(); + int k1 = blockposition.getZ(); +@@ -249,15 +249,15 @@ public class BlockPosition extends BaseBlockPosition { + ++this.l; + if (this.l > this.j) { + ++this.i; +- if (this.i > l) { ++ if (this.i > l_decompiled) { // Paper - use proper l above (first line of this method) + return (BlockPosition) this.endOfData(); + } + +- this.j = Math.min(i, this.i); ++ this.j = Math.min(p_i, this.i); // Paper - decompile issues + this.l = -this.j; + } + +- this.k = Math.min(j, this.i - Math.abs(this.l)); ++ this.k = Math.min(p_j, this.i - Math.abs(this.l)); // Paper - decompile issues + this.m = -this.k; + } + +@@ -265,7 +265,7 @@ public class BlockPosition extends BaseBlockPosition { + int i2 = this.m; + int j2 = this.i - Math.abs(l1) - Math.abs(i2); + +- if (j2 <= k) { ++ if (j2 <= p_k) { // Paper - decompile issues + this.n = j2 != 0; + blockposition_mutableblockposition = this.h.d(i1 + l1, j1 + i2, k1 + j2); + } diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java index 771841e08591955e61c7bcc5b09c8457652c1b9c..8162c11d14b8e88c2b572f9ddf6b7a15977047f8 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 722e163b3c..3b711095e7 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2331,7 +2331,7 @@ index 47324feca49786b49563d3d0e854e74ad27c190b..26d446077bb563ca3c5bb0339695b336 public boolean isAlwaysDestroyable() { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 8eb94bcb605f882c9ce096fc758df5e3ae3ab28d..b61651fcd6605cd8638ce14f15e41b878add3f1c 100644 +index 886b43e2b8f21c358b4d6785c677f14c91d191f3..f1ad6ad22a59b28d2e8aeb2c0f4c21bce6070bc5 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -98,6 +98,7 @@ public class BlockPosition extends BaseBlockPosition { @@ -4459,7 +4459,7 @@ index ac7c9efc53123e4fa964b33f67cf8196846056cc..f45b5ddc66024e993ac94436ee25a03e private final MinecraftServer server; public final WorldDataServer worldDataServer; // CraftBukkit - type diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 993fae70fe6844581b2a52bd4df8088539d49b8a..2097ea9b2683bf4063fbcb601720e8d297fb3b13 100644 +index 6a797a0ac8ca3f120eea5bd9c54de21a4f38b257..f1c4ae9997d5d11d903360dbccf45f3c1df078bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch index f36e44a5d1..699055dfdb 100644 --- a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch @@ -79,7 +79,7 @@ index 76091ab3f149decc0d3c848b79edd24e20cf181d..a360711ea14983e8df34caa5edda80a0 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 2097ea9b2683bf4063fbcb601720e8d297fb3b13..52fbc33dab7090075146e04388262f91ae027f2d 100644 +index f1c4ae9997d5d11d903360dbccf45f3c1df078bc..9e0db30c5f99164412e97a1cdd865ca254861a78 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch index b421201d3f..31e9a9564f 100644 --- a/Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index c55c7d765d179c8d78929fe3395ce3e147f8daea..0a29a851c4bd5ef9745c93e29a8c580baece00da 100644 +index 97a58900ac1622e84b8bed87004c7dd85067d31e..efa013a8bf91df0b71cbf01d2c1b1099ac616c57 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -325,4 +325,10 @@ public final class CraftItemFactory implements ItemFactory { +@@ -326,4 +326,10 @@ public final class CraftItemFactory implements ItemFactory { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { return ((CraftMetaItem) meta).updateMaterial(material); } diff --git a/Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch index 82d1304452..e2e3acd4e2 100644 --- a/Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch @@ -34,10 +34,10 @@ index ea7cb9943dc6da7a05e0841985eb1be4b6bc5169..c83ba9d9869f8ba51df17963d530536d public abstract boolean b(String s); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 0a29a851c4bd5ef9745c93e29a8c580baece00da..9dcc81140a803c07c839faa115db81ff09e22515 100644 +index efa013a8bf91df0b71cbf01d2c1b1099ac616c57..0d62f3ae939557b73c79792d6c2a0fd42513c8b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -330,5 +330,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -331,5 +331,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch index 063fe2ea56..ae64fe925e 100644 --- a/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch @@ -39,7 +39,7 @@ index 5e5bb5aaa3d8f4e8f4b00ba8bee059ec79f82b43..2b06c95b4fac97513e706ef073fdd741 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 1d75200e73f3eaccca4040853a14cfa35a09a2ea..20a294723869756495b4bd5c23846be4049d52a6 100644 +index 606a89a905396a020a3497aa293f64a04c693c7b..12b8d544566888dc77bc2c8748d78f09c4bb3b76 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -308,6 +308,20 @@ public class CraftBlock implements Block { diff --git a/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch index cfa748824b..5f505e3bad 100644 --- a/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch @@ -18,7 +18,7 @@ index c4d034c6a6ff176bc954c00c328512bdf67455a6..7b2010ec4955fb5788c60178c6e306ea return this.getItem().e_(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 52fbc33dab7090075146e04388262f91ae027f2d..2146d1354c48b9a76b24bca321b578d401e1a0a8 100644 +index 9e0db30c5f99164412e97a1cdd865ca254861a78..c6173133cc458fe5a5fe6f431ab79a9abb15101e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -174,6 +174,13 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch b/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch index 06283647f0..340f7147c2 100644 --- a/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch +++ b/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch @@ -62,7 +62,7 @@ index 8b202b342f899a38b989b683bd8be4f5c4061f48..1842e69839a65e7b8d2c47fd30ec8f31 } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index b61651fcd6605cd8638ce14f15e41b878add3f1c..b25b84d017ee610d8f006536fdfa63e840474a9b 100644 +index f1ad6ad22a59b28d2e8aeb2c0f4c21bce6070bc5..48410cfbfe203dbe533294a7e4f261dba9c327cb 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -81,6 +81,7 @@ public class BlockPosition extends BaseBlockPosition { diff --git a/Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch index ba7fb72e4a..1b088a3837 100644 --- a/Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 2146d1354c48b9a76b24bca321b578d401e1a0a8..3541fed804b9bbfbd8c658d6c03a74c3dd4acf25 100644 +index c6173133cc458fe5a5fe6f431ab79a9abb15101e..8af956955c8399cb62df8cbb4fc0ae6c87cdc187 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -561,7 +561,7 @@ public final class CraftItemStack extends ItemStack { +@@ -562,7 +562,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { diff --git a/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch index 03a4bea330..5547e3f88a 100644 --- a/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch +++ b/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize BlockPosition helper methods Resolves #1338 diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index b25b84d017ee610d8f006536fdfa63e840474a9b..37570a3bbb9a36133d012350eca1685cca68c73b 100644 +index 48410cfbfe203dbe533294a7e4f261dba9c327cb..b50d86b39d2296e1dfb9aaaeb8f8f6f62a4e7430 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -113,57 +113,74 @@ public class BlockPosition extends BaseBlockPosition { diff --git a/Spigot-Server-Patches/0365-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0365-Implement-CraftBlockSoundGroup.patch index 5869a0140b..ae2bcae166 100644 --- a/Spigot-Server-Patches/0365-Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/0365-Implement-CraftBlockSoundGroup.patch @@ -84,10 +84,10 @@ index 957799e034ad8bc7201815b849244b7a809fb666..2301b38ac3b488809d2f624055ad3e23 return this.ab; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 20a294723869756495b4bd5c23846be4049d52a6..2e24b75d2b56dc40d05200ddded817d6ae06803c 100644 +index 12b8d544566888dc77bc2c8748d78f09c4bb3b76..bda3e17ae7a5de98ef94f37307df302fefa3675f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -717,4 +717,11 @@ public class CraftBlock implements Block { +@@ -718,4 +718,11 @@ public class CraftBlock implements Block { AxisAlignedBB aabb = shape.getBoundingBox(); return new BoundingBox(getX() + aabb.minX, getY() + aabb.minY, getZ() + aabb.minZ, getX() + aabb.maxX, getY() + aabb.maxY, getZ() + aabb.maxZ); } diff --git a/Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch index 22dffbdf60..712d4676d1 100644 --- a/Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch +++ b/Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add effect to block break naturally diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 2e24b75d2b56dc40d05200ddded817d6ae06803c..c50277fb107c562c00f9d803967b4121e427f40e 100644 +index bda3e17ae7a5de98ef94f37307df302fefa3675f..9b0e868f006a34b47ef9a48c7ea844be8122c291 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -619,6 +619,13 @@ public class CraftBlock implements Block { +@@ -620,6 +620,13 @@ public class CraftBlock implements Block { @Override public boolean breakNaturally(ItemStack item) { @@ -22,7 +22,7 @@ index 2e24b75d2b56dc40d05200ddded817d6ae06803c..c50277fb107c562c00f9d803967b4121 // Order matters here, need to drop before setting to air so skulls can get their data net.minecraft.server.IBlockData iblockdata = this.getNMS(); net.minecraft.server.Block block = iblockdata.getBlock(); -@@ -628,6 +635,7 @@ public class CraftBlock implements Block { +@@ -629,6 +636,7 @@ public class CraftBlock implements Block { // Modelled off EntityHuman#hasBlock if (block != Blocks.AIR && (item == null || !iblockdata.isAlwaysDestroyable() || nmsItem.canDestroySpecialBlock(iblockdata))) { net.minecraft.server.Block.dropItems(iblockdata, world.getMinecraftWorld(), position, world.getTileEntity(position), null, nmsItem); diff --git a/Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch index 4a31249890..42618a40aa 100644 --- a/Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch @@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..3edc8e52e06a62ce9f8cc734fd7458b3 + } +} diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 37570a3bbb9a36133d012350eca1685cca68c73b..9fb776318c10f393eb6d94e5112c454a7cd246b9 100644 +index b50d86b39d2296e1dfb9aaaeb8f8f6f62a4e7430..2d3e73ef92c7b88d49f8eb27233cb823b425ea4a 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -402,6 +402,7 @@ public class BlockPosition extends BaseBlockPosition { diff --git a/Spigot-Server-Patches/0428-Optimise-TickListServer-by-rewriting-it.patch b/Spigot-Server-Patches/0428-Optimise-TickListServer-by-rewriting-it.patch index 7151ec4c74..c9b9b62423 100644 --- a/Spigot-Server-Patches/0428-Optimise-TickListServer-by-rewriting-it.patch +++ b/Spigot-Server-Patches/0428-Optimise-TickListServer-by-rewriting-it.patch @@ -878,7 +878,7 @@ index 0000000000000000000000000000000000000000..118988c39e58f28e8a2851792b9c014f + } +} diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 9fb776318c10f393eb6d94e5112c454a7cd246b9..adfeeefbbc307a77738c2cc8d82856cd02c2285e 100644 +index 2d3e73ef92c7b88d49f8eb27233cb823b425ea4a..163a6c83a2e494e28981974ef9accd3255e562c2 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -104,6 +104,7 @@ public class BlockPosition extends BaseBlockPosition { diff --git a/Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch index d54739c7e8..eac454310a 100644 --- a/Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch +++ b/Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch @@ -7,7 +7,7 @@ Inline bit operations and reduce instruction count to make these hot operations faster diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index adfeeefbbc307a77738c2cc8d82856cd02c2285e..52b2bff9ee3ccb4cea9549542b2b484685a70bfb 100644 +index 163a6c83a2e494e28981974ef9accd3255e562c2..551ca4471fa3e80fd812938bfce53ca1854dc94d 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -53,28 +53,29 @@ public class BlockPosition extends BaseBlockPosition { diff --git a/Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch b/Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch deleted file mode 100644 index 1cdc3195cb..0000000000 --- a/Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MiniDigger -Date: Fri, 26 Jun 2020 16:51:44 +0200 -Subject: [PATCH] FIX DIS SHIT - - -diff --git a/src/main/java/net/minecraft/server/SensorHoglinSpecific.java b/src/main/java/net/minecraft/server/SensorHoglinSpecific.java -index 40900c51dfdc20b2ce1516f78efd14f61643291a..f5d12bf371bf196d69c8a6569c64015a1d75b042 100644 ---- a/src/main/java/net/minecraft/server/SensorHoglinSpecific.java -+++ b/src/main/java/net/minecraft/server/SensorHoglinSpecific.java -@@ -19,7 +19,7 @@ public class SensorHoglinSpecific extends Sensor { - protected void a(WorldServer worldserver, EntityHoglin entityhoglin) { - BehaviorController behaviorcontroller = entityhoglin.getBehaviorController(); - -- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, this.b(worldserver, entityhoglin)); -+ // behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, this.bb(worldserver, entityhoglin)); // Paper - fix dis shit (for now) + rename - Optional optional = Optional.empty(); - int i = 0; - List list = Lists.newArrayList(); -@@ -42,12 +42,12 @@ public class SensorHoglinSpecific extends Sensor { - } - - behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, optional); -- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, (Object) list); -- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, (Object) i); -- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, (Object) list.size()); -+ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, list); // Paper - decomp fix -+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, i); // Paper - decomp fix -+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, list.size()); // Paper - decomp fix - } - -- private Optional b(WorldServer worldserver, EntityHoglin entityhoglin) { -+ private Optional bb(WorldServer worldserver, EntityHoglin entityhoglin) { // Paper - rename - return BlockPosition.a(entityhoglin.getChunkCoordinates(), 8, 4, (blockposition) -> { - return worldserver.getType(blockposition).a((Tag) TagsBlock.HOGLIN_REPELLENTS); - }); -diff --git a/src/main/java/net/minecraft/server/SensorPiglinSpecific.java b/src/main/java/net/minecraft/server/SensorPiglinSpecific.java -index 2b11bc960a004714a9d725575d2470588d5801fb..4cc50f38e901f5dde4576a91cf4d6797fb45631a 100644 ---- a/src/main/java/net/minecraft/server/SensorPiglinSpecific.java -+++ b/src/main/java/net/minecraft/server/SensorPiglinSpecific.java -@@ -21,7 +21,7 @@ public class SensorPiglinSpecific extends Sensor { - protected void a(WorldServer worldserver, EntityLiving entityliving) { - BehaviorController behaviorcontroller = entityliving.getBehaviorController(); - -- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, c(worldserver, entityliving)); -+// behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, c(worldserver, entityliving)); // Paper - fix dis shit (for now) - Optional optional = Optional.empty(); - Optional optional1 = Optional.empty(); - Optional optional2 = Optional.empty(); -@@ -92,10 +92,10 @@ public class SensorPiglinSpecific extends Sensor { - behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, optional4); - behaviorcontroller.setMemory(MemoryModuleType.NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD, optional5); - behaviorcontroller.setMemory(MemoryModuleType.NEAREST_PLAYER_HOLDING_WANTED_ITEM, optional6); -- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_ADULT_PIGLINS, (Object) list1); -- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, (Object) list); -- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, (Object) list.size()); -- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, (Object) i); -+ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_ADULT_PIGLINS, list1); // Paper - decomp fix -+ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, list); // Paper - decomp fix -+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, list.size()); // Paper - decomp fix -+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, i); // Paper - decomp fix - } - - private static Optional c(WorldServer worldserver, EntityLiving entityliving) { diff --git a/Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch b/Spigot-Server-Patches/0519-Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch rename to Spigot-Server-Patches/0519-Hide-sync-chunk-writes-behind-flag.patch diff --git a/Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0520-Limit-lightning-strike-effect-distance.patch similarity index 100% rename from Spigot-Server-Patches/0521-Limit-lightning-strike-effect-distance.patch rename to Spigot-Server-Patches/0520-Limit-lightning-strike-effect-distance.patch diff --git a/Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch b/Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch similarity index 100% rename from Spigot-Server-Patches/0522-Add-permission-for-command-blocks.patch rename to Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch diff --git a/Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch b/Spigot-Server-Patches/0522-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 100% rename from Spigot-Server-Patches/0523-Ensure-Entity-AABB-s-are-never-invalid.patch rename to Spigot-Server-Patches/0522-Ensure-Entity-AABB-s-are-never-invalid.patch diff --git a/Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch b/Spigot-Server-Patches/0523-Optimize-WorldBorder-collision-checks-and-air.patch similarity index 100% rename from Spigot-Server-Patches/0524-Optimize-WorldBorder-collision-checks-and-air.patch rename to Spigot-Server-Patches/0523-Optimize-WorldBorder-collision-checks-and-air.patch From 74bf22ad52fa7f1622e477b53bc4440306e55575 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 27 Jun 2020 21:19:04 -0400 Subject: [PATCH 37/95] more patch organization 0383 was merged into async chunk io patch. 0316 might still be needed but its unlikely. --- ...Status-cache-when-saving-protochunks.patch | 25 ------------------- .../0302-Avoid-dimension-id-collisions.patch | 0 .../0316-Fix-MC-93764.patch | 0 ...x-some-generation-concurrency-issues.patch | 0 4 files changed, 25 deletions(-) delete mode 100644 removed/1.16/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch rename removed/1.16/{ => No longer Needed}/0302-Avoid-dimension-id-collisions.patch (100%) rename removed/1.16/{ => No longer Needed}/0316-Fix-MC-93764.patch (100%) rename removed/1.16/{ => No longer Needed}/0373-Fix-some-generation-concurrency-issues.patch (100%) diff --git a/removed/1.16/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch b/removed/1.16/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch deleted file mode 100644 index f94c70b4cf..0000000000 --- a/removed/1.16/0383-Use-ChunkStatus-cache-when-saving-protochunks.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Sat, 22 Jun 2019 04:20:47 -0700 -Subject: [PATCH] Use ChunkStatus cache when saving protochunks - -The cache should contain the chunk status when saving. If not it -will load it. - -diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 1d517fd1aea90edf470388fd857a41f2be149327..9171785ad54a26e95dea8b30509c1e49a5d9b22d 100644 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java -+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -845,8 +845,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - NBTTagCompound nbttagcompound; - - if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { -- nbttagcompound = this.readChunkData(chunkcoordintpair); -- if (nbttagcompound != null && ChunkRegionLoader.a(nbttagcompound) == ChunkStatus.Type.LEVELCHUNK) { -+ // Paper start - Optimize save by using status cache -+ ChunkStatus statusOnDisk = this.getChunkStatusOnDisk(chunkcoordintpair); -+ if (statusOnDisk != null && statusOnDisk.getType() == ChunkStatus.Type.LEVELCHUNK) { -+ // Paper end - return false; - } - diff --git a/removed/1.16/0302-Avoid-dimension-id-collisions.patch b/removed/1.16/No longer Needed/0302-Avoid-dimension-id-collisions.patch similarity index 100% rename from removed/1.16/0302-Avoid-dimension-id-collisions.patch rename to removed/1.16/No longer Needed/0302-Avoid-dimension-id-collisions.patch diff --git a/removed/1.16/0316-Fix-MC-93764.patch b/removed/1.16/No longer Needed/0316-Fix-MC-93764.patch similarity index 100% rename from removed/1.16/0316-Fix-MC-93764.patch rename to removed/1.16/No longer Needed/0316-Fix-MC-93764.patch diff --git a/removed/1.16/0373-Fix-some-generation-concurrency-issues.patch b/removed/1.16/No longer Needed/0373-Fix-some-generation-concurrency-issues.patch similarity index 100% rename from removed/1.16/0373-Fix-some-generation-concurrency-issues.patch rename to removed/1.16/No longer Needed/0373-Fix-some-generation-concurrency-issues.patch From c0d07c1b67ee917e1e52cb8ff8701d922eb698c4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 27 Jun 2020 21:54:05 -0400 Subject: [PATCH 38/95] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: f009c3dd SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround e677c370 Update ECJ version 5058a35d SPIGOT-5860: Item.setItemStack should be NotNull CraftBukkit Changes: d77f4d9b SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround 53c95627 SPIGOT-5865: Piglin does not trigger EntityPickupItemEvent 2ab04d24 Update ECJ version 7884e079 SPIGOT-5868: Blocks do not tick in custom nether / end 2a848286 SPIGOT-5863: Don't check colour in scoreboard length validation f2cbce30 SPIGOT-5866: Beehive unknown TargetReason Spigot Changes: ad703da0 SPIGOT-5870: /plugins "website" field shows "version" 1a27cfd8 #98: Improve output of /plugins command using text components 732d5bab Disable checkstyle in Spigot blocks 0199a9a6 #97: Add Memory Usage to Ticks Per Second Command. 33ea98fc SPIGOT-5858: NPE: Joining the server with an invalid dimension --- Spigot-API-Patches/0001-POM-changes.patch | 4 ++-- .../0002-Add-FastUtil-to-Bukkit.patch | 2 +- Spigot-API-Patches/0004-Timings-v2.patch | 4 ++-- .../0005-Player-affects-spawning-API.patch | 4 ++-- .../0007-Entity-Origin-API.patch | 4 ++-- .../0010-Add-player-view-distance-API.patch | 4 ++-- ...cord-chat-API-from-spigot-subclasses.patch | 4 ++-- .../0016-Player-Tab-List-and-Title-APIs.patch | 4 ++-- .../0021-Complete-resource-pack-API.patch | 6 ++--- .../0022-Use-ASM-for-event-executors.patch | 2 +- ...0041-Add-String-based-Action-Bar-API.patch | 10 ++++---- ...upstream-javadoc-warnings-and-errors.patch | 24 +++++++++---------- .../0051-Item-canEntityPickup.patch | 4 ++-- .../0058-Entity-fromMobSpawner.patch | 4 ++-- .../0063-Make-plugins-list-alphabetical.patch | 13 +++++----- ...low-plugins-to-use-SLF4J-for-logging.patch | 2 +- ...nt-protocol-version-and-virtual-host.patch | 2 +- ...6-Ability-to-apply-mending-to-XP-API.patch | 4 ++-- .../0087-Player.setPlayerProfile-API.patch | 4 ++-- ...91-Add-Ban-Methods-to-Player-Objects.patch | 4 ++-- .../0117-Entity-getChunk-API.patch | 4 ++-- ...dd-an-asterisk-to-legacy-API-plugins.patch | 4 ++-- ...deadlock-risk-in-firing-async-events.patch | 2 +- .../0132-Async-Chunks-API.patch | 4 ++-- ...e-attack-cooldown-methods-for-Player.patch | 4 ++-- ...s-and-setters-for-EntityItem-owner-a.patch | 9 +++---- .../0173-Entity-getEntitySpawnReason.patch | 4 ++-- .../0196-Add-Player-Client-Options-API.patch | 4 ++-- Spigot-Server-Patches/0001-POM-Changes.patch | 2 +- .../0002-Paper-config-files.patch | 2 +- Spigot-Server-Patches/0004-MC-Utils.patch | 2 +- Spigot-Server-Patches/0009-Timings-v2.patch | 12 +++++----- ...ient-crashes-server-lists-and-Mojang.patch | 2 +- ...023-Further-improve-server-tick-loop.patch | 20 ++++++---------- .../0042-Add-PlayerInitialSpawnEvent.patch | 2 +- ...44-Ensure-commands-are-not-ran-async.patch | 6 ++--- .../0046-Expose-server-CommandMap.patch | 2 +- .../0052-Add-velocity-warnings.patch | 2 +- .../0058-Complete-resource-pack-API.patch | 4 ++-- ...ading-permissions.yml-before-plugins.patch | 2 +- ...llow-Reloading-of-Custom-Permissions.patch | 2 +- .../0062-Remove-Metadata-on-reload.patch | 2 +- ...0079-Add-PlayerUseUnknownEntityEvent.patch | 4 ++-- ...dDebugInfo-not-initialized-on-client.patch | 2 +- ...nilla-per-world-scoreboard-coloring-.patch | 4 ++-- .../0088-Configurable-Player-Collision.patch | 2 +- ...setting-for-proxy-online-mode-status.patch | 2 +- ...onfigurable-packet-in-spam-threshold.patch | 4 ++-- ...12-Configurable-flying-kick-messages.patch | 2 +- ...1-Allow-Reloading-of-Command-Aliases.patch | 2 +- ...31-Properly-fix-item-duplication-bug.patch | 4 ++-- .../0136-Enforce-Sync-Player-Saves.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 2 +- ...ke-parrots-stay-on-shoulders-despite.patch | 4 ++-- ...n-option-to-prevent-player-names-fro.patch | 2 +- ...oleAppender-for-console-improvements.patch | 6 ++--- .../0152-Add-UnknownCommandEvent.patch | 2 +- .../0153-Basic-PlayerProfile-API.patch | 2 +- .../0161-ProfileWhitelistVerifyEvent.patch | 2 +- ...ams-to-redirect-System.out-err-to-lo.patch | 2 +- ...n-prefixes-using-Log4J-configuration.patch | 2 +- ...-Include-Log4J2-SLF4J-implementation.patch | 2 +- .../0172-Add-PlayerJumpEvent.patch | 2 +- ...3-handle-PacketPlayInKeepAlive-async.patch | 4 ++-- ...rt-serverside-behavior-of-keepalives.patch | 2 +- .../0182-AsyncTabCompleteEvent.patch | 4 ++-- .../0205-getPlayerUniqueId-API.patch | 2 +- ...-allowed-colored-signs-to-be-created.patch | 4 ++-- .../0238-InventoryCloseEvent-Reason-API.patch | 6 ++--- ...nventory-when-cancelling-PlayerInter.patch | 4 ++-- ...245-Use-asynchronous-Log4j-2-loggers.patch | 2 +- ...nd-make-tab-spam-limits-configurable.patch | 2 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 2 +- ...70-Use-ConcurrentHashMap-in-JsonList.patch | 2 +- ...tator-target-events-and-improve-impl.patch | 4 ++-- ...6-Add-Velocity-IP-Forwarding-Support.patch | 2 +- ...event-players-from-moving-into-unloa.patch | 2 +- ...t-allow-digging-into-unloaded-chunks.patch | 4 ++-- .../0319-Book-Size-Limits.patch | 2 +- ...ault-permission-message-configurable.patch | 2 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 2 +- .../0328-Fix-PlayerEditBookEvent.patch | 2 +- .../0334-Fix-sign-edit-memory-leak.patch | 4 ++-- .../0335-Limit-Client-Sign-length-more.patch | 4 ++-- ...-Manager-and-add-advanced-packet-sup.patch | 16 ++++++------- ...0-Fix-Whitelist-On-Off-inconsistency.patch | 2 +- ...oggleEvent-when-whitelist-is-toggled.patch | 2 +- .../0345-Entity-getEntitySpawnReason.patch | 2 +- ...ity-Metadata-for-all-tracked-players.patch | 4 ++-- ...347-Implement-PlayerPostRespawnEvent.patch | 2 +- ...l-to-changed-postToMainThread-method.patch | 2 +- ...isPrimaryThread-and-MinecraftServer-.patch | 2 +- ...78-Asynchronous-chunk-IO-and-loading.patch | 2 +- ...etChunkIfLoadedImmediately-in-places.patch | 2 +- .../0383-Fix-MC-158900.patch | 2 +- ...392-Expose-the-internal-current-tick.patch | 2 +- ...-sneak-when-changing-worlds-MC-10657.patch | 2 +- ...or-when-player-hand-set-to-empty-typ.patch | 4 ++-- ...23-Prevent-teleporting-dead-entities.patch | 4 ++-- ...ptimize-Collision-to-not-load-chunks.patch | 2 +- ...move-existing-players-to-world-spawn.patch | 2 +- ...-Add-tick-times-API-and-mspt-command.patch | 2 +- ...443-Expose-MinecraftServer-isRunning.patch | 2 +- .../0448-Improved-Watchdog-Support.patch | 4 ++-- ...62-Broadcast-join-message-to-console.patch | 2 +- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 2 +- ...Load-Chunks-for-Login-Asynchronously.patch | 4 ++-- .../0471-Implement-Brigadier-Mojang-API.patch | 2 +- ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- .../0474-Expose-game-version.patch | 2 +- .../0475-Sync-position-on-teleportation.patch | 4 ++-- .../0478-Implement-Mob-Goal-API.patch | 4 ++-- ...No-Tick-view-distance-implementation.patch | 11 +-------- ...Wait-for-Async-Tasks-during-shutdown.patch | 2 +- ...k-Priority-Urgency-System-for-Chunks.patch | 6 ++--- ...-packets-to-nearby-locations-sounds-.patch | 2 +- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 2 +- ...-desync-in-playerconnection-causing-.patch | 6 ++--- ...implement-PlayerRecipeBookClickEvent.patch | 4 ++-- ...21-Add-permission-for-command-blocks.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 123 files changed, 218 insertions(+), 231 deletions(-) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 3fb5b8c2b0..cd8c458174 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 82b370b7fe4cd0faba8d20fa7697f2913d9f53c1..6953bd86915f6c7a0afb0b87abd38053cb7766d5 100644 +index 274fd7d65ed48af7c4c055db0f99d1637f1af88f..14383eb14c5f3893edc7c76db90881d1abd4b675 100644 --- a/pom.xml +++ b/pom.xml @@ -2,34 +2,28 @@ @@ -104,7 +104,7 @@ index 82b370b7fe4cd0faba8d20fa7697f2913d9f53c1..6953bd86915f6c7a0afb0b87abd38053 -@@ -180,6 +189,7 @@ +@@ -185,6 +194,7 @@ diff --git a/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch index cfd9c9d576..6fde591064 100644 --- a/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch +++ b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add FastUtil to Bukkit Doesn't expose to plugins, just allows Paper-API to use it for optimization diff --git a/pom.xml b/pom.xml -index 6953bd86915f6c7a0afb0b87abd38053cb7766d5..04781abaf6ec21f2f19f366c3d1b27687f502743 100644 +index 14383eb14c5f3893edc7c76db90881d1abd4b675..ae9179d4e3ea5608dfb9a5677de7c59c403450cc 100644 --- a/pom.xml +++ b/pom.xml @@ -49,6 +49,12 @@ diff --git a/Spigot-API-Patches/0004-Timings-v2.patch b/Spigot-API-Patches/0004-Timings-v2.patch index 98898540ff..0d52c2f6a0 100644 --- a/Spigot-API-Patches/0004-Timings-v2.patch +++ b/Spigot-API-Patches/0004-Timings-v2.patch @@ -3358,10 +3358,10 @@ index 2a145d851ce30360aa39549745bd87590c034584..00000000000000000000000000000000 - // Spigot end -} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 87e23bd62037694ddfa3bfe0a0fd5f61af6e0ac2..2e68724b5c0c44a83189ca23b2435778ed775ccb 100644 +index 0859d2bc226c4abf21ac1dc28f35ebe805046d89..39d196992bbcc263fa4bcd46c6187ba7b8adb935 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1355,6 +1355,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1369,6 +1369,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch b/Spigot-API-Patches/0005-Player-affects-spawning-API.patch index 67ffc0fa02..b36f2c83e3 100644 --- a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch +++ b/Spigot-API-Patches/0005-Player-affects-spawning-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 2e68724b5c0c44a83189ca23b2435778ed775ccb..53f1b31553a04f63b8176d23583b45b2a32678a9 100644 +index 39d196992bbcc263fa4bcd46c6187ba7b8adb935..4f3a2189b42a2909f152ed1e33f79f431c6b903c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1257,6 +1257,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1271,6 +1271,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @NotNull public String getLocale(); diff --git a/Spigot-API-Patches/0007-Entity-Origin-API.patch b/Spigot-API-Patches/0007-Entity-Origin-API.patch index 4c84cd9ee9..f07f83e8f6 100644 --- a/Spigot-API-Patches/0007-Entity-Origin-API.patch +++ b/Spigot-API-Patches/0007-Entity-Origin-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 6b550dda2a107d08553544261f26c08b6cdfa648..4e4445d186303c06906fea68a867cc7985c69ba2 100644 +index 05a507fec7b5ba091608c39e2231ee64c085e790..d2fa3628a3825b2226292bf6974866557abf799e 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -598,4 +598,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -599,4 +599,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @Override Spigot spigot(); // Spigot end diff --git a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch b/Spigot-API-Patches/0010-Add-player-view-distance-API.patch index e9e63b9113..df389fb6f7 100644 --- a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/0010-Add-player-view-distance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add player view distance API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 53f1b31553a04f63b8176d23583b45b2a32678a9..ef0d8c25a52806690be6ed77c864602d86887a77 100644 +index 4f3a2189b42a2909f152ed1e33f79f431c6b903c..babf70ad97413112f57ae1380f09a74e51975ff5 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1271,6 +1271,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1285,6 +1285,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param affects Whether the player can affect mob spawning */ public void setAffectsSpawning(boolean affects); diff --git a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index d2902a8edc..c92e655754 100644 --- a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -68,10 +68,10 @@ index d3c498ad0e7681422ef2117be41c6603ebce0e0a..e3385abec44c603201aa37e3b3180cf8 * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index ef0d8c25a52806690be6ed77c864602d86887a77..33a72a449d31641e156b805dadbfde55ceb8319a 100644 +index babf70ad97413112f57ae1380f09a74e51975ff5..296aca8a5da6aa2a61988c9915df4d95279815a5 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -467,6 +467,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -481,6 +481,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); diff --git a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch index 37955aa098..933dad54bb 100644 --- a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch @@ -384,7 +384,7 @@ index 0000000000000000000000000000000000000000..4fe18540f77143ee7cd7e94d3aa279ae + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 33a72a449d31641e156b805dadbfde55ceb8319a..a2b0bb31e9ca98b76b987c094184d5d4dbdef2b9 100644 +index 296aca8a5da6aa2a61988c9915df4d95279815a5..eab4e326392efa93dd9acd086755a97616c79c39 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1,6 +1,7 @@ @@ -395,7 +395,7 @@ index 33a72a449d31641e156b805dadbfde55ceb8319a..a2b0bb31e9ca98b76b987c094184d5d4 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -497,6 +498,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -511,6 +512,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } diff --git a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch b/Spigot-API-Patches/0021-Complete-resource-pack-API.patch index 72ca7290a6..691aac64f4 100644 --- a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch +++ b/Spigot-API-Patches/0021-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index a2b0bb31e9ca98b76b987c094184d5d4dbdef2b9..0a9d2b1914a059fd3a247ca48e6bef9554d2cf16 100644 +index eab4e326392efa93dd9acd086755a97616c79c39..bc9ff9b4a475d8b108b54f2d4a99199379b1c63d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1007,7 +1007,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1021,7 +1021,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the URL is null. * @throws IllegalArgumentException Thrown if the URL is too long. The * length restriction is an implementation specific arbitrary value. @@ -18,7 +18,7 @@ index a2b0bb31e9ca98b76b987c094184d5d4dbdef2b9..0a9d2b1914a059fd3a247ca48e6bef95 public void setResourcePack(@NotNull String url); /** -@@ -1445,6 +1447,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1459,6 +1461,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void openBook(@NotNull ItemStack book); diff --git a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch index cdc3d940e5..5dd097c3b6 100644 --- a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. diff --git a/pom.xml b/pom.xml -index 04781abaf6ec21f2f19f366c3d1b27687f502743..bce749991a83aeea871229352f0e4511bb592216 100644 +index ae9179d4e3ea5608dfb9a5677de7c59c403450cc..a7064cc7810cd3567111a1594bd316663d516dca 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,17 @@ diff --git a/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch index 76718ddca7..eaeaa26cd5 100644 --- a/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch +++ b/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add String based Action Bar API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 0a9d2b1914a059fd3a247ca48e6bef9554d2cf16..3b6f08209d8882cda5593305936474e3bc975f3d 100644 +index bc9ff9b4a475d8b108b54f2d4a99199379b1c63d..3166d4809f12e55f53670a84e69f420ee3ee792b 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -469,6 +469,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -483,6 +483,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start @@ -35,7 +35,7 @@ index 0a9d2b1914a059fd3a247ca48e6bef9554d2cf16..3b6f08209d8882cda5593305936474e3 /** * Sends the component to the player * -@@ -492,9 +512,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -506,9 +526,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * @@ -47,7 +47,7 @@ index 0a9d2b1914a059fd3a247ca48e6bef9554d2cf16..3b6f08209d8882cda5593305936474e3 public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } -@@ -1570,9 +1592,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1584,9 +1606,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends the component to the specified screen position of this player * @@ -59,7 +59,7 @@ index 0a9d2b1914a059fd3a247ca48e6bef9554d2cf16..3b6f08209d8882cda5593305936474e3 public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { throw new UnsupportedOperationException("Not supported yet."); } -@@ -1580,9 +1604,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1594,9 +1618,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * diff --git a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch index a64705604b..f6e7304b36 100644 --- a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch @@ -86,10 +86,10 @@ index c2096b5344d48d855d031538ec32e0154bd9054d..bca9d3659f6fceeca4b7fecbc7034d6f void setParticle(@NotNull Particle particle, @Nullable T data); diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661e1841680 100644 +index 3166d4809f12e55f53670a84e69f420ee3ee792b..4f419c7b07d771019ab2906d609772cc0f080b23 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -484,7 +484,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -498,7 +498,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * Use supplied alternative character to the section symbol to represent legacy color codes. * @@ -98,7 +98,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 * @param message The message to send */ public void sendActionBar(char alternateChar, @NotNull String message); -@@ -551,6 +551,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -565,6 +565,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Update the subtitle of titles displayed to the player * @@ -106,7 +106,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated -@@ -559,6 +560,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -573,6 +574,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Update the subtitle of titles displayed to the player * @@ -114,7 +114,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated -@@ -567,6 +569,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -581,6 +583,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Show the given title to the player, along with the last subtitle set, using the last set times * @@ -122,7 +122,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated -@@ -575,6 +578,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -589,6 +592,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Show the given title to the player, along with the last subtitle set, using the last set times * @@ -130,7 +130,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated -@@ -1224,6 +1228,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1238,6 +1242,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -138,7 +138,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); -@@ -1240,6 +1245,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1254,6 +1259,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -146,7 +146,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); -@@ -1290,6 +1296,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1304,6 +1310,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -154,7 +154,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -1310,6 +1317,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1324,6 +1331,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -162,7 +162,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -1366,6 +1374,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1380,6 +1388,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -170,7 +170,7 @@ index 3b6f08209d8882cda5593305936474e3bc975f3d..28faaa29bde457e539c99d7ebe59a661 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); -@@ -1388,6 +1397,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1402,6 +1411,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * particle used (normally speed) * @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/0051-Item-canEntityPickup.patch b/Spigot-API-Patches/0051-Item-canEntityPickup.patch index 2b3d47cfb1..0f5325a00f 100644 --- a/Spigot-API-Patches/0051-Item-canEntityPickup.patch +++ b/Spigot-API-Patches/0051-Item-canEntityPickup.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java -index 00c58c1d94b4822e7e26029cab23cf1964613db5..cb9e9f369e041cd9e5835cac7909db482295083c 100644 +index 4f0caf5a7084f2be1ce1a4b49318e78597b45846..ae3880491682067d4c5baef0a8c90b1036d67ac0 100644 --- a/src/main/java/org/bukkit/entity/Item.java +++ b/src/main/java/org/bukkit/entity/Item.java -@@ -37,4 +37,20 @@ public interface Item extends Entity { +@@ -36,4 +36,20 @@ public interface Item extends Entity { * @param delay New delay */ public void setPickupDelay(int delay); diff --git a/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch b/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch index 5ad75ae831..6632b4b8bb 100644 --- a/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch +++ b/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 4e4445d186303c06906fea68a867cc7985c69ba2..e2952209d5e98ad507628bed4fbefc3aede6045f 100644 +index d2fa3628a3825b2226292bf6974866557abf799e..15e9ecd898b27d87a2d4f05c5b22de7c1b9a260c 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -609,5 +609,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -610,5 +610,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @Nullable Location getOrigin(); diff --git a/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch index 0451f10f27..c7997e7c1a 100644 --- a/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch +++ b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make /plugins list alphabetical diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..a1071e3178a298f3fc1d6c960f4d8a6d3a3d0277 100644 +index 23a8a8616756f417c11dd28e63e27c5c4df383c0..6b21089cd4a09c3c49caf19f1b70f7a50dba3995 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -3,6 +3,9 @@ package org.bukkit.command.defaults; @@ -18,7 +18,7 @@ index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..a1071e3178a298f3fc1d6c960f4d8a6d import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; -@@ -34,23 +37,32 @@ public class PluginsCommand extends BukkitCommand { +@@ -49,24 +52,33 @@ public class PluginsCommand extends BukkitCommand { @NotNull private String getPluginList() { @@ -26,12 +26,12 @@ index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..a1071e3178a298f3fc1d6c960f4d8a6d - Plugin[] plugins = Bukkit.getPluginManager().getPlugins(); + // Paper start + TreeMap plugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); -+ + +- for (Plugin plugin : plugins) { + for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) { + plugins.put(plugin.getDescription().getName(), plugin); + } - -- for (Plugin plugin : plugins) { ++ + StringBuilder pluginList = new StringBuilder(); + for (Map.Entry entry : plugins.entrySet()) { if (pluginList.length() > 0) { @@ -56,4 +56,5 @@ index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..a1071e3178a298f3fc1d6c960f4d8a6d + return "(" + plugins.size() + "): " + pluginList.toString(); + // Paper end } - } + + // Spigot start diff --git a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch index feb61e660f..e56e87d0da 100644 --- a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index bce749991a83aeea871229352f0e4511bb592216..fee78297a549112beb6bc2f6363b85bac28fd12f 100644 +index a7064cc7810cd3567111a1594bd316663d516dca..dfc7c2f351c895a7378b13f88ca8efcaaf38d478 100644 --- a/pom.xml +++ b/pom.xml @@ -109,6 +109,13 @@ diff --git a/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch index 575ec840f2..a1ffa9d596 100644 --- a/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b + +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 28faaa29bde457e539c99d7ebe59a661e1841680..8afa4db2d47b3941055d045ff351eb8b0a35fffa 100644 +index 4f419c7b07d771019ab2906d609772cc0f080b23..2079395c29854ec7e751d210a05f329f31ebb8ad 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch b/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch index 13fda96cc4..695aae29f1 100644 --- a/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch @@ -10,10 +10,10 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 8afa4db2d47b3941055d045ff351eb8b0a35fffa..92aae1e34961b35b989048c1de05cd3dcef4e1b1 100644 +index 2079395c29854ec7e751d210a05f329f31ebb8ad..444a495e53d1be036f7a1bda89bedf438be913c1 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -716,12 +716,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -730,12 +730,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void resetPlayerWeather(); diff --git a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch index 5811558c5b..c6118576db 100644 --- a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 92aae1e34961b35b989048c1de05cd3dcef4e1b1..5b7a25831205778bc5d6582e38fd4ac89d5b929f 100644 +index 444a495e53d1be036f7a1bda89bedf438be913c1..505078ce7fa5fce981d26d07e61fc1e12fbed67a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -2,6 +2,7 @@ package org.bukkit.entity; @@ -17,7 +17,7 @@ index 92aae1e34961b35b989048c1de05cd3dcef4e1b1..5b7a25831205778bc5d6582e38fd4ac8 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -1554,6 +1555,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1568,6 +1569,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} */ boolean hasResourcePack(); diff --git a/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch b/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch index f43abea5cd..b848fef9ad 100644 --- a/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch +++ b/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch @@ -74,7 +74,7 @@ index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c7958 /** * Checks if this player is whitelisted or not diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 5b7a25831205778bc5d6582e38fd4ac89d5b929f..6e05580d83fc4722d6f6fc5faa012c24b72f4562 100644 +index 505078ce7fa5fce981d26d07e61fc1e12fbed67a..2441b714d343b963c43c9f8827550e683be4a93d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -3,6 +3,10 @@ package org.bukkit.entity; @@ -88,7 +88,7 @@ index 5b7a25831205778bc5d6582e38fd4ac89d5b929f..6e05580d83fc4722d6f6fc5faa012c24 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -470,6 +474,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -484,6 +488,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start diff --git a/Spigot-API-Patches/0117-Entity-getChunk-API.patch b/Spigot-API-Patches/0117-Entity-getChunk-API.patch index ef5187873a..3b43f12f35 100644 --- a/Spigot-API-Patches/0117-Entity-getChunk-API.patch +++ b/Spigot-API-Patches/0117-Entity-getChunk-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API Get the chunk the entity is currently registered to diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index e2952209d5e98ad507628bed4fbefc3aede6045f..a8dbf282d0a8fb57f4719b9e95199894d8d3324c 100644 +index 15e9ecd898b27d87a2d4f05c5b22de7c1b9a260c..d9922f0777d018f1e6c5673b9fc907fde3fbfa8d 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -17,7 +17,7 @@ index e2952209d5e98ad507628bed4fbefc3aede6045f..a8dbf282d0a8fb57f4719b9e95199894 import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.Nameable; -@@ -616,5 +617,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -617,5 +618,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent * @return True if entity spawned from a mob spawner */ boolean fromMobSpawner(); diff --git a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch index cfe9dbb84d..4020e2fa6e 100644 --- a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch +++ b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch @@ -23,10 +23,10 @@ index 1b6d737046646c102b0d519ab3f67c3fbd503979..541e28a9bece0beb0c2cf02c39030840 // Paper end } diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index a1071e3178a298f3fc1d6c960f4d8a6d3a3d0277..3dcecf3a543646327c277ee2698106159b2cbc84 100644 +index 6b21089cd4a09c3c49caf19f1b70f7a50dba3995..ae07c88937da014d711e219b07e7d4b767f24ba5 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -@@ -59,7 +59,13 @@ public class PluginsCommand extends BukkitCommand { +@@ -74,7 +74,13 @@ public class PluginsCommand extends BukkitCommand { pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED); diff --git a/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch b/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch index 54e90180af..697b83c690 100644 --- a/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch +++ b/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch @@ -16,7 +16,7 @@ which results in a hard crash. This change removes the synchronize and adds some protection around enable/disable diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index a8dbf282d0a8fb57f4719b9e95199894d8d3324c..b4069dbf31587786da39f5e387a71b7bc6a5d0ae 100644 +index d9922f0777d018f1e6c5673b9fc907fde3fbfa8d..f3dc2f7f45bea1a91171339a5d19461735845aee 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/Spigot-API-Patches/0132-Async-Chunks-API.patch b/Spigot-API-Patches/0132-Async-Chunks-API.patch index 9ad138ffec..9e7d3074fb 100644 --- a/Spigot-API-Patches/0132-Async-Chunks-API.patch +++ b/Spigot-API-Patches/0132-Async-Chunks-API.patch @@ -480,10 +480,10 @@ index fe8b255aeb46e30d0a954dcd0e3e6ac29b4fd33d..eef7750fdebb4fbd156d729e4cc87f7b /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index b4069dbf31587786da39f5e387a71b7bc6a5d0ae..b8e8a425a84a562ccd8431d30e39145a662c4180 100644 +index f3dc2f7f45bea1a91171339a5d19461735845aee..4a7b4112192f317b2feed9dfa7713155183578b6 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -155,6 +155,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -156,6 +156,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ public boolean teleport(@NotNull Entity destination, @NotNull TeleportCause cause); diff --git a/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch index 9225bfe8fd..9f23a9c89e 100644 --- a/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 6e05580d83fc4722d6f6fc5faa012c24b72f4562..13077f96ce32cbb75197a4480715b1c71deb451d 100644 +index 2441b714d343b963c43c9f8827550e683be4a93d..dec87413b5c22c95524a1b1f70fdd1ef016a6791 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1729,6 +1729,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1743,6 +1743,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param profile The new profile to use */ void setPlayerProfile(@NotNull PlayerProfile profile); diff --git a/Spigot-API-Patches/0160-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-API-Patches/0160-Implement-getters-and-setters-for-EntityItem-owner-a.patch index c96f137502..7645d0f72c 100644 --- a/Spigot-API-Patches/0160-Implement-getters-and-setters-for-EntityItem-owner-a.patch +++ b/Spigot-API-Patches/0160-Implement-getters-and-setters-for-EntityItem-owner-a.patch @@ -6,21 +6,22 @@ Subject: [PATCH] Implement getters and setters for EntityItem owner and diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java -index cb9e9f369e041cd9e5835cac7909db482295083c..a15f70ff4ef74e9e14fcc03850c477557b15285c 100644 +index ae3880491682067d4c5baef0a8c90b1036d67ac0..acd80d812fe88dee3978d19b24149e9fe0ac596b 100644 --- a/src/main/java/org/bukkit/entity/Item.java +++ b/src/main/java/org/bukkit/entity/Item.java -@@ -4,6 +4,10 @@ import org.bukkit.inventory.ItemStack; +@@ -3,6 +3,11 @@ package org.bukkit.entity; + import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; - import org.jetbrains.annotations.Nullable; +// Paper start ++import org.jetbrains.annotations.Nullable; +import java.util.UUID; +// Paper end + /** * Represents a dropped item. */ -@@ -52,5 +56,35 @@ public interface Item extends Entity { +@@ -51,5 +56,35 @@ public interface Item extends Entity { * @param canMobPickup True to allow non-player entity pickup */ public void setCanMobPickup(boolean canMobPickup); diff --git a/Spigot-API-Patches/0173-Entity-getEntitySpawnReason.patch b/Spigot-API-Patches/0173-Entity-getEntitySpawnReason.patch index 7e528fc7e4..4a56dab290 100644 --- a/Spigot-API-Patches/0173-Entity-getEntitySpawnReason.patch +++ b/Spigot-API-Patches/0173-Entity-getEntitySpawnReason.patch @@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index b8e8a425a84a562ccd8431d30e39145a662c4180..3f0f38031000a4eda25584d069939f40fbfb026b 100644 +index 4a7b4112192f317b2feed9dfa7713155183578b6..d4c776f32caf0491670175a79584c73dd2c7fcca 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -652,5 +652,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -653,5 +653,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @NotNull Chunk getChunk(); diff --git a/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch b/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch index b979af8fbb..00ebdd1e91 100644 --- a/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch +++ b/Spigot-API-Patches/0196-Add-Player-Client-Options-API.patch @@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..f7f171c4ee0b8339b2f8fbe82442d65f + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 13077f96ce32cbb75197a4480715b1c71deb451d..e133fe79d0cfdcc057a3101f0b7b5877fbc82b3c 100644 +index dec87413b5c22c95524a1b1f70fdd1ef016a6791..2eb3121386e3bc5ccdd74726a7c4b5f832ec5aea 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1,6 +1,7 @@ @@ -187,7 +187,7 @@ index 13077f96ce32cbb75197a4480715b1c71deb451d..e133fe79d0cfdcc057a3101f0b7b5877 import com.destroystokyo.paper.Title; // Paper import com.destroystokyo.paper.profile.PlayerProfile; // Paper import java.util.Date; // Paper -@@ -1749,6 +1750,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1763,6 +1764,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * Reset the cooldown counter to 0, effectively starting the cooldown period. */ void resetCooldown(); diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index 88617b94b1..b3005d1968 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 0466cd48f5ccd1479f2909c70654d884dc1e8f24..7bc5bf271e435e1e0d85af133f1352f319f462b5 100644 +index db08e98c60084b16ee18455ce014a6ea305f89c5..52834690de9f07c9c4838dbef50031567c1a72dc 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,14 @@ diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 221868c1de..ad80c4d4fa 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -636,7 +636,7 @@ index d5e1da2eeea7c06289f52509af844df59e8a29b2..63d3d43f74bed94cd03aa3b7254e6630 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 87fe70ed5f333d84018020b42fe375ce247451b4..a85b7a93a974263e2c3d7546ddfe4707781ef165 100644 +index c02d8ae1c198492daf1a0fc82badaaf942766902..e34031d0afa6918ce70150531c7a5c5097bf23d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -801,6 +801,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 3b711095e7..1819268811 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -4199,7 +4199,7 @@ index 5f692d719fd270120207ebcf6d0a2a24e8d59f7b..3e2e355177e32856dac07dc8b98658ad @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 883b7bd8ca2094e6d43be3a8575fff6d90a5990b..a8f11d1842e9a8ef82230e2ae4998923f3b02ca9 100644 +index 8c4d8bcb332e5b567be8cfa397093ac7e8e5250b..cfc2005ee5639c88ad1e21f0dd41c917a7c5db05 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 5c2cf20ab2..99a6b19007 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1407,7 +1407,7 @@ index 3e2e355177e32856dac07dc8b98658ad1b717045..7c5eaff23ef6bf3cdf2575330ea6341d protected void broadcast(Entity entity, Packet packet) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a8f11d1842e9a8ef82230e2ae4998923f3b02ca9..890b0fc7baf51ed6896d979021b3956c5c279c40 100644 +index cfc2005ee5639c88ad1e21f0dd41c917a7c5db05..ef622ae8946c7caafa222c42749ddbd90425f61c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1434,7 +1434,7 @@ index a8f11d1842e9a8ef82230e2ae4998923f3b02ca9..890b0fc7baf51ed6896d979021b3956c } -@@ -1683,7 +1682,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1684,7 +1683,7 @@ public class PlayerConnection implements PacketListenerPlayIn { // CraftBukkit end private void handleCommand(String s) { @@ -1443,7 +1443,7 @@ index a8f11d1842e9a8ef82230e2ae4998923f3b02ca9..890b0fc7baf51ed6896d979021b3956c // CraftBukkit start - whole method if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getName() + " issued server command: " + s); -@@ -1694,7 +1693,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1695,7 +1694,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -1452,7 +1452,7 @@ index a8f11d1842e9a8ef82230e2ae4998923f3b02ca9..890b0fc7baf51ed6896d979021b3956c return; } -@@ -1707,7 +1706,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1708,7 +1707,7 @@ public class PlayerConnection implements PacketListenerPlayIn { java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); return; } finally { @@ -1489,7 +1489,7 @@ index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf43 PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 500977885d4cfbfd9d86824074d3f1903e1fc6cb..c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd 100644 +index 6b09630279b14a697bcc492655897f4db799ca18..13fe3fbf589d7528708e9fa7bed65dabde24a9ae 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1758,7 +1758,7 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98f // 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 a85b7a93a974263e2c3d7546ddfe4707781ef165..0094d9251251845fbacff6d458443385627ca0c8 100644 +index e34031d0afa6918ce70150531c7a5c5097bf23d9..384fece1d7a1b07b04b09b4876ded0d603b1840b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2048,12 +2048,31 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 2297b9c636..02fea3de31 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -32,7 +32,7 @@ index fc92fbb05e442d453d6d5dd4e36143a576f55b6b..1fcdbbbc7b60edd1e87bab5f1c5d19a6 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 0094d9251251845fbacff6d458443385627ca0c8..3e2328079f5f98f3f10cc1badd1059a3703eb2d7 100644 +index 384fece1d7a1b07b04b09b4876ded0d603b1840b..e531fe5e77901e6478554c6269a83028e391db5f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -224,7 +224,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index 75ad04ddf8..c4e6976cac 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -140,7 +140,7 @@ index 1fcdbbbc7b60edd1e87bab5f1c5d19a6755de17c..0f2011a776619301dd6a133b9a4044b4 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 3e2328079f5f98f3f10cc1badd1059a3703eb2d7..0f5af8365abe99971a815285703a3b598f130a0d 100644 +index e531fe5e77901e6478554c6269a83028e391db5f..0d28a442e0ffb524140208710b253ca88ae21f90 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2045,6 +2045,17 @@ public final class CraftServer implements Server { @@ -162,19 +162,10 @@ index 3e2328079f5f98f3f10cc1badd1059a3703eb2d7..0f5af8365abe99971a815285703a3b59 { diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -index be2e31deae605fbf5a3d8bfc235161804f7bdb43..387af9d5c01701eafdb416204e5e2f94116d366f 100644 +index 9cd57c9d5fe59ceb2cd307e4e1a2052c9ac428fe..f70173827feb0e896e540aec0873886810627c46 100644 --- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java +++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -@@ -1,8 +1,5 @@ - package org.spigotmc; - --import com.google.common.base.Joiner; --import net.minecraft.server.MinecraftServer; --import com.google.common.collect.Iterables; - import org.bukkit.ChatColor; - import org.bukkit.command.Command; - import org.bukkit.command.CommandSender; -@@ -26,20 +23,22 @@ public class TicksPerSecondCommand extends Command +@@ -26,22 +26,23 @@ public class TicksPerSecondCommand extends Command return true; } @@ -191,7 +182,10 @@ index be2e31deae605fbf5a3d8bfc235161804f7bdb43..387af9d5c01701eafdb416204e5e2f94 + tpsAvg[i] = format( tps[i] ); } - sender.sendMessage( sb.substring( 0, sb.length() - 2 ) ); -+ sender.sendMessage( ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " + org.apache.commons.lang.StringUtils.join(tpsAvg, ", ")); +- sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " +- + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); ++ sender.sendMessage(ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " + org.apache.commons.lang.StringUtils.join(tpsAvg, ", ")); ++ sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); + // Paper end return true; diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch index 2c0b62349f..4f2a000148 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch @@ -9,7 +9,7 @@ This is a duplicate API from spigot, so use our duplicate subclass and improve setPosition to use raw diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd..29a7866190fea78c025c2e59a48ed92239f6a446 100644 +index 13fe3fbf589d7528708e9fa7bed65dabde24a9ae..5bed3682af9eb63b355bb24bbee466a05ae7cc34 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -143,7 +143,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch index 6e574907f6..3b41d28f6e 100644 --- a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch @@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 890b0fc7baf51ed6896d979021b3956c5c279c40..b468182266c39b9defa1aa287290f75f7db44b9a 100644 +index ef622ae8946c7caafa222c42749ddbd90425f61c..b7c621547fe071f136413d91bc4aa43142a2ef42 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1614,6 +1614,29 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1615,6 +1615,29 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (!async && s.startsWith("/")) { @@ -48,7 +48,7 @@ index 890b0fc7baf51ed6896d979021b3956c5c279c40..b468182266c39b9defa1aa287290f75f } 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 0f5af8365abe99971a815285703a3b598f130a0d..5ff0456b781b6a6fbc674e2c532b73f3245f5fd5 100644 +index 0d28a442e0ffb524140208710b253ca88ae21f90..b16785d48f407101360fb27036e4cfc8cf51dd23 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -752,6 +752,29 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch index 2ef1a03e15..651c2149e1 100644 --- a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch @@ -5,7 +5,7 @@ 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 5ff0456b781b6a6fbc674e2c532b73f3245f5fd5..3a0e0139db61405e8307abb3d17d1836f45bd8a3 100644 +index b16785d48f407101360fb27036e4cfc8cf51dd23..34b4dcdac921ccb3588281c7bb891e15526192fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1699,6 +1699,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch b/Spigot-Server-Patches/0052-Add-velocity-warnings.patch index 561eb5c866..f0d0422a4f 100644 --- a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0052-Add-velocity-warnings.patch @@ -5,7 +5,7 @@ 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 3a0e0139db61405e8307abb3d17d1836f45bd8a3..0188028d62015691575eea68f58e4b2acbcbb4a9 100644 +index 34b4dcdac921ccb3588281c7bb891e15526192fe..fc21e609946f1724d31c4e5f4b276835127e78ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -260,6 +260,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch index e2044f436c..782ed941fe 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b468182266c39b9defa1aa287290f75f7db44b9a..a0806ddc407d21340c82fe4d00bb7ad120cc09d9 100644 +index b7c621547fe071f136413d91bc4aa43142a2ef42..3ee10d4895e92a1af9920b0e7ca428b842ec0787 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1380,7 +1380,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1381,7 +1381,11 @@ public class PlayerConnection implements PacketListenerPlayIn { // CraftBukkit start public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) { PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer()); diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index 91714aa1e6..561cfecef7 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -30,7 +30,7 @@ index a62f4bbb973b9cb6d1ee53f56a0897d70ae176af..f207abbe757ad403a29a7a012903aaa8 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0188028d62015691575eea68f58e4b2acbcbb4a9..30701934a3b7cc7d2a502fe7c3c251a9f268a9bc 100644 +index fc21e609946f1724d31c4e5f4b276835127e78ff..6001092bd1f5b2ab6b4cc4d6ff2d9f6839728946 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -397,6 +397,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index 13f18882d7..d783ac7c9a 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch @@ -6,7 +6,7 @@ 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 30701934a3b7cc7d2a502fe7c3c251a9f268a9bc..72fb341e77b73ace8555cfc1bfdb3bbab726f1e6 100644 +index 6001092bd1f5b2ab6b4cc4d6ff2d9f6839728946..b114e3115591095fd9ae72c76274981889d0c943 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2164,5 +2164,23 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch index f90a119904..a8a7cc1db0 100644 --- a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch @@ -7,7 +7,7 @@ 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 72fb341e77b73ace8555cfc1bfdb3bbab726f1e6..9fdceeeeece358b2456cd66bc585821b7252691e 100644 +index b114e3115591095fd9ae72c76274981889d0c943..890c5e16459aea9e5acf64514ae97de0225cb603 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -863,8 +863,18 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch index 228b7d410f..496f5c9627 100644 --- a/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch @@ -18,10 +18,10 @@ index 58546550cba0dc239980ef6c920bd5db55328693..51970a4f134e29f5d2bf681d83aeeda9 private Vec3D c; private EnumHand d; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a0806ddc407d21340c82fe4d00bb7ad120cc09d9..1c4ed037e30b367cda6d6500001b56ee502693c0 100644 +index 3ee10d4895e92a1af9920b0e7ca428b842ec0787..6a92865443cfe641b437df38927267c51d7c2457 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1954,6 +1954,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1955,6 +1955,16 @@ public class PlayerConnection implements PacketListenerPlayIn { } } } diff --git a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch index 8325abf6c0..7d0d680d28 100644 --- a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 29a7866190fea78c025c2e59a48ed92239f6a446..5945786f5093ac8f6cd7cde74f6cb746efffbb1e 100644 +index 5bed3682af9eb63b355bb24bbee466a05ae7cc34..b6d4db1fffb7bab56f9a181e75579775e7d9fafd 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -174,6 +174,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index f6f7e8e4f6..defef8b05c 100644 --- a/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -26,10 +26,10 @@ index 47f5f8055ed45914309ca9a295ac48b89f192320..b1d1a3c1f84e0d2153de257183687502 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1c4ed037e30b367cda6d6500001b56ee502693c0..6fe5f581934647b6f3a51dd63080e720a574de4d 100644 +index 6a92865443cfe641b437df38927267c51d7c2457..e550d505340254a93a357819994299f0cee79c2a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1692,7 +1692,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1693,7 +1693,16 @@ public class PlayerConnection implements PacketListenerPlayIn { return; } diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index ef5783bcfb..2594110c81 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -57,7 +57,7 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19 packetdataserializer.a(this.c); packetdataserializer.a(this.d); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5945786f5093ac8f6cd7cde74f6cb746efffbb1e..9d3b8be7a854828d6e3009e0ad4726c7f134b5e3 100644 +index b6d4db1fffb7bab56f9a181e75579775e7d9fafd..dd8c91a05c4e55ee24268e9d5edad141d320e814 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -75,6 +75,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch index dc525623d1..bee062af6a 100644 --- a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch @@ -45,7 +45,7 @@ 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 9fdceeeeece358b2456cd66bc585821b7252691e..a201460235816698ee03d5ba5e78cbe505436216 100644 +index 890c5e16459aea9e5acf64514ae97de0225cb603..fc76268c767aeee06dd802cc10df65bbff7ea536 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1477,7 +1477,8 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch index 8000fd33f9..e62d772f25 100644 --- a/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch @@ -23,10 +23,10 @@ index 5827ef1e3eb35a11867ee4f92f301e1b0245c0fa..23c9e0f317073bb9c327ec49e0b0586d + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6fe5f581934647b6f3a51dd63080e720a574de4d..98bd46adf77a7f9c3cf82d85ce1646fc75066a08 100644 +index e550d505340254a93a357819994299f0cee79c2a..a5757ffdbbb33f1ec046a95765bfdd13c100b376 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1240,13 +1240,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1241,13 +1241,14 @@ public class PlayerConnection implements PacketListenerPlayIn { // Spigot start - limit place/interactions private int limitedPackets; private long lastLimitedPacket = -1; diff --git a/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch index 427d0ff71c..5b62a3d9d2 100644 --- a/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch @@ -21,7 +21,7 @@ index 23c9e0f317073bb9c327ec49e0b0586d2123e4e9..c4086de778cc2ccc958b1a94dd6e9cdb + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 98bd46adf77a7f9c3cf82d85ce1646fc75066a08..4c59b6beb0db3fd9d42e2f53519c40f211ef8bfb 100644 +index a5757ffdbbb33f1ec046a95765bfdd13c100b376..a264a32b7eb2ce21756f493b0fdac60e1368fffa 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -147,7 +147,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch index 1c15c39733..c3aeb44baa 100644 --- a/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ 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 a201460235816698ee03d5ba5e78cbe505436216..56855cbb8daff88c643d97f1e12b0386d1f8ff8c 100644 +index fc76268c767aeee06dd802cc10df65bbff7ea536..5281efee7b7abe7ce6e6c8709147c052e3bb972e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2193,5 +2193,24 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch index 0370910334..761428c4f1 100644 --- a/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch @@ -19,10 +19,10 @@ index 8d190606262352254bc3cf65515d74baa49ffaeb..2fa8c3e2491ff5947a99374c0678694d @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4c59b6beb0db3fd9d42e2f53519c40f211ef8bfb..f802bcb386b67e6c59aee68d6bfa507461f522cf 100644 +index a264a32b7eb2ce21756f493b0fdac60e1368fffa..1422b249c6136f2b06d46478cdf51e14e20bc0e3 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2568,7 +2568,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2569,7 +2569,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } public final boolean isDisconnected() { diff --git a/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch index 8c18b6c7fe..7021f234fa 100644 --- a/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 9d3b8be7a854828d6e3009e0ad4726c7f134b5e3..0da963896038d7b04fe0d410ab5d09a07edae9ab 100644 +index dd8c91a05c4e55ee24268e9d5edad141d320e814..b351c9e0b1eefa482b661c12bd9e8f0abe7f203c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -961,11 +961,13 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch index 04ddd8432c..d22caba35c 100644 --- a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch @@ -73,7 +73,7 @@ index 28ade7187d6fd61adbfe65a1944426168b131c4c..878a9de29c728a0b49fb8ee15be85516 // Spigot Start private static double calcTps(double avg, double exp, double tps) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0da963896038d7b04fe0d410ab5d09a07edae9ab..ec57eed04d43287249a6fe105556118c39ea0c48 100644 +index b351c9e0b1eefa482b661c12bd9e8f0abe7f203c..597b78c94dc9b8a8585515cd00ae003331b3ebb8 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1072,10 +1072,15 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index 6bf5f3aada..59d1e3b68d 100644 --- a/Spigot-Server-Patches/0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -39,10 +39,10 @@ index d1cf7602a0c47723593be11c030d3c819426d4d4..0dc2ffcfceeffed2cb949d31c4f976bc } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f802bcb386b67e6c59aee68d6bfa507461f522cf..ace3f3e30224c09bdb296e4ac2974fb0bd3e7dbc 100644 +index 1422b249c6136f2b06d46478cdf51e14e20bc0e3..13b3d746f911d80615c986f6ccb0377e28a407de 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1817,6 +1817,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1818,6 +1818,13 @@ public class PlayerConnection implements PacketListenerPlayIn { switch (packetplayinentityaction.c()) { case PRESS_SHIFT_KEY: this.player.setSneaking(true); diff --git a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch index bf74e8c60f..9c18234a71 100644 --- a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,7 +20,7 @@ index c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 56855cbb8daff88c643d97f1e12b0386d1f8ff8c..fe331321c126150ae7288dd29f12d87c31483d49 100644 +index 5281efee7b7abe7ce6e6c8709147c052e3bb972e..5b6b3263534e51103023d7f56b5952d9dae84b19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2212,5 +2212,10 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch index cafc134884..9ab3faa0e0 100644 --- a/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -19,7 +19,7 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 7bc5bf271e435e1e0d85af133f1352f319f462b5..2acc2a98bd8df6d81b5865b768265a210597b57b 100644 +index 52834690de9f07c9c4838dbef50031567c1a72dc..6b4f56744d11029bdbac5479b45c88736f338fa9 100644 --- a/pom.xml +++ b/pom.xml @@ -44,10 +44,27 @@ @@ -245,7 +245,7 @@ index 878a9de29c728a0b49fb8ee15be85516176795bd..b06bb3dccda23ebed1532e17f9699b9b public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ec57eed04d43287249a6fe105556118c39ea0c48..49d57f83dc22603b24ab2369ca4ba3a5c9e8b092 100644 +index 597b78c94dc9b8a8585515cd00ae003331b3ebb8..650755c0a6df59260a5f7c8cb041b2a8fe63e4a8 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -79,8 +79,7 @@ public abstract class PlayerList { @@ -259,7 +259,7 @@ index ec57eed04d43287249a6fe105556118c39ea0c48..49d57f83dc22603b24ab2369ca4ba3a5 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 fe331321c126150ae7288dd29f12d87c31483d49..db41896b45f1608fbeb962d3ffe25d9608b36cc4 100644 +index 5b6b3263534e51103023d7f56b5952d9dae84b19..9105049e37c955dfab036dcf3703603ea67026d4 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; diff --git a/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch index fba9b708c9..695119894b 100644 --- a/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch @@ -5,7 +5,7 @@ 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 db41896b45f1608fbeb962d3ffe25d9608b36cc4..60a44992a962e15686f89247823389d3757d8b8c 100644 +index 9105049e37c955dfab036dcf3703603ea67026d4..3836938a64f37f18bb3d809bd6e4ccf5fb4e8a72 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; diff --git a/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch index 480d6b0367..a30d09bdbb 100644 --- a/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch @@ -560,7 +560,7 @@ index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f72625466 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 60a44992a962e15686f89247823389d3757d8b8c..feea84de7d2184caf24d79faee8874f7698e826e 100644 +index 3836938a64f37f18bb3d809bd6e4ccf5fb4e8a72..1331e3b5795c804223da713ee951786d2c073ecc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -225,6 +225,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; diff --git a/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch index c4174c8d9a..952506a0c6 100644 --- a/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 49d57f83dc22603b24ab2369ca4ba3a5c9e8b092..0f20704c889f28d8e7560b33d366eb8948565071 100644 +index 650755c0a6df59260a5f7c8cb041b2a8fe63e4a8..edb59cf7dc797384bba9d37f486b624753d4f31c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -542,7 +542,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index 18f2ba9a85..b24ed01541 100644 --- a/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -12,7 +12,7 @@ results in a separate line, even though it should not result in a line break. Log4j's implementation handles it correctly. diff --git a/pom.xml b/pom.xml -index 2acc2a98bd8df6d81b5865b768265a210597b57b..55cdd9061b2c70abe8458de497dd61e1f734bc9f 100644 +index 6b4f56744d11029bdbac5479b45c88736f338fa9..3ad7385df33fb9d4d6477648c847e6e0f8fc0469 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,11 @@ diff --git a/Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch index 3ea82627d1..70978a2b17 100644 --- a/Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index 55cdd9061b2c70abe8458de497dd61e1f734bc9f..0cdfa5367766b3883433d39fec4d6dcb8aa14cdf 100644 +index 3ad7385df33fb9d4d6477648c847e6e0f8fc0469..85fb15836cf4ca6a167d7a35f6df5e25056b13a9 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ diff --git a/Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch index c92069b986..d018f2a25d 100644 --- a/Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch +++ b/Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Include Log4J2 SLF4J implementation diff --git a/pom.xml b/pom.xml -index 0cdfa5367766b3883433d39fec4d6dcb8aa14cdf..8150756361174fd46df8f73943ab48c55a523c0c 100644 +index 85fb15836cf4ca6a167d7a35f6df5e25056b13a9..accd4b6521b18495c933a50ed511b173cbb71861 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,12 @@ diff --git a/Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch index e7ff6a253c..8c62e10e55 100644 --- a/Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ace3f3e30224c09bdb296e4ac2974fb0bd3e7dbc..a7ab77707b5cd9ca65c012c3b18bc0c6db7fa7ee 100644 +index 13b3d746f911d80615c986f6ccb0377e28a407de..35cabf3fa68ade8d9de2429457293a54c283f1c4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,8 @@ import org.bukkit.inventory.CraftingInventory; diff --git a/Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch index ac33db3f18..525321d2dc 100644 --- a/Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a7ab77707b5cd9ca65c012c3b18bc0c6db7fa7ee..79888d559e7d62216d48516ebb7da138395c2f2a 100644 +index 35cabf3fa68ade8d9de2429457293a54c283f1c4..0a1c965570b91f1665673121d8890c5f6137c5bc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2529,14 +2529,18 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2530,14 +2530,18 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInKeepAlive packetplayinkeepalive) { diff --git a/Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch index d8e6c8a91d..f09fc4e87c 100644 --- a/Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch @@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 79888d559e7d62216d48516ebb7da138395c2f2a..b2eac041c3ff7d8a7c4524dac381ab95045f28af 100644 +index 0a1c965570b91f1665673121d8890c5f6137c5bc..6a3d4d87c242c7acd06e8bc8633bebdda3460919 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -70,7 +70,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch index 8d68a6c3ab..da655c0150 100644 --- a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b2eac041c3ff7d8a7c4524dac381ab95045f28af..fa5c640239451579fba35ad7b0979739e0b7b16f 100644 +index 6a3d4d87c242c7acd06e8bc8633bebdda3460919..77060bd127cedd4baa9bc88e700c23faf74d0057 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -527,10 +527,10 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -72,7 +72,7 @@ index b2eac041c3ff7d8a7c4524dac381ab95045f28af..fa5c640239451579fba35ad7b0979739 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index feea84de7d2184caf24d79faee8874f7698e826e..17c92071fabd385e1955fec793eba0b0c5cdd2b6 100644 +index 1331e3b5795c804223da713ee951786d2c073ecc..0305b1100711e57288c639078a15bee89b0d7964 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1785,7 +1785,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch index 76e67cdb62..416a38828e 100644 --- a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ 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 17c92071fabd385e1955fec793eba0b0c5cdd2b6..499e7d6fecc6223df057fa644f8c449fda910f0b 100644 +index 0305b1100711e57288c639078a15bee89b0d7964..03ab59bceca94ab23278b8f531ccdcc6a85da799 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1481,6 +1481,26 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index f1d904040f..c1a95a8126 100644 --- a/Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index fa5c640239451579fba35ad7b0979739e0b7b16f..e78306cb187b5f08e32888ebd55c4c486fc8dad2 100644 +index 77060bd127cedd4baa9bc88e700c23faf74d0057..351eeb83d8a28b19e3805f0d8a377f4ed060c592 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2541,7 +2541,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2542,7 +2542,7 @@ public class PlayerConnection implements PacketListenerPlayIn { String[] lines = new String[4]; for (int i = 0; i < astring.length; ++i) { diff --git a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch index ce46018fb3..39c3d0f999 100644 --- a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch @@ -88,10 +88,10 @@ index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e this.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e78306cb187b5f08e32888ebd55c4c486fc8dad2..2cbb0e0e1046efeff7f417d0c976754bd0e7959b 100644 +index 351eeb83d8a28b19e3805f0d8a377f4ed060c592..027f9a86f458aab7d94f132981a9c700a0afea57 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2079,7 +2079,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2080,7 +2080,7 @@ public class PlayerConnection implements PacketListenerPlayIn { PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer()); if (this.player.isFrozen()) return; // CraftBukkit @@ -101,7 +101,7 @@ index e78306cb187b5f08e32888ebd55c4c486fc8dad2..2cbb0e0e1046efeff7f417d0c976754b this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0f20704c889f28d8e7560b33d366eb8948565071..e3611d01c0e20938f8b4ef01ade03a2e3434ed9f 100644 +index edb59cf7dc797384bba9d37f486b624753d4f31c..509451c73892147419ef4cf23b449c61d21cf279 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -420,7 +420,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch index a9f7b79235..48838b35cb 100644 --- a/Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2cbb0e0e1046efeff7f417d0c976754bd0e7959b..8855a1de14f970ddac25d935a4b2e00c7e277908 100644 +index 027f9a86f458aab7d94f132981a9c700a0afea57..1bb64d388c27e3438b1f5ab70ccaa1aa529aa32c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1988,6 +1988,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1989,6 +1989,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (event.isCancelled()) { diff --git a/Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch index 0b7f4c17f7..a4a1825589 100644 --- a/Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use asynchronous Log4j 2 loggers diff --git a/pom.xml b/pom.xml -index 8150756361174fd46df8f73943ab48c55a523c0c..f578acae6fbe1ad7a0c05b96ba489482687ec1df 100644 +index accd4b6521b18495c933a50ed511b173cbb71861..6cde6f7dcbb3ff2fda0189a06573640777548d27 100644 --- a/pom.xml +++ b/pom.xml @@ -77,6 +77,13 @@ diff --git a/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch index 1f0031f56d..8b62106447 100644 --- a/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,7 +45,7 @@ index c8a7d8092a2849b62a8d83d7970756fd76100025..2e5c71d6b7d120a308076d95a3d5b73c + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 8855a1de14f970ddac25d935a4b2e00c7e277908..6884fcd0749eba2dc84f1447b338a879ff79f0c8 100644 +index 1bb64d388c27e3438b1f5ab70ccaa1aa529aa32c..17247eb9c08de10da50b94d65ac3f05453805137 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch index 48e36efc08..9cbdf8acc9 100644 --- a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch @@ -48,7 +48,7 @@ index 30d04825b8a65e0af66f3591ee6baaa433893b54..3a7e2d1b2a11edbf430333bb8f4788c0 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 499e7d6fecc6223df057fa644f8c449fda910f0b..ddb4dd94ccc2fe3d85e84f5f80f8362cc5bf90ef 100644 +index 03ab59bceca94ab23278b8f531ccdcc6a85da799..6aba97153123084f99088f10ccfc16ae8e3a0639 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -803,6 +803,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch index 089f727bb8..865728cdf5 100644 --- a/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch @@ -122,7 +122,7 @@ index 5b01e4edb3c0f8bc785b70128cbe31b14356e4fb..9213bfb78e92b838189161045e394558 this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e3611d01c0e20938f8b4ef01ade03a2e3434ed9f..2acea235633fb6b48c68711bc1cec5b61e7bf140 100644 +index 509451c73892147419ef4cf23b449c61d21cf279..7c88e370c19554652d4a580252e657747180047d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -543,7 +543,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch index 8a364bce5f..8a902c4974 100644 --- a/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch +++ b/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch @@ -88,10 +88,10 @@ index 8719381d942789bf80f4b0394cec12e7394ce871..f64a83a6a9f8aaa0c1bbd6c2e3d0af28 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6884fcd0749eba2dc84f1447b338a879ff79f0c8..54e70688c94343ba3988eb775993c61bbc807bcc 100644 +index 17247eb9c08de10da50b94d65ac3f05453805137..f0d8388d6ac0ed5546d34f628a6b2ba6c56b1c61 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1132,6 +1132,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1133,6 +1133,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } // CraftBukkit start - Delegate to teleport(Location) diff --git a/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch index 13d96d6178..ace92ff547 100644 --- a/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch @@ -289,7 +289,7 @@ index ae74dc9e183e66062455cf2a18ab43ae87976046..7eb230f1b27eddf48f1b12fc78877a36 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 ddb4dd94ccc2fe3d85e84f5f80f8362cc5bf90ef..02dc825a40bc8f289cd4b93ba2e88ee534784730 100644 +index 6aba97153123084f99088f10ccfc16ae8e3a0639..b0ce13c6a62c77ba26dcd006df781ec00b3509f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -675,7 +675,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch index 189701cc38..d91eb34e74 100644 --- a/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -20,7 +20,7 @@ index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b49a1a6f5017c9e183a7d08b16e89899 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 54e70688c94343ba3988eb775993c61bbc807bcc..ff4ba9b60c60fa77f26a04a065436063270984d1 100644 +index f0d8388d6ac0ed5546d34f628a6b2ba6c56b1c61..e815200d1b81bd0d8a62e28a43cc01f4da956fa0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -350,6 +350,13 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0318-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0318-Don-t-allow-digging-into-unloaded-chunks.patch index e6ca3af0bb..aca48a4777 100644 --- a/Spigot-Server-Patches/0318-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0318-Don-t-allow-digging-into-unloaded-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ff4ba9b60c60fa77f26a04a065436063270984d1..64f7694b91e4b1a84cb1f38534056c14404124fb 100644 +index e815200d1b81bd0d8a62e28a43cc01f4da956fa0..247765de4032ca7d58cc5b415646d4a1816ff195 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1296,6 +1296,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1297,6 +1297,11 @@ public class PlayerConnection implements PacketListenerPlayIn { case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: diff --git a/Spigot-Server-Patches/0319-Book-Size-Limits.patch b/Spigot-Server-Patches/0319-Book-Size-Limits.patch index 508e80ba6d..b9f72fc33e 100644 --- a/Spigot-Server-Patches/0319-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0319-Book-Size-Limits.patch @@ -22,7 +22,7 @@ index 478856f190a8d0177dee39dab4692fc54f9c8ed4..01d48da8b2f89ad3a615ad10c044c5f0 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 64f7694b91e4b1a84cb1f38534056c14404124fb..06d4f5f0a2410478ff3eb5b9a57d963e4c74893b 100644 +index 247765de4032ca7d58cc5b415646d4a1816ff195..7b3fb4a0a8f2883f8004343869058028ae30ce1f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -14,6 +14,7 @@ import java.util.Optional; diff --git a/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch index 70a4d2e765..b932f3d150 100644 --- a/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch @@ -29,7 +29,7 @@ index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 02dc825a40bc8f289cd4b93ba2e88ee534784730..b97e8c2a42c608b1798c4a1964111c312a125097 100644 +index b0ce13c6a62c77ba26dcd006df781ec00b3509f7..349c82ec94ba34bb584670422cea0db063968bf1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2255,6 +2255,11 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index a5d669d660..77245a2098 100644 --- a/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -28,7 +28,7 @@ index 80a9faf3b02c51efc1f55beebce173309628b9ab..ccf1a64d33038a73360f68a814bd4602 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 2acea235633fb6b48c68711bc1cec5b61e7bf140..f436f30c1e07ac42e35a007cde5a92cc0568e7ff 100644 +index 7c88e370c19554652d4a580252e657747180047d..139104c436c9a04865ec4138606e82091be8b65f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -97,6 +97,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch b/Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch index 9fa41f0874..6fdce916aa 100644 --- a/Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch +++ b/Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch @@ -10,7 +10,7 @@ it impossible to properly cancel the event or modify the book meta cancelled writing diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 06d4f5f0a2410478ff3eb5b9a57d963e4c74893b..782cfec6247d52a0e3aa12f21247f3aab1bb3c47 100644 +index 7b3fb4a0a8f2883f8004343869058028ae30ce1f..b7612fb450063e48a81ca95e7dedebb7f6e7789c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -890,9 +890,11 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch index 4fea6bbb43..97812a593f 100644 --- a/Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch +++ b/Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix sign edit memory leak when a player edits a sign, a reference to their Entity is never cleand up. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 782cfec6247d52a0e3aa12f21247f3aab1bb3c47..76d67b6b0afa590e7e0f838aa7abb4efadfda045 100644 +index b7612fb450063e48a81ca95e7dedebb7f6e7789c..22a185c298f4738669708c8c6ef8ef9aeff0acc1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2586,7 +2586,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2587,7 +2587,7 @@ public class PlayerConnection implements PacketListenerPlayIn { TileEntitySign tileentitysign = (TileEntitySign) tileentity; diff --git a/Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch index 8f91800e6f..6ea75dfb0d 100644 --- a/Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 76d67b6b0afa590e7e0f838aa7abb4efadfda045..0296dfc4e944de9156715c93a33b699c2d7cf63a 100644 +index 22a185c298f4738669708c8c6ef8ef9aeff0acc1..06e994f9483c3686e9b039c613668c86d90e4949 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -103,6 +103,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -33,7 +33,7 @@ index 76d67b6b0afa590e7e0f838aa7abb4efadfda045..0296dfc4e944de9156715c93a33b699c private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { -@@ -2602,6 +2603,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2603,6 +2604,15 @@ public class PlayerConnection implements PacketListenerPlayIn { String[] lines = new String[4]; for (int i = 0; i < astring.length; ++i) { diff --git a/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index d48e28ee16..75b33baf2e 100644 --- a/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -338,17 +338,17 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..545dbe6ddcce1d172f465b4a7ab85654 return false; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f436f30c1e07ac42e35a007cde5a92cc0568e7ff..1950ca8af7335317ec40cf2dfd026115cc29054e 100644 +index 139104c436c9a04865ec4138606e82091be8b65f..344d7f62dd77cb2ecaf324a1fe88c6fabbddbc64 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -167,6 +167,7 @@ public abstract class PlayerList { - boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); - - // Spigot - view distance +@@ -154,6 +154,7 @@ public abstract class PlayerList { + entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); + entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world) + entityplayer.setYawPitch(loc.getYaw(), loc.getPitch()); + networkmanager.queueImmunity = true; // Paper - playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); - entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit - playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); + // Spigot end + + // CraftBukkit - Moved message to after join @@ -176,6 +177,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); diff --git a/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index 29b6652eb2..e361839d47 100644 --- a/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -11,7 +11,7 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 1950ca8af7335317ec40cf2dfd026115cc29054e..0815a8e580465c0fe2700efad67370d1ff514fbf 100644 +index 344d7f62dd77cb2ecaf324a1fe88c6fabbddbc64..74642f6536c811c41acbd24d46dd193cdb02e1fb 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -932,9 +932,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index 97f1c59747..a43add667f 100644 --- a/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0815a8e580465c0fe2700efad67370d1ff514fbf..4d9c84348770dea9307488317cf5c36913367ca1 100644 +index 74642f6536c811c41acbd24d46dd193cdb02e1fb..f4b2e3db79beb3f9c355a5e03a439b8e4689f95b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1050,6 +1050,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch index ede122005a..e0eae4bde0 100644 --- a/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch @@ -59,7 +59,7 @@ index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4d9c84348770dea9307488317cf5c36913367ca1..4ae901a3516840574a1c31e1002e8c6b248a7d54 100644 +index f4b2e3db79beb3f9c355a5e03a439b8e4689f95b..800f2a0ce13b9394e44277ad2e0455bd88fa34c2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -264,7 +264,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch index ff83ee17da..cb3132667f 100644 --- a/Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch +++ b/Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch @@ -22,10 +22,10 @@ index b5a76f37c27cde25b2561a23c7c0fe7bdd992fee..9b89c0c8a3f1dada4e9b2aaeed0b92e5 this.f.accept(packet); if (this.tracker instanceof EntityPlayer) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0296dfc4e944de9156715c93a33b699c2d7cf63a..4a718ab0cccef1eef2bcf6fdc5942ba820858dc1 100644 +index 06e994f9483c3686e9b039c613668c86d90e4949..339e03fde358ce55badaa5be311f0b6972f72e3d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2045,7 +2045,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2046,7 +2046,14 @@ public class PlayerConnection implements PacketListenerPlayIn { if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) { // Refresh the current entity metadata diff --git a/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch index 2c859b2e55..81be8d58fa 100644 --- a/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4ae901a3516840574a1c31e1002e8c6b248a7d54..ce1768e1c47179dfc119d7fa315c30510715f1d6 100644 +index 800f2a0ce13b9394e44277ad2e0455bd88fa34c2..7bc1eff8233b1afe66eeb9371e28a9d4396661f5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -666,9 +666,14 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0356-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0356-Fix-CB-call-to-changed-postToMainThread-method.patch index c91eeeb6b6..0ac6343bb2 100644 --- a/Spigot-Server-Patches/0356-Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/Spigot-Server-Patches/0356-Fix-CB-call-to-changed-postToMainThread-method.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4a718ab0cccef1eef2bcf6fdc5942ba820858dc1..35536527a01e72841e358c643631b2739dd0bf26 100644 +index 339e03fde358ce55badaa5be311f0b6972f72e3d..7be725eb32b331297f953a2e6cae493b6bf88196 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -285,7 +285,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index d00a141ff7..115e0902ba 100644 --- a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -29,7 +29,7 @@ index cc493d5d8b621bb69aedc5d2c5121d9199074575..19680baafcc8a5a18ec3f58da6943721 public boolean isDebugging() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b97e8c2a42c608b1798c4a1964111c312a125097..1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e 100644 +index 349c82ec94ba34bb584670422cea0db063968bf1..c6dd85b59bcdfcfd76db44cb4779294f8e9a7164 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch index 77ee8c6d09..b6de69510b 100644 --- a/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch @@ -3488,7 +3488,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..a10006efc52f093196e7d67a3281a87d return this.m; } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 35536527a01e72841e358c643631b2739dd0bf26..795b24c8d102417ae7e730254ecddefc06dbe0df 100644 +index 7be725eb32b331297f953a2e6cae493b6bf88196..2fc83aa9aabbb4ae5a22d69c9840e6235d29cd1b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -544,6 +544,13 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch index 1b09b3ad4c..0b1b44251f 100644 --- a/Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 795b24c8d102417ae7e730254ecddefc06dbe0df..e382315c91540ac24821e432ee31a8244f4f7efa 100644 +index 2fc83aa9aabbb4ae5a22d69c9840e6235d29cd1b..a396051c46613ac863fd296b55465c01bd2c7ce7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1015,7 +1015,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0383-Fix-MC-158900.patch b/Spigot-Server-Patches/0383-Fix-MC-158900.patch index 3b2a5f288f..cff3cae888 100644 --- a/Spigot-Server-Patches/0383-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0383-Fix-MC-158900.patch @@ -7,7 +7,7 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ce1768e1c47179dfc119d7fa315c30510715f1d6..47ec41f114aa09a50f8876d11da7db981e2be2f2 100644 +index 7bc1eff8233b1afe66eeb9371e28a9d4396661f5..3a21a07906417c14d000b7e22bd190f8c258d0fb 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -533,8 +533,10 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch index a3c6c7bbb8..997ab8b000 100644 --- a/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch @@ -5,7 +5,7 @@ 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 1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e..ba3a3c487f0cefa1c0d7394998800a4c4d6486cb 100644 +index c6dd85b59bcdfcfd76db44cb4779294f8e9a7164..e24bda3f1fe026925055db1944f4c328756bf601 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2278,5 +2278,10 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 464bc79b1f..5bde6926ef 100644 --- a/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -18,7 +18,7 @@ index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 47ec41f114aa09a50f8876d11da7db981e2be2f2..9e635fa562264ee9454adb6dd7fc47f45d8b3242 100644 +index 3a21a07906417c14d000b7e22bd190f8c258d0fb..56cd5396f27f8f582f17bd74b8a72379557d7e8f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -761,6 +761,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index 4cefa8b120..980edf45f1 100644 --- a/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -19,10 +19,10 @@ index d354e9b504b6872f20a9e433522827589bd4778a..12b27c44d77b72fa4a4d42cfe3db8394 if (enumhand == EnumHand.MAIN_HAND) { return this.getEquipment(EnumItemSlot.MAINHAND); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e382315c91540ac24821e432ee31a8244f4f7efa..204eae3abdb006c3006537e6cf8f4c7a0bae2a47 100644 +index a396051c46613ac863fd296b55465c01bd2c7ce7..dc7d0f902aa0f2601656cd5e9e434c276111a7d4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1477,6 +1477,10 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1478,6 +1478,10 @@ public class PlayerConnection implements PacketListenerPlayIn { this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524 return; } diff --git a/Spigot-Server-Patches/0423-Prevent-teleporting-dead-entities.patch b/Spigot-Server-Patches/0423-Prevent-teleporting-dead-entities.patch index a748121407..a238affca4 100644 --- a/Spigot-Server-Patches/0423-Prevent-teleporting-dead-entities.patch +++ b/Spigot-Server-Patches/0423-Prevent-teleporting-dead-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 204eae3abdb006c3006537e6cf8f4c7a0bae2a47..651ecb50c2b06ca81cb9a2286d77fd41a17b5140 100644 +index dc7d0f902aa0f2601656cd5e9e434c276111a7d4..1b9a089eddacbaf1a7d7e19478ee756b4ab601b2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1239,6 +1239,10 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1240,6 +1240,10 @@ public class PlayerConnection implements PacketListenerPlayIn { } private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set) { diff --git a/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch index c4a82f1093..aa7dc492e2 100644 --- a/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch @@ -40,7 +40,7 @@ index b27260270de80de371a5a71fa0516aa43c44c83e..1cc40b1f0af9e617b2a71bcc442543e1 Stream c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 9e635fa562264ee9454adb6dd7fc47f45d8b3242..4189c315176415b121c6e8f8d3c9682caded2189 100644 +index 56cd5396f27f8f582f17bd74b8a72379557d7e8f..cac27c509dd3bec9f7feabf5804d1140055b1c6e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -724,6 +724,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch index 79407d403e..6b35894783 100644 --- a/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch @@ -40,7 +40,7 @@ index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c392129 this.playerInteractManager.a((WorldServer) world); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4189c315176415b121c6e8f8d3c9682caded2189..29b802b9b1435479ca2a4b57267967f848162424 100644 +index cac27c509dd3bec9f7feabf5804d1140055b1c6e..610c3ed31e0dceeded4dbd5f63db23def88e1ea6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -134,6 +134,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch index 8f26ee76b0..15ffd0b020 100644 --- a/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch @@ -147,7 +147,7 @@ index 98e3acdc618ceda35e8086746aed698d304321c0..5bef465bfe90b08524862b13f9e22dcf + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ba3a3c487f0cefa1c0d7394998800a4c4d6486cb..e7414b9e2307171edc7b2b7583f7d2972b3a5503 100644 +index e24bda3f1fe026925055db1944f4c328756bf601..c504ceac113cc709719f60c90a2cc011cdc682ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2128,6 +2128,16 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch index 55a6d0ae37..61ee9f0ae4 100644 --- a/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch @@ -6,7 +6,7 @@ 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 e7414b9e2307171edc7b2b7583f7d2972b3a5503..43f8a547ab40d427bdeac0edac4040f5ff5576b5 100644 +index c504ceac113cc709719f60c90a2cc011cdc682ab..b1cf9fac28031b7f8051a0d1d5d7ce63b06d5f2d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2293,5 +2293,10 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch index 2053fa68ac..04230bd007 100644 --- a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch @@ -273,7 +273,7 @@ index bb4d54ebee573964cf3026888da108584b12972f..09f94bd242318155dbb46e12224ad3e4 list.stream().map((playerchunk) -> { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 29b802b9b1435479ca2a4b57267967f848162424..8da0d7f543dccc30955cdbc20a34a070d269b8ac 100644 +index 610c3ed31e0dceeded4dbd5f63db23def88e1ea6..62dc7d7cebc4b7e4a64eda6130c988251a55a6fa 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -431,7 +431,7 @@ public abstract class PlayerList { @@ -318,7 +318,7 @@ index 93df6a29035bb3cc96409b145a2e1433d38bbe99..418ba04a837ee2b17cc679edd35ba098 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/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 43f8a547ab40d427bdeac0edac4040f5ff5576b5..bae1c62cb5c440ec9f915f602d58635bfbfa361c 100644 +index b1cf9fac28031b7f8051a0d1d5d7ce63b06d5f2d..3a46076a125bbfa19ca8a22dc5ab71fd024ab113 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch index f95b2371b0..19cc5fa2fe 100644 --- a/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8da0d7f543dccc30955cdbc20a34a070d269b8ac..06c675ce3b61766dbb7b456fd6aa46f55357e1b8 100644 +index 62dc7d7cebc4b7e4a64eda6130c988251a55a6fa..c79572a38acba2413a1288c40a317dd102da6520 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -213,9 +213,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 10609b6df6..b6772ad34c 100644 --- a/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -52,7 +52,7 @@ index 4ab719930f5b35c0ae221e9345f1e2eda7d9d719..8de86684dda275585826617b41d6792f if (!(entity instanceof EntityComplexPart)) { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 06c675ce3b61766dbb7b456fd6aa46f55357e1b8..a2c9cb6b5c06a76b5fafb75ef51293832f0f4620 100644 +index c79572a38acba2413a1288c40a317dd102da6520..0f50aef7ff3c06cad0afa22924da170e04780053 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -202,6 +202,12 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch index 504dbf107b..03a8a366a1 100644 --- a/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch @@ -73,7 +73,7 @@ index 50163f7291474062bde81631c9220e8a9f5bb718..ebab6961b752ca0b1c1b28f85abb33c7 if (entityplayer != null) { this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 651ecb50c2b06ca81cb9a2286d77fd41a17b5140..1099a46aa05f12572100994ea251f0d55c66ef80 100644 +index 1b9a089eddacbaf1a7d7e19478ee756b4ab601b2..4f37401909f1845d0f18aa497a6561b705e2fd14 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -69,6 +69,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -110,7 +110,7 @@ index 651ecb50c2b06ca81cb9a2286d77fd41a17b5140..1099a46aa05f12572100994ea251f0d5 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a2c9cb6b5c06a76b5fafb75ef51293832f0f4620..78a4dfb1f62183df0e80787442036e69d40e4461 100644 +index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c385d6758 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -18,6 +18,7 @@ import java.util.Map; diff --git a/Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch index bb66708621..e111f1e5b9 100644 --- a/Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch +++ b/Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch @@ -69,7 +69,7 @@ index 4b6f45501106f49f118a93e5027734cdb7ff2727..fa0f247e51c20ea0e3cbaccbc8dbb2a1 public boolean hasPermission(int i) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1099a46aa05f12572100994ea251f0d55c66ef80..ea314328bbb4512054eb9243453cfce88984fd2b 100644 +index 4f37401909f1845d0f18aa497a6561b705e2fd14..26f659d0ab20bbe365419e8ff38214926e039e2a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -584,8 +584,12 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch index 771e5cd275..789c796c62 100644 --- a/Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ea314328bbb4512054eb9243453cfce88984fd2b..2ab3f2ffb7266bc6a566620b4f3db31a98b9208e 100644 +index 26f659d0ab20bbe365419e8ff38214926e039e2a..93536306c39c1ee574d45f39e8e40df3540c6e51 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -697,7 +697,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0474-Expose-game-version.patch b/Spigot-Server-Patches/0474-Expose-game-version.patch index 37b208deb0..67bfdaf5ed 100644 --- a/Spigot-Server-Patches/0474-Expose-game-version.patch +++ b/Spigot-Server-Patches/0474-Expose-game-version.patch @@ -5,7 +5,7 @@ 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 bae1c62cb5c440ec9f915f602d58635bfbfa361c..666ed0e87379a5bb9ea95cd95c23eca2df02610f 100644 +index 3a46076a125bbfa19ca8a22dc5ab71fd024ab113..04164a0749fdef5a570cd37781090cddef90aeb1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -516,6 +516,13 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch index deb6decefc..b7f7712a88 100644 --- a/Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch +++ b/Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch @@ -13,7 +13,7 @@ it is triggering a massive movement velocity. This will ensure that the servers position is synchronized anytime player is teleported. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2ab3f2ffb7266bc6a566620b4f3db31a98b9208e..553c7313e2b699be88ea01460fd299421c42b176 100644 +index 93536306c39c1ee574d45f39e8e40df3540c6e51..681de2638eb606185077668d87340f7258e2ad90 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -501,6 +501,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -24,7 +24,7 @@ index 2ab3f2ffb7266bc6a566620b4f3db31a98b9208e..553c7313e2b699be88ea01460fd29942 if (this.player.H()) { this.player.I(); } -@@ -1299,6 +1300,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1300,6 +1301,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.A = this.e; this.player.setLocation(d0, d1, d2, f, f1); diff --git a/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch index f192011904..90c81a0b21 100644 --- a/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/pom.xml b/pom.xml -index f578acae6fbe1ad7a0c05b96ba489482687ec1df..2b24688310f14b6a9e3fe04fe8b41cd1803b78c1 100644 +index 6cde6f7dcbb3ff2fda0189a06573640777548d27..ef8ee637a8a0e5e703922b2991c58f4f116b23fb 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,13 @@ @@ -838,7 +838,7 @@ index 96f4401044cacf88e8e00b5b18821c105e634fba..112d8bab65bf41263a477c5faa717687 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 666ed0e87379a5bb9ea95cd95c23eca2df02610f..2b17f2143ee9259c988f65c4db6e82b14dd70876 100644 +index 04164a0749fdef5a570cd37781090cddef90aeb1..9e4a67efff99301cceb796573a2cd1f3e0ec06cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2305,5 +2305,11 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch index 9f26f4aeab..c53f2abe39 100644 --- a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch @@ -553,18 +553,9 @@ index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 78a4dfb1f62183df0e80787442036e69d40e4461..33d7f60ab0d8bbe90bc561093ed0e764420b0595 100644 +index f7c23ec053b261a5e7e069fb61dd803c385d6758..e1ed059fd347465929b89c1d5a324f494104d602 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -177,7 +177,7 @@ public abstract class PlayerList { - - // Spigot - view distance - networkmanager.queueImmunity = true; // Paper -- playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); -+ playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance - entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit - playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); - playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); @@ -819,7 +819,7 @@ public abstract class PlayerList { // CraftBukkit start WorldData worlddata = worldserver1.getWorldData(); diff --git a/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch index da052fc7bc..89c69f39c7 100644 --- a/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,7 +22,7 @@ index 735beaf6fa6e6ccf2137b64a0b5179ada2907011..b474f45b6d551e45f8894b3971baade3 // 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 2b17f2143ee9259c988f65c4db6e82b14dd70876..40e6b8c8a90d6939cbacb088b9bc27dedd511b7d 100644 +index 9e4a67efff99301cceb796573a2cd1f3e0ec06cb..fe4302431ab15593bf8eae5cc09915994a6fd973 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -932,6 +932,35 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index e0365afd97..3bd6763fdc 100644 --- a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1132,10 +1132,10 @@ index 6dd64ce8794b8c2b5704556532159135e85a4b6c..ae42793b5a2f5bb06f068d0365378776 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 553c7313e2b699be88ea01460fd299421c42b176..66dd1b3bfeebab8dd0f4e823dd0daea903343413 100644 +index 681de2638eb606185077668d87340f7258e2ad90..fcd30d3fa5bac44ca71714a13917d847ef2b6a9a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1301,6 +1301,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1302,6 +1302,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.A = this.e; this.player.setLocation(d0, d1, d2, f, f1); this.syncPosition(); // Paper @@ -1144,7 +1144,7 @@ index 553c7313e2b699be88ea01460fd299421c42b176..66dd1b3bfeebab8dd0f4e823dd0daea9 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 33d7f60ab0d8bbe90bc561093ed0e764420b0595..8490376b014ac26bda473ea1e0c7a1063c9c70d2 100644 +index e1ed059fd347465929b89c1d5a324f494104d602..09d7435ed4e5a00f8215aceedf26033fc703d659 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -200,8 +200,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch index b52cac350b..1ebc2ae9fb 100644 --- a/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,7 +11,7 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8490376b014ac26bda473ea1e0c7a1063c9c70d2..35d7ac60f61ffb493fe4f32b63511b2b86805243 100644 +index 09d7435ed4e5a00f8215aceedf26033fc703d659..0c0c285364ab919cb92b9c7db085672cb6165dff 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1063,16 +1063,40 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index 2a8f4861f6..80a91a0411 100644 --- a/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,7 +22,7 @@ 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 40e6b8c8a90d6939cbacb088b9bc27dedd511b7d..0c6bc282652840536695c019f9a2b9a7391a1168 100644 +index fe4302431ab15593bf8eae5cc09915994a6fd973..25e01267888762826ffaf93711bdc7952c36da18 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -344,7 +344,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch index 3521403e1a..28d60b9c7f 100644 --- a/Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,13 +14,13 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 66dd1b3bfeebab8dd0f4e823dd0daea903343413..0cb2efb10694c81786a95301f3da86121ea27b17 100644 +index fcd30d3fa5bac44ca71714a13917d847ef2b6a9a..d6043dd55615c838348a90d7220da816e8671e62 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1097,6 +1097,11 @@ public class PlayerConnection implements PacketListenerPlayIn { - } +@@ -1098,6 +1098,11 @@ public class PlayerConnection implements PacketListenerPlayIn { this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9)); + this.player.c(packetplayinflying.b()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move + // Paper start - prevent position desync + if (this.teleportPos != null) { + return; // ... thanks Mojang for letting move calls teleport across dimensions. diff --git a/Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch index a36bc58783..231a820bb9 100644 --- a/Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0cb2efb10694c81786a95301f3da86121ea27b17..eeb870107031b38e25b5fb85ea731a7db1d6c2d1 100644 +index d6043dd55615c838348a90d7220da816e8671e62..656ece5aa761b4196d47bbdf0288b49775cbb1d3 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2515,9 +2515,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2516,9 +2516,15 @@ public class PlayerConnection implements PacketListenerPlayIn { PlayerConnectionUtils.ensureMainThread(packetplayinautorecipe, this, this.player.getWorldServer()); this.player.resetIdleTimer(); if (!this.player.isSpectator() && this.player.activeContainer.windowId == packetplayinautorecipe.b() && this.player.activeContainer.c(this.player) && this.player.activeContainer instanceof ContainerRecipeBook) { diff --git a/Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch b/Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch index 62c5a9bc12..d0b723c30c 100644 --- a/Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch +++ b/Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch @@ -31,7 +31,7 @@ index 7e13b1cf6d92c3e0f2dab1ba1d42bd4f250e256c..3820acd65f3cd488dba964e6d9c45885 } else { if (entityhuman.getWorld().isClientSide) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index eeb870107031b38e25b5fb85ea731a7db1d6c2d1..103bda41422f0db700b150116c1417736823e763 100644 +index 656ece5aa761b4196d47bbdf0288b49775cbb1d3..3481991870c1237ed207654a41827791c8017717 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -613,7 +613,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/work/Bukkit b/work/Bukkit index 3284612a10..f009c3dd94 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 3284612a10e704b4658aa087213a3fa9670b6926 +Subproject commit f009c3dd945c627246b383aa4ffad63a067df9ff diff --git a/work/CraftBukkit b/work/CraftBukkit index 983305bb4a..d77f4d9bf3 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 983305bb4a8601367e31f44b691f6e598bde9d0c +Subproject commit d77f4d9bf348534a2a5b2498d0ea7fbe5297521c diff --git a/work/Spigot b/work/Spigot index 6f4ff1b691..ad703da04d 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 6f4ff1b691828e538ae534eac66e80a1bf2c1adf +Subproject commit ad703da04d2ffbf84a75e5ee32f2829380864bb7 From d871ae80fedc626c6d0254fdcd9cd00fc0cea827 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 28 Jun 2020 00:58:25 -0400 Subject: [PATCH 39/95] Fix missing chunks on client (View distance issue) --- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 13 ---------- .../0400-Optimize-Hoppers.patch | 10 +++++--- .../0448-Improved-Watchdog-Support.patch | 5 ++-- ...No-Tick-view-distance-implementation.patch | 25 ++++++++++++++++++- ...k-Priority-Urgency-System-for-Chunks.patch | 6 ++--- 5 files changed, 37 insertions(+), 22 deletions(-) diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index a4ccf6663a..955f7ed44d 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -49,19 +49,6 @@ index a3afe60b0d85cf90bf7a170dc0a0b61a796381a7..85f799a713db0c822d46b689010f9f6b } else { System.arraycopy(this.b, 0, au, 0, this.c); if (au.length > this.c) { -diff --git a/src/main/java/net/minecraft/server/BehaviorFindPosition.java b/src/main/java/net/minecraft/server/BehaviorFindPosition.java -index 84a872dfd35249972129130083d51d71d75bff1e..b4976b9e00e631c1431543c0cb2064e153f3a2ef 100644 ---- a/src/main/java/net/minecraft/server/BehaviorFindPosition.java -+++ b/src/main/java/net/minecraft/server/BehaviorFindPosition.java -@@ -81,7 +81,7 @@ public class BehaviorFindPosition extends Behavior { - villageplace.a(this.b.c(), (blockposition1) -> { - return blockposition1.equals(blockposition); - }, blockposition, 1); -- entitycreature.getBehaviorController().setMemory(this.c, (Object) GlobalPos.create(worldserver.getDimensionKey(), blockposition)); -+ entitycreature.getBehaviorController().setMemory(this.c, GlobalPos.create(worldserver.getDimensionKey(), blockposition)); // Paper - decompile fix - this.f.clear(); - PacketDebug.c(worldserver, blockposition); - }); diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java index 6c2ed9c1b8567abcdb11bdc3dbaeed217a2f61e7..ae0ac8d383ca11a683465d8c83a8b8a66e567079 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java diff --git a/Spigot-Server-Patches/0400-Optimize-Hoppers.patch b/Spigot-Server-Patches/0400-Optimize-Hoppers.patch index e7445e555b..da4fc4359b 100644 --- a/Spigot-Server-Patches/0400-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0400-Optimize-Hoppers.patch @@ -105,7 +105,7 @@ index 2b06c95b4fac97513e706ef073fdd7418e1f092c..67fda8bd5a0ad6fea2df0066c61e006c this.world.b(this.position, this); if (!this.c.isAir()) { diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index a0a3adac3e2bc939b1809c5587929f674f4318a5..728c829c18db4bb25ad4581b485bb8a44300d1b1 100644 +index a0a3adac3e2bc939b1809c5587929f674f4318a5..20df9bd21d0e4d2579d05d79672da2eb26478044 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -168,6 +168,160 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -369,8 +369,12 @@ index a0a3adac3e2bc939b1809c5587929f674f4318a5..728c829c18db4bb25ad4581b485bb8a4 } else { Iterator iterator = c(ihopper).iterator(); -@@ -268,7 +467,8 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - private static boolean a(IHopper ihopper, IInventory iinventory, int i, EnumDirection enumdirection) { +@@ -265,10 +464,11 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + } + } + +- private static boolean a(IHopper ihopper, IInventory iinventory, int i, EnumDirection enumdirection) { ++ private static boolean a(IHopper ihopper, IInventory iinventory, int i, EnumDirection enumdirection) {// Paper - method unused as logic is inlined above ItemStack itemstack = iinventory.getItem(i); - if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) { diff --git a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch index 04230bd007..ece2bbb42f 100644 --- a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch @@ -331,7 +331,7 @@ index b1cf9fac28031b7f8051a0d1d5d7ce63b06d5f2d..3a46076a125bbfa19ca8a22dc5ab71fd @Override diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 438e86595760be233e89c49224963e5e8ce335e3..ff2b21305e4a46a8cafa247a0d4e786a6b7cb627 100644 +index 438e86595760be233e89c49224963e5e8ce335e3..43a763746f6eb72ae93c9b376e458edf6d86be36 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -150,6 +150,37 @@ public class Main { @@ -372,7 +372,7 @@ index 438e86595760be233e89c49224963e5e8ce335e3..ff2b21305e4a46a8cafa247a0d4e786a try { options = parser.parse(args); } catch (joptsimple.OptionException ex) { -@@ -245,8 +276,61 @@ public class Main { +@@ -245,8 +276,62 @@ public class Main { } catch (Throwable t) { t.printStackTrace(); } @@ -415,6 +415,7 @@ index 438e86595760be233e89c49224963e5e8ce335e3..ff2b21305e4a46a8cafa247a0d4e786a + // Minecraft, seen during saving + tryPreloadClass("net.minecraft.server.LightEngineLayerEventListener$Void"); + tryPreloadClass("net.minecraft.server.LightEngineLayerEventListener"); ++ tryPreloadClass("net.minecraft.server.ExceptionSuppressor"); + // Paper end + } + } diff --git a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch index c53f2abe39..bb75c321f0 100644 --- a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch @@ -127,6 +127,20 @@ index fb2b64628b974758cace770ce6debe5e88318ae8..0e3ceb60e503c74fc65b1d08371645ff public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { super(worldserver, worldserver.getSpawn(), gameprofile); this.spawnDimension = World.OVERWORLD; +diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java +index a68e4fc411ae84f12b1ca7443fa66f6325712af8..d24b5fa7e77bb18626459f6c3ab4aa20a7512712 100644 +--- a/src/main/java/net/minecraft/server/MCUtil.java ++++ b/src/main/java/net/minecraft/server/MCUtil.java +@@ -620,7 +620,8 @@ public final class MCUtil { + }); + + worldData.addProperty("name", world.getWorld().getName()); +- worldData.addProperty("view-distance", world.spigotConfig.viewDistance); ++ worldData.addProperty("view-distance", world.getChunkProvider().playerChunkMap.getEffectiveViewDistance()); ++ worldData.addProperty("no-view-distance", world.getChunkProvider().playerChunkMap.getRawNoTickViewDistance()); + worldData.addProperty("keep-spawn-loaded", world.keepSpawnInMemory); + 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 7f660d3c528f5fb4150e4ee8b29913436f125b06..40347212ad1bcf857d5b8ddb0ee6a698e2568201 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java @@ -553,9 +567,18 @@ index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f7c23ec053b261a5e7e069fb61dd803c385d6758..e1ed059fd347465929b89c1d5a324f494104d602 100644 +index f7c23ec053b261a5e7e069fb61dd803c385d6758..477b1920869bfdab166b815f433d2df2821e5d58 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -177,7 +177,7 @@ public abstract class PlayerList { + boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); + + // Spigot - view distance +- playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); ++ playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance + entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit + playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); + playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); @@ -819,7 +819,7 @@ public abstract class PlayerList { // CraftBukkit start WorldData worlddata = worldserver1.getWorldData(); diff --git a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 3bd6763fdc..e827309fa3 100644 --- a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -617,10 +617,10 @@ index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a2 for (int i = 0; i < this.inventory.getSize(); ++i) { ItemStack itemstack = this.inventory.getItem(i); diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index a68e4fc411ae84f12b1ca7443fa66f6325712af8..ce17f5114e997b48073bb078336dc43bdae190a7 100644 +index d24b5fa7e77bb18626459f6c3ab4aa20a7512712..e9cedbc8b62180134e774b119fb156c54f5767de 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java -@@ -654,6 +654,7 @@ public final class MCUtil { +@@ -655,6 +655,7 @@ public final class MCUtil { chunkData.addProperty("x", playerChunk.location.x); chunkData.addProperty("z", playerChunk.location.z); chunkData.addProperty("ticket-level", playerChunk.getTicketLevel()); @@ -1144,7 +1144,7 @@ index 681de2638eb606185077668d87340f7258e2ad90..fcd30d3fa5bac44ca71714a13917d847 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e1ed059fd347465929b89c1d5a324f494104d602..09d7435ed4e5a00f8215aceedf26033fc703d659 100644 +index 477b1920869bfdab166b815f433d2df2821e5d58..a8100f7ade20932a87c55750b412d6a755a9cdd5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -200,8 +200,8 @@ public abstract class PlayerList { From 20e92f90d42fbd25ab3fdd457c1ee3611ede1a44 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 01:29:54 -0400 Subject: [PATCH 40/95] Disable the memory information in /tps unless argument is passed Memory usage is a pretty useless value in any modern garbage collector as the way memory is used makes this information not representive of any actionable data. In the recommended GC flags, this memory value will constantly rise until it is near max and then goes down. This is perfectly normal and expected. Having this information shown will lead to confusion. Plus, many servers give this command to end users, which now really might not want to expose this memory data. So this disables it unless /tps mem is used, and also requires a permission node to even run this subcommand. --- .../0023-Further-improve-server-tick-loop.patch | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index c4e6976cac..f1eba8eada 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -162,10 +162,10 @@ index e531fe5e77901e6478554c6269a83028e391db5f..0d28a442e0ffb524140208710b253ca8 { diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -index 9cd57c9d5fe59ceb2cd307e4e1a2052c9ac428fe..f70173827feb0e896e540aec0873886810627c46 100644 +index 9cd57c9d5fe59ceb2cd307e4e1a2052c9ac428fe..7218f23df4d06ff1ca612286e4a404246389ab18 100644 --- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java +++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -@@ -26,22 +26,23 @@ public class TicksPerSecondCommand extends Command +@@ -26,22 +26,30 @@ public class TicksPerSecondCommand extends Command return true; } @@ -180,18 +180,25 @@ index 9cd57c9d5fe59ceb2cd307e4e1a2052c9ac428fe..f70173827feb0e896e540aec08738868 + + for ( int i = 0; i < tps.length; i++) { + tpsAvg[i] = format( tps[i] ); ++ } ++ sender.sendMessage(ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " + org.apache.commons.lang.StringUtils.join(tpsAvg, ", ")); ++ if (args.length > 0 && args[0].equals("mem") && sender.hasPermission("bukkit.command.tpsmemory")) { ++ sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); ++ if (!hasShownMemoryWarning) { ++ sender.sendMessage(ChatColor.RED + "Warning: " + ChatColor.GOLD + " Memory usage on modern garbage collectors is not a stable value and it is perfectly normal to see it reach max. Please do not pay it much attention."); ++ hasShownMemoryWarning = true; ++ } } - sender.sendMessage( sb.substring( 0, sb.length() - 2 ) ); - sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " - + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); -+ sender.sendMessage(ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " + org.apache.commons.lang.StringUtils.join(tpsAvg, ", ")); -+ sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); + // Paper end return true; } - private String format(double tps) ++ private boolean hasShownMemoryWarning; // Paper + private static String format(double tps) // Paper - Made static { return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() From 3a77cce3c915b156b7217fcdb56b3aee5d18ad2c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 04:01:01 -0400 Subject: [PATCH 41/95] Fix Per World Difficulty / Remembering Difficulty Fixes per world difficulty with /difficulty command and also makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. --- .../0448-Improved-Watchdog-Support.patch | 5 +- ...ld-Difficulty-Remembering-Difficulty.patch | 77 +++++++++++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 Spigot-Server-Patches/0524-Fix-Per-World-Difficulty-Remembering-Difficulty.patch diff --git a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch index ece2bbb42f..28af7ad00f 100644 --- a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch @@ -331,7 +331,7 @@ index b1cf9fac28031b7f8051a0d1d5d7ce63b06d5f2d..3a46076a125bbfa19ca8a22dc5ab71fd @Override diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 438e86595760be233e89c49224963e5e8ce335e3..43a763746f6eb72ae93c9b376e458edf6d86be36 100644 +index 438e86595760be233e89c49224963e5e8ce335e3..894552adf119037e97c7de27d783920db580f62b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -150,6 +150,37 @@ public class Main { @@ -372,7 +372,7 @@ index 438e86595760be233e89c49224963e5e8ce335e3..43a763746f6eb72ae93c9b376e458edf try { options = parser.parse(args); } catch (joptsimple.OptionException ex) { -@@ -245,8 +276,62 @@ public class Main { +@@ -245,8 +276,63 @@ public class Main { } catch (Throwable t) { t.printStackTrace(); } @@ -412,6 +412,7 @@ index 438e86595760be233e89c49224963e5e8ce335e3..43a763746f6eb72ae93c9b376e458edf + tryPreloadClass("org.slf4j.helpers.BasicMarker"); + tryPreloadClass("org.slf4j.helpers.Util"); + tryPreloadClass("com.destroystokyo.paper.event.player.PlayerConnectionCloseEvent"); ++ tryPreloadClass("com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent"); + // Minecraft, seen during saving + tryPreloadClass("net.minecraft.server.LightEngineLayerEventListener$Void"); + tryPreloadClass("net.minecraft.server.LightEngineLayerEventListener"); diff --git a/Spigot-Server-Patches/0524-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/Spigot-Server-Patches/0524-Fix-Per-World-Difficulty-Remembering-Difficulty.patch new file mode 100644 index 0000000000..dd71609645 --- /dev/null +++ b/Spigot-Server-Patches/0524-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -0,0 +1,77 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 28 Jun 2020 03:59:10 -0400 +Subject: [PATCH] Fix Per World Difficulty / Remembering Difficulty + +Fixes per world difficulty with /difficulty command and also +makes it so that the server keeps the last difficulty used instead +of restoring the server.properties every single load. + +diff --git a/src/main/java/net/minecraft/server/CommandDifficulty.java b/src/main/java/net/minecraft/server/CommandDifficulty.java +index bc71070c670d1a64c60b9f19711a5e8a50ace56e..9efc743e028650ccc9cda5a2c9deb1836253b91d 100644 +--- a/src/main/java/net/minecraft/server/CommandDifficulty.java ++++ b/src/main/java/net/minecraft/server/CommandDifficulty.java +@@ -36,10 +36,11 @@ public class CommandDifficulty { + public static int a(CommandListenerWrapper commandlistenerwrapper, EnumDifficulty enumdifficulty) throws CommandSyntaxException { + MinecraftServer minecraftserver = commandlistenerwrapper.getServer(); + +- if (minecraftserver.getSaveData().getDifficulty() == enumdifficulty) { ++ WorldServer world = commandlistenerwrapper.getWorld(); // Paper ++ if (world.worldDataServer.getDifficulty() == enumdifficulty) { // Paper + throw CommandDifficulty.a.create(enumdifficulty.c()); + } else { +- minecraftserver.a(enumdifficulty, true); ++ minecraftserver.a(world, enumdifficulty, true); // Paper + commandlistenerwrapper.sendMessage(new ChatMessage("commands.difficulty.success", new Object[]{enumdifficulty.b()}), true); + return 0; + } +diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java +index 4c561181a977fd0244325880bb6a8cd6a54dcacc..8b2755a3b95e472e884976195d1d3551fc260e39 100644 +--- a/src/main/java/net/minecraft/server/DedicatedServer.java ++++ b/src/main/java/net/minecraft/server/DedicatedServer.java +@@ -327,7 +327,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + + @Override + public void updateWorldSettings() { +- this.a(this.getDedicatedServerProperties().difficulty, true); ++ //this.a(this.getDedicatedServerProperties().difficulty, true); // Paper - Don't overwrite level.dat's difficulty, keep current + } + + @Override +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index b474f45b6d551e45f8894b3971baade33b6ccd0f..5c862de2f240a241153d90a01042664b4f05cb91 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -1519,11 +1519,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sun, 28 Jun 2020 04:21:40 -0400 Subject: [PATCH 42/95] Fix null pointer in portal search config --- .../0051-Add-configurable-portal-search-radius.patch | 7 ++++--- .../0092-Implement-PlayerLocaleChangeEvent.patch | 4 ++-- .../0119-Cache-user-authenticator-threads.patch | 4 ++-- .../0131-Properly-fix-item-duplication-bug.patch | 4 ++-- .../0238-InventoryCloseEvent-Reason-API.patch | 8 ++++---- ...-player-spectator-target-events-and-improve-impl.patch | 4 ++-- .../0311-Reset-players-airTicks-on-respawn.patch | 4 ++-- .../0323-force-entity-dismount-during-teleportation.patch | 4 ++-- ...karound-for-vehicle-tracking-issue-on-disconnect.patch | 4 ++-- .../0384-implement-optional-per-player-mob-spawns.patch | 4 ++-- ...Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch | 4 ++-- .../0453-Prevent-opening-inventories-when-frozen.patch | 6 +++--- .../0459-Implement-Player-Client-Options-API.patch | 4 ++-- 13 files changed, 31 insertions(+), 30 deletions(-) diff --git a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch index 06fcc7f4cd..602f9fb890 100644 --- a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch @@ -34,15 +34,16 @@ index be0ade74030c5f8584b5caa22d6d3084a0853afa..3bda9ab2a19740e3b06f24e2bcc82cc9 return null; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 67c0d4e50aadc4712b941c7d2fff0d108e3acf17..d4673ac51ffc720362e849ec2da17daaceded4ca 100644 +index 67c0d4e50aadc4712b941c7d2fff0d108e3acf17..e140009e73517feea5f2c9923091a3d528e801af 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -818,7 +818,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -818,7 +818,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // CraftBukkit start Location enter = this.getBukkitEntity().getLocation(); Location exit = (worldserver == null) ? null : new Location(worldserver.getWorld(), d0, d1, d2, f1, f); - PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, 128, true, resourcekey == DimensionManager.THE_END ? 0 : 16); -+ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, worldserver.paperConfig.portalSearchRadius, true, resourcekey == DimensionManager.THE_END ? 0 : worldserver.paperConfig.portalCreateRadius); ++ com.destroystokyo.paper.PaperWorldConfig config = worldserver != null ? worldserver.paperConfig : worldserver1.paperConfig; // Paper - portal radius ++ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, config.portalSearchRadius, true, resourcekey == DimensionManager.THE_END ? 0 : config.portalCreateRadius); // Paper - portal radius Bukkit.getServer().getPluginManager().callEvent(event); if (event.isCancelled() || event.getTo() == null) { return null; diff --git a/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch index 81c3758344..753c38a987 100644 --- a/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d4673ac51ffc720362e849ec2da17daaceded4ca..898ac661042381b99b98991f493538c0433ddb09 100644 +index e140009e73517feea5f2c9923091a3d528e801af..177f865688c40d0ecca72771007e2271626ab5cc 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1569,20 +1569,28 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1570,20 +1570,28 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return s; } diff --git a/Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch index c28e95eaba..810d6961bb 100644 --- a/Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 69178bcfa328b79e8433805b650948fadc7b799b..8d190606262352254bc3cf65515d74baa49ffaeb 100644 +index b7f7dd59fd9deaff9ec3797b395c91c91ce5b54c..0f865f4f94d84da4eb6d0e1288ca7678a23545b2 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -4,7 +4,9 @@ import com.google.common.collect.Lists; @@ -50,7 +50,7 @@ index 69178bcfa328b79e8433805b650948fadc7b799b..8d190606262352254bc3cf65515d74ba this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } -@@ -1435,7 +1444,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1436,7 +1445,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit diff --git a/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch index 761428c4f1..ccf66d9db0 100644 --- a/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8d190606262352254bc3cf65515d74baa49ffaeb..2fa8c3e2491ff5947a99374c0678694d833bf659 100644 +index 0f865f4f94d84da4eb6d0e1288ca7678a23545b2..7227717f1ede5d67432f97f527c2d18f9d1c656f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1935,7 +1935,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1936,7 +1936,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { diff --git a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch index 39c3d0f999..ca369ebb68 100644 --- a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch @@ -34,7 +34,7 @@ index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e2c280c45 100644 +index 6414ff3ca7e5f217268f7114f7ac751532444af6..8a9a287074f2e91488f91ec9d8a7687c92f72099 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -411,7 +411,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -55,7 +55,7 @@ index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e } String deathMessage = event.getDeathMessage(); -@@ -1165,7 +1165,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1166,7 +1166,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return OptionalInt.empty(); } else { if (this.activeContainer != this.defaultContainer) { @@ -64,7 +64,7 @@ index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e } this.nextContainerCounter(); -@@ -1225,7 +1225,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1226,7 +1226,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end if (this.activeContainer != this.defaultContainer) { @@ -73,7 +73,7 @@ index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1289,7 +1289,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1290,7 +1290,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void closeInventory() { diff --git a/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch index 8a902c4974..5e7e706dae 100644 --- a/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch +++ b/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8719381d942789bf80f4b0394cec12e7394ce871..f64a83a6a9f8aaa0c1bbd6c2e3d0af28c06cbbd6 100644 +index b360077d72afafcaa23c438eb073b9286c8fb563..e0d7bb9c1df2898ead246265f4ab2f05396f59c8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1696,15 +1696,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1697,15 +1697,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } diff --git a/Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch index 695aa03bb2..767ffd9174 100644 --- a/Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch @@ -17,10 +17,10 @@ index a704feb0c19b56964d017f9e0ea3f26bc3e975f8..41c14d367e0b51e109001167d3c7b406 return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f64a83a6a9f8aaa0c1bbd6c2e3d0af28c06cbbd6..6bdbe8081689c55a61e133c7b4d3d06d0c507d50 100644 +index e0d7bb9c1df2898ead246265f4ab2f05396f59c8..4b1923c81df02d0d48a5e61b9e4487d4a2fe789b 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -2027,6 +2027,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2028,6 +2028,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); diff --git a/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch index ba780e95be..76cb14f49f 100644 --- a/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch @@ -112,10 +112,10 @@ index d6a98bb7fc107649c179cded2d37c06a41146a89..84de18a6c207612ec3d3cca61749934b this.a(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 6bdbe8081689c55a61e133c7b4d3d06d0c507d50..80a9faf3b02c51efc1f55beebce173309628b9ab 100644 +index 4b1923c81df02d0d48a5e61b9e4487d4a2fe789b..76eff7dcb734f366b515d13a4a693adaa23695ad 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1133,11 +1133,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1134,11 +1134,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } diff --git a/Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index 1766aaca9b..f895447d99 100644 --- a/Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ccf1a64d33038a73360f68a814bd46023c549cd2..b45e265ff95f9130009b0d5ba3e60644a7caa2ee 100644 +index af4fd8beab932589a832c7f4916bc669376a6615..3a6bd8e7d78d8c6188c0594c9806181f30abea32 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1399,6 +1399,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1400,6 +1400,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void p() { this.co = true; this.ejectPassengers(); diff --git a/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch index ff9fe569e2..b8b77c81c0 100644 --- a/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch @@ -573,7 +573,7 @@ index 707db4febac59a4d09d6420ea2add469cf54c2ec..1597b7a882769109f467d81ecbadc45f this.p = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3a3ffe5a544d9f73b0ac512f67629b1169110395..35aca074e4a0e1202441536f6b21f3731c490cc6 100644 +index 4099915aa00ef74a3e0e667a5036af3ee128cd36..e505f7c9b6e36262d01b5f8103db3df03a95a93d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -85,6 +85,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -596,7 +596,7 @@ index 3a3ffe5a544d9f73b0ac512f67629b1169110395..35aca074e4a0e1202441536f6b21f373 } // Yes, this doesn't match Vanilla, but it's the best we can do for now. -@@ -1931,6 +1937,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1932,6 +1938,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } diff --git a/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 5bde6926ef..2d949c9a53 100644 --- a/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c75bb1fe7 100644 +index e505f7c9b6e36262d01b5f8103db3df03a95a93d..ec160ddedf8b6fcbfd357afcc5f9e58ed32e69d5 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1018,6 +1018,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1019,6 +1019,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; diff --git a/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch index eb861c8fa2..65b6cf8a01 100644 --- a/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a941b11b58 100644 +index dad115496d3210e1471f1c4eb81989c27a8eb368..6ab11c9b5b6139d917cf1b69430173f0222c6c8b 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -423,7 +423,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -17,7 +17,7 @@ index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a9 this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.activeContainer = this.defaultContainer; } -@@ -1278,7 +1278,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1279,7 +1279,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } else { // CraftBukkit start this.activeContainer = container; @@ -26,7 +26,7 @@ index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a9 // CraftBukkit end container.addSlotListener(this); return OptionalInt.of(this.containerCounter); -@@ -2073,7 +2073,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2074,7 +2074,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @Override diff --git a/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch index a2fdb0c7b6..95c9c3edff 100644 --- a/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch @@ -98,7 +98,7 @@ index 22acfe1350eb122b7eaa7209f519e4f4f1469b6c..2cada09ced1660526e9c112c2c8d92bb protected static final DataWatcherObject br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad512e774f 100644 +index 6ab11c9b5b6139d917cf1b69430173f0222c6c8b..0d624d35a86f77cc710162c302270535126ad13d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -118,7 +118,7 @@ index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1682,6 +1683,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1683,6 +1684,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public String locale = null; // CraftBukkit - lowercase // Paper - default to null public void a(PacketPlayInSettings packetplayinsettings) { From b6925c36afa7565cac8f9fe9d3432fe658ca1f77 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 04:35:41 -0400 Subject: [PATCH 43/95] Remove no longer needed undead horse leash patch This is now default vanilla behavior Fixes #3644 --- ...63-Handle-Item-Meta-Inconsistencies.patch} | 0 .../0063-Undead-horse-leashing.patch | 52 ------------------- ...rable-Non-Player-Arrow-Despawn-Rate.patch} | 8 +-- ...atch => 0065-Add-World-Util-Methods.patch} | 0 ...-Custom-replacement-for-eaten-items.patch} | 0 ...h-absorb-values-and-repair-bad-data.patch} | 0 ...ch => 0068-Waving-banner-workaround.patch} | 0 ...69-Use-a-Shared-Random-for-Entities.patch} | 0 ...e-spawn-chances-for-skeleton-horses.patch} | 4 +- ...ocation-getType-and-getBlockData-fo.patch} | 0 ...kPhysicsEvent-if-a-plugin-has-a-lis.patch} | 0 ...ntity-AddTo-RemoveFrom-World-Events.patch} | 0 ...4-Configurable-Chunk-Inhabited-Time.patch} | 4 +- ...t.patch => 0075-EntityPathfindEvent.patch} | 0 ...gionFileCache-and-make-configurable.patch} | 0 ...-Do-not-load-chunks-for-Pathfinding.patch} | 0 ...078-Add-PlayerUseUnknownEntityEvent.patch} | 0 ...DebugInfo-not-initialized-on-client.patch} | 0 ...Configurable-Grass-Spread-Tick-Rate.patch} | 4 +- ...-BlockPlaceEvent-triggering-physics.patch} | 0 ...2-Remove-Debug-checks-from-DataBits.patch} | 0 ...illa-per-world-scoreboard-coloring-.patch} | 4 +- ...d-for-setting-passengers-on-players.patch} | 0 ...emove-unused-World-Tile-Entity-List.patch} | 0 ... 0086-Don-t-tick-Skulls-unused-code.patch} | 0 ... 0087-Configurable-Player-Collision.patch} | 0 ...nt-to-allow-plugins-to-handle-clien.patch} | 0 ...> 0089-Configurable-RCON-IP-address.patch} | 0 ...90-Prevent-Fire-from-loading-chunks.patch} | 0 ...1-Implement-PlayerLocaleChangeEvent.patch} | 0 ...tyRegainHealthEvent-isFastRegen-API.patch} | 0 ...to-configure-frosted_ice-properties.patch} | 4 +- ...possibility-for-getServer-singleton.patch} | 0 ...tem-frames-performance-and-bug-fixe.patch} | 0 ...API-Replenishable-Lootables-Feature.patch} | 4 +- ...-scoreboard-teams-to-scoreboard.dat.patch} | 0 ...em-property-for-disabling-watchdoge.patch} | 0 ...0099-Optimize-UserCache-Thread-Safe.patch} | 0 ...locking-on-Network-Manager-creation.patch} | 0 ...-Optional-TNT-doesn-t-move-in-water.patch} | 4 +- ...-redstone-torch-rapid-clock-removal.patch} | 0 ...h => 0103-Add-server-name-parameter.patch} | 0 ...n-Wither-Death-sounds-to-same-world.patch} | 0 ...=> 0105-Fix-Double-World-Add-issues.patch} | 0 ...tch => 0106-Fix-Old-Sign-Conversion.patch} | 0 ...-profiles-that-have-no-UUID-and-no-.patch} | 0 ...etting-for-proxy-online-mode-status.patch} | 0 ...timise-BlockState-s-hashCode-equals.patch} | 0 ...nfigurable-packet-in-spam-threshold.patch} | 0 ...1-Configurable-flying-kick-messages.patch} | 0 ...ch => 0112-Chunk-registration-fixes.patch} | 0 ...k-reference-on-Craft-Entity-removal.patch} | 0 ...to-fix-bad-Y-levels-on-player-login.patch} | 2 +- ...ion-to-remove-corrupt-tile-entities.patch} | 4 +- ...nt.patch => 0116-Add-EntityZapEvent.patch} | 0 ...-from-ArmorStand-and-SpawnEgg-items.patch} | 4 +- ...18-Cache-user-authenticator-threads.patch} | 0 ....patch => 0119-Optimise-removeQueue.patch} | 0 ...-Allow-Reloading-of-Command-Aliases.patch} | 0 ...-Add-source-to-PlayerExpChangeEvent.patch} | 0 ...-Don-t-let-fishinghooks-use-portals.patch} | 0 ... => 0123-Add-ProjectileCollideEvent.patch} | 0 ...ent-Pathfinding-out-of-World-Border.patch} | 0 ...mize-World.isLoaded-BlockPosition-Z.patch} | 0 ...Bound-Treasure-Maps-to-World-Border.patch} | 0 ...igurable-Cartographer-Treasure-Maps.patch} | 4 +- ... => 0128-Optimize-ItemStack.isEmpty.patch} | 0 ...o-control-if-armour-stands-can-move.patch} | 0 ...0-Properly-fix-item-duplication-bug.patch} | 0 ...=> 0131-String-based-Action-Bar-API.patch} | 0 ...-API-s.patch => 0132-Firework-API-s.patch} | 0 ... 0133-PlayerTeleportEndGatewayEvent.patch} | 0 ...ovide-E-TE-Chunk-count-stat-methods.patch} | 0 ...h => 0135-Enforce-Sync-Player-Saves.patch} | 0 ...low-entities-to-ride-themselves-572.patch} | 0 ...I-for-Reason-Source-Triggering-play.patch} | 0 ...patch => 0138-Cap-Entity-Collisions.patch} | 4 +- ...-CraftScheduler-Async-Task-Debugger.patch} | 0 ...ore-aggressive-in-the-chunk-unload-.patch} | 0 ...> 0141-Do-not-let-armorstands-drown.patch} | 0 ...e-async-calls-to-restart-the-server.patch} | 0 ...roperty-to-disable-book-size-limits.patch} | 0 ...e-parrots-stay-on-shoulders-despite.patch} | 4 +- ...-option-to-prevent-player-names-fro.patch} | 0 ...leAppender-for-console-improvements.patch} | 0 ...rable-option-to-disable-creeper-lin.patch} | 4 +- ....patch => 0148-Item-canEntityPickup.patch} | 2 +- ...layerPickupItemEvent-setFlyAtPlayer.patch} | 0 ...> 0150-PlayerAttemptPickupItemEvent.patch} | 0 ...tch => 0151-Add-UnknownCommandEvent.patch} | 0 ...tch => 0152-Basic-PlayerProfile-API.patch} | 0 ... 0153-Shoulder-Entities-Release-API.patch} | 0 ...patch => 0154-Profile-Lookup-Events.patch} | 0 ...layer-logins-during-server-shutdown.patch} | 0 ...patch => 0156-Entity-fromMobSpawner.patch} | 0 ...7-Improve-the-Saddle-API-for-Horses.patch} | 0 ...plement-ensureServerConversions-API.patch} | 0 ...> 0159-Implement-getI18NDisplayName.patch} | 0 ...=> 0160-ProfileWhitelistVerifyEvent.patch} | 0 ...ch => 0161-Fix-this-stupid-bullshit.patch} | 0 ...wns-should-honor-nametags-and-leash.patch} | 0 ...mer-when-spawner-event-is-cancelled.patch} | 0 ...4-Fix-MC-117075-TE-Unload-Lag-Spike.patch} | 0 ...a-custom-authentication-servers-dow.patch} | 0 ...atch => 0166-LivingEntity-setKiller.patch} | 0 ...ms-to-redirect-System.out-err-to-lo.patch} | 0 ...-prefixes-using-Log4J-configuration.patch} | 0 ...Include-Log4J2-SLF4J-implementation.patch} | 0 ...-Log4J-Configuration-Plugin-Loggers.patch} | 0 ...t.patch => 0171-Add-PlayerJumpEvent.patch} | 0 ...-handle-PacketPlayInKeepAlive-async.patch} | 0 ...t-protocol-version-and-virtual-host.patch} | 0 ...t-serverside-behavior-of-keepalives.patch} | 0 ...Effects-only-to-players-who-can-see.patch} | 0 ...maximum-exp-value-when-merging-orbs.patch} | 4 +- ... => 0177-Add-PlayerArmorChangeEvent.patch} | 0 ...om-being-processed-when-the-player-.patch} | 0 ...-implementations-for-captured-block.patch} | 0 ...get-a-BlockState-without-a-snapshot.patch} | 0 ...patch => 0181-AsyncTabCompleteEvent.patch} | 0 ...82-Avoid-NPE-in-PathfinderGoalTempt.patch} | 0 ...=> 0183-PlayerPickupExperienceEvent.patch} | 0 ...tch => 0184-ExperienceOrbMergeEvent.patch} | 0 ...-Ability-to-apply-mending-to-XP-API.patch} | 0 ...max-squid-spawn-height-configurable.patch} | 4 +- ...patch => 0187-PreCreatureSpawnEvent.patch} | 0 ...-PlayerNaturallySpawnCreaturesEvent.patch} | 2 +- ...Add-setPlayerProfile-API-for-Skulls.patch} | 0 ...> 0190-Fill-Profile-Property-Events.patch} | 0 ...layerAdvancementCriterionGrantEvent.patch} | 0 ...ch => 0192-Add-ArmorStand-Item-Meta.patch} | 0 ...Extend-Player-Interact-cancellation.patch} | 0 ... 0194-Tameable-getOwnerUniqueId-API.patch} | 0 ...-crits-helps-mitigate-hacked-client.patch} | 2 +- ...ing-location-from-InventoryEnderChe.patch} | 0 ...ted-Ice-from-loading-holding-chunks.patch} | 0 ...e-Explicit-Network-Manager-Flushing.patch} | 0 ...t-extended-PaperServerListPingEvent.patch} | 0 ... 0200-Improved-Async-Task-Scheduler.patch} | 0 ...-PlayerProfile-in-AsyncPreLoginEven.patch} | 0 ...=> 0202-Player.setPlayerProfile-API.patch} | 0 ...h => 0203-Fix-Dragon-Server-Crashes.patch} | 0 ...patch => 0204-getPlayerUniqueId-API.patch} | 0 ...ake-player-data-saving-configurable.patch} | 0 ...e-legacy-ping-handler-more-reliable.patch} | 0 ...erverListPingEvent-for-legacy-pings.patch} | 0 ...8-Flag-to-disable-the-channel-limit.patch} | 0 ...-method-to-open-already-placed-sign.patch} | 0 ...rable-sprint-interruption-on-attack.patch} | 4 +- ...allowed-colored-signs-to-be-created.patch} | 0 ...t.patch => 0212-EndermanEscapeEvent.patch} | 0 ...h => 0213-Enderman.teleportRandomly.patch} | 0 ...214-Block-Enderpearl-Travel-Exploit.patch} | 4 +- ...d.spawnParticle-API-and-add-Builder.patch} | 0 ...h => 0216-EndermanAttackPlayerEvent.patch} | 0 ...tch => 0217-WitchConsumePotionEvent.patch} | 0 ...patch => 0218-WitchThrowPotionEvent.patch} | 0 ...tem-entities-with-World.spawnEntity.patch} | 0 ...patch => 0220-WitchReadyPotionEvent.patch} | 0 ...221-ItemStack-getMaxItemUseDuration.patch} | 0 ...ement-EntityTeleportEndGatewayEvent.patch} | 0 ...d-flag-on-cancel-of-Explosion-Event.patch} | 0 ...ch => 0224-Fix-CraftEntity-hashCode.patch} | 0 ...e-Alternative-LootPool-Luck-Formula.patch} | 0 ...ls-when-failing-to-save-player-data.patch} | 0 ...-shield-blocking-delay-configurable.patch} | 4 +- ...nt-consumeArrow-and-getArrowItem-AP.patch} | 0 ...patch => 0229-PlayerReadyArrowEvent.patch} | 0 ...-EntityShootBowEvent-for-Illusioner.patch} | 0 ...lement-EntityKnockbackByEntityEvent.patch} | 2 +- ...patch => 0232-Expand-Explosions-API.patch} | 0 ...vingEntity-Hand-Raised-Item-Use-API.patch} | 0 ...-API.patch => 0234-RangedEntity-API.patch} | 0 ...o-disable-ender-dragon-legacy-check.patch} | 4 +- ...-Implement-World.getEntity-UUID-API.patch} | 0 ...0237-InventoryCloseEvent-Reason-API.patch} | 0 ...0238-Configurable-Bed-Search-Radius.patch} | 4 +- ...I.patch => 0239-Vex-getSummoner-API.patch} | 0 ...ventory-when-cancelling-PlayerInter.patch} | 0 ...e-the-Entity-Random-seed-for-squids.patch} | 0 ...illa-entity-warnings-for-duplicates.patch} | 0 ...-if-stack-size-above-max-stack-size.patch} | 0 ...44-Use-asynchronous-Log4j-2-loggers.patch} | 0 ...more-information-to-Entity.toString.patch} | 0 ...es-option-to-debug-dupe-uuid-issues.patch} | 0 ...ts.patch => 0247-EnderDragon-Events.patch} | 0 ...atch => 0248-PlayerElytraBoostEvent.patch} | 0 ...0249-Improve-BlockPosition-inlining.patch} | 0 ...patch => 0250-Optimize-RegistryID.c.patch} | 0 ...-armor-stands-from-doing-entity-loo.patch} | 4 +- ...-Vanished-players-don-t-have-rights.patch} | 0 ...anytime-entities-change-to-guarante.patch} | 0 ...d-some-Debug-to-Chunk-Entity-slices.patch} | 0 ...atch => 0255-EntityTransformedEvent.patch} | 2 +- ...tch => 0256-SkeletonHorse-Additions.patch} | 0 ...event-Saving-Bad-entities-to-chunks.patch} | 0 ...n-t-call-getItemMeta-on-hasItemMeta.patch} | 0 ...ad-Entities-in-entityList-iteration.patch} | 0 ...0-Implement-Expanded-ArmorStand-API.patch} | 0 ...vent.patch => 0261-AnvilDamageEvent.patch} | 0 ...ent.patch => 0262-Add-TNTPrimeEvent.patch} | 0 ...d-make-tab-spam-limits-configurable.patch} | 0 ...h => 0264-Add-hand-to-bucket-events.patch} | 0 ...-Experience-should-save-as-Integers.patch} | 0 ...ent-rendering-skulls-from-same-user.patch} | 0 ...d-Early-Warning-Feature-to-WatchDog.patch} | 0 ...0268-Make-EnderDragon-implement-Mob.patch} | 0 ...9-Use-ConcurrentHashMap-in-JsonList.patch} | 0 ...0-Use-a-Queue-for-Queueing-Commands.patch} | 0 ...le-Entities-from-a-chunk-without-sn.patch} | 0 ...llow-disabling-armour-stand-ticking.patch} | 4 +- ...timize-BlockPosition-helper-methods.patch} | 0 ...tore-vanlla-default-mob-spawn-range.patch} | 0 ...-124320.patch => 0275-Fix-MC-124320.patch} | 0 ...tch => 0276-Slime-Pathfinder-Events.patch} | 0 ...e-speed-for-water-flowing-over-lava.patch} | 4 +- ...78-Optimize-CraftBlockData-Creation.patch} | 0 ... => 0279-Optimize-RegistryMaterials.patch} | 0 ...ch => 0280-Add-PhantomPreSpawnEvent.patch} | 0 ....patch => 0281-Add-More-Creeper-API.patch} | 0 ...=> 0282-Inventory-removeItemAnySlot.patch} | 0 ...oadChunk-int-int-false-load-unconve.patch} | 0 ...ray-tracing-methods-to-LivingEntity.patch} | 0 ...-attack-cooldown-methods-for-Player.patch} | 0 ....patch => 0286-Improve-death-events.patch} | 2 +- ...w-chests-to-be-placed-with-NBT-data.patch} | 0 ...I.patch => 0288-Mob-Pathfinding-API.patch} | 0 ...nt-chunk-loading-from-Fluid-Flowing.patch} | 0 ...for-CanPlaceOn-and-CanDestroy-NBT-v.patch} | 0 ...nt-Mob-AI-Rules-from-Loading-Chunks.patch} | 0 ...ning-from-loading-generating-chunks.patch} | 0 ...-Biome-Mob-Lookups-for-Mob-Spawning.patch} | 0 ...t-furnace-cook-speed-multiplier-API.patch} | 0 ....patch => 0295-PreSpawnerSpawnEvent.patch} | 0 ...rseException-in-Entity-and-TE-names.patch} | 0 ...=> 0297-Honor-EntityAgeable.ageLock.patch} | 0 ...le-connection-throttle-kick-message.patch} | 0 ...> 0299-Hook-into-CB-plugin-rewrites.patch} | 0 ...00-Allow-setting-the-vex-s-summoner.patch} | 0 ...I.patch => 0301-Add-sun-related-API.patch} | 2 +- ...Turtle-API.patch => 0302-Turtle-API.patch} | 0 ...her-worlds-for-shooter-of-projectil.patch} | 0 ...ator-target-events-and-improve-impl.patch} | 0 ...-Add-Velocity-IP-Forwarding-Support.patch} | 0 ...PI.patch => 0306-Add-more-Witch-API.patch} | 0 ...wned-for-Villager-Aggression-Config.patch} | 0 ...-Johnny.patch => 0308-Here-s-Johnny.patch} | 0 ...vent-players-from-moving-into-unloa.patch} | 4 +- ...0-Reset-players-airTicks-on-respawn.patch} | 0 ...after-profile-lookups-if-not-needed.patch} | 0 ...r-Thread-Pool-and-Thread-Priorities.patch} | 0 ...=> 0313-Optimize-World-Time-Updates.patch} | 0 ...tore-custom-InventoryHolder-support.patch} | 0 ...=> 0315-Use-Vanilla-Minecart-Speeds.patch} | 0 ...0316-Fix-SpongeAbsortEvent-handling.patch} | 0 ...-allow-digging-into-unloaded-chunks.patch} | 0 ...mits.patch => 0318-Book-Size-Limits.patch} | 0 ...ult-permission-message-configurable.patch} | 0 ...revent-rayTrace-from-loading-chunks.patch} | 0 ...-Large-Packets-disconnecting-client.patch} | 0 ...ntity-dismount-during-teleportation.patch} | 0 ...I.patch => 0323-Add-more-Zombie-API.patch} | 2 +- ...0324-Add-PlayerConnectionCloseEvent.patch} | 0 ...revent-Enderman-from-loading-chunks.patch} | 0 ...replace-OfflinePlayer-getLastPlayed.patch} | 2 +- ...tch => 0327-Fix-PlayerEditBookEvent.patch} | 0 ...ehicle-tracking-issue-on-disconnect.patch} | 0 ...nRetractEvent-for-all-empty-pistons.patch} | 0 ...remove-from-being-called-on-Players.patch} | 0 ...ent.patch => 0331-BlockDestroyEvent.patch} | 0 ...m-Shapeless-Custom-Crafting-Recipes.patch} | 0 ...h => 0333-Fix-sign-edit-memory-leak.patch} | 0 ... 0334-Limit-Client-Sign-length-more.patch} | 0 ...onvertSigns-boolean-every-sign-save.patch} | 0 ...Manager-and-add-advanced-packet-sup.patch} | 0 ...e-Oversized-Tile-Entities-in-chunks.patch} | 0 ...-Fix-Whitelist-On-Off-inconsistency.patch} | 0 ...t-tick-at-start-of-drowning-process.patch} | 0 ...40-Allow-Saving-of-Oversized-Chunks.patch} | 0 ...ggleEvent-when-whitelist-is-toggled.patch} | 0 ...42-Add-LivingEntity-getTargetEntity.patch} | 0 ...ngth-when-serialising-BungeeCord-te.patch} | 0 ...=> 0344-Entity-getEntitySpawnReason.patch} | 0 ...ty-Metadata-for-all-tracked-players.patch} | 0 ...46-Implement-PlayerPostRespawnEvent.patch} | 0 ...for-pickupDelay-breaks-picking-up-i.patch} | 0 ...-and-setters-for-EntityItem-owner-a.patch} | 0 ...ts.patch => 0349-Server-Tick-Events.patch} | 0 ...350-PlayerDeathEvent-getItemsToKeep.patch} | 2 +- ...Optimize-Captured-TileEntity-Lookup.patch} | 0 ...API.patch => 0352-Add-Heightmap-API.patch} | 0 ...> 0353-Mob-Spawner-API-Enhancements.patch} | 0 ...ayer-View-Distance-API-placeholders.patch} | 0 ...-to-changed-postToMainThread-method.patch} | 0 ...-item-frames-are-modified-MC-123450.patch} | 0 ...sPrimaryThread-and-MinecraftServer-.patch} | 0 ...-entity-loss-due-to-unloaded-chunks.patch} | 0 ... 0359-Duplicate-UUID-Resolve-Option.patch} | 4 +- ...60-improve-CraftWorld-isChunkLoaded.patch} | 0 ...e-Keep-Spawn-Loaded-range-per-world.patch} | 4 +- ...ityAreaEffectCloud-from-going-negat.patch} | 0 ....patch => 0363-ChunkMapDistance-CME.patch} | 0 ...0364-Implement-CraftBlockSoundGroup.patch} | 0 ...d.patch => 0365-Chunk-debug-command.patch} | 0 ...ptions-from-dispenser-entity-spawns.patch} | 0 ...67-Fix-World-isChunkGenerated-calls.patch} | 0 ...te-location-if-we-failed-to-read-it.patch} | 0 ...aletteBlock-instead-of-ReentrantLoc.patch} | 0 ...ch => 0370-incremental-chunk-saving.patch} | 4 +- ...2-Anti-Xray.patch => 0371-Anti-Xray.patch} | 4 +- ...l-Spawned-mobs-towards-natural-spaw.patch} | 4 +- ...urable-projectile-relative-velocity.patch} | 4 +- ...being-ticked-when-notifying-navigat.patch} | 0 ...h => 0375-offset-item-frame-ticking.patch} | 0 ...pper-searches-if-there-are-no-items.patch} | 0 ...7-Asynchronous-chunk-IO-and-loading.patch} | 0 ...tChunkIfLoadedImmediately-in-places.patch} | 0 ...ads.patch => 0379-Reduce-sync-loads.patch} | 0 ...ement-alternative-item-despawn-rate.patch} | 4 +- ...f-we-have-a-custom-Bukkit-generator.patch} | 0 ...-158900.patch => 0382-Fix-MC-158900.patch} | 0 ...ment-optional-per-player-mob-spawns.patch} | 4 +- ...event-consuming-the-wrong-itemstack.patch} | 0 ...ssanger-entities-once-from-spawners.patch} | 0 ... => 0386-Fix-nether-portal-creation.patch} | 0 ...gs.patch => 0387-Generator-Settings.patch} | 4 +- ...-161754.patch => 0388-Fix-MC-161754.patch} | 0 ...e-improvement-for-Chunk.getEntities.patch} | 0 ...anging-entities-that-are-not-ItemFr.patch} | 0 ...91-Expose-the-internal-current-tick.patch} | 0 ...sneak-when-changing-worlds-MC-10657.patch} | 0 ...-option-to-disable-pillager-patrols.patch} | 4 +- ...r-when-player-hand-set-to-empty-typ.patch} | 0 ...=> 0395-PlayerLaunchProjectileEvent.patch} | 0 ...tMagicNumbers.isSupportedApiVersion.patch} | 0 ...k-loads-when-villagers-try-to-find-.patch} | 0 ...656-Fix-Follow-Range-Initial-Target.patch} | 4 +- ...pers.patch => 0399-Optimize-Hoppers.patch} | 4 +- ...ayerDeathEvent-shouldDropExperience.patch} | 2 +- ...ading-chunks-checking-hive-position.patch} | 0 ...hunks-from-Hoppers-and-other-things.patch} | 0 ...ializing-mismatching-chunk-coordina.patch} | 0 ...imise-IEntityAccess-getPlayerByUUID.patch} | 0 ...405-Fix-items-not-falling-correctly.patch} | 0 ...patch => 0406-Lag-compensate-eating.patch} | 0 ...ize-call-to-getFluid-for-explosions.patch} | 0 ...-in-stack-not-having-effects-when-d.patch} | 0 ...=> 0409-Entity-Activation-Range-2.0.patch} | 2 +- ...Add-effect-to-block-break-naturally.patch} | 0 ...=> 0411-Tracking-Range-Improvements.patch} | 0 ...-items-vanishing-through-end-portal.patch} | 0 ...et-gravity-in-void.-Fixes-MC-167279.patch} | 0 ...-getChunkAt-calls-for-loaded-chunks.patch} | 0 ...w-overriding-the-java-version-check.patch} | 0 ...tch => 0416-Add-ThrownEggHatchEvent.patch} | 0 ... 0417-Optimise-random-block-ticking.patch} | 0 ...p-API.patch => 0418-Entity-Jump-API.patch} | 0 ...-to-nerf-pigmen-from-nether-portals.patch} | 4 +- ... => 0420-Make-the-GUI-graph-fancier.patch} | 0 ...21-add-hand-to-BlockMultiPlaceEvent.patch} | 0 ...2-Prevent-teleporting-dead-entities.patch} | 0 ...ipwire-hook-placement-before-update.patch} | 0 ...o-allow-iron-golems-to-spawn-in-air.patch} | 4 +- ...chance-of-villager-zombie-infection.patch} | 4 +- ...tch => 0426-Optimise-Chunk-getFluid.patch} | 0 ...mise-TickListServer-by-rewriting-it.patch} | 0 ...pawn-settings-and-per-player-option.patch} | 6 +-- ...e-Entity-is-never-double-registered.patch} | 0 ...ring-entities-from-unloading-chunks.patch} | 0 ...nections-shouldn-t-hold-up-shutdown.patch} | 0 ...ow-bees-to-load-chunks-for-beehives.patch} | 0 ...PlayerChunkMap-adds-crashing-server.patch} | 0 ...timize-Collision-to-not-load-chunks.patch} | 0 ...tch => 0435-Don-t-tick-dead-players.patch} | 2 +- ...-Player-s-shouldn-t-be-able-to-move.patch} | 0 ...unkMap-memory-use-for-visibleChunks.patch} | 0 ...h => 0438-Increase-Light-Queue-Size.patch} | 4 +- ...sks-Speed-up-processing-of-chunk-lo.patch} | 0 ...ove-existing-players-to-world-spawn.patch} | 2 +- ...Add-tick-times-API-and-mspt-command.patch} | 0 ...42-Expose-MinecraftServer-isRunning.patch} | 0 ...dd-Raw-Byte-ItemStack-Serialization.patch} | 0 ...4-Remove-streams-from-Mob-AI-System.patch} | 0 ...ons-until-after-entity-ticking-is-d.patch} | 0 ... => 0446-Async-command-map-building.patch} | 0 ...h => 0447-Improved-Watchdog-Support.patch} | 0 ....patch => 0448-Optimize-Pathfinding.patch} | 0 ...9-Reduce-Either-Optional-allocation.patch} | 0 ...450-Remove-streams-from-PairedQueue.patch} | 0 ...-memory-footprint-of-NBTTagCompound.patch} | 0 ...ent-opening-inventories-when-frozen.patch} | 0 ...53-Optimise-ArraySetSorted-removeIf.patch} | 0 ...entity-collision-code-if-not-needed.patch} | 0 ...mise-entity-hard-collision-checking.patch} | 0 ...viderServer-s-chunk-level-checking-.patch} | 0 ...teleport-command-to-valid-locations.patch} | 0 ...Implement-Player-Client-Options-API.patch} | 0 ...Chunk-Post-Processing-deadlock-risk.patch} | 0 ...ayer-is-attempted-to-be-removed-fro.patch} | 0 ...1-Broadcast-join-message-to-console.patch} | 0 ...-Broken-behavior-of-PlayerJoinEvent.patch} | 2 +- ...oad-Chunks-for-Login-Asynchronously.patch} | 2 +- ...awn-point-if-spawn-in-unloaded-worl.patch} | 0 ...layerAttackEntityCooldownResetEvent.patch} | 0 ...llbacks-to-schedule-for-Callback-Ex.patch} | 0 ...-fire-BlockFade-on-worldgen-threads.patch} | 0 ...tom-creative-and-insomniac-controls.patch} | 4 +- ...-duplication-issues-and-teleport-is.patch} | 0 ...0470-Implement-Brigadier-Mojang-API.patch} | 0 ...patch => 0471-Villager-Restocks-API.patch} | 0 ...ickItem-Packet-and-kick-for-invalid.patch} | 0 ...n.patch => 0473-Expose-game-version.patch} | 0 ...0474-Sync-position-on-teleportation.patch} | 0 ...> 0475-Optimize-Voxel-Shape-Merging.patch} | 0 ...per-thread-native-byte-buffer-cache.patch} | 2 +- ...atch => 0477-Implement-Mob-Goal-API.patch} | 0 ...ance-map-to-optimise-entity-tracker.patch} | 0 ...isOutsideRange-to-use-distance-maps.patch} | 2 +- ...e-operations-for-updating-light-dat.patch} | 0 ...o-Tick-view-distance-implementation.patch} | 6 +-- ...=> 0482-Add-villager-reputation-API.patch} | 0 ...and.patch => 0483-Fix-Light-Command.patch} | 0 ...-Fix-PotionEffect-ignores-icon-flag.patch} | 0 ...brigadier-child-sorting-performance.patch} | 0 ...ock-unless-actually-showing-the-mes.patch} | 0 ...API.patch => 0487-Potential-bed-API.patch} | 0 ...ait-for-Async-Tasks-during-shutdown.patch} | 0 ...er-respects-game-and-entity-rules-f.patch} | 0 ...nd-End-Portal-Frames-from-being-des.patch} | 0 ...e-NibbleArray-to-use-pooled-buffers.patch} | 0 ...leInt-allocations-from-light-engine.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 0 ...> 0494-Ensure-safe-gateway-teleport.patch} | 0 ...-for-console-having-all-permissions.patch} | 0 ...und-for-Client-Lag-Spikes-MC-162253.patch} | 0 ...-Priority-Urgency-System-for-Chunks.patch} | 2 +- ...n-Full-Status-Chunk-NBT-Memory-Leak.patch} | 0 ...packets-to-nearby-locations-sounds-.patch} | 2 +- ...prove-Chunk-Status-Transition-Speed.patch} | 0 ...x-villager-trading-demand-MC-163962.patch} | 0 ... => 0502-Maps-shouldn-t-load-chunks.patch} | 0 ...okup-for-Treasure-Maps-Fixes-lag-fr.patch} | 0 ...Optimize-Bit-Operations-by-inlining.patch} | 0 ...patch => 0505-Optimize-Light-Engine.patch} | 0 ...nk-Unloads-based-on-Player-Movement.patch} | 4 +- ...Plugin-Tickets-to-API-Chunk-Methods.patch} | 0 ...sing-chunks-due-to-integer-overflow.patch} | 0 ...r-runTaskTimerAsynchronously-Plugin.patch} | 0 ...ton-physics-inconsistency-MC-188840.patch} | 0 ...uping.patch => 0511-Fix-sand-duping.patch} | 0 ...desync-in-playerconnection-causing-.patch} | 0 ...ch => 0513-Fix-enderdragon-exp-dupe.patch} | 0 ...older-method-without-block-snapshot.patch} | 0 ...h => 0515-Expose-Arrow-getItemStack.patch} | 0 ...mplement-PlayerRecipeBookClickEvent.patch} | 0 ... => 0517-Add-PrepareGrindstoneEvent.patch} | 0 ...-Hide-sync-chunk-writes-behind-flag.patch} | 0 ...it-lightning-strike-effect-distance.patch} | 4 +- ...0-Add-permission-for-command-blocks.patch} | 0 ...ure-Entity-AABB-s-are-never-invalid.patch} | 0 ...orldBorder-collision-checks-and-air.patch} | 0 ...d-Difficulty-Remembering-Difficulty.patch} | 0 462 files changed, 117 insertions(+), 169 deletions(-) rename Spigot-Server-Patches/{0064-Handle-Item-Meta-Inconsistencies.patch => 0063-Handle-Item-Meta-Inconsistencies.patch} (100%) delete mode 100644 Spigot-Server-Patches/0063-Undead-horse-leashing.patch rename Spigot-Server-Patches/{0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch => 0064-Configurable-Non-Player-Arrow-Despawn-Rate.patch} (88%) rename Spigot-Server-Patches/{0066-Add-World-Util-Methods.patch => 0065-Add-World-Util-Methods.patch} (100%) rename Spigot-Server-Patches/{0067-Custom-replacement-for-eaten-items.patch => 0066-Custom-replacement-for-eaten-items.patch} (100%) rename Spigot-Server-Patches/{0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch => 0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch} (100%) rename Spigot-Server-Patches/{0069-Waving-banner-workaround.patch => 0068-Waving-banner-workaround.patch} (100%) rename Spigot-Server-Patches/{0070-Use-a-Shared-Random-for-Entities.patch => 0069-Use-a-Shared-Random-for-Entities.patch} (100%) rename Spigot-Server-Patches/{0071-Configurable-spawn-chances-for-skeleton-horses.patch => 0070-Configurable-spawn-chances-for-skeleton-horses.patch} (93%) rename Spigot-Server-Patches/{0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch => 0071-Optimize-isValidLocation-getType-and-getBlockData-fo.patch} (100%) rename Spigot-Server-Patches/{0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch => 0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch} (100%) rename Spigot-Server-Patches/{0074-Entity-AddTo-RemoveFrom-World-Events.patch => 0073-Entity-AddTo-RemoveFrom-World-Events.patch} (100%) rename Spigot-Server-Patches/{0075-Configurable-Chunk-Inhabited-Time.patch => 0074-Configurable-Chunk-Inhabited-Time.patch} (93%) rename Spigot-Server-Patches/{0076-EntityPathfindEvent.patch => 0075-EntityPathfindEvent.patch} (100%) rename Spigot-Server-Patches/{0077-Sanitise-RegionFileCache-and-make-configurable.patch => 0076-Sanitise-RegionFileCache-and-make-configurable.patch} (100%) rename Spigot-Server-Patches/{0078-Do-not-load-chunks-for-Pathfinding.patch => 0077-Do-not-load-chunks-for-Pathfinding.patch} (100%) rename Spigot-Server-Patches/{0079-Add-PlayerUseUnknownEntityEvent.patch => 0078-Add-PlayerUseUnknownEntityEvent.patch} (100%) rename Spigot-Server-Patches/{0080-Fix-reducedDebugInfo-not-initialized-on-client.patch => 0079-Fix-reducedDebugInfo-not-initialized-on-client.patch} (100%) rename Spigot-Server-Patches/{0081-Configurable-Grass-Spread-Tick-Rate.patch => 0080-Configurable-Grass-Spread-Tick-Rate.patch} (92%) rename Spigot-Server-Patches/{0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch => 0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch} (100%) rename Spigot-Server-Patches/{0083-Remove-Debug-checks-from-DataBits.patch => 0082-Remove-Debug-checks-from-DataBits.patch} (100%) rename Spigot-Server-Patches/{0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch => 0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch} (95%) rename Spigot-Server-Patches/{0085-Workaround-for-setting-passengers-on-players.patch => 0084-Workaround-for-setting-passengers-on-players.patch} (100%) rename Spigot-Server-Patches/{0086-Remove-unused-World-Tile-Entity-List.patch => 0085-Remove-unused-World-Tile-Entity-List.patch} (100%) rename Spigot-Server-Patches/{0087-Don-t-tick-Skulls-unused-code.patch => 0086-Don-t-tick-Skulls-unused-code.patch} (100%) rename Spigot-Server-Patches/{0088-Configurable-Player-Collision.patch => 0087-Configurable-Player-Collision.patch} (100%) rename Spigot-Server-Patches/{0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch => 0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch} (100%) rename Spigot-Server-Patches/{0090-Configurable-RCON-IP-address.patch => 0089-Configurable-RCON-IP-address.patch} (100%) rename Spigot-Server-Patches/{0091-Prevent-Fire-from-loading-chunks.patch => 0090-Prevent-Fire-from-loading-chunks.patch} (100%) rename Spigot-Server-Patches/{0092-Implement-PlayerLocaleChangeEvent.patch => 0091-Implement-PlayerLocaleChangeEvent.patch} (100%) rename Spigot-Server-Patches/{0093-EntityRegainHealthEvent-isFastRegen-API.patch => 0092-EntityRegainHealthEvent-isFastRegen-API.patch} (100%) rename Spigot-Server-Patches/{0094-Add-ability-to-configure-frosted_ice-properties.patch => 0093-Add-ability-to-configure-frosted_ice-properties.patch} (95%) rename Spigot-Server-Patches/{0095-remove-null-possibility-for-getServer-singleton.patch => 0094-remove-null-possibility-for-getServer-singleton.patch} (100%) rename Spigot-Server-Patches/{0096-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch => 0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch} (100%) rename Spigot-Server-Patches/{0097-LootTable-API-Replenishable-Lootables-Feature.patch => 0096-LootTable-API-Replenishable-Lootables-Feature.patch} (99%) rename Spigot-Server-Patches/{0098-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch => 0097-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch} (100%) rename Spigot-Server-Patches/{0099-System-property-for-disabling-watchdoge.patch => 0098-System-property-for-disabling-watchdoge.patch} (100%) rename Spigot-Server-Patches/{0100-Optimize-UserCache-Thread-Safe.patch => 0099-Optimize-UserCache-Thread-Safe.patch} (100%) rename Spigot-Server-Patches/{0101-Avoid-blocking-on-Network-Manager-creation.patch => 0100-Avoid-blocking-on-Network-Manager-creation.patch} (100%) rename Spigot-Server-Patches/{0102-Optional-TNT-doesn-t-move-in-water.patch => 0101-Optional-TNT-doesn-t-move-in-water.patch} (96%) rename Spigot-Server-Patches/{0103-Faster-redstone-torch-rapid-clock-removal.patch => 0102-Faster-redstone-torch-rapid-clock-removal.patch} (100%) rename Spigot-Server-Patches/{0104-Add-server-name-parameter.patch => 0103-Add-server-name-parameter.patch} (100%) rename Spigot-Server-Patches/{0105-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch => 0104-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch} (100%) rename Spigot-Server-Patches/{0106-Fix-Double-World-Add-issues.patch => 0105-Fix-Double-World-Add-issues.patch} (100%) rename Spigot-Server-Patches/{0107-Fix-Old-Sign-Conversion.patch => 0106-Fix-Old-Sign-Conversion.patch} (100%) rename Spigot-Server-Patches/{0108-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch => 0107-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch} (100%) rename Spigot-Server-Patches/{0109-Add-setting-for-proxy-online-mode-status.patch => 0108-Add-setting-for-proxy-online-mode-status.patch} (100%) rename Spigot-Server-Patches/{0110-Optimise-BlockState-s-hashCode-equals.patch => 0109-Optimise-BlockState-s-hashCode-equals.patch} (100%) rename Spigot-Server-Patches/{0111-Configurable-packet-in-spam-threshold.patch => 0110-Configurable-packet-in-spam-threshold.patch} (100%) rename Spigot-Server-Patches/{0112-Configurable-flying-kick-messages.patch => 0111-Configurable-flying-kick-messages.patch} (100%) rename Spigot-Server-Patches/{0113-Chunk-registration-fixes.patch => 0112-Chunk-registration-fixes.patch} (100%) rename Spigot-Server-Patches/{0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch => 0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch} (100%) rename Spigot-Server-Patches/{0115-Auto-fix-bad-Y-levels-on-player-login.patch => 0114-Auto-fix-bad-Y-levels-on-player-login.patch} (91%) rename Spigot-Server-Patches/{0116-Option-to-remove-corrupt-tile-entities.patch => 0115-Option-to-remove-corrupt-tile-entities.patch} (92%) rename Spigot-Server-Patches/{0117-Add-EntityZapEvent.patch => 0116-Add-EntityZapEvent.patch} (100%) rename Spigot-Server-Patches/{0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch => 0117-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch} (94%) rename Spigot-Server-Patches/{0119-Cache-user-authenticator-threads.patch => 0118-Cache-user-authenticator-threads.patch} (100%) rename Spigot-Server-Patches/{0120-Optimise-removeQueue.patch => 0119-Optimise-removeQueue.patch} (100%) rename Spigot-Server-Patches/{0121-Allow-Reloading-of-Command-Aliases.patch => 0120-Allow-Reloading-of-Command-Aliases.patch} (100%) rename Spigot-Server-Patches/{0122-Add-source-to-PlayerExpChangeEvent.patch => 0121-Add-source-to-PlayerExpChangeEvent.patch} (100%) rename Spigot-Server-Patches/{0123-Don-t-let-fishinghooks-use-portals.patch => 0122-Don-t-let-fishinghooks-use-portals.patch} (100%) rename Spigot-Server-Patches/{0124-Add-ProjectileCollideEvent.patch => 0123-Add-ProjectileCollideEvent.patch} (100%) rename Spigot-Server-Patches/{0125-Prevent-Pathfinding-out-of-World-Border.patch => 0124-Prevent-Pathfinding-out-of-World-Border.patch} (100%) rename Spigot-Server-Patches/{0126-Optimize-World.isLoaded-BlockPosition-Z.patch => 0125-Optimize-World.isLoaded-BlockPosition-Z.patch} (100%) rename Spigot-Server-Patches/{0127-Bound-Treasure-Maps-to-World-Border.patch => 0126-Bound-Treasure-Maps-to-World-Border.patch} (100%) rename Spigot-Server-Patches/{0128-Configurable-Cartographer-Treasure-Maps.patch => 0127-Configurable-Cartographer-Treasure-Maps.patch} (95%) rename Spigot-Server-Patches/{0129-Optimize-ItemStack.isEmpty.patch => 0128-Optimize-ItemStack.isEmpty.patch} (100%) rename Spigot-Server-Patches/{0130-Add-API-methods-to-control-if-armour-stands-can-move.patch => 0129-Add-API-methods-to-control-if-armour-stands-can-move.patch} (100%) rename Spigot-Server-Patches/{0131-Properly-fix-item-duplication-bug.patch => 0130-Properly-fix-item-duplication-bug.patch} (100%) rename Spigot-Server-Patches/{0132-String-based-Action-Bar-API.patch => 0131-String-based-Action-Bar-API.patch} (100%) rename Spigot-Server-Patches/{0133-Firework-API-s.patch => 0132-Firework-API-s.patch} (100%) rename Spigot-Server-Patches/{0134-PlayerTeleportEndGatewayEvent.patch => 0133-PlayerTeleportEndGatewayEvent.patch} (100%) rename Spigot-Server-Patches/{0135-Provide-E-TE-Chunk-count-stat-methods.patch => 0134-Provide-E-TE-Chunk-count-stat-methods.patch} (100%) rename Spigot-Server-Patches/{0136-Enforce-Sync-Player-Saves.patch => 0135-Enforce-Sync-Player-Saves.patch} (100%) rename Spigot-Server-Patches/{0137-Don-t-allow-entities-to-ride-themselves-572.patch => 0136-Don-t-allow-entities-to-ride-themselves-572.patch} (100%) rename Spigot-Server-Patches/{0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch => 0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch} (100%) rename Spigot-Server-Patches/{0139-Cap-Entity-Collisions.patch => 0138-Cap-Entity-Collisions.patch} (95%) rename Spigot-Server-Patches/{0140-Remove-CraftScheduler-Async-Task-Debugger.patch => 0139-Remove-CraftScheduler-Async-Task-Debugger.patch} (100%) rename Spigot-Server-Patches/{0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch => 0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch} (100%) rename Spigot-Server-Patches/{0142-Do-not-let-armorstands-drown.patch => 0141-Do-not-let-armorstands-drown.patch} (100%) rename Spigot-Server-Patches/{0143-Properly-handle-async-calls-to-restart-the-server.patch => 0142-Properly-handle-async-calls-to-restart-the-server.patch} (100%) rename Spigot-Server-Patches/{0144-Add-system-property-to-disable-book-size-limits.patch => 0143-Add-system-property-to-disable-book-size-limits.patch} (100%) rename Spigot-Server-Patches/{0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch => 0144-Add-option-to-make-parrots-stay-on-shoulders-despite.patch} (95%) rename Spigot-Server-Patches/{0146-Add-configuration-option-to-prevent-player-names-fro.patch => 0145-Add-configuration-option-to-prevent-player-names-fro.patch} (100%) rename Spigot-Server-Patches/{0147-Use-TerminalConsoleAppender-for-console-improvements.patch => 0146-Use-TerminalConsoleAppender-for-console-improvements.patch} (100%) rename Spigot-Server-Patches/{0148-provide-a-configurable-option-to-disable-creeper-lin.patch => 0147-provide-a-configurable-option-to-disable-creeper-lin.patch} (92%) rename Spigot-Server-Patches/{0149-Item-canEntityPickup.patch => 0148-Item-canEntityPickup.patch} (96%) rename Spigot-Server-Patches/{0150-PlayerPickupItemEvent-setFlyAtPlayer.patch => 0149-PlayerPickupItemEvent-setFlyAtPlayer.patch} (100%) rename Spigot-Server-Patches/{0151-PlayerAttemptPickupItemEvent.patch => 0150-PlayerAttemptPickupItemEvent.patch} (100%) rename Spigot-Server-Patches/{0152-Add-UnknownCommandEvent.patch => 0151-Add-UnknownCommandEvent.patch} (100%) rename Spigot-Server-Patches/{0153-Basic-PlayerProfile-API.patch => 0152-Basic-PlayerProfile-API.patch} (100%) rename Spigot-Server-Patches/{0154-Shoulder-Entities-Release-API.patch => 0153-Shoulder-Entities-Release-API.patch} (100%) rename Spigot-Server-Patches/{0155-Profile-Lookup-Events.patch => 0154-Profile-Lookup-Events.patch} (100%) rename Spigot-Server-Patches/{0156-Block-player-logins-during-server-shutdown.patch => 0155-Block-player-logins-during-server-shutdown.patch} (100%) rename Spigot-Server-Patches/{0157-Entity-fromMobSpawner.patch => 0156-Entity-fromMobSpawner.patch} (100%) rename Spigot-Server-Patches/{0158-Improve-the-Saddle-API-for-Horses.patch => 0157-Improve-the-Saddle-API-for-Horses.patch} (100%) rename Spigot-Server-Patches/{0159-Implement-ensureServerConversions-API.patch => 0158-Implement-ensureServerConversions-API.patch} (100%) rename Spigot-Server-Patches/{0160-Implement-getI18NDisplayName.patch => 0159-Implement-getI18NDisplayName.patch} (100%) rename Spigot-Server-Patches/{0161-ProfileWhitelistVerifyEvent.patch => 0160-ProfileWhitelistVerifyEvent.patch} (100%) rename Spigot-Server-Patches/{0162-Fix-this-stupid-bullshit.patch => 0161-Fix-this-stupid-bullshit.patch} (100%) rename Spigot-Server-Patches/{0163-Ocelot-despawns-should-honor-nametags-and-leash.patch => 0162-Ocelot-despawns-should-honor-nametags-and-leash.patch} (100%) rename Spigot-Server-Patches/{0164-Reset-spawner-timer-when-spawner-event-is-cancelled.patch => 0163-Reset-spawner-timer-when-spawner-event-is-cancelled.patch} (100%) rename Spigot-Server-Patches/{0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch => 0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch} (100%) rename Spigot-Server-Patches/{0166-Allow-specifying-a-custom-authentication-servers-dow.patch => 0165-Allow-specifying-a-custom-authentication-servers-dow.patch} (100%) rename Spigot-Server-Patches/{0167-LivingEntity-setKiller.patch => 0166-LivingEntity-setKiller.patch} (100%) rename Spigot-Server-Patches/{0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch => 0167-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch} (100%) rename Spigot-Server-Patches/{0169-Handle-plugin-prefixes-using-Log4J-configuration.patch => 0168-Handle-plugin-prefixes-using-Log4J-configuration.patch} (100%) rename Spigot-Server-Patches/{0170-Include-Log4J2-SLF4J-implementation.patch => 0169-Include-Log4J2-SLF4J-implementation.patch} (100%) rename Spigot-Server-Patches/{0171-Improve-Log4J-Configuration-Plugin-Loggers.patch => 0170-Improve-Log4J-Configuration-Plugin-Loggers.patch} (100%) rename Spigot-Server-Patches/{0172-Add-PlayerJumpEvent.patch => 0171-Add-PlayerJumpEvent.patch} (100%) rename Spigot-Server-Patches/{0173-handle-PacketPlayInKeepAlive-async.patch => 0172-handle-PacketPlayInKeepAlive-async.patch} (100%) rename Spigot-Server-Patches/{0174-Expose-client-protocol-version-and-virtual-host.patch => 0173-Expose-client-protocol-version-and-virtual-host.patch} (100%) rename Spigot-Server-Patches/{0175-revert-serverside-behavior-of-keepalives.patch => 0174-revert-serverside-behavior-of-keepalives.patch} (100%) rename Spigot-Server-Patches/{0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch => 0175-Send-attack-SoundEffects-only-to-players-who-can-see.patch} (100%) rename Spigot-Server-Patches/{0177-Option-for-maximum-exp-value-when-merging-orbs.patch => 0176-Option-for-maximum-exp-value-when-merging-orbs.patch} (95%) rename Spigot-Server-Patches/{0178-Add-PlayerArmorChangeEvent.patch => 0177-Add-PlayerArmorChangeEvent.patch} (100%) rename Spigot-Server-Patches/{0179-Prevent-logins-from-being-processed-when-the-player-.patch => 0178-Prevent-logins-from-being-processed-when-the-player-.patch} (100%) rename Spigot-Server-Patches/{0180-use-CB-BlockState-implementations-for-captured-block.patch => 0179-use-CB-BlockState-implementations-for-captured-block.patch} (100%) rename Spigot-Server-Patches/{0181-API-to-get-a-BlockState-without-a-snapshot.patch => 0180-API-to-get-a-BlockState-without-a-snapshot.patch} (100%) rename Spigot-Server-Patches/{0182-AsyncTabCompleteEvent.patch => 0181-AsyncTabCompleteEvent.patch} (100%) rename Spigot-Server-Patches/{0183-Avoid-NPE-in-PathfinderGoalTempt.patch => 0182-Avoid-NPE-in-PathfinderGoalTempt.patch} (100%) rename Spigot-Server-Patches/{0184-PlayerPickupExperienceEvent.patch => 0183-PlayerPickupExperienceEvent.patch} (100%) rename Spigot-Server-Patches/{0185-ExperienceOrbMergeEvent.patch => 0184-ExperienceOrbMergeEvent.patch} (100%) rename Spigot-Server-Patches/{0186-Ability-to-apply-mending-to-XP-API.patch => 0185-Ability-to-apply-mending-to-XP-API.patch} (100%) rename Spigot-Server-Patches/{0187-Make-max-squid-spawn-height-configurable.patch => 0186-Make-max-squid-spawn-height-configurable.patch} (93%) rename Spigot-Server-Patches/{0188-PreCreatureSpawnEvent.patch => 0187-PreCreatureSpawnEvent.patch} (100%) rename Spigot-Server-Patches/{0189-PlayerNaturallySpawnCreaturesEvent.patch => 0188-PlayerNaturallySpawnCreaturesEvent.patch} (97%) rename Spigot-Server-Patches/{0190-Add-setPlayerProfile-API-for-Skulls.patch => 0189-Add-setPlayerProfile-API-for-Skulls.patch} (100%) rename Spigot-Server-Patches/{0191-Fill-Profile-Property-Events.patch => 0190-Fill-Profile-Property-Events.patch} (100%) rename Spigot-Server-Patches/{0192-PlayerAdvancementCriterionGrantEvent.patch => 0191-PlayerAdvancementCriterionGrantEvent.patch} (100%) rename Spigot-Server-Patches/{0193-Add-ArmorStand-Item-Meta.patch => 0192-Add-ArmorStand-Item-Meta.patch} (100%) rename Spigot-Server-Patches/{0194-Extend-Player-Interact-cancellation.patch => 0193-Extend-Player-Interact-cancellation.patch} (100%) rename Spigot-Server-Patches/{0195-Tameable-getOwnerUniqueId-API.patch => 0194-Tameable-getOwnerUniqueId-API.patch} (100%) rename Spigot-Server-Patches/{0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch => 0195-Toggleable-player-crits-helps-mitigate-hacked-client.patch} (95%) rename Spigot-Server-Patches/{0197-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch => 0196-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch} (100%) rename Spigot-Server-Patches/{0198-Prevent-Frosted-Ice-from-loading-holding-chunks.patch => 0197-Prevent-Frosted-Ice-from-loading-holding-chunks.patch} (100%) rename Spigot-Server-Patches/{0199-Disable-Explicit-Network-Manager-Flushing.patch => 0198-Disable-Explicit-Network-Manager-Flushing.patch} (100%) rename Spigot-Server-Patches/{0200-Implement-extended-PaperServerListPingEvent.patch => 0199-Implement-extended-PaperServerListPingEvent.patch} (100%) rename Spigot-Server-Patches/{0201-Improved-Async-Task-Scheduler.patch => 0200-Improved-Async-Task-Scheduler.patch} (100%) rename Spigot-Server-Patches/{0202-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch => 0201-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch} (100%) rename Spigot-Server-Patches/{0203-Player.setPlayerProfile-API.patch => 0202-Player.setPlayerProfile-API.patch} (100%) rename Spigot-Server-Patches/{0204-Fix-Dragon-Server-Crashes.patch => 0203-Fix-Dragon-Server-Crashes.patch} (100%) rename Spigot-Server-Patches/{0205-getPlayerUniqueId-API.patch => 0204-getPlayerUniqueId-API.patch} (100%) rename Spigot-Server-Patches/{0206-Make-player-data-saving-configurable.patch => 0205-Make-player-data-saving-configurable.patch} (100%) rename Spigot-Server-Patches/{0207-Make-legacy-ping-handler-more-reliable.patch => 0206-Make-legacy-ping-handler-more-reliable.patch} (100%) rename Spigot-Server-Patches/{0208-Call-PaperServerListPingEvent-for-legacy-pings.patch => 0207-Call-PaperServerListPingEvent-for-legacy-pings.patch} (100%) rename Spigot-Server-Patches/{0209-Flag-to-disable-the-channel-limit.patch => 0208-Flag-to-disable-the-channel-limit.patch} (100%) rename Spigot-Server-Patches/{0210-Add-method-to-open-already-placed-sign.patch => 0209-Add-method-to-open-already-placed-sign.patch} (100%) rename Spigot-Server-Patches/{0211-Configurable-sprint-interruption-on-attack.patch => 0210-Configurable-sprint-interruption-on-attack.patch} (92%) rename Spigot-Server-Patches/{0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch => 0211-Fix-exploit-that-allowed-colored-signs-to-be-created.patch} (100%) rename Spigot-Server-Patches/{0213-EndermanEscapeEvent.patch => 0212-EndermanEscapeEvent.patch} (100%) rename Spigot-Server-Patches/{0214-Enderman.teleportRandomly.patch => 0213-Enderman.teleportRandomly.patch} (100%) rename Spigot-Server-Patches/{0215-Block-Enderpearl-Travel-Exploit.patch => 0214-Block-Enderpearl-Travel-Exploit.patch} (93%) rename Spigot-Server-Patches/{0216-Expand-World.spawnParticle-API-and-add-Builder.patch => 0215-Expand-World.spawnParticle-API-and-add-Builder.patch} (100%) rename Spigot-Server-Patches/{0217-EndermanAttackPlayerEvent.patch => 0216-EndermanAttackPlayerEvent.patch} (100%) rename Spigot-Server-Patches/{0218-WitchConsumePotionEvent.patch => 0217-WitchConsumePotionEvent.patch} (100%) rename Spigot-Server-Patches/{0219-WitchThrowPotionEvent.patch => 0218-WitchThrowPotionEvent.patch} (100%) rename Spigot-Server-Patches/{0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch => 0219-Allow-spawning-Item-entities-with-World.spawnEntity.patch} (100%) rename Spigot-Server-Patches/{0221-WitchReadyPotionEvent.patch => 0220-WitchReadyPotionEvent.patch} (100%) rename Spigot-Server-Patches/{0222-ItemStack-getMaxItemUseDuration.patch => 0221-ItemStack-getMaxItemUseDuration.patch} (100%) rename Spigot-Server-Patches/{0223-Implement-EntityTeleportEndGatewayEvent.patch => 0222-Implement-EntityTeleportEndGatewayEvent.patch} (100%) rename Spigot-Server-Patches/{0224-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch => 0223-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch} (100%) rename Spigot-Server-Patches/{0225-Fix-CraftEntity-hashCode.patch => 0224-Fix-CraftEntity-hashCode.patch} (100%) rename Spigot-Server-Patches/{0226-Configurable-Alternative-LootPool-Luck-Formula.patch => 0225-Configurable-Alternative-LootPool-Luck-Formula.patch} (100%) rename Spigot-Server-Patches/{0227-Print-Error-details-when-failing-to-save-player-data.patch => 0226-Print-Error-details-when-failing-to-save-player-data.patch} (100%) rename Spigot-Server-Patches/{0228-Make-shield-blocking-delay-configurable.patch => 0227-Make-shield-blocking-delay-configurable.patch} (95%) rename Spigot-Server-Patches/{0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch => 0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch} (100%) rename Spigot-Server-Patches/{0230-PlayerReadyArrowEvent.patch => 0229-PlayerReadyArrowEvent.patch} (100%) rename Spigot-Server-Patches/{0231-Fire-EntityShootBowEvent-for-Illusioner.patch => 0230-Fire-EntityShootBowEvent-for-Illusioner.patch} (100%) rename Spigot-Server-Patches/{0232-Implement-EntityKnockbackByEntityEvent.patch => 0231-Implement-EntityKnockbackByEntityEvent.patch} (98%) rename Spigot-Server-Patches/{0233-Expand-Explosions-API.patch => 0232-Expand-Explosions-API.patch} (100%) rename Spigot-Server-Patches/{0234-LivingEntity-Hand-Raised-Item-Use-API.patch => 0233-LivingEntity-Hand-Raised-Item-Use-API.patch} (100%) rename Spigot-Server-Patches/{0235-RangedEntity-API.patch => 0234-RangedEntity-API.patch} (100%) rename Spigot-Server-Patches/{0236-Add-config-to-disable-ender-dragon-legacy-check.patch => 0235-Add-config-to-disable-ender-dragon-legacy-check.patch} (94%) rename Spigot-Server-Patches/{0237-Implement-World.getEntity-UUID-API.patch => 0236-Implement-World.getEntity-UUID-API.patch} (100%) rename Spigot-Server-Patches/{0238-InventoryCloseEvent-Reason-API.patch => 0237-InventoryCloseEvent-Reason-API.patch} (100%) rename Spigot-Server-Patches/{0239-Configurable-Bed-Search-Radius.patch => 0238-Configurable-Bed-Search-Radius.patch} (98%) rename Spigot-Server-Patches/{0240-Vex-getSummoner-API.patch => 0239-Vex-getSummoner-API.patch} (100%) rename Spigot-Server-Patches/{0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch => 0240-Refresh-player-inventory-when-cancelling-PlayerInter.patch} (100%) rename Spigot-Server-Patches/{0242-Don-t-change-the-Entity-Random-seed-for-squids.patch => 0241-Don-t-change-the-Entity-Random-seed-for-squids.patch} (100%) rename Spigot-Server-Patches/{0243-Re-add-vanilla-entity-warnings-for-duplicates.patch => 0242-Re-add-vanilla-entity-warnings-for-duplicates.patch} (100%) rename Spigot-Server-Patches/{0244-Avoid-item-merge-if-stack-size-above-max-stack-size.patch => 0243-Avoid-item-merge-if-stack-size-above-max-stack-size.patch} (100%) rename Spigot-Server-Patches/{0245-Use-asynchronous-Log4j-2-loggers.patch => 0244-Use-asynchronous-Log4j-2-loggers.patch} (100%) rename Spigot-Server-Patches/{0246-add-more-information-to-Entity.toString.patch => 0245-add-more-information-to-Entity.toString.patch} (100%) rename Spigot-Server-Patches/{0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch => 0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch} (100%) rename Spigot-Server-Patches/{0248-EnderDragon-Events.patch => 0247-EnderDragon-Events.patch} (100%) rename Spigot-Server-Patches/{0249-PlayerElytraBoostEvent.patch => 0248-PlayerElytraBoostEvent.patch} (100%) rename Spigot-Server-Patches/{0250-Improve-BlockPosition-inlining.patch => 0249-Improve-BlockPosition-inlining.patch} (100%) rename Spigot-Server-Patches/{0251-Optimize-RegistryID.c.patch => 0250-Optimize-RegistryID.c.patch} (100%) rename Spigot-Server-Patches/{0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch => 0251-Option-to-prevent-armor-stands-from-doing-entity-loo.patch} (92%) rename Spigot-Server-Patches/{0253-Vanished-players-don-t-have-rights.patch => 0252-Vanished-players-don-t-have-rights.patch} (100%) rename Spigot-Server-Patches/{0254-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch => 0253-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch} (100%) rename Spigot-Server-Patches/{0255-Add-some-Debug-to-Chunk-Entity-slices.patch => 0254-Add-some-Debug-to-Chunk-Entity-slices.patch} (100%) rename Spigot-Server-Patches/{0256-EntityTransformedEvent.patch => 0255-EntityTransformedEvent.patch} (98%) rename Spigot-Server-Patches/{0257-SkeletonHorse-Additions.patch => 0256-SkeletonHorse-Additions.patch} (100%) rename Spigot-Server-Patches/{0258-Prevent-Saving-Bad-entities-to-chunks.patch => 0257-Prevent-Saving-Bad-entities-to-chunks.patch} (100%) rename Spigot-Server-Patches/{0259-Don-t-call-getItemMeta-on-hasItemMeta.patch => 0258-Don-t-call-getItemMeta-on-hasItemMeta.patch} (100%) rename Spigot-Server-Patches/{0260-Ignore-Dead-Entities-in-entityList-iteration.patch => 0259-Ignore-Dead-Entities-in-entityList-iteration.patch} (100%) rename Spigot-Server-Patches/{0261-Implement-Expanded-ArmorStand-API.patch => 0260-Implement-Expanded-ArmorStand-API.patch} (100%) rename Spigot-Server-Patches/{0262-AnvilDamageEvent.patch => 0261-AnvilDamageEvent.patch} (100%) rename Spigot-Server-Patches/{0263-Add-TNTPrimeEvent.patch => 0262-Add-TNTPrimeEvent.patch} (100%) rename Spigot-Server-Patches/{0264-Break-up-and-make-tab-spam-limits-configurable.patch => 0263-Break-up-and-make-tab-spam-limits-configurable.patch} (100%) rename Spigot-Server-Patches/{0265-Add-hand-to-bucket-events.patch => 0264-Add-hand-to-bucket-events.patch} (100%) rename Spigot-Server-Patches/{0266-MC-135506-Experience-should-save-as-Integers.patch => 0265-MC-135506-Experience-should-save-as-Integers.patch} (100%) rename Spigot-Server-Patches/{0267-Fix-client-rendering-skulls-from-same-user.patch => 0266-Fix-client-rendering-skulls-from-same-user.patch} (100%) rename Spigot-Server-Patches/{0268-Add-Early-Warning-Feature-to-WatchDog.patch => 0267-Add-Early-Warning-Feature-to-WatchDog.patch} (100%) rename Spigot-Server-Patches/{0269-Make-EnderDragon-implement-Mob.patch => 0268-Make-EnderDragon-implement-Mob.patch} (100%) rename Spigot-Server-Patches/{0270-Use-ConcurrentHashMap-in-JsonList.patch => 0269-Use-ConcurrentHashMap-in-JsonList.patch} (100%) rename Spigot-Server-Patches/{0271-Use-a-Queue-for-Queueing-Commands.patch => 0270-Use-a-Queue-for-Queueing-Commands.patch} (100%) rename Spigot-Server-Patches/{0272-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch => 0271-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch} (100%) rename Spigot-Server-Patches/{0273-Allow-disabling-armour-stand-ticking.patch => 0272-Allow-disabling-armour-stand-ticking.patch} (97%) rename Spigot-Server-Patches/{0274-Optimize-BlockPosition-helper-methods.patch => 0273-Optimize-BlockPosition-helper-methods.patch} (100%) rename Spigot-Server-Patches/{0275-Restore-vanlla-default-mob-spawn-range.patch => 0274-Restore-vanlla-default-mob-spawn-range.patch} (100%) rename Spigot-Server-Patches/{0276-Fix-MC-124320.patch => 0275-Fix-MC-124320.patch} (100%) rename Spigot-Server-Patches/{0277-Slime-Pathfinder-Events.patch => 0276-Slime-Pathfinder-Events.patch} (100%) rename Spigot-Server-Patches/{0278-Configurable-speed-for-water-flowing-over-lava.patch => 0277-Configurable-speed-for-water-flowing-over-lava.patch} (95%) rename Spigot-Server-Patches/{0279-Optimize-CraftBlockData-Creation.patch => 0278-Optimize-CraftBlockData-Creation.patch} (100%) rename Spigot-Server-Patches/{0280-Optimize-RegistryMaterials.patch => 0279-Optimize-RegistryMaterials.patch} (100%) rename Spigot-Server-Patches/{0281-Add-PhantomPreSpawnEvent.patch => 0280-Add-PhantomPreSpawnEvent.patch} (100%) rename Spigot-Server-Patches/{0282-Add-More-Creeper-API.patch => 0281-Add-More-Creeper-API.patch} (100%) rename Spigot-Server-Patches/{0283-Inventory-removeItemAnySlot.patch => 0282-Inventory-removeItemAnySlot.patch} (100%) rename Spigot-Server-Patches/{0284-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch => 0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch} (100%) rename Spigot-Server-Patches/{0285-Add-ray-tracing-methods-to-LivingEntity.patch => 0284-Add-ray-tracing-methods-to-LivingEntity.patch} (100%) rename Spigot-Server-Patches/{0286-Expose-attack-cooldown-methods-for-Player.patch => 0285-Expose-attack-cooldown-methods-for-Player.patch} (100%) rename Spigot-Server-Patches/{0287-Improve-death-events.patch => 0286-Improve-death-events.patch} (99%) rename Spigot-Server-Patches/{0288-Allow-chests-to-be-placed-with-NBT-data.patch => 0287-Allow-chests-to-be-placed-with-NBT-data.patch} (100%) rename Spigot-Server-Patches/{0289-Mob-Pathfinding-API.patch => 0288-Mob-Pathfinding-API.patch} (100%) rename Spigot-Server-Patches/{0290-Prevent-chunk-loading-from-Fluid-Flowing.patch => 0289-Prevent-chunk-loading-from-Fluid-Flowing.patch} (100%) rename Spigot-Server-Patches/{0291-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch => 0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch} (100%) rename Spigot-Server-Patches/{0292-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch => 0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch} (100%) rename Spigot-Server-Patches/{0293-Prevent-mob-spawning-from-loading-generating-chunks.patch => 0292-Prevent-mob-spawning-from-loading-generating-chunks.patch} (100%) rename Spigot-Server-Patches/{0294-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch => 0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch} (100%) rename Spigot-Server-Patches/{0295-Implement-furnace-cook-speed-multiplier-API.patch => 0294-Implement-furnace-cook-speed-multiplier-API.patch} (100%) rename Spigot-Server-Patches/{0296-PreSpawnerSpawnEvent.patch => 0295-PreSpawnerSpawnEvent.patch} (100%) rename Spigot-Server-Patches/{0297-Catch-JsonParseException-in-Entity-and-TE-names.patch => 0296-Catch-JsonParseException-in-Entity-and-TE-names.patch} (100%) rename Spigot-Server-Patches/{0298-Honor-EntityAgeable.ageLock.patch => 0297-Honor-EntityAgeable.ageLock.patch} (100%) rename Spigot-Server-Patches/{0299-Configurable-connection-throttle-kick-message.patch => 0298-Configurable-connection-throttle-kick-message.patch} (100%) rename Spigot-Server-Patches/{0300-Hook-into-CB-plugin-rewrites.patch => 0299-Hook-into-CB-plugin-rewrites.patch} (100%) rename Spigot-Server-Patches/{0301-Allow-setting-the-vex-s-summoner.patch => 0300-Allow-setting-the-vex-s-summoner.patch} (100%) rename Spigot-Server-Patches/{0302-Add-sun-related-API.patch => 0301-Add-sun-related-API.patch} (95%) rename Spigot-Server-Patches/{0303-Turtle-API.patch => 0302-Turtle-API.patch} (100%) rename Spigot-Server-Patches/{0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch => 0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch} (100%) rename Spigot-Server-Patches/{0305-Call-player-spectator-target-events-and-improve-impl.patch => 0304-Call-player-spectator-target-events-and-improve-impl.patch} (100%) rename Spigot-Server-Patches/{0306-Add-Velocity-IP-Forwarding-Support.patch => 0305-Add-Velocity-IP-Forwarding-Support.patch} (100%) rename Spigot-Server-Patches/{0307-Add-more-Witch-API.patch => 0306-Add-more-Witch-API.patch} (100%) rename Spigot-Server-Patches/{0308-Check-Drowned-for-Villager-Aggression-Config.patch => 0307-Check-Drowned-for-Villager-Aggression-Config.patch} (100%) rename Spigot-Server-Patches/{0309-Here-s-Johnny.patch => 0308-Here-s-Johnny.patch} (100%) rename Spigot-Server-Patches/{0310-Add-option-to-prevent-players-from-moving-into-unloa.patch => 0309-Add-option-to-prevent-players-from-moving-into-unloa.patch} (96%) rename Spigot-Server-Patches/{0311-Reset-players-airTicks-on-respawn.patch => 0310-Reset-players-airTicks-on-respawn.patch} (100%) rename Spigot-Server-Patches/{0312-Don-t-sleep-after-profile-lookups-if-not-needed.patch => 0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch} (100%) rename Spigot-Server-Patches/{0313-Improve-Server-Thread-Pool-and-Thread-Priorities.patch => 0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch} (100%) rename Spigot-Server-Patches/{0314-Optimize-World-Time-Updates.patch => 0313-Optimize-World-Time-Updates.patch} (100%) rename Spigot-Server-Patches/{0315-Restore-custom-InventoryHolder-support.patch => 0314-Restore-custom-InventoryHolder-support.patch} (100%) rename Spigot-Server-Patches/{0316-Use-Vanilla-Minecart-Speeds.patch => 0315-Use-Vanilla-Minecart-Speeds.patch} (100%) rename Spigot-Server-Patches/{0317-Fix-SpongeAbsortEvent-handling.patch => 0316-Fix-SpongeAbsortEvent-handling.patch} (100%) rename Spigot-Server-Patches/{0318-Don-t-allow-digging-into-unloaded-chunks.patch => 0317-Don-t-allow-digging-into-unloaded-chunks.patch} (100%) rename Spigot-Server-Patches/{0319-Book-Size-Limits.patch => 0318-Book-Size-Limits.patch} (100%) rename Spigot-Server-Patches/{0320-Make-the-default-permission-message-configurable.patch => 0319-Make-the-default-permission-message-configurable.patch} (100%) rename Spigot-Server-Patches/{0321-Prevent-rayTrace-from-loading-chunks.patch => 0320-Prevent-rayTrace-from-loading-chunks.patch} (100%) rename Spigot-Server-Patches/{0322-Handle-Large-Packets-disconnecting-client.patch => 0321-Handle-Large-Packets-disconnecting-client.patch} (100%) rename Spigot-Server-Patches/{0323-force-entity-dismount-during-teleportation.patch => 0322-force-entity-dismount-during-teleportation.patch} (100%) rename Spigot-Server-Patches/{0324-Add-more-Zombie-API.patch => 0323-Add-more-Zombie-API.patch} (98%) rename Spigot-Server-Patches/{0325-Add-PlayerConnectionCloseEvent.patch => 0324-Add-PlayerConnectionCloseEvent.patch} (100%) rename Spigot-Server-Patches/{0326-Prevent-Enderman-from-loading-chunks.patch => 0325-Prevent-Enderman-from-loading-chunks.patch} (100%) rename Spigot-Server-Patches/{0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch => 0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch} (98%) rename Spigot-Server-Patches/{0328-Fix-PlayerEditBookEvent.patch => 0327-Fix-PlayerEditBookEvent.patch} (100%) rename Spigot-Server-Patches/{0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch => 0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch} (100%) rename Spigot-Server-Patches/{0330-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch => 0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch} (100%) rename Spigot-Server-Patches/{0331-Block-Entity-remove-from-being-called-on-Players.patch => 0330-Block-Entity-remove-from-being-called-on-Players.patch} (100%) rename Spigot-Server-Patches/{0332-BlockDestroyEvent.patch => 0331-BlockDestroyEvent.patch} (100%) rename Spigot-Server-Patches/{0333-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch => 0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch} (100%) rename Spigot-Server-Patches/{0334-Fix-sign-edit-memory-leak.patch => 0333-Fix-sign-edit-memory-leak.patch} (100%) rename Spigot-Server-Patches/{0335-Limit-Client-Sign-length-more.patch => 0334-Limit-Client-Sign-length-more.patch} (100%) rename Spigot-Server-Patches/{0336-Don-t-check-ConvertSigns-boolean-every-sign-save.patch => 0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch} (100%) rename Spigot-Server-Patches/{0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => 0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (100%) rename Spigot-Server-Patches/{0338-Handle-Oversized-Tile-Entities-in-chunks.patch => 0337-Handle-Oversized-Tile-Entities-in-chunks.patch} (100%) rename Spigot-Server-Patches/{0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch => 0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch} (100%) rename Spigot-Server-Patches/{0340-Set-Zombie-last-tick-at-start-of-drowning-process.patch => 0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch} (100%) rename Spigot-Server-Patches/{0341-Allow-Saving-of-Oversized-Chunks.patch => 0340-Allow-Saving-of-Oversized-Chunks.patch} (100%) rename Spigot-Server-Patches/{0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => 0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (100%) rename Spigot-Server-Patches/{0343-Add-LivingEntity-getTargetEntity.patch => 0342-Add-LivingEntity-getTargetEntity.patch} (100%) rename Spigot-Server-Patches/{0344-Use-proper-max-length-when-serialising-BungeeCord-te.patch => 0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch} (100%) rename Spigot-Server-Patches/{0345-Entity-getEntitySpawnReason.patch => 0344-Entity-getEntitySpawnReason.patch} (100%) rename Spigot-Server-Patches/{0346-Update-entity-Metadata-for-all-tracked-players.patch => 0345-Update-entity-Metadata-for-all-tracked-players.patch} (100%) rename Spigot-Server-Patches/{0347-Implement-PlayerPostRespawnEvent.patch => 0346-Implement-PlayerPostRespawnEvent.patch} (100%) rename Spigot-Server-Patches/{0348-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => 0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (100%) rename Spigot-Server-Patches/{0349-Implement-getters-and-setters-for-EntityItem-owner-a.patch => 0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch} (100%) rename Spigot-Server-Patches/{0350-Server-Tick-Events.patch => 0349-Server-Tick-Events.patch} (100%) rename Spigot-Server-Patches/{0351-PlayerDeathEvent-getItemsToKeep.patch => 0350-PlayerDeathEvent-getItemsToKeep.patch} (96%) rename Spigot-Server-Patches/{0352-Optimize-Captured-TileEntity-Lookup.patch => 0351-Optimize-Captured-TileEntity-Lookup.patch} (100%) rename Spigot-Server-Patches/{0353-Add-Heightmap-API.patch => 0352-Add-Heightmap-API.patch} (100%) rename Spigot-Server-Patches/{0354-Mob-Spawner-API-Enhancements.patch => 0353-Mob-Spawner-API-Enhancements.patch} (100%) rename Spigot-Server-Patches/{0355-Per-Player-View-Distance-API-placeholders.patch => 0354-Per-Player-View-Distance-API-placeholders.patch} (100%) rename Spigot-Server-Patches/{0356-Fix-CB-call-to-changed-postToMainThread-method.patch => 0355-Fix-CB-call-to-changed-postToMainThread-method.patch} (100%) rename Spigot-Server-Patches/{0357-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => 0356-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (100%) rename Spigot-Server-Patches/{0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch => 0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch} (100%) rename Spigot-Server-Patches/{0359-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch => 0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch} (100%) rename Spigot-Server-Patches/{0360-Duplicate-UUID-Resolve-Option.patch => 0359-Duplicate-UUID-Resolve-Option.patch} (98%) rename Spigot-Server-Patches/{0361-improve-CraftWorld-isChunkLoaded.patch => 0360-improve-CraftWorld-isChunkLoaded.patch} (100%) rename Spigot-Server-Patches/{0362-Configurable-Keep-Spawn-Loaded-range-per-world.patch => 0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (98%) rename Spigot-Server-Patches/{0363-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch => 0362-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch} (100%) rename Spigot-Server-Patches/{0364-ChunkMapDistance-CME.patch => 0363-ChunkMapDistance-CME.patch} (100%) rename Spigot-Server-Patches/{0365-Implement-CraftBlockSoundGroup.patch => 0364-Implement-CraftBlockSoundGroup.patch} (100%) rename Spigot-Server-Patches/{0366-Chunk-debug-command.patch => 0365-Chunk-debug-command.patch} (100%) rename Spigot-Server-Patches/{0367-Catch-exceptions-from-dispenser-entity-spawns.patch => 0366-Catch-exceptions-from-dispenser-entity-spawns.patch} (100%) rename Spigot-Server-Patches/{0368-Fix-World-isChunkGenerated-calls.patch => 0367-Fix-World-isChunkGenerated-calls.patch} (100%) rename Spigot-Server-Patches/{0369-Show-blockstate-location-if-we-failed-to-read-it.patch => 0368-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename Spigot-Server-Patches/{0370-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch => 0369-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch} (100%) rename Spigot-Server-Patches/{0371-incremental-chunk-saving.patch => 0370-incremental-chunk-saving.patch} (99%) rename Spigot-Server-Patches/{0372-Anti-Xray.patch => 0371-Anti-Xray.patch} (99%) rename Spigot-Server-Patches/{0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => 0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (94%) rename Spigot-Server-Patches/{0374-Configurable-projectile-relative-velocity.patch => 0373-Configurable-projectile-relative-velocity.patch} (95%) rename Spigot-Server-Patches/{0375-Mark-entities-as-being-ticked-when-notifying-navigat.patch => 0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch} (100%) rename Spigot-Server-Patches/{0376-offset-item-frame-ticking.patch => 0375-offset-item-frame-ticking.patch} (100%) rename Spigot-Server-Patches/{0377-Avoid-hopper-searches-if-there-are-no-items.patch => 0376-Avoid-hopper-searches-if-there-are-no-items.patch} (100%) rename Spigot-Server-Patches/{0378-Asynchronous-chunk-IO-and-loading.patch => 0377-Asynchronous-chunk-IO-and-loading.patch} (100%) rename Spigot-Server-Patches/{0379-Use-getChunkIfLoadedImmediately-in-places.patch => 0378-Use-getChunkIfLoadedImmediately-in-places.patch} (100%) rename Spigot-Server-Patches/{0380-Reduce-sync-loads.patch => 0379-Reduce-sync-loads.patch} (100%) rename Spigot-Server-Patches/{0381-Implement-alternative-item-despawn-rate.patch => 0380-Implement-alternative-item-despawn-rate.patch} (97%) rename Spigot-Server-Patches/{0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch => 0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch} (100%) rename Spigot-Server-Patches/{0383-Fix-MC-158900.patch => 0382-Fix-MC-158900.patch} (100%) rename Spigot-Server-Patches/{0384-implement-optional-per-player-mob-spawns.patch => 0383-implement-optional-per-player-mob-spawns.patch} (99%) rename Spigot-Server-Patches/{0385-Prevent-consuming-the-wrong-itemstack.patch => 0384-Prevent-consuming-the-wrong-itemstack.patch} (100%) rename Spigot-Server-Patches/{0386-only-add-passanger-entities-once-from-spawners.patch => 0385-only-add-passanger-entities-once-from-spawners.patch} (100%) rename Spigot-Server-Patches/{0387-Fix-nether-portal-creation.patch => 0386-Fix-nether-portal-creation.patch} (100%) rename Spigot-Server-Patches/{0388-Generator-Settings.patch => 0387-Generator-Settings.patch} (97%) rename Spigot-Server-Patches/{0389-Fix-MC-161754.patch => 0388-Fix-MC-161754.patch} (100%) rename Spigot-Server-Patches/{0390-Performance-improvement-for-Chunk.getEntities.patch => 0389-Performance-improvement-for-Chunk.getEntities.patch} (100%) rename Spigot-Server-Patches/{0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch => 0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch} (100%) rename Spigot-Server-Patches/{0392-Expose-the-internal-current-tick.patch => 0391-Expose-the-internal-current-tick.patch} (100%) rename Spigot-Server-Patches/{0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch => 0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch} (100%) rename Spigot-Server-Patches/{0394-Add-option-to-disable-pillager-patrols.patch => 0393-Add-option-to-disable-pillager-patrols.patch} (91%) rename Spigot-Server-Patches/{0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch => 0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch} (100%) rename Spigot-Server-Patches/{0396-PlayerLaunchProjectileEvent.patch => 0395-PlayerLaunchProjectileEvent.patch} (100%) rename Spigot-Server-Patches/{0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch => 0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch} (100%) rename Spigot-Server-Patches/{0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch => 0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch} (100%) rename Spigot-Server-Patches/{0399-MC-145656-Fix-Follow-Range-Initial-Target.patch => 0398-MC-145656-Fix-Follow-Range-Initial-Target.patch} (95%) rename Spigot-Server-Patches/{0400-Optimize-Hoppers.patch => 0399-Optimize-Hoppers.patch} (99%) rename Spigot-Server-Patches/{0401-PlayerDeathEvent-shouldDropExperience.patch => 0400-PlayerDeathEvent-shouldDropExperience.patch} (90%) rename Spigot-Server-Patches/{0402-Prevent-bees-loading-chunks-checking-hive-position.patch => 0401-Prevent-bees-loading-chunks-checking-hive-position.patch} (100%) rename Spigot-Server-Patches/{0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => 0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (100%) rename Spigot-Server-Patches/{0404-Guard-against-serializing-mismatching-chunk-coordina.patch => 0403-Guard-against-serializing-mismatching-chunk-coordina.patch} (100%) rename Spigot-Server-Patches/{0405-Optimise-IEntityAccess-getPlayerByUUID.patch => 0404-Optimise-IEntityAccess-getPlayerByUUID.patch} (100%) rename Spigot-Server-Patches/{0406-Fix-items-not-falling-correctly.patch => 0405-Fix-items-not-falling-correctly.patch} (100%) rename Spigot-Server-Patches/{0407-Lag-compensate-eating.patch => 0406-Lag-compensate-eating.patch} (100%) rename Spigot-Server-Patches/{0408-Optimize-call-to-getFluid-for-explosions.patch => 0407-Optimize-call-to-getFluid-for-explosions.patch} (100%) rename Spigot-Server-Patches/{0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch => 0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch} (100%) rename Spigot-Server-Patches/{0410-Entity-Activation-Range-2.0.patch => 0409-Entity-Activation-Range-2.0.patch} (99%) rename Spigot-Server-Patches/{0411-Add-effect-to-block-break-naturally.patch => 0410-Add-effect-to-block-break-naturally.patch} (100%) rename Spigot-Server-Patches/{0412-Tracking-Range-Improvements.patch => 0411-Tracking-Range-Improvements.patch} (100%) rename Spigot-Server-Patches/{0413-Fix-items-vanishing-through-end-portal.patch => 0412-Fix-items-vanishing-through-end-portal.patch} (100%) rename Spigot-Server-Patches/{0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => 0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (100%) rename Spigot-Server-Patches/{0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch => 0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (100%) rename Spigot-Server-Patches/{0416-Allow-overriding-the-java-version-check.patch => 0415-Allow-overriding-the-java-version-check.patch} (100%) rename Spigot-Server-Patches/{0417-Add-ThrownEggHatchEvent.patch => 0416-Add-ThrownEggHatchEvent.patch} (100%) rename Spigot-Server-Patches/{0418-Optimise-random-block-ticking.patch => 0417-Optimise-random-block-ticking.patch} (100%) rename Spigot-Server-Patches/{0419-Entity-Jump-API.patch => 0418-Entity-Jump-API.patch} (100%) rename Spigot-Server-Patches/{0420-Add-option-to-nerf-pigmen-from-nether-portals.patch => 0419-Add-option-to-nerf-pigmen-from-nether-portals.patch} (95%) rename Spigot-Server-Patches/{0421-Make-the-GUI-graph-fancier.patch => 0420-Make-the-GUI-graph-fancier.patch} (100%) rename Spigot-Server-Patches/{0422-add-hand-to-BlockMultiPlaceEvent.patch => 0421-add-hand-to-BlockMultiPlaceEvent.patch} (100%) rename Spigot-Server-Patches/{0423-Prevent-teleporting-dead-entities.patch => 0422-Prevent-teleporting-dead-entities.patch} (100%) rename Spigot-Server-Patches/{0424-Validate-tripwire-hook-placement-before-update.patch => 0423-Validate-tripwire-hook-placement-before-update.patch} (100%) rename Spigot-Server-Patches/{0425-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => 0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (92%) rename Spigot-Server-Patches/{0426-Configurable-chance-of-villager-zombie-infection.patch => 0425-Configurable-chance-of-villager-zombie-infection.patch} (94%) rename Spigot-Server-Patches/{0427-Optimise-Chunk-getFluid.patch => 0426-Optimise-Chunk-getFluid.patch} (100%) rename Spigot-Server-Patches/{0428-Optimise-TickListServer-by-rewriting-it.patch => 0427-Optimise-TickListServer-by-rewriting-it.patch} (100%) rename Spigot-Server-Patches/{0429-Pillager-patrol-spawn-settings-and-per-player-option.patch => 0428-Pillager-patrol-spawn-settings-and-per-player-option.patch} (96%) rename Spigot-Server-Patches/{0430-Ensure-Entity-is-never-double-registered.patch => 0429-Ensure-Entity-is-never-double-registered.patch} (100%) rename Spigot-Server-Patches/{0431-Fix-unregistering-entities-from-unloading-chunks.patch => 0430-Fix-unregistering-entities-from-unloading-chunks.patch} (100%) rename Spigot-Server-Patches/{0432-Remote-Connections-shouldn-t-hold-up-shutdown.patch => 0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (100%) rename Spigot-Server-Patches/{0433-Do-not-allow-bees-to-load-chunks-for-beehives.patch => 0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (100%) rename Spigot-Server-Patches/{0434-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => 0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (100%) rename Spigot-Server-Patches/{0435-Optimize-Collision-to-not-load-chunks.patch => 0434-Optimize-Collision-to-not-load-chunks.patch} (100%) rename Spigot-Server-Patches/{0436-Don-t-tick-dead-players.patch => 0435-Don-t-tick-dead-players.patch} (91%) rename Spigot-Server-Patches/{0437-Dead-Player-s-shouldn-t-be-able-to-move.patch => 0436-Dead-Player-s-shouldn-t-be-able-to-move.patch} (100%) rename Spigot-Server-Patches/{0438-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch => 0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch} (100%) rename Spigot-Server-Patches/{0439-Increase-Light-Queue-Size.patch => 0438-Increase-Light-Queue-Size.patch} (92%) rename Spigot-Server-Patches/{0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch => 0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch} (100%) rename Spigot-Server-Patches/{0441-Don-t-move-existing-players-to-world-spawn.patch => 0440-Don-t-move-existing-players-to-world-spawn.patch} (96%) rename Spigot-Server-Patches/{0442-Add-tick-times-API-and-mspt-command.patch => 0441-Add-tick-times-API-and-mspt-command.patch} (100%) rename Spigot-Server-Patches/{0443-Expose-MinecraftServer-isRunning.patch => 0442-Expose-MinecraftServer-isRunning.patch} (100%) rename Spigot-Server-Patches/{0444-Add-Raw-Byte-ItemStack-Serialization.patch => 0443-Add-Raw-Byte-ItemStack-Serialization.patch} (100%) rename Spigot-Server-Patches/{0445-Remove-streams-from-Mob-AI-System.patch => 0444-Remove-streams-from-Mob-AI-System.patch} (100%) rename Spigot-Server-Patches/{0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch => 0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch} (100%) rename Spigot-Server-Patches/{0447-Async-command-map-building.patch => 0446-Async-command-map-building.patch} (100%) rename Spigot-Server-Patches/{0448-Improved-Watchdog-Support.patch => 0447-Improved-Watchdog-Support.patch} (100%) rename Spigot-Server-Patches/{0449-Optimize-Pathfinding.patch => 0448-Optimize-Pathfinding.patch} (100%) rename Spigot-Server-Patches/{0450-Reduce-Either-Optional-allocation.patch => 0449-Reduce-Either-Optional-allocation.patch} (100%) rename Spigot-Server-Patches/{0451-Remove-streams-from-PairedQueue.patch => 0450-Remove-streams-from-PairedQueue.patch} (100%) rename Spigot-Server-Patches/{0452-Reduce-memory-footprint-of-NBTTagCompound.patch => 0451-Reduce-memory-footprint-of-NBTTagCompound.patch} (100%) rename Spigot-Server-Patches/{0453-Prevent-opening-inventories-when-frozen.patch => 0452-Prevent-opening-inventories-when-frozen.patch} (100%) rename Spigot-Server-Patches/{0454-Optimise-ArraySetSorted-removeIf.patch => 0453-Optimise-ArraySetSorted-removeIf.patch} (100%) rename Spigot-Server-Patches/{0455-Don-t-run-entity-collision-code-if-not-needed.patch => 0454-Don-t-run-entity-collision-code-if-not-needed.patch} (100%) rename Spigot-Server-Patches/{0456-Optimise-entity-hard-collision-checking.patch => 0455-Optimise-entity-hard-collision-checking.patch} (100%) rename Spigot-Server-Patches/{0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch => 0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch} (100%) rename Spigot-Server-Patches/{0458-Restrict-vanilla-teleport-command-to-valid-locations.patch => 0457-Restrict-vanilla-teleport-command-to-valid-locations.patch} (100%) rename Spigot-Server-Patches/{0459-Implement-Player-Client-Options-API.patch => 0458-Implement-Player-Client-Options-API.patch} (100%) rename Spigot-Server-Patches/{0460-Fix-Chunk-Post-Processing-deadlock-risk.patch => 0459-Fix-Chunk-Post-Processing-deadlock-risk.patch} (100%) rename Spigot-Server-Patches/{0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch => 0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch} (100%) rename Spigot-Server-Patches/{0462-Broadcast-join-message-to-console.patch => 0461-Broadcast-join-message-to-console.patch} (100%) rename Spigot-Server-Patches/{0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch => 0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch} (98%) rename Spigot-Server-Patches/{0464-Load-Chunks-for-Login-Asynchronously.patch => 0463-Load-Chunks-for-Login-Asynchronously.patch} (99%) rename Spigot-Server-Patches/{0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch => 0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch} (100%) rename Spigot-Server-Patches/{0466-Add-PlayerAttackEntityCooldownResetEvent.patch => 0465-Add-PlayerAttackEntityCooldownResetEvent.patch} (100%) rename Spigot-Server-Patches/{0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch => 0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch} (100%) rename Spigot-Server-Patches/{0468-Don-t-fire-BlockFade-on-worldgen-threads.patch => 0467-Don-t-fire-BlockFade-on-worldgen-threads.patch} (100%) rename Spigot-Server-Patches/{0469-Add-phantom-creative-and-insomniac-controls.patch => 0468-Add-phantom-creative-and-insomniac-controls.patch} (96%) rename Spigot-Server-Patches/{0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch => 0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch} (100%) rename Spigot-Server-Patches/{0471-Implement-Brigadier-Mojang-API.patch => 0470-Implement-Brigadier-Mojang-API.patch} (100%) rename Spigot-Server-Patches/{0472-Villager-Restocks-API.patch => 0471-Villager-Restocks-API.patch} (100%) rename Spigot-Server-Patches/{0473-Validate-PickItem-Packet-and-kick-for-invalid.patch => 0472-Validate-PickItem-Packet-and-kick-for-invalid.patch} (100%) rename Spigot-Server-Patches/{0474-Expose-game-version.patch => 0473-Expose-game-version.patch} (100%) rename Spigot-Server-Patches/{0475-Sync-position-on-teleportation.patch => 0474-Sync-position-on-teleportation.patch} (100%) rename Spigot-Server-Patches/{0476-Optimize-Voxel-Shape-Merging.patch => 0475-Optimize-Voxel-Shape-Merging.patch} (100%) rename Spigot-Server-Patches/{0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch => 0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch} (93%) rename Spigot-Server-Patches/{0478-Implement-Mob-Goal-API.patch => 0477-Implement-Mob-Goal-API.patch} (100%) rename Spigot-Server-Patches/{0479-Use-distance-map-to-optimise-entity-tracker.patch => 0478-Use-distance-map-to-optimise-entity-tracker.patch} (100%) rename Spigot-Server-Patches/{0480-Optimize-isOutsideRange-to-use-distance-maps.patch => 0479-Optimize-isOutsideRange-to-use-distance-maps.patch} (99%) rename Spigot-Server-Patches/{0481-Stop-copy-on-write-operations-for-updating-light-dat.patch => 0480-Stop-copy-on-write-operations-for-updating-light-dat.patch} (100%) rename Spigot-Server-Patches/{0482-No-Tick-view-distance-implementation.patch => 0481-No-Tick-view-distance-implementation.patch} (99%) rename Spigot-Server-Patches/{0483-Add-villager-reputation-API.patch => 0482-Add-villager-reputation-API.patch} (100%) rename Spigot-Server-Patches/{0484-Fix-Light-Command.patch => 0483-Fix-Light-Command.patch} (100%) rename Spigot-Server-Patches/{0485-Fix-PotionEffect-ignores-icon-flag.patch => 0484-Fix-PotionEffect-ignores-icon-flag.patch} (100%) rename Spigot-Server-Patches/{0486-Optimize-brigadier-child-sorting-performance.patch => 0485-Optimize-brigadier-child-sorting-performance.patch} (100%) rename Spigot-Server-Patches/{0487-Don-t-toString-block-unless-actually-showing-the-mes.patch => 0486-Don-t-toString-block-unless-actually-showing-the-mes.patch} (100%) rename Spigot-Server-Patches/{0488-Potential-bed-API.patch => 0487-Potential-bed-API.patch} (100%) rename Spigot-Server-Patches/{0489-Wait-for-Async-Tasks-during-shutdown.patch => 0488-Wait-for-Async-Tasks-during-shutdown.patch} (100%) rename Spigot-Server-Patches/{0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch => 0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch} (100%) rename Spigot-Server-Patches/{0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (100%) rename Spigot-Server-Patches/{0492-Optimize-NibbleArray-to-use-pooled-buffers.patch => 0491-Optimize-NibbleArray-to-use-pooled-buffers.patch} (100%) rename Spigot-Server-Patches/{0493-Reduce-MutableInt-allocations-from-light-engine.patch => 0492-Reduce-MutableInt-allocations-from-light-engine.patch} (100%) rename Spigot-Server-Patches/{0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (100%) rename Spigot-Server-Patches/{0495-Ensure-safe-gateway-teleport.patch => 0494-Ensure-safe-gateway-teleport.patch} (100%) rename Spigot-Server-Patches/{0496-Add-option-for-console-having-all-permissions.patch => 0495-Add-option-for-console-having-all-permissions.patch} (100%) rename Spigot-Server-Patches/{0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch => 0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch} (100%) rename Spigot-Server-Patches/{0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch => 0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch} (99%) rename Spigot-Server-Patches/{0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch => 0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch} (100%) rename Spigot-Server-Patches/{0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch => 0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch} (97%) rename Spigot-Server-Patches/{0501-Improve-Chunk-Status-Transition-Speed.patch => 0500-Improve-Chunk-Status-Transition-Speed.patch} (100%) rename Spigot-Server-Patches/{0502-Fix-villager-trading-demand-MC-163962.patch => 0501-Fix-villager-trading-demand-MC-163962.patch} (100%) rename Spigot-Server-Patches/{0503-Maps-shouldn-t-load-chunks.patch => 0502-Maps-shouldn-t-load-chunks.patch} (100%) rename Spigot-Server-Patches/{0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch => 0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch} (100%) rename Spigot-Server-Patches/{0505-Optimize-Bit-Operations-by-inlining.patch => 0504-Optimize-Bit-Operations-by-inlining.patch} (100%) rename Spigot-Server-Patches/{0506-Optimize-Light-Engine.patch => 0505-Optimize-Light-Engine.patch} (100%) rename Spigot-Server-Patches/{0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch => 0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch} (97%) rename Spigot-Server-Patches/{0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch => 0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch} (100%) rename Spigot-Server-Patches/{0509-Fix-missing-chunks-due-to-integer-overflow.patch => 0508-Fix-missing-chunks-due-to-integer-overflow.patch} (100%) rename Spigot-Server-Patches/{0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch => 0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch} (100%) rename Spigot-Server-Patches/{0511-Fix-piston-physics-inconsistency-MC-188840.patch => 0510-Fix-piston-physics-inconsistency-MC-188840.patch} (100%) rename Spigot-Server-Patches/{0512-Fix-sand-duping.patch => 0511-Fix-sand-duping.patch} (100%) rename Spigot-Server-Patches/{0513-Prevent-position-desync-in-playerconnection-causing-.patch => 0512-Prevent-position-desync-in-playerconnection-causing-.patch} (100%) rename Spigot-Server-Patches/{0514-Fix-enderdragon-exp-dupe.patch => 0513-Fix-enderdragon-exp-dupe.patch} (100%) rename Spigot-Server-Patches/{0515-Inventory-getHolder-method-without-block-snapshot.patch => 0514-Inventory-getHolder-method-without-block-snapshot.patch} (100%) rename Spigot-Server-Patches/{0516-Expose-Arrow-getItemStack.patch => 0515-Expose-Arrow-getItemStack.patch} (100%) rename Spigot-Server-Patches/{0517-Add-and-implement-PlayerRecipeBookClickEvent.patch => 0516-Add-and-implement-PlayerRecipeBookClickEvent.patch} (100%) rename Spigot-Server-Patches/{0518-Add-PrepareGrindstoneEvent.patch => 0517-Add-PrepareGrindstoneEvent.patch} (100%) rename Spigot-Server-Patches/{0519-Hide-sync-chunk-writes-behind-flag.patch => 0518-Hide-sync-chunk-writes-behind-flag.patch} (100%) rename Spigot-Server-Patches/{0520-Limit-lightning-strike-effect-distance.patch => 0519-Limit-lightning-strike-effect-distance.patch} (96%) rename Spigot-Server-Patches/{0521-Add-permission-for-command-blocks.patch => 0520-Add-permission-for-command-blocks.patch} (100%) rename Spigot-Server-Patches/{0522-Ensure-Entity-AABB-s-are-never-invalid.patch => 0521-Ensure-Entity-AABB-s-are-never-invalid.patch} (100%) rename Spigot-Server-Patches/{0523-Optimize-WorldBorder-collision-checks-and-air.patch => 0522-Optimize-WorldBorder-collision-checks-and-air.patch} (100%) rename Spigot-Server-Patches/{0524-Fix-Per-World-Difficulty-Remembering-Difficulty.patch => 0523-Fix-Per-World-Difficulty-Remembering-Difficulty.patch} (100%) diff --git a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch similarity index 100% rename from Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch rename to Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch diff --git a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch b/Spigot-Server-Patches/0063-Undead-horse-leashing.patch deleted file mode 100644 index b9bb06206b..0000000000 --- a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 18 Mar 2016 14:19:19 -0400 -Subject: [PATCH] Undead horse leashing - -default false to match vanilla, but option to allow undead horse types to be leashed. - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 04430aae52205ee167662004e45c145b9d2e8bed..dd21221534542d0265fa7d2178ab69c236579cf7 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -208,4 +208,9 @@ public class PaperWorldConfig { - private void nonPlayerEntitiesOnScoreboards() { - nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false); - } -+ -+ public boolean allowLeashingUndeadHorse = false; -+ private void allowLeashingUndeadHorse() { -+ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); -+ } - } -diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index 364697e0155012c300219ad94a3995809e6c2f8f..d45d025fa74a5ff53f0828f51639e19613e30186 100644 ---- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java -+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -@@ -106,6 +106,13 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven - this.bx = flag; - } - -+ // Paper start -+ @Override -+ public boolean a(EntityHuman entityhuman) { -+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper -+ } -+ // Paper end -+ - @Override - protected void t(float f) { - if (f > 6.0F && this.fa()) { -diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9715f10c790c0210435622ab9997ac40f98da185..2f85d9799d67d3fb1d340179d8dbd03771467329 100644 ---- a/src/main/java/net/minecraft/server/EntityInsentient.java -+++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1282,7 +1282,7 @@ public abstract class EntityInsentient extends EntityLiving { - - } - -- public boolean a(EntityHuman entityhuman) { -+ public boolean a(EntityHuman entityhuman) { // Paper - overriden in EntityHorseAbstract - return !this.isLeashed() && !(this instanceof IMonster); - } - diff --git a/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/0064-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 88% rename from Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to Spigot-Server-Patches/0064-Configurable-Non-Player-Arrow-Despawn-Rate.patch index 72d298de10..4af1434650 100644 --- a/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/Spigot-Server-Patches/0064-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index dd21221534542d0265fa7d2178ab69c236579cf7..7de7b74ff69bba1cbad24623d7eeff6c79812bab 100644 +index 04430aae52205ee167662004e45c145b9d2e8bed..d8b9d87bca6eb95c2cea91e4d8466b9792582d52 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -213,4 +213,19 @@ public class PaperWorldConfig { - private void allowLeashingUndeadHorse() { - allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); +@@ -208,4 +208,19 @@ public class PaperWorldConfig { + private void nonPlayerEntitiesOnScoreboards() { + nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false); } + + public int nonPlayerArrowDespawnRate = -1; diff --git a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0065-Add-World-Util-Methods.patch similarity index 100% rename from Spigot-Server-Patches/0066-Add-World-Util-Methods.patch rename to Spigot-Server-Patches/0065-Add-World-Util-Methods.patch diff --git a/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0066-Custom-replacement-for-eaten-items.patch similarity index 100% rename from Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch rename to Spigot-Server-Patches/0066-Custom-replacement-for-eaten-items.patch diff --git a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 100% rename from Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch diff --git a/Spigot-Server-Patches/0069-Waving-banner-workaround.patch b/Spigot-Server-Patches/0068-Waving-banner-workaround.patch similarity index 100% rename from Spigot-Server-Patches/0069-Waving-banner-workaround.patch rename to Spigot-Server-Patches/0068-Waving-banner-workaround.patch diff --git a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch similarity index 100% rename from Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch rename to Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch diff --git a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 93% rename from Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch rename to Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch index 9949e7e988..098d8d7228 100644 --- a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7de7b74ff69bba1cbad24623d7eeff6c79812bab..6ef0e1399e9ff260712db1a044068c125b1316d3 100644 +index d8b9d87bca6eb95c2cea91e4d8466b9792582d52..92d1dffbf436a21943b4a6aa0fabf54f064e6046 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -228,4 +228,12 @@ public class PaperWorldConfig { +@@ -223,4 +223,12 @@ public class PaperWorldConfig { log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate); log("Creative Arrow Despawn Rate: " + creativeArrowDespawnRate); } diff --git a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0071-Optimize-isValidLocation-getType-and-getBlockData-fo.patch similarity index 100% rename from Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch rename to Spigot-Server-Patches/0071-Optimize-isValidLocation-getType-and-getBlockData-fo.patch diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch similarity index 100% rename from Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch rename to Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch diff --git a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 100% rename from Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch rename to Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch diff --git a/Spigot-Server-Patches/0075-Configurable-Chunk-Inhabited-Time.patch b/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch similarity index 93% rename from Spigot-Server-Patches/0075-Configurable-Chunk-Inhabited-Time.patch rename to Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch index 3273ad6f68..ee7c5ebd1c 100644 --- a/Spigot-Server-Patches/0075-Configurable-Chunk-Inhabited-Time.patch +++ b/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch @@ -11,10 +11,10 @@ For people who want all chunks to be treated equally, you can chose a fixed valu This allows to fine-tune vanilla gameplay. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6ef0e1399e9ff260712db1a044068c125b1316d3..5872e6b171416686b11678ac9f65706b83b4e231 100644 +index 92d1dffbf436a21943b4a6aa0fabf54f064e6046..725958efab3dd05e04b7b18e169230762ef800d0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -236,4 +236,14 @@ public class PaperWorldConfig { +@@ -231,4 +231,14 @@ public class PaperWorldConfig { skeleHorseSpawnChance = 0.01D; // Vanilla value } } diff --git a/Spigot-Server-Patches/0076-EntityPathfindEvent.patch b/Spigot-Server-Patches/0075-EntityPathfindEvent.patch similarity index 100% rename from Spigot-Server-Patches/0076-EntityPathfindEvent.patch rename to Spigot-Server-Patches/0075-EntityPathfindEvent.patch diff --git a/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0076-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch rename to Spigot-Server-Patches/0076-Sanitise-RegionFileCache-and-make-configurable.patch diff --git a/Spigot-Server-Patches/0078-Do-not-load-chunks-for-Pathfinding.patch b/Spigot-Server-Patches/0077-Do-not-load-chunks-for-Pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0078-Do-not-load-chunks-for-Pathfinding.patch rename to Spigot-Server-Patches/0077-Do-not-load-chunks-for-Pathfinding.patch diff --git a/Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0078-Add-PlayerUseUnknownEntityEvent.patch similarity index 100% rename from Spigot-Server-Patches/0079-Add-PlayerUseUnknownEntityEvent.patch rename to Spigot-Server-Patches/0078-Add-PlayerUseUnknownEntityEvent.patch diff --git a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch similarity index 100% rename from Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch rename to Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch diff --git a/Spigot-Server-Patches/0081-Configurable-Grass-Spread-Tick-Rate.patch b/Spigot-Server-Patches/0080-Configurable-Grass-Spread-Tick-Rate.patch similarity index 92% rename from Spigot-Server-Patches/0081-Configurable-Grass-Spread-Tick-Rate.patch rename to Spigot-Server-Patches/0080-Configurable-Grass-Spread-Tick-Rate.patch index cb86ec9a43..8941bb9c17 100644 --- a/Spigot-Server-Patches/0081-Configurable-Grass-Spread-Tick-Rate.patch +++ b/Spigot-Server-Patches/0080-Configurable-Grass-Spread-Tick-Rate.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable Grass Spread Tick Rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5872e6b171416686b11678ac9f65706b83b4e231..47f5f8055ed45914309ca9a295ac48b89f192320 100644 +index 725958efab3dd05e04b7b18e169230762ef800d0..fe2c8001897dc6d66ce0d24ddb1a5d3b79810294 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -246,4 +246,10 @@ public class PaperWorldConfig { +@@ -241,4 +241,10 @@ public class PaperWorldConfig { } fixedInhabitedTime = getInt("fixed-chunk-inhabited-time", -1); } diff --git a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 100% rename from Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch diff --git a/Spigot-Server-Patches/0083-Remove-Debug-checks-from-DataBits.patch b/Spigot-Server-Patches/0082-Remove-Debug-checks-from-DataBits.patch similarity index 100% rename from Spigot-Server-Patches/0083-Remove-Debug-checks-from-DataBits.patch rename to Spigot-Server-Patches/0082-Remove-Debug-checks-from-DataBits.patch diff --git a/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch similarity index 95% rename from Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch rename to Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index defef8b05c..509722c2fb 100644 --- a/Spigot-Server-Patches/0084-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -12,10 +12,10 @@ for this on CB at one point but I can't find it. We may need to do this ourselves at some point in the future. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 47f5f8055ed45914309ca9a295ac48b89f192320..b1d1a3c1f84e0d2153de257183687502c8f393d1 100644 +index fe2c8001897dc6d66ce0d24ddb1a5d3b79810294..538e6751f3bda77ba32256158d2a6a25025b360c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -252,4 +252,9 @@ public class PaperWorldConfig { +@@ -247,4 +247,9 @@ public class PaperWorldConfig { grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate)); log("Grass Spread Tick Rate: " + grassUpdateRate); } diff --git a/Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch similarity index 100% rename from Spigot-Server-Patches/0085-Workaround-for-setting-passengers-on-players.patch rename to Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch diff --git a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch similarity index 100% rename from Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch rename to Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch diff --git a/Spigot-Server-Patches/0087-Don-t-tick-Skulls-unused-code.patch b/Spigot-Server-Patches/0086-Don-t-tick-Skulls-unused-code.patch similarity index 100% rename from Spigot-Server-Patches/0087-Don-t-tick-Skulls-unused-code.patch rename to Spigot-Server-Patches/0086-Don-t-tick-Skulls-unused-code.patch diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0087-Configurable-Player-Collision.patch similarity index 100% rename from Spigot-Server-Patches/0088-Configurable-Player-Collision.patch rename to Spigot-Server-Patches/0087-Configurable-Player-Collision.patch diff --git a/Spigot-Server-Patches/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 100% rename from Spigot-Server-Patches/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch diff --git a/Spigot-Server-Patches/0090-Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch similarity index 100% rename from Spigot-Server-Patches/0090-Configurable-RCON-IP-address.patch rename to Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch diff --git a/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/0090-Prevent-Fire-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch rename to Spigot-Server-Patches/0090-Prevent-Fire-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0092-Implement-PlayerLocaleChangeEvent.patch rename to Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch diff --git a/Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch similarity index 100% rename from Spigot-Server-Patches/0093-EntityRegainHealthEvent-isFastRegen-API.patch rename to Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch diff --git a/Spigot-Server-Patches/0094-Add-ability-to-configure-frosted_ice-properties.patch b/Spigot-Server-Patches/0093-Add-ability-to-configure-frosted_ice-properties.patch similarity index 95% rename from Spigot-Server-Patches/0094-Add-ability-to-configure-frosted_ice-properties.patch rename to Spigot-Server-Patches/0093-Add-ability-to-configure-frosted_ice-properties.patch index d321b0ce3c..ad1bf5bf27 100644 --- a/Spigot-Server-Patches/0094-Add-ability-to-configure-frosted_ice-properties.patch +++ b/Spigot-Server-Patches/0093-Add-ability-to-configure-frosted_ice-properties.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ability to configure frosted_ice properties diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b1d1a3c1f84e0d2153de257183687502c8f393d1..9e0c4895403a264f927292db2ac06b00731986e3 100644 +index 538e6751f3bda77ba32256158d2a6a25025b360c..fd3793c55b8021b9fc61ce6be585a8c9b477aba2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -257,4 +257,14 @@ public class PaperWorldConfig { +@@ -252,4 +252,14 @@ public class PaperWorldConfig { private void useVanillaScoreboardColoring() { useVanillaScoreboardColoring = getBoolean("use-vanilla-world-scoreboard-name-coloring", false); } diff --git a/Spigot-Server-Patches/0095-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch similarity index 100% rename from Spigot-Server-Patches/0095-remove-null-possibility-for-getServer-singleton.patch rename to Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch diff --git a/Spigot-Server-Patches/0096-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch similarity index 100% rename from Spigot-Server-Patches/0096-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch rename to Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch diff --git a/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch similarity index 99% rename from Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch rename to Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch index 4ac3e6edd0..3282a9fb1f 100644 --- a/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch @@ -11,10 +11,10 @@ This feature is good for long term worlds so that newer players do not suffer with "Every chest has been looted" diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9e0c4895403a264f927292db2ac06b00731986e3..6db1312035807c04b98408100fb0a5c04c07aff4 100644 +index fd3793c55b8021b9fc61ce6be585a8c9b477aba2..05ea87a473228f5b386258fae3943f3f4561eaa6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -267,4 +267,26 @@ public class PaperWorldConfig { +@@ -262,4 +262,26 @@ public class PaperWorldConfig { this.frostedIceDelayMax = this.getInt("frosted-ice.delay.max", this.frostedIceDelayMax); log("Frosted Ice: " + (this.frostedIceEnabled ? "enabled" : "disabled") + " / delay: min=" + this.frostedIceDelayMin + ", max=" + this.frostedIceDelayMax); } diff --git a/Spigot-Server-Patches/0098-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/0097-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch similarity index 100% rename from Spigot-Server-Patches/0098-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch rename to Spigot-Server-Patches/0097-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch diff --git a/Spigot-Server-Patches/0099-System-property-for-disabling-watchdoge.patch b/Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch similarity index 100% rename from Spigot-Server-Patches/0099-System-property-for-disabling-watchdoge.patch rename to Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch diff --git a/Spigot-Server-Patches/0100-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch similarity index 100% rename from Spigot-Server-Patches/0100-Optimize-UserCache-Thread-Safe.patch rename to Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch diff --git a/Spigot-Server-Patches/0101-Avoid-blocking-on-Network-Manager-creation.patch b/Spigot-Server-Patches/0100-Avoid-blocking-on-Network-Manager-creation.patch similarity index 100% rename from Spigot-Server-Patches/0101-Avoid-blocking-on-Network-Manager-creation.patch rename to Spigot-Server-Patches/0100-Avoid-blocking-on-Network-Manager-creation.patch diff --git a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0101-Optional-TNT-doesn-t-move-in-water.patch similarity index 96% rename from Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch rename to Spigot-Server-Patches/0101-Optional-TNT-doesn-t-move-in-water.patch index 6c71ab72c3..ec0aca043a 100644 --- a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/0101-Optional-TNT-doesn-t-move-in-water.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optional TNT doesn't move in water diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6db1312035807c04b98408100fb0a5c04c07aff4..8cf3076f4e0d8d7e81158881c763f89ebda7e678 100644 +index 05ea87a473228f5b386258fae3943f3f4561eaa6..ac76bdd7e1d91b0d242539c4495948cdfbb622e0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -2,7 +2,6 @@ package com.destroystokyo.paper; @@ -16,7 +16,7 @@ index 6db1312035807c04b98408100fb0a5c04c07aff4..8cf3076f4e0d8d7e81158881c763f89e import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -289,4 +288,14 @@ public class PaperWorldConfig { +@@ -284,4 +283,14 @@ public class PaperWorldConfig { ); } } diff --git a/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/0102-Faster-redstone-torch-rapid-clock-removal.patch similarity index 100% rename from Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch rename to Spigot-Server-Patches/0102-Faster-redstone-torch-rapid-clock-removal.patch diff --git a/Spigot-Server-Patches/0104-Add-server-name-parameter.patch b/Spigot-Server-Patches/0103-Add-server-name-parameter.patch similarity index 100% rename from Spigot-Server-Patches/0104-Add-server-name-parameter.patch rename to Spigot-Server-Patches/0103-Add-server-name-parameter.patch diff --git a/Spigot-Server-Patches/0105-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/0104-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch similarity index 100% rename from Spigot-Server-Patches/0105-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch rename to Spigot-Server-Patches/0104-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch diff --git a/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch similarity index 100% rename from Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch rename to Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch diff --git a/Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/0106-Fix-Old-Sign-Conversion.patch similarity index 100% rename from Spigot-Server-Patches/0107-Fix-Old-Sign-Conversion.patch rename to Spigot-Server-Patches/0106-Fix-Old-Sign-Conversion.patch diff --git a/Spigot-Server-Patches/0108-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/0107-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch similarity index 100% rename from Spigot-Server-Patches/0108-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch rename to Spigot-Server-Patches/0107-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch diff --git a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch similarity index 100% rename from Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch rename to Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch diff --git a/Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch b/Spigot-Server-Patches/0109-Optimise-BlockState-s-hashCode-equals.patch similarity index 100% rename from Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch rename to Spigot-Server-Patches/0109-Optimise-BlockState-s-hashCode-equals.patch diff --git a/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch similarity index 100% rename from Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch rename to Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch diff --git a/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch similarity index 100% rename from Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch rename to Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch diff --git a/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0112-Chunk-registration-fixes.patch similarity index 100% rename from Spigot-Server-Patches/0113-Chunk-registration-fixes.patch rename to Spigot-Server-Patches/0112-Chunk-registration-fixes.patch diff --git a/Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch similarity index 100% rename from Spigot-Server-Patches/0114-Remove-FishingHook-reference-on-Craft-Entity-removal.patch rename to Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch diff --git a/Spigot-Server-Patches/0115-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch similarity index 91% rename from Spigot-Server-Patches/0115-Auto-fix-bad-Y-levels-on-player-login.patch rename to Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch index f700b81317..b523521a58 100644 --- a/Spigot-Server-Patches/0115-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 898ac661042381b99b98991f493538c0433ddb09..69178bcfa328b79e8433805b650948fadc7b799b 100644 +index 177f865688c40d0ecca72771007e2271626ab5cc..b7f7dd59fd9deaff9ec3797b395c91c91ce5b54c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -206,6 +206,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0116-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch similarity index 92% rename from Spigot-Server-Patches/0116-Option-to-remove-corrupt-tile-entities.patch rename to Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch index bc6c0cfd22..4fc8b4c766 100644 --- a/Spigot-Server-Patches/0116-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option to remove corrupt tile entities diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 8cf3076f4e0d8d7e81158881c763f89ebda7e678..721eceeffc843da8b9da1ccc2d07f3bcc901db76 100644 +index ac76bdd7e1d91b0d242539c4495948cdfbb622e0..6cb717a63f52d757b0b323408d2fc0c3d7db77da 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -298,4 +298,9 @@ public class PaperWorldConfig { +@@ -293,4 +293,9 @@ public class PaperWorldConfig { preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false); log("Prevent TNT from moving in water: " + preventTntFromMovingInWater); } diff --git a/Spigot-Server-Patches/0117-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch similarity index 100% rename from Spigot-Server-Patches/0117-Add-EntityZapEvent.patch rename to Spigot-Server-Patches/0116-Add-EntityZapEvent.patch diff --git a/Spigot-Server-Patches/0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/0117-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch similarity index 94% rename from Spigot-Server-Patches/0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch rename to Spigot-Server-Patches/0117-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index 0e52d401fa..bcf6ae9288 100644 --- a/Spigot-Server-Patches/0118-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/Spigot-Server-Patches/0117-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 721eceeffc843da8b9da1ccc2d07f3bcc901db76..bff2e9d26dc8057c3950d1b57ee2e7469e7f943c 100644 +index 6cb717a63f52d757b0b323408d2fc0c3d7db77da..e43aee3757b6765d898b50ebfff1a28071638558 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -2,6 +2,7 @@ package com.destroystokyo.paper; @@ -16,7 +16,7 @@ index 721eceeffc843da8b9da1ccc2d07f3bcc901db76..bff2e9d26dc8057c3950d1b57ee2e746 import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -303,4 +304,12 @@ public class PaperWorldConfig { +@@ -298,4 +299,12 @@ public class PaperWorldConfig { private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); } diff --git a/Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch similarity index 100% rename from Spigot-Server-Patches/0119-Cache-user-authenticator-threads.patch rename to Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch diff --git a/Spigot-Server-Patches/0120-Optimise-removeQueue.patch b/Spigot-Server-Patches/0119-Optimise-removeQueue.patch similarity index 100% rename from Spigot-Server-Patches/0120-Optimise-removeQueue.patch rename to Spigot-Server-Patches/0119-Optimise-removeQueue.patch diff --git a/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch similarity index 100% rename from Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch rename to Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch diff --git a/Spigot-Server-Patches/0122-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0122-Add-source-to-PlayerExpChangeEvent.patch rename to Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch diff --git a/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch similarity index 100% rename from Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch rename to Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch diff --git a/Spigot-Server-Patches/0124-Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch similarity index 100% rename from Spigot-Server-Patches/0124-Add-ProjectileCollideEvent.patch rename to Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch diff --git a/Spigot-Server-Patches/0125-Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/0124-Prevent-Pathfinding-out-of-World-Border.patch similarity index 100% rename from Spigot-Server-Patches/0125-Prevent-Pathfinding-out-of-World-Border.patch rename to Spigot-Server-Patches/0124-Prevent-Pathfinding-out-of-World-Border.patch diff --git a/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0125-Optimize-World.isLoaded-BlockPosition-Z.patch similarity index 100% rename from Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch rename to Spigot-Server-Patches/0125-Optimize-World.isLoaded-BlockPosition-Z.patch diff --git a/Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0126-Bound-Treasure-Maps-to-World-Border.patch similarity index 100% rename from Spigot-Server-Patches/0127-Bound-Treasure-Maps-to-World-Border.patch rename to Spigot-Server-Patches/0126-Bound-Treasure-Maps-to-World-Border.patch diff --git a/Spigot-Server-Patches/0128-Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/0127-Configurable-Cartographer-Treasure-Maps.patch similarity index 95% rename from Spigot-Server-Patches/0128-Configurable-Cartographer-Treasure-Maps.patch rename to Spigot-Server-Patches/0127-Configurable-Cartographer-Treasure-Maps.patch index f46bdadca6..f55d2be9cd 100644 --- a/Spigot-Server-Patches/0128-Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/0127-Configurable-Cartographer-Treasure-Maps.patch @@ -9,10 +9,10 @@ Also allow turning off treasure maps all together as they can eat up Map ID's which are limited in quantity. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bff2e9d26dc8057c3950d1b57ee2e7469e7f943c..f164844f339793860e773c499443ce160d0a6830 100644 +index e43aee3757b6765d898b50ebfff1a28071638558..255b4081314162cbe344b008158c6f4584795fb8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -312,4 +312,14 @@ public class PaperWorldConfig { +@@ -307,4 +307,14 @@ public class PaperWorldConfig { Bukkit.getLogger().warning("Spawn Egg and Armor Stand NBT filtering disabled, this is a potential security risk"); } } diff --git a/Spigot-Server-Patches/0129-Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch similarity index 100% rename from Spigot-Server-Patches/0129-Optimize-ItemStack.isEmpty.patch rename to Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch diff --git a/Spigot-Server-Patches/0130-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 100% rename from Spigot-Server-Patches/0130-Add-API-methods-to-control-if-armour-stands-can-move.patch rename to Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch diff --git a/Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch similarity index 100% rename from Spigot-Server-Patches/0131-Properly-fix-item-duplication-bug.patch rename to Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch diff --git a/Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch similarity index 100% rename from Spigot-Server-Patches/0132-String-based-Action-Bar-API.patch rename to Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch diff --git a/Spigot-Server-Patches/0133-Firework-API-s.patch b/Spigot-Server-Patches/0132-Firework-API-s.patch similarity index 100% rename from Spigot-Server-Patches/0133-Firework-API-s.patch rename to Spigot-Server-Patches/0132-Firework-API-s.patch diff --git a/Spigot-Server-Patches/0134-PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0133-PlayerTeleportEndGatewayEvent.patch similarity index 100% rename from Spigot-Server-Patches/0134-PlayerTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0133-PlayerTeleportEndGatewayEvent.patch diff --git a/Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 100% rename from Spigot-Server-Patches/0135-Provide-E-TE-Chunk-count-stat-methods.patch rename to Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch diff --git a/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch similarity index 100% rename from Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch rename to Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch diff --git a/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch similarity index 100% rename from Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch rename to Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch diff --git a/Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 100% rename from Spigot-Server-Patches/0138-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch diff --git a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch similarity index 95% rename from Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch rename to Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch index 89ff13d7bd..a71d865565 100644 --- a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch @@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped. You can set this to 0 to disable collisions. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f164844f339793860e773c499443ce160d0a6830..751551f173338217f6682532a9a5e1a269415177 100644 +index 255b4081314162cbe344b008158c6f4584795fb8..04ee0856a8c62e1afb438d4fddf40e605e82a074 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -322,4 +322,10 @@ public class PaperWorldConfig { +@@ -317,4 +317,10 @@ public class PaperWorldConfig { log("Treasure Maps will return already discovered locations"); } } diff --git a/Spigot-Server-Patches/0140-Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch similarity index 100% rename from Spigot-Server-Patches/0140-Remove-CraftScheduler-Async-Task-Debugger.patch rename to Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch diff --git a/Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch similarity index 100% rename from Spigot-Server-Patches/0141-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch rename to Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch diff --git a/Spigot-Server-Patches/0142-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch similarity index 100% rename from Spigot-Server-Patches/0142-Do-not-let-armorstands-drown.patch rename to Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch diff --git a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch similarity index 100% rename from Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch rename to Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch diff --git a/Spigot-Server-Patches/0144-Add-system-property-to-disable-book-size-limits.patch b/Spigot-Server-Patches/0143-Add-system-property-to-disable-book-size-limits.patch similarity index 100% rename from Spigot-Server-Patches/0144-Add-system-property-to-disable-book-size-limits.patch rename to Spigot-Server-Patches/0143-Add-system-property-to-disable-book-size-limits.patch diff --git a/Spigot-Server-Patches/0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/0144-Add-option-to-make-parrots-stay-on-shoulders-despite.patch similarity index 95% rename from Spigot-Server-Patches/0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch rename to Spigot-Server-Patches/0144-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index 59d1e3b68d..4e0871e3eb 100644 --- a/Spigot-Server-Patches/0145-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/0144-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -11,10 +11,10 @@ I suspect Mojang may switch to this behavior before full release. To be converted into a Paper-API event at some point in the future? diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 751551f173338217f6682532a9a5e1a269415177..eae1690cc6db99b2f3af70a121f83b455b0fb20d 100644 +index 04ee0856a8c62e1afb438d4fddf40e605e82a074..0cc7ad571eba249199a2e5e8ec567a874241c903 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -328,4 +328,10 @@ public class PaperWorldConfig { +@@ -323,4 +323,10 @@ public class PaperWorldConfig { maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); log( "Max Entity Collisions: " + maxCollisionsPerEntity ); } diff --git a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch similarity index 100% rename from Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch rename to Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch diff --git a/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch similarity index 100% rename from Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch rename to Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch diff --git a/Spigot-Server-Patches/0148-provide-a-configurable-option-to-disable-creeper-lin.patch b/Spigot-Server-Patches/0147-provide-a-configurable-option-to-disable-creeper-lin.patch similarity index 92% rename from Spigot-Server-Patches/0148-provide-a-configurable-option-to-disable-creeper-lin.patch rename to Spigot-Server-Patches/0147-provide-a-configurable-option-to-disable-creeper-lin.patch index 51a0672e09..682daa1e7d 100644 --- a/Spigot-Server-Patches/0148-provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/Spigot-Server-Patches/0147-provide-a-configurable-option-to-disable-creeper-lin.patch @@ -6,10 +6,10 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eae1690cc6db99b2f3af70a121f83b455b0fb20d..39ab5457569684bc66cd67f5f9d2505ef9f304ab 100644 +index 0cc7ad571eba249199a2e5e8ec567a874241c903..e30f48caf2ce4f48f371b2594b765c27bc9e9778 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -334,4 +334,10 @@ public class PaperWorldConfig { +@@ -329,4 +329,10 @@ public class PaperWorldConfig { parrotsHangOnBetter = getBoolean("parrots-are-unaffected-by-player-movement", false); log("Parrots are unaffected by player movement: " + parrotsHangOnBetter); } diff --git a/Spigot-Server-Patches/0149-Item-canEntityPickup.patch b/Spigot-Server-Patches/0148-Item-canEntityPickup.patch similarity index 96% rename from Spigot-Server-Patches/0149-Item-canEntityPickup.patch rename to Spigot-Server-Patches/0148-Item-canEntityPickup.patch index 60f3a133e4..b8a554bc25 100644 --- a/Spigot-Server-Patches/0149-Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/0148-Item-canEntityPickup.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 2f85d9799d67d3fb1d340179d8dbd03771467329..e434e23bf5b22a623ed7b915711bdb31b7e90b61 100644 +index 9715f10c790c0210435622ab9997ac40f98da185..a6aa7a1a8da787604b2d8f3f9ea119d4b6bc188d 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -539,6 +539,11 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0150-PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-Server-Patches/0149-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 100% rename from Spigot-Server-Patches/0150-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to Spigot-Server-Patches/0149-PlayerPickupItemEvent-setFlyAtPlayer.patch diff --git a/Spigot-Server-Patches/0151-PlayerAttemptPickupItemEvent.patch b/Spigot-Server-Patches/0150-PlayerAttemptPickupItemEvent.patch similarity index 100% rename from Spigot-Server-Patches/0151-PlayerAttemptPickupItemEvent.patch rename to Spigot-Server-Patches/0150-PlayerAttemptPickupItemEvent.patch diff --git a/Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch similarity index 100% rename from Spigot-Server-Patches/0152-Add-UnknownCommandEvent.patch rename to Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch diff --git a/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch similarity index 100% rename from Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch rename to Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch diff --git a/Spigot-Server-Patches/0154-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch similarity index 100% rename from Spigot-Server-Patches/0154-Shoulder-Entities-Release-API.patch rename to Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch diff --git a/Spigot-Server-Patches/0155-Profile-Lookup-Events.patch b/Spigot-Server-Patches/0154-Profile-Lookup-Events.patch similarity index 100% rename from Spigot-Server-Patches/0155-Profile-Lookup-Events.patch rename to Spigot-Server-Patches/0154-Profile-Lookup-Events.patch diff --git a/Spigot-Server-Patches/0156-Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/0155-Block-player-logins-during-server-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0156-Block-player-logins-during-server-shutdown.patch rename to Spigot-Server-Patches/0155-Block-player-logins-during-server-shutdown.patch diff --git a/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0156-Entity-fromMobSpawner.patch similarity index 100% rename from Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch rename to Spigot-Server-Patches/0156-Entity-fromMobSpawner.patch diff --git a/Spigot-Server-Patches/0158-Improve-the-Saddle-API-for-Horses.patch b/Spigot-Server-Patches/0157-Improve-the-Saddle-API-for-Horses.patch similarity index 100% rename from Spigot-Server-Patches/0158-Improve-the-Saddle-API-for-Horses.patch rename to Spigot-Server-Patches/0157-Improve-the-Saddle-API-for-Horses.patch diff --git a/Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch similarity index 100% rename from Spigot-Server-Patches/0159-Implement-ensureServerConversions-API.patch rename to Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch diff --git a/Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch similarity index 100% rename from Spigot-Server-Patches/0160-Implement-getI18NDisplayName.patch rename to Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch diff --git a/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch similarity index 100% rename from Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch rename to Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch diff --git a/Spigot-Server-Patches/0162-Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch similarity index 100% rename from Spigot-Server-Patches/0162-Fix-this-stupid-bullshit.patch rename to Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch diff --git a/Spigot-Server-Patches/0163-Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/0162-Ocelot-despawns-should-honor-nametags-and-leash.patch similarity index 100% rename from Spigot-Server-Patches/0163-Ocelot-despawns-should-honor-nametags-and-leash.patch rename to Spigot-Server-Patches/0162-Ocelot-despawns-should-honor-nametags-and-leash.patch diff --git a/Spigot-Server-Patches/0164-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/Spigot-Server-Patches/0163-Reset-spawner-timer-when-spawner-event-is-cancelled.patch similarity index 100% rename from Spigot-Server-Patches/0164-Reset-spawner-timer-when-spawner-event-is-cancelled.patch rename to Spigot-Server-Patches/0163-Reset-spawner-timer-when-spawner-event-is-cancelled.patch diff --git a/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 100% rename from Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to Spigot-Server-Patches/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch diff --git a/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/0165-Allow-specifying-a-custom-authentication-servers-dow.patch similarity index 100% rename from Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch rename to Spigot-Server-Patches/0165-Allow-specifying-a-custom-authentication-servers-dow.patch diff --git a/Spigot-Server-Patches/0167-LivingEntity-setKiller.patch b/Spigot-Server-Patches/0166-LivingEntity-setKiller.patch similarity index 100% rename from Spigot-Server-Patches/0167-LivingEntity-setKiller.patch rename to Spigot-Server-Patches/0166-LivingEntity-setKiller.patch diff --git a/Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/0167-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch similarity index 100% rename from Spigot-Server-Patches/0168-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch rename to Spigot-Server-Patches/0167-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch diff --git a/Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/0168-Handle-plugin-prefixes-using-Log4J-configuration.patch similarity index 100% rename from Spigot-Server-Patches/0169-Handle-plugin-prefixes-using-Log4J-configuration.patch rename to Spigot-Server-Patches/0168-Handle-plugin-prefixes-using-Log4J-configuration.patch diff --git a/Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/0169-Include-Log4J2-SLF4J-implementation.patch similarity index 100% rename from Spigot-Server-Patches/0170-Include-Log4J2-SLF4J-implementation.patch rename to Spigot-Server-Patches/0169-Include-Log4J2-SLF4J-implementation.patch diff --git a/Spigot-Server-Patches/0171-Improve-Log4J-Configuration-Plugin-Loggers.patch b/Spigot-Server-Patches/0170-Improve-Log4J-Configuration-Plugin-Loggers.patch similarity index 100% rename from Spigot-Server-Patches/0171-Improve-Log4J-Configuration-Plugin-Loggers.patch rename to Spigot-Server-Patches/0170-Improve-Log4J-Configuration-Plugin-Loggers.patch diff --git a/Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0171-Add-PlayerJumpEvent.patch similarity index 100% rename from Spigot-Server-Patches/0172-Add-PlayerJumpEvent.patch rename to Spigot-Server-Patches/0171-Add-PlayerJumpEvent.patch diff --git a/Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0172-handle-PacketPlayInKeepAlive-async.patch similarity index 100% rename from Spigot-Server-Patches/0173-handle-PacketPlayInKeepAlive-async.patch rename to Spigot-Server-Patches/0172-handle-PacketPlayInKeepAlive-async.patch diff --git a/Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch similarity index 100% rename from Spigot-Server-Patches/0174-Expose-client-protocol-version-and-virtual-host.patch rename to Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch diff --git a/Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/0174-revert-serverside-behavior-of-keepalives.patch similarity index 100% rename from Spigot-Server-Patches/0175-revert-serverside-behavior-of-keepalives.patch rename to Spigot-Server-Patches/0174-revert-serverside-behavior-of-keepalives.patch diff --git a/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0175-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 100% rename from Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to Spigot-Server-Patches/0175-Send-attack-SoundEffects-only-to-players-who-can-see.patch diff --git a/Spigot-Server-Patches/0177-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 95% rename from Spigot-Server-Patches/0177-Option-for-maximum-exp-value-when-merging-orbs.patch rename to Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch index 07c0bd76f2..a2de8f3eec 100644 --- a/Spigot-Server-Patches/0177-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 39ab5457569684bc66cd67f5f9d2505ef9f304ab..d2582d981f859b55ba5086540963c01ed49e4c15 100644 +index e30f48caf2ce4f48f371b2594b765c27bc9e9778..2d8b354d707e8b5b0e7cd644fb93bc8f1c4009f1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -340,4 +340,10 @@ public class PaperWorldConfig { +@@ -335,4 +335,10 @@ public class PaperWorldConfig { disableCreeperLingeringEffect = getBoolean("disable-creeper-lingering-effect", false); log("Creeper lingering effect: " + disableCreeperLingeringEffect); } diff --git a/Spigot-Server-Patches/0178-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0177-Add-PlayerArmorChangeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0178-Add-PlayerArmorChangeEvent.patch rename to Spigot-Server-Patches/0177-Add-PlayerArmorChangeEvent.patch diff --git a/Spigot-Server-Patches/0179-Prevent-logins-from-being-processed-when-the-player-.patch b/Spigot-Server-Patches/0178-Prevent-logins-from-being-processed-when-the-player-.patch similarity index 100% rename from Spigot-Server-Patches/0179-Prevent-logins-from-being-processed-when-the-player-.patch rename to Spigot-Server-Patches/0178-Prevent-logins-from-being-processed-when-the-player-.patch diff --git a/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0179-use-CB-BlockState-implementations-for-captured-block.patch similarity index 100% rename from Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch rename to Spigot-Server-Patches/0179-use-CB-BlockState-implementations-for-captured-block.patch diff --git a/Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0180-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 100% rename from Spigot-Server-Patches/0181-API-to-get-a-BlockState-without-a-snapshot.patch rename to Spigot-Server-Patches/0180-API-to-get-a-BlockState-without-a-snapshot.patch diff --git a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0181-AsyncTabCompleteEvent.patch similarity index 100% rename from Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch rename to Spigot-Server-Patches/0181-AsyncTabCompleteEvent.patch diff --git a/Spigot-Server-Patches/0183-Avoid-NPE-in-PathfinderGoalTempt.patch b/Spigot-Server-Patches/0182-Avoid-NPE-in-PathfinderGoalTempt.patch similarity index 100% rename from Spigot-Server-Patches/0183-Avoid-NPE-in-PathfinderGoalTempt.patch rename to Spigot-Server-Patches/0182-Avoid-NPE-in-PathfinderGoalTempt.patch diff --git a/Spigot-Server-Patches/0184-PlayerPickupExperienceEvent.patch b/Spigot-Server-Patches/0183-PlayerPickupExperienceEvent.patch similarity index 100% rename from Spigot-Server-Patches/0184-PlayerPickupExperienceEvent.patch rename to Spigot-Server-Patches/0183-PlayerPickupExperienceEvent.patch diff --git a/Spigot-Server-Patches/0185-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0184-ExperienceOrbMergeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0185-ExperienceOrbMergeEvent.patch rename to Spigot-Server-Patches/0184-ExperienceOrbMergeEvent.patch diff --git a/Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch similarity index 100% rename from Spigot-Server-Patches/0186-Ability-to-apply-mending-to-XP-API.patch rename to Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch diff --git a/Spigot-Server-Patches/0187-Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/0186-Make-max-squid-spawn-height-configurable.patch similarity index 93% rename from Spigot-Server-Patches/0187-Make-max-squid-spawn-height-configurable.patch rename to Spigot-Server-Patches/0186-Make-max-squid-spawn-height-configurable.patch index a12846c612..e652242856 100644 --- a/Spigot-Server-Patches/0187-Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/0186-Make-max-squid-spawn-height-configurable.patch @@ -7,10 +7,10 @@ I don't know why upstream made only the minimum height configurable but whatever diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index d2582d981f859b55ba5086540963c01ed49e4c15..92e6891502ef6dc276ed5b371124f24d5237b26b 100644 +index 2d8b354d707e8b5b0e7cd644fb93bc8f1c4009f1..48fa2483fc657b36b8f2fd7d8b35703cff2698a5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -346,4 +346,9 @@ public class PaperWorldConfig { +@@ -341,4 +341,9 @@ public class PaperWorldConfig { expMergeMaxValue = getInt("experience-merge-max-value", -1); log("Experience Merge Max Value: " + expMergeMaxValue); } diff --git a/Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0187-PreCreatureSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0188-PreCreatureSpawnEvent.patch rename to Spigot-Server-Patches/0187-PreCreatureSpawnEvent.patch diff --git a/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0188-PlayerNaturallySpawnCreaturesEvent.patch similarity index 97% rename from Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch rename to Spigot-Server-Patches/0188-PlayerNaturallySpawnCreaturesEvent.patch index b6a7714d43..23191eda61 100644 --- a/Spigot-Server-Patches/0189-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0188-PlayerNaturallySpawnCreaturesEvent.patch @@ -29,7 +29,7 @@ index 7abd3683f9cc21b90dc74739954de2decddf6478..6921def2dc8dd7f2b8ba9d46ab697a9f Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 2fa8c3e2491ff5947a99374c0678694d833bf659..253dac9aff57f4311f8c3134caad760992bd340b 100644 +index 7227717f1ede5d67432f97f527c2d18f9d1c656f..6414ff3ca7e5f217268f7114f7ac751532444af6 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0190-Add-setPlayerProfile-API-for-Skulls.patch b/Spigot-Server-Patches/0189-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from Spigot-Server-Patches/0190-Add-setPlayerProfile-API-for-Skulls.patch rename to Spigot-Server-Patches/0189-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/Spigot-Server-Patches/0191-Fill-Profile-Property-Events.patch b/Spigot-Server-Patches/0190-Fill-Profile-Property-Events.patch similarity index 100% rename from Spigot-Server-Patches/0191-Fill-Profile-Property-Events.patch rename to Spigot-Server-Patches/0190-Fill-Profile-Property-Events.patch diff --git a/Spigot-Server-Patches/0192-PlayerAdvancementCriterionGrantEvent.patch b/Spigot-Server-Patches/0191-PlayerAdvancementCriterionGrantEvent.patch similarity index 100% rename from Spigot-Server-Patches/0192-PlayerAdvancementCriterionGrantEvent.patch rename to Spigot-Server-Patches/0191-PlayerAdvancementCriterionGrantEvent.patch diff --git a/Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch similarity index 100% rename from Spigot-Server-Patches/0193-Add-ArmorStand-Item-Meta.patch rename to Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch diff --git a/Spigot-Server-Patches/0194-Extend-Player-Interact-cancellation.patch b/Spigot-Server-Patches/0193-Extend-Player-Interact-cancellation.patch similarity index 100% rename from Spigot-Server-Patches/0194-Extend-Player-Interact-cancellation.patch rename to Spigot-Server-Patches/0193-Extend-Player-Interact-cancellation.patch diff --git a/Spigot-Server-Patches/0195-Tameable-getOwnerUniqueId-API.patch b/Spigot-Server-Patches/0194-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from Spigot-Server-Patches/0195-Tameable-getOwnerUniqueId-API.patch rename to Spigot-Server-Patches/0194-Tameable-getOwnerUniqueId-API.patch diff --git a/Spigot-Server-Patches/0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/0195-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 95% rename from Spigot-Server-Patches/0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to Spigot-Server-Patches/0195-Toggleable-player-crits-helps-mitigate-hacked-client.patch index 2e13a03729..5e0ca8f083 100644 --- a/Spigot-Server-Patches/0196-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/Spigot-Server-Patches/0195-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 92e6891502ef6dc276ed5b371124f24d5237b26b..77cdbfadf9c3eddb6a02460c321fa816d1bab8ac 100644 +index 48fa2483fc657b36b8f2fd7d8b35703cff2698a5..3804c7cf96087cdf94fd5fbdce4ebcdafa9e0019 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -187,6 +187,11 @@ public class PaperWorldConfig { diff --git a/Spigot-Server-Patches/0197-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch b/Spigot-Server-Patches/0196-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch similarity index 100% rename from Spigot-Server-Patches/0197-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch rename to Spigot-Server-Patches/0196-Fix-NPE-when-getting-location-from-InventoryEnderChe.patch diff --git a/Spigot-Server-Patches/0198-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/0197-Prevent-Frosted-Ice-from-loading-holding-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0198-Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename to Spigot-Server-Patches/0197-Prevent-Frosted-Ice-from-loading-holding-chunks.patch diff --git a/Spigot-Server-Patches/0199-Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/0198-Disable-Explicit-Network-Manager-Flushing.patch similarity index 100% rename from Spigot-Server-Patches/0199-Disable-Explicit-Network-Manager-Flushing.patch rename to Spigot-Server-Patches/0198-Disable-Explicit-Network-Manager-Flushing.patch diff --git a/Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch similarity index 100% rename from Spigot-Server-Patches/0200-Implement-extended-PaperServerListPingEvent.patch rename to Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch diff --git a/Spigot-Server-Patches/0201-Improved-Async-Task-Scheduler.patch b/Spigot-Server-Patches/0200-Improved-Async-Task-Scheduler.patch similarity index 100% rename from Spigot-Server-Patches/0201-Improved-Async-Task-Scheduler.patch rename to Spigot-Server-Patches/0200-Improved-Async-Task-Scheduler.patch diff --git a/Spigot-Server-Patches/0202-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/0201-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 100% rename from Spigot-Server-Patches/0202-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to Spigot-Server-Patches/0201-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch diff --git a/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch similarity index 100% rename from Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch rename to Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch diff --git a/Spigot-Server-Patches/0204-Fix-Dragon-Server-Crashes.patch b/Spigot-Server-Patches/0203-Fix-Dragon-Server-Crashes.patch similarity index 100% rename from Spigot-Server-Patches/0204-Fix-Dragon-Server-Crashes.patch rename to Spigot-Server-Patches/0203-Fix-Dragon-Server-Crashes.patch diff --git a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch similarity index 100% rename from Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch rename to Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch diff --git a/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/0205-Make-player-data-saving-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch rename to Spigot-Server-Patches/0205-Make-player-data-saving-configurable.patch diff --git a/Spigot-Server-Patches/0207-Make-legacy-ping-handler-more-reliable.patch b/Spigot-Server-Patches/0206-Make-legacy-ping-handler-more-reliable.patch similarity index 100% rename from Spigot-Server-Patches/0207-Make-legacy-ping-handler-more-reliable.patch rename to Spigot-Server-Patches/0206-Make-legacy-ping-handler-more-reliable.patch diff --git a/Spigot-Server-Patches/0208-Call-PaperServerListPingEvent-for-legacy-pings.patch b/Spigot-Server-Patches/0207-Call-PaperServerListPingEvent-for-legacy-pings.patch similarity index 100% rename from Spigot-Server-Patches/0208-Call-PaperServerListPingEvent-for-legacy-pings.patch rename to Spigot-Server-Patches/0207-Call-PaperServerListPingEvent-for-legacy-pings.patch diff --git a/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch similarity index 100% rename from Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch rename to Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch diff --git a/Spigot-Server-Patches/0210-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0209-Add-method-to-open-already-placed-sign.patch similarity index 100% rename from Spigot-Server-Patches/0210-Add-method-to-open-already-placed-sign.patch rename to Spigot-Server-Patches/0209-Add-method-to-open-already-placed-sign.patch diff --git a/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/0210-Configurable-sprint-interruption-on-attack.patch similarity index 92% rename from Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch rename to Spigot-Server-Patches/0210-Configurable-sprint-interruption-on-attack.patch index 4055fbd39f..cb50a1f5d1 100644 --- a/Spigot-Server-Patches/0211-Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/0210-Configurable-sprint-interruption-on-attack.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 77cdbfadf9c3eddb6a02460c321fa816d1bab8ac..171c8e3031cf4bf4da062663089cc0cb4552fab6 100644 +index 3804c7cf96087cdf94fd5fbdce4ebcdafa9e0019..873f81c74a94f6d76edd45e34ddc476dc525b47c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -356,4 +356,9 @@ public class PaperWorldConfig { +@@ -351,4 +351,9 @@ public class PaperWorldConfig { private void squidMaxSpawnHeight() { squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); } diff --git a/Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0211-Fix-exploit-that-allowed-colored-signs-to-be-created.patch similarity index 100% rename from Spigot-Server-Patches/0212-Fix-exploit-that-allowed-colored-signs-to-be-created.patch rename to Spigot-Server-Patches/0211-Fix-exploit-that-allowed-colored-signs-to-be-created.patch diff --git a/Spigot-Server-Patches/0213-EndermanEscapeEvent.patch b/Spigot-Server-Patches/0212-EndermanEscapeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0213-EndermanEscapeEvent.patch rename to Spigot-Server-Patches/0212-EndermanEscapeEvent.patch diff --git a/Spigot-Server-Patches/0214-Enderman.teleportRandomly.patch b/Spigot-Server-Patches/0213-Enderman.teleportRandomly.patch similarity index 100% rename from Spigot-Server-Patches/0214-Enderman.teleportRandomly.patch rename to Spigot-Server-Patches/0213-Enderman.teleportRandomly.patch diff --git a/Spigot-Server-Patches/0215-Block-Enderpearl-Travel-Exploit.patch b/Spigot-Server-Patches/0214-Block-Enderpearl-Travel-Exploit.patch similarity index 93% rename from Spigot-Server-Patches/0215-Block-Enderpearl-Travel-Exploit.patch rename to Spigot-Server-Patches/0214-Block-Enderpearl-Travel-Exploit.patch index d3f007cb38..f988c17ca0 100644 --- a/Spigot-Server-Patches/0215-Block-Enderpearl-Travel-Exploit.patch +++ b/Spigot-Server-Patches/0214-Block-Enderpearl-Travel-Exploit.patch @@ -12,10 +12,10 @@ This disables that by not saving the thrower when the chunk is unloaded. This is mainly useful for survival servers that do not allow freeform teleporting. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 171c8e3031cf4bf4da062663089cc0cb4552fab6..9c52e31f4cf1e64a37c65c021da219fc26dda137 100644 +index 873f81c74a94f6d76edd45e34ddc476dc525b47c..69009246f12cc3acb0055af746e01097fa668e1b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -361,4 +361,10 @@ public class PaperWorldConfig { +@@ -356,4 +356,10 @@ public class PaperWorldConfig { private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); } diff --git a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 100% rename from Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch rename to Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch diff --git a/Spigot-Server-Patches/0217-EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/0216-EndermanAttackPlayerEvent.patch similarity index 100% rename from Spigot-Server-Patches/0217-EndermanAttackPlayerEvent.patch rename to Spigot-Server-Patches/0216-EndermanAttackPlayerEvent.patch diff --git a/Spigot-Server-Patches/0218-WitchConsumePotionEvent.patch b/Spigot-Server-Patches/0217-WitchConsumePotionEvent.patch similarity index 100% rename from Spigot-Server-Patches/0218-WitchConsumePotionEvent.patch rename to Spigot-Server-Patches/0217-WitchConsumePotionEvent.patch diff --git a/Spigot-Server-Patches/0219-WitchThrowPotionEvent.patch b/Spigot-Server-Patches/0218-WitchThrowPotionEvent.patch similarity index 100% rename from Spigot-Server-Patches/0219-WitchThrowPotionEvent.patch rename to Spigot-Server-Patches/0218-WitchThrowPotionEvent.patch diff --git a/Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0219-Allow-spawning-Item-entities-with-World.spawnEntity.patch similarity index 100% rename from Spigot-Server-Patches/0220-Allow-spawning-Item-entities-with-World.spawnEntity.patch rename to Spigot-Server-Patches/0219-Allow-spawning-Item-entities-with-World.spawnEntity.patch diff --git a/Spigot-Server-Patches/0221-WitchReadyPotionEvent.patch b/Spigot-Server-Patches/0220-WitchReadyPotionEvent.patch similarity index 100% rename from Spigot-Server-Patches/0221-WitchReadyPotionEvent.patch rename to Spigot-Server-Patches/0220-WitchReadyPotionEvent.patch diff --git a/Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch similarity index 100% rename from Spigot-Server-Patches/0222-ItemStack-getMaxItemUseDuration.patch rename to Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch diff --git a/Spigot-Server-Patches/0223-Implement-EntityTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0222-Implement-EntityTeleportEndGatewayEvent.patch similarity index 100% rename from Spigot-Server-Patches/0223-Implement-EntityTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0222-Implement-EntityTeleportEndGatewayEvent.patch diff --git a/Spigot-Server-Patches/0224-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/Spigot-Server-Patches/0223-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 100% rename from Spigot-Server-Patches/0224-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to Spigot-Server-Patches/0223-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch diff --git a/Spigot-Server-Patches/0225-Fix-CraftEntity-hashCode.patch b/Spigot-Server-Patches/0224-Fix-CraftEntity-hashCode.patch similarity index 100% rename from Spigot-Server-Patches/0225-Fix-CraftEntity-hashCode.patch rename to Spigot-Server-Patches/0224-Fix-CraftEntity-hashCode.patch diff --git a/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/0225-Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 100% rename from Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch rename to Spigot-Server-Patches/0225-Configurable-Alternative-LootPool-Luck-Formula.patch diff --git a/Spigot-Server-Patches/0227-Print-Error-details-when-failing-to-save-player-data.patch b/Spigot-Server-Patches/0226-Print-Error-details-when-failing-to-save-player-data.patch similarity index 100% rename from Spigot-Server-Patches/0227-Print-Error-details-when-failing-to-save-player-data.patch rename to Spigot-Server-Patches/0226-Print-Error-details-when-failing-to-save-player-data.patch diff --git a/Spigot-Server-Patches/0228-Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/0227-Make-shield-blocking-delay-configurable.patch similarity index 95% rename from Spigot-Server-Patches/0228-Make-shield-blocking-delay-configurable.patch rename to Spigot-Server-Patches/0227-Make-shield-blocking-delay-configurable.patch index a8bb704890..43064f93fa 100644 --- a/Spigot-Server-Patches/0228-Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/0227-Make-shield-blocking-delay-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9c52e31f4cf1e64a37c65c021da219fc26dda137..33ce9a500430a01650e69a3568c8b03db325a936 100644 +index 69009246f12cc3acb0055af746e01097fa668e1b..35075ffac394153e28039809e0ed48fe066a6223 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -367,4 +367,9 @@ public class PaperWorldConfig { +@@ -362,4 +362,9 @@ public class PaperWorldConfig { disableEnderpearlExploit = getBoolean("game-mechanics.disable-unloaded-chunk-enderpearl-exploit", disableEnderpearlExploit); log("Disable Unloaded Chunk Enderpearl Exploit: " + (disableEnderpearlExploit ? "enabled" : "disabled")); } diff --git a/Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch similarity index 100% rename from Spigot-Server-Patches/0229-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch rename to Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch diff --git a/Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/0229-PlayerReadyArrowEvent.patch similarity index 100% rename from Spigot-Server-Patches/0230-PlayerReadyArrowEvent.patch rename to Spigot-Server-Patches/0229-PlayerReadyArrowEvent.patch diff --git a/Spigot-Server-Patches/0231-Fire-EntityShootBowEvent-for-Illusioner.patch b/Spigot-Server-Patches/0230-Fire-EntityShootBowEvent-for-Illusioner.patch similarity index 100% rename from Spigot-Server-Patches/0231-Fire-EntityShootBowEvent-for-Illusioner.patch rename to Spigot-Server-Patches/0230-Fire-EntityShootBowEvent-for-Illusioner.patch diff --git a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0231-Implement-EntityKnockbackByEntityEvent.patch similarity index 98% rename from Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch rename to Spigot-Server-Patches/0231-Implement-EntityKnockbackByEntityEvent.patch index f95ced4cfa..ee17ade14b 100644 --- a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0231-Implement-EntityKnockbackByEntityEvent.patch @@ -28,7 +28,7 @@ index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..08141147f9795546e9397abed95834ed // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index e434e23bf5b22a623ed7b915711bdb31b7e90b61..424157dcf536527e80faf5428f18f7e66d4216b6 100644 +index a6aa7a1a8da787604b2d8f3f9ea119d4b6bc188d..bb831658d91ffa7d78cd8597509e61f3f14b0890 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -1474,7 +1474,7 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0233-Expand-Explosions-API.patch b/Spigot-Server-Patches/0232-Expand-Explosions-API.patch similarity index 100% rename from Spigot-Server-Patches/0233-Expand-Explosions-API.patch rename to Spigot-Server-Patches/0232-Expand-Explosions-API.patch diff --git a/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0233-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 100% rename from Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch rename to Spigot-Server-Patches/0233-LivingEntity-Hand-Raised-Item-Use-API.patch diff --git a/Spigot-Server-Patches/0235-RangedEntity-API.patch b/Spigot-Server-Patches/0234-RangedEntity-API.patch similarity index 100% rename from Spigot-Server-Patches/0235-RangedEntity-API.patch rename to Spigot-Server-Patches/0234-RangedEntity-API.patch diff --git a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0235-Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 94% rename from Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch rename to Spigot-Server-Patches/0235-Add-config-to-disable-ender-dragon-legacy-check.patch index 621e22b74d..166e3a2751 100644 --- a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/0235-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config to disable ender dragon legacy check diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 33ce9a500430a01650e69a3568c8b03db325a936..cea15d50ed89430ee8d8cff9de21e1fc7982e1d8 100644 +index 35075ffac394153e28039809e0ed48fe066a6223..6352051ab937d4d365e823a7112e76dc3ec34225 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -372,4 +372,9 @@ public class PaperWorldConfig { +@@ -367,4 +367,9 @@ public class PaperWorldConfig { private void shieldBlockingDelay() { shieldBlockingDelay = getInt("game-mechanics.shield-blocking-delay", 5); } diff --git a/Spigot-Server-Patches/0237-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0236-Implement-World.getEntity-UUID-API.patch similarity index 100% rename from Spigot-Server-Patches/0237-Implement-World.getEntity-UUID-API.patch rename to Spigot-Server-Patches/0236-Implement-World.getEntity-UUID-API.patch diff --git a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch similarity index 100% rename from Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch rename to Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch diff --git a/Spigot-Server-Patches/0239-Configurable-Bed-Search-Radius.patch b/Spigot-Server-Patches/0238-Configurable-Bed-Search-Radius.patch similarity index 98% rename from Spigot-Server-Patches/0239-Configurable-Bed-Search-Radius.patch rename to Spigot-Server-Patches/0238-Configurable-Bed-Search-Radius.patch index 8219587132..4e8d577fbd 100644 --- a/Spigot-Server-Patches/0239-Configurable-Bed-Search-Radius.patch +++ b/Spigot-Server-Patches/0238-Configurable-Bed-Search-Radius.patch @@ -10,10 +10,10 @@ player at their bed should it of became obstructed. Defaults to vanilla 1. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cea15d50ed89430ee8d8cff9de21e1fc7982e1d8..387e0dcb9f01ad947daaa19211331a96742ce004 100644 +index 6352051ab937d4d365e823a7112e76dc3ec34225..d6a3d882e375ac5a2b6ec8920532db615f4fe4ef 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -377,4 +377,15 @@ public class PaperWorldConfig { +@@ -372,4 +372,15 @@ public class PaperWorldConfig { private void scanForLegacyEnderDragon() { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } diff --git a/Spigot-Server-Patches/0240-Vex-getSummoner-API.patch b/Spigot-Server-Patches/0239-Vex-getSummoner-API.patch similarity index 100% rename from Spigot-Server-Patches/0240-Vex-getSummoner-API.patch rename to Spigot-Server-Patches/0239-Vex-getSummoner-API.patch diff --git a/Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0240-Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 100% rename from Spigot-Server-Patches/0241-Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to Spigot-Server-Patches/0240-Refresh-player-inventory-when-cancelling-PlayerInter.patch diff --git a/Spigot-Server-Patches/0242-Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/0241-Don-t-change-the-Entity-Random-seed-for-squids.patch similarity index 100% rename from Spigot-Server-Patches/0242-Don-t-change-the-Entity-Random-seed-for-squids.patch rename to Spigot-Server-Patches/0241-Don-t-change-the-Entity-Random-seed-for-squids.patch diff --git a/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch similarity index 100% rename from Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch rename to Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch diff --git a/Spigot-Server-Patches/0244-Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/0243-Avoid-item-merge-if-stack-size-above-max-stack-size.patch similarity index 100% rename from Spigot-Server-Patches/0244-Avoid-item-merge-if-stack-size-above-max-stack-size.patch rename to Spigot-Server-Patches/0243-Avoid-item-merge-if-stack-size-above-max-stack-size.patch diff --git a/Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/0244-Use-asynchronous-Log4j-2-loggers.patch similarity index 100% rename from Spigot-Server-Patches/0245-Use-asynchronous-Log4j-2-loggers.patch rename to Spigot-Server-Patches/0244-Use-asynchronous-Log4j-2-loggers.patch diff --git a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0245-add-more-information-to-Entity.toString.patch similarity index 100% rename from Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch rename to Spigot-Server-Patches/0245-add-more-information-to-Entity.toString.patch diff --git a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 100% rename from Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch diff --git a/Spigot-Server-Patches/0248-EnderDragon-Events.patch b/Spigot-Server-Patches/0247-EnderDragon-Events.patch similarity index 100% rename from Spigot-Server-Patches/0248-EnderDragon-Events.patch rename to Spigot-Server-Patches/0247-EnderDragon-Events.patch diff --git a/Spigot-Server-Patches/0249-PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/0248-PlayerElytraBoostEvent.patch similarity index 100% rename from Spigot-Server-Patches/0249-PlayerElytraBoostEvent.patch rename to Spigot-Server-Patches/0248-PlayerElytraBoostEvent.patch diff --git a/Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch b/Spigot-Server-Patches/0249-Improve-BlockPosition-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0250-Improve-BlockPosition-inlining.patch rename to Spigot-Server-Patches/0249-Improve-BlockPosition-inlining.patch diff --git a/Spigot-Server-Patches/0251-Optimize-RegistryID.c.patch b/Spigot-Server-Patches/0250-Optimize-RegistryID.c.patch similarity index 100% rename from Spigot-Server-Patches/0251-Optimize-RegistryID.c.patch rename to Spigot-Server-Patches/0250-Optimize-RegistryID.c.patch diff --git a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0251-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 92% rename from Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to Spigot-Server-Patches/0251-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 79d3ed4320..d4131ade17 100644 --- a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0251-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 387e0dcb9f01ad947daaa19211331a96742ce004..eaaa51e4bf761f41fd516402ce1ad0f903c6ab71 100644 +index d6a3d882e375ac5a2b6ec8920532db615f4fe4ef..14bb9d843f05058cae5cc64de8149d2c97264f1a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -388,4 +388,9 @@ public class PaperWorldConfig { +@@ -383,4 +383,9 @@ public class PaperWorldConfig { log("Bed Search Radius: " + bedSearchRadius); } } diff --git a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch similarity index 100% rename from Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch rename to Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch diff --git a/Spigot-Server-Patches/0254-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/0253-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch similarity index 100% rename from Spigot-Server-Patches/0254-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch rename to Spigot-Server-Patches/0253-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch diff --git a/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0254-Add-some-Debug-to-Chunk-Entity-slices.patch similarity index 100% rename from Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch rename to Spigot-Server-Patches/0254-Add-some-Debug-to-Chunk-Entity-slices.patch diff --git a/Spigot-Server-Patches/0256-EntityTransformedEvent.patch b/Spigot-Server-Patches/0255-EntityTransformedEvent.patch similarity index 98% rename from Spigot-Server-Patches/0256-EntityTransformedEvent.patch rename to Spigot-Server-Patches/0255-EntityTransformedEvent.patch index 7ecaec4d42..b1f90ec94d 100644 --- a/Spigot-Server-Patches/0256-EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/0255-EntityTransformedEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EntityTransformedEvent diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 424157dcf536527e80faf5428f18f7e66d4216b6..c23e634dca6aab051b432a5fee2756afa80fb776 100644 +index bb831658d91ffa7d78cd8597509e61f3f14b0890..8a79302b9cc178bfe4e0909293e3a87c01d344ca 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -1244,6 +1244,7 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0257-SkeletonHorse-Additions.patch b/Spigot-Server-Patches/0256-SkeletonHorse-Additions.patch similarity index 100% rename from Spigot-Server-Patches/0257-SkeletonHorse-Additions.patch rename to Spigot-Server-Patches/0256-SkeletonHorse-Additions.patch diff --git a/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch rename to Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch diff --git a/Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 100% rename from Spigot-Server-Patches/0259-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch diff --git a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch similarity index 100% rename from Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch rename to Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch diff --git a/Spigot-Server-Patches/0261-Implement-Expanded-ArmorStand-API.patch b/Spigot-Server-Patches/0260-Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from Spigot-Server-Patches/0261-Implement-Expanded-ArmorStand-API.patch rename to Spigot-Server-Patches/0260-Implement-Expanded-ArmorStand-API.patch diff --git a/Spigot-Server-Patches/0262-AnvilDamageEvent.patch b/Spigot-Server-Patches/0261-AnvilDamageEvent.patch similarity index 100% rename from Spigot-Server-Patches/0262-AnvilDamageEvent.patch rename to Spigot-Server-Patches/0261-AnvilDamageEvent.patch diff --git a/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/0262-Add-TNTPrimeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch rename to Spigot-Server-Patches/0262-Add-TNTPrimeEvent.patch diff --git a/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0263-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch rename to Spigot-Server-Patches/0263-Break-up-and-make-tab-spam-limits-configurable.patch diff --git a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch similarity index 100% rename from Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch rename to Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch diff --git a/Spigot-Server-Patches/0266-MC-135506-Experience-should-save-as-Integers.patch b/Spigot-Server-Patches/0265-MC-135506-Experience-should-save-as-Integers.patch similarity index 100% rename from Spigot-Server-Patches/0266-MC-135506-Experience-should-save-as-Integers.patch rename to Spigot-Server-Patches/0265-MC-135506-Experience-should-save-as-Integers.patch diff --git a/Spigot-Server-Patches/0267-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch similarity index 100% rename from Spigot-Server-Patches/0267-Fix-client-rendering-skulls-from-same-user.patch rename to Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch diff --git a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 100% rename from Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch rename to Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch diff --git a/Spigot-Server-Patches/0269-Make-EnderDragon-implement-Mob.patch b/Spigot-Server-Patches/0268-Make-EnderDragon-implement-Mob.patch similarity index 100% rename from Spigot-Server-Patches/0269-Make-EnderDragon-implement-Mob.patch rename to Spigot-Server-Patches/0268-Make-EnderDragon-implement-Mob.patch diff --git a/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch similarity index 100% rename from Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch rename to Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch diff --git a/Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch b/Spigot-Server-Patches/0270-Use-a-Queue-for-Queueing-Commands.patch similarity index 100% rename from Spigot-Server-Patches/0271-Use-a-Queue-for-Queueing-Commands.patch rename to Spigot-Server-Patches/0270-Use-a-Queue-for-Queueing-Commands.patch diff --git a/Spigot-Server-Patches/0272-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-Server-Patches/0271-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 100% rename from Spigot-Server-Patches/0272-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to Spigot-Server-Patches/0271-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch diff --git a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/0272-Allow-disabling-armour-stand-ticking.patch similarity index 97% rename from Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch rename to Spigot-Server-Patches/0272-Allow-disabling-armour-stand-ticking.patch index 233fcd1150..7b562f594f 100644 --- a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-Server-Patches/0272-Allow-disabling-armour-stand-ticking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow disabling armour stand ticking diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..bc3df01aab3e79be9c2836820e0eacc69ea6c1f4 100644 +index 14bb9d843f05058cae5cc64de8149d2c97264f1a..661694da6cfbed5e3e26de2355e67a5a6d17a3fc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -393,4 +393,10 @@ public class PaperWorldConfig { +@@ -388,4 +388,10 @@ public class PaperWorldConfig { private void armorStandEntityLookups() { armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); } diff --git a/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0273-Optimize-BlockPosition-helper-methods.patch similarity index 100% rename from Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch rename to Spigot-Server-Patches/0273-Optimize-BlockPosition-helper-methods.patch diff --git a/Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch b/Spigot-Server-Patches/0274-Restore-vanlla-default-mob-spawn-range.patch similarity index 100% rename from Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch rename to Spigot-Server-Patches/0274-Restore-vanlla-default-mob-spawn-range.patch diff --git a/Spigot-Server-Patches/0276-Fix-MC-124320.patch b/Spigot-Server-Patches/0275-Fix-MC-124320.patch similarity index 100% rename from Spigot-Server-Patches/0276-Fix-MC-124320.patch rename to Spigot-Server-Patches/0275-Fix-MC-124320.patch diff --git a/Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0276-Slime-Pathfinder-Events.patch similarity index 100% rename from Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch rename to Spigot-Server-Patches/0276-Slime-Pathfinder-Events.patch diff --git a/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch similarity index 95% rename from Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch rename to Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch index 32045df15b..f5c9d3c60c 100644 --- a/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable speed for water flowing over lava diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bc3df01aab3e79be9c2836820e0eacc69ea6c1f4..487b0d5cd608e84a793eba5fdbd50a9f3d95c79b 100644 +index 661694da6cfbed5e3e26de2355e67a5a6d17a3fc..37bd28f18d3f48767d8141bde3395b8443d5650a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -399,4 +399,10 @@ public class PaperWorldConfig { +@@ -394,4 +394,10 @@ public class PaperWorldConfig { this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); } diff --git a/Spigot-Server-Patches/0279-Optimize-CraftBlockData-Creation.patch b/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch similarity index 100% rename from Spigot-Server-Patches/0279-Optimize-CraftBlockData-Creation.patch rename to Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch diff --git a/Spigot-Server-Patches/0280-Optimize-RegistryMaterials.patch b/Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch similarity index 100% rename from Spigot-Server-Patches/0280-Optimize-RegistryMaterials.patch rename to Spigot-Server-Patches/0279-Optimize-RegistryMaterials.patch diff --git a/Spigot-Server-Patches/0281-Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/0280-Add-PhantomPreSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0281-Add-PhantomPreSpawnEvent.patch rename to Spigot-Server-Patches/0280-Add-PhantomPreSpawnEvent.patch diff --git a/Spigot-Server-Patches/0282-Add-More-Creeper-API.patch b/Spigot-Server-Patches/0281-Add-More-Creeper-API.patch similarity index 100% rename from Spigot-Server-Patches/0282-Add-More-Creeper-API.patch rename to Spigot-Server-Patches/0281-Add-More-Creeper-API.patch diff --git a/Spigot-Server-Patches/0283-Inventory-removeItemAnySlot.patch b/Spigot-Server-Patches/0282-Inventory-removeItemAnySlot.patch similarity index 100% rename from Spigot-Server-Patches/0283-Inventory-removeItemAnySlot.patch rename to Spigot-Server-Patches/0282-Inventory-removeItemAnySlot.patch diff --git a/Spigot-Server-Patches/0284-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 100% rename from Spigot-Server-Patches/0284-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch diff --git a/Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 100% rename from Spigot-Server-Patches/0285-Add-ray-tracing-methods-to-LivingEntity.patch rename to Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch diff --git a/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch similarity index 100% rename from Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch rename to Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch diff --git a/Spigot-Server-Patches/0287-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch similarity index 99% rename from Spigot-Server-Patches/0287-Improve-death-events.patch rename to Spigot-Server-Patches/0286-Improve-death-events.patch index 3f3c7958c4..f18da62adc 100644 --- a/Spigot-Server-Patches/0287-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -279,7 +279,7 @@ index 4b249a644c680a7cc64b0d31cf453f94ff2b6a0c..d6a98bb7fc107649c179cded2d37c06a return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index e050f21fb74ff28e1f18894dc5c9452e2c280c45..8719381d942789bf80f4b0394cec12e7394ce871 100644 +index 8a9a287074f2e91488f91ec9d8a7687c92f72099..b360077d72afafcaa23c438eb073b9286c8fb563 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -80,6 +80,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 100% rename from Spigot-Server-Patches/0288-Allow-chests-to-be-placed-with-NBT-data.patch rename to Spigot-Server-Patches/0287-Allow-chests-to-be-placed-with-NBT-data.patch diff --git a/Spigot-Server-Patches/0289-Mob-Pathfinding-API.patch b/Spigot-Server-Patches/0288-Mob-Pathfinding-API.patch similarity index 100% rename from Spigot-Server-Patches/0289-Mob-Pathfinding-API.patch rename to Spigot-Server-Patches/0288-Mob-Pathfinding-API.patch diff --git a/Spigot-Server-Patches/0290-Prevent-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/0289-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 100% rename from Spigot-Server-Patches/0290-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to Spigot-Server-Patches/0289-Prevent-chunk-loading-from-Fluid-Flowing.patch diff --git a/Spigot-Server-Patches/0291-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 100% rename from Spigot-Server-Patches/0291-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch diff --git a/Spigot-Server-Patches/0292-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0292-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to Spigot-Server-Patches/0291-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch diff --git a/Spigot-Server-Patches/0293-Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0293-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to Spigot-Server-Patches/0292-Prevent-mob-spawning-from-loading-generating-chunks.patch diff --git a/Spigot-Server-Patches/0294-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from Spigot-Server-Patches/0294-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/Spigot-Server-Patches/0295-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/0294-Implement-furnace-cook-speed-multiplier-API.patch similarity index 100% rename from Spigot-Server-Patches/0295-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-Server-Patches/0294-Implement-furnace-cook-speed-multiplier-API.patch diff --git a/Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/0295-PreSpawnerSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch rename to Spigot-Server-Patches/0295-PreSpawnerSpawnEvent.patch diff --git a/Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0296-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 100% rename from Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0296-Catch-JsonParseException-in-Entity-and-TE-names.patch diff --git a/Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0297-Honor-EntityAgeable.ageLock.patch similarity index 100% rename from Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0297-Honor-EntityAgeable.ageLock.patch diff --git a/Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch similarity index 100% rename from Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch diff --git a/Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0299-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0299-Hook-into-CB-plugin-rewrites.patch diff --git a/Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0300-Allow-setting-the-vex-s-summoner.patch similarity index 100% rename from Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0300-Allow-setting-the-vex-s-summoner.patch diff --git a/Spigot-Server-Patches/0302-Add-sun-related-API.patch b/Spigot-Server-Patches/0301-Add-sun-related-API.patch similarity index 95% rename from Spigot-Server-Patches/0302-Add-sun-related-API.patch rename to Spigot-Server-Patches/0301-Add-sun-related-API.patch index f2a4068ec2..bfeffc40f8 100644 --- a/Spigot-Server-Patches/0302-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0301-Add-sun-related-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index c23e634dca6aab051b432a5fee2756afa80fb776..5a61167999f7d2fc271659762de9f4e861564542 100644 +index 8a79302b9cc178bfe4e0909293e3a87c01d344ca..e0ecdb8f87ec82b97a056c8f6d91d6a86f37bd34 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -1504,6 +1504,7 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0303-Turtle-API.patch b/Spigot-Server-Patches/0302-Turtle-API.patch similarity index 100% rename from Spigot-Server-Patches/0303-Turtle-API.patch rename to Spigot-Server-Patches/0302-Turtle-API.patch diff --git a/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 100% rename from Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to Spigot-Server-Patches/0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch diff --git a/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch similarity index 100% rename from Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch rename to Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch diff --git a/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch similarity index 100% rename from Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch diff --git a/Spigot-Server-Patches/0307-Add-more-Witch-API.patch b/Spigot-Server-Patches/0306-Add-more-Witch-API.patch similarity index 100% rename from Spigot-Server-Patches/0307-Add-more-Witch-API.patch rename to Spigot-Server-Patches/0306-Add-more-Witch-API.patch diff --git a/Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 100% rename from Spigot-Server-Patches/0308-Check-Drowned-for-Villager-Aggression-Config.patch rename to Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch diff --git a/Spigot-Server-Patches/0309-Here-s-Johnny.patch b/Spigot-Server-Patches/0308-Here-s-Johnny.patch similarity index 100% rename from Spigot-Server-Patches/0309-Here-s-Johnny.patch rename to Spigot-Server-Patches/0308-Here-s-Johnny.patch diff --git a/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 96% rename from Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch index d91eb34e74..ec2778b10f 100644 --- a/Spigot-Server-Patches/0310-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b49a1a6f5017c9e183a7d08b16e89899c25a9717 100644 +index 37bd28f18d3f48767d8141bde3395b8443d5650a..a73b88d51608ce94f6e4c9013c8c4de97523fe42 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -405,4 +405,9 @@ public class PaperWorldConfig { +@@ -400,4 +400,9 @@ public class PaperWorldConfig { waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5); log("Water over lava flow speed: " + waterOverLavaFlowSpeed); } diff --git a/Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch similarity index 100% rename from Spigot-Server-Patches/0311-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch diff --git a/Spigot-Server-Patches/0312-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from Spigot-Server-Patches/0312-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/Spigot-Server-Patches/0313-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 100% rename from Spigot-Server-Patches/0313-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch diff --git a/Spigot-Server-Patches/0314-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0313-Optimize-World-Time-Updates.patch similarity index 100% rename from Spigot-Server-Patches/0314-Optimize-World-Time-Updates.patch rename to Spigot-Server-Patches/0313-Optimize-World-Time-Updates.patch diff --git a/Spigot-Server-Patches/0315-Restore-custom-InventoryHolder-support.patch b/Spigot-Server-Patches/0314-Restore-custom-InventoryHolder-support.patch similarity index 100% rename from Spigot-Server-Patches/0315-Restore-custom-InventoryHolder-support.patch rename to Spigot-Server-Patches/0314-Restore-custom-InventoryHolder-support.patch diff --git a/Spigot-Server-Patches/0316-Use-Vanilla-Minecart-Speeds.patch b/Spigot-Server-Patches/0315-Use-Vanilla-Minecart-Speeds.patch similarity index 100% rename from Spigot-Server-Patches/0316-Use-Vanilla-Minecart-Speeds.patch rename to Spigot-Server-Patches/0315-Use-Vanilla-Minecart-Speeds.patch diff --git a/Spigot-Server-Patches/0317-Fix-SpongeAbsortEvent-handling.patch b/Spigot-Server-Patches/0316-Fix-SpongeAbsortEvent-handling.patch similarity index 100% rename from Spigot-Server-Patches/0317-Fix-SpongeAbsortEvent-handling.patch rename to Spigot-Server-Patches/0316-Fix-SpongeAbsortEvent-handling.patch diff --git a/Spigot-Server-Patches/0318-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0317-Don-t-allow-digging-into-unloaded-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0318-Don-t-allow-digging-into-unloaded-chunks.patch rename to Spigot-Server-Patches/0317-Don-t-allow-digging-into-unloaded-chunks.patch diff --git a/Spigot-Server-Patches/0319-Book-Size-Limits.patch b/Spigot-Server-Patches/0318-Book-Size-Limits.patch similarity index 100% rename from Spigot-Server-Patches/0319-Book-Size-Limits.patch rename to Spigot-Server-Patches/0318-Book-Size-Limits.patch diff --git a/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch rename to Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch diff --git a/Spigot-Server-Patches/0321-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0320-Prevent-rayTrace-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0321-Prevent-rayTrace-from-loading-chunks.patch rename to Spigot-Server-Patches/0320-Prevent-rayTrace-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0322-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0321-Handle-Large-Packets-disconnecting-client.patch similarity index 100% rename from Spigot-Server-Patches/0322-Handle-Large-Packets-disconnecting-client.patch rename to Spigot-Server-Patches/0321-Handle-Large-Packets-disconnecting-client.patch diff --git a/Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch similarity index 100% rename from Spigot-Server-Patches/0323-force-entity-dismount-during-teleportation.patch rename to Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch diff --git a/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch similarity index 98% rename from Spigot-Server-Patches/0324-Add-more-Zombie-API.patch rename to Spigot-Server-Patches/0323-Add-more-Zombie-API.patch index 27cb3458af..e6ce345f90 100644 --- a/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 5a61167999f7d2fc271659762de9f4e861564542..513c987a56e8d2bda0bda8771285c7c8d5ca88e1 100644 +index e0ecdb8f87ec82b97a056c8f6d91d6a86f37bd34..5e9a05dfe822c42b83da84a154fe881d57ac1689 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -1418,6 +1418,8 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0325-Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/0324-Add-PlayerConnectionCloseEvent.patch similarity index 100% rename from Spigot-Server-Patches/0325-Add-PlayerConnectionCloseEvent.patch rename to Spigot-Server-Patches/0324-Add-PlayerConnectionCloseEvent.patch diff --git a/Spigot-Server-Patches/0326-Prevent-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/0325-Prevent-Enderman-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0326-Prevent-Enderman-from-loading-chunks.patch rename to Spigot-Server-Patches/0325-Prevent-Enderman-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 98% rename from Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 77245a2098..c03da8ed46 100644 --- a/Spigot-Server-Patches/0327-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 80a9faf3b02c51efc1f55beebce173309628b9ab..ccf1a64d33038a73360f68a814bd46023c549cd2 100644 +index 76eff7dcb734f366b515d13a4a693adaa23695ad..af4fd8beab932589a832c7f4916bc669376a6615 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -80,6 +80,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch b/Spigot-Server-Patches/0327-Fix-PlayerEditBookEvent.patch similarity index 100% rename from Spigot-Server-Patches/0328-Fix-PlayerEditBookEvent.patch rename to Spigot-Server-Patches/0327-Fix-PlayerEditBookEvent.patch diff --git a/Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 100% rename from Spigot-Server-Patches/0329-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to Spigot-Server-Patches/0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch diff --git a/Spigot-Server-Patches/0330-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch b/Spigot-Server-Patches/0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch similarity index 100% rename from Spigot-Server-Patches/0330-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch rename to Spigot-Server-Patches/0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch diff --git a/Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch similarity index 100% rename from Spigot-Server-Patches/0331-Block-Entity-remove-from-being-called-on-Players.patch rename to Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch diff --git a/Spigot-Server-Patches/0332-BlockDestroyEvent.patch b/Spigot-Server-Patches/0331-BlockDestroyEvent.patch similarity index 100% rename from Spigot-Server-Patches/0332-BlockDestroyEvent.patch rename to Spigot-Server-Patches/0331-BlockDestroyEvent.patch diff --git a/Spigot-Server-Patches/0333-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/Spigot-Server-Patches/0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 100% rename from Spigot-Server-Patches/0333-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to Spigot-Server-Patches/0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch diff --git a/Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0333-Fix-sign-edit-memory-leak.patch similarity index 100% rename from Spigot-Server-Patches/0334-Fix-sign-edit-memory-leak.patch rename to Spigot-Server-Patches/0333-Fix-sign-edit-memory-leak.patch diff --git a/Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0334-Limit-Client-Sign-length-more.patch similarity index 100% rename from Spigot-Server-Patches/0335-Limit-Client-Sign-length-more.patch rename to Spigot-Server-Patches/0334-Limit-Client-Sign-length-more.patch diff --git a/Spigot-Server-Patches/0336-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/Spigot-Server-Patches/0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch similarity index 100% rename from Spigot-Server-Patches/0336-Don-t-check-ConvertSigns-boolean-every-sign-save.patch rename to Spigot-Server-Patches/0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch diff --git a/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/Spigot-Server-Patches/0338-Handle-Oversized-Tile-Entities-in-chunks.patch b/Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0338-Handle-Oversized-Tile-Entities-in-chunks.patch rename to Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch diff --git a/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch similarity index 100% rename from Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch rename to Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch diff --git a/Spigot-Server-Patches/0340-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch similarity index 100% rename from Spigot-Server-Patches/0340-Set-Zombie-last-tick-at-start-of-drowning-process.patch rename to Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch diff --git a/Spigot-Server-Patches/0341-Allow-Saving-of-Oversized-Chunks.patch b/Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0341-Allow-Saving-of-Oversized-Chunks.patch rename to Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch diff --git a/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 100% rename from Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch diff --git a/Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch similarity index 100% rename from Spigot-Server-Patches/0343-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch diff --git a/Spigot-Server-Patches/0344-Use-proper-max-length-when-serialising-BungeeCord-te.patch b/Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch similarity index 100% rename from Spigot-Server-Patches/0344-Use-proper-max-length-when-serialising-BungeeCord-te.patch rename to Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch diff --git a/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch similarity index 100% rename from Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch rename to Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch diff --git a/Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch similarity index 100% rename from Spigot-Server-Patches/0346-Update-entity-Metadata-for-all-tracked-players.patch rename to Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch diff --git a/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch rename to Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch diff --git a/Spigot-Server-Patches/0348-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from Spigot-Server-Patches/0348-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/Spigot-Server-Patches/0349-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 100% rename from Spigot-Server-Patches/0349-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch diff --git a/Spigot-Server-Patches/0350-Server-Tick-Events.patch b/Spigot-Server-Patches/0349-Server-Tick-Events.patch similarity index 100% rename from Spigot-Server-Patches/0350-Server-Tick-Events.patch rename to Spigot-Server-Patches/0349-Server-Tick-Events.patch diff --git a/Spigot-Server-Patches/0351-PlayerDeathEvent-getItemsToKeep.patch b/Spigot-Server-Patches/0350-PlayerDeathEvent-getItemsToKeep.patch similarity index 96% rename from Spigot-Server-Patches/0351-PlayerDeathEvent-getItemsToKeep.patch rename to Spigot-Server-Patches/0350-PlayerDeathEvent-getItemsToKeep.patch index 300cc9bed6..c4e04c6e94 100644 --- a/Spigot-Server-Patches/0351-PlayerDeathEvent-getItemsToKeep.patch +++ b/Spigot-Server-Patches/0350-PlayerDeathEvent-getItemsToKeep.patch @@ -8,7 +8,7 @@ Exposes a mutable array on items a player should keep on death Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4 diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b45e265ff95f9130009b0d5ba3e60644a7caa2ee..3a3ffe5a544d9f73b0ac512f67629b1169110395 100644 +index 3a6bd8e7d78d8c6188c0594c9806181f30abea32..4099915aa00ef74a3e0e667a5036af3ee128cd36 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -559,6 +559,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0352-Optimize-Captured-TileEntity-Lookup.patch b/Spigot-Server-Patches/0351-Optimize-Captured-TileEntity-Lookup.patch similarity index 100% rename from Spigot-Server-Patches/0352-Optimize-Captured-TileEntity-Lookup.patch rename to Spigot-Server-Patches/0351-Optimize-Captured-TileEntity-Lookup.patch diff --git a/Spigot-Server-Patches/0353-Add-Heightmap-API.patch b/Spigot-Server-Patches/0352-Add-Heightmap-API.patch similarity index 100% rename from Spigot-Server-Patches/0353-Add-Heightmap-API.patch rename to Spigot-Server-Patches/0352-Add-Heightmap-API.patch diff --git a/Spigot-Server-Patches/0354-Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/0353-Mob-Spawner-API-Enhancements.patch similarity index 100% rename from Spigot-Server-Patches/0354-Mob-Spawner-API-Enhancements.patch rename to Spigot-Server-Patches/0353-Mob-Spawner-API-Enhancements.patch diff --git a/Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch similarity index 100% rename from Spigot-Server-Patches/0355-Per-Player-View-Distance-API-placeholders.patch rename to Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch diff --git a/Spigot-Server-Patches/0356-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0355-Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 100% rename from Spigot-Server-Patches/0356-Fix-CB-call-to-changed-postToMainThread-method.patch rename to Spigot-Server-Patches/0355-Fix-CB-call-to-changed-postToMainThread-method.patch diff --git a/Spigot-Server-Patches/0357-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/Spigot-Server-Patches/0356-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 100% rename from Spigot-Server-Patches/0357-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to Spigot-Server-Patches/0356-Fix-sounds-when-item-frames-are-modified-MC-123450.patch diff --git a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch similarity index 100% rename from Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch rename to Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch diff --git a/Spigot-Server-Patches/0359-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0359-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch rename to Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch diff --git a/Spigot-Server-Patches/0360-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch similarity index 98% rename from Spigot-Server-Patches/0360-Duplicate-UUID-Resolve-Option.patch rename to Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch index 447d39f525..b9d54ba667 100644 --- a/Spigot-Server-Patches/0360-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch @@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b49a1a6f5017c9e183a7d08b16e89899c25a9717..2debafdc1bb539a49c3f0723b696ea56e9b3eb16 100644 +index a73b88d51608ce94f6e4c9013c8c4de97523fe42..6e29e3294d0661cc35d53b4201d980a2db4f5c93 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -410,4 +410,43 @@ public class PaperWorldConfig { +@@ -405,4 +405,43 @@ public class PaperWorldConfig { private void preventMovingIntoUnloadedChunks() { preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false); } diff --git a/Spigot-Server-Patches/0361-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch similarity index 100% rename from Spigot-Server-Patches/0361-improve-CraftWorld-isChunkLoaded.patch rename to Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch diff --git a/Spigot-Server-Patches/0362-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 98% rename from Spigot-Server-Patches/0362-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch index bdcde28c59..8e017df9e7 100644 --- a/Spigot-Server-Patches/0362-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2debafdc1bb539a49c3f0723b696ea56e9b3eb16..91c9a027dd7aef8253f3d707c95e4ed917d32580 100644 +index 6e29e3294d0661cc35d53b4201d980a2db4f5c93..6e1756eb90b6237100612527f69c995246d53ed1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -449,4 +449,10 @@ public class PaperWorldConfig { +@@ -444,4 +444,10 @@ public class PaperWorldConfig { break; } } diff --git a/Spigot-Server-Patches/0363-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/0362-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch similarity index 100% rename from Spigot-Server-Patches/0363-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch rename to Spigot-Server-Patches/0362-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch diff --git a/Spigot-Server-Patches/0364-ChunkMapDistance-CME.patch b/Spigot-Server-Patches/0363-ChunkMapDistance-CME.patch similarity index 100% rename from Spigot-Server-Patches/0364-ChunkMapDistance-CME.patch rename to Spigot-Server-Patches/0363-ChunkMapDistance-CME.patch diff --git a/Spigot-Server-Patches/0365-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0364-Implement-CraftBlockSoundGroup.patch similarity index 100% rename from Spigot-Server-Patches/0365-Implement-CraftBlockSoundGroup.patch rename to Spigot-Server-Patches/0364-Implement-CraftBlockSoundGroup.patch diff --git a/Spigot-Server-Patches/0366-Chunk-debug-command.patch b/Spigot-Server-Patches/0365-Chunk-debug-command.patch similarity index 100% rename from Spigot-Server-Patches/0366-Chunk-debug-command.patch rename to Spigot-Server-Patches/0365-Chunk-debug-command.patch diff --git a/Spigot-Server-Patches/0367-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch similarity index 100% rename from Spigot-Server-Patches/0367-Catch-exceptions-from-dispenser-entity-spawns.patch rename to Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch diff --git a/Spigot-Server-Patches/0368-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch similarity index 100% rename from Spigot-Server-Patches/0368-Fix-World-isChunkGenerated-calls.patch rename to Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch diff --git a/Spigot-Server-Patches/0369-Show-blockstate-location-if-we-failed-to-read-it.patch b/Spigot-Server-Patches/0368-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from Spigot-Server-Patches/0369-Show-blockstate-location-if-we-failed-to-read-it.patch rename to Spigot-Server-Patches/0368-Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/Spigot-Server-Patches/0370-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch b/Spigot-Server-Patches/0369-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch similarity index 100% rename from Spigot-Server-Patches/0370-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch rename to Spigot-Server-Patches/0369-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch diff --git a/Spigot-Server-Patches/0371-incremental-chunk-saving.patch b/Spigot-Server-Patches/0370-incremental-chunk-saving.patch similarity index 99% rename from Spigot-Server-Patches/0371-incremental-chunk-saving.patch rename to Spigot-Server-Patches/0370-incremental-chunk-saving.patch index ca173d6a34..5cfae10eba 100644 --- a/Spigot-Server-Patches/0371-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0370-incremental-chunk-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 91c9a027dd7aef8253f3d707c95e4ed917d32580..b947b31fc3b135f116af97907d5301619cc33070 100644 +index 6e1756eb90b6237100612527f69c995246d53ed1..5f3c8f74a60f9446623b863f9297402be1cd2f88 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -455,4 +455,19 @@ public class PaperWorldConfig { +@@ -450,4 +450,19 @@ public class PaperWorldConfig { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); } diff --git a/Spigot-Server-Patches/0372-Anti-Xray.patch b/Spigot-Server-Patches/0371-Anti-Xray.patch similarity index 99% rename from Spigot-Server-Patches/0372-Anti-Xray.patch rename to Spigot-Server-Patches/0371-Anti-Xray.patch index 0e6bb715a4..81523ead87 100644 --- a/Spigot-Server-Patches/0372-Anti-Xray.patch +++ b/Spigot-Server-Patches/0371-Anti-Xray.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b947b31fc3b135f116af97907d5301619cc33070..43925ed1e5c210399ba9fedb7bf890a6bd617e4a 100644 +index 5f3c8f74a60f9446623b863f9297402be1cd2f88..c2cc7b8ebb1b15cf2c080ef5f78c5215d7c20828 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,9 @@ @@ -18,7 +18,7 @@ index b947b31fc3b135f116af97907d5301619cc33070..43925ed1e5c210399ba9fedb7bf890a6 import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -470,4 +472,31 @@ public class PaperWorldConfig { +@@ -465,4 +467,31 @@ public class PaperWorldConfig { private void maxAutoSaveChunksPerTick() { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } diff --git a/Spigot-Server-Patches/0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 94% rename from Spigot-Server-Patches/0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 6e939e4efb..4699925f45 100644 --- a/Spigot-Server-Patches/0373-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 43925ed1e5c210399ba9fedb7bf890a6bd617e4a..16727e92f591725c8f8cefb250b7ab8c64a19472 100644 +index c2cc7b8ebb1b15cf2c080ef5f78c5215d7c20828..bccc2cb3e76aa3ffe1c4200f1b7380d136cb2f96 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -473,6 +473,16 @@ public class PaperWorldConfig { +@@ -468,6 +468,16 @@ public class PaperWorldConfig { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } diff --git a/Spigot-Server-Patches/0374-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch similarity index 95% rename from Spigot-Server-Patches/0374-Configurable-projectile-relative-velocity.patch rename to Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch index 76dd42a186..2c39e54360 100644 --- a/Spigot-Server-Patches/0374-Configurable-projectile-relative-velocity.patch +++ b/Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch @@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 16727e92f591725c8f8cefb250b7ab8c64a19472..a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b 100644 +index bccc2cb3e76aa3ffe1c4200f1b7380d136cb2f96..822b738f48578b39f81bb8e38208dc3d26c2a221 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -509,4 +509,9 @@ public class PaperWorldConfig { +@@ -504,4 +504,9 @@ public class PaperWorldConfig { } log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius); } diff --git a/Spigot-Server-Patches/0375-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 100% rename from Spigot-Server-Patches/0375-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch diff --git a/Spigot-Server-Patches/0376-offset-item-frame-ticking.patch b/Spigot-Server-Patches/0375-offset-item-frame-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0376-offset-item-frame-ticking.patch rename to Spigot-Server-Patches/0375-offset-item-frame-ticking.patch diff --git a/Spigot-Server-Patches/0377-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0376-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 100% rename from Spigot-Server-Patches/0377-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0376-Avoid-hopper-searches-if-there-are-no-items.patch diff --git a/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch similarity index 100% rename from Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch rename to Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch diff --git a/Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 100% rename from Spigot-Server-Patches/0379-Use-getChunkIfLoadedImmediately-in-places.patch rename to Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch diff --git a/Spigot-Server-Patches/0380-Reduce-sync-loads.patch b/Spigot-Server-Patches/0379-Reduce-sync-loads.patch similarity index 100% rename from Spigot-Server-Patches/0380-Reduce-sync-loads.patch rename to Spigot-Server-Patches/0379-Reduce-sync-loads.patch diff --git a/Spigot-Server-Patches/0381-Implement-alternative-item-despawn-rate.patch b/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch similarity index 97% rename from Spigot-Server-Patches/0381-Implement-alternative-item-despawn-rate.patch rename to Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch index 47adb6a101..27424c79ad 100644 --- a/Spigot-Server-Patches/0381-Implement-alternative-item-despawn-rate.patch +++ b/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f9410dd51 100644 +index 822b738f48578b39f81bb8e38208dc3d26c2a221..ce0db77ccd24c3543c7894db4044bed03ea776d8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,10 +1,15 @@ @@ -24,7 +24,7 @@ index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -514,4 +519,52 @@ public class PaperWorldConfig { +@@ -509,4 +514,52 @@ public class PaperWorldConfig { private void disableRelativeProjectileVelocity() { disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false); } diff --git a/Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 100% rename from Spigot-Server-Patches/0382-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch diff --git a/Spigot-Server-Patches/0383-Fix-MC-158900.patch b/Spigot-Server-Patches/0382-Fix-MC-158900.patch similarity index 100% rename from Spigot-Server-Patches/0383-Fix-MC-158900.patch rename to Spigot-Server-Patches/0382-Fix-MC-158900.patch diff --git a/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch similarity index 99% rename from Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch rename to Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch index b8b77c81c0..bb9ef29033 100644 --- a/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch @@ -25,10 +25,10 @@ index a27dc38d1a29ed1d63d2f44b7984c2b65be487d9..96aaaab5b7685c874463505f9d25e8a0 poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cf9d980e61be199a34cff98f805e511f9410dd51..3d9a48e56194225cf39e31d13d26ec17afedadaf 100644 +index ce0db77ccd24c3543c7894db4044bed03ea776d8..edf4fa474d32ac20ff85cecfa9f03464a7ecf6ec 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -567,4 +567,9 @@ public class PaperWorldConfig { +@@ -562,4 +562,9 @@ public class PaperWorldConfig { } } } diff --git a/Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch similarity index 100% rename from Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch rename to Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch diff --git a/Spigot-Server-Patches/0386-only-add-passanger-entities-once-from-spawners.patch b/Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch similarity index 100% rename from Spigot-Server-Patches/0386-only-add-passanger-entities-once-from-spawners.patch rename to Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch diff --git a/Spigot-Server-Patches/0387-Fix-nether-portal-creation.patch b/Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch similarity index 100% rename from Spigot-Server-Patches/0387-Fix-nether-portal-creation.patch rename to Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch diff --git a/Spigot-Server-Patches/0388-Generator-Settings.patch b/Spigot-Server-Patches/0387-Generator-Settings.patch similarity index 97% rename from Spigot-Server-Patches/0388-Generator-Settings.patch rename to Spigot-Server-Patches/0387-Generator-Settings.patch index 04d445d5d6..c60e196ea9 100644 --- a/Spigot-Server-Patches/0388-Generator-Settings.patch +++ b/Spigot-Server-Patches/0387-Generator-Settings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Generator Settings diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3d9a48e56194225cf39e31d13d26ec17afedadaf..a9d7e81ef123a7da7785a4b8dc868a0e256a61d0 100644 +index edf4fa474d32ac20ff85cecfa9f03464a7ecf6ec..fde31f324b3578c65a7d064c466b80ee46b65e03 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -572,4 +572,9 @@ public class PaperWorldConfig { +@@ -567,4 +567,9 @@ public class PaperWorldConfig { private void perPlayerMobSpawns() { perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false); } diff --git a/Spigot-Server-Patches/0389-Fix-MC-161754.patch b/Spigot-Server-Patches/0388-Fix-MC-161754.patch similarity index 100% rename from Spigot-Server-Patches/0389-Fix-MC-161754.patch rename to Spigot-Server-Patches/0388-Fix-MC-161754.patch diff --git a/Spigot-Server-Patches/0390-Performance-improvement-for-Chunk.getEntities.patch b/Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch similarity index 100% rename from Spigot-Server-Patches/0390-Performance-improvement-for-Chunk.getEntities.patch rename to Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch diff --git a/Spigot-Server-Patches/0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 100% rename from Spigot-Server-Patches/0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch diff --git a/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch similarity index 100% rename from Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch rename to Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch diff --git a/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 100% rename from Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch diff --git a/Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch similarity index 91% rename from Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch rename to Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch index d11e1de6e9..a159a6c4e3 100644 --- a/Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch +++ b/Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable pillager patrols diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a9d7e81ef123a7da7785a4b8dc868a0e256a61d0..f8a617a62e62d088077712bfb66656c28b82a3c5 100644 +index fde31f324b3578c65a7d064c466b80ee46b65e03..c51a149fd9cd7f2d250f07a4ca0e7ce8c9b91383 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -577,4 +577,9 @@ public class PaperWorldConfig { +@@ -572,4 +572,9 @@ public class PaperWorldConfig { private void generatorSettings() { generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); } diff --git a/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 100% rename from Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch diff --git a/Spigot-Server-Patches/0396-PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch similarity index 100% rename from Spigot-Server-Patches/0396-PlayerLaunchProjectileEvent.patch rename to Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch diff --git a/Spigot-Server-Patches/0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 100% rename from Spigot-Server-Patches/0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch diff --git a/Spigot-Server-Patches/0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from Spigot-Server-Patches/0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch b/Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 95% rename from Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch index 88873b8767..524934062e 100644 --- a/Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch +++ b/Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch @@ -5,10 +5,10 @@ Subject: [PATCH] MC-145656 Fix Follow Range Initial Target diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f8a617a62e62d088077712bfb66656c28b82a3c5..5c5a79d0ea00c9c4c2e93d524291f48f92e77857 100644 +index c51a149fd9cd7f2d250f07a4ca0e7ce8c9b91383..f0a28d787e06ceae71034f757637b4c90b6f3c04 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -582,4 +582,9 @@ public class PaperWorldConfig { +@@ -577,4 +577,9 @@ public class PaperWorldConfig { private void pillagerSettings() { disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols); } diff --git a/Spigot-Server-Patches/0400-Optimize-Hoppers.patch b/Spigot-Server-Patches/0399-Optimize-Hoppers.patch similarity index 99% rename from Spigot-Server-Patches/0400-Optimize-Hoppers.patch rename to Spigot-Server-Patches/0399-Optimize-Hoppers.patch index da4fc4359b..5920e97d67 100644 --- a/Spigot-Server-Patches/0400-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0399-Optimize-Hoppers.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5c5a79d0ea00c9c4c2e93d524291f48f92e77857..4bfe2fb948ee204f8c5a8c316141904a8a6a8b16 100644 +index f0a28d787e06ceae71034f757637b4c90b6f3c04..9bd64034587217743157a81c04fc20751474e21d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -587,4 +587,13 @@ public class PaperWorldConfig { +@@ -582,4 +582,13 @@ public class PaperWorldConfig { private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); } diff --git a/Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch similarity index 90% rename from Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch index 8659debca7..feb50c8954 100644 --- a/Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b33041765051f519807081607d2a8f1c75bb1fe7..dd78cfd8e9031558a6986c1929da330458d28597 100644 +index ec160ddedf8b6fcbfd357afcc5f9e58ed32e69d5..810207b656aba81710ee6786d964656d343bcdf4 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -691,7 +691,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0402-Prevent-bees-loading-chunks-checking-hive-position.patch b/Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from Spigot-Server-Patches/0402-Prevent-bees-loading-chunks-checking-hive-position.patch rename to Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/Spigot-Server-Patches/0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from Spigot-Server-Patches/0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/Spigot-Server-Patches/0404-Guard-against-serializing-mismatching-chunk-coordina.patch b/Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from Spigot-Server-Patches/0404-Guard-against-serializing-mismatching-chunk-coordina.patch rename to Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/Spigot-Server-Patches/0405-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 100% rename from Spigot-Server-Patches/0405-Optimise-IEntityAccess-getPlayerByUUID.patch rename to Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch diff --git a/Spigot-Server-Patches/0406-Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch similarity index 100% rename from Spigot-Server-Patches/0406-Fix-items-not-falling-correctly.patch rename to Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch diff --git a/Spigot-Server-Patches/0407-Lag-compensate-eating.patch b/Spigot-Server-Patches/0406-Lag-compensate-eating.patch similarity index 100% rename from Spigot-Server-Patches/0407-Lag-compensate-eating.patch rename to Spigot-Server-Patches/0406-Lag-compensate-eating.patch diff --git a/Spigot-Server-Patches/0408-Optimize-call-to-getFluid-for-explosions.patch b/Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from Spigot-Server-Patches/0408-Optimize-call-to-getFluid-for-explosions.patch rename to Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch diff --git a/Spigot-Server-Patches/0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from Spigot-Server-Patches/0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch similarity index 99% rename from Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch rename to Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch index a84a7566fa..b830977daf 100644 --- a/Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch @@ -68,7 +68,7 @@ index c94197a50269622e8995685119bac984c45e6833..11d384729326af693a9a679195acbd59 protected EntityCreature(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 513c987a56e8d2bda0bda8771285c7c8d5ca88e1..f638b21a3b457323600baeecab4a04ca76d0e813 100644 +index 5e9a05dfe822c42b83da84a154fe881d57ac1689..605bbf0174e60f795e445193a0284739ea452946 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -47,7 +47,7 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch rename to Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch similarity index 100% rename from Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch rename to Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch diff --git a/Spigot-Server-Patches/0413-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch similarity index 100% rename from Spigot-Server-Patches/0413-Fix-items-vanishing-through-end-portal.patch rename to Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch diff --git a/Spigot-Server-Patches/0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from Spigot-Server-Patches/0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch diff --git a/Spigot-Server-Patches/0416-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch similarity index 100% rename from Spigot-Server-Patches/0416-Allow-overriding-the-java-version-check.patch rename to Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch diff --git a/Spigot-Server-Patches/0417-Add-ThrownEggHatchEvent.patch b/Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-Server-Patches/0417-Add-ThrownEggHatchEvent.patch rename to Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch rename to Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch diff --git a/Spigot-Server-Patches/0419-Entity-Jump-API.patch b/Spigot-Server-Patches/0418-Entity-Jump-API.patch similarity index 100% rename from Spigot-Server-Patches/0419-Entity-Jump-API.patch rename to Spigot-Server-Patches/0418-Entity-Jump-API.patch diff --git a/Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 95% rename from Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch index b554afd515..a1d7ed9059 100644 --- a/Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4bfe2fb948ee204f8c5a8c316141904a8a6a8b16..3496f615aa9857aa704767f460b1b166295ccf39 100644 +index 9bd64034587217743157a81c04fc20751474e21d..796c5a0b110009b479f5c9eef17e2605b564ce09 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -596,4 +596,9 @@ public class PaperWorldConfig { +@@ -591,4 +591,9 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } diff --git a/Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch similarity index 100% rename from Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch rename to Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch diff --git a/Spigot-Server-Patches/0422-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from Spigot-Server-Patches/0422-add-hand-to-BlockMultiPlaceEvent.patch rename to Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch diff --git a/Spigot-Server-Patches/0423-Prevent-teleporting-dead-entities.patch b/Spigot-Server-Patches/0422-Prevent-teleporting-dead-entities.patch similarity index 100% rename from Spigot-Server-Patches/0423-Prevent-teleporting-dead-entities.patch rename to Spigot-Server-Patches/0422-Prevent-teleporting-dead-entities.patch diff --git a/Spigot-Server-Patches/0424-Validate-tripwire-hook-placement-before-update.patch b/Spigot-Server-Patches/0423-Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from Spigot-Server-Patches/0424-Validate-tripwire-hook-placement-before-update.patch rename to Spigot-Server-Patches/0423-Validate-tripwire-hook-placement-before-update.patch diff --git a/Spigot-Server-Patches/0425-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/Spigot-Server-Patches/0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 92% rename from Spigot-Server-Patches/0425-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to Spigot-Server-Patches/0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index 533e3f7386..ca49b9a59c 100644 --- a/Spigot-Server-Patches/0425-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/Spigot-Server-Patches/0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3496f615aa9857aa704767f460b1b166295ccf39..101a473ff8979b37098fde7ac6ac66c6ed1b0282 100644 +index 796c5a0b110009b479f5c9eef17e2605b564ce09..1b2256144f7f968667570e5a9838a77173d515c5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -385,6 +385,11 @@ public class PaperWorldConfig { +@@ -380,6 +380,11 @@ public class PaperWorldConfig { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } diff --git a/Spigot-Server-Patches/0426-Configurable-chance-of-villager-zombie-infection.patch b/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch similarity index 94% rename from Spigot-Server-Patches/0426-Configurable-chance-of-villager-zombie-infection.patch rename to Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch index 69cc38bd06..b6b2bfc1ce 100644 --- a/Spigot-Server-Patches/0426-Configurable-chance-of-villager-zombie-infection.patch +++ b/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch @@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where: * On normal difficulty they will have a 50% of getting infected or dying. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 101a473ff8979b37098fde7ac6ac66c6ed1b0282..9e8485679bd36481c2bd2f0c7cfa49892f0e4baf 100644 +index 1b2256144f7f968667570e5a9838a77173d515c5..f888fc1c5ef4212f81ed936da6485abadc336407 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -606,4 +606,9 @@ public class PaperWorldConfig { +@@ -601,4 +601,9 @@ public class PaperWorldConfig { private void nerfNetherPortalPigmen() { nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); } diff --git a/Spigot-Server-Patches/0427-Optimise-Chunk-getFluid.patch b/Spigot-Server-Patches/0426-Optimise-Chunk-getFluid.patch similarity index 100% rename from Spigot-Server-Patches/0427-Optimise-Chunk-getFluid.patch rename to Spigot-Server-Patches/0426-Optimise-Chunk-getFluid.patch diff --git a/Spigot-Server-Patches/0428-Optimise-TickListServer-by-rewriting-it.patch b/Spigot-Server-Patches/0427-Optimise-TickListServer-by-rewriting-it.patch similarity index 100% rename from Spigot-Server-Patches/0428-Optimise-TickListServer-by-rewriting-it.patch rename to Spigot-Server-Patches/0427-Optimise-TickListServer-by-rewriting-it.patch diff --git a/Spigot-Server-Patches/0429-Pillager-patrol-spawn-settings-and-per-player-option.patch b/Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 96% rename from Spigot-Server-Patches/0429-Pillager-patrol-spawn-settings-and-per-player-option.patch rename to Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch index 29e9629656..f91170d799 100644 --- a/Spigot-Server-Patches/0429-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per world and the world age for the start day. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9e8485679bd36481c2bd2f0c7cfa49892f0e4baf..2688b3018eaab4e7ba95754164f83065a98e53fc 100644 +index f888fc1c5ef4212f81ed936da6485abadc336407..b987399ca3786a30f87c98658e8bf04d4aa2e2da 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -584,10 +584,21 @@ public class PaperWorldConfig { +@@ -579,10 +579,21 @@ public class PaperWorldConfig { } public boolean disablePillagerPatrols = false; @@ -36,7 +36,7 @@ index 9e8485679bd36481c2bd2f0c7cfa49892f0e4baf..2688b3018eaab4e7ba95754164f83065 private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index dd78cfd8e9031558a6986c1929da330458d28597..59f5ef6e14b738a408dc8462ba99605ec1ae82e9 100644 +index 810207b656aba81710ee6786d964656d343bcdf4..41aee7ad9b0bec813b617428cdcc7002e3f66c63 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -81,6 +81,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0430-Ensure-Entity-is-never-double-registered.patch b/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch similarity index 100% rename from Spigot-Server-Patches/0430-Ensure-Entity-is-never-double-registered.patch rename to Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch diff --git a/Spigot-Server-Patches/0431-Fix-unregistering-entities-from-unloading-chunks.patch b/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0431-Fix-unregistering-entities-from-unloading-chunks.patch rename to Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch diff --git a/Spigot-Server-Patches/0432-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/Spigot-Server-Patches/0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0432-Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to Spigot-Server-Patches/0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/Spigot-Server-Patches/0433-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/Spigot-Server-Patches/0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 100% rename from Spigot-Server-Patches/0433-Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to Spigot-Server-Patches/0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch diff --git a/Spigot-Server-Patches/0434-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 100% rename from Spigot-Server-Patches/0434-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch diff --git a/Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0435-Optimize-Collision-to-not-load-chunks.patch rename to Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch diff --git a/Spigot-Server-Patches/0436-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch similarity index 91% rename from Spigot-Server-Patches/0436-Don-t-tick-dead-players.patch rename to Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch index 5e3107254e..26b48cfda3 100644 --- a/Spigot-Server-Patches/0436-Don-t-tick-dead-players.patch +++ b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch @@ -7,7 +7,7 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 59f5ef6e14b738a408dc8462ba99605ec1ae82e9..52b5c47452a46cd6e61e1dd7c135620e36472c73 100644 +index 41aee7ad9b0bec813b617428cdcc7002e3f66c63..cf7ff024c1645593b7922249b7ee8f82b8811fa2 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -472,7 +472,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0437-Dead-Player-s-shouldn-t-be-able-to-move.patch b/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 100% rename from Spigot-Server-Patches/0437-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch diff --git a/Spigot-Server-Patches/0438-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 100% rename from Spigot-Server-Patches/0438-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch diff --git a/Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch similarity index 92% rename from Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch rename to Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch index 7d2f0a1ac1..1b143f00ef 100644 --- a/Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5 100644 +index b987399ca3786a30f87c98658e8bf04d4aa2e2da..08949526752e4d66e4c0df11f76f6500846e1fe4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -622,4 +622,9 @@ public class PaperWorldConfig { +@@ -617,4 +617,9 @@ public class PaperWorldConfig { private void zombieVillagerInfectionChance() { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } diff --git a/Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch similarity index 100% rename from Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch rename to Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch diff --git a/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch similarity index 96% rename from Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch rename to Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch index 6b35894783..6c4db1e074 100644 --- a/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch @@ -10,7 +10,7 @@ larger than the keep loaded range. By skipping this, we avoid potential for a large spike on server start. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c3921296106a3bc 100644 +index cf7ff024c1645593b7922249b7ee8f82b8811fa2..dad115496d3210e1471f1c4eb81989c27a8eb368 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -118,7 +118,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch similarity index 100% rename from Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch rename to Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch diff --git a/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch similarity index 100% rename from Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch rename to Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch diff --git a/Spigot-Server-Patches/0444-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from Spigot-Server-Patches/0444-Add-Raw-Byte-ItemStack-Serialization.patch rename to Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/Spigot-Server-Patches/0445-Remove-streams-from-Mob-AI-System.patch b/Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch similarity index 100% rename from Spigot-Server-Patches/0445-Remove-streams-from-Mob-AI-System.patch rename to Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch diff --git a/Spigot-Server-Patches/0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch b/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch similarity index 100% rename from Spigot-Server-Patches/0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch rename to Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch diff --git a/Spigot-Server-Patches/0447-Async-command-map-building.patch b/Spigot-Server-Patches/0446-Async-command-map-building.patch similarity index 100% rename from Spigot-Server-Patches/0447-Async-command-map-building.patch rename to Spigot-Server-Patches/0446-Async-command-map-building.patch diff --git a/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch similarity index 100% rename from Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch rename to Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch diff --git a/Spigot-Server-Patches/0449-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0448-Optimize-Pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0449-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0448-Optimize-Pathfinding.patch diff --git a/Spigot-Server-Patches/0450-Reduce-Either-Optional-allocation.patch b/Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch similarity index 100% rename from Spigot-Server-Patches/0450-Reduce-Either-Optional-allocation.patch rename to Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch diff --git a/Spigot-Server-Patches/0451-Remove-streams-from-PairedQueue.patch b/Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch similarity index 100% rename from Spigot-Server-Patches/0451-Remove-streams-from-PairedQueue.patch rename to Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch diff --git a/Spigot-Server-Patches/0452-Reduce-memory-footprint-of-NBTTagCompound.patch b/Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from Spigot-Server-Patches/0452-Reduce-memory-footprint-of-NBTTagCompound.patch rename to Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch similarity index 100% rename from Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch rename to Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch diff --git a/Spigot-Server-Patches/0454-Optimise-ArraySetSorted-removeIf.patch b/Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from Spigot-Server-Patches/0454-Optimise-ArraySetSorted-removeIf.patch rename to Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch diff --git a/Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 100% rename from Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch rename to Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch diff --git a/Spigot-Server-Patches/0456-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch similarity index 100% rename from Spigot-Server-Patches/0456-Optimise-entity-hard-collision-checking.patch rename to Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch diff --git a/Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch similarity index 100% rename from Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch rename to Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch diff --git a/Spigot-Server-Patches/0458-Restrict-vanilla-teleport-command-to-valid-locations.patch b/Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 100% rename from Spigot-Server-Patches/0458-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch diff --git a/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch similarity index 100% rename from Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch rename to Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch diff --git a/Spigot-Server-Patches/0460-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 100% rename from Spigot-Server-Patches/0460-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch diff --git a/Spigot-Server-Patches/0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from Spigot-Server-Patches/0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch similarity index 100% rename from Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch rename to Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch diff --git a/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 98% rename from Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index b6772ad34c..90569f8f80 100644 --- a/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,7 +28,7 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ef35e07fd8b27a66710140c1422f88ad512e774f..56cf64709ae520287f6687fe7c2f55040cc769a1 100644 +index 0d624d35a86f77cc710162c302270535126ad13d..35c8e18a45dc4b461d6dd320e1235ec627662723 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -104,6 +104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch similarity index 99% rename from Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch rename to Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch index 03a8a366a1..16b5328664 100644 --- a/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch @@ -31,7 +31,7 @@ index c879e5d9acd400db5b7fdb770e5f8cc419e3bb23..228666eccfb924d2844c911e734eef4b public void c(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 56cf64709ae520287f6687fe7c2f55040cc769a1..0a5f784e851414f84e5a94b53f5616531f533109 100644 +index 35c8e18a45dc4b461d6dd320e1235ec627662723..426c4105ba99c364c3d67f1b421e6b1218de9480 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 100% rename from Spigot-Server-Patches/0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch diff --git a/Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 100% rename from Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch diff --git a/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch b/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch similarity index 96% rename from Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch rename to Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch index 76796703ef..1b5e3e7a31 100644 --- a/Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch +++ b/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5..5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162 100644 +index 08949526752e4d66e4c0df11f76f6500846e1fe4..13b89276feb76fcecaeefc166a1bc161d5931d9d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -627,4 +627,11 @@ public class PaperWorldConfig { +@@ -622,4 +622,11 @@ public class PaperWorldConfig { private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); } diff --git a/Spigot-Server-Patches/0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 100% rename from Spigot-Server-Patches/0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch diff --git a/Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch similarity index 100% rename from Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch rename to Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch diff --git a/Spigot-Server-Patches/0472-Villager-Restocks-API.patch b/Spigot-Server-Patches/0471-Villager-Restocks-API.patch similarity index 100% rename from Spigot-Server-Patches/0472-Villager-Restocks-API.patch rename to Spigot-Server-Patches/0471-Villager-Restocks-API.patch diff --git a/Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/Spigot-Server-Patches/0474-Expose-game-version.patch b/Spigot-Server-Patches/0473-Expose-game-version.patch similarity index 100% rename from Spigot-Server-Patches/0474-Expose-game-version.patch rename to Spigot-Server-Patches/0473-Expose-game-version.patch diff --git a/Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch similarity index 100% rename from Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch rename to Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch diff --git a/Spigot-Server-Patches/0476-Optimize-Voxel-Shape-Merging.patch b/Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from Spigot-Server-Patches/0476-Optimize-Voxel-Shape-Merging.patch rename to Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch diff --git a/Spigot-Server-Patches/0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 93% rename from Spigot-Server-Patches/0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index c070fa4565..1a3341b74f 100644 --- a/Spigot-Server-Patches/0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ff2b21305e4a46a8cafa247a0d4e786a6b7cb627..feb45475bb3c0785a8d8198615fbf4b3cd99acbe 100644 +index 894552adf119037e97c7de27d783920db580f62b..83151f3d7e9703f99391d24c41e90fc5ce1a80e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -20,6 +20,7 @@ public class Main { diff --git a/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch similarity index 100% rename from Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch rename to Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch diff --git a/Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch similarity index 100% rename from Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch rename to Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch diff --git a/Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 99% rename from Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch rename to Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch index 01bde81e3a..1b2886f324 100644 --- a/Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -147,7 +147,7 @@ index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0a5f784e851414f84e5a94b53f5616531f533109..fb2b64628b974758cace770ce6debe5e88318ae8 100644 +index 426c4105ba99c364c3d67f1b421e6b1218de9480..9eaf78095415f09073615db80a87b1fd93a126cc 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -113,6 +113,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0481-Stop-copy-on-write-operations-for-updating-light-dat.patch b/Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from Spigot-Server-Patches/0481-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch similarity index 99% rename from Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch rename to Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index bb75c321f0..5cf989c8bf 100644 --- a/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -23,10 +23,10 @@ index c9164dfdb27ddf3709129c8aec54903a1df121ff..e33e889c291d37a821a4fbd40d9aac7b })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162..0746932a3191669052f15270f5c94efbce0bd0c2 100644 +index 13b89276feb76fcecaeefc166a1bc161d5931d9d..5af7e5c815752f2fd2b13c02a905796971401813 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -634,4 +634,9 @@ public class PaperWorldConfig { +@@ -629,4 +629,9 @@ public class PaperWorldConfig { phantomIgnoreCreative = getBoolean("phantoms-do-not-spawn-on-creative-players", phantomIgnoreCreative); phantomOnlyAttackInsomniacs = getBoolean("phantoms-only-attack-insomniacs", phantomOnlyAttackInsomniacs); } @@ -115,7 +115,7 @@ index 7e57a53ec614a2f7d2672edff9d7c0e0dca42377..c072f61e8c88eac8335acd660d8ff0e2 if (flag1) { ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index fb2b64628b974758cace770ce6debe5e88318ae8..0e3ceb60e503c74fc65b1d08371645ffbb26ef5c 100644 +index 9eaf78095415f09073615db80a87b1fd93a126cc..1a88503a743202e1da7dd81b5501d7b48943b3db 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -115,6 +115,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0483-Add-villager-reputation-API.patch b/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch similarity index 100% rename from Spigot-Server-Patches/0483-Add-villager-reputation-API.patch rename to Spigot-Server-Patches/0482-Add-villager-reputation-API.patch diff --git a/Spigot-Server-Patches/0484-Fix-Light-Command.patch b/Spigot-Server-Patches/0483-Fix-Light-Command.patch similarity index 100% rename from Spigot-Server-Patches/0484-Fix-Light-Command.patch rename to Spigot-Server-Patches/0483-Fix-Light-Command.patch diff --git a/Spigot-Server-Patches/0485-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from Spigot-Server-Patches/0485-Fix-PotionEffect-ignores-icon-flag.patch rename to Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/Spigot-Server-Patches/0486-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from Spigot-Server-Patches/0486-Optimize-brigadier-child-sorting-performance.patch rename to Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch diff --git a/Spigot-Server-Patches/0487-Don-t-toString-block-unless-actually-showing-the-mes.patch b/Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch similarity index 100% rename from Spigot-Server-Patches/0487-Don-t-toString-block-unless-actually-showing-the-mes.patch rename to Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch diff --git a/Spigot-Server-Patches/0488-Potential-bed-API.patch b/Spigot-Server-Patches/0487-Potential-bed-API.patch similarity index 100% rename from Spigot-Server-Patches/0488-Potential-bed-API.patch rename to Spigot-Server-Patches/0487-Potential-bed-API.patch diff --git a/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch rename to Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch diff --git a/Spigot-Server-Patches/0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from Spigot-Server-Patches/0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/Spigot-Server-Patches/0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 100% rename from Spigot-Server-Patches/0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch diff --git a/Spigot-Server-Patches/0492-Optimize-NibbleArray-to-use-pooled-buffers.patch b/Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 100% rename from Spigot-Server-Patches/0492-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch diff --git a/Spigot-Server-Patches/0493-Reduce-MutableInt-allocations-from-light-engine.patch b/Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from Spigot-Server-Patches/0493-Reduce-MutableInt-allocations-from-light-engine.patch rename to Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 100% rename from Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch diff --git a/Spigot-Server-Patches/0495-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch similarity index 100% rename from Spigot-Server-Patches/0495-Ensure-safe-gateway-teleport.patch rename to Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch diff --git a/Spigot-Server-Patches/0496-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from Spigot-Server-Patches/0496-Add-option-for-console-having-all-permissions.patch rename to Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch diff --git a/Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch similarity index 100% rename from Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch rename to Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch diff --git a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 99% rename from Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index e827309fa3..f1c0598210 100644 --- a/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -570,7 +570,7 @@ index a6363b73522f9d27534b6e80f4b3789e84316c49..604e7004b659daed2844ba1a76bf0928 boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a23a9b5005 100644 +index 1a88503a743202e1da7dd81b5501d7b48943b3db..93e1fe6f37efe1bc84e2dfbb5d12af6f9dc7d762 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -55,6 +55,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 100% rename from Spigot-Server-Patches/0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch diff --git a/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 97% rename from Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch index 1ebc2ae9fb..1b476668ba 100644 --- a/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,7 +11,7 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 09d7435ed4e5a00f8215aceedf26033fc703d659..0c0c285364ab919cb92b9c7db085672cb6165dff 100644 +index a8100f7ade20932a87c55750b412d6a755a9cdd5..ea744e2fdf7a256d9f04786a670c44e8b517f281 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1063,16 +1063,40 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch similarity index 100% rename from Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch rename to Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch diff --git a/Spigot-Server-Patches/0502-Fix-villager-trading-demand-MC-163962.patch b/Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from Spigot-Server-Patches/0502-Fix-villager-trading-demand-MC-163962.patch rename to Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch diff --git a/Spigot-Server-Patches/0503-Maps-shouldn-t-load-chunks.patch b/Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0503-Maps-shouldn-t-load-chunks.patch rename to Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch diff --git a/Spigot-Server-Patches/0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from Spigot-Server-Patches/0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch rename to Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch diff --git a/Spigot-Server-Patches/0506-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch similarity index 100% rename from Spigot-Server-Patches/0506-Optimize-Light-Engine.patch rename to Spigot-Server-Patches/0505-Optimize-Light-Engine.patch diff --git a/Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 97% rename from Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 4738b38c7b..32ee419044 100644 --- a/Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0746932a3191669052f15270f5c94efbce0bd0c2..0f4fca90fd6c3788a5762c96c344899cb1665466 100644 +index 5af7e5c815752f2fd2b13c02a905796971401813..6e6534ab25dbebbad5d2ee848edb88ebcae86d03 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -639,4 +639,13 @@ public class PaperWorldConfig { +@@ -634,4 +634,13 @@ public class PaperWorldConfig { private void viewDistance() { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/Spigot-Server-Patches/0509-Fix-missing-chunks-due-to-integer-overflow.patch b/Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from Spigot-Server-Patches/0509-Fix-missing-chunks-due-to-integer-overflow.patch rename to Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/Spigot-Server-Patches/0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from Spigot-Server-Patches/0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/Spigot-Server-Patches/0511-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from Spigot-Server-Patches/0511-Fix-piston-physics-inconsistency-MC-188840.patch rename to Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/Spigot-Server-Patches/0512-Fix-sand-duping.patch b/Spigot-Server-Patches/0511-Fix-sand-duping.patch similarity index 100% rename from Spigot-Server-Patches/0512-Fix-sand-duping.patch rename to Spigot-Server-Patches/0511-Fix-sand-duping.patch diff --git a/Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch rename to Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/Spigot-Server-Patches/0514-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch similarity index 100% rename from Spigot-Server-Patches/0514-Fix-enderdragon-exp-dupe.patch rename to Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch diff --git a/Spigot-Server-Patches/0515-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-Server-Patches/0515-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-Server-Patches/0516-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-Server-Patches/0516-Expose-Arrow-getItemStack.patch rename to Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch diff --git a/Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/Spigot-Server-Patches/0518-Add-PrepareGrindstoneEvent.patch b/Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch similarity index 100% rename from Spigot-Server-Patches/0518-Add-PrepareGrindstoneEvent.patch rename to Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch diff --git a/Spigot-Server-Patches/0519-Hide-sync-chunk-writes-behind-flag.patch b/Spigot-Server-Patches/0518-Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from Spigot-Server-Patches/0519-Hide-sync-chunk-writes-behind-flag.patch rename to Spigot-Server-Patches/0518-Hide-sync-chunk-writes-behind-flag.patch diff --git a/Spigot-Server-Patches/0520-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0519-Limit-lightning-strike-effect-distance.patch similarity index 96% rename from Spigot-Server-Patches/0520-Limit-lightning-strike-effect-distance.patch rename to Spigot-Server-Patches/0519-Limit-lightning-strike-effect-distance.patch index 4d2af37153..5735d85dd7 100644 --- a/Spigot-Server-Patches/0520-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0519-Limit-lightning-strike-effect-distance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Limit lightning strike effect distance diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0f4fca90fd6c3788a5762c96c344899cb1665466..708448a72503c5878070d3aef710aa8f6b118be1 100644 +index 6e6534ab25dbebbad5d2ee848edb88ebcae86d03..e471e764935e2a89560de56959a782b02e5e8fe1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -648,4 +648,26 @@ public class PaperWorldConfig { +@@ -643,4 +643,26 @@ public class PaperWorldConfig { delayChunkUnloadsBy *= 20; } } diff --git a/Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch b/Spigot-Server-Patches/0520-Add-permission-for-command-blocks.patch similarity index 100% rename from Spigot-Server-Patches/0521-Add-permission-for-command-blocks.patch rename to Spigot-Server-Patches/0520-Add-permission-for-command-blocks.patch diff --git a/Spigot-Server-Patches/0522-Ensure-Entity-AABB-s-are-never-invalid.patch b/Spigot-Server-Patches/0521-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 100% rename from Spigot-Server-Patches/0522-Ensure-Entity-AABB-s-are-never-invalid.patch rename to Spigot-Server-Patches/0521-Ensure-Entity-AABB-s-are-never-invalid.patch diff --git a/Spigot-Server-Patches/0523-Optimize-WorldBorder-collision-checks-and-air.patch b/Spigot-Server-Patches/0522-Optimize-WorldBorder-collision-checks-and-air.patch similarity index 100% rename from Spigot-Server-Patches/0523-Optimize-WorldBorder-collision-checks-and-air.patch rename to Spigot-Server-Patches/0522-Optimize-WorldBorder-collision-checks-and-air.patch diff --git a/Spigot-Server-Patches/0524-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/Spigot-Server-Patches/0523-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 100% rename from Spigot-Server-Patches/0524-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to Spigot-Server-Patches/0523-Fix-Per-World-Difficulty-Remembering-Difficulty.patch From bf4b541513c41f48d7eb54ec939c8c4d812155f6 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jun 2020 09:43:47 +0100 Subject: [PATCH 44/95] Fix missing hunk from ProfileWhitelistVerifyEvent (Fixes #3645) --- .../0160-ProfileWhitelistVerifyEvent.patch | 9 ++++++--- .../0269-Use-ConcurrentHashMap-in-JsonList.patch | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch index 952506a0c6..4f74944e59 100644 --- a/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch @@ -5,12 +5,15 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 650755c0a6df59260a5f7c8cb041b2a8fe63e4a8..edb59cf7dc797384bba9d37f486b624753d4f31c 100644 +index 650755c0a6df59260a5f7c8cb041b2a8fe63e4a8..fbacfe2c825f71b3c8617a3bf022f6793eb64996 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -542,7 +542,7 @@ public abstract class PlayerList { +@@ -540,9 +540,9 @@ public abstract class PlayerList { + + // return chatmessage; if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot - } else if (!this.isWhitelisted(gameprofile)) { +- } else if (!this.isWhitelisted(gameprofile)) { ++ } else if (!this.isWhitelisted(gameprofile, event)) { // Paper chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); - event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot + //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted diff --git a/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch index 865728cdf5..ebca7093e0 100644 --- a/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch @@ -122,11 +122,11 @@ index 5b01e4edb3c0f8bc785b70128cbe31b14356e4fb..9213bfb78e92b838189161045e394558 this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 509451c73892147419ef4cf23b449c61d21cf279..7c88e370c19554652d4a580252e657747180047d 100644 +index 31ffa627417745f87917933cb96873fd8657b49a..850a88c5b7887baf40787b21c04f40b9809157d7 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -543,7 +543,7 @@ public abstract class PlayerList { - } else if (!this.isWhitelisted(gameprofile)) { + } else if (!this.isWhitelisted(gameprofile, event)) { // Paper chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted - } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { From e4d10c3cdf991da61387639e092c10ab06f78eff Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 05:13:46 -0400 Subject: [PATCH 45/95] Revert recent changes around player skulls using user cache --- .../0152-Basic-PlayerProfile-API.patch | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch index a30d09bdbb..f2fa0d3d73 100644 --- a/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch @@ -473,48 +473,6 @@ index b06bb3dccda23ebed1532e17f9699b9b6828d9d8..62ca208a95434ca1d8970b01f7291647 public MinecraftSessionService getMinecraftSessionService() { return this.minecraftSessionService; } -diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 4fae1b3274a96b871b39de083e9b28ab6129533f..9a2efd38f28819355a271b9515ac98c3382c7383 100644 ---- a/src/main/java/net/minecraft/server/TileEntitySkull.java -+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java -@@ -161,6 +161,7 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa - private void f() { - // Spigot start - GameProfile profile = this.gameProfile; -+ if (profile != null && profile.isComplete() && profile.getProperties().containsKey("textures")) return; // Paper - b(profile, new Predicate() { - - @Override -@@ -181,7 +182,16 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa - } else if (MinecraftServer.getServer() == null) { - callback.apply(gameprofile); - } else { -- GameProfile profile = skinCache.getIfPresent(gameprofile.getName().toLowerCase(java.util.Locale.ROOT)); -+ // Paper start -+ com.destroystokyo.paper.profile.CraftPlayerProfile paperProfile = new com.destroystokyo.paper.profile.CraftPlayerProfile(gameprofile); -+ if (sync) { -+ // might complete by cache, but if not, go ahead and do it now, avoid the code below -+ paperProfile.complete(true, true); -+ } else { -+ paperProfile.completeFromCache(false, true); -+ } -+ GameProfile profile = paperProfile.getGameProfile(); -+ // Paper end - if (profile != null && Iterables.getFirst(profile.getProperties().get("textures"), (Object) null) != null) { - callback.apply(profile); - -@@ -190,7 +200,10 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa - Callable callable = new Callable() { - @Override - public GameProfile call() { -- final GameProfile profile = skinCache.getUnchecked(gameprofile.getName().toLowerCase(java.util.Locale.ROOT)); -+ // Paper start -+ paperProfile.complete(true, true); -+ final GameProfile profile = paperProfile.getGameProfile(); -+ // Paper end - MinecraftServer.getServer().processQueue.add(new Runnable() { - @Override - public void run() { diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f7262546666e32883 100644 --- a/src/main/java/net/minecraft/server/UserCache.java From 86ee6c968c59fe83605a0551027a5f347beba60a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 05:34:23 -0400 Subject: [PATCH 46/95] Log Minecraft Internal Scheduler logs correctly --- Spigot-Server-Patches/0004-MC-Utils.patch | 28 ++++++++++++++++++- Spigot-Server-Patches/0009-Timings-v2.patch | 12 ++++---- .../0054-Add-exception-reporting-event.patch | 28 +++++-------------- ...e-CraftScheduler-Async-Task-Debugger.patch | 8 +++--- .../0200-Improved-Async-Task-Scheduler.patch | 12 ++++---- 5 files changed, 50 insertions(+), 38 deletions(-) diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 1819268811..bd3129fba5 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -4471,7 +4471,7 @@ index 6a797a0ac8ca3f120eea5bd9c54de21a4f38b257..f1c4ae9997d5d11d903360dbccf45f3c /** * Mirror diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 9ad17c560c8d99a396543ab9f97c34de648f6544..533c0bc55fc7ac4cc1f493f898a85a6617371031 100644 +index 9ad17c560c8d99a396543ab9f97c34de648f6544..4bf48f77f3f7cd62a91590543f5af441c8268029 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -43,6 +43,7 @@ import org.bukkit.scheduler.BukkitWorker; @@ -4494,6 +4494,32 @@ index 9ad17c560c8d99a396543ab9f97c34de648f6544..533c0bc55fc7ac4cc1f493f898a85a66 public BukkitTask runTaskTimer(Plugin plugin, Object runnable, long delay, long period) { validate(plugin, runnable); if (delay < 0L) { +@@ -400,13 +406,20 @@ public class CraftScheduler implements BukkitScheduler { + task.run(); + task.timings.stopTiming(); // Spigot + } catch (final Throwable throwable) { +- task.getOwner().getLogger().log( ++ // Paper start ++ String msg = String.format( ++ "Task #%s for %s generated an exception", ++ task.getTaskId(), ++ task.getOwner().getDescription().getFullName()); ++ if (task.getOwner() == MINECRAFT) { ++ net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); ++ } else { ++ task.getOwner().getLogger().log( + Level.WARNING, +- String.format( +- "Task #%s for %s generated an exception", +- task.getTaskId(), +- task.getOwner().getDescription().getFullName()), ++ msg, + throwable); ++ } ++ // Paper end + } finally { + 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 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 99a6b19007..7d849282f6 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1982,7 +1982,7 @@ index c5216d62660631f54d50575c30717f4052c10f8f..661c8b3c81be46ef2c9488bb52d1963c public Player.Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 533c0bc55fc7ac4cc1f493f898a85a6617371031..de332758e03a563a9b72c134332db9e6a1c5ed2b 100644 +index 4bf48f77f3f7cd62a91590543f5af441c8268029..ffe9cc1011226d604dc5499e7692e9a9a5132b72 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -1,5 +1,6 @@ @@ -2028,9 +2028,9 @@ index 533c0bc55fc7ac4cc1f493f898a85a6617371031..de332758e03a563a9b72c134332db9e6 task.run(); - task.timings.stopTiming(); // Spigot } catch (final Throwable throwable) { - task.getOwner().getLogger().log( - Level.WARNING, -@@ -431,8 +431,10 @@ public class CraftScheduler implements BukkitScheduler { + // Paper start + String msg = String.format( +@@ -438,8 +438,10 @@ public class CraftScheduler implements BukkitScheduler { runners.remove(task.getTaskId()); } } @@ -2041,7 +2041,7 @@ index 533c0bc55fc7ac4cc1f493f898a85a6617371031..de332758e03a563a9b72c134332db9e6 debugHead = debugHead.getNextHead(currentTick); } -@@ -465,6 +467,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -472,6 +474,7 @@ public class CraftScheduler implements BukkitScheduler { } private void parsePending() { @@ -2049,7 +2049,7 @@ index 533c0bc55fc7ac4cc1f493f898a85a6617371031..de332758e03a563a9b72c134332db9e6 CraftTask head = this.head; CraftTask task = head.getNext(); CraftTask lastTask = head; -@@ -483,6 +486,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -490,6 +493,7 @@ public class CraftScheduler implements BukkitScheduler { task.setNext(null); } this.head = lastTask; diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch index b0b0cc331a..0e2d54f0e5 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch @@ -253,7 +253,7 @@ index 19e68a78310de787bca701bc2597c64e34a77d7c..a2a25cf6a43a1f59a80c997e2980f2bb } finally { if (pushbackinputstream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index de332758e03a563a9b72c134332db9e6a1c5ed2b..e68533176a0c07560118531600304fa76a1c3fc6 100644 +index ffe9cc1011226d604dc5499e7692e9a9a5132b72..343cdb06881fa8b0155b56d29c110bba489f9667 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -266,30 +266,16 @@ index de332758e03a563a9b72c134332db9e6a1c5ed2b..e68533176a0c07560118531600304fa7 import org.apache.commons.lang.Validate; import org.bukkit.plugin.IllegalPluginAccessException; import org.bukkit.plugin.Plugin; -@@ -406,20 +409,26 @@ public class CraftScheduler implements BukkitScheduler { - try { - task.run(); - } catch (final Throwable throwable) { -+ // Paper start -+ String msg = String.format( -+ "Task #%s for %s generated an exception", -+ task.getTaskId(), -+ task.getOwner().getDescription().getFullName()); - task.getOwner().getLogger().log( - Level.WARNING, -- String.format( -- "Task #%s for %s generated an exception", -- task.getTaskId(), -- task.getOwner().getDescription().getFullName()), -+ msg, +@@ -419,6 +422,8 @@ public class CraftScheduler implements BukkitScheduler { + msg, throwable); + } + task.getOwner().getServer().getPluginManager().callEvent( -+ new ServerExceptionEvent(new ServerSchedulerException(msg, throwable, task)) -+ ); -+ // Paper end ++ new ServerExceptionEvent(new ServerSchedulerException(msg, throwable, task))); + // Paper end } finally { currentTask = null; - } +@@ -426,7 +431,7 @@ public class CraftScheduler implements BukkitScheduler { parsePending(); } else { debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass())); diff --git a/Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch index a602785ad5..710f71c575 100644 --- a/Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch +++ b/Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch @@ -9,10 +9,10 @@ One report of a suspected memory leak with the system. This adds additional overhead to asynchronous task dispatching diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index e68533176a0c07560118531600304fa76a1c3fc6..ff855035ae55df37d68b284ac18976c46d388af2 100644 +index 343cdb06881fa8b0155b56d29c110bba489f9667..f7a977c342e564b3e24034c756c128068c143a65 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -@@ -427,7 +427,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -430,7 +430,7 @@ public class CraftScheduler implements BukkitScheduler { } parsePending(); } else { @@ -21,7 +21,7 @@ index e68533176a0c07560118531600304fa76a1c3fc6..ff855035ae55df37d68b284ac18976c4 executor.execute(new ServerSchedulerReportingWrapper(task)); // Paper // We don't need to parse pending // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) -@@ -444,7 +444,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -447,7 +447,7 @@ public class CraftScheduler implements BukkitScheduler { pending.addAll(temp); temp.clear(); MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); @@ -30,7 +30,7 @@ index e68533176a0c07560118531600304fa76a1c3fc6..ff855035ae55df37d68b284ac18976c4 } private void addTask(final CraftTask task) { -@@ -504,10 +504,15 @@ public class CraftScheduler implements BukkitScheduler { +@@ -507,10 +507,15 @@ public class CraftScheduler implements BukkitScheduler { @Override public String toString() { diff --git a/Spigot-Server-Patches/0200-Improved-Async-Task-Scheduler.patch b/Spigot-Server-Patches/0200-Improved-Async-Task-Scheduler.patch index 00807953fa..e01a0db40d 100644 --- a/Spigot-Server-Patches/0200-Improved-Async-Task-Scheduler.patch +++ b/Spigot-Server-Patches/0200-Improved-Async-Task-Scheduler.patch @@ -159,7 +159,7 @@ index 0000000000000000000000000000000000000000..3c1992e212a6d6f1db4d5b807b38d719 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index ff855035ae55df37d68b284ac18976c46d388af2..99ea0aabadfac2a68ec67a7d49831025820de2c3 100644 +index f7a977c342e564b3e24034c756c128068c143a65..7532bbd82559763cfaf5433a07914b5fb906122c 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -63,7 +63,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -315,7 +315,7 @@ index ff855035ae55df37d68b284ac18976c46d388af2..99ea0aabadfac2a68ec67a7d49831025 this.currentTick = currentTick; final List temp = this.temp; parsePending(); -@@ -428,7 +486,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -431,7 +489,7 @@ public class CraftScheduler implements BukkitScheduler { parsePending(); } else { //debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper @@ -324,7 +324,7 @@ index ff855035ae55df37d68b284ac18976c46d388af2..99ea0aabadfac2a68ec67a7d49831025 // We don't need to parse pending // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -@@ -447,7 +505,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -450,7 +508,7 @@ public class CraftScheduler implements BukkitScheduler { //debugHead = debugHead.getNextHead(currentTick); // Paper } @@ -333,7 +333,7 @@ index ff855035ae55df37d68b284ac18976c46d388af2..99ea0aabadfac2a68ec67a7d49831025 final AtomicReference tail = this.tail; CraftTask tailTask = tail.get(); while (!tail.compareAndSet(tailTask, task)) { -@@ -456,7 +514,13 @@ public class CraftScheduler implements BukkitScheduler { +@@ -459,7 +517,13 @@ public class CraftScheduler implements BukkitScheduler { tailTask.setNext(task); } @@ -348,7 +348,7 @@ index ff855035ae55df37d68b284ac18976c46d388af2..99ea0aabadfac2a68ec67a7d49831025 task.setNextRun(currentTick + delay); addTask(task); return task; -@@ -475,8 +539,8 @@ public class CraftScheduler implements BukkitScheduler { +@@ -478,8 +542,8 @@ public class CraftScheduler implements BukkitScheduler { return ids.incrementAndGet(); } @@ -359,7 +359,7 @@ index ff855035ae55df37d68b284ac18976c46d388af2..99ea0aabadfac2a68ec67a7d49831025 CraftTask head = this.head; CraftTask task = head.getNext(); CraftTask lastTask = head; -@@ -495,7 +559,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -498,7 +562,7 @@ public class CraftScheduler implements BukkitScheduler { task.setNext(null); } this.head = lastTask; From 4da9f70a5075d2ee97bbfce3ef0ea221129d3fed Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jun 2020 12:16:36 +0100 Subject: [PATCH 47/95] Restore Player#refreshPlayer (Fixes #3650) untested, don't @ me --- .../0202-Player.setPlayerProfile-API.patch | 19 ++++++++++++++----- ...08-Flag-to-disable-the-channel-limit.patch | 6 +++--- .../0237-InventoryCloseEvent-Reason-API.patch | 6 +++--- ...e-attack-cooldown-methods-for-Player.patch | 4 ++-- .../0286-Improve-death-events.patch | 4 ++-- ...-replace-OfflinePlayer-getLastPlayed.patch | 12 ++++++------ ...-remove-from-being-called-on-Players.patch | 4 ++-- ...layer-View-Distance-API-placeholders.patch | 4 ++-- ...-Implement-Player-Client-Options-API.patch | 4 ++-- ...k-Priority-Urgency-System-for-Chunks.patch | 6 +++--- 10 files changed, 39 insertions(+), 30 deletions(-) diff --git a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch index 5569d1e292..499f6a8ff3 100644 --- a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f27fb59e752d25807859396560b213162870998e..53c52e4922538f1dd50764d8cbaa178d1f0692f9 100644 +index f27fb59e752d25807859396560b213162870998e..9718dd56217dd64f51ea399b4ecf57528eb89e89 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ @@ -68,7 +68,15 @@ index f27fb59e752d25807859396560b213162870998e..53c52e4922538f1dd50764d8cbaa178d import net.minecraft.server.MapIcon; import net.minecraft.server.MinecraftKey; import net.minecraft.server.NBTTagCompound; -@@ -1216,8 +1219,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -54,6 +57,7 @@ import net.minecraft.server.PacketPlayOutMap; + import net.minecraft.server.PacketPlayOutNamedSoundEffect; + import net.minecraft.server.PacketPlayOutPlayerInfo; + import net.minecraft.server.PacketPlayOutPlayerListHeaderFooter; ++import net.minecraft.server.PacketPlayOutRespawn; + import net.minecraft.server.PacketPlayOutSpawnPosition; + import net.minecraft.server.PacketPlayOutStopSound; + import net.minecraft.server.PacketPlayOutTitle; +@@ -1216,8 +1220,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -83,7 +91,7 @@ index f27fb59e752d25807859396560b213162870998e..53c52e4922538f1dd50764d8cbaa178d PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1258,8 +1266,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1258,8 +1267,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -98,7 +106,7 @@ index f27fb59e752d25807859396560b213162870998e..53c52e4922538f1dd50764d8cbaa178d getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1268,6 +1281,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1268,6 +1282,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } @@ -134,7 +142,8 @@ index f27fb59e752d25807859396560b213162870998e..53c52e4922538f1dd50764d8cbaa178d + reregisterPlayer(handle); + + //Respawn the player then update their position and selected slot -+ //connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); // TODO: Fix this if you care to make it work ++ WorldServer worldserver = handle.getWorldServer(); ++ connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(worldserver.getTypeKey(), worldserver.getDimensionKey(), net.minecraft.server.BiomeManager.a(worldserver.getSeed()), handle.playerInteractManager.getGameMode(), handle.playerInteractManager.c(), worldserver.isDebugWorld(), worldserver.isFlatWorld(), true)); + handle.updateAbilities(); + connection.sendPacket(new net.minecraft.server.PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0)); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().updateClient(handle); diff --git a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch index 761f9e2e23..6528b39416 100644 --- a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 53c52e4922538f1dd50764d8cbaa178d1f0692f9..b5d2ce40431247112baaded01e860c1832bf8fd8 100644 +index 9718dd56217dd64f51ea399b4ecf57528eb89e89..61d4f52f97a9404b1ba10ceaa25c5f79be8b2a9f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 53c52e4922538f1dd50764d8cbaa178d1f0692f9..b5d2ce40431247112baaded01e860c18 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1486,7 +1487,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1488,7 +1489,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index ca369ebb68..192b30ff62 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -101,7 +101,7 @@ index 351eeb83d8a28b19e3805f0d8a377f4ed060c592..027f9a86f458aab7d94f132981a9c700 this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index edb59cf7dc797384bba9d37f486b624753d4f31c..509451c73892147419ef4cf23b449c61d21cf279 100644 +index fbacfe2c825f71b3c8617a3bf022f6793eb64996..31ffa627417745f87917933cb96873fd8657b49a 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -420,7 +420,7 @@ public abstract class PlayerList { @@ -155,10 +155,10 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b5d2ce40431247112baaded01e860c1832bf8fd8..bb6635be243a270752e1c47a9646a13ea6707baf 100644 +index 61d4f52f97a9404b1ba10ceaa25c5f79be8b2a9f..2f27b2559977161c5be898a3df928452272b9c3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -790,7 +790,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { diff --git a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index e5b310871a..8d817babda 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch @@ -27,10 +27,10 @@ index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bb6635be243a270752e1c47a9646a13ea6707baf..5412e83e0c531d477e6df99eae8fea645044b1f3 100644 +index 2f27b2559977161c5be898a3df928452272b9c3d..417ee5934edc1f17b7186ae920944f9a61b02f34 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1949,6 +1949,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1951,6 +1951,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index f18da62adc..430ad919f4 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -357,10 +357,10 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5412e83e0c531d477e6df99eae8fea645044b1f3..8ac369d5edf139b2457fa1da03e3473b907976f6 100644 +index 417ee5934edc1f17b7186ae920944f9a61b02f34..9e18e3f7819761089f6c908cdb2f4c5afd86d985 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1740,7 +1740,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1742,7 +1742,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { diff --git a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index c03da8ed46..55496ff585 100644 --- a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -28,7 +28,7 @@ index 76eff7dcb734f366b515d13a4a693adaa23695ad..af4fd8beab932589a832c7f4916bc669 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7c88e370c19554652d4a580252e657747180047d..139104c436c9a04865ec4138606e82091be8b65f 100644 +index 850a88c5b7887baf40787b21c04f40b9809157d7..74eadab4dedce86128cf39fd6c983ffe51c916fa 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -97,6 +97,7 @@ public abstract class PlayerList { @@ -106,10 +106,10 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8ac369d5edf139b2457fa1da03e3473b907976f6..4266884ba7790f673704937305d787d19a61401a 100644 +index 9e18e3f7819761089f6c908cdb2f4c5afd86d985..937ac92516b5d27ad080ff0a84b33cc71da4f65d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -144,6 +144,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 8ac369d5edf139b2457fa1da03e3473b907976f6..4266884ba7790f673704937305d787d1 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1390,6 +1391,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1392,6 +1393,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 8ac369d5edf139b2457fa1da03e3473b907976f6..4266884ba7790f673704937305d787d1 public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1412,6 +1425,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1414,6 +1427,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index 8ac369d5edf139b2457fa1da03e3473b907976f6..4266884ba7790f673704937305d787d1 if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1426,6 +1441,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1428,6 +1443,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); diff --git a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch index a62d38fb8d..04b31f0705 100644 --- a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4266884ba7790f673704937305d787d19a61401a..f05f7cbdb0f42601faab8c68a4c75247bd964823 100644 +index 937ac92516b5d27ad080ff0a84b33cc71da4f65d..ed2c4fd43c9bf6ea4e6b647d36e9a5824f9b0b87 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1994,6 +1994,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1996,6 +1996,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } diff --git a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch index 3988c22a7d..75e7a94e2f 100644 --- a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch @@ -40,10 +40,10 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f05f7cbdb0f42601faab8c68a4c75247bd964823..cafa091b84caa6b24078962552b6bb34aca284c3 100644 +index ed2c4fd43c9bf6ea4e6b647d36e9a5824f9b0b87..61ccd4991c14cdcc05352158e26855ef15c82bd0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2003,6 +2003,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2005,6 +2005,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch index 95c9c3edff..8af344ea73 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cafa091b84caa6b24078962552b6bb34aca284c3..9e26a15746fcdf80b581b81f836d9df51759f601 100644 +index 61ccd4991c14cdcc05352158e26855ef15c82bd0..c447e6f9c5ad7a1e58a76884a0c00bbe192671d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ @@ -170,7 +170,7 @@ index cafa091b84caa6b24078962552b6bb34aca284c3..9e26a15746fcdf80b581b81f836d9df5 import com.destroystokyo.paper.Title; import com.destroystokyo.paper.profile.CraftPlayerProfile; import com.destroystokyo.paper.profile.PlayerProfile; -@@ -2013,6 +2016,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2015,6 +2018,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index f1c0598210..7dd07bfe6c 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1144,7 +1144,7 @@ index 681de2638eb606185077668d87340f7258e2ad90..fcd30d3fa5bac44ca71714a13917d847 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 477b1920869bfdab166b815f433d2df2821e5d58..a8100f7ade20932a87c55750b412d6a755a9cdd5 100644 +index ea2b2fbfe76ec4c86ac3b236c2daad3e75caa9c3..8326ce64ec57d84b768a0cf0d7873f1e1ea68456 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -200,8 +200,8 @@ public abstract class PlayerList { @@ -1231,10 +1231,10 @@ index 8a37871bea36bd34b514428acea1acad2ba5897e..b973bd8f60412232df53ac52d97135de net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9e26a15746fcdf80b581b81f836d9df51759f601..2e2b28b145b50549345be5a9c754302d5e645274 100644 +index c447e6f9c5ad7a1e58a76884a0c00bbe192671d2..2faa6dd671df53ac0fa18920773e3ca7425a791e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -743,6 +743,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); } From b27469dc9ad440d0e46c7b5d051bbbbdec7320d7 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jun 2020 12:24:09 +0100 Subject: [PATCH 48/95] [CI-SKIP] Drop accidental import from last commit --- .../0202-Player.setPlayerProfile-API.patch | 16 ++++------------ .../0208-Flag-to-disable-the-channel-limit.patch | 6 +++--- .../0237-InventoryCloseEvent-Reason-API.patch | 4 ++-- ...pose-attack-cooldown-methods-for-Player.patch | 4 ++-- .../0286-Improve-death-events.patch | 4 ++-- ...-to-replace-OfflinePlayer-getLastPlayed.patch | 10 +++++----- ...ity-remove-from-being-called-on-Players.patch | 4 ++-- ...r-Player-View-Distance-API-placeholders.patch | 4 ++-- ...458-Implement-Player-Client-Options-API.patch | 4 ++-- ...hunk-Priority-Urgency-System-for-Chunks.patch | 4 ++-- 10 files changed, 26 insertions(+), 34 deletions(-) diff --git a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch index 499f6a8ff3..7e1c2e2064 100644 --- a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f27fb59e752d25807859396560b213162870998e..9718dd56217dd64f51ea399b4ecf57528eb89e89 100644 +index f27fb59e752d25807859396560b213162870998e..66aee62230132d421583ea7c0d99b6f3a462cd7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ @@ -68,15 +68,7 @@ index f27fb59e752d25807859396560b213162870998e..9718dd56217dd64f51ea399b4ecf5752 import net.minecraft.server.MapIcon; import net.minecraft.server.MinecraftKey; import net.minecraft.server.NBTTagCompound; -@@ -54,6 +57,7 @@ import net.minecraft.server.PacketPlayOutMap; - import net.minecraft.server.PacketPlayOutNamedSoundEffect; - import net.minecraft.server.PacketPlayOutPlayerInfo; - import net.minecraft.server.PacketPlayOutPlayerListHeaderFooter; -+import net.minecraft.server.PacketPlayOutRespawn; - import net.minecraft.server.PacketPlayOutSpawnPosition; - import net.minecraft.server.PacketPlayOutStopSound; - import net.minecraft.server.PacketPlayOutTitle; -@@ -1216,8 +1220,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1216,8 +1219,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -91,7 +83,7 @@ index f27fb59e752d25807859396560b213162870998e..9718dd56217dd64f51ea399b4ecf5752 PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1258,8 +1267,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1258,8 +1266,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -106,7 +98,7 @@ index f27fb59e752d25807859396560b213162870998e..9718dd56217dd64f51ea399b4ecf5752 getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1268,6 +1282,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1268,6 +1281,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } diff --git a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch index 6528b39416..173548176d 100644 --- a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9718dd56217dd64f51ea399b4ecf57528eb89e89..61d4f52f97a9404b1ba10ceaa25c5f79be8b2a9f 100644 +index 66aee62230132d421583ea7c0d99b6f3a462cd7d..04d3034148434cd17549018ce337e47c408d1e02 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 9718dd56217dd64f51ea399b4ecf57528eb89e89..61d4f52f97a9404b1ba10ceaa25c5f79 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1488,7 +1489,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1487,7 +1488,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index 192b30ff62..5024f85eac 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -155,10 +155,10 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 61d4f52f97a9404b1ba10ceaa25c5f79be8b2a9f..2f27b2559977161c5be898a3df928452272b9c3d 100644 +index 04d3034148434cd17549018ce337e47c408d1e02..a0fae649733f2cd02ed1df713b43aa1d3a037ef1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -790,7 +790,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { diff --git a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index 8d817babda..70615fba7c 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch @@ -27,10 +27,10 @@ index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2f27b2559977161c5be898a3df928452272b9c3d..417ee5934edc1f17b7186ae920944f9a61b02f34 100644 +index a0fae649733f2cd02ed1df713b43aa1d3a037ef1..90acd5e77d5930d589a2f29523b2d2e2850f3f1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1951,6 +1951,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1950,6 +1950,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index 430ad919f4..63644591e9 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -357,10 +357,10 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 417ee5934edc1f17b7186ae920944f9a61b02f34..9e18e3f7819761089f6c908cdb2f4c5afd86d985 100644 +index 90acd5e77d5930d589a2f29523b2d2e2850f3f1f..1eff9edb7d6aaf5e6c1094a32d52d38bb41c0ae3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1742,7 +1742,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1741,7 +1741,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { diff --git a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 55496ff585..48b1081f9e 100644 --- a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -106,10 +106,10 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9e18e3f7819761089f6c908cdb2f4c5afd86d985..937ac92516b5d27ad080ff0a84b33cc71da4f65d 100644 +index 1eff9edb7d6aaf5e6c1094a32d52d38bb41c0ae3..1401eefbe9a2c583d669ad77e63c283e2b2cf433 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -144,6 +144,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 9e18e3f7819761089f6c908cdb2f4c5afd86d985..937ac92516b5d27ad080ff0a84b33cc7 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1392,6 +1393,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1391,6 +1392,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 9e18e3f7819761089f6c908cdb2f4c5afd86d985..937ac92516b5d27ad080ff0a84b33cc7 public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1414,6 +1427,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1413,6 +1426,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index 9e18e3f7819761089f6c908cdb2f4c5afd86d985..937ac92516b5d27ad080ff0a84b33cc7 if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1428,6 +1443,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1427,6 +1442,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); diff --git a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch index 04b31f0705..69061b08d9 100644 --- a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 937ac92516b5d27ad080ff0a84b33cc71da4f65d..ed2c4fd43c9bf6ea4e6b647d36e9a5824f9b0b87 100644 +index 1401eefbe9a2c583d669ad77e63c283e2b2cf433..915d0da2604de7e2824fc94bafcf7686b22d9e5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1996,6 +1996,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1995,6 +1995,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } diff --git a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch index 75e7a94e2f..2ff8e041c0 100644 --- a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch @@ -40,10 +40,10 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ed2c4fd43c9bf6ea4e6b647d36e9a5824f9b0b87..61ccd4991c14cdcc05352158e26855ef15c82bd0 100644 +index 915d0da2604de7e2824fc94bafcf7686b22d9e5e..7ef83fb58e9a86637b7645e0ef6d3d247f88af89 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2005,6 +2005,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2004,6 +2004,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch index 8af344ea73..c00be4db45 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 61ccd4991c14cdcc05352158e26855ef15c82bd0..c447e6f9c5ad7a1e58a76884a0c00bbe192671d2 100644 +index 7ef83fb58e9a86637b7645e0ef6d3d247f88af89..9dd6f6cac9da8425acb5d59650dbfb0c6be798d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ @@ -170,7 +170,7 @@ index 61ccd4991c14cdcc05352158e26855ef15c82bd0..c447e6f9c5ad7a1e58a76884a0c00bbe import com.destroystokyo.paper.Title; import com.destroystokyo.paper.profile.CraftPlayerProfile; import com.destroystokyo.paper.profile.PlayerProfile; -@@ -2015,6 +2018,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2014,6 +2017,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 7dd07bfe6c..a32b8bd7da 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1231,10 +1231,10 @@ index 8a37871bea36bd34b514428acea1acad2ba5897e..b973bd8f60412232df53ac52d97135de net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c447e6f9c5ad7a1e58a76884a0c00bbe192671d2..2faa6dd671df53ac0fa18920773e3ca7425a791e 100644 +index 9dd6f6cac9da8425acb5d59650dbfb0c6be798d9..97a24b4dff4a2de06f224458969b9a728041260d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -743,6 +743,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); } From 943c9238562984856c902cb3cd64fe540ad1e5c4 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jun 2020 18:29:52 +0100 Subject: [PATCH 49/95] Fix NPE from an invalid spawn dimension (Fixes #3660) --- .../0481-No-Tick-view-distance-implementation.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index 5cf989c8bf..8f10aa256c 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -567,7 +567,7 @@ index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f7c23ec053b261a5e7e069fb61dd803c385d6758..477b1920869bfdab166b815f433d2df2821e5d58 100644 +index ae030fd102549aa6f721c27be090a3a230d789bb..46df57969764244720b4d62883cec64e6d64816d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -177,7 +177,7 @@ public abstract class PlayerList { @@ -575,7 +575,7 @@ index f7c23ec053b261a5e7e069fb61dd803c385d6758..477b1920869bfdab166b815f433d2df2 // Spigot - view distance - playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); -+ playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance ++ playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); From 358ea3f7b40eeb07db508965575874d0ef2c5a0a Mon Sep 17 00:00:00 2001 From: HexedHero <6012891+HexedHero@users.noreply.github.com> Date: Sun, 28 Jun 2020 18:49:42 +0100 Subject: [PATCH 50/95] [CI-SKIP] Change 1.16 branch to show 1.16.1 API in readme (#3664) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be8cacbb4c..78b995ab1b 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ How To (Plugin Developers) com.destroystokyo.paper paper-api - 1.15.2-R0.1-SNAPSHOT + 1.16.1-R0.1-SNAPSHOT provided ``` From e928b165ce6f81b7d9f78a73c727cd8ef06e70cc Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Sun, 28 Jun 2020 21:57:31 +0200 Subject: [PATCH 51/95] [1.16] Fix MobGoals#getAllGoals not actually returning all goals (#3670) --- .../0202-Add-Mob-Goal-API.patch | 10 ++-- .../0477-Implement-Mob-Goal-API.patch | 48 +++++++++++++++---- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch b/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch index 49e0b5175e..7ad680ded7 100644 --- a/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch +++ b/Spigot-API-Patches/0202-Add-Mob-Goal-API.patch @@ -148,10 +148,10 @@ index 0000000000000000000000000000000000000000..9cd98c6fcfa3eb439d9013ef76ef4661 +} diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/GoalType.java b/src/main/java/com/destroystokyo/paper/entity/ai/GoalType.java new file mode 100644 -index 0000000000000000000000000000000000000000..e2b44aff21e6818512a81f03a3bff913abf61f9f +index 0000000000000000000000000000000000000000..7024c8f484d2460abf3abfe65a29771d814105ec --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/ai/GoalType.java -@@ -0,0 +1,13 @@ +@@ -0,0 +1,17 @@ +package com.destroystokyo.paper.entity.ai; + +/** @@ -162,7 +162,11 @@ index 0000000000000000000000000000000000000000..e2b44aff21e6818512a81f03a3bff913 + MOVE, + LOOK, + JUMP, -+ TARGET ++ TARGET, ++ /** ++ * Used to map vanilla goals, that are a behavior goal but don't have a type set... ++ */ ++ UNKNOWN_BEHAVIOR, + +} diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoals.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoals.java diff --git a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch index 90c81a0b21..69ea61e20b 100644 --- a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch @@ -24,10 +24,10 @@ index 6cde6f7dcbb3ff2fda0189a06573640777548d27..ef8ee637a8a0e5e703922b2991c58f4f diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java new file mode 100644 -index 0000000000000000000000000000000000000000..4ec476669d98ab2f03859e763cfe55904563238f +index 0000000000000000000000000000000000000000..7b12014db0abd9c4b89f58ceaaa7d9dd032b027a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java -@@ -0,0 +1,349 @@ +@@ -0,0 +1,353 @@ +package com.destroystokyo.paper.entity.ai; + +import com.google.common.collect.BiMap; @@ -312,6 +312,8 @@ index 0000000000000000000000000000000000000000..4ec476669d98ab2f03859e763cfe5590 + return GoalType.LOOK; + case JUMP: + return GoalType.JUMP; ++ case UNKNOWN_BEHAVIOR: ++ return GoalType.UNKNOWN_BEHAVIOR; + case TARGET: + return GoalType.TARGET; + default: @@ -335,6 +337,8 @@ index 0000000000000000000000000000000000000000..4ec476669d98ab2f03859e763cfe5590 + return PathfinderGoal.Type.LOOK; + case JUMP: + return PathfinderGoal.Type.JUMP; ++ case UNKNOWN_BEHAVIOR: ++ return PathfinderGoal.Type.UNKNOWN_BEHAVIOR; + case TARGET: + return PathfinderGoal.Type.TARGET; + default: @@ -379,10 +383,10 @@ index 0000000000000000000000000000000000000000..4ec476669d98ab2f03859e763cfe5590 +} diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/PaperCustomGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/PaperCustomGoal.java new file mode 100644 -index 0000000000000000000000000000000000000000..8e4dc2708d71edcb8f32bb72a64f3c493052c2a8 +index 0000000000000000000000000000000000000000..5720feaaf92fc8b6a70e7f6e2d25163c42d231c1 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/ai/PaperCustomGoal.java -@@ -0,0 +1,52 @@ +@@ -0,0 +1,55 @@ +package com.destroystokyo.paper.entity.ai; + +import net.minecraft.server.PathfinderGoal; @@ -400,6 +404,9 @@ index 0000000000000000000000000000000000000000..8e4dc2708d71edcb8f32bb72a64f3c49 + this.handle = handle; + + this.setTypes(MobGoalHelper.paperToVanilla(handle.getTypes())); ++ if (this.getGoalTypes().size() == 0) { ++ this.getGoalTypes().addUnchecked(Type.UNKNOWN_BEHAVIOR); ++ } + } + + @Override @@ -748,12 +755,21 @@ index 9df0006c1a283f77c4d01d9fce9062fc1c9bbb1f..b3329c6fcd6758a781a51f5ba8f5052a + } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java -index a85d81186ae92dec72f2cc3a1dcd8c4b7e7ede62..d2aa9a854ea013f24f585c194bd1ddfd8d5410a5 100644 +index a85d81186ae92dec72f2cc3a1dcd8c4b7e7ede62..8f26cb20b8c63f2809838c97528cef62ec39bcdb 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoal.java +++ b/src/main/java/net/minecraft/server/PathfinderGoal.java -@@ -10,9 +10,9 @@ public abstract class PathfinderGoal { +@@ -8,11 +8,17 @@ public abstract class PathfinderGoal { + private final EnumSet a = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. + private final OptimizedSmallEnumSet goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector - public PathfinderGoal() {} +- public PathfinderGoal() {} ++ // Paper start make sure goaltypes is never empty ++ public PathfinderGoal() { ++ if (this.goalTypes.size() == 0) { ++ this.goalTypes.addUnchecked(Type.UNKNOWN_BEHAVIOR); ++ } ++ } ++ // paper end - public abstract boolean a(); + public boolean a() { return this.shouldActivate(); } public boolean shouldActivate() { return false;} public boolean shouldActivate2() { return a(); } // Paper - OBFHELPER, for both directions... @@ -763,7 +779,7 @@ index a85d81186ae92dec72f2cc3a1dcd8c4b7e7ede62..d2aa9a854ea013f24f585c194bd1ddfd return this.a(); } -@@ -20,16 +20,16 @@ public abstract class PathfinderGoal { +@@ -20,19 +26,23 @@ public abstract class PathfinderGoal { return true; } @@ -783,6 +799,22 @@ index a85d81186ae92dec72f2cc3a1dcd8c4b7e7ede62..d2aa9a854ea013f24f585c194bd1ddfd // Paper start - remove streams from pathfindergoalselector this.goalTypes.clear(); this.goalTypes.addAllUnchecked(enumset); ++ // make sure its never empty ++ if (this.goalTypes.size() == 0) { ++ this.goalTypes.addUnchecked(Type.UNKNOWN_BEHAVIOR); ++ } + // Paper end - remove streams from pathfindergoalselector + } + +@@ -48,7 +58,7 @@ public abstract class PathfinderGoal { + + public static enum Type { + +- MOVE, LOOK, JUMP, TARGET; ++ MOVE, LOOK, JUMP, TARGET, UNKNOWN_BEHAVIOR; // Paper - add unknown + + private Type() {} + } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java index 22f4fec58fbaab24673dd418700c51671248c510..d3f0327a2a7cdedf3fe8d10df981a9f1cb378d26 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java From 6c6318cb3ac5a84af82c5a801152e22468e39b81 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 18:04:04 -0400 Subject: [PATCH 52/95] Fix player skulls rendering - Fixes #3672 --- ...ient-rendering-skulls-from-same-user.patch | 21 +++++++++---------- ...5-Add-Velocity-IP-Forwarding-Support.patch | 4 ++-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch index 0cb0f59b6e..2fd1299609 100644 --- a/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch @@ -25,7 +25,7 @@ index 7b2010ec4955fb5788c60178c6e306ea3098e9ba..95e801a9a7ca405ff7e80c920fa78493 private Entity k; private ShapeDetectorBlock l; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..e3ba2e8db98c94ed10e96601addb0110a8385926 100644 +index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..a7560ac0719d789f2b8ebc0294190a9bd43a2512 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -274,9 +274,18 @@ public class PacketDataSerializer extends ByteBuf { @@ -40,7 +40,7 @@ index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..e3ba2e8db98c94ed10e96601addb0110 + if (nbttagcompound != null && nbttagcompound.hasKeyOfType("SkullOwner", 10)) { + NBTTagCompound owner = nbttagcompound.getCompound("SkullOwner"); + if (owner.hasKey("Id")) { -+ nbttagcompound.setString("SkullOwnerOrig", owner.getString("Id")); ++ nbttagcompound.setUUID("SkullOwnerOrig", owner.getUUID("Id")); + TileEntitySkull.sanitizeUUID(owner); + } + } @@ -48,7 +48,7 @@ index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..e3ba2e8db98c94ed10e96601addb0110 } this.a(nbttagcompound); -@@ -296,7 +305,17 @@ public class PacketDataSerializer extends ByteBuf { +@@ -296,7 +305,16 @@ public class PacketDataSerializer extends ByteBuf { itemstack.setTag(this.l()); // CraftBukkit start if (itemstack.getTag() != null) { @@ -56,11 +56,10 @@ index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..e3ba2e8db98c94ed10e96601addb0110 + // Paper start - Fix skulls of same owner - restore orig ID since we changed it on send to client + if (itemstack.tag.hasKey("SkullOwnerOrig")) { + NBTTagCompound owner = itemstack.tag.getCompound("SkullOwner"); -+ String ownerOrig = itemstack.tag.getString("SkullOwnerOrig"); -+ if (!owner.isEmpty() && !ownerOrig.isEmpty()) { -+ owner.setString("Id", ownerOrig); ++ if (itemstack.tag.hasUUID("SkullOwnerOrig")) { ++ owner.setUUID("Id", itemstack.tag.getUUID("SkullOwnerOrig")); ++ itemstack.tag.remove("SkullOwnerOrig"); + } -+ itemstack.tag.remove("SkullOwnerOrig"); + } + // Paper end + // CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); // Paper - This is no longer needed due to NBT being supported @@ -80,7 +79,7 @@ index e336437207f9d6adbab69ef2785c129ff2ec1b36..72ff0a1e6428a1776f49c26e1715f5f2 this.g.add(nbttagcompound); } diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 9a2efd38f28819355a271b9515ac98c3382c7383..fb7aa15c272678be7ec2a1d28891a62121695ed8 100644 +index 4fae1b3274a96b871b39de083e9b28ab6129533f..579a81e521fdfabfa0318d06c6760a8ab7a88c1e 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java @@ -145,9 +145,37 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa @@ -110,12 +109,12 @@ index 9a2efd38f28819355a271b9515ac98c3382c7383..fb7aa15c272678be7ec2a1d28891a621 + if (list != null && !list.isEmpty()) { + String textures = ((NBTTagCompound)list.get(0)).getString("Value"); + if (textures != null && textures.length() > 3) { -+ String uuid = UUID.nameUUIDFromBytes(textures.getBytes()).toString(); -+ owner.setString("Id", uuid); ++ UUID uuid = UUID.nameUUIDFromBytes(textures.getBytes()); ++ owner.setUUID("Id", uuid); + return; + } + } -+ owner.setString("Id", UUID.randomUUID().toString()); ++ owner.setUUID("Id", UUID.randomUUID()); + } + // Paper end + diff --git a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch index ace92ff547..37ab2eb616 100644 --- a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch @@ -227,7 +227,7 @@ index 8cb29ddc0d5a5951ea35e1a16c023efb9b0be42d..2916119507ec5ecd9266569b0003d050 public java.util.UUID spoofedUUID; public com.mojang.authlib.properties.Property[] spoofedProfile; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index e3ba2e8db98c94ed10e96601addb0110a8385926..6d3db25dd9bf33b08cb6945d8db3c32420efb7e3 100644 +index a7560ac0719d789f2b8ebc0294190a9bd43a2512..2098d8b0e1e7f71f0fe83d04625271b09e662a6f 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -164,6 +164,7 @@ public class PacketDataSerializer extends ByteBuf { @@ -246,7 +246,7 @@ index e3ba2e8db98c94ed10e96601addb0110a8385926..6d3db25dd9bf33b08cb6945d8db3c324 public UUID k() { return new UUID(this.readLong(), this.readLong()); } -@@ -322,6 +324,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -321,6 +323,7 @@ public class PacketDataSerializer extends ByteBuf { } } From f339d6e1624bcad3feef48c2e3c9547f19b3c3a7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 18:44:34 -0400 Subject: [PATCH 53/95] Fix more null pointer issues around deleted worlds - Fixes #3660 --- ...dDebugInfo-not-initialized-on-client.patch | 4 +- ...-Manager-and-add-advanced-packet-sup.patch | 24 +----- ...0-Fix-Whitelist-On-Off-inconsistency.patch | 4 +- ...oggleEvent-when-whitelist-is-toggled.patch | 4 +- .../0344-Entity-getEntitySpawnReason.patch | 4 +- ...346-Implement-PlayerPostRespawnEvent.patch | 8 +- .../0382-Fix-MC-158900.patch | 4 +- ...-sneak-when-changing-worlds-MC-10657.patch | 4 +- ...ptimize-Collision-to-not-load-chunks.patch | 4 +- .../0447-Improved-Watchdog-Support.patch | 4 +- ...61-Broadcast-join-message-to-console.patch | 4 +- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 18 ++--- ...Load-Chunks-for-Login-Asynchronously.patch | 73 +++++-------------- ...No-Tick-view-distance-implementation.patch | 8 +- ...k-Priority-Urgency-System-for-Chunks.patch | 26 +++---- ...-packets-to-nearby-locations-sounds-.patch | 4 +- 16 files changed, 65 insertions(+), 132 deletions(-) diff --git a/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch index 7d0d680d28..f59434cb53 100644 --- a/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5bed3682af9eb63b355bb24bbee466a05ae7cc34..b6d4db1fffb7bab56f9a181e75579775e7d9fafd 100644 +index 5bed3682af9eb63b355bb24bbee466a05ae7cc34..675b6b521f0583ccbc9f34cbc38c0c32d7e7f3f7 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -174,6 +174,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); -+ playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23))); // Paper - fix this rule not being initialized on the client ++ playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver1.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23))); // Paper - fix this rule not being initialized on the client this.d(entityplayer); entityplayer.getStatisticManager().c(); entityplayer.B().a(entityplayer); diff --git a/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index 75b33baf2e..32bcf9e783 100644 --- a/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -28,7 +28,7 @@ and then catch exceptions and close if they fire. Part of this commit was authored by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index c84ee96cbed69cca311dd546e562a5322a03fd20..e27c96a1f53f6a2929b8daed9844320da6c57234 100644 +index c84ee96cbed69cca311dd546e562a5322a03fd20..bd33f85cfe00cda72efb871f1fc11bebfb0ce700 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -65,6 +65,10 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -84,7 +84,7 @@ index c84ee96cbed69cca311dd546e562a5322a03fd20..e27c96a1f53f6a2929b8daed9844320d + } + // Paper start + private static boolean canSendImmediate(NetworkManager networkManager, Packet packet) { -+ return networkManager.isPending || networkManager.protocol != EnumProtocol.PLAY || networkManager.queueImmunity || ++ return networkManager.isPending || networkManager.protocol != EnumProtocol.PLAY || + packet instanceof PacketPlayOutKeepAlive || + packet instanceof PacketPlayOutChat || + packet instanceof PacketPlayOutTabComplete; @@ -337,26 +337,6 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..545dbe6ddcce1d172f465b4a7ab85654 default boolean packetTooLarge(NetworkManager manager) { return false; } -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 139104c436c9a04865ec4138606e82091be8b65f..344d7f62dd77cb2ecaf324a1fe88c6fabbddbc64 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -154,6 +154,7 @@ public abstract class PlayerList { - entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); - entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world) - entityplayer.setYawPitch(loc.getYaw(), loc.getPitch()); -+ networkmanager.queueImmunity = true; // Paper - // Spigot end - - // CraftBukkit - Moved message to after join -@@ -176,6 +177,7 @@ public abstract class PlayerList { - playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); - playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); - playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23))); // Paper - fix this rule not being initialized on the client -+ networkmanager.queueImmunity = false; // Paper - this.d(entityplayer); - entityplayer.getStatisticManager().c(); - entityplayer.B().a(entityplayer); diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java index 7abb122943b8a5ce0e888d16d1592a127bb9bb6f..0438126662e7c635d9a4f7b8c54fe7c50403ffe8 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java diff --git a/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index e361839d47..de697b0ca6 100644 --- a/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -11,10 +11,10 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 344d7f62dd77cb2ecaf324a1fe88c6fabbddbc64..74642f6536c811c41acbd24d46dd193cdb02e1fb 100644 +index e48184b87b2c98cc2f103204ba62ed22a6fd3694..29e026f6f4106da029f9596201167c08078f4a45 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -932,9 +932,9 @@ public abstract class PlayerList { +@@ -930,9 +930,9 @@ public abstract class PlayerList { } public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) { boolean isOp = this.operators.d(gameprofile); diff --git a/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index a43add667f..f0863a85dc 100644 --- a/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 74642f6536c811c41acbd24d46dd193cdb02e1fb..f4b2e3db79beb3f9c355a5e03a439b8e4689f95b 100644 +index 29e026f6f4106da029f9596201167c08078f4a45..5ee209074e44a1a1988641098b9376e4f0c04b45 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1050,6 +1050,7 @@ public abstract class PlayerList { +@@ -1048,6 +1048,7 @@ public abstract class PlayerList { } public void setHasWhitelist(boolean flag) { diff --git a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch index e0eae4bde0..cf9dadbad2 100644 --- a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch @@ -59,10 +59,10 @@ index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f4b2e3db79beb3f9c355a5e03a439b8e4689f95b..800f2a0ce13b9394e44277ad2e0455bd88fa34c2 100644 +index 5ee209074e44a1a1988641098b9376e4f0c04b45..b00825156f12fabab0fc740f909363846cee168e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -264,7 +264,7 @@ public abstract class PlayerList { +@@ -262,7 +262,7 @@ public abstract class PlayerList { // CraftBukkit start WorldServer finalWorldServer = worldserver1; Entity entity = EntityTypes.a(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { diff --git a/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch index 81be8d58fa..a7062e5cc6 100644 --- a/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 800f2a0ce13b9394e44277ad2e0455bd88fa34c2..7bc1eff8233b1afe66eeb9371e28a9d4396661f5 100644 +index b00825156f12fabab0fc740f909363846cee168e..43cb1e5ecc753f431666f326ada590581e930339 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -666,9 +666,14 @@ public abstract class PlayerList { +@@ -664,9 +664,14 @@ public abstract class PlayerList { // this.a(entityplayer1, entityplayer, worldserver1); // CraftBukkit - removed boolean flag2 = false; @@ -24,7 +24,7 @@ index 800f2a0ce13b9394e44277ad2e0455bd88fa34c2..7bc1eff8233b1afe66eeb9371e28a9d4 WorldServer worldserver1 = this.server.getWorldServer(entityplayer.getSpawnDimension()); if (worldserver1 != null) { Optional optional; -@@ -709,6 +714,7 @@ public abstract class PlayerList { +@@ -707,6 +712,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 @@ -32,7 +32,7 @@ index 800f2a0ce13b9394e44277ad2e0455bd88fa34c2..7bc1eff8233b1afe66eeb9371e28a9d4 } else { location.setWorld(worldserver.getWorld()); } -@@ -766,6 +772,13 @@ public abstract class PlayerList { +@@ -764,6 +770,13 @@ public abstract class PlayerList { if (entityplayer.playerConnection.isDisconnected()) { this.savePlayerFile(entityplayer); } diff --git a/Spigot-Server-Patches/0382-Fix-MC-158900.patch b/Spigot-Server-Patches/0382-Fix-MC-158900.patch index cff3cae888..b590037691 100644 --- a/Spigot-Server-Patches/0382-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0382-Fix-MC-158900.patch @@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7bc1eff8233b1afe66eeb9371e28a9d4396661f5..3a21a07906417c14d000b7e22bd190f8c258d0fb 100644 +index 43cb1e5ecc753f431666f326ada590581e930339..dadb3e4aa670d3e3a7a6672da55ebc26a86bb666 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -533,8 +533,10 @@ public abstract class PlayerList { +@@ -531,8 +531,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); diff --git a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 2d949c9a53..6a0a58c9a1 100644 --- a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -18,10 +18,10 @@ index e505f7c9b6e36262d01b5f8103db3df03a95a93d..ec160ddedf8b6fcbfd357afcc5f9e58e PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3a21a07906417c14d000b7e22bd190f8c258d0fb..56cd5396f27f8f582f17bd74b8a72379557d7e8f 100644 +index dadb3e4aa670d3e3a7a6672da55ebc26a86bb666..82259e8404d350cb9578e8a55d9c11b1e5b9a629 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -761,6 +761,8 @@ public abstract class PlayerList { +@@ -759,6 +759,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect)); } diff --git a/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch index aa7dc492e2..3527a6ac16 100644 --- a/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch @@ -40,10 +40,10 @@ index b27260270de80de371a5a71fa0516aa43c44c83e..1cc40b1f0af9e617b2a71bcc442543e1 Stream c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 56cd5396f27f8f582f17bd74b8a72379557d7e8f..cac27c509dd3bec9f7feabf5804d1140055b1c6e 100644 +index 82259e8404d350cb9578e8a55d9c11b1e5b9a629..a9dc7807508e5227b59a750f982bf7a0740fa493 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -724,6 +724,7 @@ public abstract class PlayerList { +@@ -722,6 +722,7 @@ public abstract class PlayerList { entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // CraftBukkit end diff --git a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch index 28af7ad00f..915b87a7d3 100644 --- a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch @@ -273,10 +273,10 @@ index bb4d54ebee573964cf3026888da108584b12972f..09f94bd242318155dbb46e12224ad3e4 list.stream().map((playerchunk) -> { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 610c3ed31e0dceeded4dbd5f63db23def88e1ea6..62dc7d7cebc4b7e4a64eda6130c988251a55a6fa 100644 +index 6f6d1d4c733faa80045fb63269b16ba127c2b616..2602c326cf8d3516162fcc08f0f40ba4ee5f6a16 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -431,7 +431,7 @@ public abstract class PlayerList { +@@ -429,7 +429,7 @@ public abstract class PlayerList { cserver.getPluginManager().callEvent(playerQuitEvent); entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); diff --git a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch index 19cc5fa2fe..c29cd22c28 100644 --- a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 62dc7d7cebc4b7e4a64eda6130c988251a55a6fa..c79572a38acba2413a1288c40a317dd102da6520 100644 +index 2602c326cf8d3516162fcc08f0f40ba4ee5f6a16..00071913c0bb4deec7501a54818a2a1d6febc769 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -213,9 +213,9 @@ public abstract class PlayerList { +@@ -211,9 +211,9 @@ public abstract class PlayerList { joinMessage = playerJoinEvent.getJoinMessage(); if (joinMessage != null && joinMessage.length() > 0) { diff --git a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 90569f8f80..5ad6055e71 100644 --- a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -52,23 +52,23 @@ index 4ab719930f5b35c0ae221e9345f1e2eda7d9d719..8de86684dda275585826617b41d6792f if (!(entity instanceof EntityComplexPart)) { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c79572a38acba2413a1288c40a317dd102da6520..0f50aef7ff3c06cad0afa22924da170e04780053 100644 +index 00071913c0bb4deec7501a54818a2a1d6febc769..18272d56bdac0ff76092d8d834c53474516732a8 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -202,6 +202,12 @@ public abstract class PlayerList { +@@ -200,6 +200,12 @@ public abstract class PlayerList { this.j.put(entityplayer.getUniqueID(), entityplayer); // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below + // Paper start - correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks + entityplayer.supressTrackerForLogin = true; -+ worldserver.addPlayerJoin(entityplayer); ++ worldserver1.addPlayerJoin(entityplayer); + this.server.getBossBattleCustomData().a(entityplayer); // see commented out section below worldserver.addPlayerJoin(entityplayer); -+ mountSavedVehicle(entityplayer, worldserver, nbttagcompound); ++ mountSavedVehicle(entityplayer, worldserver1, nbttagcompound); + // Paper end // CraftBukkit start PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); cserver.getPluginManager().callEvent(playerJoinEvent); -@@ -236,6 +242,8 @@ public abstract class PlayerList { +@@ -234,6 +240,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer1})); } entityplayer.sentListPacket = true; @@ -77,19 +77,19 @@ index c79572a38acba2413a1288c40a317dd102da6520..0f50aef7ff3c06cad0afa22924da170e // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -261,6 +269,11 @@ public abstract class PlayerList { +@@ -259,6 +267,11 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobeffect)); } + // Paper start - move vehicle into method so it can be called above - short circuit around that code -+ onPlayerJoinFinish(entityplayer, worldserver, s1); ++ onPlayerJoinFinish(entityplayer, worldserver1, s1); + } -+ private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver, NBTTagCompound nbttagcompound) { ++ private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver1, NBTTagCompound nbttagcompound) { + // Paper end if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -309,6 +322,10 @@ public abstract class PlayerList { +@@ -307,6 +320,10 @@ public abstract class PlayerList { } } diff --git a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch index 16b5328664..86ca7e2063 100644 --- a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch @@ -110,18 +110,10 @@ index 1b9a089eddacbaf1a7d7e19478ee756b4ab601b2..4f37401909f1845d0f18aa497a6561b7 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c385d6758 100644 +index 18272d56bdac0ff76092d8d834c53474516732a8..045d85016edff8e1e8c775f8c701ac806fb3d4e1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -18,6 +18,7 @@ import java.util.Map; - import java.util.Optional; - import java.util.Set; - import java.util.UUID; -+import java.util.concurrent.CompletableFuture; - import javax.annotation.Nullable; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; -@@ -54,11 +55,12 @@ public abstract class PlayerList { +@@ -54,11 +54,12 @@ public abstract class PlayerList { private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z"); private final MinecraftServer server; public final List players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety @@ -135,7 +127,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c // CraftBukkit start // private final Map o; // private final Map p; -@@ -97,6 +99,11 @@ public abstract class PlayerList { +@@ -97,6 +98,11 @@ public abstract class PlayerList { } public void a(NetworkManager networkmanager, EntityPlayer entityplayer) { @@ -147,7 +139,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c entityplayer.loginTime = System.currentTimeMillis(); // Paper GameProfile gameprofile = entityplayer.getProfile(); UserCache usercache = this.server.getUserCache(); -@@ -110,7 +117,7 @@ public abstract class PlayerList { +@@ -110,7 +116,7 @@ public abstract class PlayerList { if (nbttagcompound != null && nbttagcompound.hasKey("bukkit")) { NBTTagCompound bukkit = nbttagcompound.getCompound("bukkit"); s = bukkit.hasKeyOfType("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s; @@ -156,33 +148,31 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c // CraftBukkit end if (nbttagcompound != null) { -@@ -185,6 +192,53 @@ public abstract class PlayerList { +@@ -183,6 +189,51 @@ public abstract class PlayerList { entityplayer.B().a(entityplayer); this.sendScoreboard(worldserver1.getScoreboard(), entityplayer); this.server.invalidatePingSample(); + // Paper start - async load spawn in chunk -+ WorldServer finalWorldserver = worldserver; -+ WorldServer finalWorldserver1 = worldserver1; ++ WorldServer finalWorldserver = worldserver1; + int chunkX = loc.getBlockX() >> 4; + int chunkZ = loc.getBlockZ() >> 4; + final ChunkCoordIntPair pos = new ChunkCoordIntPair(chunkX, chunkZ); -+ PlayerChunkMap playerChunkMap = finalWorldserver.getChunkProvider().playerChunkMap; ++ PlayerChunkMap playerChunkMap = worldserver1.getChunkProvider().playerChunkMap; + playerChunkMap.chunkDistanceManager.addTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); -+ worldserver.getChunkProvider().tickDistanceManager(); -+ worldserver.getChunkProvider().getChunkAtAsynchronously(chunkX, chunkZ, true, true).thenApply(chunk -> { ++ worldserver1.getChunkProvider().tickDistanceManager(); ++ worldserver1.getChunkProvider().getChunkAtAsynchronously(chunkX, chunkZ, true, true).thenApply(chunk -> { + PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pos.pair()); + if (updatingChunk != null) { + return updatingChunk.getEntityTickingFuture(); + } else { -+ return CompletableFuture.completedFuture(chunk); ++ return java.util.concurrent.CompletableFuture.completedFuture(chunk); + } + }).thenAccept(chunk -> { + playerconnection.playerJoinReady = () -> { + postChunkLoadJoin( -+ entityplayer, finalWorldserver, finalWorldserver1, networkmanager, playerconnection, ++ entityplayer, finalWorldserver, networkmanager, playerconnection, + nbttagcompound, networkmanager.getSocketAddress().toString(), lastKnownName + ); -+ //playerChunkMap.chunkDistanceManager.removeTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); + }; + }); + } @@ -200,7 +190,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c + }); + } + -+ private void postChunkLoadJoin(EntityPlayer entityplayer, WorldServer worldserver, WorldServer worldserver1, NetworkManager networkmanager, PlayerConnection playerconnection, NBTTagCompound nbttagcompound, String s1, String s) { ++ private void postChunkLoadJoin(EntityPlayer entityplayer, WorldServer worldserver1, NetworkManager networkmanager, PlayerConnection playerconnection, NBTTagCompound nbttagcompound, String s1, String s) { + pendingPlayers.remove(entityplayer.getUniqueID(), entityplayer); + if (!networkmanager.isConnected()) { + return; @@ -210,36 +200,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c ChatMessage chatmessage; if (entityplayer.getProfile().getName().equalsIgnoreCase(s)) { -@@ -206,7 +260,7 @@ public abstract class PlayerList { - entityplayer.supressTrackerForLogin = true; - worldserver.addPlayerJoin(entityplayer); - this.server.getBossBattleCustomData().a(entityplayer); // see commented out section below worldserver.addPlayerJoin(entityplayer); -- mountSavedVehicle(entityplayer, worldserver, nbttagcompound); -+ mountSavedVehicle(entityplayer, worldserver, worldserver1, nbttagcompound); - // Paper end - // CraftBukkit start - PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); -@@ -243,7 +297,6 @@ public abstract class PlayerList { - } - entityplayer.sentListPacket = true; - entityplayer.supressTrackerForLogin = false; // Paper -- ((WorldServer)entityplayer.world).getChunkProvider().playerChunkMap.addEntity(entityplayer); // Paper - track entity now - // CraftBukkit end - - entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -270,9 +323,10 @@ public abstract class PlayerList { - } - - // Paper start - move vehicle into method so it can be called above - short circuit around that code -+ ((WorldServer)entityplayer.world).getChunkProvider().playerChunkMap.addEntity(entityplayer); // track entity now - onPlayerJoinFinish(entityplayer, worldserver, s1); - } -- private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver, NBTTagCompound nbttagcompound) { -+ private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver, WorldServer worldserver1, NBTTagCompound nbttagcompound) { - // Paper end - if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { - NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); -@@ -421,6 +475,7 @@ public abstract class PlayerList { +@@ -419,6 +470,7 @@ public abstract class PlayerList { protected void savePlayerFile(EntityPlayer entityplayer) { if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -247,7 +208,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -445,7 +500,7 @@ public abstract class PlayerList { +@@ -443,7 +495,7 @@ public abstract class PlayerList { entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); @@ -256,7 +217,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -498,6 +553,13 @@ public abstract class PlayerList { +@@ -496,6 +548,13 @@ public abstract class PlayerList { // this.p.remove(uuid); // CraftBukkit end } @@ -270,7 +231,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c // CraftBukkit start // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -515,7 +577,7 @@ public abstract class PlayerList { +@@ -513,7 +572,7 @@ public abstract class PlayerList { cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end @@ -279,7 +240,7 @@ index 0f50aef7ff3c06cad0afa22924da170e04780053..f7c23ec053b261a5e7e069fb61dd803c } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -534,6 +596,13 @@ public abstract class PlayerList { +@@ -532,6 +591,13 @@ public abstract class PlayerList { list.add(entityplayer); } } diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index 8f10aa256c..0de6249390 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -567,10 +567,10 @@ index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ae030fd102549aa6f721c27be090a3a230d789bb..46df57969764244720b4d62883cec64e6d64816d 100644 +index 045d85016edff8e1e8c775f8c701ac806fb3d4e1..0ad06509f26a7677e48f4bfb9c979a42fb6a4f74 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -177,7 +177,7 @@ public abstract class PlayerList { +@@ -175,7 +175,7 @@ public abstract class PlayerList { boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); // Spigot - view distance @@ -579,7 +579,7 @@ index ae030fd102549aa6f721c27be090a3a230d789bb..46df57969764244720b4d62883cec64e entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -819,7 +819,7 @@ public abstract class PlayerList { +@@ -814,7 +814,7 @@ public abstract class PlayerList { // CraftBukkit start WorldData worlddata = worldserver1.getWorldData(); entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver1.getTypeKey(), worldserver1.getDimensionKey(), BiomeManager.a(worldserver1.getSeed()), entityplayer1.playerInteractManager.getGameMode(), entityplayer1.playerInteractManager.c(), worldserver1.isDebugWorld(), worldserver1.isFlatWorld(), flag)); @@ -588,7 +588,7 @@ index ae030fd102549aa6f721c27be090a3a230d789bb..46df57969764244720b4d62883cec64e entityplayer1.spawnIn(worldserver1); entityplayer1.dead = false; entityplayer1.playerConnection.teleport(new Location(worldserver1.getWorld(), entityplayer1.locX(), entityplayer1.locY(), entityplayer1.locZ(), entityplayer1.yaw, entityplayer1.pitch)); -@@ -1286,7 +1286,7 @@ public abstract class PlayerList { +@@ -1281,7 +1281,7 @@ public abstract class PlayerList { public void a(int i) { this.viewDistance = i; diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index a32b8bd7da..6446d09952 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1144,29 +1144,21 @@ index 681de2638eb606185077668d87340f7258e2ad90..fcd30d3fa5bac44ca71714a13917d847 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ea2b2fbfe76ec4c86ac3b236c2daad3e75caa9c3..8326ce64ec57d84b768a0cf0d7873f1e1ea68456 100644 +index 0ad06509f26a7677e48f4bfb9c979a42fb6a4f74..3c238f7957d28f3edb6481a89ea96d6cbbbc96d8 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -200,8 +200,8 @@ public abstract class PlayerList { +@@ -196,8 +196,8 @@ public abstract class PlayerList { final ChunkCoordIntPair pos = new ChunkCoordIntPair(chunkX, chunkZ); - PlayerChunkMap playerChunkMap = finalWorldserver.getChunkProvider().playerChunkMap; + PlayerChunkMap playerChunkMap = worldserver1.getChunkProvider().playerChunkMap; playerChunkMap.chunkDistanceManager.addTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); -- worldserver.getChunkProvider().tickDistanceManager(); -- worldserver.getChunkProvider().getChunkAtAsynchronously(chunkX, chunkZ, true, true).thenApply(chunk -> { -+ worldserver.getChunkProvider().markAreaHighPriority(pos, 28, 3); -+ worldserver.getChunkProvider().getChunkAtAsynchronously(chunkX, chunkZ, true, false).thenApply(chunk -> { +- worldserver1.getChunkProvider().tickDistanceManager(); +- worldserver1.getChunkProvider().getChunkAtAsynchronously(chunkX, chunkZ, true, true).thenApply(chunk -> { ++ worldserver1.getChunkProvider().markAreaHighPriority(pos, 28, 3); ++ worldserver1.getChunkProvider().getChunkAtAsynchronously(chunkX, chunkZ, true, false).thenApply(chunk -> { PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pos.pair()); if (updatingChunk != null) { return updatingChunk.getEntityTickingFuture(); -@@ -214,7 +214,6 @@ public abstract class PlayerList { - entityplayer, finalWorldserver, finalWorldserver1, networkmanager, playerconnection, - nbttagcompound, networkmanager.getSocketAddress().toString(), lastKnownName - ); -- //playerChunkMap.chunkDistanceManager.removeTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); - }; - }); - } -@@ -618,6 +617,7 @@ public abstract class PlayerList { +@@ -613,6 +613,7 @@ public abstract class PlayerList { SocketAddress socketaddress = loginlistener.networkManager.getSocketAddress(); EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(World.OVERWORLD), gameprofile, new PlayerInteractManager(this.server.getWorldServer(World.OVERWORLD))); @@ -1174,7 +1166,7 @@ index ea2b2fbfe76ec4c86ac3b236c2daad3e75caa9c3..8326ce64ec57d84b768a0cf0d7873f1e Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); -@@ -813,6 +813,7 @@ public abstract class PlayerList { +@@ -808,6 +809,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper diff --git a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch index 1b476668ba..5cfe7311cb 100644 --- a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,10 +11,10 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a8100f7ade20932a87c55750b412d6a755a9cdd5..ea744e2fdf7a256d9f04786a670c44e8b517f281 100644 +index 3c238f7957d28f3edb6481a89ea96d6cbbbc96d8..3c5ba8f2fd59d37639f87ac888cc950e7cd628f7 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1063,16 +1063,40 @@ public abstract class PlayerList { +@@ -1059,16 +1059,40 @@ public abstract class PlayerList { } public void sendPacketNearby(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, double d3, ResourceKey resourcekey, Packet packet) { From f4b7b588d59435b99c90f13ec35273a57b64bc2c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 19:12:11 -0400 Subject: [PATCH 54/95] Improve Legacy Component serialization size Don't constantly send format: false for all formatting options when parent already has it false Going to PR this to Spigot, but putting it out here for now Should help with reducing size of items with lots of colors from legacy format. --- ...-Legacy-Component-serialization-size.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch diff --git a/Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch b/Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch new file mode 100644 index 0000000000..1555016a49 --- /dev/null +++ b/Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch @@ -0,0 +1,47 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 28 Jun 2020 19:08:41 -0400 +Subject: [PATCH] Improve Legacy Component serialization size + +Don't constantly send format: false for all formatting options when parent already +has it false + +diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +index a423e3bf3906d3114af885c48d0b45d88d7e7d8b..a223d70b8ae6e6c238877d262b663c8f38d7680c 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +@@ -45,6 +45,7 @@ public final class CraftChatMessage { + // Separate pattern with no group 3, new lines are part of previous string + private static final Pattern INCREMENTAL_PATTERN_KEEP_NEWLINES = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-orx])|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " ]|$))))", Pattern.CASE_INSENSITIVE); + // ChatColor.b does not explicitly reset, its more of empty ++ private static final ChatModifier EMPTY = ChatModifier.b; // Paper - OBFHELPER + private static final ChatModifier RESET = ChatModifier.b.setBold(false).setItalic(false).setUnderline(false).setStrikethrough(false).setRandom(false); + + private final List list = new ArrayList(); +@@ -111,7 +112,25 @@ public final class CraftChatMessage { + throw new AssertionError("Unexpected message format"); + } + } else { // Color resets formatting +- modifier = RESET.setColor(format); ++ // Paper start - improve legacy formatting ++ ChatModifier previous = modifier; ++ modifier = EMPTY.setColor(format); ++ if (previous.isBold()) { ++ modifier = modifier.setBold(false); ++ } ++ if (previous.isItalic()) { ++ modifier = modifier.setItalic(false); ++ } ++ if (previous.isRandom()) { ++ modifier = modifier.setRandom(false); ++ } ++ if (previous.isStrikethrough()) { ++ modifier = modifier.setStrikethrough(false); ++ } ++ if (previous.isUnderlined()) { ++ modifier = modifier.setUnderline(false); ++ } ++ // Paper end + } + needsAdd = true; + break; From 4f45587232695cbbc109c0ea3bf8cb015d240857 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 19:37:31 -0400 Subject: [PATCH 55/95] Don't allow null UUID's for chat Fixes null issue on sending chat packets if some how it got sent null likely caused by plugins --- ...526-Don-t-allow-null-UUID-s-for-chat.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Spigot-Server-Patches/0526-Don-t-allow-null-UUID-s-for-chat.patch diff --git a/Spigot-Server-Patches/0526-Don-t-allow-null-UUID-s-for-chat.patch b/Spigot-Server-Patches/0526-Don-t-allow-null-UUID-s-for-chat.patch new file mode 100644 index 0000000000..306d2a56f2 --- /dev/null +++ b/Spigot-Server-Patches/0526-Don-t-allow-null-UUID-s-for-chat.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 28 Jun 2020 19:36:55 -0400 +Subject: [PATCH] Don't allow null UUID's for chat + + +diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java +index b9b2ddc1acadb96a0c750aeba0c0f6928f74e2fe..87f6ded6e7410702229ed066b2dcdb510853252d 100644 +--- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java ++++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java +@@ -15,7 +15,7 @@ public class PacketPlayOutChat implements Packet { + public PacketPlayOutChat(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype, UUID uuid) { + this.a = ichatbasecomponent; + this.b = chatmessagetype; +- this.c = uuid; ++ this.c = uuid != null ? uuid : SystemUtils.getNullUUID(); // Paper + } + + @Override From 3703b177e33078f016bcf455e034dc3792eec9e4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 19:37:53 -0400 Subject: [PATCH 56/95] Fix texture profile properties getting duplicated - Fixes #3667 --- Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch index f2fa0d3d73..48aa29d0ed 100644 --- a/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch @@ -7,10 +7,10 @@ Establishes base extension of profile systems for future edits too diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java new file mode 100644 -index 0000000000000000000000000000000000000000..d73de9eb89c4e3a748907f2da21a3072cc6b7f41 +index 0000000000000000000000000000000000000000..293b73f4747f48dbf8b6a8453d3fc777de11588d --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -@@ -0,0 +1,296 @@ +@@ -0,0 +1,297 @@ +package com.destroystokyo.paper.profile; + +import com.destroystokyo.paper.PaperConfig; @@ -220,6 +220,7 @@ index 0000000000000000000000000000000000000000..d73de9eb89c4e3a748907f2da21a3072 + } + + for (Property property : sourceProperties.values()) { ++ targetProperties.removeAll(property.getName()); + targetProperties.put(property.getName(), property); + } + } From 04d09e1dc62ea81544c8704f25141d9ae5c423a9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 19:38:30 -0400 Subject: [PATCH 57/95] Add /paper dumpitem command Allows inspecting an items NBT at ease of the item in the players hand. --- .../0525-Paper-dumpitem-command.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Spigot-Server-Patches/0525-Paper-dumpitem-command.patch diff --git a/Spigot-Server-Patches/0525-Paper-dumpitem-command.patch b/Spigot-Server-Patches/0525-Paper-dumpitem-command.patch new file mode 100644 index 0000000000..155582d568 --- /dev/null +++ b/Spigot-Server-Patches/0525-Paper-dumpitem-command.patch @@ -0,0 +1,68 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 28 Jun 2020 19:27:20 -0400 +Subject: [PATCH] Paper dumpitem command + +Let's you quickly view the item in your hands NBT data + +diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java +index cc3fc5200f75f80a60b4cbc260e3a0bc4bb3a869..6bfcf86d44559849de66a24471e29d93217698bd 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java ++++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java +@@ -21,7 +21,9 @@ import org.bukkit.command.CommandSender; + import org.bukkit.craftbukkit.CraftServer; + import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.entity.CraftPlayer; ++import org.bukkit.craftbukkit.inventory.CraftItemStack; + import org.bukkit.entity.Player; ++import org.bukkit.inventory.ItemStack; + + import java.io.File; + import java.io.FileOutputStream; +@@ -37,14 +39,14 @@ public class PaperCommand extends Command { + public PaperCommand(String name) { + super(name); + this.description = "Paper related commands"; +- this.usageMessage = "/paper [heap | entity | reload | version | debug | dumpwaiting | chunkinfo | syncloadinfo | fixlight]"; ++ this.usageMessage = "/paper [heap | entity | reload | version | debug | dumpwaiting | chunkinfo | syncloadinfo | fixlight | dumpitem]"; + this.setPermission("bukkit.command.paper"); + } + + @Override + public List tabComplete(CommandSender sender, String alias, String[] args, Location location) throws IllegalArgumentException { + if (args.length <= 1) +- return getListMatchingLast(args, "heap", "entity", "reload", "version", "debug", "dumpwaiting", "chunkinfo", "syncloadinfo", "fixlight"); ++ return getListMatchingLast(args, "heap", "entity", "reload", "version", "debug", "dumpwaiting", "chunkinfo", "syncloadinfo", "fixlight", "dumpitem"); + + switch (args[0].toLowerCase(Locale.ENGLISH)) + { +@@ -133,6 +135,9 @@ public class PaperCommand extends Command { + case "reload": + doReload(sender); + break; ++ case "dumpitem": ++ doDumpItem(sender); ++ break; + case "debug": + doDebug(sender, args); + break; +@@ -164,6 +169,19 @@ public class PaperCommand extends Command { + return true; + } + ++ private void doDumpItem(CommandSender sender) { ++ ItemStack itemInHand = ((CraftPlayer) sender).getItemInHand(); ++ net.minecraft.server.ItemStack itemStack = CraftItemStack.asNMSCopy(itemInHand); ++ NBTTagCompound tag = itemStack.getTag(); ++ if (tag != null) { ++ String nbt = tag.toString(); ++ Bukkit.getConsoleSender().sendMessage(nbt); ++ sender.sendMessage(nbt); ++ } else { ++ sender.sendMessage("Item does not have NBT"); ++ } ++ } ++ + private void doFixLight(CommandSender sender, String[] args) { + if (!(sender instanceof Player)) { + sender.sendMessage("Only players can use this command"); From bcc619ae1e5f0e2a992d68a2ec36f06dfe6c1f2b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 20:03:31 -0400 Subject: [PATCH 58/95] revert chat changes for now until can get it properly working --- ...-Legacy-Component-serialization-size.patch | 47 ------------------- ...atch => 0524-Paper-dumpitem-command.patch} | 0 ...25-Don-t-allow-null-UUID-s-for-chat.patch} | 0 3 files changed, 47 deletions(-) delete mode 100644 Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch rename Spigot-Server-Patches/{0525-Paper-dumpitem-command.patch => 0524-Paper-dumpitem-command.patch} (100%) rename Spigot-Server-Patches/{0526-Don-t-allow-null-UUID-s-for-chat.patch => 0525-Don-t-allow-null-UUID-s-for-chat.patch} (100%) diff --git a/Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch b/Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch deleted file mode 100644 index 1555016a49..0000000000 --- a/Spigot-Server-Patches/0524-Improve-Legacy-Component-serialization-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sun, 28 Jun 2020 19:08:41 -0400 -Subject: [PATCH] Improve Legacy Component serialization size - -Don't constantly send format: false for all formatting options when parent already -has it false - -diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -index a423e3bf3906d3114af885c48d0b45d88d7e7d8b..a223d70b8ae6e6c238877d262b663c8f38d7680c 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -@@ -45,6 +45,7 @@ public final class CraftChatMessage { - // Separate pattern with no group 3, new lines are part of previous string - private static final Pattern INCREMENTAL_PATTERN_KEEP_NEWLINES = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-orx])|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " ]|$))))", Pattern.CASE_INSENSITIVE); - // ChatColor.b does not explicitly reset, its more of empty -+ private static final ChatModifier EMPTY = ChatModifier.b; // Paper - OBFHELPER - private static final ChatModifier RESET = ChatModifier.b.setBold(false).setItalic(false).setUnderline(false).setStrikethrough(false).setRandom(false); - - private final List list = new ArrayList(); -@@ -111,7 +112,25 @@ public final class CraftChatMessage { - throw new AssertionError("Unexpected message format"); - } - } else { // Color resets formatting -- modifier = RESET.setColor(format); -+ // Paper start - improve legacy formatting -+ ChatModifier previous = modifier; -+ modifier = EMPTY.setColor(format); -+ if (previous.isBold()) { -+ modifier = modifier.setBold(false); -+ } -+ if (previous.isItalic()) { -+ modifier = modifier.setItalic(false); -+ } -+ if (previous.isRandom()) { -+ modifier = modifier.setRandom(false); -+ } -+ if (previous.isStrikethrough()) { -+ modifier = modifier.setStrikethrough(false); -+ } -+ if (previous.isUnderlined()) { -+ modifier = modifier.setUnderline(false); -+ } -+ // Paper end - } - needsAdd = true; - break; diff --git a/Spigot-Server-Patches/0525-Paper-dumpitem-command.patch b/Spigot-Server-Patches/0524-Paper-dumpitem-command.patch similarity index 100% rename from Spigot-Server-Patches/0525-Paper-dumpitem-command.patch rename to Spigot-Server-Patches/0524-Paper-dumpitem-command.patch diff --git a/Spigot-Server-Patches/0526-Don-t-allow-null-UUID-s-for-chat.patch b/Spigot-Server-Patches/0525-Don-t-allow-null-UUID-s-for-chat.patch similarity index 100% rename from Spigot-Server-Patches/0526-Don-t-allow-null-UUID-s-for-chat.patch rename to Spigot-Server-Patches/0525-Don-t-allow-null-UUID-s-for-chat.patch From 35282e46faf010308647ee12098f55344b2e104e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 20:06:26 -0400 Subject: [PATCH 59/95] Fix Reloadable save players error on stop Not sure what plugins or panels are doing to have triggered this. Reloading resource packs appear to have been happening during shutdown So this will abort the end of the reload process if we are not on the correct thread and stop saving players as part of this task too. --- .../0447-Improved-Watchdog-Support.patch | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch index 915b87a7d3..4407ef2db5 100644 --- a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch @@ -109,7 +109,7 @@ index 63fdae15ccbef0c39718b320dbd096794bcfa3b4..6beefff203ed6e448898eb5b2e95800d } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5bef465bfe90b08524862b13f9e22dcf9e3438cd..57f7dfc6a5316cfec5cce9c60e7b91d94c505f50 100644 +index 5bef465bfe90b08524862b13f9e22dcf9e3438cd..38a8719dcc54fe3f8e0e47854df15a202f47bab2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -159,7 +159,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sun, 28 Jun 2020 20:14:17 -0400 Subject: [PATCH 60/95] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 85e57f7a SPIGOT-5803: Implement the missing methods for the Piglin API. ce0159b6 SPIGOT-5881: SnakeYaml 1.26 limits non-scalar (null) nodes while 1.25 does not CraftBukkit Changes: 44109b72 SPIGOT-5803: Implement the missing methods for the Piglin API. cf01fd9d #696: Respect the NotNull annotation of getChargedProjectiles in CraftMetaCrossbow 1a3363db SPIGOT-5849: Constantly Raining in World 1.16 --- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/work/Bukkit b/work/Bukkit index f009c3dd94..85e57f7ac5 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit f009c3dd945c627246b383aa4ffad63a067df9ff +Subproject commit 85e57f7ac56f5cb4741ff21add44372f58c4877c diff --git a/work/CraftBukkit b/work/CraftBukkit index d77f4d9bf3..44109b726b 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit d77f4d9bf348534a2a5b2498d0ea7fbe5297521c +Subproject commit 44109b726b3d248da87fa89a86ca036502e4f52f From 8806d0a89ae2b68618c7f2f0c55e3233e66e6ca0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 20:33:14 -0400 Subject: [PATCH 61/95] Fix case where some skulls still have string UUID's These heads are technically outdated, but this patch shouldn't care about what format the original value was in, so keep it the same. --- .../0266-Fix-client-rendering-skulls-from-same-user.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch index 2fd1299609..a2d8011094 100644 --- a/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch @@ -25,7 +25,7 @@ index 7b2010ec4955fb5788c60178c6e306ea3098e9ba..95e801a9a7ca405ff7e80c920fa78493 private Entity k; private ShapeDetectorBlock l; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..a7560ac0719d789f2b8ebc0294190a9bd43a2512 100644 +index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..91235f7bc80967a759ed8bb25d74ff0af6e25ef4 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -274,9 +274,18 @@ public class PacketDataSerializer extends ByteBuf { @@ -40,7 +40,7 @@ index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..a7560ac0719d789f2b8ebc0294190a9b + if (nbttagcompound != null && nbttagcompound.hasKeyOfType("SkullOwner", 10)) { + NBTTagCompound owner = nbttagcompound.getCompound("SkullOwner"); + if (owner.hasKey("Id")) { -+ nbttagcompound.setUUID("SkullOwnerOrig", owner.getUUID("Id")); ++ nbttagcompound.map.put("SkullOwnerOrig", owner.map.get("Id")); + TileEntitySkull.sanitizeUUID(owner); + } + } @@ -56,8 +56,8 @@ index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..a7560ac0719d789f2b8ebc0294190a9b + // Paper start - Fix skulls of same owner - restore orig ID since we changed it on send to client + if (itemstack.tag.hasKey("SkullOwnerOrig")) { + NBTTagCompound owner = itemstack.tag.getCompound("SkullOwner"); -+ if (itemstack.tag.hasUUID("SkullOwnerOrig")) { -+ owner.setUUID("Id", itemstack.tag.getUUID("SkullOwnerOrig")); ++ if (itemstack.tag.hasKey("SkullOwnerOrig")) { ++ owner.map.put("Id", itemstack.tag.map.get("SkullOwnerOrig")); + itemstack.tag.remove("SkullOwnerOrig"); + } + } From fb772923d5bbc6c53d18370f5bcd4083567f6035 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jun 2020 21:27:16 -0400 Subject: [PATCH 62/95] Improve Legacy Component serialization size Don't constantly send format: false for all formatting options when parent already has it false Fixes #3680 --- ...-Legacy-Component-serialization-size.patch | 56 +++++++++++++++++++ scripts/testServer.sh | 4 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch diff --git a/Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch b/Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch new file mode 100644 index 0000000000..05f7e86c92 --- /dev/null +++ b/Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch @@ -0,0 +1,56 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 28 Jun 2020 19:08:41 -0400 +Subject: [PATCH] Improve Legacy Component serialization size + +Don't constantly send format: false for all formatting options when parent already +has it false + +diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +index a423e3bf3906d3114af885c48d0b45d88d7e7d8b..3b79ae44c5ef790998915148db92c7161ae36ab6 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +@@ -45,6 +45,7 @@ public final class CraftChatMessage { + // Separate pattern with no group 3, new lines are part of previous string + private static final Pattern INCREMENTAL_PATTERN_KEEP_NEWLINES = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-orx])|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " ]|$))))", Pattern.CASE_INSENSITIVE); + // ChatColor.b does not explicitly reset, its more of empty ++ private static final ChatModifier EMPTY = ChatModifier.b; // Paper - OBFHELPER + private static final ChatModifier RESET = ChatModifier.b.setBold(false).setItalic(false).setUnderline(false).setStrikethrough(false).setRandom(false); + + private final List list = new ArrayList(); +@@ -66,6 +67,7 @@ public final class CraftChatMessage { + Matcher matcher = (keepNewlines ? INCREMENTAL_PATTERN_KEEP_NEWLINES : INCREMENTAL_PATTERN).matcher(message); + String match = null; + boolean needsAdd = false; ++ boolean hasReset = false; // Paper + while (matcher.find()) { + int groupId = 0; + while ((match = matcher.group(++groupId)) == null) { +@@ -111,7 +113,26 @@ public final class CraftChatMessage { + throw new AssertionError("Unexpected message format"); + } + } else { // Color resets formatting +- modifier = RESET.setColor(format); ++ // Paper start - improve legacy formatting ++ ChatModifier previous = modifier; ++ modifier = (!hasReset ? RESET : EMPTY).setColor(format); ++ hasReset = true; ++ if (previous.isBold()) { ++ modifier = modifier.setBold(false); ++ } ++ if (previous.isItalic()) { ++ modifier = modifier.setItalic(false); ++ } ++ if (previous.isRandom()) { ++ modifier = modifier.setRandom(false); ++ } ++ if (previous.isStrikethrough()) { ++ modifier = modifier.setStrikethrough(false); ++ } ++ if (previous.isUnderlined()) { ++ modifier = modifier.setUnderline(false); ++ } ++ // Paper end + } + needsAdd = true; + break; diff --git a/scripts/testServer.sh b/scripts/testServer.sh index 1ce78a3328..834e4a9178 100755 --- a/scripts/testServer.sh +++ b/scripts/testServer.sh @@ -87,7 +87,9 @@ fi # JVM FLAGS # -cp "$jar" paper.jar +if [ -f "$jar" ]; then + cp "$jar" paper.jar +fi baseargs="-server -Xms${PAPER_MIN_TEST_MEMORY:-512M} -Xmx${PAPER_TEST_MEMORY:-2G} -Dfile.encoding=UTF-8 -XX:MaxGCPauseMillis=150 -XX:+UseG1GC " baseargs="$baseargs -DIReallyKnowWhatIAmDoingISwear=1 " baseargs="$baseargs -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=60 " From 9edbfe5fe89681f4516a29bd94b13a1a8bc99c5c Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Jun 2020 03:28:10 -0400 Subject: [PATCH 63/95] Support old UUID format for NBT We have stored UUID in plenty of places that did not get DFU'd So just look for old format and load it if it exists. --- ...0527-Support-old-UUID-format-for-NBT.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch diff --git a/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch new file mode 100644 index 0000000000..a40c1b1746 --- /dev/null +++ b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 29 Jun 2020 03:26:17 -0400 +Subject: [PATCH] Support old UUID format for NBT + +We have stored UUID in plenty of places that did not get DFU'd + +So just look for old format and load it if it exists. + +diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java +index f608b35502890650adfc1df35e0794471f57ecbc..93b25e4580646ccfe8c671511e2250dbe7474a89 100644 +--- a/src/main/java/net/minecraft/server/NBTTagCompound.java ++++ b/src/main/java/net/minecraft/server/NBTTagCompound.java +@@ -142,6 +142,11 @@ public class NBTTagCompound implements NBTBase { + @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER + @Nullable + public UUID a(String s) { ++ // Paper start - support old format ++ if (hasKey(s + "Least") && hasKey(s + "Most")) { ++ return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); ++ } ++ // Paper end + return GameProfileSerializer.a(this.get(s)); + } + From 55ab552c0345e592f58ba0211fbef0c1b8099dae Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Jun 2020 04:04:18 -0400 Subject: [PATCH 64/95] Don't fire unleash/dismount events from worldgen threads Mojang can trigger this during worldgen and tries to fire bukkit events. --- ...sh-dismount-events-from-worldgen-thr.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch diff --git a/Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch b/Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch new file mode 100644 index 0000000000..e21a5892e8 --- /dev/null +++ b/Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 29 Jun 2020 04:00:07 -0400 +Subject: [PATCH] Don't fire unleash/dismount events from worldgen threads + +Mojang can trigger this during worldgen and tries to fire bukkit events. + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 38887c1b7849926fab0a3b2db0e7b81388364172..0e0bc2afe8bce6305062555a599c043613f4abef 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -2117,7 +2117,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + // CraftBukkit start + CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); + Entity orig = craft == null ? null : craft.getHandle(); +- if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { ++ if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity && MCUtil.isMainThread()) { // Paper + VehicleExitEvent event = new VehicleExitEvent( + (Vehicle) getBukkitEntity(), + (LivingEntity) entity.getBukkitEntity(), !suppressCancellation // Paper +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java +index 605bbf0174e60f795e445193a0284739ea452946..301f1ae8820df24d7c8453335abc1934aa7fae43 100644 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java ++++ b/src/main/java/net/minecraft/server/EntityInsentient.java +@@ -1339,7 +1339,7 @@ public abstract class EntityInsentient extends EntityLiving { + boolean flag1 = super.a(entity, flag); + + if (flag1 && this.isLeashed()) { +- this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit ++ if (MCUtil.isMainThread()) this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit // Paper + this.unleash(true, true); + } + From 8a4af269ba9b0486c9a67080a9cf9c7e3ee909db Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 29 Jun 2020 14:48:24 +0100 Subject: [PATCH 65/95] fix EntityDismountEvent being fired on gen threads --- ...re-unleash-dismount-events-from-worldgen-thr.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch b/Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch index e21a5892e8..e7840e06a3 100644 --- a/Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch +++ b/Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't fire unleash/dismount events from worldgen threads Mojang can trigger this during worldgen and tries to fire bukkit events. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 38887c1b7849926fab0a3b2db0e7b81388364172..0e0bc2afe8bce6305062555a599c043613f4abef 100644 +index 38887c1b7849926fab0a3b2db0e7b81388364172..2aa38528d78f2619317b96b1c944982b17f7160b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2117,7 +2117,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -18,6 +18,15 @@ index 38887c1b7849926fab0a3b2db0e7b81388364172..0e0bc2afe8bce6305062555a599c0436 VehicleExitEvent event = new VehicleExitEvent( (Vehicle) getBukkitEntity(), (LivingEntity) entity.getBukkitEntity(), !suppressCancellation // Paper +@@ -2132,7 +2132,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + // CraftBukkit end + // Spigot start + org.spigotmc.event.entity.EntityDismountEvent event = new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity(), !suppressCancellation); // Paper +- Bukkit.getPluginManager().callEvent(event); ++ if (MCUtil.isMainThread()) Bukkit.getPluginManager().callEvent(event); // Paper + if (event.isCancelled()) { + return false; + } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java index 605bbf0174e60f795e445193a0284739ea452946..301f1ae8820df24d7c8453335abc1934aa7fae43 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java From 78c855237936c084ba783d4926d18b6340b4d0ef Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 29 Jun 2020 14:53:01 +0100 Subject: [PATCH 66/95] Updated Upstream (CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: e2403a3d SPIGOT-5882: NPE when emptying bucket on already waterlogged blocks --- work/CraftBukkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/CraftBukkit b/work/CraftBukkit index 44109b726b..e2403a3d2c 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 44109b726b3d248da87fa89a86ca036502e4f52f +Subproject commit e2403a3d2c4480f129ff5299bc20b3ba60027c5c From 25c14f76fc71a1fd90660a0e4287a383b45006a4 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 29 Jun 2020 15:03:41 +0100 Subject: [PATCH 67/95] Fix compile --- .../0264-Add-hand-to-bucket-events.patch | 11 ++++++++++- .../0488-Wait-for-Async-Tasks-during-shutdown.patch | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch index 668c1e7123..1680dcabec 100644 --- a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch @@ -18,7 +18,7 @@ index 28f97aea9c64678c6e6f821482ad47388af83089..30ee6df6b47c7cfa555a757a01270b98 if (event.isCancelled()) { return EnumInteractionResult.PASS; diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java -index aada95b9d02d8ca0b870ec08875b5b719a543212..d68ee8d5dc5f8a75dc465f155acccb79c1ebe99c 100644 +index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cda8311aea 100644 --- a/src/main/java/net/minecraft/server/ItemBucket.java +++ b/src/main/java/net/minecraft/server/ItemBucket.java @@ -41,7 +41,7 @@ public class ItemBucket extends Item { @@ -63,6 +63,15 @@ index aada95b9d02d8ca0b870ec08875b5b719a543212..d68ee8d5dc5f8a75dc465f155acccb79 if (event.isCancelled()) { ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 +@@ -119,7 +121,7 @@ public class ItemBucket extends Item { + } + // CraftBukkit end + if (!flag1) { +- return movingobjectpositionblock != null && this.a(entityhuman, world, movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null, enumdirection, clicked, itemstack); // CraftBukkit ++ return movingobjectpositionblock != null && this.a(entityhuman, world, movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper - add enumhand + } else if (world.getDimensionManager().isNether() && this.fluidType.a((Tag) TagsFluid.WATER)) { + 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 ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af..cc4421aa61d7d87c164c1f88ad8b5fa0df7176f1 100644 --- a/src/main/java/net/minecraft/server/World.java diff --git a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch index 89c69f39c7..f6eb6134c5 100644 --- a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,7 +10,7 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 735beaf6fa6e6ccf2137b64a0b5179ada2907011..b474f45b6d551e45f8894b3971baade33b6ccd0f 100644 +index b108ce5affe48f06e69b0f0482e1333085ca7304..ab65eb18b0fec71cda5305414bf59239644fe9bb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -772,6 +772,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 29 Jun 2020 21:14:22 +0100 Subject: [PATCH 68/95] Add Gradle usage information to README (#3700) --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 78b995ab1b..a70156e49d 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,23 @@ How To (Plugin Developers) ``` +**Or alternatively, with Gradle:** + + * Repository: +```groovy +repositories { + maven { + url 'https://papermc.io/repo/repository/maven-public/' + } +} +``` + * Artifact: +```groovy +dependencies { + compileOnly 'com.destroystokyo.paper:paper-api:1.16.1-R0.1-SNAPSHOT' +} +``` + How To (Compiling Jar From Source) ------ To compile Paper, you need JDK 8, maven, and an internet connection. From e2e09326d535695c9004da485576f6f16d8027e2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Jun 2020 20:02:17 -0400 Subject: [PATCH 69/95] [Auto] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3c844f35 #512: Expand Strider and Steerable entity API CraftBukkit Changes: 32acc2621 #686: Expand Strider and Steerable entity API --- Spigot-Server-Patches/0116-Add-EntityZapEvent.patch | 4 ++-- .../0121-Add-source-to-PlayerExpChangeEvent.patch | 6 +++--- .../0123-Add-ProjectileCollideEvent.patch | 4 ++-- ...ption-for-maximum-exp-value-when-merging-orbs.patch | 4 ++-- .../0184-ExperienceOrbMergeEvent.patch | 4 ++-- ...hootBowEvent-consumeArrow-and-getArrowItem-AP.patch | 4 ++-- .../0237-InventoryCloseEvent-Reason-API.patch | 8 ++++---- .../0252-Vanished-players-don-t-have-rights.patch | 4 ++-- .../0264-Add-hand-to-bucket-events.patch | 8 ++++---- Spigot-Server-Patches/0286-Improve-death-events.patch | 10 +++++----- .../0421-add-hand-to-BlockMultiPlaceEvent.patch | 4 ++-- ...erous-item-duplication-issues-and-teleport-is.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 14 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch index a5f60359f7..9f2a59742a 100644 --- a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch @@ -38,10 +38,10 @@ index f7f76bca254dc7bc5792e449feeaa113a96c93e4..d0b04707e830fbaf3a6bfe92637e4432 entitywitch.prepare(this.world, this.world.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 32adc3ff5fe4a16256c222b1ccd11a5031486778..cb44d5b86010d9ab26d3828385e2758edd069744 100644 +index 28f2b741ca972c72c97f313171c2aed8c65c20ed..5368833da677d43e891517839ff9e4e2106db07b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1065,6 +1065,14 @@ public class CraftEventFactory { +@@ -1068,6 +1068,14 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch index 0dc9fd01d6..5393bd84ef 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 2e25aba27993608ed7ee1cfb7ae8ee60bc74feda..c13a47382d0a7456fa5035a64f42a6ed 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 cb44d5b86010d9ab26d3828385e2758edd069744..669ff02f866274ca99aa96d31fe9539a0bf7944a 100644 +index 5368833da677d43e891517839ff9e4e2106db07b..d72cbc0b0f9cc4f412122deda163764dc3908396 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -118,6 +118,7 @@ import org.bukkit.entity.ThrownPotion; +@@ -120,6 +120,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 cb44d5b86010d9ab26d3828385e2758edd069744..669ff02f866274ca99aa96d31fe9539a import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -1024,6 +1025,17 @@ public class CraftEventFactory { +@@ -1027,6 +1028,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 5db2ed42dd..55bf229701 100644 --- a/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch @@ -71,10 +71,10 @@ index 5cc122fc0e80bd67160c8b4a7a469edfb6e24808..795685f1eed489b8323c7a8528b2bbd4 Vec3D vec3d = this.getMot(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 669ff02f866274ca99aa96d31fe9539a0bf7944a..bd98e8936c8480937d255daa3819c6168defca2a 100644 +index d72cbc0b0f9cc4f412122deda163764dc3908396..6620d92d73bc54a99a0a583db880682d9ed26ea2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1169,6 +1169,16 @@ public class CraftEventFactory { +@@ -1172,6 +1172,16 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } diff --git a/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch index a2de8f3eec..5866a6ee33 100644 --- a/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -20,10 +20,10 @@ index e30f48caf2ce4f48f371b2594b765c27bc9e9778..2d8b354d707e8b5b0e7cd644fb93bc8f + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index bd98e8936c8480937d255daa3819c6168defca2a..ffad80b0c08274a0a24bfad731a299ae153b6bd9 100644 +index 6620d92d73bc54a99a0a583db880682d9ed26ea2..531987a9adf21bf870b88f38bf6c2061fbc3ea80 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -562,16 +562,32 @@ public class CraftEventFactory { +@@ -565,16 +565,32 @@ public class CraftEventFactory { EntityExperienceOrb xp = (EntityExperienceOrb) entity; double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/Spigot-Server-Patches/0184-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0184-ExperienceOrbMergeEvent.patch index deef60597b..c228b0e161 100644 --- a/Spigot-Server-Patches/0184-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0184-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 ffad80b0c08274a0a24bfad731a299ae153b6bd9..1529a42197380bd7570abc085a7ad77e9a58894c 100644 +index 531987a9adf21bf870b88f38bf6c2061fbc3ea80..3354c320978ac7f99ecec1f928b31536f6621e20 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -572,7 +572,7 @@ public class CraftEventFactory { +@@ -575,7 +575,7 @@ public class CraftEventFactory { if (e instanceof EntityExperienceOrb) { EntityExperienceOrb loopItem = (EntityExperienceOrb) e; // Paper start diff --git a/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index 3d70fca470..d0e2624b4c 100644 --- a/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -72,10 +72,10 @@ index 1592e94c78611a4b968bfb24daf68570e778fadd..31c80bb0a2e403c34fb9cd4b3ee4e903 event.getProjectile().remove(); return; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 1529a42197380bd7570abc085a7ad77e9a58894c..78475dd2c0f6cca94586536f12323d8080e05623 100644 +index 3354c320978ac7f99ecec1f928b31536f6621e20..d75ad03bbae557fb37e4b6bd4b85b1b3b1bceeae 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -490,16 +490,16 @@ public class CraftEventFactory { +@@ -493,16 +493,16 @@ public class CraftEventFactory { /** * EntityShootBowEvent */ diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index 5024f85eac..52c44fcd4a 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -34,7 +34,7 @@ index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 6414ff3ca7e5f217268f7114f7ac751532444af6..8a9a287074f2e91488f91ec9d8a7687c92f72099 100644 +index ac5f86c6fccd9410505e29bd60ba8351054703ed..290be5ffdfc5322d45dc5bca39de4138ee57f92d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -411,7 +411,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -101,7 +101,7 @@ index 351eeb83d8a28b19e3805f0d8a377f4ed060c592..027f9a86f458aab7d94f132981a9c700 this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index fbacfe2c825f71b3c8617a3bf022f6793eb64996..31ffa627417745f87917933cb96873fd8657b49a 100644 +index d5e7a41b39cb384cf9b52303bcbe11ae09b4162b..3a2ab5a5745e2c698042357321bcfe7b1bd92154 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -420,7 +420,7 @@ public abstract class PlayerList { @@ -168,10 +168,10 @@ index 04d3034148434cd17549018ce337e47c408d1e02..a0fae649733f2cd02ed1df713b43aa1d // 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 78475dd2c0f6cca94586536f12323d8080e05623..ec079f7d04f17cc82bd65aec5abfe269bbfb6922 100644 +index d75ad03bbae557fb37e4b6bd4b85b1b3b1bceeae..bed1d3f460be8af3378d0ab1d8ff53c0885021f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1319,12 +1319,22 @@ public class CraftEventFactory { +@@ -1322,12 +1322,22 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch index 60335073d2..8b9e80cccb 100644 --- a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch @@ -159,10 +159,10 @@ index 2e19fbddb6ede4abf02c79b4e72d11f89db05433..ca3e831e3191dd8ffe7f2b6ab9ecc05a 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 ec079f7d04f17cc82bd65aec5abfe269bbfb6922..1a74690daa05c46c3c0be02a762951efbe945e65 100644 +index bed1d3f460be8af3378d0ab1d8ff53c0885021f9..bfa9fd738159d2517c2ec16323a856c5850c0534 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1190,6 +1190,14 @@ public class CraftEventFactory { +@@ -1193,6 +1193,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/0264-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch index 1680dcabec..bda2aecaf9 100644 --- a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch @@ -126,10 +126,10 @@ index afba8d654bd227ad60ec502de8834c45f239f479..f6c459facde67500499365af6da9f43a public LongSet getForceLoadedChunks() { ForcedChunk forcedchunk = (ForcedChunk) this.getWorldPersistentData().b(ForcedChunk::new, "chunks"); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 1a74690daa05c46c3c0be02a762951efbe945e65..26a7463a536df9aa8558aba68a2a45464eb2dcfb 100644 +index bfa9fd738159d2517c2ec16323a856c5850c0534..fac306391872457a6b60a7fc69dfe7d85da6b23f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -224,7 +224,7 @@ public class CraftEventFactory { +@@ -227,7 +227,7 @@ public class CraftEventFactory { public static Entity entityDamage; // For use in EntityDamageByEntityEvent // helper methods @@ -138,7 +138,7 @@ index 1a74690daa05c46c3c0be02a762951efbe945e65..26a7463a536df9aa8558aba68a2a4546 int spawnSize = Bukkit.getServer().getSpawnRadius(); if (world.getDimensionKey() != World.OVERWORLD) return true; -@@ -392,6 +392,20 @@ public class CraftEventFactory { +@@ -395,6 +395,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 1a74690daa05c46c3c0be02a762951efbe945e65..26a7463a536df9aa8558aba68a2a4546 Player player = (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item); Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem()); -@@ -404,10 +418,10 @@ public class CraftEventFactory { +@@ -407,10 +421,10 @@ public class CraftEventFactory { PlayerEvent event; if (isFilling) { diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index 63644591e9..661d8331d7 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -279,7 +279,7 @@ index 4b249a644c680a7cc64b0d31cf453f94ff2b6a0c..d6a98bb7fc107649c179cded2d37c06a return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8a9a287074f2e91488f91ec9d8a7687c92f72099..b360077d72afafcaa23c438eb073b9286c8fb563 100644 +index 290be5ffdfc5322d45dc5bca39de4138ee57f92d..1b57f2ec7da87b4f87e35e1d5e6a272a641d0669 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -80,6 +80,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -378,10 +378,10 @@ index 90acd5e77d5930d589a2f29523b2d2e2850f3f1f..1eff9edb7d6aaf5e6c1094a32d52d38b 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 26a7463a536df9aa8558aba68a2a45464eb2dcfb..49b39ab97f4ef32a0ea35a0832dca289da14bbde 100644 +index fac306391872457a6b60a7fc69dfe7d85da6b23f..1dd3c871316b246210ef05d93e949f363deb322f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -768,9 +768,16 @@ public class CraftEventFactory { +@@ -771,9 +771,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()); @@ -398,7 +398,7 @@ index 26a7463a536df9aa8558aba68a2a45464eb2dcfb..49b39ab97f4ef32a0ea35a0832dca289 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -786,8 +793,15 @@ public class CraftEventFactory { +@@ -789,8 +796,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -414,7 +414,7 @@ index 26a7463a536df9aa8558aba68a2a45464eb2dcfb..49b39ab97f4ef32a0ea35a0832dca289 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -804,6 +818,31 @@ public class CraftEventFactory { +@@ -807,6 +821,31 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch index ea530f11a5..d1c1e21a28 100644 --- a/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch +++ b/Spigot-Server-Patches/0421-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 49b39ab97f4ef32a0ea35a0832dca289da14bbde..4b8ea4e56efb4c8bfe969c9c1628b5d69aa0c4d9 100644 +index 1dd3c871316b246210ef05d93e949f363deb322f..a44fa04f312d812f5593df90ebf7fe1483f73376 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -315,13 +315,18 @@ public class CraftEventFactory { +@@ -318,13 +318,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 1282804bfc..0d28eca405 100644 --- a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -88,10 +88,10 @@ index 51e9f4a6e09474a7489d2872a800308ee3f02e46..250bccee4a27801b41c50d59e93396c6 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4b8ea4e56efb4c8bfe969c9c1628b5d69aa0c4d9..d4b77d70bfc91339346689ad58f585856633007b 100644 +index a44fa04f312d812f5593df90ebf7fe1483f73376..521e204260e96c3010fdfb90e52f7170ad9a9fc4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -788,7 +788,8 @@ public class CraftEventFactory { +@@ -791,7 +791,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/work/Bukkit b/work/Bukkit index 85e57f7ac5..3c844f351a 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 85e57f7ac56f5cb4741ff21add44372f58c4877c +Subproject commit 3c844f351a81d1b9bce7a39e7055a933f10c9a96 diff --git a/work/CraftBukkit b/work/CraftBukkit index e2403a3d2c..32acc26217 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit e2403a3d2c4480f129ff5299bc20b3ba60027c5c +Subproject commit 32acc2621791b5f38e71df1da1b43858bdeaa0e2 From ab347c4c96b66cf4e67ac303b25fd86d4d17e2af Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 30 Jun 2020 01:20:29 -0400 Subject: [PATCH 70/95] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 42d5a714 SPIGOT-5899: Hoglins API similar to Piglins 2c1ee10e SPIGOT-5887: ClickType doesn't include off hand swaps 5ff7c7ce SPIGOT-5886: Missing BlockData CraftBukkit Changes: 7560f5f5 SPIGOT-5905: Fix hex colours not being allowed in MOTD d47c47ee SPIGOT-5889: Villager using composter should call EntityChangeBlockEvent 2fe6b4a3 SPIGOT-5899: Hoglins API similar to Piglins e09dbeca SPIGOT-5887: ClickType doesn't include off hand swaps 23aac2a5 SPIGOT-5903: EntityDismountEvent cannot be triggered asynchronously 92cbf656 SPIGOT-5884: Tab completions lost on reloadData / minecraft:reload fb4e54ad SPIGOT-5902: PlayerRespawnEvent places player at spawn before event is called aa8f3d5a SPIGOT-5901: Structures are generated in all worlds based on the setting for the main world a0c35937 SPIGOT-5895: PlayerChangedWorldEvent#getFrom is incorrect 89c0a5c3 SPIGOT-5886: Missing BlockData Spigot Changes: 0287a20d SPIGOT-5903: EntityDismountEvent cannot be triggered asynchronously --- .../0063-Make-plugins-list-alphabetical.patch | 2 +- ...dd-an-asterisk-to-legacy-API-plugins.patch | 2 +- .../0002-Paper-config-files.patch | 4 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 15 +------ Spigot-Server-Patches/0004-MC-Utils.patch | 14 +++---- ...-MinecraftKey-Information-to-Objects.patch | 2 +- ...to-current-Chunk-for-Entity-and-Bloc.patch | 2 +- Spigot-Server-Patches/0009-Timings-v2.patch | 10 ++--- ...d-mobs-to-jump-and-take-water-damage.patch | 2 +- ...ck-and-tnt-entities-at-the-specified.patch | 2 +- ...ient-crashes-server-lists-and-Mojang.patch | 4 +- ...023-Further-improve-server-tick-loop.patch | 4 +- .../0025-Entity-Origin-API.patch | 4 +- ...nfigurable-top-of-nether-void-damage.patch | 2 +- .../0030-Configurable-end-credits.patch | 4 +- .../0032-Optimize-explosions.patch | 2 +- .../0034-Disable-thunder.patch | 2 +- .../0035-Disable-ice-and-snow.patch | 2 +- ...figurable-container-update-tick-rate.patch | 4 +- ...44-Ensure-commands-are-not-ran-async.patch | 4 +- .../0046-Expose-server-CommandMap.patch | 2 +- ...dd-configurable-portal-search-radius.patch | 8 ++-- .../0052-Add-velocity-warnings.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 4 +- .../0058-Complete-resource-pack-API.patch | 2 +- ...ading-permissions.yml-before-plugins.patch | 2 +- ...llow-Reloading-of-Custom-Permissions.patch | 2 +- .../0062-Remove-Metadata-on-reload.patch | 2 +- .../0065-Add-World-Util-Methods.patch | 2 +- ...069-Use-a-Shared-Random-for-Entities.patch | 2 +- ...le-spawn-chances-for-skeleton-horses.patch | 2 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 4 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 2 +- ...0078-Add-PlayerUseUnknownEntityEvent.patch | 2 +- ...nilla-per-world-scoreboard-coloring-.patch | 2 +- ...Remove-unused-World-Tile-Entity-List.patch | 2 +- .../0087-Configurable-Player-Collision.patch | 4 +- ...91-Implement-PlayerLocaleChangeEvent.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 4 +- ...item-frames-performance-and-bug-fixe.patch | 2 +- ...-API-Replenishable-Lootables-Feature.patch | 2 +- .../0099-Optimize-UserCache-Thread-Safe.patch | 2 +- ...1-Optional-TNT-doesn-t-move-in-water.patch | 4 +- .../0105-Fix-Double-World-Add-issues.patch | 2 +- ...setting-for-proxy-online-mode-status.patch | 2 +- ...onfigurable-packet-in-spam-threshold.patch | 2 +- ...11-Configurable-flying-kick-messages.patch | 2 +- .../0112-Chunk-registration-fixes.patch | 2 +- ...uto-fix-bad-Y-levels-on-player-login.patch | 4 +- ...118-Cache-user-authenticator-threads.patch | 6 +-- ...0-Allow-Reloading-of-Command-Aliases.patch | 2 +- ...2-Don-t-let-fishinghooks-use-portals.patch | 2 +- ...30-Properly-fix-item-duplication-bug.patch | 6 +-- .../0135-Enforce-Sync-Player-Saves.patch | 2 +- ...llow-entities-to-ride-themselves-572.patch | 2 +- .../0138-Cap-Entity-Collisions.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 4 +- ...ke-parrots-stay-on-shoulders-despite.patch | 2 +- ...n-option-to-prevent-player-names-fro.patch | 2 +- ...oleAppender-for-console-improvements.patch | 6 +-- .../0151-Add-UnknownCommandEvent.patch | 2 +- .../0152-Basic-PlayerProfile-API.patch | 4 +- .../0156-Entity-fromMobSpawner.patch | 2 +- .../0160-ProfileWhitelistVerifyEvent.patch | 2 +- .../0171-Add-PlayerJumpEvent.patch | 2 +- ...2-handle-PacketPlayInKeepAlive-async.patch | 2 +- ...rt-serverside-behavior-of-keepalives.patch | 2 +- .../0181-AsyncTabCompleteEvent.patch | 4 +- ...8-PlayerNaturallySpawnCreaturesEvent.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 8 ++-- .../0204-getPlayerUniqueId-API.patch | 2 +- ...-allowed-colored-signs-to-be-created.patch | 2 +- ...ld.spawnParticle-API-and-add-Builder.patch | 2 +- .../0237-InventoryCloseEvent-Reason-API.patch | 16 +++---- ...nventory-when-cancelling-PlayerInter.patch | 2 +- ...nilla-entity-warnings-for-duplicates.patch | 2 +- ...-more-information-to-Entity.toString.patch | 4 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 4 +- ...2-Vanished-players-don-t-have-rights.patch | 2 +- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 2 +- ...revent-Saving-Bad-entities-to-chunks.patch | 2 +- ...ead-Entities-in-entityList-iteration.patch | 4 +- ...nd-make-tab-spam-limits-configurable.patch | 2 +- .../0264-Add-hand-to-bucket-events.patch | 2 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 4 +- ...69-Use-ConcurrentHashMap-in-JsonList.patch | 2 +- .../0286-Improve-death-events.patch | 10 ++--- ...tator-target-events-and-improve-impl.patch | 6 +-- ...5-Add-Velocity-IP-Forwarding-Support.patch | 4 +- ...event-players-from-moving-into-unloa.patch | 2 +- ...10-Reset-players-airTicks-on-respawn.patch | 8 ++-- ...er-Thread-Pool-and-Thread-Priorities.patch | 2 +- .../0313-Optimize-World-Time-Updates.patch | 2 +- ...t-allow-digging-into-unloaded-chunks.patch | 2 +- .../0318-Book-Size-Limits.patch | 2 +- ...ault-permission-message-configurable.patch | 2 +- ...entity-dismount-during-teleportation.patch | 18 ++++---- ...-replace-OfflinePlayer-getLastPlayed.patch | 4 +- .../0327-Fix-PlayerEditBookEvent.patch | 2 +- ...vehicle-tracking-issue-on-disconnect.patch | 4 +- .../0333-Fix-sign-edit-memory-leak.patch | 2 +- .../0334-Limit-Client-Sign-length-more.patch | 2 +- ...342-Add-LivingEntity-getTargetEntity.patch | 4 +- .../0344-Entity-getEntitySpawnReason.patch | 4 +- ...ity-Metadata-for-all-tracked-players.patch | 2 +- .../0349-Server-Tick-Events.patch | 2 +- ...0350-PlayerDeathEvent-getItemsToKeep.patch | 6 +-- ...l-to-changed-postToMainThread-method.patch | 2 +- ...isPrimaryThread-and-MinecraftServer-.patch | 6 +-- ...h-entity-loss-due-to-unloaded-chunks.patch | 2 +- .../0359-Duplicate-UUID-Resolve-Option.patch | 6 +-- ...le-Keep-Spawn-Loaded-range-per-world.patch | 4 +- ...367-Fix-World-isChunkGenerated-calls.patch | 2 +- .../0370-incremental-chunk-saving.patch | 4 +- Spigot-Server-Patches/0371-Anti-Xray.patch | 2 +- ...-being-ticked-when-notifying-navigat.patch | 2 +- ...77-Asynchronous-chunk-IO-and-loading.patch | 8 ++-- ...etChunkIfLoadedImmediately-in-places.patch | 4 +- .../0379-Reduce-sync-loads.patch | 2 +- ...if-we-have-a-custom-Bukkit-generator.patch | 2 +- ...ement-optional-per-player-mob-spawns.patch | 4 +- ...391-Expose-the-internal-current-tick.patch | 2 +- ...-sneak-when-changing-worlds-MC-10657.patch | 6 +-- ...or-when-player-hand-set-to-empty-typ.patch | 2 +- .../0399-Optimize-Hoppers.patch | 2 +- ...layerDeathEvent-shouldDropExperience.patch | 4 +- ...timise-IEntityAccess-getPlayerByUUID.patch | 2 +- .../0409-Entity-Activation-Range-2.0.patch | 4 +- ...x-items-vanishing-through-end-portal.patch | 4 +- .../0417-Optimise-random-block-ticking.patch | 2 +- ...n-to-nerf-pigmen-from-nether-portals.patch | 2 +- .../0420-Make-the-GUI-graph-fancier.patch | 2 +- ...22-Prevent-teleporting-dead-entities.patch | 2 +- ...imise-TickListServer-by-rewriting-it.patch | 2 +- ...spawn-settings-and-per-player-option.patch | 2 +- ...re-Entity-is-never-double-registered.patch | 4 +- ...ering-entities-from-unloading-chunks.patch | 2 +- ...-PlayerChunkMap-adds-crashing-server.patch | 2 +- ...ptimize-Collision-to-not-load-chunks.patch | 2 +- .../0435-Don-t-tick-dead-players.patch | 4 +- .../0438-Increase-Light-Queue-Size.patch | 2 +- ...asks-Speed-up-processing-of-chunk-lo.patch | 4 +- ...move-existing-players-to-world-spawn.patch | 8 ++-- ...-Add-tick-times-API-and-mspt-command.patch | 6 +-- ...442-Expose-MinecraftServer-isRunning.patch | 2 +- ...ions-until-after-entity-ticking-is-d.patch | 2 +- .../0447-Improved-Watchdog-Support.patch | 6 +-- ...vent-opening-inventories-when-frozen.patch | 8 ++-- ...imise-entity-hard-collision-checking.patch | 2 +- ...-Implement-Player-Client-Options-API.patch | 4 +- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 2 +- ...Load-Chunks-for-Login-Asynchronously.patch | 6 +-- ...pawn-point-if-spawn-in-unloaded-worl.patch | 2 +- ...m-duplication-issues-and-teleport-is.patch | 8 ++-- .../0470-Implement-Brigadier-Mojang-API.patch | 2 +- ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- .../0473-Expose-game-version.patch | 2 +- .../0474-Sync-position-on-teleportation.patch | 2 +- .../0477-Implement-Mob-Goal-API.patch | 2 +- ...tance-map-to-optimise-entity-tracker.patch | 4 +- ...-isOutsideRange-to-use-distance-maps.patch | 2 +- ...No-Tick-view-distance-implementation.patch | 2 +- ...Wait-for-Async-Tasks-during-shutdown.patch | 4 +- ...k-Priority-Urgency-System-for-Chunks.patch | 6 +-- ...ookup-for-Treasure-Maps-Fixes-lag-fr.patch | 2 +- .../0505-Optimize-Light-Engine.patch | 2 +- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 2 +- ...er-runTaskTimerAsynchronously-Plugin.patch | 2 +- ...-desync-in-playerconnection-causing-.patch | 2 +- ...implement-PlayerRecipeBookClickEvent.patch | 2 +- ...20-Add-permission-for-command-blocks.patch | 2 +- ...sure-Entity-AABB-s-are-never-invalid.patch | 6 +-- ...WorldBorder-collision-checks-and-air.patch | 2 +- ...ld-Difficulty-Remembering-Difficulty.patch | 4 +- ...sh-dismount-events-from-worldgen-thr.patch | 42 ------------------- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 178 files changed, 293 insertions(+), 348 deletions(-) delete mode 100644 Spigot-Server-Patches/0528-Don-t-fire-unleash-dismount-events-from-worldgen-thr.patch diff --git a/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch index c7997e7c1a..2b36db8e47 100644 --- a/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch +++ b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make /plugins list alphabetical diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index 23a8a8616756f417c11dd28e63e27c5c4df383c0..6b21089cd4a09c3c49caf19f1b70f7a50dba3995 100644 +index e8a7f435fb30da3506b2b4fa8c5675c829edc105..4a75997f93f5c33f19200994562aaff99bdd422f 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -3,6 +3,9 @@ package org.bukkit.command.defaults; diff --git a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch index 4020e2fa6e..9c95b7231e 100644 --- a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch +++ b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch @@ -23,7 +23,7 @@ index 1b6d737046646c102b0d519ab3f67c3fbd503979..541e28a9bece0beb0c2cf02c39030840 // Paper end } diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index 6b21089cd4a09c3c49caf19f1b70f7a50dba3995..ae07c88937da014d711e219b07e7d4b767f24ba5 100644 +index 4a75997f93f5c33f19200994562aaff99bdd422f..665211cb1bb27d228a43342ebca0f60e0b7f6c4b 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -74,7 +74,13 @@ public class PluginsCommand extends BukkitCommand { diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index ad80c4d4fa..e4af6d843b 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -575,7 +575,7 @@ index 27e6872c675647d7e61040b76183dac4e347a40c..aa68eb71b131c1d529ded6c651621cfa this.setPVP(dedicatedserverproperties.pvp); this.setAllowFlight(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ede38b7b5fe4acc29ae9c12298a73a3a745983ac..781eaaa4544dfa6e2c523d4d3d99929e7ab46ac7 100644 +index 4ee11b6fbbb49b1f52fe2cf64f77c1bdd2fd3907..51499ef45faa2bba5f180ee333c09af73d3b708e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { @@ -636,7 +636,7 @@ index d5e1da2eeea7c06289f52509af844df59e8a29b2..63d3d43f74bed94cd03aa3b7254e6630 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 c02d8ae1c198492daf1a0fc82badaaf942766902..e34031d0afa6918ce70150531c7a5c5097bf23d9 100644 +index 2c23fb72d3965f2c35c12b3d130725644d389ca0..38d6a46ec51c12983d229d962eb7dc3701ce13fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -801,6 +801,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 955f7ed44d..4a58b7cc1d 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -279,19 +279,6 @@ index 771841e08591955e61c7bcc5b09c8457652c1b9c..8162c11d14b8e88c2b572f9ddf6b7a15 String s1 = ((INamable) t0).getName(); if (this.b.containsKey(s1)) { -diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java -index 026c51b5ce80ff4161d2f126e8df9dc493a46957..fb3ddcc5d5a1154a7e0583135ecd541e8f67ff0b 100644 ---- a/src/main/java/net/minecraft/server/ChunkStatus.java -+++ b/src/main/java/net/minecraft/server/ChunkStatus.java -@@ -90,7 +90,7 @@ public class ChunkStatus { - return (CompletableFuture) function.apply(ichunkaccess); - }); - private static final List q = ImmutableList.of(ChunkStatus.FULL, ChunkStatus.FEATURES, ChunkStatus.LIQUID_CARVERS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS); -- private static final IntList r = (IntList) SystemUtils.a((Object) (new IntArrayList(a().size())), (intarraylist) -> { -+ private static final IntList r = (IntList) SystemUtils.a((new IntArrayList(a().size())), (java.util.function.Consumer)(IntArrayList intarraylist) -> { // Paper - decompile fix - int i = 0; - - for (int j = a().size() - 1; j >= 0; --j) { diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java index fbb708f5f7e4d2da9d96b595498da436b088a408..f27c7041cdc2f062f0abb222b02026194ab33c60 100644 --- a/src/main/java/net/minecraft/server/CraftingManager.java @@ -527,7 +514,7 @@ index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d55 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1360385091332ddf032b075990e59eee5543feb1..bae5ddbd97bd3f3422c699c42f025337b7cef574 100644 +index ea3685df509101f3fed8b07088baef3ffdb4b85a..5e2dff9a30615b5580710f872a92ab9f07fca6cf 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1549,9 +1549,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0622f0d8d765c1249fd97f27c3c83af519f01c00..3e679f66cd922cf0b47a84cdd1a83f311ddf6d0b 100644 +index 9da321fc0e02e4a2e47f515011df33714affd368..ee93b977b5f78855fd58a2055ca4e17255f3388b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; 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 ddc0ee4dd1..fd87bcbea8 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 @@ -80,7 +80,7 @@ index 7c7826cf3adb19814984ab627e4c4726d8933244..bd92ed2e6d4766f4f16ec3002c41b36b } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3e679f66cd922cf0b47a84cdd1a83f311ddf6d0b..f51325612fa14c1428679d6955a6d92322da7c84 100644 +index ee93b977b5f78855fd58a2055ca4e17255f3388b..e3f2e259b2c5e478bde45554995b9c742d9e2008 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -178,7 +178,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 7d849282f6..db30bc9bf1 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1003,7 +1003,7 @@ index aa68eb71b131c1d529ded6c651621cfab071b3c4..9cba62efdb051c9850bbf28b0be17a7e } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f51325612fa14c1428679d6955a6d92322da7c84..81f2c91f9e27e2ad2855b64a7849efa18505e952 100644 +index e3f2e259b2c5e478bde45554995b9c742d9e2008..98eec5efe474011665bd819d0d0b11abd6a068ea 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; @@ -1118,7 +1118,7 @@ index dccb315440f7429fe881bd0d12af8f1ae8e35c3d..96a95413f74592ef0a8e9367fd3ed81f if (!this.world.isClientSide && this.dN() && this.aC()) { this.damageEntity(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 64994a9635efa36ec09623c3869f22faed09b21c..fc92fbb05e442d453d6d5dd4e36143a576f55b6b 100644 +index 70604fbf6bdd5166fc91d57fb4db4a8337bc4727..0867ad04857c652dcbcdf130bb5353113ea039a0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -1407,7 +1407,7 @@ index 3e2e355177e32856dac07dc8b98658ad1b717045..7c5eaff23ef6bf3cdf2575330ea6341d protected void broadcast(Entity entity, Packet packet) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index cfc2005ee5639c88ad1e21f0dd41c917a7c5db05..ef622ae8946c7caafa222c42749ddbd90425f61c 100644 +index b8d3c4d35cee2ba4678f6d22b8ea956d598d9d9b..88fa8d63c5bb2c76ba09db6bb002f6d6b6a42afc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1628,7 +1628,7 @@ index bd5a2eee9cb435a5ee75a39cea231151fba00387..a559f423b19a1e6f8efb632727025084 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 f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98faf4a7641 100644 +index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea14a6d33d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -3,6 +3,8 @@ package net.minecraft.server; @@ -1758,7 +1758,7 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98f // 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 e34031d0afa6918ce70150531c7a5c5097bf23d9..384fece1d7a1b07b04b09b4876ded0d603b1840b 100644 +index 38d6a46ec51c12983d229d962eb7dc3701ce13fd..9947bbbb8ca2810bce420cdd12a1874afd6b1c0c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2048,12 +2048,31 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index ecb06718c4..3e47e61bdd 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -31,7 +31,7 @@ index 2e869004c8c6b8bfbb002fb4eda04519d50390c8..8a6856e0fd7b9b515d98f45aaabefbc3 this.b.setJumping(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 81f2c91f9e27e2ad2855b64a7849efa18505e952..f8a85f1c96729ad97aa5f21ac0468c92f243f079 100644 +index 98eec5efe474011665bd819d0d0b11abd6a068ea..a50b005b9f3fc58674560f42b9c4a20fd8b669fa 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1024,6 +1024,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 6066138b6b..ddde3606db 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -24,7 +24,7 @@ index 8ee2b9bb1bce698fce50ac1b3fc477fcafd0542c..d59b82b7bb1f6d1b231f4e394e0a67a3 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f8a85f1c96729ad97aa5f21ac0468c92f243f079..80f1c4930d6dd602210b07a50b10c45e9f80ae8a 100644 +index a50b005b9f3fc58674560f42b9c4a20fd8b669fa..e85172eb69b04746eab08abf213dcd02cd4513ee 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1761,6 +1761,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 02fea3de31..91650d34eb 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -19,7 +19,7 @@ index aab33df7a36eb69300fedfce733985d6c239ca01..550232cb3819138b3bae0fa1c5142948 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fc92fbb05e442d453d6d5dd4e36143a576f55b6b..1fcdbbbc7b60edd1e87bab5f1c5d19a6755de17c 100644 +index 0867ad04857c652dcbcdf130bb5353113ea039a0..9eacc1ba58986c21c5d8dc8d8d14c6f3b48fd171 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1224,7 +1224,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index dd02f7b8c0c0055a506bceab68cec98faf4a7641..eb53a8232371433aabe300af5629cf1735ff18fb 100644 +index 9df9ce88e23b31f0303a3c84136a10ea14a6d33d..f764eaf58d225d3c875dda66c1a2ac43ef3c1eae 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1088,6 +1088,11 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch index 05b755623b..cf16b0e54f 100644 --- a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch @@ -29,7 +29,7 @@ index d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 12730f52fdb0774dcf8be81547c8f03ef9f184a4..be0ade74030c5f8584b5caa22d6d3084a0853afa 100644 +index bfe36be070677d215eadd3ad38f93c6bddab0b75..9e132052e1a9b997300e3f5d88473fc5f9ebdd73 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -420,9 +420,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0030-Configurable-end-credits.patch b/Spigot-Server-Patches/0030-Configurable-end-credits.patch index 5094638692..4d39e6b1e2 100644 --- a/Spigot-Server-Patches/0030-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0030-Configurable-end-credits.patch @@ -20,7 +20,7 @@ index f7a0a33e49cadf9b2bd43f118c106937760da762..50dec5cb5e924301842300e8fc80cb67 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 183346d37e36be70348ecf0f2f26a0e0ef35eab8..c3fc8de59042e97560785997fdb3f7bbdc6234e6 100644 +index 5bf3c279b86ed0fa416ee7dd9923172d6e6261a5..7012bd08fb4715eb66e6f47733b82f556c2b8a11 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -32,7 +32,7 @@ index 183346d37e36be70348ecf0f2f26a0e0ef35eab8..c3fc8de59042e97560785997fdb3f7bb private final RecipeBookServer recipeBook = new RecipeBookServer(); private Vec3D cm; private int cn; -@@ -752,6 +752,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -749,6 +749,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.getWorldServer().removePlayer(this); if (!this.viewingCredits) { this.viewingCredits = true; diff --git a/Spigot-Server-Patches/0032-Optimize-explosions.patch b/Spigot-Server-Patches/0032-Optimize-explosions.patch index a95dcc2071..d1d73ce7aa 100644 --- a/Spigot-Server-Patches/0032-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0032-Optimize-explosions.patch @@ -123,7 +123,7 @@ index bf156897acfe25c16a1b09a83a00ba3ab647a2dd..842563f2030382659a62a3a63d9af9d5 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0f2011a776619301dd6a133b9a4044b4f5b69cfc..e1af87a172d011a212aaafc55ef651ff60df35b6 100644 +index 7b58499c24d5a4296cc539087ca86d2ec4148b1c..991baec71cfeb79ee2108870645a19582f151def 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1208,6 +1208,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h(); } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9eec2ec61777222c1290ad3112b003409001e51a..4548a38464fac65a88da26e95660542eeb482ccb 100644 +index 223482e468862407d53299219e2f4debecd0cd87..f38c88df648aa715aefb18018779efd8075d781e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -83,7 +83,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch index 68a1232e5c..690ca1f255 100644 --- a/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b75c6aa78dd9c7478912b0b68de7a27289a480ba..0b0dca503a91bbd7991996bf6c395991c993604d 100644 +index 1903635fd3416965adbbba5af38ff29dac0c6670..b5625318ca6bfeeada2d3fb009b711685265ebaa 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -58,6 +58,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch index 098d8d7228..8e413d7e4a 100644 --- a/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch @@ -22,7 +22,7 @@ index d8b9d87bca6eb95c2cea91e4d8466b9792582d52..92d1dffbf436a21943b4a6aa0fabf54f + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4548a38464fac65a88da26e95660542eeb482ccb..20200408da6cae15576926f79de22b955781201d 100644 +index f38c88df648aa715aefb18018779efd8075d781e..5e64aca8c318f2fd909cd0e934867e890a152373 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -475,7 +475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 6c9a38a51a..cabdba7ec5 100644 --- a/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -32,7 +32,7 @@ index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c410 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e1af87a172d011a212aaafc55ef651ff60df35b6..db0184af459472c73df5990699def5bdaef573c2 100644 +index 991baec71cfeb79ee2108870645a19582f151def..a2954709415751d9688b5b3597f5b15ae5bd8ccb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1174,6 +1174,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0ae5eb7da3c8baf6ff54cc3b83bba41127457134..022b05be76768cf0fb702ac5f9fa48c5e474391c 100644 +index b68338310106858195099bb45b8bf4da723b8439..809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -728,7 +728,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch index b523521a58..b6b7c7786b 100644 --- a/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 177f865688c40d0ecca72771007e2271626ab5cc..b7f7dd59fd9deaff9ec3797b395c91c91ce5b54c 100644 +index ab89e508ee8b8142fb7c0b5101b0b0e157a68f35..1f98d4bec282c46355e325dcb9fe0cb23394ba9e 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -206,6 +206,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -203,6 +203,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void loadData(NBTTagCompound nbttagcompound) { super.loadData(nbttagcompound); diff --git a/Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch index 810d6961bb..726bbaec7a 100644 --- a/Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b7f7dd59fd9deaff9ec3797b395c91c91ce5b54c..0f865f4f94d84da4eb6d0e1288ca7678a23545b2 100644 +index 1f98d4bec282c46355e325dcb9fe0cb23394ba9e..c1c858f9384eb6e952198e531633d0a571c39ac2 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -4,7 +4,9 @@ import com.google.common.collect.Lists; @@ -27,7 +27,7 @@ index b7f7dd59fd9deaff9ec3797b395c91c91ce5b54c..0f865f4f94d84da4eb6d0e1288ca7678 private final AdvancementDataPlayer advancementDataPlayer; private final ServerStatisticManager serverStatisticManager; private float lastHealthScored = Float.MIN_VALUE; -@@ -414,13 +416,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -411,13 +413,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { while (!this.removeQueue.isEmpty()) { int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); int[] aint = new int[i]; @@ -50,7 +50,7 @@ index b7f7dd59fd9deaff9ec3797b395c91c91ce5b54c..0f865f4f94d84da4eb6d0e1288ca7678 this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } -@@ -1436,7 +1445,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1433,7 +1442,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit 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 c3aeb44baa..a8aae9e9ce 100644 --- a/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ 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 fc76268c767aeee06dd802cc10df65bbff7ea536..5281efee7b7abe7ce6e6c8709147c052e3bb972e 100644 +index 04593705633b94b35c291e9622615ca0ad9ef9a4..d670295d6857276e3382b5d38afa25d1c93d7278 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2193,5 +2193,24 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch index 284219eb3a..2474bd6538 100644 --- a/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6d6ce3b5a012f49b2e0725d66ad4bcae4a7310f7..de126bf6c95e90dd9a81ee8d815806b8908709ec 100644 +index 14351cc9e60a0b8d33d319da9d473e74072767d7..393a2d3ede8e82b33979f18e0cda796bf003f8ef 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -162,7 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch index ccf66d9db0..ee946ddf2d 100644 --- a/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0f865f4f94d84da4eb6d0e1288ca7678a23545b2..7227717f1ede5d67432f97f527c2d18f9d1c656f 100644 +index c1c858f9384eb6e952198e531633d0a571c39ac2..7d6b1893ae6b7a3e937f8f83fc222709c8120814 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1936,7 +1936,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1933,7 +1933,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { @@ -19,7 +19,7 @@ index 0f865f4f94d84da4eb6d0e1288ca7678a23545b2..7227717f1ede5d67432f97f527c2d18f @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a264a32b7eb2ce21756f493b0fdac60e1368fffa..1422b249c6136f2b06d46478cdf51e14e20bc0e3 100644 +index 17edeff6cf5c3f7fee5c17028d3231f70f358537..e04bb290a94f5cfc93b5bd2121e6b32610199237 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2569,7 +2569,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch index 7021f234fa..8e1da02a97 100644 --- a/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index dd8c91a05c4e55ee24268e9d5edad141d320e814..b351c9e0b1eefa482b661c12bd9e8f0abe7f203c 100644 +index b7982bbff805b7bc73c9ce74007f32cf05eac5b1..cc5fea8bce240e0585a334eeb311ce040b9ca040 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -961,11 +961,13 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch index b0e8a63edc..a03971152b 100644 --- a/Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index de126bf6c95e90dd9a81ee8d815806b8908709ec..e36855b969bdef5e85e6b29879f960b0675a7937 100644 +index 393a2d3ede8e82b33979f18e0cda796bf003f8ef..bd270ea92404c2055c09324988e1ec28109a8815 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1950,6 +1950,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch index a71d865565..1c0ad7590b 100644 --- a/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index 255b4081314162cbe344b008158c6f4584795fb8..04ee0856a8c62e1afb438d4fddf40e60 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e36855b969bdef5e85e6b29879f960b0675a7937..13b10732917ffb823688336e888a329c774cc251 100644 +index bd270ea92404c2055c09324988e1ec28109a8815..912f5be0264b604df175f5825765b03b319a841c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke 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 d22caba35c..b57da83a46 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 @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 28ade7187d6fd61adbfe65a1944426168b131c4c..878a9de29c728a0b49fb8ee15be85516176795bd 100644 +index 793d4d928bac4febf090291eb773871b492cdc6d..28478370fc182751178f7dd6c20435218174c700 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -91,6 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7227717f1ede5d67432f97f527c2d18f9d1c656f..6414ff3ca7e5f217268f7114f7ac751532444af6 100644 +index 7d6b1893ae6b7a3e937f8f83fc222709c8120814..d2c61467b8373444609a6aad9688c5b747547d9c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch index 1056998835..e11e55d8f1 100644 --- a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch @@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 62ca208a95434ca1d8970b01f7291647e0b1f93f..30d04825b8a65e0af66f3591ee6baaa433893b54 100644 +index 5a5fc0626562d46f1ea6ce3e779e75de55611548..1698b42ed56a2932c5c1d60c655c9fd4cf5bed66 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -200,10 +200,10 @@ index 62ca208a95434ca1d8970b01f7291647e0b1f93f..30d04825b8a65e0af66f3591ee6baaa4 for (int k = 0; k < agameprofile.length; ++k) { diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index d9d9999e79f888d9d9ac0ef9ae5b3db67ac405ed..da804a9904c0bf7219729e9b9aca1bfc72dd10d6 100644 +index d38de25d71ba1eb405e34ba2b04a2cfbccd637cc..ee18dc3fa2d0beeccbe1539573cce433f87566b8 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java -@@ -37,6 +37,8 @@ public class PacketStatusListener implements PacketStatusInListener { +@@ -35,6 +35,8 @@ public class PacketStatusListener implements PacketStatusInListener { this.networkManager.close(PacketStatusListener.a); } else { this.d = true; @@ -212,7 +212,7 @@ index d9d9999e79f888d9d9ac0ef9ae5b3db67ac405ed..da804a9904c0bf7219729e9b9aca1bfc // CraftBukkit start // this.networkManager.sendPacket(new PacketStatusOutServerInfo(this.minecraftServer.getServerPing())); final Object[] players = minecraftServer.getPlayerList().players.toArray(); -@@ -132,6 +134,9 @@ public class PacketStatusListener implements PacketStatusInListener { +@@ -130,6 +132,9 @@ public class PacketStatusListener implements PacketStatusInListener { ping.setServerInfo(new ServerPing.ServerData(minecraftServer.getServerModName() + " " + minecraftServer.getVersion(), version)); this.networkManager.sendPacket(new PacketStatusOutServerInfo(ping)); diff --git a/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch index 416a38828e..78fc6ba536 100644 --- a/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ 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 0305b1100711e57288c639078a15bee89b0d7964..03ab59bceca94ab23278b8f531ccdcc6a85da799 100644 +index 3954eb18bb28ad9033c957e05a13068b8751dbc9..22b5a20b1183d2421e4f43245b1ace30adffb7e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1481,6 +1481,26 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0211-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0211-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index c1a95a8126..7d7c87ca1e 100644 --- a/Spigot-Server-Patches/0211-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/0211-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 77060bd127cedd4baa9bc88e700c23faf74d0057..351eeb83d8a28b19e3805f0d8a377f4ed060c592 100644 +index ccf083fbfa97b2a24338a3c1fe18e9a8c850feaf..411e6ff17ac50a410da038ad538ad56ba3aef8a8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2542,7 +2542,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch index 92e6e6d47f..a075e8a651 100644 --- a/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0215-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 022b05be76768cf0fb702ac5f9fa48c5e474391c..0c677b8e1b1a103c7d727dba19fff1f74b7ed382 100644 +index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f67d4ec66 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index 52c44fcd4a..6a33d4e8b0 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -34,10 +34,10 @@ index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ac5f86c6fccd9410505e29bd60ba8351054703ed..290be5ffdfc5322d45dc5bca39de4138ee57f92d 100644 +index d2c61467b8373444609a6aad9688c5b747547d9c..dc8f88d102c06d8fb28ffd66de36f32efec54ff2 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -411,7 +411,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -408,7 +408,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // Paper end if (!this.world.isClientSide && !this.activeContainer.canUse(this)) { @@ -46,7 +46,7 @@ index ac5f86c6fccd9410505e29bd60ba8351054703ed..290be5ffdfc5322d45dc5bca39de4138 this.activeContainer = this.defaultContainer; } -@@ -585,7 +585,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -582,7 +582,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { @@ -55,7 +55,7 @@ index ac5f86c6fccd9410505e29bd60ba8351054703ed..290be5ffdfc5322d45dc5bca39de4138 } String deathMessage = event.getDeathMessage(); -@@ -1166,7 +1166,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1163,7 +1163,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return OptionalInt.empty(); } else { if (this.activeContainer != this.defaultContainer) { @@ -64,7 +64,7 @@ index ac5f86c6fccd9410505e29bd60ba8351054703ed..290be5ffdfc5322d45dc5bca39de4138 } this.nextContainerCounter(); -@@ -1226,7 +1226,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1223,7 +1223,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end if (this.activeContainer != this.defaultContainer) { @@ -73,7 +73,7 @@ index ac5f86c6fccd9410505e29bd60ba8351054703ed..290be5ffdfc5322d45dc5bca39de4138 } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1290,7 +1290,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1287,7 +1287,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void closeInventory() { @@ -88,7 +88,7 @@ index ac5f86c6fccd9410505e29bd60ba8351054703ed..290be5ffdfc5322d45dc5bca39de4138 this.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 351eeb83d8a28b19e3805f0d8a377f4ed060c592..027f9a86f458aab7d94f132981a9c700a0afea57 100644 +index 411e6ff17ac50a410da038ad538ad56ba3aef8a8..201b2b0dcbaf6765390c18052f3b3450e63066e4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2080,7 +2080,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -114,7 +114,7 @@ index d5e7a41b39cb384cf9b52303bcbe11ae09b4162b..3a2ab5a5745e2c698042357321bcfe7b PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0c677b8e1b1a103c7d727dba19fff1f74b7ed382..8a42f9ed3e1579b8b034de9321e5545505298d6b 100644 +index 10eb83bec33050ec1054de493960c87f67d4ec66..4675ddb1f7c989521dfc9fbd0367e6fbbaa7abda 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -967,7 +967,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0240-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0240-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 48838b35cb..ffd4555d0d 100644 --- a/Spigot-Server-Patches/0240-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/0240-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,7 +16,7 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 027f9a86f458aab7d94f132981a9c700a0afea57..1bb64d388c27e3438b1f5ab70ccaa1aa529aa32c 100644 +index 201b2b0dcbaf6765390c18052f3b3450e63066e4..e3391017b3dcfbfc942b84118391928a6a5b807c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1989,6 +1989,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch index 99513fb60b..04fb42eb8f 100644 --- a/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -8,7 +8,7 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 8a42f9ed3e1579b8b034de9321e5545505298d6b..c37b69b1632a72e3c7df5fd2643c0b3ff517d06b 100644 +index 4675ddb1f7c989521dfc9fbd0367e6fbbaa7abda..57be6e9c0062cfe94ad551abd7e8bea1213a10b6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -957,7 +957,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0245-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0245-add-more-information-to-Entity.toString.patch index a850ab78a0..e888f67d61 100644 --- a/Spigot-Server-Patches/0245-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0245-add-more-information-to-Entity.toString.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 039a95a62e115f7095c38eb9a161dc0ff054a50a..2fcf43b7a2c5af2f7965a8556a3be9a086dc6420 100644 +index 2dfc881894753469080a5038c770e126cb19a806..50f9d217494ab2823596523839d5992fc480912d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2429,7 +2429,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2435,7 +2435,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public String toString() { diff --git a/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index c4b3220ef3..931987389c 100644 --- a/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2fcf43b7a2c5af2f7965a8556a3be9a086dc6420..f735c8cc9f68451ec64c2024769c37955e2ea963 100644 +index 50f9d217494ab2823596523839d5992fc480912d..8e128fa303b345a10535630fd58442435ef1e439 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -52,7 +52,7 @@ index 324967c892ff8878326af4229668fcbde37ef202..5540fc6eee8115400774b7a792b9d3b4 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c37b69b1632a72e3c7df5fd2643c0b3ff517d06b..9177f300e734afc5e4739655cdcb8b33866ff6cc 100644 +index 57be6e9c0062cfe94ad551abd7e8bea1213a10b6..fc6639d9729b2714389f191de7a21cb1aa853c75 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -83,6 +83,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch index 8b9e80cccb..6662d05029 100644 --- a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch @@ -17,7 +17,7 @@ index 26d446077bb563ca3c5bb0339695b3364a3e41bf..88a1db211286fc8a6164312d7eb0839c 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 f735c8cc9f68451ec64c2024769c37955e2ea963..f35ebacaf7c3a583d48efe58db9583c12c9c31a1 100644 +index 8e128fa303b345a10535630fd58442435ef1e439..af6f0c391e6e410f0bf4e4e6ddf6fd18bb4d26ed 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 diff --git a/Spigot-Server-Patches/0254-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0254-Add-some-Debug-to-Chunk-Entity-slices.patch index e8239176a3..3bb6f213ff 100644 --- a/Spigot-Server-Patches/0254-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0254-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -58,7 +58,7 @@ index a27f91e6c3d1f5dd0adf8a3b48a640cc63676114..3ba19f75d24a1539c94f4fed9b8f90ae return; } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f35ebacaf7c3a583d48efe58db9583c12c9c31a1..e41c0a5891ef10ab7537f0f00ee6ab3e418d762c 100644 +index af6f0c391e6e410f0bf4e4e6ddf6fd18bb4d26ed..b0338278f3cfecdb30e1d2febf1ff2a04d0cc66d 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/0257-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch index 5ad7dc6a8e..32c50a9dc3 100644 --- a/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch @@ -80,7 +80,7 @@ index 28039aa8421207ce04840cc90e03d21bc8b7269f..17b8c4445af2bd2ed907d05ed3c396d4 public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) { if (nbttagcompound != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9177f300e734afc5e4739655cdcb8b33866ff6cc..972a2fc6febc43156b8aa0917b881c6c604ec2c1 100644 +index fc6639d9729b2714389f191de7a21cb1aa853c75..e5fff59efc2d2794024eae93854a296d2b82cf3e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1000,6 +1000,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch index c6c9c812ba..e0e758c997 100644 --- a/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -51,7 +51,7 @@ index 3ba19f75d24a1539c94f4fed9b8f90aecc918cdc..f7be161c8557ae3848227b1a61e27374 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 e41c0a5891ef10ab7537f0f00ee6ab3e418d762c..413dd5456d14842ab48143b6ee35e37dcb5ca3db 100644 +index b0338278f3cfecdb30e1d2febf1ff2a04d0cc66d..55f8863f823836065f4de8240bfeb490bd391a55 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -195,6 +195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -63,7 +63,7 @@ index e41c0a5891ef10ab7537f0f00ee6ab3e418d762c..413dd5456d14842ab48143b6ee35e37d 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 972a2fc6febc43156b8aa0917b881c6c604ec2c1..afba8d654bd227ad60ec502de8834c45f239f479 100644 +index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e228586b5 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1152,6 +1152,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0263-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0263-Break-up-and-make-tab-spam-limits-configurable.patch index 8b62106447..d3b964a7a4 100644 --- a/Spigot-Server-Patches/0263-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0263-Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,7 +45,7 @@ index c8a7d8092a2849b62a8d83d7970756fd76100025..2e5c71d6b7d120a308076d95a3d5b73c + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1bb64d388c27e3438b1f5ab70ccaa1aa529aa32c..17247eb9c08de10da50b94d65ac3f05453805137 100644 +index e3391017b3dcfbfc942b84118391928a6a5b807c..351cb9643b05e83f97a7976979346325e76f44da 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch index bda2aecaf9..6ecb605d08 100644 --- a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch @@ -95,7 +95,7 @@ index ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af..cc4421aa61d7d87c164c1f88ad8b5fa0 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 afba8d654bd227ad60ec502de8834c45f239f479..f6c459facde67500499365af6da9f43adcd80606 100644 +index 1a103dd830109e119acc1a371b37386e228586b5..a343cba51850bb7214c241a92db0694d3c1aaf60 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1483,15 +1483,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch index 9cbdf8acc9..7501053a92 100644 --- a/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,7 +36,7 @@ index 2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9..1b21911c3e4fd1d4a3305176bb8477c3 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 30d04825b8a65e0af66f3591ee6baaa433893b54..3a7e2d1b2a11edbf430333bb8f4788c073dcf18e 100644 +index 1698b42ed56a2932c5c1d60c655c9fd4cf5bed66..b13d8ec9aa0a51d5432129f1b0ecef3beb5b7276 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -899,6 +899,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 31ffa627417745f87917933cb96873fd8657b49a..850a88c5b7887baf40787b21c04f40b9809157d7 100644 +index 3a2ab5a5745e2c698042357321bcfe7b1bd92154..c3acd5e610301de924eb1f49f00f9a3ae85eefb3 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -543,7 +543,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index 661d8331d7..20c4b4e8c4 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -27,7 +27,7 @@ index 6281f7900afab3ef1c9ba3c034b91cbfa1900f50..3c2f8407906879c8dca07b538f59f4bb 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 413dd5456d14842ab48143b6ee35e37dcb5ca3db..a704feb0c19b56964d017f9e0ea3f26bc3e975f8 100644 +index 55f8863f823836065f4de8240bfeb490bd391a55..a9664f03b8b7d2c12565b8c08891c7021aa5482b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1460,6 +1460,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -38,7 +38,7 @@ index 413dd5456d14842ab48143b6ee35e37dcb5ca3db..a704feb0c19b56964d017f9e0ea3f26b public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -2343,6 +2344,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2349,6 +2350,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance = 0.0F; } @@ -279,7 +279,7 @@ index 4b249a644c680a7cc64b0d31cf453f94ff2b6a0c..d6a98bb7fc107649c179cded2d37c06a return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 290be5ffdfc5322d45dc5bca39de4138ee57f92d..1b57f2ec7da87b4f87e35e1d5e6a272a641d0669 100644 +index dc8f88d102c06d8fb28ffd66de36f32efec54ff2..650579eb1bb73416b629229fce897d2941bd3b0d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -80,6 +80,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -293,7 +293,7 @@ index 290be5ffdfc5322d45dc5bca39de4138ee57f92d..1b57f2ec7da87b4f87e35e1d5e6a272a // CraftBukkit start public String displayName; -@@ -582,6 +586,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -579,6 +583,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { String deathmessage = defaultMessage.getString(); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); @@ -309,7 +309,7 @@ index 290be5ffdfc5322d45dc5bca39de4138ee57f92d..1b57f2ec7da87b4f87e35e1d5e6a272a // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { -@@ -733,8 +746,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -730,8 +743,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } diff --git a/Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch index 5e7e706dae..16f59decc7 100644 --- a/Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch +++ b/Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b360077d72afafcaa23c438eb073b9286c8fb563..e0d7bb9c1df2898ead246265f4ab2f05396f59c8 100644 +index 650579eb1bb73416b629229fce897d2941bd3b0d..91de641e52693d2a776ae68810965b6e4643220f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1697,15 +1697,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1694,15 +1694,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } @@ -88,7 +88,7 @@ index b360077d72afafcaa23c438eb073b9286c8fb563..e0d7bb9c1df2898ead246265f4ab2f05 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 17247eb9c08de10da50b94d65ac3f05453805137..f0d8388d6ac0ed5546d34f628a6b2ba6c56b1c61 100644 +index 351cb9643b05e83f97a7976979346325e76f44da..d33657d94a4e9c6563fbc7826e18624528c498f5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1133,6 +1133,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch index 37ab2eb616..3e6bd5b395 100644 --- a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch @@ -227,7 +227,7 @@ index 8cb29ddc0d5a5951ea35e1a16c023efb9b0be42d..2916119507ec5ecd9266569b0003d050 public java.util.UUID spoofedUUID; public com.mojang.authlib.properties.Property[] spoofedProfile; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index a7560ac0719d789f2b8ebc0294190a9bd43a2512..2098d8b0e1e7f71f0fe83d04625271b09e662a6f 100644 +index 91235f7bc80967a759ed8bb25d74ff0af6e25ef4..c20a3b6eb8c836d2d84995b91a98390e04e3ae51 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -164,6 +164,7 @@ public class PacketDataSerializer extends ByteBuf { @@ -289,7 +289,7 @@ index ae74dc9e183e66062455cf2a18ab43ae87976046..7eb230f1b27eddf48f1b12fc78877a36 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 6aba97153123084f99088f10ccfc16ae8e3a0639..b0ce13c6a62c77ba26dcd006df781ec00b3509f7 100644 +index 8cd2742f93b8d18c17053c94184c4c23990de951..237dda5e5c1bd3fc01152b865a7ed47617588cc4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -675,7 +675,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch index ec2778b10f..f69f424d70 100644 --- a/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -20,7 +20,7 @@ index 37bd28f18d3f48767d8141bde3395b8443d5650a..a73b88d51608ce94f6e4c9013c8c4de9 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f0d8388d6ac0ed5546d34f628a6b2ba6c56b1c61..e815200d1b81bd0d8a62e28a43cc01f4da956fa0 100644 +index d33657d94a4e9c6563fbc7826e18624528c498f5..b1bad421650a8c93cdc38d1f4f83ab1c39e2f624 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -350,6 +350,13 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch index 767ffd9174..e2bcd3917b 100644 --- a/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a704feb0c19b56964d017f9e0ea3f26bc3e975f8..41c14d367e0b51e109001167d3c7b40676f364b8 100644 +index a9664f03b8b7d2c12565b8c08891c7021aa5482b..1a677783baa0b9a3dcfcd84caccba61d76fad2fb 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2256,6 +2256,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2262,6 +2262,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -17,10 +17,10 @@ index a704feb0c19b56964d017f9e0ea3f26bc3e975f8..41c14d367e0b51e109001167d3c7b406 return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index e0d7bb9c1df2898ead246265f4ab2f05396f59c8..4b1923c81df02d0d48a5e61b9e4487d4a2fe789b 100644 +index 91de641e52693d2a776ae68810965b6e4643220f..2a4fc3d633924fbdfa166b3c3a39e0bae8a07310 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -2028,6 +2028,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2025,6 +2025,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); diff --git a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index dcf114c29e..4a92754429 100644 --- a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -12,7 +12,7 @@ server threads Allow usage of a single thread executor by not using ForkJoin so single core CPU's. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3a7e2d1b2a11edbf430333bb8f4788c073dcf18e..601bf747ad7c4419d087573fc3098a1f84324c4d 100644 +index b13d8ec9aa0a51d5432129f1b0ecef3beb5b7276..f4c93a65c28eeca4a07aaf9b00507d5c6649d137 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -175,6 +175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant, 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 18305112c8fcf1de1a21d9afea1a987859615dc7..638d7303f55e99293703bca80c43f8f00a43c550 100644 +index 576f5c8c4d702dae7f2db9fb221365394542fcfb..a243dc63eb4c811065c742e61b334864ad582fbe 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableList; diff --git a/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 8e017df9e7..62aa3501f7 100644 --- a/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -21,7 +21,7 @@ index 6e29e3294d0661cc35d53b4201d980a2db4f5c93..6e1756eb90b6237100612527f69c9952 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 19680baafcc8a5a18ec3f58da694372117c7e969..b24968ce9604b98f9b7a6c7498625f976cc58dd2 100644 +index b9e047643e1c3f84f26d936fcb067f607018ef34..d6a3c51826ac82fd46b8f6c98be7bf405ffa3f38 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -607,6 +607,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ed5b69682fc80d8ff9a0e068d45456a75cbe3891..6e9a5b77ef7e67534b64781ee9db6b6d3e33e879 100644 +index 4529ccc02f53fadc6ac2df97682b21913487bc22..85b73e65a4c1af052e75473bc239d91d5d1fd108 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -93,6 +93,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch index 0b1b44251f..9ee98edac4 100644 --- a/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2fc83aa9aabbb4ae5a22d69c9840e6235d29cd1b..a396051c46613ac863fd296b55465c01bd2c7ce7 100644 +index 70d3b429bfe08f1d2e5a3ac8368d8221770d5307..092e49ae11ff735cf0179de8e0aaa73f7842e372 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1015,7 +1015,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -65,7 +65,7 @@ index 25785eed8c714b87635679e44ef06726c9a1b24c..2278835e15449c72d1bbbf0a2694c386 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 6e9a5b77ef7e67534b64781ee9db6b6d3e33e879..85a025bd20cbcf5547b0c9e0f8d4a62f5bcfc358 100644 +index 85b73e65a4c1af052e75473bc239d91d5d1fd108..df04a1d39a4ad3a5cf30372bd14a65d1ff5459b3 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -90,7 +90,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0379-Reduce-sync-loads.patch b/Spigot-Server-Patches/0379-Reduce-sync-loads.patch index e0b0f912d4..3801c86711 100644 --- a/Spigot-Server-Patches/0379-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0379-Reduce-sync-loads.patch @@ -329,7 +329,7 @@ index 2278835e15449c72d1bbbf0a2694c386554242e3..dd3dd03200ad8f0219d6673abfe8fc87 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 85a025bd20cbcf5547b0c9e0f8d4a62f5bcfc358..7e01a4953c7fcff3a1199c7ca4c7731748418d69 100644 +index df04a1d39a4ad3a5cf30372bd14a65d1ff5459b3..8c0b1f28c3a914ce467345104e024650b9ebe2fe 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -165,6 +165,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index 67ed4f398b..36ac6d6a22 100644 --- a/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,7 +7,7 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7c1fb8786db9df10530f78d0fa2a1391d4d7308d..7ed6cdb1eff72ef056fb7495c8f2812717e96ad9 100644 +index 0633944364179ffb9b9fdd0400d82fd5b2ab3892..41c4b2df34faa95afdd2d35b0bac021d77c56884 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -512,11 +512,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant entitytypes = entity.getEntityType(); int i = entitytypes.getChunkRange() * 16; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 59afafecabd59ede1398c124769262f7568426ed..4f2c8a9fbfa4596f5414dd742affc4cc45deab5a 100644 +index f21011761ddf3082bc9bb59f1ec6d97e5d98c705..d28985adf70b7a06688ac3113477a681f4b19693 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1352,7 +1352,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch index 3527a6ac16..deb0f581d3 100644 --- a/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch @@ -14,7 +14,7 @@ movement will load only the chunk the player enters anyways and avoids loading massive amounts of surrounding chunks due to large AABB lookups. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d4bb4e73ce8867ce56dce0ea84dea2dff91846d4..8f1e8728502d1dcae1fb538875f72460fc926d7c 100644 +index e895bf811ce5d441541725ade48e3f07ca86fc2b..152f613159ef88977de867c0deec94bfa4353f7a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -80,6 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch index 26b48cfda3..0c8149a78c 100644 --- a/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch +++ b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 41aee7ad9b0bec813b617428cdcc7002e3f66c63..cf7ff024c1645593b7922249b7ee8f82b8811fa2 100644 +index 7792ce6e94d25021666ef21da790f337d411234e..c6f326787328ff6b2f974d653dc9e7932c3c0205 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -472,7 +472,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -469,7 +469,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void playerTick() { try { diff --git a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch index 1b143f00ef..2890f58e7c 100644 --- a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch @@ -28,7 +28,7 @@ index b987399ca3786a30f87c98658e8bf04d4aa2e2da..08949526752e4d66e4c0df11f76f6500 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aecc0fee6924922f1599a99a643c1d2437e22fc6..29104c3a2f5231c8870208327facca2d33bfc9c3 100644 +index 99b6a4d277816699a5abd9ec889535c064758e97..0d91765cb6386c9483a6b5494e37bd7806638928 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -662,7 +662,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant(this); // Paper -@@ -171,6 +171,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -168,6 +168,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end @@ -30,7 +30,7 @@ index cf7ff024c1645593b7922249b7ee8f82b8811fa2..dad115496d3210e1471f1c4eb81989c2 private void b(WorldServer worldserver) { BlockPosition blockposition = worldserver.getSpawn(); -@@ -346,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -343,7 +344,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { position = Vec3D.a(((WorldServer) world).getSpawn()); } this.world = world; @@ -40,7 +40,7 @@ index cf7ff024c1645593b7922249b7ee8f82b8811fa2..dad115496d3210e1471f1c4eb81989c2 this.playerInteractManager.a((WorldServer) world); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index cac27c509dd3bec9f7feabf5804d1140055b1c6e..610c3ed31e0dceeded4dbd5f63db23def88e1ea6 100644 +index a9dc7807508e5227b59a750f982bf7a0740fa493..6f6d1d4c733faa80045fb63269b16ba127c2b616 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -134,6 +134,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch index 15ffd0b020..3085dbf980 100644 --- a/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch @@ -87,7 +87,7 @@ index aad1420dc63c16b558ad1ca34accf8a7a9af6363..ac01d492872fde6df2b7113005457c71 version = getInt("config-version", 20); set("config-version", 20); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 98e3acdc618ceda35e8086746aed698d304321c0..5bef465bfe90b08524862b13f9e22dcf9e3438cd 100644 +index 5b6f3d811ff55d0c6d55bddc7707ef878baff782..04eb2af28f9843ef7641f5464d2a043c696de864 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -107,6 +107,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 6ab11c9b5b6139d917cf1b69430173f0222c6c8b..0d624d35a86f77cc710162c302270535126ad13d 100644 +index 27926559a665a5af14f11b8b4331cdb5f120eb41..83a3c8d8d15f5792f5618ab301e3c9ed1c1162cd 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -118,7 +118,7 @@ index 6ab11c9b5b6139d917cf1b69430173f0222c6c8b..0d624d35a86f77cc710162c302270535 private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1683,6 +1684,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1680,6 +1681,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public String locale = null; // CraftBukkit - lowercase // Paper - default to null public void a(PacketPlayInSettings packetplayinsettings) { diff --git a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 5ad6055e71..3076369002 100644 --- a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,7 +28,7 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0d624d35a86f77cc710162c302270535126ad13d..35c8e18a45dc4b461d6dd320e1235ec627662723 100644 +index 83a3c8d8d15f5792f5618ab301e3c9ed1c1162cd..b90d5fdd58ede1cf57e36b6f65ce259cf55615ba 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -104,6 +104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch index 86ca7e2063..17450b3744 100644 --- a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch @@ -18,7 +18,7 @@ index 0080a0cbe58d1a81c434ef97659428c8bf1ec290..eebd4c50a7324250d3ebe7060739a71a 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 c879e5d9acd400db5b7fdb770e5f8cc419e3bb23..228666eccfb924d2844c911e734eef4b0a6b3afa 100644 +index a0249d7a60c1381ebd7131d735a73fa2e9250543..561610ee1a99c781ccabd600812a0d10cd4ba785 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1326,7 +1326,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -31,7 +31,7 @@ index c879e5d9acd400db5b7fdb770e5f8cc419e3bb23..228666eccfb924d2844c911e734eef4b public void c(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 35c8e18a45dc4b461d6dd320e1235ec627662723..426c4105ba99c364c3d67f1b421e6b1218de9480 100644 +index b90d5fdd58ede1cf57e36b6f65ce259cf55615ba..658f5d8515db84a55d9cea092163feac596ea956 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -73,7 +73,7 @@ index 50163f7291474062bde81631c9220e8a9f5bb718..ebab6961b752ca0b1c1b28f85abb33c7 if (entityplayer != null) { this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1b9a089eddacbaf1a7d7e19478ee756b4ab601b2..4f37401909f1845d0f18aa497a6561b705e2fd14 100644 +index 6faa8764d19f3e58808de9dc84145f765c8958a8..22ded747e9e8683faa17924149f9b279752e47ea 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -69,6 +69,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 44301e1d96..44d9b275ba 100644 --- a/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,7 +7,7 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 228666eccfb924d2844c911e734eef4b0a6b3afa..465abc3d4fe2386aa57565e4441fac7f55e26924 100644 +index 561610ee1a99c781ccabd600812a0d10cd4ba785..f31f4fdecc824b27afefc79d1791a293227cbc9c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1754,9 +1754,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 0d28eca405..31694c8e52 100644 --- a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0469-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 465abc3d4fe2386aa57565e4441fac7f55e26924..3ff93f1498896ec1c92eb8273fb1e656a2cd8179 100644 +index f31f4fdecc824b27afefc79d1791a293227cbc9c..449a687399f38d3ef79685ff80531cf1212f054a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1910,11 +1910,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -34,7 +34,7 @@ index 465abc3d4fe2386aa57565e4441fac7f55e26924..3ff93f1498896ec1c92eb8273fb1e656 entityitem.defaultPickupDelay(); // CraftBukkit start -@@ -2559,6 +2560,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2565,6 +2566,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public Entity teleportTo(WorldServer worldserver, BlockPosition location) { // CraftBukkit end @@ -47,7 +47,7 @@ index 465abc3d4fe2386aa57565e4441fac7f55e26924..3ff93f1498896ec1c92eb8273fb1e656 if (this.world instanceof WorldServer && !this.dead) { this.world.getMethodProfiler().enter("changeDimension"); // CraftBukkit start -@@ -2662,7 +2669,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2668,7 +2675,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke entity.bukkitEntity = this.getBukkitEntity(); if (this instanceof EntityInsentient) { @@ -56,7 +56,7 @@ index 465abc3d4fe2386aa57565e4441fac7f55e26924..3ff93f1498896ec1c92eb8273fb1e656 } // CraftBukkit end } -@@ -2683,7 +2690,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2689,7 +2696,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean canPortal() { diff --git a/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch index e111f1e5b9..249dbea43f 100644 --- a/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch +++ b/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch @@ -69,7 +69,7 @@ index 4b6f45501106f49f118a93e5027734cdb7ff2727..fa0f247e51c20ea0e3cbaccbc8dbb2a1 public boolean hasPermission(int i) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4f37401909f1845d0f18aa497a6561b705e2fd14..26f659d0ab20bbe365419e8ff38214926e039e2a 100644 +index 22ded747e9e8683faa17924149f9b279752e47ea..daa066cbec8097b86f8b3c564e8134607e57b3cd 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -584,8 +584,12 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch index 789c796c62..744a212e97 100644 --- a/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 26f659d0ab20bbe365419e8ff38214926e039e2a..93536306c39c1ee574d45f39e8e40df3540c6e51 100644 +index daa066cbec8097b86f8b3c564e8134607e57b3cd..0ece15a8457debc7d8343c894b060e81be845488 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -697,7 +697,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0473-Expose-game-version.patch b/Spigot-Server-Patches/0473-Expose-game-version.patch index 67bfdaf5ed..3c954a2324 100644 --- a/Spigot-Server-Patches/0473-Expose-game-version.patch +++ b/Spigot-Server-Patches/0473-Expose-game-version.patch @@ -5,7 +5,7 @@ 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 3a46076a125bbfa19ca8a22dc5ab71fd024ab113..04164a0749fdef5a570cd37781090cddef90aeb1 100644 +index c06e5c2be056020a5954f25ecb4d185fe399e3f3..c2d70667b4ea98572dbcefc0ec3b801624783e1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -516,6 +516,13 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch index b7f7712a88..83099f36b2 100644 --- a/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch +++ b/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch @@ -13,7 +13,7 @@ it is triggering a massive movement velocity. This will ensure that the servers position is synchronized anytime player is teleported. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 93536306c39c1ee574d45f39e8e40df3540c6e51..681de2638eb606185077668d87340f7258e2ad90 100644 +index 0ece15a8457debc7d8343c894b060e81be845488..7fd991fd3994a18625c193aeb15ed521d3b6a447 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -501,6 +501,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch index 69ea61e20b..9585061b58 100644 --- a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch @@ -870,7 +870,7 @@ index 96f4401044cacf88e8e00b5b18821c105e634fba..112d8bab65bf41263a477c5faa717687 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 04164a0749fdef5a570cd37781090cddef90aeb1..9e4a67efff99301cceb796573a2cd1f3e0ec06cb 100644 +index c2d70667b4ea98572dbcefc0ec3b801624783e1f..b9291bc3c9c511d698e3a6478bb31562625c0466 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2305,5 +2305,11 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch index 4f5ccf8d37..86f8a28979 100644 --- a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3ff93f1498896ec1c92eb8273fb1e656a2cd8179..b11383b35662b1e59b89e916e55340cee2726944 100644 +index 449a687399f38d3ef79685ff80531cf1212f054a..3bbacebc3397f2c1d695f64bf3f4eb2b89b112b6 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -245,6 +245,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -44,7 +44,7 @@ index 9b89c0c8a3f1dada4e9b2aaeed0b92e56229b7ca..0c46297e6ff229538d77b2f481e4ab13 List list = this.tracker.getPassengers(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 57f7dfc6a5316cfec5cce9c60e7b91d94c505f50..735beaf6fa6e6ccf2137b64a0b5179ada2907011 100644 +index d9ed9df3021dab1f5ee0a51215a002253ac1e34c..b32d41fac5f855e302469209f368c3674b849fe3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1526,6 +1526,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 9eaf78095415f09073615db80a87b1fd93a126cc..1a88503a743202e1da7dd81b5501d7b48943b3db 100644 +index 2b7e7a7aaa56b9c51fa0c8065ff25828d92c09ee..5f9ab1b81c1440d9b3003fbbf7d00b135a6b811e 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -115,6 +115,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch index f6eb6134c5..5a56c03187 100644 --- a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,7 +10,7 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b108ce5affe48f06e69b0f0482e1333085ca7304..ab65eb18b0fec71cda5305414bf59239644fe9bb 100644 +index b32d41fac5f855e302469209f368c3674b849fe3..7c1c929819c450f853c91618b2853fcb424caa22 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -772,6 +772,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Mon, 29 Jun 2020 04:00:07 -0400 -Subject: [PATCH] Don't fire unleash/dismount events from worldgen threads - -Mojang can trigger this during worldgen and tries to fire bukkit events. - -diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 38887c1b7849926fab0a3b2db0e7b81388364172..2aa38528d78f2619317b96b1c944982b17f7160b 100644 ---- a/src/main/java/net/minecraft/server/Entity.java -+++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2117,7 +2117,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - // CraftBukkit start - CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); - Entity orig = craft == null ? null : craft.getHandle(); -- if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { -+ if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity && MCUtil.isMainThread()) { // Paper - VehicleExitEvent event = new VehicleExitEvent( - (Vehicle) getBukkitEntity(), - (LivingEntity) entity.getBukkitEntity(), !suppressCancellation // Paper -@@ -2132,7 +2132,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - // CraftBukkit end - // Spigot start - org.spigotmc.event.entity.EntityDismountEvent event = new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity(), !suppressCancellation); // Paper -- Bukkit.getPluginManager().callEvent(event); -+ if (MCUtil.isMainThread()) Bukkit.getPluginManager().callEvent(event); // Paper - if (event.isCancelled()) { - return false; - } -diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 605bbf0174e60f795e445193a0284739ea452946..301f1ae8820df24d7c8453335abc1934aa7fae43 100644 ---- a/src/main/java/net/minecraft/server/EntityInsentient.java -+++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1339,7 +1339,7 @@ public abstract class EntityInsentient extends EntityLiving { - boolean flag1 = super.a(entity, flag); - - if (flag1 && this.isLeashed()) { -- this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit -+ if (MCUtil.isMainThread()) this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit // Paper - this.unleash(true, true); - } - diff --git a/work/Bukkit b/work/Bukkit index 3c844f351a..42d5a714f4 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 3c844f351a81d1b9bce7a39e7055a933f10c9a96 +Subproject commit 42d5a714f434eb1324dfef1b38218d7e40c67644 diff --git a/work/CraftBukkit b/work/CraftBukkit index 32acc26217..7560f5f5a6 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 32acc2621791b5f38e71df1da1b43858bdeaa0e2 +Subproject commit 7560f5f5a69fc5fa17ec0c33eaba8abe026a53ef diff --git a/work/Spigot b/work/Spigot index ad703da04d..0287a20df3 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit ad703da04d2ffbf84a75e5ee32f2829380864bb7 +Subproject commit 0287a20df344c0bc462ddc64851e5a160a1775fc From bcab622e55726aba4bd5ca3e38dc67789b3edeab Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 30 Jun 2020 19:42:14 -0400 Subject: [PATCH 71/95] [Auto] Updated Upstream (CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: fdf6017fa Fix event for unlucky composts b567cb433 SPIGOT-5910: loadAdvancement does not work --- Spigot-Server-Patches/0004-MC-Utils.patch | 4 ++-- Spigot-Server-Patches/0009-Timings-v2.patch | 6 +++--- .../0018-Implement-Paper-VersionChecker.patch | 4 ++-- .../0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch | 4 ++-- .../0443-Add-Raw-Byte-ItemStack-Serialization.patch | 4 ++-- work/CraftBukkit | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index f5ae61c3e6..67a8714007 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -4685,10 +4685,10 @@ index 0000000000000000000000000000000000000000..49dc0c441b9dd7e7745cf15ced67f383 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -index 99a49ae13697940c2055f37df3c8c2e8383ecee9..7d66cc8e5e4a0f6710f12df8b75cc05bbc152c0b 100644 +index eb87f3720977e4e980d26e9cfd4fed0a808636dd..b6c39bf77e716addc9d2a1e915687bc770e937f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -@@ -188,4 +188,22 @@ public class DummyGeneratorAccess implements GeneratorAccess { +@@ -187,4 +187,22 @@ public class DummyGeneratorAccess implements GeneratorAccess { public boolean a(BlockPosition blockposition, boolean flag, Entity entity, int i) { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index db30bc9bf1..87714a6e32 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -2155,10 +2155,10 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae this.value = value; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index fbd533badfd2dc7cac1fe33a12b08b06bbd17179..94c28fe3dcf4f5a673f704e7b21be40b0cd6568e 100644 +index de168983ea04519c4951216621b3493245bd8383..b3b2ad576137d0383f43ec444f2353ecad3743d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -134,6 +134,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -137,6 +137,12 @@ public final class CraftMagicNumbers implements UnsafeValues { return CraftNamespacedKey.toMinecraft(mat.getKey()); } // ======================================================================== @@ -2171,7 +2171,7 @@ index fbd533badfd2dc7cac1fe33a12b08b06bbd17179..94c28fe3dcf4f5a673f704e7b21be40b public static byte toLegacyData(IBlockData data) { return CraftLegacy.toLegacyData(data); -@@ -303,6 +309,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -309,6 +315,13 @@ public final class CraftMagicNumbers implements UnsafeValues { return clazz; } diff --git a/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch b/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch index 504ca209aa..638e6c790e 100644 --- a/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch +++ b/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch @@ -126,10 +126,10 @@ index 0000000000000000000000000000000000000000..5deed3e25ff41ab0a4015a5fd0c1e952 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 94c28fe3dcf4f5a673f704e7b21be40b0cd6568e..820f338a32e73bbb8913c1a52a7c2a40d7d97324 100644 +index b3b2ad576137d0383f43ec444f2353ecad3743d9..b87b2eacc9a89c79d18c4c2168aca9f5ca953c81 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -314,6 +314,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -320,6 +320,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getTimingsServerName() { return com.destroystokyo.paper.PaperConfig.timingsServerName; } diff --git a/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch index c51ac82b6f..ab71bf1a62 100644 --- a/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch +++ b/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion() diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 820f338a32e73bbb8913c1a52a7c2a40d7d97324..997fdf363ee3e0610659b03e2f303d9f3e049000 100644 +index b87b2eacc9a89c79d18c4c2168aca9f5ca953c81..ac9105c23cbe36dfbebfff63e074065b8f472c0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -319,6 +319,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -325,6 +325,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { return new com.destroystokyo.paper.PaperVersionFetcher(); } diff --git a/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch index b19669d680..1bafe64951 100644 --- a/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch @@ -50,10 +50,10 @@ index f48b62af436de47484eb1cf496e97a29168586b0..c948e590eeff0aea53573532f8c507d6 DataOutputStream dataoutputstream = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(outputstream))); Throwable throwable = null; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 997fdf363ee3e0610659b03e2f303d9f3e049000..257f46003fc3203c67c029f3ddc73516cf02674f 100644 +index ac9105c23cbe36dfbebfff63e074065b8f472c0e..f1e60981abc46807f8004f0ac49127a2bb83fc42 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -324,6 +324,46 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -330,6 +330,46 @@ public final class CraftMagicNumbers implements UnsafeValues { public boolean isSupportedApiVersion(String apiVersion) { return apiVersion != null && SUPPORTED_API.contains(apiVersion); } diff --git a/work/CraftBukkit b/work/CraftBukkit index 7560f5f5a6..fdf6017fa9 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 7560f5f5a69fc5fa17ec0c33eaba8abe026a53ef +Subproject commit fdf6017fa9ea64ddcfa2f2a7d69cda824b381b38 From 7ce690f49e8e57a11d0737cb9258978634abd352 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 30 Jun 2020 20:07:16 -0400 Subject: [PATCH 72/95] [Auto] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e16de3bb SPIGOT-5906: Huge Fungi tree generation CraftBukkit Changes: a13b8cfc7 SPIGOT-5907: Item Frame NBT data disappears 5a6c52983 SPIGOT-5906: Huge Fungi tree generation --- ...063-Handle-Item-Meta-Inconsistencies.patch | 20 ++++++------- ...rovide-E-TE-Chunk-count-stat-methods.patch | 4 +-- ...PI-for-Reason-Source-Triggering-play.patch | 4 +-- ...mplement-ensureServerConversions-API.patch | 4 +-- .../0159-Implement-getI18NDisplayName.patch | 4 +-- .../0192-Add-ArmorStand-Item-Meta.patch | 6 ++-- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +-- ...Item-entities-with-World.spawnEntity.patch | 4 +-- .../0232-Expand-Explosions-API.patch | 4 +-- ...6-Implement-World.getEntity-UUID-API.patch | 4 +-- ...on-t-call-getItemMeta-on-hasItemMeta.patch | 6 ++-- ...ead-Entities-in-entityList-iteration.patch | 10 +++---- ...loadChunk-int-int-false-load-unconve.patch | 4 +-- ...-for-CanPlaceOn-and-CanDestroy-NBT-v.patch | 30 +++++++++---------- .../0301-Add-sun-related-API.patch | 4 +-- .../0352-Add-Heightmap-API.patch | 4 +-- ...360-improve-CraftWorld-isChunkLoaded.patch | 4 +-- ...le-Keep-Spawn-Loaded-range-per-world.patch | 4 +-- ...367-Fix-World-isChunkGenerated-calls.patch | 6 ++-- ...77-Asynchronous-chunk-IO-and-loading.patch | 6 ++-- ...hanging-entities-that-are-not-ItemFr.patch | 4 +-- ...hunkMap-memory-use-for-visibleChunks.patch | 10 +++---- ...No-Tick-view-distance-implementation.patch | 4 +-- ...k-Priority-Urgency-System-for-Chunks.patch | 4 +-- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 14 ++++----- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 27 files changed, 88 insertions(+), 88 deletions(-) diff --git a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch index 699055dfdb..3bd45408ae 100644 --- a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch @@ -79,7 +79,7 @@ index 76091ab3f149decc0d3c848b79edd24e20cf181d..a360711ea14983e8df34caa5edda80a0 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index f1c4ae9997d5d11d903360dbccf45f3c1df078bc..9e0db30c5f99164412e97a1cdd865ca254861a78 100644 +index ddd216f704c9d9bd835afbcfc67cb487dc8705f3..fee9cc0ee2c4f052e4dcfa5f2acc457a5b524a0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { @@ -194,7 +194,7 @@ index f1c4ae9997d5d11d903360dbccf45f3c1df078bc..9e0db30c5f99164412e97a1cdd865ca2 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c7544abf44ee 100644 +index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f91558c7e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -221,7 +221,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nonnull; -@@ -269,7 +272,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -270,7 +273,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private List lore; private Integer customModelData; private NBTTagCompound blockData; @@ -230,7 +230,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 private Multimap attributeModifiers; private int repairCost; private int hideFlag; -@@ -280,7 +283,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -281,7 +284,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private NBTTagCompound internalTag; @@ -239,7 +239,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only -@@ -301,7 +304,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -302,7 +305,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.blockData = meta.blockData; if (meta.enchantments != null) { // Spigot @@ -248,7 +248,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 } if (meta.hasAttributeModifiers()) { -@@ -397,13 +400,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -398,13 +401,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -264,7 +264,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 for (int i = 0; i < ench.size(); i++) { String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); -@@ -555,13 +558,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -556,13 +559,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -280,7 +280,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -813,14 +816,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -814,14 +817,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -297,7 +297,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1201,7 +1204,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1202,7 +1205,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -306,7 +306,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1430,4 +1433,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1431,4 +1434,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return HANDLED_TAGS; } } diff --git a/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch index d112ce4280..1c58ca5da7 100644 --- a/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 004c768d03e6fde2bcc32f39ba2a36ea2ab1e882..c791e4861163e0340fe3986ec5b7f6ed4900fa3b 100644 +index a6d892bab669d13767c43115cdbd99557181322d..ef3a539fd40555b1049131ee201569cabe2d6179 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -280,6 +280,48 @@ public class CraftWorld implements World { +@@ -281,6 +281,48 @@ public class CraftWorld implements World { private int waterAmbientSpawn = -1; private int ambientSpawn = -1; 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 d24e571f4c..2c38d50ee8 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 @@ -278,10 +278,10 @@ index ba42ca08ca61832cb07bebcfa0b1e5422d7b30e9..623cd63711c6cb79dce7a46056e193fd } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c791e4861163e0340fe3986ec5b7f6ed4900fa3b..802dd32711a429b06f082528c60dd55a170b2ae0 100644 +index ef3a539fd40555b1049131ee201569cabe2d6179..81f014977b95056020e9695dd49cbbf45d61b8ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1808,7 +1808,7 @@ public class CraftWorld implements World { +@@ -1817,7 +1817,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/0158-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch index 31e9a9564f..c04f64e2ce 100644 --- a/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 97a58900ac1622e84b8bed87004c7dd85067d31e..efa013a8bf91df0b71cbf01d2c1b1099ac616c57 100644 +index 9828f50e1bd851442be6e409d133354df870affd..cd60a6177739124ffa899ab03534c609d2a79573 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -326,4 +326,10 @@ public final class CraftItemFactory implements ItemFactory { +@@ -328,4 +328,10 @@ public final class CraftItemFactory implements ItemFactory { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { return ((CraftMetaItem) meta).updateMaterial(material); } diff --git a/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch index e2e3acd4e2..59cd5f37fe 100644 --- a/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch @@ -34,10 +34,10 @@ index ea7cb9943dc6da7a05e0841985eb1be4b6bc5169..c83ba9d9869f8ba51df17963d530536d public abstract boolean b(String s); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index efa013a8bf91df0b71cbf01d2c1b1099ac616c57..0d62f3ae939557b73c79792d6c2a0fd42513c8b8 100644 +index cd60a6177739124ffa899ab03534c609d2a79573..d56f8ca6ae9083d721c83b5ce10956b850af409d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -331,5 +331,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -333,5 +333,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch index 0c370ab224..5b74f56b1b 100644 --- a/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch @@ -267,10 +267,10 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..3723faccac00afe19e59d71008ba1604 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 5d14fff8050f43f5bd9036d5e8b8c7544abf44ee..153f4c31584e6968978ce4befd7db294cc44c16b 100644 +index 3192e4aa51f483f0d1e758eaa765c4f91558c7e8..15becd21768d85f2c16f19728aef13ba500c071e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1427,7 +1427,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1428,7 +1428,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaTropicalFishBucket.VARIANT.NBT, CraftMetaCrossbow.CHARGED.NBT, CraftMetaCrossbow.CHARGED_PROJECTILES.NBT, @@ -288,7 +288,7 @@ index 5d14fff8050f43f5bd9036d5e8b8c7544abf44ee..153f4c31584e6968978ce4befd7db294 } return HANDLED_TAGS; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index e4305ce522e1cec438baae50487d2a737c75051a..ba4cc98f1ec39ccfd433aeadf4b5c7018a1d40cc 100644 +index 7be77ab45c26121e2f4aa1e4a2678bcca838ee04..bd67599c0cb2a2a88b265ad1ea4231a285efff6d 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -6,6 +6,7 @@ import java.util.ArrayList; diff --git a/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch index a075e8a651..021a009a9a 100644 --- a/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -43,10 +43,10 @@ index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f 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 802dd32711a429b06f082528c60dd55a170b2ae0..03dbef19dce5626fb7810d62a996471921c1c207 100644 +index 81f014977b95056020e9695dd49cbbf45d61b8ea..0a280692e6dc6b0a9e47bfd12f70774d49628398 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2320,11 +2320,17 @@ public class CraftWorld implements World { +@@ -2329,11 +2329,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/0219-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0219-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 503f23e28f..0ef27ea3a3 100644 --- a/Spigot-Server-Patches/0219-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0219-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 03dbef19dce5626fb7810d62a996471921c1c207..f2748cdccfc11936118d4c2e03425286ca25e82f 100644 +index 0a280692e6dc6b0a9e47bfd12f70774d49628398..5b4afa9998c7e156353abe80e3ccc3efb4a2d390 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1490,6 +1490,10 @@ public class CraftWorld implements World { +@@ -1499,6 +1499,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/0232-Expand-Explosions-API.patch b/Spigot-Server-Patches/0232-Expand-Explosions-API.patch index 3ce512455a..a2adaddbef 100644 --- a/Spigot-Server-Patches/0232-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0232-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 f2748cdccfc11936118d4c2e03425286ca25e82f..89c8d3e6e6b7e1b1ac52aa2921e4dbf398ecb15a 100644 +index 5b4afa9998c7e156353abe80e3ccc3efb4a2d390..efb569b5add5dc7456665fccccc2396d7c3af046 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -882,6 +882,11 @@ public class CraftWorld implements World { +@@ -891,6 +891,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/0236-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0236-Implement-World.getEntity-UUID-API.patch index ebc742694e..277d25275b 100644 --- a/Spigot-Server-Patches/0236-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0236-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 89c8d3e6e6b7e1b1ac52aa2921e4dbf398ecb15a..5510281bef051280fb9495f21cade571d7547042 100644 +index efb569b5add5dc7456665fccccc2396d7c3af046..0bfe87fe4ff0fbb94a3339ab8f8d62ca32d659a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1296,6 +1296,15 @@ public class CraftWorld implements World { +@@ -1305,6 +1305,15 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch index 1b088a3837..9f4f30e4a6 100644 --- a/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index c6173133cc458fe5a5fe6f431ab79a9abb15101e..8af956955c8399cb62df8cbb4fc0ae6c87cdc187 100644 +index 459525b3f54e6fec104fe9532ce338feabc73598..85bda7229d22af2a012b9f6ab7bd3376182d4ef6 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -562,7 +562,7 @@ public final class CraftItemStack extends ItemStack { +@@ -564,7 +564,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { @@ -24,7 +24,7 @@ index c6173133cc458fe5a5fe6f431ab79a9abb15101e..8af956955c8399cb62df8cbb4fc0ae6c static boolean hasItemMeta(net.minecraft.server.ItemStack item) { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index ba4cc98f1ec39ccfd433aeadf4b5c7018a1d40cc..3504bcac57f973dc56f991d6006c06fa8de5c64b 100644 +index bd67599c0cb2a2a88b265ad1ea4231a285efff6d..8fdd6cfc3f698b41d0ac69360eb8660cd8444075 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -2,10 +2,9 @@ package org.bukkit.craftbukkit.inventory; diff --git a/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch index e0e758c997..2a7aba294b 100644 --- a/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -83,10 +83,10 @@ index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17cd847efc0 100644 +index 0bfe87fe4ff0fbb94a3339ab8f8d62ca32d659a0..265822138eee71daa1d6858adc17985d941d9d4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1032,6 +1032,7 @@ public class CraftWorld implements World { +@@ -1041,6 +1041,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 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17c Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1051,6 +1052,7 @@ public class CraftWorld implements World { +@@ -1060,6 +1061,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 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17c Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1077,6 +1079,7 @@ public class CraftWorld implements World { +@@ -1086,6 +1088,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { @@ -110,7 +110,7 @@ index 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17c Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { -@@ -1100,6 +1103,7 @@ public class CraftWorld implements World { +@@ -1109,6 +1112,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/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 5ce26aa815..9bc56a00d6 100644 --- a/Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/0283-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index aab5995ff53b75b9f5e9c74a4006f17cd847efc0..03c21f075ec1414503bb639f9deebb3298299d9a 100644 +index 265822138eee71daa1d6858adc17985d941d9d4c..2cc284b81d8ee17e19342a6cd849ff018c031a92 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -501,7 +501,7 @@ public class CraftWorld implements World { +@@ -502,7 +502,7 @@ public class CraftWorld implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index d658362532..44c230dbe9 100644 --- a/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -32,7 +32,7 @@ index b986a8e318733bdae766202bef93d4d25f18b58d..1f74602ff13a9f89c8dc40170353a79a this.s = this::l; if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d8f2063ca 100644 +index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8c3bcdd71 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -85,6 +85,12 @@ import org.bukkit.persistence.PersistentDataContainer; @@ -48,7 +48,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d /** * Children must include the following: * -@@ -266,6 +272,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -267,6 +273,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Specific(Specific.To.NBT) static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag"); static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues"); @@ -59,7 +59,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d private IChatBaseComponent displayName; private IChatBaseComponent locName; -@@ -278,6 +288,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -279,6 +289,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private int hideFlag; private boolean unbreakable; private int damage; @@ -70,7 +70,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d private static final Set HANDLED_TAGS = Sets.newHashSet(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); -@@ -315,6 +329,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -316,6 +330,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.hideFlag = meta.hideFlag; this.unbreakable = meta.unbreakable; this.damage = meta.damage; @@ -86,7 +86,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d this.unhandledTags.putAll(meta.unhandledTags); this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); -@@ -391,6 +414,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -392,6 +415,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { persistentDataContainer.put(key, compound.get(key)); } } @@ -118,7 +118,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d Set keys = tag.getKeys(); for (String key : keys) { -@@ -528,6 +576,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -529,6 +577,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { setDamage(damage); } @@ -153,7 +153,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d String internal = SerializableMeta.getString(map, "internal", true); if (internal != null) { ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal)); -@@ -656,6 +732,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -657,6 +733,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (hasDamage()) { itemTag.setInt(DAMAGE.NBT, damage); } @@ -177,7 +177,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d for (Map.Entry e : unhandledTags.entrySet()) { itemTag.set(e.getKey(), e.getValue()); -@@ -672,6 +765,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -673,6 +766,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -199,7 +199,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d NBTTagList createStringList(List list) { if (list == null || list.isEmpty()) { return null; -@@ -755,7 +863,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -756,7 +864,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -208,7 +208,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d } @Override -@@ -1155,7 +1263,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1156,7 +1264,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hideFlag == that.hideFlag) && (this.isUnbreakable() == that.isUnbreakable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) @@ -221,7 +221,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d } /** -@@ -1190,6 +1302,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1191,6 +1303,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (hasDamage() ? this.damage : 0); hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); hash = 61 * hash + version; @@ -232,7 +232,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d return hash; } -@@ -1214,6 +1330,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1215,6 +1331,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.unbreakable = this.unbreakable; clone.damage = this.damage; clone.version = this.version; @@ -247,7 +247,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1271,6 +1395,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1272,6 +1396,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { builder.put(DAMAGE.BUKKIT, damage); } @@ -272,7 +272,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d final Map internalTags = new HashMap(unhandledTags); serializeInternal(internalTags); if (!internalTags.isEmpty()) { -@@ -1434,7 +1576,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1435,7 +1577,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaArmorStand.NO_BASE_PLATE.NBT, CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SMALL.NBT, @@ -283,7 +283,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d // Paper end )); } -@@ -1459,4 +1603,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1460,4 +1604,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } // Paper end diff --git a/Spigot-Server-Patches/0301-Add-sun-related-API.patch b/Spigot-Server-Patches/0301-Add-sun-related-API.patch index bfeffc40f8..d2e9d34850 100644 --- a/Spigot-Server-Patches/0301-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0301-Add-sun-related-API.patch @@ -17,10 +17,10 @@ index 8a79302b9cc178bfe4e0909293e3a87c01d344ca..e0ecdb8f87ec82b97a056c8f6d91d6a8 if (this.world.isDay() && !this.world.isClientSide) { float f = this.aO(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 03c21f075ec1414503bb639f9deebb3298299d9a..52c3740d03a0dda9abfcf99785f5b8269c166c83 100644 +index 2cc284b81d8ee17e19342a6cd849ff018c031a92..f5660806b8162cd8c3a1072601f6d3a99d526cc4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -863,6 +863,13 @@ public class CraftWorld implements World { +@@ -872,6 +872,13 @@ public class CraftWorld implements World { } } diff --git a/Spigot-Server-Patches/0352-Add-Heightmap-API.patch b/Spigot-Server-Patches/0352-Add-Heightmap-API.patch index cc7a83a3e4..801197d3c1 100644 --- a/Spigot-Server-Patches/0352-Add-Heightmap-API.patch +++ b/Spigot-Server-Patches/0352-Add-Heightmap-API.patch @@ -20,10 +20,10 @@ index 3fc33d410e62fa8f86dd7f912e0ae483e48697f1..897069231f057bd977c382731d6b3d87 if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 52c3740d03a0dda9abfcf99785f5b8269c166c83..e488edef15a0dcb78cc3d8d53ecd93ba60e0d401 100644 +index f5660806b8162cd8c3a1072601f6d3a99d526cc4..4b9d33d51c82575ad65056e8d314a60ae0e5bb0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -341,6 +341,29 @@ public class CraftWorld implements World { +@@ -342,6 +342,29 @@ public class CraftWorld implements World { return getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING); } diff --git a/Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch index ac3c7e9261..2da82bf6d2 100644 --- a/Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch +++ b/Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch @@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query the chunk status and get a response now, vs having to wait diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e488edef15a0dcb78cc3d8d53ecd93ba60e0d401..ac3f9298b746d74fbec714dbcd4d0d32a6ed134c 100644 +index 4b9d33d51c82575ad65056e8d314a60ae0e5bb0b..3549404ec211e88f6d91bdcf07c661e2d2ac4875 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -407,13 +407,13 @@ public class CraftWorld implements World { +@@ -408,13 +408,13 @@ public class CraftWorld implements World { @Override public boolean isChunkLoaded(int x, int z) { diff --git a/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 62aa3501f7..862cfa085b 100644 --- a/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -198,10 +198,10 @@ index a243dc63eb4c811065c742e61b334864ad582fbe..e8382aabb36f58c55ba47e6495d47af5 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ac3f9298b746d74fbec714dbcd4d0d32a6ed134c..152bba7658cc34d2bdd75be0d8f546459fb42e88 100644 +index 3549404ec211e88f6d91bdcf07c661e2d2ac4875..29d88bf1a8c5272822dd26e5e93d102748d9abf2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1940,15 +1940,21 @@ public class CraftWorld implements World { +@@ -1949,15 +1949,21 @@ public class CraftWorld implements World { @Override public void setKeepSpawnInMemory(boolean keepLoaded) { diff --git a/Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch index 03ff86776f..63970da835 100644 --- a/Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch @@ -279,7 +279,7 @@ index 02bd568af727633a6e834d5328683a9ff67b9dd7..341689ac996164b7b53e095495b92b6e throwable = throwable1; throw throwable1; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 152bba7658cc34d2bdd75be0d8f546459fb42e88..8e6b5765bb2a067bcd0b38a3abb28c92ad04f272 100644 +index 29d88bf1a8c5272822dd26e5e93d102748d9abf2..412dc3865dfee606c37c06daefeacc6ed14ced7b 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; @@ -290,7 +290,7 @@ index 152bba7658cc34d2bdd75be0d8f546459fb42e88..8e6b5765bb2a067bcd0b38a3abb28c92 import java.util.function.Predicate; import java.util.stream.Collectors; import net.minecraft.server.ArraySetSorted; -@@ -412,8 +413,22 @@ public class CraftWorld implements World { +@@ -413,8 +414,22 @@ public class CraftWorld implements World { @Override public boolean isChunkGenerated(int x, int z) { @@ -314,7 +314,7 @@ index 152bba7658cc34d2bdd75be0d8f546459fb42e88..8e6b5765bb2a067bcd0b38a3abb28c92 } catch (IOException ex) { throw new RuntimeException(ex); } -@@ -524,20 +539,49 @@ public class CraftWorld implements World { +@@ -525,20 +540,49 @@ public class CraftWorld implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch index f2a4002092..1eedcdea56 100644 --- a/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch @@ -3998,7 +3998,7 @@ index 4529ccc02f53fadc6ac2df97682b21913487bc22..85b73e65a4c1af052e75473bc239d91d } 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 8e6b5765bb2a067bcd0b38a3abb28c92ad04f272..ee44171831350c7baf868b74ed9d5b8bf3ed6d4a 100644 +index 412dc3865dfee606c37c06daefeacc6ed14ced7b..310c4446734a7ebfadf0cbd74d1cfcee20ef3668 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; @@ -4009,7 +4009,7 @@ index 8e6b5765bb2a067bcd0b38a3abb28c92ad04f272..ee44171831350c7baf868b74ed9d5b8b import net.minecraft.server.MovingObjectPosition; import net.minecraft.server.PacketPlayOutCustomSoundEffect; import net.minecraft.server.PacketPlayOutUpdateTime; -@@ -557,22 +558,23 @@ public class CraftWorld implements World { +@@ -558,22 +559,23 @@ public class CraftWorld implements World { return true; } @@ -4041,7 +4041,7 @@ index 8e6b5765bb2a067bcd0b38a3abb28c92ad04f272..ee44171831350c7baf868b74ed9d5b8b // fall through to load // we do this so we do not re-read the chunk data on disk -@@ -2470,6 +2472,34 @@ public class CraftWorld implements World { +@@ -2479,6 +2481,34 @@ public class CraftWorld implements World { public DragonBattle getEnderDragonBattle() { return (getHandle().getDragonBattle() == null) ? null : new CraftDragonBattle(getHandle().getDragonBattle()); } diff --git a/Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch index 0e9fba9026..1635ff96f0 100644 --- a/Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch +++ b/Spigot-Server-Patches/0390-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 ee44171831350c7baf868b74ed9d5b8bf3ed6d4a..60e3a7422045148447a45685f66ed0ebb5172bf6 100644 +index 310c4446734a7ebfadf0cbd74d1cfcee20ef3668..080f600008ce1cba12c2bfe07e014e8adb7b7b2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1861,7 +1861,12 @@ public class CraftWorld implements World { +@@ -1870,7 +1870,12 @@ public class CraftWorld implements World { height = 9; } diff --git a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index bc607cccc9..a23ddfcac4 100644 --- a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -243,7 +243,7 @@ index 6ac39fc6cafdcbf7883e868ecb58a2ebfad41601..bb4d54ebee573964cf3026888da10858 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 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435d26202f9 100644 +index 080f600008ce1cba12c2bfe07e014e8adb7b7b2b..3ec021746ffaea89f09126538fcaa0555872ac17 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -73,6 +73,7 @@ import net.minecraft.server.GameRules; @@ -254,7 +254,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435 import net.minecraft.server.MinecraftKey; import net.minecraft.server.MinecraftServer; import net.minecraft.server.MovingObjectPosition; -@@ -293,6 +294,7 @@ public class CraftWorld implements World { +@@ -294,6 +295,7 @@ public class CraftWorld implements World { return ret; } public int getTileEntityCount() { @@ -262,7 +262,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435 // We don't use the full world tile entity list, so we must iterate chunks Long2ObjectLinkedOpenHashMap chunks = world.getChunkProvider().playerChunkMap.visibleChunks; int size = 0; -@@ -304,11 +306,13 @@ public class CraftWorld implements World { +@@ -305,11 +307,13 @@ public class CraftWorld implements World { size += chunk.tileEntities.size(); } return size; @@ -276,7 +276,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435 int ret = 0; for (PlayerChunk chunkHolder : world.getChunkProvider().playerChunkMap.visibleChunks.values()) { -@@ -317,7 +321,7 @@ public class CraftWorld implements World { +@@ -318,7 +322,7 @@ public class CraftWorld implements World { } } @@ -285,7 +285,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435 } public int getPlayerCount() { return world.players.size(); -@@ -437,6 +441,14 @@ public class CraftWorld implements World { +@@ -438,6 +442,14 @@ public class CraftWorld implements World { @Override public Chunk[] getLoadedChunks() { diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index 5ffa87af97..2c4d00dddd 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -617,10 +617,10 @@ index 365539e53efdb7e729b580f52fb23659cbde4f0a..ba50189b10b54f5b35448c898f8c3495 if (!this.isClientSide && (i & 1) != 0) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5fb4f31693f1214617e43228450d2435d26202f9..8a37871bea36bd34b514428acea1acad2ba5897e 100644 +index 3ec021746ffaea89f09126538fcaa0555872ac17..11559f9e4b3f5fda6bfe4f70f963ce4f7967f051 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2521,10 +2521,39 @@ public class CraftWorld implements World { +@@ -2530,10 +2530,39 @@ public class CraftWorld implements World { // Spigot start @Override public int getViewDistance() { diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index a539e0cf76..dfed387632 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1208,10 +1208,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 8a37871bea36bd34b514428acea1acad2ba5897e..b973bd8f60412232df53ac52d97135de6a6f083b 100644 +index 11559f9e4b3f5fda6bfe4f70f963ce4f7967f051..bf2f602bb07aa4c7c0a22ad9be9e77d7fd017191 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2511,6 +2511,10 @@ public class CraftWorld implements World { +@@ -2520,6 +2520,10 @@ public class CraftWorld implements World { return future; } diff --git a/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index a1b9099b88..f744757a79 100644 --- a/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -44,10 +44,10 @@ index f408ef0d488d3f602d9254394c6e2e8ecce2f944..3bbc2d78b38f3e6353e80c7d99c16bef 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 b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed552ba8bd8 100644 +index bf2f602bb07aa4c7c0a22ad9be9e77d7fd017191..724c0816d89b0261edf65e1b8459988bd0d5d4d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -401,9 +401,22 @@ public class CraftWorld implements World { +@@ -402,9 +402,22 @@ public class CraftWorld implements World { @Override public Chunk getChunkAt(int x, int z) { @@ -71,7 +71,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5 @Override public Chunk getChunkAt(Block block) { Preconditions.checkArgument(block != null, "null block"); -@@ -477,7 +490,7 @@ public class CraftWorld implements World { +@@ -478,7 +491,7 @@ public class CraftWorld implements World { public boolean unloadChunkRequest(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot if (isChunkLoaded(x, z)) { @@ -80,7 +80,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5 } return true; -@@ -554,10 +567,12 @@ public class CraftWorld implements World { +@@ -555,10 +568,12 @@ public class CraftWorld implements World { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot // Paper start - Optimize this method ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z); @@ -94,7 +94,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5 if (immediate == null) { immediate = world.getChunkProvider().playerChunkMap.getUnloadingChunk(x, z); } -@@ -565,7 +580,7 @@ public class CraftWorld implements World { +@@ -566,7 +581,7 @@ public class CraftWorld implements World { if (!(immediate instanceof ProtoChunkExtension) && !(immediate instanceof net.minecraft.server.Chunk)) { return false; // not full status } @@ -103,7 +103,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5 world.getChunkAt(x, z); // make sure we're at ticket level 32 or lower return true; } -@@ -592,7 +607,7 @@ public class CraftWorld implements World { +@@ -593,7 +608,7 @@ public class CraftWorld implements World { // we do this so we do not re-read the chunk data on disk } @@ -112,7 +112,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5 world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -2517,6 +2532,7 @@ public class CraftWorld implements World { +@@ -2526,6 +2541,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/work/Bukkit b/work/Bukkit index 42d5a714f4..e16de3bb16 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 42d5a714f434eb1324dfef1b38218d7e40c67644 +Subproject commit e16de3bb167910ba20339d2cb5f5c798827f196a diff --git a/work/CraftBukkit b/work/CraftBukkit index fdf6017fa9..a13b8cfc71 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit fdf6017fa9ea64ddcfa2f2a7d69cda824b381b38 +Subproject commit a13b8cfc71be4eb2c7880024a1ae191bbfd51131 From f5265d6688244a2bb398a4b6d7e184b3c9410b01 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 02:11:46 -0400 Subject: [PATCH 73/95] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 6ff65c82 SPIGOT-5908: CompassMeta for new lodestone compass data CraftBukkit Changes: 3b9cf0f8 Improve code formatting 008f039f SPIGOT-5913: MOTD no longer supports new line character b8b65eb7 SPIGOT-5908: CompassMeta for new lodestone compass data Spigot Changes: 4d9262cf Rebuild patches d27f7952 SPIGOT-5912: Outdated client message shows outdated server message --- Spigot-Server-Patches/0004-MC-Utils.patch | 2 +- Spigot-Server-Patches/0009-Timings-v2.patch | 2 +- ...figurable-baby-zombie-movement-speed.patch | 2 +- .../0020-Player-affects-spawning-API.patch | 2 +- ...024-Only-refresh-abilities-if-needed.patch | 2 +- .../0048-Player-Tab-List-and-Title-APIs.patch | 2 +- ...ble-inter-world-teleportation-safety.patch | 2 +- .../0058-Complete-resource-pack-API.patch | 2 +- ...063-Handle-Item-Meta-Inconsistencies.patch | 20 +++++----- ...th-absorb-values-and-repair-bad-data.patch | 2 +- ...nd-for-setting-passengers-on-players.patch | 2 +- ...ent-to-allow-plugins-to-handle-clien.patch | 2 +- ...91-Implement-PlayerLocaleChangeEvent.patch | 2 +- .../0131-String-based-Action-Bar-API.patch | 2 +- ...mplement-ensureServerConversions-API.patch | 4 +- .../0159-Implement-getI18NDisplayName.patch | 4 +- ...nt-protocol-version-and-virtual-host.patch | 4 +- ...5-Ability-to-apply-mending-to-XP-API.patch | 2 +- .../0192-Add-ArmorStand-Item-Meta.patch | 22 +++++----- ...nt-extended-PaperServerListPingEvent.patch | 2 +- .../0202-Player.setPlayerProfile-API.patch | 2 +- ...08-Flag-to-disable-the-channel-limit.patch | 2 +- ...0221-ItemStack-getMaxItemUseDuration.patch | 2 +- .../0237-InventoryCloseEvent-Reason-API.patch | 2 +- .../0255-EntityTransformedEvent.patch | 2 +- ...on-t-call-getItemMeta-on-hasItemMeta.patch | 6 +-- ...e-attack-cooldown-methods-for-Player.patch | 2 +- .../0286-Improve-death-events.patch | 2 +- ...-for-CanPlaceOn-and-CanDestroy-NBT-v.patch | 40 +++++++++---------- ...ble-connection-throttle-kick-message.patch | 2 +- .../0323-Add-more-Zombie-API.patch | 2 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 2 +- ...-remove-from-being-called-on-Players.patch | 2 +- ...st-tick-at-start-of-drowning-process.patch | 2 +- ...layer-View-Distance-API-placeholders.patch | 2 +- ...-chance-of-villager-zombie-infection.patch | 2 +- ...-Implement-Player-Client-Options-API.patch | 2 +- ...-brigadier-child-sorting-performance.patch | 6 +-- ...k-Priority-Urgency-System-for-Chunks.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 42 files changed, 85 insertions(+), 89 deletions(-) diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 67a8714007..0b50f875e5 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -4459,7 +4459,7 @@ index bd6dfddb3c076cf92588dd508975db0eee5c2962..d643ff0a0ae9d45711c9a40fc12af681 private final MinecraftServer server; public final WorldDataServer worldDataServer; // CraftBukkit - type diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 6a797a0ac8ca3f120eea5bd9c54de21a4f38b257..f1c4ae9997d5d11d903360dbccf45f3c1df078bc 100644 +index dd83cc2cc580b997a9b4f8f8b6e1176cb45e9610..3bdaca5fd461b4923c857b236472dd98d23f43a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 87714a6e32..efad0fe334 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1963,7 +1963,7 @@ 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 c5216d62660631f54d50575c30717f4052c10f8f..661c8b3c81be46ef2c9488bb52d1963c7f0e89e2 100644 +index aef9854bef327d5eb9513f486e6a05c65f2a6ee7..110b3d8aeae9b9443e4e59d456603eb9cb858583 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1757,6 +1757,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch index 7c4a0b52ac..334c3d9cc9 100644 --- a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch @@ -25,7 +25,7 @@ index 098bd3fba867c0e4c6c58748aa6e2e632737a948..912611cf1aeccf5a82a789aab07d7672 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 5bc0a591ab359785e46648604000eac116e7e37e..b808477cea6bf704edfaf08a2d0366bf263e69aa 100644 +index 4b924ce42c9440c06c8c4f04dd4262289cfee6b7..951cf5546af11434971a26dca15c20c25e6c555e 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -21,7 +21,7 @@ import org.bukkit.event.entity.EntityTransformEvent; diff --git a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch index eecc42f3de..62f891885b 100644 --- a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch @@ -119,7 +119,7 @@ index 4f7dc23d67e97f9a2b8983750299fc43b0ed6db9..a4a48dbee002e96a5644d9a033f9f233 public void c() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 661c8b3c81be46ef2c9488bb52d1963c7f0e89e2..032b1ac672a604691c625e43008927e3a68d2160 100644 +index 110b3d8aeae9b9443e4e59d456603eb9cb858583..32f55645c14d5f25235a2e1efbbc8260bf1972f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1669,7 +1669,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch index 56f24685d9..5b59e2f9e9 100644 --- a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 032b1ac672a604691c625e43008927e3a68d2160..a39b11bb15e15c17e4617d3ef212845f8fe87a38 100644 +index 32f55645c14d5f25235a2e1efbbc8260bf1972f7..b2f9f4e9350cde9c79801b83e43c181c31f90131 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1355,12 +1355,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch index 85a52b1a18..a10f901486 100644 --- a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch @@ -52,7 +52,7 @@ index 3a6e780007bc1b1fa799166daa01d3a9e15c7ab0..535056c64ef866e645b1bfbd149b50c5 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a39b11bb15e15c17e4617d3ef212845f8fe87a38..d4c919288d6f926938fb67a2085eabb635907cda 100644 +index b2f9f4e9350cde9c79801b83e43c181c31f90131..fea541b287d3d4bd4a79d5058685cbd8d02768a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch index 3879aa458b..4d4d307eff 100644 --- a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch @@ -30,7 +30,7 @@ index cd47a4ca069df26969de3051c2aac80540093818..abbf59bb91021821876a8960e8f77fac + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d4c919288d6f926938fb67a2085eabb635907cda..e89de0309c7e9fa406a9507785dcfcb6ba0167d7 100644 +index fea541b287d3d4bd4a79d5058685cbd8d02768a5..0f6d0c078c1280676dcd0be2c7c61942109fb822 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -762,7 +762,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch index 836a284a8f..efc340fa14 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch @@ -22,7 +22,7 @@ index 8ecca907357119ed8eb67381914daba4ae6db38f..ffed0587323dbf522e478f43948bbb03 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e89de0309c7e9fa406a9507785dcfcb6ba0167d7..1476ea7fde24bbc659b7cd7e0b8244306ab6b24a 100644 +index 0f6d0c078c1280676dcd0be2c7c61942109fb822..9ff3e95210322829342c1d9f9ad94edeae731ca2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -136,6 +136,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch index 3bd45408ae..8313c44c6e 100644 --- a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch @@ -79,7 +79,7 @@ index 76091ab3f149decc0d3c848b79edd24e20cf181d..a360711ea14983e8df34caa5edda80a0 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index ddd216f704c9d9bd835afbcfc67cb487dc8705f3..fee9cc0ee2c4f052e4dcfa5f2acc457a5b524a0b 100644 +index 3bdaca5fd461b4923c857b236472dd98d23f43a0..5f968e8988c3bd20c0f0c078c8f4038630098c8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { @@ -194,7 +194,7 @@ index ddd216f704c9d9bd835afbcfc67cb487dc8705f3..fee9cc0ee2c4f052e4dcfa5f2acc457a static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f91558c7e8 100644 +index be74b465dd94a79fdfc8fdc236b4fc7b59424499..be39fbc1433e03e2f0e562095fea590691d7a062 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -221,7 +221,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nonnull; -@@ -270,7 +273,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -271,7 +274,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private List lore; private Integer customModelData; private NBTTagCompound blockData; @@ -230,7 +230,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 private Multimap attributeModifiers; private int repairCost; private int hideFlag; -@@ -281,7 +284,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -282,7 +285,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private NBTTagCompound internalTag; @@ -239,7 +239,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only -@@ -302,7 +305,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -303,7 +306,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.blockData = meta.blockData; if (meta.enchantments != null) { // Spigot @@ -248,7 +248,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 } if (meta.hasAttributeModifiers()) { -@@ -398,13 +401,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -399,13 +402,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -264,7 +264,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 for (int i = 0; i < ench.size(); i++) { String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); -@@ -556,13 +559,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -557,13 +560,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -280,7 +280,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -814,14 +817,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -815,14 +818,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -297,7 +297,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1202,7 +1205,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1203,7 +1206,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -306,7 +306,7 @@ index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f9 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1431,4 +1434,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1435,4 +1438,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return HANDLED_TAGS; } } diff --git a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 2e333e5054..3b7b299153 100644 --- a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,7 +44,7 @@ index f1080e7d10d5105e3f4010489393f6150c7c4a75..374e4a3dcb656d6a84e05bb9260d3198 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1476ea7fde24bbc659b7cd7e0b8244306ab6b24a..9f358b46e5d34ad288205f1155c6183b457a3225 100644 +index 9ff3e95210322829342c1d9f9ad94edeae731ca2..1f4ad48dc8299681c7231c126cc59c1a1bca99f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1590,6 +1590,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch index 14d58ffd60..3b7d94edc2 100644 --- a/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9f358b46e5d34ad288205f1155c6183b457a3225..41a73db6040af29c9e087ac2ca425f5d28d0142a 100644 +index 1f4ad48dc8299681c7231c126cc59c1a1bca99f3..051ba43e9ed9afe77b74ffbede44def35601afc9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -771,6 +771,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index 6b8655969d..bd37493f36 100644 --- a/Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index bb54632f5036cf6eeaf7d0a08d2b7f57fad3e360..a3b48376b92aee548ec28eec1cdc978925b96df0 100644 +index ba4e3177180f79b865140f29b6cb25156f9e96b1..c0e3d18b0a528d6bca878f354bf8b4b417522c29 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -14,7 +14,7 @@ public class HandshakeListener implements PacketHandshakingInListener { diff --git a/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch index d749631905..e0cd8b66dd 100644 --- a/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch @@ -40,7 +40,7 @@ index 7eb56761d9073156b30d4c981dcd4b4ba646f0bc..ab89e508ee8b8142fb7c0b5101b0b0e1 this.cg = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 41a73db6040af29c9e087ac2ca425f5d28d0142a..43b50d56f87a1ac52eae1529875834ab85733aa4 100644 +index 051ba43e9ed9afe77b74ffbede44def35601afc9..1a7b9325108342cfbb781665ff1bf3ee3056bc9b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1776,8 +1776,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch index 4f04a64c28..0fbf31fcfb 100644 --- a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch @@ -18,7 +18,7 @@ index 275c1d2d1eb2649de9a9b5aece6e88c21362efba..d72ba7f76c42fd525a5b59a999a0c08e public static Collector, ?, Map> a() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 43b50d56f87a1ac52eae1529875834ab85733aa4..a490d6330474a77d81a0e25ac74ea36c183e7cf0 100644 +index 1a7b9325108342cfbb781665ff1bf3ee3056bc9b..8776cfb8b5eda0b407af031747688e582c0c2bff 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -219,6 +219,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch index c04f64e2ce..dc7dcc48af 100644 --- a/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 9828f50e1bd851442be6e409d133354df870affd..cd60a6177739124ffa899ab03534c609d2a79573 100644 +index 17bbeeefa3fc4eeea3df25833d1a6afc00f4be7a..fda97db7227bc9aeb89a3b3b9feed1ee5b8f5a5f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -328,4 +328,10 @@ public final class CraftItemFactory implements ItemFactory { +@@ -330,4 +330,10 @@ public final class CraftItemFactory implements ItemFactory { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { return ((CraftMetaItem) meta).updateMaterial(material); } diff --git a/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch index 59cd5f37fe..5dc388de6c 100644 --- a/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch @@ -34,10 +34,10 @@ index ea7cb9943dc6da7a05e0841985eb1be4b6bc5169..c83ba9d9869f8ba51df17963d530536d public abstract boolean b(String s); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index cd60a6177739124ffa899ab03534c609d2a79573..d56f8ca6ae9083d721c83b5ce10956b850af409d 100644 +index fda97db7227bc9aeb89a3b3b9feed1ee5b8f5a5f..c28691ae6b5c66772577003789a25d27678aa4c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -333,5 +333,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -335,5 +335,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch index 67bef8099a..e9b9459219 100644 --- a/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch @@ -61,7 +61,7 @@ index 0000000000000000000000000000000000000000..5caca6439d2135e34880d501397fe2ea + +} diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index a3b48376b92aee548ec28eec1cdc978925b96df0..8049f54f049122b065ea30e7e831c33486a83b7e 100644 +index c0e3d18b0a528d6bca878f354bf8b4b417522c29..12fb251dc96bf179e393046ecc256ea80fdd79de 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -133,6 +133,10 @@ public class HandshakeListener implements PacketHandshakingInListener { @@ -103,7 +103,7 @@ index 4f008e4723d2cb0bcabb2d5621203d63c40c4923..8545146fb1f093f821e3b966d9337049 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a490d6330474a77d81a0e25ac74ea36c183e7cf0..626ef32032eb6327baa92c363ce6bb4705b6b5f1 100644 +index 8776cfb8b5eda0b407af031747688e582c0c2bff..cc920cb20a7c1c77257e0219137775b362dfe602 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -186,6 +186,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch index 1c4c46e459..8d0b0167af 100644 --- a/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch @@ -43,7 +43,7 @@ index e7fb982913f391bafd608c4626086cd9cab7fad7..7f2d8de12473c5413bbfc10ea0947d6a return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 626ef32032eb6327baa92c363ce6bb4705b6b5f1..f27fb59e752d25807859396560b213162870998e 100644 +index cc920cb20a7c1c77257e0219137775b362dfe602..0857e46a3b1e5cfa59907f092d0b174745c2c558 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1058,8 +1058,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch index 5b74f56b1b..8e064b2844 100644 --- a/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch @@ -13,7 +13,7 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java -index f700522840ee0dfd90871b1b0c8973d7d62a9353..3723faccac00afe19e59d71008ba1604fc9d8630 100644 +index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed44303875fe31f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -8,13 +8,39 @@ import org.bukkit.Material; @@ -41,7 +41,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..3723faccac00afe19e59d71008ba1604 CraftMetaArmorStand(CraftMetaItem meta) { super(meta); -+ ++ + // Paper start + if (!(meta instanceof CraftMetaArmorStand)) { + return; @@ -267,28 +267,26 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..3723faccac00afe19e59d71008ba1604 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 3192e4aa51f483f0d1e758eaa765c4f91558c7e8..15becd21768d85f2c16f19728aef13ba500c071e 100644 +index be39fbc1433e03e2f0e562095fea590691d7a062..c0858aeac0c9709a79590a0ca8db32d64efe7523 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1428,7 +1428,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - CraftMetaTropicalFishBucket.VARIANT.NBT, +@@ -1430,6 +1430,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaCrossbow.CHARGED.NBT, CraftMetaCrossbow.CHARGED_PROJECTILES.NBT, -- CraftMetaSuspiciousStew.EFFECTS.NBT -+ CraftMetaSuspiciousStew.EFFECTS.NBT, + CraftMetaSuspiciousStew.EFFECTS.NBT, + // Paper start + CraftMetaArmorStand.ENTITY_TAG.NBT, + CraftMetaArmorStand.INVISIBLE.NBT, + CraftMetaArmorStand.NO_BASE_PLATE.NBT, + CraftMetaArmorStand.SHOW_ARMS.NBT, + CraftMetaArmorStand.SMALL.NBT, -+ CraftMetaArmorStand.MARKER.NBT ++ CraftMetaArmorStand.MARKER.NBT, + // Paper end - )); - } - return HANDLED_TAGS; + CraftMetaCompass.LODESTONE_DIMENSION.NBT, + CraftMetaCompass.LODESTONE_POS.NBT, + CraftMetaCompass.LODESTONE_TRACKED.NBT diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index 7be77ab45c26121e2f4aa1e4a2678bcca838ee04..bd67599c0cb2a2a88b265ad1ea4231a285efff6d 100644 +index a33cb37f934f74865c49dd3fd483cf4ca5de85cf..ddbcbd565d5dcb5b1c8d46558e06887e85d589c5 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -6,6 +6,7 @@ import java.util.ArrayList; diff --git a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch index e11e55d8f1..5f5a55be28 100644 --- a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch @@ -200,7 +200,7 @@ index 5a5fc0626562d46f1ea6ce3e779e75de55611548..1698b42ed56a2932c5c1d60c655c9fd4 for (int k = 0; k < agameprofile.length; ++k) { diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index d38de25d71ba1eb405e34ba2b04a2cfbccd637cc..ee18dc3fa2d0beeccbe1539573cce433f87566b8 100644 +index 055555cb5ce63d41cb9a7f4114341b0685879b9e..9beb6fad228ccb3081b661c845836f4f29404d86 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -35,6 +35,8 @@ public class PacketStatusListener implements PacketStatusInListener { diff --git a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch index 7e1c2e2064..43ddca716a 100644 --- a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f27fb59e752d25807859396560b213162870998e..66aee62230132d421583ea7c0d99b6f3a462cd7d 100644 +index 0857e46a3b1e5cfa59907f092d0b174745c2c558..04d6c2160aa13a8158cd4a3cffa9e1d2d5addb08 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ diff --git a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch index 173548176d..bfbcfea2b4 100644 --- a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 66aee62230132d421583ea7c0d99b6f3a462cd7d..04d3034148434cd17549018ce337e47c408d1e02 100644 +index 04d6c2160aa13a8158cd4a3cffa9e1d2d5addb08..6270010f04a51c3bc5d434e617eb755daba59cb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch index 5f505e3bad..3c9607ce52 100644 --- a/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch @@ -18,7 +18,7 @@ index c4d034c6a6ff176bc954c00c328512bdf67455a6..7b2010ec4955fb5788c60178c6e306ea return this.getItem().e_(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 9e0db30c5f99164412e97a1cdd865ca254861a78..c6173133cc458fe5a5fe6f431ab79a9abb15101e 100644 +index 5f968e8988c3bd20c0f0c078c8f4038630098c8c..1c96af7b25f5ba4eae3df53663ee9bebb6f190fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -174,6 +174,13 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index 6a33d4e8b0..ac6091e411 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -155,7 +155,7 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 04d3034148434cd17549018ce337e47c408d1e02..a0fae649733f2cd02ed1df713b43aa1d3a037ef1 100644 +index 6270010f04a51c3bc5d434e617eb755daba59cb4..b40666d74c88e1af8ff126c780f17b357a2ab86b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0255-EntityTransformedEvent.patch b/Spigot-Server-Patches/0255-EntityTransformedEvent.patch index b1f90ec94d..a48a90a43a 100644 --- a/Spigot-Server-Patches/0255-EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/0255-EntityTransformedEvent.patch @@ -41,7 +41,7 @@ index 00183a7f6e2000ce045ce50454f1296c4c93b148..a23c8d54a30a1ed1a3ed4d158da08229 // CraftBukkit end this.die(); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index b808477cea6bf704edfaf08a2d0366bf263e69aa..3f16f9b34a75db6dc977cb0dc1603db34dd8ddc3 100644 +index 951cf5546af11434971a26dca15c20c25e6c555e..bb7f62fa52b758ed83db7def9053b79da3d97dcd 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -399,6 +399,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch index 9f4f30e4a6..47fbd66565 100644 --- a/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 459525b3f54e6fec104fe9532ce338feabc73598..85bda7229d22af2a012b9f6ab7bd3376182d4ef6 100644 +index 1c96af7b25f5ba4eae3df53663ee9bebb6f190fe..b64bbe750717330e3b81028e6efacf15afc70b28 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -564,7 +564,7 @@ public final class CraftItemStack extends ItemStack { +@@ -566,7 +566,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { @@ -24,7 +24,7 @@ index 459525b3f54e6fec104fe9532ce338feabc73598..85bda7229d22af2a012b9f6ab7bd3376 static boolean hasItemMeta(net.minecraft.server.ItemStack item) { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index bd67599c0cb2a2a88b265ad1ea4231a285efff6d..8fdd6cfc3f698b41d0ac69360eb8660cd8444075 100644 +index ddbcbd565d5dcb5b1c8d46558e06887e85d589c5..b0edd62eb9066d145cfc52272c71d5f00b7e928d 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -2,10 +2,9 @@ package org.bukkit.craftbukkit.inventory; diff --git a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index 70615fba7c..7ac08850e1 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch @@ -27,7 +27,7 @@ index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a0fae649733f2cd02ed1df713b43aa1d3a037ef1..90acd5e77d5930d589a2f29523b2d2e2850f3f1f 100644 +index b40666d74c88e1af8ff126c780f17b357a2ab86b..a5d324f6d045c81d55a6bcc638205f509b151da4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1950,6 +1950,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index 20c4b4e8c4..64f652cf2e 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -357,7 +357,7 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 90acd5e77d5930d589a2f29523b2d2e2850f3f1f..1eff9edb7d6aaf5e6c1094a32d52d38bb41c0ae3 100644 +index a5d324f6d045c81d55a6bcc638205f509b151da4..99a0b73a552fa5310e90cfa4dcf208173da4814c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1741,7 +1741,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index 44c230dbe9..d6eace3231 100644 --- a/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0290-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -32,7 +32,7 @@ index b986a8e318733bdae766202bef93d4d25f18b58d..1f74602ff13a9f89c8dc40170353a79a this.s = this::l; if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8c3bcdd71 100644 +index c0858aeac0c9709a79590a0ca8db32d64efe7523..fe4aa562aa5a938dea9cd083ccff8c9cb28a7159 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -85,6 +85,12 @@ import org.bukkit.persistence.PersistentDataContainer; @@ -48,7 +48,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 /** * Children must include the following: * -@@ -267,6 +273,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -268,6 +274,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Specific(Specific.To.NBT) static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag"); static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues"); @@ -59,7 +59,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 private IChatBaseComponent displayName; private IChatBaseComponent locName; -@@ -279,6 +289,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -280,6 +290,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private int hideFlag; private boolean unbreakable; private int damage; @@ -70,7 +70,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 private static final Set HANDLED_TAGS = Sets.newHashSet(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); -@@ -316,6 +330,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -317,6 +331,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.hideFlag = meta.hideFlag; this.unbreakable = meta.unbreakable; this.damage = meta.damage; @@ -86,7 +86,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 this.unhandledTags.putAll(meta.unhandledTags); this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); -@@ -392,6 +415,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -393,6 +416,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { persistentDataContainer.put(key, compound.get(key)); } } @@ -118,7 +118,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 Set keys = tag.getKeys(); for (String key : keys) { -@@ -529,6 +577,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -530,6 +578,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { setDamage(damage); } @@ -153,7 +153,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 String internal = SerializableMeta.getString(map, "internal", true); if (internal != null) { ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal)); -@@ -657,6 +733,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -658,6 +734,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (hasDamage()) { itemTag.setInt(DAMAGE.NBT, damage); } @@ -177,7 +177,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 for (Map.Entry e : unhandledTags.entrySet()) { itemTag.set(e.getKey(), e.getValue()); -@@ -673,6 +766,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -674,6 +767,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -199,7 +199,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 NBTTagList createStringList(List list) { if (list == null || list.isEmpty()) { return null; -@@ -756,7 +864,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -757,7 +865,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -208,7 +208,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 } @Override -@@ -1156,7 +1264,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1157,7 +1265,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hideFlag == that.hideFlag) && (this.isUnbreakable() == that.isUnbreakable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) @@ -221,7 +221,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 } /** -@@ -1191,6 +1303,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1192,6 +1304,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (hasDamage() ? this.damage : 0); hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); hash = 61 * hash + version; @@ -232,7 +232,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 return hash; } -@@ -1215,6 +1331,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1216,6 +1332,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.unbreakable = this.unbreakable; clone.damage = this.damage; clone.version = this.version; @@ -247,7 +247,7 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1272,6 +1396,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1273,6 +1397,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { builder.put(DAMAGE.BUKKIT, damage); } @@ -272,18 +272,16 @@ index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8 final Map internalTags = new HashMap(unhandledTags); serializeInternal(internalTags); if (!internalTags.isEmpty()) { -@@ -1435,7 +1577,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - CraftMetaArmorStand.NO_BASE_PLATE.NBT, +@@ -1437,6 +1579,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SMALL.NBT, -- CraftMetaArmorStand.MARKER.NBT -+ CraftMetaArmorStand.MARKER.NBT, + CraftMetaArmorStand.MARKER.NBT, + CAN_DESTROY.NBT, -+ CAN_PLACE_ON.NBT ++ CAN_PLACE_ON.NBT, // Paper end - )); - } -@@ -1460,4 +1604,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + CraftMetaCompass.LODESTONE_DIMENSION.NBT, + CraftMetaCompass.LODESTONE_POS.NBT, +@@ -1464,4 +1608,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } // Paper end diff --git a/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch index 521d110f68..2f52cbd807 100644 --- a/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch @@ -21,7 +21,7 @@ index 1b21911c3e4fd1d4a3305176bb8477c370256906..d5c97bb6503c9bfafd819dd62397b9de private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 8049f54f049122b065ea30e7e831c33486a83b7e..401e89079934929ddf29b126e9c4908d93321df8 100644 +index 12fb251dc96bf179e393046ecc256ea80fdd79de..1672c48c106d95e588b251727cbdb1f6002dc62a 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -37,7 +37,7 @@ public class HandshakeListener implements PacketHandshakingInListener { diff --git a/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch index e6ce345f90..b1b358f714 100644 --- a/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch @@ -18,7 +18,7 @@ index e0ecdb8f87ec82b97a056c8f6d91d6a86f37bd34..5e9a05dfe822c42b83da84a154fe881d byte b0 = (Byte) this.datawatcher.get(EntityInsentient.b); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 3f16f9b34a75db6dc977cb0dc1603db34dd8ddc3..18705e1e2a04ec2790b104a290b9edc8e9fb4f1a 100644 +index bb7f62fa52b758ed83db7def9053b79da3d97dcd..c9f212b586662856f1503bb0ca8d91900f2e9c5f 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 { diff --git a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index a4675b9c3f..71129e3332 100644 --- a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -106,7 +106,7 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1eff9edb7d6aaf5e6c1094a32d52d38bb41c0ae3..1401eefbe9a2c583d669ad77e63c283e2b2cf433 100644 +index 99a0b73a552fa5310e90cfa4dcf208173da4814c..725155a47154d3e40c90b5f40ea37d80f5e27cc5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch index 69061b08d9..41eead992c 100644 --- a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,7 +12,7 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1401eefbe9a2c583d669ad77e63c283e2b2cf433..915d0da2604de7e2824fc94bafcf7686b22d9e5e 100644 +index 725155a47154d3e40c90b5f40ea37d80f5e27cc5..bfb1beb4eaade3e198ea179f221de8f3e9c682af 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1995,6 +1995,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch index a3745587c3..a954bfffb5 100644 --- a/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch +++ b/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Set Zombie last tick at start of drowning process Fixes GH-1887 diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 18705e1e2a04ec2790b104a290b9edc8e9fb4f1a..9bb54d13a318199bbce3d5b32db3710f822daa40 100644 +index c9f212b586662856f1503bb0ca8d91900f2e9c5f..05d19850538b7d853b270d952739d5d1b151690c 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -162,6 +162,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch index 2ff8e041c0..83ca85384f 100644 --- a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch @@ -40,7 +40,7 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 915d0da2604de7e2824fc94bafcf7686b22d9e5e..7ef83fb58e9a86637b7645e0ef6d3d247f88af89 100644 +index bfb1beb4eaade3e198ea179f221de8f3e9c682af..5277fceedccc355698ee1895306a3666bf5c47cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2004,6 +2004,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch b/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch index b6b2bfc1ce..29c8b55f17 100644 --- a/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch +++ b/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch @@ -22,7 +22,7 @@ index 1b2256144f7f968667570e5a9838a77173d515c5..f888fc1c5ef4212f81ed936da6485aba + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 9bb54d13a318199bbce3d5b32db3710f822daa40..ad8b1f0e419e6341eb46def2dc58423588a65882 100644 +index 05d19850538b7d853b270d952739d5d1b151690c..b66059836cc86cbef6c302c44d3f758067a4824d 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -390,10 +390,14 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch index 7988329902..c2d3cba136 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7ef83fb58e9a86637b7645e0ef6d3d247f88af89..9dd6f6cac9da8425acb5d59650dbfb0c6be798d9 100644 +index 5277fceedccc355698ee1895306a3666bf5c47cd..9a6e6a75338f3ab7f8247c5f9e660f0d3cb1177d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ diff --git a/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch index 2c05eb7a0f..a9d88ce863 100644 --- a/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch +++ b/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize brigadier child sorting performance diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java -index 98592a3e63591b54f895e5fa6d8761ca7c4d9de4..bd2802d362cbf40ea0603162b66f4bcefe7944df 100644 +index 5b305320937eafdabbdc3d41475eb8d1c4b3b324..5e3fc338b0fe69a74465567e69721bc28c64dd17 100644 --- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java +++ b/src/main/java/com/mojang/brigadier/tree/CommandNode.java -@@ -26,7 +26,7 @@ import java.util.stream.Collectors; +@@ -27,7 +27,7 @@ import java.util.stream.Collectors; import net.minecraft.server.CommandListenerWrapper; // CraftBukkit public abstract class CommandNode implements Comparable> { @@ -17,7 +17,7 @@ index 98592a3e63591b54f895e5fa6d8761ca7c4d9de4..bd2802d362cbf40ea0603162b66f4bce private Map> literals = Maps.newLinkedHashMap(); private Map> arguments = Maps.newLinkedHashMap(); private final Predicate requirement; -@@ -106,8 +106,7 @@ public abstract class CommandNode implements Comparable> { +@@ -107,8 +107,7 @@ public abstract class CommandNode implements Comparable> { arguments.put(node.getName(), (ArgumentCommandNode) node); } } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index dfed387632..39dceb33c3 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1223,7 +1223,7 @@ index 11559f9e4b3f5fda6bfe4f70f963ce4f7967f051..bf2f602bb07aa4c7c0a22ad9be9e77d7 net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9dd6f6cac9da8425acb5d59650dbfb0c6be798d9..97a24b4dff4a2de06f224458969b9a728041260d 100644 +index 9a6e6a75338f3ab7f8247c5f9e660f0d3cb1177d..db617e04fe492fc7c1bbfe0afd56a4ddb46b5d65 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/work/Bukkit b/work/Bukkit index e16de3bb16..6ff65c824a 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit e16de3bb167910ba20339d2cb5f5c798827f196a +Subproject commit 6ff65c824ad8dc9ba9228999800a0d7010904893 diff --git a/work/CraftBukkit b/work/CraftBukkit index a13b8cfc71..3b9cf0f803 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit a13b8cfc71be4eb2c7880024a1ae191bbfd51131 +Subproject commit 3b9cf0f8031a2614ff2a041a1f3be7cc7fb4bbf4 diff --git a/work/Spigot b/work/Spigot index 0287a20df3..4d9262cf9f 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 0287a20df344c0bc462ddc64851e5a160a1775fc +Subproject commit 4d9262cf9f7cf1a38525d21734708c3fe4a28bcb From d304722608bca52b0cd7ef119d3ece6d42b303b5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 03:13:57 -0400 Subject: [PATCH 74/95] Fix supporting more places of the old UUID format Fixes #3734 --- ...ix-client-rendering-skulls-from-same-user.patch | 6 +++--- .../0527-Support-old-UUID-format-for-NBT.patch | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch index a2d8011094..4fd155690f 100644 --- a/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0266-Fix-client-rendering-skulls-from-same-user.patch @@ -25,7 +25,7 @@ index 7b2010ec4955fb5788c60178c6e306ea3098e9ba..95e801a9a7ca405ff7e80c920fa78493 private Entity k; private ShapeDetectorBlock l; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..91235f7bc80967a759ed8bb25d74ff0af6e25ef4 100644 +index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..7e116d83a62ef42e241ee9e05fdd7ecb30a2ed95 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -274,9 +274,18 @@ public class PacketDataSerializer extends ByteBuf { @@ -39,8 +39,8 @@ index 6e049c2e2a142ce022b9dc278a3bb302f723e42c..91235f7bc80967a759ed8bb25d74ff0a + // Paper start + if (nbttagcompound != null && nbttagcompound.hasKeyOfType("SkullOwner", 10)) { + NBTTagCompound owner = nbttagcompound.getCompound("SkullOwner"); -+ if (owner.hasKey("Id")) { -+ nbttagcompound.map.put("SkullOwnerOrig", owner.map.get("Id")); ++ if (owner.hasUUID("Id")) { ++ nbttagcompound.setUUID("SkullOwnerOrig", owner.getUUID("Id")); + TileEntitySkull.sanitizeUUID(owner); + } + } diff --git a/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch index a40c1b1746..6146aec771 100644 --- a/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch +++ b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch @@ -8,10 +8,10 @@ We have stored UUID in plenty of places that did not get DFU'd So just look for old format and load it if it exists. diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index f608b35502890650adfc1df35e0794471f57ecbc..93b25e4580646ccfe8c671511e2250dbe7474a89 100644 +index f608b35502890650adfc1df35e0794471f57ecbc..74a8418b72f97a8956857a46fb06251602ad30e3 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -142,6 +142,11 @@ public class NBTTagCompound implements NBTBase { +@@ -142,11 +142,21 @@ public class NBTTagCompound implements NBTBase { @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER @Nullable public UUID a(String s) { @@ -23,3 +23,13 @@ index f608b35502890650adfc1df35e0794471f57ecbc..93b25e4580646ccfe8c671511e2250db return GameProfileSerializer.a(this.get(s)); } + public final boolean hasUUID(String s) { return this.b(s); } // Paper - OBFHELPER + public boolean b(String s) { ++ // Paper start - support old format ++ if (hasKey(s + "Least") && hasKey(s + "Most")) { ++ return true; ++ } ++ // Paper end + NBTBase nbtbase = this.get(s); + + return nbtbase != null && nbtbase.b() == NBTTagIntArray.a && ((NBTTagIntArray) nbtbase).getInts().length == 4; From 6f30ecdeb9cc5b6c9d101a95230f979e69cd01cd Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 03:15:52 -0400 Subject: [PATCH 75/95] Clean up duplicated GameProfile Properties We had a bug where we accidently cloned properties resulting in skulls growing to large sizes and preventing login. This now automatically cleans up the extra properties. Fixes #3719 Fixes #3667 --- ...up-duplicated-GameProfile-Properties.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch diff --git a/Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch b/Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch new file mode 100644 index 0000000000..8b8ff37292 --- /dev/null +++ b/Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch @@ -0,0 +1,68 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 1 Jul 2020 03:12:06 -0400 +Subject: [PATCH] Clean up duplicated GameProfile Properties + +We had a bug where we accidently cloned properties resulting in skulls +growing to large sizes and preventing login. + +This now automatically cleans up the extra properties. + +diff --git a/src/main/java/net/minecraft/server/GameProfileSerializer.java b/src/main/java/net/minecraft/server/GameProfileSerializer.java +index 66d503a91665952b98c8cdc06c9ad10782b0558b..488c3473c9e56913d382c2d9957582634f3f3d85 100644 +--- a/src/main/java/net/minecraft/server/GameProfileSerializer.java ++++ b/src/main/java/net/minecraft/server/GameProfileSerializer.java +@@ -42,8 +42,8 @@ public final class GameProfileSerializer { + while (iterator.hasNext()) { + String s1 = (String) iterator.next(); + NBTTagList nbttaglist = nbttagcompound1.getList(s1, 10); +- +- for (int i = 0; i < nbttaglist.size(); ++i) { ++ if (nbttaglist.size() == 0) continue; // Paper - remove duplicate properties ++ for (int i = nbttaglist.size() - 1; i < nbttaglist.size(); ++i) { // Paper - remove duplicate properties + NBTTagCompound nbttagcompound2 = nbttaglist.getCompound(i); + String s2 = nbttagcompound2.getString("Value"); + +@@ -229,7 +229,7 @@ public final class GameProfileSerializer { + Optional optional = iblockstate.b(nbttagcompound.getString(s)); + + if (optional.isPresent()) { +- return (IBlockDataHolder) s0.set(iblockstate, (Comparable) optional.get()); ++ return s0.set(iblockstate, optional.get()); // Paper - decompile error + } else { + GameProfileSerializer.LOGGER.warn("Unable to read property: {} with value: {} for blockstate: {}", s, nbttagcompound.getString(s), nbttagcompound1.toString()); + return s0; +@@ -259,8 +259,8 @@ public final class GameProfileSerializer { + return nbttagcompound; + } + +- private static > String a(IBlockState iblockstate, Comparable comparable) { +- return iblockstate.a(comparable); ++ private static > String a(IBlockState iblockstate, Comparable comparable) {// Paper - decompile error ++ return iblockstate.a((T) comparable);// Paper - decompile error + } + + public static NBTTagCompound a(DataFixer datafixer, DataFixTypes datafixtypes, NBTTagCompound nbttagcompound, int i) { +diff --git a/src/main/java/net/minecraft/server/ItemSkullPlayer.java b/src/main/java/net/minecraft/server/ItemSkullPlayer.java +index 28f1ce9031c73d09b55a5c6aac5d34e66e9f7c12..61f4cf9cc62a1b2ba59137b8682cb58834b4abcc 100644 +--- a/src/main/java/net/minecraft/server/ItemSkullPlayer.java ++++ b/src/main/java/net/minecraft/server/ItemSkullPlayer.java +@@ -53,6 +53,18 @@ public class ItemSkullPlayer extends ItemBlockWallable { + return true; + } else { + // CraftBukkit start ++ // Paper start - clean up old duplicated properties ++ NBTTagCompound properties = nbttagcompound.getCompound("SkullOwner").getCompound("Properties"); ++ for (String key : properties.getKeys()) { ++ NBTTagList values = properties.getList(key, 10); ++ if (values.size() > 1) { ++ NBTBase texture = values.get(values.size() - 1); ++ values = new NBTTagList(); ++ values.add(texture); ++ properties.set(key, values); ++ } ++ } ++ // Paper end + NBTTagList textures = nbttagcompound.getCompound("SkullOwner").getCompound("Properties").getList("textures", 10); // Safe due to method contracts + for (int i = 0; i < textures.size(); i++) { + if (textures.get(i) instanceof NBTTagCompound && !((NBTTagCompound) textures.get(i)).hasKeyOfType("Signature", 8) && ((NBTTagCompound) textures.get(i)).getString("Value").trim().isEmpty()) { From 4fd0d54ee78f49a79263c9a0c5154aa4ec4fd6b6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 03:32:26 -0400 Subject: [PATCH 76/95] Fix server not stopping when eula not agreed yet --- ...12-Improve-Server-Thread-Pool-and-Thread-Priorities.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 4a92754429..692ecd8627 100644 --- a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -25,10 +25,10 @@ index b13d8ec9aa0a51d5432129f1b0ecef3beb5b7276..f4c93a65c28eeca4a07aaf9b00507d5c } diff --git a/src/main/java/net/minecraft/server/ServerWorkerThread.java b/src/main/java/net/minecraft/server/ServerWorkerThread.java new file mode 100644 -index 0000000000000000000000000000000000000000..59cfb76d737f923c7e424743ef370c969ae14c26 +index 0000000000000000000000000000000000000000..1a94648cb79c8f2889aacb5fb21dc07ad84a4a6b --- /dev/null +++ b/src/main/java/net/minecraft/server/ServerWorkerThread.java -@@ -0,0 +1,24 @@ +@@ -0,0 +1,25 @@ +package net.minecraft.server; + +import java.util.concurrent.CompletionException; @@ -40,6 +40,7 @@ index 0000000000000000000000000000000000000000..59cfb76d737f923c7e424743ef370c96 + super(target, "Server-Worker-" + threadId.getAndIncrement()); + setPriority(Thread.NORM_PRIORITY-1); // Deprioritize over main + this.setUncaughtExceptionHandler((thread, throwable) -> { ++ thread.setDaemon(true); + if (throwable instanceof CompletionException) { + throwable = throwable.getCause(); + } From b7d9e3d5dc89cc416a8191263cf9d290070f24ed Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 04:28:56 -0400 Subject: [PATCH 77/95] Convert legacy attributes in Item Meta Fixes #3705 --- ...nvert-legacy-attributes-in-Item-Meta.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Spigot-Server-Patches/0529-Convert-legacy-attributes-in-Item-Meta.patch diff --git a/Spigot-Server-Patches/0529-Convert-legacy-attributes-in-Item-Meta.patch b/Spigot-Server-Patches/0529-Convert-legacy-attributes-in-Item-Meta.patch new file mode 100644 index 0000000000..b64212b098 --- /dev/null +++ b/Spigot-Server-Patches/0529-Convert-legacy-attributes-in-Item-Meta.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 1 Jul 2020 04:50:22 -0400 +Subject: [PATCH] Convert legacy attributes in Item Meta + + +diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java +index bf3b236b2090fe4dd67e2f87b0b27c8d7186cb48..c5dd25add39298342a6f4b2a05e137de93d1e62b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java ++++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java +@@ -13,6 +13,20 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; + public class CraftAttributeMap implements Attributable { + + private final AttributeMapBase handle; ++ // Paper start - convert legacy attributes ++ private static final com.google.common.collect.ImmutableMap legacyNMS = com.google.common.collect.ImmutableMap.builder().put("generic.maxHealth", "generic.max_health").put("Max Health", "generic.max_health").put("zombie.spawnReinforcements", "zombie.spawn_reinforcements").put("Spawn Reinforcements Chance", "zombie.spawn_reinforcements").put("horse.jumpStrength", "horse.jump_strength").put("Jump Strength", "horse.jump_strength").put("generic.followRange", "generic.follow_range").put("Follow Range", "generic.follow_range").put("generic.knockbackResistance", "generic.knockback_resistance").put("Knockback Resistance", "generic.knockback_resistance").put("generic.movementSpeed", "generic.movement_speed").put("Movement Speed", "generic.movement_speed").put("generic.flyingSpeed", "generic.flying_speed").put("Flying Speed", "generic.flying_speed").put("generic.attackDamage", "generic.attack_damage").put("generic.attackKnockback", "generic.attack_knockback").put("generic.attackSpeed", "generic.attack_speed").put("generic.armorToughness", "generic.armor_toughness").build(); ++ ++ public static String convertIfNeeded(String nms) { ++ if (nms == null) { ++ return null; ++ } ++ nms = legacyNMS.getOrDefault(nms, nms); ++ if (!nms.toLowerCase().equals(nms) || nms.indexOf(' ') != -1) { ++ return null; ++ } ++ return nms; ++ } ++ // Paper end + + public CraftAttributeMap(AttributeMapBase handle) { + this.handle = handle; +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index fe4aa562aa5a938dea9cd083ccff8c9cb28a7159..8f48b58c98ba40d5d7deb6775957e2c6b4d334c6 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -492,7 +492,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + + AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier); + +- String attributeName = entry.getString(ATTRIBUTES_IDENTIFIER.NBT); ++ String attributeName = CraftAttributeMap.convertIfNeeded(entry.getString(ATTRIBUTES_IDENTIFIER.NBT)); // Paper + if (attributeName == null || attributeName.isEmpty()) { + continue; + } From f63e3dd135c020c9c735649ed22f58fefee46782 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 05:42:22 -0400 Subject: [PATCH 78/95] Allow teleporting through end gateways as a passenger/vehicle Vanilla allows this now for same world teleports Fixes #3735 --- Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch index 39235c4524..af8fb316e3 100644 --- a/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch +++ b/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure safe gateway teleport diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index ea61a473d8e47428ed5cd4541a5855f0e2c50815..aebb6b6b2b869231310567b030fe32f34cc268f5 100644 +index ea61a473d8e47428ed5cd4541a5855f0e2c50815..ce239d2b2fe942915aa093b86343c3740d10e273 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -62,10 +62,14 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick @@ -17,7 +17,7 @@ index ea61a473d8e47428ed5cd4541a5855f0e2c50815..aebb6b6b2b869231310567b030fe32f3 - this.a((Entity) list.get(this.world.random.nextInt(list.size()))); + // Paper start + for (Entity entity : list) { -+ if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) { ++ if (entity.canPortal()) { + this.a(entity); + break; + } From c43dcbfcf070e143d71303c9762f2c201d84cc03 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 05:42:51 -0400 Subject: [PATCH 79/95] Improve old UUID support, clean up old legacy keys. If we set a UUID to new format, need to make sure old format doesn't exist anymore. Additionally, ensure if new format exists, we prefer it over old. --- ...0527-Support-old-UUID-format-for-NBT.patch | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch index 6146aec771..40a62a9605 100644 --- a/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch +++ b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch @@ -8,15 +8,28 @@ We have stored UUID in plenty of places that did not get DFU'd So just look for old format and load it if it exists. diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index f608b35502890650adfc1df35e0794471f57ecbc..74a8418b72f97a8956857a46fb06251602ad30e3 100644 +index f608b35502890650adfc1df35e0794471f57ecbc..436f40bcd7817bedde4f6570c7c47dba7ff7034f 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -142,11 +142,21 @@ public class NBTTagCompound implements NBTBase { +@@ -135,6 +135,12 @@ public class NBTTagCompound implements NBTBase { + + public void setUUID(String prefix, UUID uuid) { a(prefix, uuid); } // Paper - OBFHELPER + public void a(String s, UUID uuid) { ++ // Paper start - support old format ++ if (this.hasKeyOfType(s + "Most", 99) && this.hasKeyOfType(s + "Least", 99)) { ++ this.map.remove(s + "Most"); ++ this.map.remove(s + "Least"); ++ } ++ // Paper end + this.map.put(s, GameProfileSerializer.a(uuid)); + } + +@@ -142,11 +148,21 @@ public class NBTTagCompound implements NBTBase { @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER @Nullable public UUID a(String s) { + // Paper start - support old format -+ if (hasKey(s + "Least") && hasKey(s + "Most")) { ++ if (!hasKeyOfType(s, 11) && this.hasKeyOfType(s + "Most", 99) && this.hasKeyOfType(s + "Least", 99)) { + return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); + } + // Paper end @@ -26,7 +39,7 @@ index f608b35502890650adfc1df35e0794471f57ecbc..74a8418b72f97a8956857a46fb062516 public final boolean hasUUID(String s) { return this.b(s); } // Paper - OBFHELPER public boolean b(String s) { + // Paper start - support old format -+ if (hasKey(s + "Least") && hasKey(s + "Most")) { ++ if (this.hasKeyOfType(s + "Most", 99) && this.hasKeyOfType(s + "Least", 99)) { + return true; + } + // Paper end From 8522e7b274a5e2e0cb063cbfe4c80f3d8f4a06c2 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 1 Jul 2020 12:21:57 +0100 Subject: [PATCH 80/95] Fix shutdown on eula not being agreed (Fixes #4647) --- ...12-Improve-Server-Thread-Pool-and-Thread-Priorities.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 692ecd8627..7e86a5ff23 100644 --- a/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -25,10 +25,10 @@ index b13d8ec9aa0a51d5432129f1b0ecef3beb5b7276..f4c93a65c28eeca4a07aaf9b00507d5c } diff --git a/src/main/java/net/minecraft/server/ServerWorkerThread.java b/src/main/java/net/minecraft/server/ServerWorkerThread.java new file mode 100644 -index 0000000000000000000000000000000000000000..1a94648cb79c8f2889aacb5fb21dc07ad84a4a6b +index 0000000000000000000000000000000000000000..703f45da2954272a7b92e2b11087c80a11f0370d --- /dev/null +++ b/src/main/java/net/minecraft/server/ServerWorkerThread.java -@@ -0,0 +1,25 @@ +@@ -0,0 +1,26 @@ +package net.minecraft.server; + +import java.util.concurrent.CompletionException; @@ -39,6 +39,7 @@ index 0000000000000000000000000000000000000000..1a94648cb79c8f2889aacb5fb21dc07a + public ServerWorkerThread(Runnable target) { + super(target, "Server-Worker-" + threadId.getAndIncrement()); + setPriority(Thread.NORM_PRIORITY-1); // Deprioritize over main ++ this.setDaemon(true); + this.setUncaughtExceptionHandler((thread, throwable) -> { + thread.setDaemon(true); + if (throwable instanceof CompletionException) { From d78cbb85531bd905ffc37691ff31d1f399fd9dfb Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Wed, 1 Jul 2020 09:53:16 -0400 Subject: [PATCH 81/95] [1.16] Remove some streams from structures (#3704) This showed up a lot in the spark profiler, should have a low-medium performance improvement. --- ...-Remove-some-streams-from-structures.patch | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 Spigot-Server-Patches/0530-Remove-some-streams-from-structures.patch diff --git a/Spigot-Server-Patches/0530-Remove-some-streams-from-structures.patch b/Spigot-Server-Patches/0530-Remove-some-streams-from-structures.patch new file mode 100644 index 0000000000..765a385274 --- /dev/null +++ b/Spigot-Server-Patches/0530-Remove-some-streams-from-structures.patch @@ -0,0 +1,111 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: JRoy +Date: Mon, 29 Jun 2020 17:03:06 -0400 +Subject: [PATCH] Remove some streams from structures + +This showed up a lot in the spark profiler, should have a low-medium performance improvement. + +diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java +index 30aeb45d63394b7d91c2dd7b92cfc9cefa3c088c..db198811ddecc00cbd398f3805bdf51b3239f390 100644 +--- a/src/main/java/net/minecraft/server/BiomeBase.java ++++ b/src/main/java/net/minecraft/server/BiomeBase.java +@@ -339,9 +339,11 @@ public class BiomeBase { + int j1 = l << 4; + + try { +- structuremanager.a(SectionPosition.a(blockposition), structuregenerator).forEach((structurestart) -> { +- structurestart.a(generatoraccessseed, structuremanager, chunkgenerator, seededrandom, new StructureBoundingBox(i1, j1, i1 + 15, j1 + 15), new ChunkCoordIntPair(k, l)); +- }); ++ // Paper start - remove structure streams ++ for (StructureStart structureStart : structuremanager.getFeatureStarts(SectionPosition.a(blockposition), structuregenerator)) { ++ structureStart.a(generatoraccessseed, structuremanager, chunkgenerator, seededrandom, new StructureBoundingBox(i1, j1, i1 + 15, j1 + 15), new ChunkCoordIntPair(k, l)); ++ } ++ // Paper end + } catch (Exception exception) { + CrashReport crashreport = CrashReport.a(exception, "Feature placement"); + +diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +index 733c6244e08f6b7277006c1ed801f2cfc8fc36e5..45b771e4121f2ef27c67d5a5ba2dadcfc0f944e0 100644 +--- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java ++++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +@@ -417,7 +417,7 @@ public final class ChunkGeneratorAbstract extends ChunkGenerator { + while (iterator.hasNext()) { + StructureGenerator structuregenerator = (StructureGenerator) iterator.next(); + +- structuremanager.a(SectionPosition.a(chunkcoordintpair, 0), structuregenerator).forEach((structurestart) -> { ++ for (StructureStart structurestart : structuremanager.getFeatureStarts(SectionPosition.a(chunkcoordintpair, 0), structuregenerator)) { // Paper - remove structure streams + Iterator iterator1 = structurestart.d().iterator(); + + while (iterator1.hasNext()) { +@@ -449,7 +449,7 @@ public final class ChunkGeneratorAbstract extends ChunkGenerator { + } + } + +- }); ++ } // Paper - remove structure streams + } + + double[][][] adouble = new double[2][this.p + 1][this.o + 1]; +diff --git a/src/main/java/net/minecraft/server/StructureManager.java b/src/main/java/net/minecraft/server/StructureManager.java +index c434427ce7bd206ed5d2efa2560e593b1186c666..6c7804ac0e994ec03b95eda7a24139b65a59db7e 100644 +--- a/src/main/java/net/minecraft/server/StructureManager.java ++++ b/src/main/java/net/minecraft/server/StructureManager.java +@@ -6,7 +6,7 @@ import javax.annotation.Nullable; + + public class StructureManager { + +- private final GeneratorAccess a; ++ private final GeneratorAccess a; public GeneratorAccess getLevel() { return a; } // Paper - OBFHELPER + private final GeneratorSettings b; + + public StructureManager(GeneratorAccess generatoraccess, GeneratorSettings generatorsettings) { +@@ -32,6 +32,20 @@ public class StructureManager { + }); + } + ++ // Paper start - remove structure streams ++ public java.util.List> getFeatureStarts(SectionPosition sectionPosition, StructureGenerator structureGenerator) { ++ java.util.List> list = new it.unimi.dsi.fastutil.objects.ObjectArrayList<>(); ++ for (Long curLong: getLevel().getChunkAt(sectionPosition.a(), sectionPosition.c(), ChunkStatus.STRUCTURE_REFERENCES).b(structureGenerator)) { ++ SectionPosition sectionPosition1 = SectionPosition.a(new ChunkCoordIntPair(curLong), 0); ++ StructureStart structurestart = a(sectionPosition1, structureGenerator, getLevel().getChunkAt(sectionPosition1.a(), sectionPosition1.c(), ChunkStatus.STRUCTURE_STARTS)); ++ if (structurestart != null && structurestart.e()) { ++ list.add(structurestart); ++ } ++ } ++ return list; ++ } ++ // Paper end ++ + @Nullable + public StructureStart a(SectionPosition sectionposition, StructureGenerator structuregenerator, IStructureAccess istructureaccess) { + return istructureaccess.a(structuregenerator); +@@ -50,13 +64,21 @@ public class StructureManager { + } + + public StructureStart a(BlockPosition blockposition, boolean flag, StructureGenerator structuregenerator) { +- return (StructureStart) DataFixUtils.orElse(this.a(SectionPosition.a(blockposition), structuregenerator).filter((structurestart) -> { +- return structurestart.c().b((BaseBlockPosition) blockposition); +- }).filter((structurestart) -> { +- return !flag || structurestart.d().stream().anyMatch((structurepiece) -> { +- return structurepiece.g().b((BaseBlockPosition) blockposition); +- }); +- }).findFirst(), StructureStart.a); ++ // Paper start - remove structure streams ++ for (StructureStart structurestart : getFeatureStarts(SectionPosition.a(blockposition), structuregenerator)) { ++ if (structurestart.c().b(blockposition)) { ++ if (!flag) { ++ return structurestart; ++ } ++ for (StructurePiece structurepiece : structurestart.d()) { ++ if (structurepiece.g().b(blockposition)) { ++ return structurestart; ++ } ++ } ++ } ++ } ++ return StructureStart.a; ++ // Paper end + } + + // Spigot start From 75645fbfbf9de86ca8d45971c5a68e510b165811 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 19:17:11 -0400 Subject: [PATCH 82/95] [Auto] Updated Upstream (CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: d9bd43b06 Change outdated build delay to 3 days --- Spigot-Server-Patches/0001-POM-Changes.patch | 4 ++-- ...Show-Paper-in-client-crashes-server-lists-and-Mojang.patch | 4 ++-- Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch | 4 ++-- work/CraftBukkit | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index b3005d1968..c0c8c10cb3 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -190,7 +190,7 @@ index db08e98c60084b16ee18455ce014a6ea305f89c5..52834690de9f07c9c4838dbef5003156 diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index b75bed0890ce76c7a015998f199851374de6983c..9ff914194ca72c2d0d4c63a12fa4441aee93429d 100644 +index 4ac80c20ba970a2078fe62c452e7fdfb8ad0b46e..a5c4b7f28f13f0aad4712912f60ba5fc6785539a 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -186,7 +186,7 @@ public class Main { @@ -201,7 +201,7 @@ index b75bed0890ce76c7a015998f199851374de6983c..9ff914194ca72c2d0d4c63a12fa4441a + Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -1); + deadline.add(Calendar.DAY_OF_YEAR, -3); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 93046379d0cefd5d3236fc59e698809acdc18f80..674096cab190d62622f9947853b056f57d43a2a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 91650d34eb..8c30cfda94 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -45,11 +45,11 @@ index 9947bbbb8ca2810bce420cdd12a1874afd6b1c0c..c9995ba10ac864fe4168196fa1932b68 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 5d8a9361151985f8a8215797592f7998a186152d..a86eeac5abdd5b5512dd290e61361910672909a0 100644 +index 3d15661eb1f15f74213ecb7e8eceb1f231ad2c1c..a111987658a6d89fc3fe970b1db37a7f3517b9bd 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -200,12 +200,25 @@ public class Main { - deadline.add(Calendar.DAY_OF_YEAR, -1); + deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { System.err.println("*** Error, this build is outdated ***"); - System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***"); diff --git a/Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch index cd94954872..12d66c24e4 100644 --- a/Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch @@ -9,12 +9,12 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index fbf4aaa1c47520aa0189e65fa7adb6e69d2fa889..c05432b2319da2ab8ff18a47ebbf11efa70a36b7 100644 +index b77b051137f66106bac396debe0c0542ac86e257..05b647fbb360910b2961c9276c2928fe71dad90c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -218,10 +218,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -1); + deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/work/CraftBukkit b/work/CraftBukkit index 3b9cf0f803..d9bd43b060 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 3b9cf0f8031a2614ff2a041a1f3be7cc7fb4bbf4 +Subproject commit d9bd43b060322ad72af3008669878ee5d6cc2cc0 From 0823d3fdce4cd7f877f7842e8da2f581e82ab596 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 19:41:58 -0400 Subject: [PATCH 83/95] [Auto] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 1cb03826 SPIGOT-5900: Re-order Material enum entries to match Minecraft's order fdd705db #507: Add hasDiscoveredRecipe() and getDiscoveredRecipes() CraftBukkit Changes: 551e770f5 SPIGOT-5900: Add test for the order of Material enum entries 8297676c2 #682: Add hasDiscoveredRecipe() and getDiscoveredRecipes() --- .../0056-Shoulder-Entities-Release-API.patch | 4 ++-- .../0090-Add-method-to-open-already-placed-sign.patch | 4 ++-- .../0116-InventoryCloseEvent-Reason-API.patch | 4 ++-- Spigot-API-Patches/0153-Material-API-additions.patch | 4 ++-- Spigot-API-Patches/0206-Potential-bed-API.patch | 4 ++-- Spigot-Server-Patches/0009-Timings-v2.patch | 4 ++-- .../0020-Player-affects-spawning-API.patch | 4 ++-- .../0024-Only-refresh-abilities-if-needed.patch | 4 ++-- .../0048-Player-Tab-List-and-Title-APIs.patch | 4 ++-- ...Configurable-inter-world-teleportation-safety.patch | 4 ++-- .../0058-Complete-resource-pack-API.patch | 6 +++--- ...-NaN-health-absorb-values-and-repair-bad-data.patch | 4 ++-- ...-Workaround-for-setting-passengers-on-players.patch | 4 ++-- .../0091-Implement-PlayerLocaleChangeEvent.patch | 4 ++-- .../0131-String-based-Action-Bar-API.patch | 4 ++-- .../0153-Shoulder-Entities-Release-API.patch | 4 ++-- ...pose-client-protocol-version-and-virtual-host.patch | 4 ++-- .../0185-Ability-to-apply-mending-to-XP-API.patch | 4 ++-- .../0202-Player.setPlayerProfile-API.patch | 8 ++++---- .../0208-Flag-to-disable-the-channel-limit.patch | 6 +++--- .../0209-Add-method-to-open-already-placed-sign.patch | 4 ++-- .../0237-InventoryCloseEvent-Reason-API.patch | 8 ++++---- ...285-Expose-attack-cooldown-methods-for-Player.patch | 4 ++-- Spigot-Server-Patches/0286-Improve-death-events.patch | 4 ++-- ...d-APIs-to-replace-OfflinePlayer-getLastPlayed.patch | 10 +++++----- ...ck-Entity-remove-from-being-called-on-Players.patch | 4 ++-- ...354-Per-Player-View-Distance-API-placeholders.patch | 4 ++-- .../0452-Prevent-opening-inventories-when-frozen.patch | 6 +++--- .../0458-Implement-Player-Client-Options-API.patch | 4 ++-- Spigot-Server-Patches/0487-Potential-bed-API.patch | 4 ++-- ...ment-Chunk-Priority-Urgency-System-for-Chunks.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 33 files changed, 74 insertions(+), 74 deletions(-) diff --git a/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch b/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch index 78e1f55fa1..84254db369 100644 --- a/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch +++ b/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 19424479caead7adb966746a70de34d9684f37bc..72ec97f5dcdf0e181e75b28f4de19b307835cb02 100644 +index abe3d91428c4a5f7e3c6fec51faf973b76896dc3..babda8f047ab134223651ddcc8e4eb8d6682a031 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -299,6 +299,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -300,6 +300,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getExpToLevel(); diff --git a/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch b/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch index f6a3d4a4fd..0af409cf27 100644 --- a/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-API-Patches/0090-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/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 72ec97f5dcdf0e181e75b28f4de19b307835cb02..863cdf7408cb6b42e7927505e34a2a93017e06ff 100644 +index babda8f047ab134223651ddcc8e4eb8d6682a031..dd7b08f985d8ac41fdce8241a3cd2c84c1555ab3 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -443,4 +443,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -461,4 +461,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ @Deprecated public void setShoulderEntityRight(@Nullable Entity entity); diff --git a/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch b/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch index 3bed0ec54c..b11da6a932 100644 --- a/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch @@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 863cdf7408cb6b42e7927505e34a2a93017e06ff..1f94cbee36b6a952b2ecca8efbeaf7deee640a81 100644 +index dd7b08f985d8ac41fdce8241a3cd2c84c1555ab3..2668196e04a7de245c63b4b74f0d056784ef0736 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -152,6 +152,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -153,6 +153,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public void closeInventory(); diff --git a/Spigot-API-Patches/0153-Material-API-additions.patch b/Spigot-API-Patches/0153-Material-API-additions.patch index fe4a0d241c..665fe76199 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 c7316bd2ef89e63ced9f8d37f0936f1551c1157d..769c65e7928be5e0a15e592c874fc68cc6d30148 100644 +index cedb719856573a9284443626d8823201125c895d..3a8438fb674006a5cbfd977a1cd016117691f0ee 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -85,6 +85,7 @@ import org.jetbrains.annotations.Nullable; @@ -15,7 +15,7 @@ index c7316bd2ef89e63ced9f8d37f0936f1551c1157d..769c65e7928be5e0a15e592c874fc68c +@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper public enum Material implements Keyed { // - ACACIA_BOAT(27326, 1), + AIR(9648, 0), @@ -3563,6 +3564,22 @@ public enum Material implements Keyed { } } diff --git a/Spigot-API-Patches/0206-Potential-bed-API.patch b/Spigot-API-Patches/0206-Potential-bed-API.patch index 4c287e622b..021be7137f 100644 --- a/Spigot-API-Patches/0206-Potential-bed-API.patch +++ b/Spigot-API-Patches/0206-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/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 1f94cbee36b6a952b2ecca8efbeaf7deee640a81..e6cdd4bc2d934ab932651e17f144d7004835bdc3 100644 +index 2668196e04a7de245c63b4b74f0d056784ef0736..d3998c61af0c5fb1189ae7829e8cdfbef0cd3f97 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -239,6 +239,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -240,6 +240,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getSleepTicks(); diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index efad0fe334..8ec1d6164d 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1963,10 +1963,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 aef9854bef327d5eb9513f486e6a05c65f2a6ee7..110b3d8aeae9b9443e4e59d456603eb9cb858583 100644 +index b00c75bad4bb0fc51c40ab9cbdd611610a6315c0..e0c097a789d2110da609c1410a2f542a931e85e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1757,6 +1757,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1772,6 +1772,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } diff --git a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch index 62f891885b..a8c0179355 100644 --- a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch @@ -119,10 +119,10 @@ index 4f7dc23d67e97f9a2b8983750299fc43b0ed6db9..a4a48dbee002e96a5644d9a033f9f233 public void c() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 110b3d8aeae9b9443e4e59d456603eb9cb858583..32f55645c14d5f25235a2e1efbbc8260bf1972f7 100644 +index e0c097a789d2110da609c1410a2f542a931e85e9..ca7fa1ee3ebddb8e395395fcce35059f2e0ee52a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1669,7 +1669,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1684,7 +1684,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return getHandle().locale; diff --git a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch index 5b59e2f9e9..7e38388088 100644 --- a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 32f55645c14d5f25235a2e1efbbc8260bf1972f7..b2f9f4e9350cde9c79801b83e43c181c31f90131 100644 +index ca7fa1ee3ebddb8e395395fcce35059f2e0ee52a..57eb0223477f44e061e916b0c046bdd136de1c0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1355,12 +1355,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1370,12 +1370,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { diff --git a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch index a10f901486..be8b883421 100644 --- a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch @@ -52,7 +52,7 @@ index 3a6e780007bc1b1fa799166daa01d3a9e15c7ab0..535056c64ef866e645b1bfbd149b50c5 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b2f9f4e9350cde9c79801b83e43c181c31f90131..fea541b287d3d4bd4a79d5058685cbd8d02768a5 100644 +index 57eb0223477f44e061e916b0c046bdd136de1c0e..01f7d2ac7d4fb639ed9561c25777dea65210e050 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -62,7 +62,7 @@ index b2f9f4e9350cde9c79801b83e43c181c31f90131..fea541b287d3d4bd4a79d5058685cbd8 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -213,6 +214,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -215,6 +216,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch index 4d4d307eff..775a5691a5 100644 --- a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch @@ -30,10 +30,10 @@ index cd47a4ca069df26969de3051c2aac80540093818..abbf59bb91021821876a8960e8f77fac + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fea541b287d3d4bd4a79d5058685cbd8d02768a5..0f6d0c078c1280676dcd0be2c7c61942109fb822 100644 +index 01f7d2ac7d4fb639ed9561c25777dea65210e050..a7526e8f5e2fe3b22133181659be791acbc05d57 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -762,7 +762,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -764,7 +764,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.playerConnection.teleport(to); } else { diff --git a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch index efc340fa14..6a1bc088b8 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch @@ -22,10 +22,10 @@ index 8ecca907357119ed8eb67381914daba4ae6db38f..ffed0587323dbf522e478f43948bbb03 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0f6d0c078c1280676dcd0be2c7c61942109fb822..9ff3e95210322829342c1d9f9ad94edeae731ca2 100644 +index a7526e8f5e2fe3b22133181659be791acbc05d57..109139673561175819821ff992d0d8846878b91a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -136,6 +136,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -138,6 +138,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double health = 20; private boolean scaledHealth = false; private double healthScale = 20; @@ -36,7 +36,7 @@ index 0f6d0c078c1280676dcd0be2c7c61942109fb822..9ff3e95210322829342c1d9f9ad94ede public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1773,6 +1777,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1788,6 +1792,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 3b7b299153..330ffd436e 100644 --- a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,10 +44,10 @@ index f1080e7d10d5105e3f4010489393f6150c7c4a75..374e4a3dcb656d6a84e05bb9260d3198 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9ff3e95210322829342c1d9f9ad94edeae731ca2..1f4ad48dc8299681c7231c126cc59c1a1bca99f3 100644 +index 109139673561175819821ff992d0d8846878b91a..3d28ed4de1956d5ca7d11b63934a2bc174ef9d76 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1590,6 +1590,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1605,6 +1605,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch index 3b7d94edc2..7dbef00671 100644 --- a/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1f4ad48dc8299681c7231c126cc59c1a1bca99f3..051ba43e9ed9afe77b74ffbede44def35601afc9 100644 +index 3d28ed4de1956d5ca7d11b63934a2bc174ef9d76..0654819e8fbbe923b1aa439983af020dc39c6734 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -771,6 +771,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -773,6 +773,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return true; } diff --git a/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch index e0cd8b66dd..f1ef9bab64 100644 --- a/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch @@ -40,10 +40,10 @@ index 7eb56761d9073156b30d4c981dcd4b4ba646f0bc..ab89e508ee8b8142fb7c0b5101b0b0e1 this.cg = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 051ba43e9ed9afe77b74ffbede44def35601afc9..1a7b9325108342cfbb781665ff1bf3ee3056bc9b 100644 +index 0654819e8fbbe923b1aa439983af020dc39c6734..f8e141190c43bf9be1a7d782e8a22d74c5dedd95 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1776,8 +1776,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1791,8 +1791,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { diff --git a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch index 0fbf31fcfb..3dc2d2164c 100644 --- a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch @@ -18,10 +18,10 @@ index 275c1d2d1eb2649de9a9b5aece6e88c21362efba..d72ba7f76c42fd525a5b59a999a0c08e public static Collector, ?, Map> a() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1a7b9325108342cfbb781665ff1bf3ee3056bc9b..8776cfb8b5eda0b407af031747688e582c0c2bff 100644 +index f8e141190c43bf9be1a7d782e8a22d74c5dedd95..bcf855b549e24929865ce4ca32ce15975b06f951 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -219,6 +219,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -221,6 +221,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper start diff --git a/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch index b37b910462..0306aff2de 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 0dc2ffcfceeffed2cb949d31c4f976bce639f110..69c0a4c7bfb1c753d544dcd074ad832d @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 fdebdf85c4a9e560c964de54e6ca726847ba0f11..30ba0a6aa2fd8c281f1129ad3098ee1033c32f8c 100644 +index 60ef17fdb179c3236b8c9d196a17d719d5261fb4..1f715fb44b85f14664affcce9a11928dfc82991b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -486,6 +486,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -487,6 +487,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { getHandle().getCooldownTracker().setCooldown(CraftMagicNumbers.getItem(material), ticks); } diff --git a/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch index e9b9459219..2a7b2b25b5 100644 --- a/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch @@ -103,10 +103,10 @@ index 4f008e4723d2cb0bcabb2d5621203d63c40c4923..8545146fb1f093f821e3b966d9337049 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8776cfb8b5eda0b407af031747688e582c0c2bff..cc920cb20a7c1c77257e0219137775b362dfe602 100644 +index bcf855b549e24929865ce4ca32ce15975b06f951..30f15491e6b18f51df9ccfc9b140251ba9ece400 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -186,6 +186,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -188,6 +188,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch index 8d0b0167af..5783731251 100644 --- a/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch @@ -43,10 +43,10 @@ index e7fb982913f391bafd608c4626086cd9cab7fad7..7f2d8de12473c5413bbfc10ea0947d6a return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cc920cb20a7c1c77257e0219137775b362dfe602..0857e46a3b1e5cfa59907f092d0b174745c2c558 100644 +index 30f15491e6b18f51df9ccfc9b140251ba9ece400..7374bd398e89cbaa6670e726a11aec9be78ba1c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1058,8 +1058,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1073,8 +1073,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().getId()); } diff --git a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch index 43ddca716a..051495afeb 100644 --- a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0857e46a3b1e5cfa59907f092d0b174745c2c558..04d6c2160aa13a8158cd4a3cffa9e1d2d5addb08 100644 +index 7374bd398e89cbaa6670e726a11aec9be78ba1c3..816325719eb6150a300bb0d9193928cddf530ecd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ @@ -68,7 +68,7 @@ index 0857e46a3b1e5cfa59907f092d0b174745c2c558..04d6c2160aa13a8158cd4a3cffa9e1d2 import net.minecraft.server.MapIcon; import net.minecraft.server.MinecraftKey; import net.minecraft.server.NBTTagCompound; -@@ -1216,8 +1219,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1231,8 +1234,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -83,7 +83,7 @@ index 0857e46a3b1e5cfa59907f092d0b174745c2c558..04d6c2160aa13a8158cd4a3cffa9e1d2 PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1258,8 +1266,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1273,8 +1281,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -98,7 +98,7 @@ index 0857e46a3b1e5cfa59907f092d0b174745c2c558..04d6c2160aa13a8158cd4a3cffa9e1d2 getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1268,6 +1281,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1283,6 +1296,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } diff --git a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch index bfbcfea2b4..78c11a8d05 100644 --- a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 04d6c2160aa13a8158cd4a3cffa9e1d2d5addb08..6270010f04a51c3bc5d434e617eb755daba59cb4 100644 +index 816325719eb6150a300bb0d9193928cddf530ecd..3d1c26cd9a8917b223736bcc9c8000b0f8b46a64 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -144,6 +144,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 04d6c2160aa13a8158cd4a3cffa9e1d2d5addb08..6270010f04a51c3bc5d434e617eb755d // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1487,7 +1488,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1502,7 +1503,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0209-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0209-Add-method-to-open-already-placed-sign.patch index abc0e8ae04..b1d6073ea4 100644 --- a/Spigot-Server-Patches/0209-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0209-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 30ba0a6aa2fd8c281f1129ad3098ee1033c32f8c..27b2ee740a705238995dd3bcea62b4bf74ec82dc 100644 +index 1f715fb44b85f14664affcce9a11928dfc82991b..fe8a21202340c5892f5166ec294212c6e44ed3a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -585,4 +585,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -596,4 +596,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { entity.remove(); } } diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index ac6091e411..62f5d5c85c 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -136,10 +136,10 @@ index 10eb83bec33050ec1054de493960c87f67d4ec66..4675ddb1f7c989521dfc9fbd0367e6fb } // 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 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc62a06225d 100644 +index fe8a21202340c5892f5166ec294212c6e44ed3a5..00d67c9911c52ddcdf48fda7998bcd2a8a35f0eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -435,8 +435,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -436,8 +436,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { @@ -155,10 +155,10 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6270010f04a51c3bc5d434e617eb755daba59cb4..b40666d74c88e1af8ff126c780f17b357a2ab86b 100644 +index 3d1c26cd9a8917b223736bcc9c8000b0f8b46a64..d494f8d7695249b43cd28ac2684e35bd8faaeea0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -791,7 +791,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { diff --git a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index 7ac08850e1..3b6515572d 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch @@ -27,10 +27,10 @@ index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b40666d74c88e1af8ff126c780f17b357a2ab86b..a5d324f6d045c81d55a6bcc638205f509b151da4 100644 +index d494f8d7695249b43cd28ac2684e35bd8faaeea0..cafad51e27dd0ea4f1a2c4ce49b5c4adf4516827 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1950,6 +1950,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1965,6 +1965,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index 64f652cf2e..a64715620e 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -357,10 +357,10 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a5d324f6d045c81d55a6bcc638205f509b151da4..99a0b73a552fa5310e90cfa4dcf208173da4814c 100644 +index cafad51e27dd0ea4f1a2c4ce49b5c4adf4516827..9e808c70a8e9762e912b693027d5fbed85f85823 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1741,7 +1741,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1756,7 +1756,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { diff --git a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 71129e3332..d2c414c57d 100644 --- a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -106,10 +106,10 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 99a0b73a552fa5310e90cfa4dcf208173da4814c..725155a47154d3e40c90b5f40ea37d80f5e27cc5 100644 +index 9e808c70a8e9762e912b693027d5fbed85f85823..8a251bb55c79c34880599a490efd271a36a09a04 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -145,6 +145,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 99a0b73a552fa5310e90cfa4dcf208173da4814c..725155a47154d3e40c90b5f40ea37d80 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1391,6 +1392,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1406,6 +1407,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 99a0b73a552fa5310e90cfa4dcf208173da4814c..725155a47154d3e40c90b5f40ea37d80 public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1413,6 +1426,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1428,6 +1441,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index 99a0b73a552fa5310e90cfa4dcf208173da4814c..725155a47154d3e40c90b5f40ea37d80 if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1427,6 +1442,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1442,6 +1457,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); diff --git a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch index 41eead992c..85bb8b8be4 100644 --- a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 725155a47154d3e40c90b5f40ea37d80f5e27cc5..bfb1beb4eaade3e198ea179f221de8f3e9c682af 100644 +index 8a251bb55c79c34880599a490efd271a36a09a04..3f6db7e3fcc8fc5e8e1aa1f9add4bfe12f824d0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1995,6 +1995,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2010,6 +2010,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } diff --git a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch index 83ca85384f..5edfb94ac0 100644 --- a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch @@ -40,10 +40,10 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bfb1beb4eaade3e198ea179f221de8f3e9c682af..5277fceedccc355698ee1895306a3666bf5c47cd 100644 +index 3f6db7e3fcc8fc5e8e1aa1f9add4bfe12f824d0b..4a147c5f56c56a4014b766aa3f56060f1a2ab495 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2004,6 +2004,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2019,6 +2019,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } diff --git a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch index c36f6c8b1a..5f5192528c 100644 --- a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch @@ -36,10 +36,10 @@ index 03e1b76a8b6850a26ed8a7b1992e09756166f5b8..27926559a665a5af14f11b8b4331cdb5 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index f6209e9c0b9e0ab99693025d23847bc62a06225d..1c271ee568a02f1ab9c8722b840444f5cf5d657f 100644 +index 00d67c9911c52ddcdf48fda7998bcd2a8a35f0eb..75aa141e86e301254b25ede3da67513aae76fa5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -318,7 +318,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -319,7 +319,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { String title = container.getBukkitView().getTitle(); @@ -48,7 +48,7 @@ index f6209e9c0b9e0ab99693025d23847bc62a06225d..1c271ee568a02f1ab9c8722b840444f5 getHandle().activeContainer = container; getHandle().activeContainer.addSlotListener(player); } -@@ -388,7 +388,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -389,7 +389,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // Now open the window Containers windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); String title = inventory.getTitle(); diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch index c2d3cba136..464d7b08f4 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5277fceedccc355698ee1895306a3666bf5c47cd..9a6e6a75338f3ab7f8247c5f9e660f0d3cb1177d 100644 +index 4a147c5f56c56a4014b766aa3f56060f1a2ab495..517a4b64e8e0a3237c349fa284d23b43039035f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ @@ -170,7 +170,7 @@ index 5277fceedccc355698ee1895306a3666bf5c47cd..9a6e6a75338f3ab7f8247c5f9e660f0d import com.destroystokyo.paper.Title; import com.destroystokyo.paper.profile.CraftPlayerProfile; import com.destroystokyo.paper.profile.PlayerProfile; -@@ -2014,6 +2017,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2029,6 +2032,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO } diff --git a/Spigot-Server-Patches/0487-Potential-bed-API.patch b/Spigot-Server-Patches/0487-Potential-bed-API.patch index 3e0e6af768..75be78853a 100644 --- a/Spigot-Server-Patches/0487-Potential-bed-API.patch +++ b/Spigot-Server-Patches/0487-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 1c271ee568a02f1ab9c8722b840444f5cf5d657f..7c22a24d0b50f0a8f4ccfef87f7f77028c3188c6 100644 +index 75aa141e86e301254b25ede3da67513aae76fa5c..fef2035fe5564645d786d042dceedb10ca8b59ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -126,6 +126,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -127,6 +127,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return getHandle().sleepTicks; } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 39dceb33c3..64473f8ce1 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1223,10 +1223,10 @@ index 11559f9e4b3f5fda6bfe4f70f963ce4f7967f051..bf2f602bb07aa4c7c0a22ad9be9e77d7 net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9a6e6a75338f3ab7f8247c5f9e660f0d3cb1177d..db617e04fe492fc7c1bbfe0afd56a4ddb46b5d65 100644 +index 517a4b64e8e0a3237c349fa284d23b43039035f4..c7b4e5f2a26aaa83520b55ec5c917d63980c8041 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -744,6 +744,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); } diff --git a/work/Bukkit b/work/Bukkit index 6ff65c824a..1cb03826eb 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 6ff65c824ad8dc9ba9228999800a0d7010904893 +Subproject commit 1cb03826ebde4ef887519ce37b0a2a341494a183 diff --git a/work/CraftBukkit b/work/CraftBukkit index d9bd43b060..551e770f5f 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit d9bd43b060322ad72af3008669878ee5d6cc2cc0 +Subproject commit 551e770f5f981053885e2e1a043b4ecb54a80aef From a96d3e8984cffbde26056190800602aa0a4a9319 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 21:27:09 -0400 Subject: [PATCH 84/95] [Auto] Updated Upstream (CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: dc7c3c61f SPIGOT-5921: Improve setNoDamageTicks for Players 53849f57f SPIGOT-5922: Smithing recipes not registering --- Spigot-Server-Patches/0002-Paper-config-files.patch | 12 ++++++------ Spigot-Server-Patches/0009-Timings-v2.patch | 8 ++++---- ...r-in-client-crashes-server-lists-and-Mojang.patch | 4 ++-- .../0020-Player-affects-spawning-API.patch | 4 ++-- .../0023-Further-improve-server-tick-loop.patch | 4 ++-- .../0044-Ensure-commands-are-not-ran-async.patch | 4 ++-- .../0046-Expose-server-CommandMap.patch | 4 ++-- .../0052-Add-velocity-warnings.patch | 4 ++-- .../0058-Complete-resource-pack-API.patch | 4 ++-- ...ault-loading-permissions.yml-before-plugins.patch | 6 +++--- .../0061-Allow-Reloading-of-Custom-Permissions.patch | 4 ++-- .../0062-Remove-Metadata-on-reload.patch | 4 ++-- ...aN-health-absorb-values-and-repair-bad-data.patch | 4 ++-- .../0091-Implement-PlayerLocaleChangeEvent.patch | 4 ++-- ...08-Add-setting-for-proxy-online-mode-status.patch | 4 ++-- .../0120-Allow-Reloading-of-Command-Aliases.patch | 4 ++-- ...guration-option-to-prevent-player-names-fro.patch | 4 ++-- ...nalConsoleAppender-for-console-improvements.patch | 6 +++--- .../0151-Add-UnknownCommandEvent.patch | 6 +++--- .../0152-Basic-PlayerProfile-API.patch | 6 +++--- .../0181-AsyncTabCompleteEvent.patch | 4 ++-- .../0204-getPlayerUniqueId-API.patch | 4 ++-- .../0267-Add-Early-Warning-Feature-to-WatchDog.patch | 6 +++--- ...5-Expose-attack-cooldown-methods-for-Player.patch | 4 ++-- .../0286-Improve-death-events.patch | 4 ++-- .../0305-Add-Velocity-IP-Forwarding-Support.patch | 6 +++--- ...the-default-permission-message-configurable.patch | 4 ++-- ...-Entity-remove-from-being-called-on-Players.patch | 4 ++-- ...4-Per-Player-View-Distance-API-placeholders.patch | 4 ++-- ...Server-isPrimaryThread-and-MinecraftServer-.patch | 4 ++-- .../0391-Expose-the-internal-current-tick.patch | 4 ++-- .../0441-Add-tick-times-API-and-mspt-command.patch | 4 ++-- .../0442-Expose-MinecraftServer-isRunning.patch | 4 ++-- .../0447-Improved-Watchdog-Support.patch | 6 +++--- .../0458-Implement-Player-Client-Options-API.patch | 4 ++-- Spigot-Server-Patches/0473-Expose-game-version.patch | 4 ++-- .../0477-Implement-Mob-Goal-API.patch | 4 ++-- .../0488-Wait-for-Async-Tasks-during-shutdown.patch | 4 ++-- ...507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch | 6 +++--- work/CraftBukkit | 2 +- 40 files changed, 93 insertions(+), 93 deletions(-) diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index e4af6d843b..827cabcf4c 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -636,10 +636,10 @@ index d5e1da2eeea7c06289f52509af844df59e8a29b2..63d3d43f74bed94cd03aa3b7254e6630 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 2c23fb72d3965f2c35c12b3d130725644d389ca0..38d6a46ec51c12983d229d962eb7dc3701ce13fd 100644 +index d05c57ce64b7d880ffd7dbd387d56f05f05cd3f0..239fa2404859d233161764cceec5cd0fc37899b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -801,6 +801,7 @@ public final class CraftServer implements Server { +@@ -803,6 +803,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -647,7 +647,7 @@ index 2c23fb72d3965f2c35c12b3d130725644d389ca0..38d6a46ec51c12983d229d962eb7dc37 for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -834,6 +835,7 @@ public final class CraftServer implements Server { +@@ -836,6 +837,7 @@ public final class CraftServer implements Server { world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns(); } world.spigotConfig.init(); // Spigot @@ -655,7 +655,7 @@ index 2c23fb72d3965f2c35c12b3d130725644d389ca0..38d6a46ec51c12983d229d962eb7dc37 } pluginManager.clearPlugins(); -@@ -841,6 +843,7 @@ public final class CraftServer implements Server { +@@ -843,6 +845,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -663,7 +663,7 @@ index 2c23fb72d3965f2c35c12b3d130725644d389ca0..38d6a46ec51c12983d229d962eb7dc37 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2075,4 +2078,35 @@ public final class CraftServer implements Server { +@@ -2079,4 +2082,35 @@ public final class CraftServer implements Server { { return spigot; } @@ -700,7 +700,7 @@ index 2c23fb72d3965f2c35c12b3d130725644d389ca0..38d6a46ec51c12983d229d962eb7dc37 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 9ff914194ca72c2d0d4c63a12fa4441aee93429d..5d8a9361151985f8a8215797592f7998a186152d 100644 +index a5c4b7f28f13f0aad4712912f60ba5fc6785539a..3d15661eb1f15f74213ecb7e8eceb1f231ad2c1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -129,6 +129,14 @@ public class Main { diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 8ec1d6164d..703cf62b37 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1758,10 +1758,10 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea // 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 38d6a46ec51c12983d229d962eb7dc3701ce13fd..9947bbbb8ca2810bce420cdd12a1874afd6b1c0c 100644 +index 239fa2404859d233161764cceec5cd0fc37899b9..c6c4033b16df4d31e87f4dca8d9293698e03958a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2048,12 +2048,31 @@ public final class CraftServer implements Server { +@@ -2052,12 +2052,31 @@ public final class CraftServer implements Server { private final Spigot spigot = new Spigot() { @@ -1963,10 +1963,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 b00c75bad4bb0fc51c40ab9cbdd611610a6315c0..e0c097a789d2110da609c1410a2f542a931e85e9 100644 +index 82d302832c579b4524121d21332c999a4d757de6..f8c4fb312232f1689fd19e165830e62609813213 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1772,6 +1772,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1778,6 +1778,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 8c30cfda94..c9b447679a 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -32,10 +32,10 @@ index 0867ad04857c652dcbcdf130bb5353113ea039a0..9eacc1ba58986c21c5d8dc8d8d14c6f3 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 9947bbbb8ca2810bce420cdd12a1874afd6b1c0c..c9995ba10ac864fe4168196fa1932b689dc0a534 100644 +index c6c4033b16df4d31e87f4dca8d9293698e03958a..a07014ecb5789b4df4a770407f96c8c6edc6c579 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -224,7 +224,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/0020-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch index a8c0179355..b2299e257b 100644 --- a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch @@ -119,10 +119,10 @@ index 4f7dc23d67e97f9a2b8983750299fc43b0ed6db9..a4a48dbee002e96a5644d9a033f9f233 public void c() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e0c097a789d2110da609c1410a2f542a931e85e9..ca7fa1ee3ebddb8e395395fcce35059f2e0ee52a 100644 +index f8c4fb312232f1689fd19e165830e62609813213..8d4a0513df27767053342eddda05398eae7b46be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1684,7 +1684,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1690,7 +1690,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return getHandle().locale; diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index 80693b991b..8441b80889 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -140,10 +140,10 @@ index 9eacc1ba58986c21c5d8dc8d8d14c6f3b48fd171..7b58499c24d5a4296cc539087ca86d2e 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 c9995ba10ac864fe4168196fa1932b689dc0a534..4eaf0e5be8cfd5b6455701adace14fb750192af5 100644 +index a07014ecb5789b4df4a770407f96c8c6edc6c579..4edc9d892a18f7ea2b22f597ee075b09cf843eaf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2045,6 +2045,17 @@ public final class CraftServer implements Server { +@@ -2049,6 +2049,17 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } diff --git a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch index e260f5e5a2..4b8e06ce41 100644 --- a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch @@ -48,10 +48,10 @@ index 88fa8d63c5bb2c76ba09db6bb002f6d6b6a42afc..8ecca907357119ed8eb67381914daba4 } 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 4eaf0e5be8cfd5b6455701adace14fb750192af5..b5660a117faff08befa28d26ebe0db5ff83e829a 100644 +index 4edc9d892a18f7ea2b22f597ee075b09cf843eaf..e6836b4afa60de8990cbc3e8a3bb39edd753782e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -752,6 +752,29 @@ public final class CraftServer implements Server { +@@ -754,6 +754,29 @@ public final class CraftServer implements Server { Validate.notNull(commandLine, "CommandLine cannot be null"); org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot diff --git a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch index dc7b54737d..13527a1fe7 100644 --- a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0046-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 b5660a117faff08befa28d26ebe0db5ff83e829a..6dedd9c3b36770ba1e03a8586e65c27ba822d9ad 100644 +index e6836b4afa60de8990cbc3e8a3bb39edd753782e..6fdc6caa4d58aea28911442ac29d7420926b30f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1699,6 +1699,7 @@ public final class CraftServer implements Server { +@@ -1703,6 +1703,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch b/Spigot-Server-Patches/0052-Add-velocity-warnings.patch index 4b42fafe34..4460e8b19e 100644 --- a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0052-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 6dedd9c3b36770ba1e03a8586e65c27ba822d9ad..911c7daafda30acd9dd03fc230700a4aeb535943 100644 +index 6fdc6caa4d58aea28911442ac29d7420926b30f4..3c95cbc18826912eb53205c6fb1387af90a5804c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -260,6 +260,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/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch index 6a1bc088b8..ce3f992206 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch @@ -22,7 +22,7 @@ index 8ecca907357119ed8eb67381914daba4ae6db38f..ffed0587323dbf522e478f43948bbb03 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a7526e8f5e2fe3b22133181659be791acbc05d57..109139673561175819821ff992d0d8846878b91a 100644 +index c90d3c8fe0965f437fe17979978f1189a27851ac..34a3e269c59d1797c764a2dc6c5ba9e646792084 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -138,6 +138,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -36,7 +36,7 @@ index a7526e8f5e2fe3b22133181659be791acbc05d57..109139673561175819821ff992d0d884 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1788,6 +1792,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1794,6 +1798,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index bbf1900a4b..20942b4e3e 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -30,10 +30,10 @@ index a62f4bbb973b9cb6d1ee53f56a0897d70ae176af..f207abbe757ad403a29a7a012903aaa8 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 911c7daafda30acd9dd03fc230700a4aeb535943..6d453e01ce4a4eb732521e90379a0b402bfffcfb 100644 +index 3c95cbc18826912eb53205c6fb1387af90a5804c..aa74c838147d67c9cbfcff1f9b0dc653808fb109 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -397,6 +397,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 911c7daafda30acd9dd03fc230700a4aeb535943..6d453e01ce4a4eb732521e90379a0b40 } Plugin[] plugins = pluginManager.getPlugins(); -@@ -416,7 +417,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/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index d6b9c4afd7..2ff1c55e2c 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-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 6d453e01ce4a4eb732521e90379a0b402bfffcfb..cb0914270e724dda76c2abf7de66733c16f89496 100644 +index aa74c838147d67c9cbfcff1f9b0dc653808fb109..7c4ef70f540de9d5486d1ccef65ef8d82580694e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2164,5 +2164,23 @@ public final class CraftServer implements Server { +@@ -2168,5 +2168,23 @@ public final class CraftServer implements Server { return null; } } diff --git a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch index b17123c662..438bdff912 100644 --- a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0062-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 cb0914270e724dda76c2abf7de66733c16f89496..4e3a1c7d5cc4466e214ea4fd9b05bef892ecfef7 100644 +index 7c4ef70f540de9d5486d1ccef65ef8d82580694e..660f0362303df0fa990fa8f1507435666445c228 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -863,8 +863,18 @@ public final class CraftServer implements Server { +@@ -865,8 +865,18 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } diff --git a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 330ffd436e..d93286a406 100644 --- a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,10 +44,10 @@ index f1080e7d10d5105e3f4010489393f6150c7c4a75..374e4a3dcb656d6a84e05bb9260d3198 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 109139673561175819821ff992d0d8846878b91a..3d28ed4de1956d5ca7d11b63934a2bc174ef9d76 100644 +index 34a3e269c59d1797c764a2dc6c5ba9e646792084..2e8105fe1d0f5f953ac8ba94df3e8eb66b7813d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1605,6 +1605,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1611,6 +1611,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch index f1ef9bab64..636bb65500 100644 --- a/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch @@ -40,10 +40,10 @@ index 7eb56761d9073156b30d4c981dcd4b4ba646f0bc..ab89e508ee8b8142fb7c0b5101b0b0e1 this.cg = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0654819e8fbbe923b1aa439983af020dc39c6734..f8e141190c43bf9be1a7d782e8a22d74c5dedd95 100644 +index 532698f80bb2e266f27ae1d4b70c80138560b8cc..9e9d054ed9d345eb7ab76ad9c3526889aeb220e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1791,8 +1791,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1797,8 +1797,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { 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 7385cde218..c2dbc7b148 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 4e3a1c7d5cc4466e214ea4fd9b05bef892ecfef7..04593705633b94b35c291e9622615ca0ad9ef9a4 100644 +index 660f0362303df0fa990fa8f1507435666445c228..6d466ddc9c373fe314bf4d113a10407edeb9b22d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1477,7 +1477,8 @@ public final class CraftServer implements Server { +@@ -1481,7 +1481,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/0120-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch index a8aae9e9ce..997276c405 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 04593705633b94b35c291e9622615ca0ad9ef9a4..d670295d6857276e3382b5d38afa25d1c93d7278 100644 +index 6d466ddc9c373fe314bf4d113a10407edeb9b22d..d83e3be6f1997b993f6d4e65b190af5ad3056328 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2193,5 +2193,24 @@ public final class CraftServer implements Server { +@@ -2197,5 +2197,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } 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 89da1638aa..2cf160e8c6 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 c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d670295d6857276e3382b5d38afa25d1c93d7278..542b813d4c870b93faae055a067b2bcf9216437e 100644 +index d83e3be6f1997b993f6d4e65b190af5ad3056328..bd06db4fa4ea5d8db45f4f0bc1222bb1da8a3230 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2212,5 +2212,10 @@ public final class CraftServer implements Server { +@@ -2216,5 +2216,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 ef99f9e8ba..ddace6af6c 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 753efa30bdb0af9ac2b0ad11dfb7a6b052f91a09..a17cae9d7f9c18b7f9a3d7970e902f4a 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 542b813d4c870b93faae055a067b2bcf9216437e..1294df20d8f958103a3e207ecca80c102fa91b56 100644 +index bd06db4fa4ea5d8db45f4f0bc1222bb1da8a3230..aa7fd35d6fab1cbbf4c4cd0575bb5be788755fc0 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 542b813d4c870b93faae055a067b2bcf9216437e..1294df20d8f958103a3e207ecca80c10 import net.minecraft.server.Advancement; import net.minecraft.server.ArgumentEntity; import net.minecraft.server.BiomeManager; -@@ -1196,9 +1196,13 @@ public final class CraftServer implements Server { +@@ -1198,9 +1198,13 @@ public final class CraftServer implements Server { return logger; } @@ -286,7 +286,7 @@ index 542b813d4c870b93faae055a067b2bcf9216437e..1294df20d8f958103a3e207ecca80c10 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 21295058e25c8d5a7b4867fc9f6120e9a6935b26..fbf4aaa1c47520aa0189e65fa7adb6e69d2fa889 100644 +index b1157195cf00a05d3417bccf781fdf58ff9919b6..b77b051137f66106bac396debe0c0542ac86e257 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -12,7 +12,7 @@ import java.util.logging.Level; diff --git a/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch index 7a19dca6cd..a630962a8b 100644 --- a/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch @@ -5,7 +5,7 @@ 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 1294df20d8f958103a3e207ecca80c102fa91b56..9c7667d042e01dc4d614564770bc59fa7daba598 100644 +index aa7fd35d6fab1cbbf4c4cd0575bb5be788755fc0..33727f110d8025394536434fa2b474f653a1f16d 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; @@ -16,7 +16,7 @@ index 1294df20d8f958103a3e207ecca80c102fa91b56..9c7667d042e01dc4d614564770bc59fa import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -@@ -176,6 +177,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 1294df20d8f958103a3e207ecca80c102fa91b56..9c7667d042e01dc4d614564770bc59fa import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerChatTabCompleteEvent; import org.bukkit.event.server.BroadcastMessageEvent; -@@ -783,7 +785,13 @@ public final class CraftServer implements Server { +@@ -785,7 +787,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 afbd95a636..d8a6210278 100644 --- a/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch @@ -519,10 +519,10 @@ index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f72625466 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9c7667d042e01dc4d614564770bc59fa7daba598..a77beb5b66923bcc35974a2dd51b671ba8bd0078 100644 +index 33727f110d8025394536434fa2b474f653a1f16d..73b69d4acda27995961306831c39696604559ad6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -225,6 +225,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 @@ -532,7 +532,7 @@ index 9c7667d042e01dc4d614564770bc59fa7daba598..a77beb5b66923bcc35974a2dd51b671b public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2229,5 +2232,24 @@ public final class CraftServer implements Server { +@@ -2233,5 +2236,24 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0181-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0181-AsyncTabCompleteEvent.patch index 289ce9affb..cae2dcaad4 100644 --- a/Spigot-Server-Patches/0181-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0181-AsyncTabCompleteEvent.patch @@ -72,10 +72,10 @@ index 76cd3ea9512f4355a055d9c683d939680dc5a1b7..ccf083fbfa97b2a24338a3c1fe18e9a8 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a77beb5b66923bcc35974a2dd51b671ba8bd0078..3954eb18bb28ad9033c957e05a13068b8751dbc9 100644 +index 73b69d4acda27995961306831c39696604559ad6..bfe812fdb3aca643634281a57c4f94509dbe70b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1785,7 +1785,7 @@ public final class CraftServer implements Server { +@@ -1789,7 +1789,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch index 78fc6ba536..05932a190f 100644 --- a/Spigot-Server-Patches/0204-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0204-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 3954eb18bb28ad9033c957e05a13068b8751dbc9..22b5a20b1183d2421e4f43245b1ace30adffb7e8 100644 +index bfe812fdb3aca643634281a57c4f94509dbe70b1..79c4ed5aa074b00d7026311f22d5a9e44666ed62 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1481,6 +1481,26 @@ public final class CraftServer implements Server { +@@ -1485,6 +1485,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch index 7501053a92..e0738f591b 100644 --- a/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0267-Add-Early-Warning-Feature-to-WatchDog.patch @@ -48,10 +48,10 @@ index 1698b42ed56a2932c5c1d60c655c9fd4cf5bed66..b13d8ec9aa0a51d5432129f1b0ecef3b 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 22b5a20b1183d2421e4f43245b1ace30adffb7e8..8cd2742f93b8d18c17053c94184c4c23990de951 100644 +index 79c4ed5aa074b00d7026311f22d5a9e44666ed62..d12dc8e7df24dc94ec4b1845444c9aced92a189b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -803,6 +803,7 @@ public final class CraftServer implements Server { +@@ -805,6 +805,7 @@ public final class CraftServer implements Server { @Override public void reload() { @@ -59,7 +59,7 @@ index 22b5a20b1183d2421e4f43245b1ace30adffb7e8..8cd2742f93b8d18c17053c94184c4c23 reloadCount++; configuration = YamlConfiguration.loadConfiguration(getConfigFile()); commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile()); -@@ -921,6 +922,7 @@ public final class CraftServer implements Server { +@@ -923,6 +924,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/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index 3b6515572d..5ffe7886c1 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch @@ -27,10 +27,10 @@ index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d494f8d7695249b43cd28ac2684e35bd8faaeea0..cafad51e27dd0ea4f1a2c4ce49b5c4adf4516827 100644 +index c7e43f5015851d44870986c6cd6c43b3332cf9be..21aa19081ca3d9c20ea8e401c2a4b830ba667a51 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1965,6 +1965,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1971,6 +1971,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index a64715620e..75067bdcbf 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -357,10 +357,10 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cafad51e27dd0ea4f1a2c4ce49b5c4adf4516827..9e808c70a8e9762e912b693027d5fbed85f85823 100644 +index 21aa19081ca3d9c20ea8e401c2a4b830ba667a51..1398d911456b6e685bf7292687c5f5a4dcea5b7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1756,7 +1756,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1762,7 +1762,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { diff --git a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch index 3e6bd5b395..59515d1aeb 100644 --- a/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch @@ -227,7 +227,7 @@ index 8cb29ddc0d5a5951ea35e1a16c023efb9b0be42d..2916119507ec5ecd9266569b0003d050 public java.util.UUID spoofedUUID; public com.mojang.authlib.properties.Property[] spoofedProfile; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index 91235f7bc80967a759ed8bb25d74ff0af6e25ef4..c20a3b6eb8c836d2d84995b91a98390e04e3ae51 100644 +index 7e116d83a62ef42e241ee9e05fdd7ecb30a2ed95..31e7fb56206a522a335f5e78afd09324d1c38864 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -164,6 +164,7 @@ public class PacketDataSerializer extends ByteBuf { @@ -289,10 +289,10 @@ index ae74dc9e183e66062455cf2a18ab43ae87976046..7eb230f1b27eddf48f1b12fc78877a36 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 8cd2742f93b8d18c17053c94184c4c23990de951..237dda5e5c1bd3fc01152b865a7ed47617588cc4 100644 +index d12dc8e7df24dc94ec4b1845444c9aced92a189b..86f881b76453c974cf648beaf7dbcc52df38abda 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -675,7 +675,7 @@ public final class CraftServer implements Server { +@@ -677,7 +677,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/0319-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch index 840c71a937..cba93be65f 100644 --- a/Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch @@ -29,10 +29,10 @@ index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 237dda5e5c1bd3fc01152b865a7ed47617588cc4..0fc130c00909a7f779d5f84bc9309b07277940cc 100644 +index 86f881b76453c974cf648beaf7dbcc52df38abda..5f3ca7ffeefcc5ea825b66f86763e3dc550c01af 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2255,6 +2255,11 @@ public final class CraftServer implements Server { +@@ -2259,6 +2259,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch index 85bb8b8be4..d812f77656 100644 --- a/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8a251bb55c79c34880599a490efd271a36a09a04..3f6db7e3fcc8fc5e8e1aa1f9add4bfe12f824d0b 100644 +index 305deccc0343563ba6080ad75d7397c7c8dd7435..ea083f0987fb85afdf23d894bdd8980cc6707e51 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2010,6 +2010,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2016,6 +2016,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } diff --git a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch index 5edfb94ac0..a7b20bc41b 100644 --- a/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch @@ -40,10 +40,10 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3f6db7e3fcc8fc5e8e1aa1f9add4bfe12f824d0b..4a147c5f56c56a4014b766aa3f56060f1a2ab495 100644 +index ea083f0987fb85afdf23d894bdd8980cc6707e51..93bf15984f541b4daf05e4c27f105f9787cb0347 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2019,6 +2019,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2025,6 +2025,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } diff --git a/Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 9f9d7dce71..d2dc06e49c 100644 --- a/Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -29,10 +29,10 @@ index a97e6bc15dd07594379475e5dec0fc957ca1314a..b9e047643e1c3f84f26d936fcb067f60 public boolean isDebugging() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0fc130c00909a7f779d5f84bc9309b07277940cc..aaca0623cb69b84198b9747c8acf48e60843f300 100644 +index 5f3ca7ffeefcc5ea825b66f86763e3dc550c01af..04349821b5ffdc9e7f81de072bfb01b1b6dcf684 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { +@@ -1785,7 +1785,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { diff --git a/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch index ac92a289f1..7b3a02cf82 100644 --- a/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0391-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 aaca0623cb69b84198b9747c8acf48e60843f300..c1aa9a083eea86480569b31065c2ecb85d65e12b 100644 +index 04349821b5ffdc9e7f81de072bfb01b1b6dcf684..f3169a2b9b2c4a06d6502cb96ddca8616cbcbf32 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2278,5 +2278,10 @@ public final class CraftServer implements Server { +@@ -2282,5 +2282,10 @@ public final class CraftServer implements Server { } return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name); } diff --git a/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch index 3085dbf980..73ee96c425 100644 --- a/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch @@ -147,10 +147,10 @@ index 5b6f3d811ff55d0c6d55bddc7707ef878baff782..04eb2af28f9843ef7641f5464d2a043c + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c1aa9a083eea86480569b31065c2ecb85d65e12b..e259c9556314c153227be8181c2bfac7ef179099 100644 +index f3169a2b9b2c4a06d6502cb96ddca8616cbcbf32..831d03ec0b60757450acfff1260ffab03e37039b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2128,6 +2128,16 @@ public final class CraftServer implements Server { +@@ -2132,6 +2132,16 @@ public final class CraftServer implements Server { net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() }; } diff --git a/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch index 255850ef7e..b3d0ca50b7 100644 --- a/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-Server-Patches/0442-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 e259c9556314c153227be8181c2bfac7ef179099..0bd77c641890802c715a0d8adc83c4aaf20d6ffe 100644 +index 831d03ec0b60757450acfff1260ffab03e37039b..f7e1f50c672705802b1ee9e2413211882ad21b97 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2293,5 +2293,10 @@ public final class CraftServer implements Server { +@@ -2297,5 +2297,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } diff --git a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch index 4d71302f4d..a74ab39e8c 100644 --- a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch @@ -328,10 +328,10 @@ index 93df6a29035bb3cc96409b145a2e1433d38bbe99..418ba04a837ee2b17cc679edd35ba098 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/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0bd77c641890802c715a0d8adc83c4aaf20d6ffe..c06e5c2be056020a5954f25ecb4d185fe399e3f3 100644 +index f7e1f50c672705802b1ee9e2413211882ad21b97..7981f23d043142615a6a0043ba748b22532ded22 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { +@@ -1785,7 +1785,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { @@ -341,7 +341,7 @@ index 0bd77c641890802c715a0d8adc83c4aaf20d6ffe..c06e5c2be056020a5954f25ecb4d185f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 438e86595760be233e89c49224963e5e8ce335e3..894552adf119037e97c7de27d783920db580f62b 100644 +index 5ec16547a20271074d034f7fbcb43e86cb1597e6..3e4454a14fdf6305b262c15cf67203854debef28 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -150,6 +150,37 @@ public class Main { diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch index 464d7b08f4..14d03e7a9b 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4a147c5f56c56a4014b766aa3f56060f1a2ab495..517a4b64e8e0a3237c349fa284d23b43039035f4 100644 +index 93bf15984f541b4daf05e4c27f105f9787cb0347..e3ae90aa7c2c067741540995fbb1c694b663f624 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ @@ -170,7 +170,7 @@ index 4a147c5f56c56a4014b766aa3f56060f1a2ab495..517a4b64e8e0a3237c349fa284d23b43 import com.destroystokyo.paper.Title; import com.destroystokyo.paper.profile.CraftPlayerProfile; import com.destroystokyo.paper.profile.PlayerProfile; -@@ -2029,6 +2032,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2035,6 +2038,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO } diff --git a/Spigot-Server-Patches/0473-Expose-game-version.patch b/Spigot-Server-Patches/0473-Expose-game-version.patch index 3c954a2324..adbc9ffe64 100644 --- a/Spigot-Server-Patches/0473-Expose-game-version.patch +++ b/Spigot-Server-Patches/0473-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 c06e5c2be056020a5954f25ecb4d185fe399e3f3..c2d70667b4ea98572dbcefc0ec3b801624783e1f 100644 +index 7981f23d043142615a6a0043ba748b22532ded22..ed08106c56974bebed1a32a1c865e1169308c787 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -516,6 +516,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/0477-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch index 9585061b58..3e34ad498c 100644 --- a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch @@ -870,10 +870,10 @@ index 96f4401044cacf88e8e00b5b18821c105e634fba..112d8bab65bf41263a477c5faa717687 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 c2d70667b4ea98572dbcefc0ec3b801624783e1f..b9291bc3c9c511d698e3a6478bb31562625c0466 100644 +index ed08106c56974bebed1a32a1c865e1169308c787..b62e068d5af2b9a43796c721e5cc291976d933a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2305,5 +2305,11 @@ public final class CraftServer implements Server { +@@ -2309,5 +2309,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch index 5a56c03187..5c20dd5058 100644 --- a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,10 +22,10 @@ index b32d41fac5f855e302469209f368c3674b849fe3..7c1c929819c450f853c91618b2853fcb // 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 b9291bc3c9c511d698e3a6478bb31562625c0466..f408ef0d488d3f602d9254394c6e2e8ecce2f944 100644 +index b62e068d5af2b9a43796c721e5cc291976d933a1..72cd690a192a0eb468d77aa1779f2a5eec60fdc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -932,6 +932,35 @@ public final class CraftServer implements Server { +@@ -934,6 +934,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/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index f744757a79..07c1b2e67c 100644 --- a/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0507-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 f408ef0d488d3f602d9254394c6e2e8ecce2f944..3bbc2d78b38f3e6353e80c7d99c16bef74a4d6c1 100644 +index 72cd690a192a0eb468d77aa1779f2a5eec60fdc2..56bf840e3d514153ed249093761ddcc04b282403 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -344,7 +344,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 f408ef0d488d3f602d9254394c6e2e8ecce2f944..3bbc2d78b38f3e6353e80c7d99c16bef minimumAPI = configuration.getString("settings.minimum-api"); loadIcon(); } -@@ -827,7 +827,7 @@ public final class CraftServer implements Server { +@@ -829,7 +829,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")); diff --git a/work/CraftBukkit b/work/CraftBukkit index 551e770f5f..dc7c3c61fa 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 551e770f5f981053885e2e1a043b4ecb54a80aef +Subproject commit dc7c3c61fa061c87eca5d158f1f1c369620622b6 From f32d7fb2d28a6db90a1ceac1ef2d3a3b32535bc6 Mon Sep 17 00:00:00 2001 From: chickeneer Date: Wed, 1 Jul 2020 22:02:07 -0500 Subject: [PATCH 85/95] Add more material tags for 1.16 (#3750) --- .../0154-Add-Material-Tags.patch | 88 +++++++++++++------ 1 file changed, 62 insertions(+), 26 deletions(-) diff --git a/Spigot-API-Patches/0154-Add-Material-Tags.patch b/Spigot-API-Patches/0154-Add-Material-Tags.patch index e21f3f5e9c..f4f4cb9cee 100644 --- a/Spigot-API-Patches/0154-Add-Material-Tags.patch +++ b/Spigot-API-Patches/0154-Add-Material-Tags.patch @@ -204,10 +204,10 @@ index 0000000000000000000000000000000000000000..c91ea2a0679a7f3a5627b5a008e0b39d +} diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java new file mode 100644 -index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e340830c34310 +index 0000000000000000000000000000000000000000..e72fc52240015051fe58b246fcf5c014f3330f0a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java -@@ -0,0 +1,374 @@ +@@ -0,0 +1,410 @@ +/* + * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License + * @@ -253,7 +253,7 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("ARROWS", 3); + + /** -+ * Cover all 16 colors of beds. ++ * Covers all colors of beds. + */ + public static final MaterialSetTag BEDS = new MaterialSetTag(keyFor("beds")) + .endsWith("_BED") @@ -286,14 +286,14 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .add(Material.COBBLESTONE, Material.MOSSY_COBBLESTONE); + + /** -+ * Covers all 16 colors of concrete. ++ * Covers all colors of concrete. + */ + public static final MaterialSetTag CONCRETES = new MaterialSetTag(keyFor("concretes")) + .endsWith("_CONCRETE") + .ensureSize("CONCRETES", 16); + + /** -+ * Covers all 16 colors of concrete powder. ++ * Covers all colors of concrete powder. + */ + public static final MaterialSetTag CONCRETE_POWDER = new MaterialSetTag(keyFor("concrete_powder")) + .endsWith("_CONCRETE_POWDER") @@ -306,7 +306,7 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .add(Material.COOKED_COD, Material.COOKED_SALMON); + + /** -+ * Covers all 16 dyes. ++ * Covers all dyes. + */ + public static final MaterialSetTag DYES = new MaterialSetTag(keyFor("dyes")) + .endsWith("_DYE") @@ -327,7 +327,7 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("FENCES", 9); + + /** -+ * Covers all 4 variants of fish buckets. ++ * Covers all variants of fish buckets. + */ + public static final MaterialSetTag FISH_BUCKETS = new MaterialSetTag(keyFor("fish_buckets")) + .add(Material.COD_BUCKET, Material.PUFFERFISH_BUCKET, Material.SALMON_BUCKET, Material.TROPICAL_FISH_BUCKET); @@ -341,21 +341,21 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("GLASS", 17); + + /** -+ * Covers the non-colored glass panes and 16 stained glass panes (panes only). ++ * Covers the non-colored glass panes and stained glass panes (panes only). + */ + public static final MaterialSetTag GLASS_PANES = new MaterialSetTag(keyFor("glass_panes")) + .endsWith("GLASS_PANE") + .ensureSize("GLASS_PANES", 17); + + /** -+ * Covers all 16 glazed terracotta blocks. ++ * Covers all glazed terracotta blocks. + */ + public static final MaterialSetTag GLAZED_TERRACOTTA = new MaterialSetTag(keyFor("glazed_terracotta")) + .endsWith("GLAZED_TERRACOTTA") + .ensureSize("GLAZED_TERRACOTTA", 16); + + /** -+ * Covers the 16 colors of stained terracotta. ++ * Covers the colors of stained terracotta. + */ + public static final MaterialSetTag STAINED_TERRACOTTA = new MaterialSetTag(keyFor("stained_terracotta")) + .endsWith("TERRACOTTA") @@ -364,7 +364,7 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("STAINED_TERRACOTTA", 16); + + /** -+ * Covers terracotta along with the 16 stained variants. ++ * Covers terracotta along with the stained variants. + */ + public static final MaterialSetTag TERRACOTTA = new MaterialSetTag(keyFor("terracotta")) + .endsWith("TERRACOTTA") @@ -379,21 +379,21 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("GOLDEN_APPLES", 2); + + /** -+ * Covers the 3 variants of horse armor. ++ * Covers the variants of horse armor. + */ + public static final MaterialSetTag HORSE_ARMORS = new MaterialSetTag(keyFor("horse_armors")) + .endsWith("_HORSE_ARMOR") + .ensureSize("HORSE_ARMORS", 4); + + /** -+ * Covers the 6 variants of infested blocks. ++ * Covers the variants of infested blocks. + */ + public static final MaterialSetTag INFESTED_BLOCKS = new MaterialSetTag(keyFor("infested_blocks")) + .startsWith("INFESTED_") + .ensureSize("INFESTED_BLOCKS", 6); + + /** -+ * Covers the 3 variants of mushroom blocks. ++ * Covers the variants of mushroom blocks. + */ + public static final MaterialSetTag MUSHROOM_BLOCKS = new MaterialSetTag(keyFor("mushroom_blocks")) + .endsWith("MUSHROOM_BLOCK") @@ -401,7 +401,7 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("MUSHROOM_BLOCKS", 3); + + /** -+ * Covers both mushrooms. ++ * Covers all mushrooms. + */ + public static final MaterialSetTag MUSHROOMS = new MaterialSetTag(keyFor("mushrooms")) + .add(Material.BROWN_MUSHROOM, Material.RED_MUSHROOM); @@ -435,38 +435,38 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("POTATOES", 3); + + /** -+ * Covers all wooden pressure plates and the weighted pressure plates and 1 stone pressure plate. ++ * Covers all wooden pressure plates and the weighted pressure plates and the stone pressure plate. + */ + public static final MaterialSetTag PRESSURE_PLATES = new MaterialSetTag(keyFor("pressure_plates")) + .endsWith("_PRESSURE_PLATE") + .ensureSize("PRESSURE_PLATES", 12); + + /** -+ * Covers the 3 variants of prismarine blocks. ++ * Covers the variants of prismarine blocks. + */ + public static final MaterialSetTag PRISMARINE = new MaterialSetTag(keyFor("prismarine")) + .add(Material.PRISMARINE, Material.PRISMARINE_BRICKS, Material.DARK_PRISMARINE); + + /** -+ * Covers the 3 variants of prismarine slabs. ++ * Covers the variants of prismarine slabs. + */ + public static final MaterialSetTag PRISMARINE_SLABS = new MaterialSetTag(keyFor("prismarine_slabs")) + .add(Material.PRISMARINE_SLAB, Material.PRISMARINE_BRICK_SLAB, Material.DARK_PRISMARINE_SLAB); + + /** -+ * Covers the 3 variants of prismarine stairs. ++ * Covers the variants of prismarine stairs. + */ + public static final MaterialSetTag PRISMARINE_STAIRS = new MaterialSetTag(keyFor("prismarine_stairs")) + .add(Material.PRISMARINE_STAIRS, Material.PRISMARINE_BRICK_STAIRS, Material.DARK_PRISMARINE_STAIRS); + + /** -+ * Covers the 3 variants of pumpkins. ++ * Covers the variants of pumpkins. + */ + public static final MaterialSetTag PUMPKINS = new MaterialSetTag(keyFor("pumpkins")) + .add(Material.CARVED_PUMPKIN, Material.JACK_O_LANTERN, Material.PUMPKIN); + + /** -+ * Covers the 4 variants of quartz blocks. ++ * Covers the variants of quartz blocks. + */ + public static final MaterialSetTag QUARTZ_BLOCKS = new MaterialSetTag(keyFor("quartz_blocks")) + .add(Material.QUARTZ_BLOCK, Material.QUARTZ_PILLAR, Material.CHISELED_QUARTZ_BLOCK, Material.SMOOTH_QUARTZ); @@ -478,14 +478,14 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .add(Material.COD, Material.PUFFERFISH, Material.SALMON, Material.TROPICAL_FISH); + + /** -+ * Covers the 4 variants of red sandstone blocks. ++ * Covers the variants of red sandstone blocks. + */ + public static final MaterialSetTag RED_SANDSTONES = new MaterialSetTag(keyFor("red_sandstones")) + .endsWith("RED_SANDSTONE") + .ensureSize("RED_SANDSTONES", 4); + + /** -+ * Covers the 4 variants of sandstone blocks. ++ * Covers the variants of sandstone blocks. + */ + public static final MaterialSetTag SANDSTONES = new MaterialSetTag(keyFor("sandstones")) + .add(Material.SANDSTONE, Material.CHISELED_SANDSTONE, Material.CUT_SANDSTONE, Material.SMOOTH_SANDSTONE); @@ -498,7 +498,7 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("SPONGES", 2); + + /** -+ * Covers the non-colored and 16 colored shulker boxes. ++ * Covers the non-colored and colored shulker boxes. + */ + public static final MaterialSetTag SHULKER_BOXES = new MaterialSetTag(keyFor("shulker_boxes")) + .endsWith("SHULKER_BOX") @@ -521,14 +521,14 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .ensureSize("SPAWN_EGGS", 63); + + /** -+ * Covers all 16 colors of stained glass. ++ * Covers all colors of stained glass. + */ + public static final MaterialSetTag STAINED_GLASS = new MaterialSetTag(keyFor("stained_glass")) + .endsWith("_STAINED_GLASS") + .ensureSize("STAINED_GLASS", 16); + + /** -+ * Covers all 16 colors of stained glass panes. ++ * Covers all colors of stained glass panes. + */ + public static final MaterialSetTag STAINED_GLASS_PANES = new MaterialSetTag(keyFor("stained_glass_panes")) + .endsWith("STAINED_GLASS_PANE") @@ -557,26 +557,62 @@ index 0000000000000000000000000000000000000000..5ed3c33b3f29255c538ad209574e3408 + .not(Material.IRON_TRAPDOOR) + .ensureSize("WOODEN_TRAPDOORS", 8); + ++ /** ++ * Covers the wood variants of gates. ++ */ + public static final MaterialSetTag WOODEN_GATES = new MaterialSetTag(keyFor("wooden_gates")) + .endsWith("_GATE") + .ensureSize("WOODEN_GATES", 8); + ++ /** ++ * Covers the variants of purpur. ++ */ + public static final MaterialSetTag PURPUR = new MaterialSetTag(keyFor("purpur")) + .startsWith("PURPUR_") + .ensureSize("PURPUR", 4); + ++ /** ++ * Covers the variants of signs. ++ */ + public static final MaterialSetTag SIGNS = new MaterialSetTag(keyFor("signs")) + .endsWith("_SIGN") + .ensureSize("SIGNS", 16); + ++ /** ++ * Covers the variants of a regular torch. ++ */ + public static final MaterialSetTag TORCH = new MaterialSetTag(keyFor("torch")) + .add(Material.TORCH, Material.WALL_TORCH) + .ensureSize("TORCH", 2); + ++ /** ++ * Covers the variants of a redstone torch. ++ */ + public static final MaterialSetTag REDSTONE_TORCH = new MaterialSetTag(keyFor("restone_torch")) + .add(Material.REDSTONE_TORCH, Material.REDSTONE_WALL_TORCH) + .ensureSize("REDSTONE_TORCH", 2); + ++ /** ++ * Covers the variants of a soul torch. ++ */ ++ public static final MaterialSetTag SOUL_TORCH = new MaterialSetTag(keyFor("soul_torch")) ++ .add(Material.SOUL_TORCH, Material.SOUL_WALL_TORCH) ++ .ensureSize("SOUL_TORCH", 2); ++ ++ /** ++ * Covers the variants of torches. ++ */ ++ public static final MaterialSetTag TORCHES = new MaterialSetTag(keyFor("torches")) ++ .add(TORCH, REDSTONE_TORCH, SOUL_TORCH) ++ .ensureSize("TORCHES", 6); ++ ++ /** ++ * Covers the variants of lanterns. ++ */ ++ public static final MaterialSetTag LANTERNS = new MaterialSetTag(keyFor("lanterns")) ++ .add(Material.LANTERN, Material.SOUL_LANTERN) ++ .ensureSize("LANTERNS", 2); ++ + @SuppressWarnings("unchecked") + public static final MaterialSetTag COLORABLE = new MaterialSetTag(keyFor("colorable")) + .add(Tag.WOOL, Tag.CARPETS).add(SHULKER_BOXES, STAINED_GLASS, STAINED_GLASS_PANES, CONCRETES, BEDS); From 4b5b20d4cd8db1417232d810842338e20a191edd Mon Sep 17 00:00:00 2001 From: Callum <38501234+calumari@users.noreply.github.com> Date: Thu, 2 Jul 2020 08:19:43 +0100 Subject: [PATCH 86/95] Fix hex colours not being allowed in MOTD (#3755) --- .../0199-Implement-extended-PaperServerListPingEvent.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch index 5f5a55be28..4d7ab717b4 100644 --- a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch @@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a2a409e635dde08f7c53e67164b967a0 +} diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java new file mode 100644 -index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c992ae2902 +index 0000000000000000000000000000000000000000..d2a1e54de64896c74404e79ad721d044a9d52794 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java @@ -0,0 +1,112 @@ @@ -71,11 +71,11 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9 +import com.google.common.base.MoreObjects; +import com.google.common.base.Strings; +import com.mojang.authlib.GameProfile; -+import net.minecraft.server.ChatComponentText; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.NetworkManager; +import net.minecraft.server.PacketStatusOutServerInfo; +import net.minecraft.server.ServerPing; ++import org.bukkit.craftbukkit.util.CraftChatMessage; + +import java.util.List; +import java.util.UUID; @@ -155,7 +155,7 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9 + ServerPing ping = new ServerPing(); + + // Description -+ ping.setMOTD(new ChatComponentText(event.getMotd())); ++ ping.setMOTD(CraftChatMessage.fromString(event.getMotd())[0]); + + // Players + if (!event.shouldHidePlayers()) { From ea8823ef57962061410aa635ef46eb8063854a27 Mon Sep 17 00:00:00 2001 From: Callum <38501234+calumari@users.noreply.github.com> Date: Thu, 2 Jul 2020 13:58:39 +0100 Subject: [PATCH 87/95] Fix MOTD new line support (#3756) --- .../0199-Implement-extended-PaperServerListPingEvent.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch index 4d7ab717b4..988ed183f3 100644 --- a/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0199-Implement-extended-PaperServerListPingEvent.patch @@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a2a409e635dde08f7c53e67164b967a0 +} diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java new file mode 100644 -index 0000000000000000000000000000000000000000..d2a1e54de64896c74404e79ad721d044a9d52794 +index 0000000000000000000000000000000000000000..26ddf92f86fccc2b2562f7abf4788d1ed6b73205 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java @@ -0,0 +1,112 @@ @@ -155,7 +155,7 @@ index 0000000000000000000000000000000000000000..d2a1e54de64896c74404e79ad721d044 + ServerPing ping = new ServerPing(); + + // Description -+ ping.setMOTD(CraftChatMessage.fromString(event.getMotd())[0]); ++ ping.setMOTD(CraftChatMessage.fromString(event.getMotd(), true)[0]); + + // Players + if (!event.shouldHidePlayers()) { From 1eeb8ad14b410bad79e306b6604a6e43b0e779cf Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Thu, 2 Jul 2020 17:53:21 +0200 Subject: [PATCH 88/95] Support components in ItemMeta (#3513) --- .../0214-Support-components-in-ItemMeta.patch | 77 +++++++++++++++ .../0531-Support-components-in-ItemMeta.patch | 95 +++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 Spigot-API-Patches/0214-Support-components-in-ItemMeta.patch create mode 100644 Spigot-Server-Patches/0531-Support-components-in-ItemMeta.patch diff --git a/Spigot-API-Patches/0214-Support-components-in-ItemMeta.patch b/Spigot-API-Patches/0214-Support-components-in-ItemMeta.patch new file mode 100644 index 0000000000..df59d38f9d --- /dev/null +++ b/Spigot-API-Patches/0214-Support-components-in-ItemMeta.patch @@ -0,0 +1,77 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MiniDigger +Date: Sat, 6 Jun 2020 18:13:16 +0200 +Subject: [PATCH] Support components in ItemMeta + + +diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +index 7e0b1d363829031075b6822d7b35ccde9fc05da9..5db838cab09888c3b3537e122e0e381a78e1dbb7 100644 +--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java ++++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +@@ -42,6 +42,18 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + @NotNull + String getDisplayName(); + ++ // Paper start ++ /** ++ * Gets the display name that is set. ++ *

++ * Plugins should check that hasDisplayName() returns true ++ * before calling this method. ++ * ++ * @return the display name that is set ++ */ ++ @NotNull ++ net.md_5.bungee.api.chat.BaseComponent[] getDisplayNameComponent(); ++ // Paper end + /** + * Sets the display name. + * +@@ -49,6 +61,14 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + */ + void setDisplayName(@Nullable String name); + ++ // Paper start ++ /** ++ * Sets the display name. ++ * ++ * @param component the name component to set ++ */ ++ void setDisplayNameComponent(@Nullable net.md_5.bungee.api.chat.BaseComponent[] component); ++ // Paper end + /** + * Checks for existence of a localized name. + * +@@ -92,6 +112,17 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + @Nullable + List getLore(); + ++ /** ++ * Gets the lore that is set. ++ *

++ * Plugins should check if hasLore() returns true before ++ * calling this method. ++ * ++ * @return a list of lore that is set ++ */ ++ @Nullable ++ List getLoreComponents(); ++ + /** + * Sets the lore for this item. + * Removes lore when given null. +@@ -100,6 +131,14 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + */ + void setLore(@Nullable List lore); + ++ /** ++ * Sets the lore for this item. ++ * Removes lore when given null. ++ * ++ * @param lore the lore that will be set ++ */ ++ void setLoreComponents(@Nullable List lore); ++ + /** + * Checks for existence of custom model data. + *

diff --git a/Spigot-Server-Patches/0531-Support-components-in-ItemMeta.patch b/Spigot-Server-Patches/0531-Support-components-in-ItemMeta.patch new file mode 100644 index 0000000000..cfaa7386b0 --- /dev/null +++ b/Spigot-Server-Patches/0531-Support-components-in-ItemMeta.patch @@ -0,0 +1,95 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MiniDigger +Date: Sat, 6 Jun 2020 18:13:42 +0200 +Subject: [PATCH] Support components in ItemMeta + + +diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java +index fd3e6cda6a0e7154c50608ba9a4b70f3c43c8f2a..94a6d0ad76b10b8790ffb2019bf6972472b04c3d 100644 +--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java ++++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java +@@ -344,6 +344,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable(Lists.transform(this.lore, CraftChatMessage::fromComponent)); + } + ++ // Paper start ++ @Override ++ public List getLoreComponents() { ++ return this.lore == null ? null : new ArrayList<>(this.lore.stream().map(entry -> ++ net.md_5.bungee.chat.ComponentSerializer.parse(IChatBaseComponent.ChatSerializer.componentToJson(entry) ++ )).collect(java.util.stream.Collectors.toList())); ++ } ++ // Paper end + @Override + public void setLore(List lore) { // too tired to think if .clone is better + if (lore == null) { +@@ -1022,6 +1042,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + } + } + ++ // Paper start ++ @Override ++ public void setLoreComponents(List lore) { ++ if (lore == null) { ++ this.lore = null; ++ } else { ++ if (this.lore == null) { ++ safelyAdd(lore, this.lore = new ArrayList<>(lore.size()), Integer.MAX_VALUE); ++ } else { ++ this.lore.clear(); ++ safelyAdd(lore, this.lore, Integer.MAX_VALUE); ++ } ++ } ++ } ++ // Paper end + @Override + public boolean hasCustomModelData() { + return customModelData != null; +@@ -1483,6 +1518,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + } + + for (Object object : addFrom) { ++ // Paper start - support components ++ if(object instanceof net.md_5.bungee.api.chat.BaseComponent[]) { ++ addTo.add(IChatBaseComponent.ChatSerializer.jsonToComponent(net.md_5.bungee.chat.ComponentSerializer.toString((net.md_5.bungee.api.chat.BaseComponent[]) object))); ++ } else ++ // Paper end + if (!(object instanceof String)) { + if (object != null) { + throw new IllegalArgumentException(addFrom + " cannot contain non-string " + object.getClass().getName()); From 824f8086cfcdf1e773fe7a5319d88439a9c9faba Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 2 Jul 2020 15:42:23 -0600 Subject: [PATCH 89/95] Bandaid italic legacy serialization #3757 (#3760) --- .../0526-Improve-Legacy-Component-serialization-size.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch b/Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch index 05f7e86c92..3646572e72 100644 --- a/Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch +++ b/Spigot-Server-Patches/0526-Improve-Legacy-Component-serialization-size.patch @@ -7,14 +7,14 @@ Don't constantly send format: false for all formatting options when parent alrea has it false diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -index a423e3bf3906d3114af885c48d0b45d88d7e7d8b..3b79ae44c5ef790998915148db92c7161ae36ab6 100644 +index a423e3bf3906d3114af885c48d0b45d88d7e7d8b..54f6f7d86741c3f318fa76bafe04b55cf420c35b 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -45,6 +45,7 @@ public final class CraftChatMessage { // Separate pattern with no group 3, new lines are part of previous string private static final Pattern INCREMENTAL_PATTERN_KEEP_NEWLINES = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-orx])|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " ]|$))))", Pattern.CASE_INSENSITIVE); // ChatColor.b does not explicitly reset, its more of empty -+ private static final ChatModifier EMPTY = ChatModifier.b; // Paper - OBFHELPER ++ private static final ChatModifier EMPTY = ChatModifier.b.setItalic(false); // Paper - OBFHELPER private static final ChatModifier RESET = ChatModifier.b.setBold(false).setItalic(false).setUnderline(false).setStrikethrough(false).setRandom(false); private final List list = new ArrayList(); From fcbeac8a992eb18ef31de4886a1311bf8364dbe4 Mon Sep 17 00:00:00 2001 From: JanTuck <10961808+JanTuck@users.noreply.github.com> Date: Thu, 2 Jul 2020 23:44:14 +0200 Subject: [PATCH 90/95] [CI-SKIP] Readme update (#3702) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a70156e49d..fbc4befe6b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ How To (Plugin Developers) paper-api 1.16.1-R0.1-SNAPSHOT provided - + ``` **Or alternatively, with Gradle:** From b3f265d1b1397081cc8133fc4540413b78ed4c37 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Jul 2020 02:08:00 -0400 Subject: [PATCH 91/95] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 0ca45a21 #503: Add PlayerHarvestBlockEvent dfa80a52 SPIGOT-5930: Add PlayerRespawnEvent#isAnchorSpawn CraftBukkit Changes: 145921e2 #676: Add PlayerHarvestBlockEvent 47abffa2 SPIGOT-5929: Angered zombified piglins do not inherit killed_by_player status 7f6b4f58 SPIGOT-5930: Add PlayerRespawnEvent#isAnchorSpawn 94eff632 SPIGOT-5867, MC-193339: NPE during shutdown when rcon enabled with no password 068618eb SPIGOT-5927: Some items NBT data disappears Spigot Changes: beb7d47c Rebuild patches Fixes #3738 --- Spigot-Server-Patches/0004-MC-Utils.patch | 2 +- Spigot-Server-Patches/0009-Timings-v2.patch | 2 +- ...024-Only-refresh-abilities-if-needed.patch | 2 +- .../0042-Add-PlayerInitialSpawnEvent.patch | 2 +- .../0048-Player-Tab-List-and-Title-APIs.patch | 2 +- ...ble-inter-world-teleportation-safety.patch | 2 +- ...063-Handle-Item-Meta-Inconsistencies.patch | 2 +- ...dDebugInfo-not-initialized-on-client.patch | 2 +- ...nd-for-setting-passengers-on-players.patch | 2 +- .../0087-Configurable-Player-Collision.patch | 2 +- .../0089-Configurable-RCON-IP-address.patch | 2 +- .../0103-Add-server-name-parameter.patch | 2 +- .../0116-Add-EntityZapEvent.patch | 4 +- ...1-Add-source-to-PlayerExpChangeEvent.patch | 4 +- .../0123-Add-ProjectileCollideEvent.patch | 4 +- .../0131-String-based-Action-Bar-API.patch | 2 +- .../0135-Enforce-Sync-Player-Saves.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 2 +- ...oleAppender-for-console-improvements.patch | 2 +- ...mplement-ensureServerConversions-API.patch | 4 +- .../0159-Implement-getI18NDisplayName.patch | 4 +- .../0160-ProfileWhitelistVerifyEvent.patch | 2 +- ...nt-protocol-version-and-virtual-host.patch | 2 +- ...-maximum-exp-value-when-merging-orbs.patch | 4 +- .../0184-ExperienceOrbMergeEvent.patch | 4 +- ...5-Ability-to-apply-mending-to-XP-API.patch | 2 +- .../0192-Add-ArmorStand-Item-Meta.patch | 41 +++++++++---------- .../0202-Player.setPlayerProfile-API.patch | 2 +- ...08-Flag-to-disable-the-channel-limit.patch | 2 +- ...0221-ItemStack-getMaxItemUseDuration.patch | 2 +- ...ent-consumeArrow-and-getArrowItem-AP.patch | 4 +- .../0237-InventoryCloseEvent-Reason-API.patch | 8 ++-- ...2-Vanished-players-don-t-have-rights.patch | 4 +- ...on-t-call-getItemMeta-on-hasItemMeta.patch | 4 +- .../0264-Add-hand-to-bucket-events.patch | 8 ++-- ...69-Use-ConcurrentHashMap-in-JsonList.patch | 2 +- .../0286-Improve-death-events.patch | 8 ++-- ...-replace-OfflinePlayer-getLastPlayed.patch | 4 +- ...0-Fix-Whitelist-On-Off-inconsistency.patch | 2 +- ...oggleEvent-when-whitelist-is-toggled.patch | 2 +- .../0344-Entity-getEntitySpawnReason.patch | 2 +- ...346-Implement-PlayerPostRespawnEvent.patch | 2 +- .../0382-Fix-MC-158900.patch | 2 +- ...-sneak-when-changing-worlds-MC-10657.patch | 2 +- ...ow-overriding-the-java-version-check.patch | 2 +- ...421-add-hand-to-BlockMultiPlaceEvent.patch | 4 +- ...ptimize-Collision-to-not-load-chunks.patch | 2 +- ...move-existing-players-to-world-spawn.patch | 2 +- .../0447-Improved-Watchdog-Support.patch | 2 +- ...61-Broadcast-join-message-to-console.patch | 2 +- ...g-Broken-behavior-of-PlayerJoinEvent.patch | 2 +- ...Load-Chunks-for-Login-Asynchronously.patch | 2 +- ...m-duplication-issues-and-teleport-is.patch | 4 +- ...-per-thread-native-byte-buffer-cache.patch | 2 +- ...No-Tick-view-distance-implementation.patch | 2 +- ...k-Priority-Urgency-System-for-Chunks.patch | 4 +- ...-packets-to-nearby-locations-sounds-.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 60 files changed, 101 insertions(+), 104 deletions(-) diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 0b50f875e5..0468e151ae 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -4459,7 +4459,7 @@ index bd6dfddb3c076cf92588dd508975db0eee5c2962..d643ff0a0ae9d45711c9a40fc12af681 private final MinecraftServer server; public final WorldDataServer worldDataServer; // CraftBukkit - type diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index dd83cc2cc580b997a9b4f8f8b6e1176cb45e9610..3bdaca5fd461b4923c857b236472dd98d23f43a0 100644 +index 62cdb32a63cdcbaee80946f73d23817bbb455488..721a1c6bd4505cb132e7004c45b795d4959389e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 703cf62b37..27c0b8507b 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1489,7 +1489,7 @@ index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf43 PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6b09630279b14a697bcc492655897f4db799ca18..13fe3fbf589d7528708e9fa7bed65dabde24a9ae 100644 +index b9b055923bb70e7b9fc9cd69c28bd06d7836a38c..213e8512247e9873563ad606a7e3a2a3ca409718 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch index 7e38388088..0cdd1fd061 100644 --- a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ca7fa1ee3ebddb8e395395fcce35059f2e0ee52a..57eb0223477f44e061e916b0c046bdd136de1c0e 100644 +index 8d4a0513df27767053342eddda05398eae7b46be..cebf6f85eea3faea8fecb112234ea23b40cd4d9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1370,12 +1370,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch index 4f2a000148..fb173c8618 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch @@ -9,7 +9,7 @@ This is a duplicate API from spigot, so use our duplicate subclass and improve setPosition to use raw diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 13fe3fbf589d7528708e9fa7bed65dabde24a9ae..5bed3682af9eb63b355bb24bbee466a05ae7cc34 100644 +index 213e8512247e9873563ad606a7e3a2a3ca409718..2265fa3c04305e18653b4b37a0d1d36b261521d7 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -143,7 +143,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch index be8b883421..6d46ff6c9c 100644 --- a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch @@ -52,7 +52,7 @@ index 3a6e780007bc1b1fa799166daa01d3a9e15c7ab0..535056c64ef866e645b1bfbd149b50c5 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 57eb0223477f44e061e916b0c046bdd136de1c0e..01f7d2ac7d4fb639ed9561c25777dea65210e050 100644 +index cebf6f85eea3faea8fecb112234ea23b40cd4d9c..f933af87971ae96f154f26be2a8c122670e3cf64 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch index 775a5691a5..a9d43064e9 100644 --- a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch @@ -30,7 +30,7 @@ index cd47a4ca069df26969de3051c2aac80540093818..abbf59bb91021821876a8960e8f77fac + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 01f7d2ac7d4fb639ed9561c25777dea65210e050..a7526e8f5e2fe3b22133181659be791acbc05d57 100644 +index f933af87971ae96f154f26be2a8c122670e3cf64..c90d3c8fe0965f437fe17979978f1189a27851ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -764,7 +764,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch index 8313c44c6e..63db7ba56d 100644 --- a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch @@ -79,7 +79,7 @@ index 76091ab3f149decc0d3c848b79edd24e20cf181d..a360711ea14983e8df34caa5edda80a0 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 3bdaca5fd461b4923c857b236472dd98d23f43a0..5f968e8988c3bd20c0f0c078c8f4038630098c8c 100644 +index 721a1c6bd4505cb132e7004c45b795d4959389e3..9913d0136841dac35b6649cb1afbe1e93b36bf4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch index f59434cb53..3ed46d2950 100644 --- a/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5bed3682af9eb63b355bb24bbee466a05ae7cc34..675b6b521f0583ccbc9f34cbc38c0c32d7e7f3f7 100644 +index 2265fa3c04305e18653b4b37a0d1d36b261521d7..ca1f4bdf81600d2e72564e5dba1df0d69877bdce 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -174,6 +174,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch index 7dbef00671..d7effbc682 100644 --- a/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3d28ed4de1956d5ca7d11b63934a2bc174ef9d76..0654819e8fbbe923b1aa439983af020dc39c6734 100644 +index 2e8105fe1d0f5f953ac8ba94df3e8eb66b7813d7..532698f80bb2e266f27ae1d4b70c80138560b8cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -773,6 +773,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0087-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0087-Configurable-Player-Collision.patch index a15bd843b7..49c7705dca 100644 --- a/Spigot-Server-Patches/0087-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0087-Configurable-Player-Collision.patch @@ -57,7 +57,7 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19 packetdataserializer.a(this.c); packetdataserializer.a(this.d); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 675b6b521f0583ccbc9f34cbc38c0c32d7e7f3f7..b7982bbff805b7bc73c9ce74007f32cf05eac5b1 100644 +index ca1f4bdf81600d2e72564e5dba1df0d69877bdce..7fb344d9ef8f5c7a6c6ed5e7256d55860726c6f2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -75,6 +75,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch index 0aa53ccbbf..76224288ca 100644 --- a/Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch +++ b/Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch @@ -45,7 +45,7 @@ index d7e81a6d99fcbf1d71f8c1f42b5138244000f584..729455ce53944a9afaaa3e30052ab44f } diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java -index 064c4b24e268112770245de806217e84051dc4ff..5aea8b8c2c39bd747ecba2cdd0f6a57565c336f9 100644 +index 1afa2b58d04c6169d26336f7871489d7db34ec90..e550b8428245ef2bc0265ae6267bb7e1cabec35c 100644 --- a/src/main/java/net/minecraft/server/RemoteControlListener.java +++ b/src/main/java/net/minecraft/server/RemoteControlListener.java @@ -28,7 +28,7 @@ public class RemoteControlListener extends RemoteConnectionThread { diff --git a/Spigot-Server-Patches/0103-Add-server-name-parameter.patch b/Spigot-Server-Patches/0103-Add-server-name-parameter.patch index 2b217e2f10..d25dd67633 100644 --- a/Spigot-Server-Patches/0103-Add-server-name-parameter.patch +++ b/Spigot-Server-Patches/0103-Add-server-name-parameter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index a86eeac5abdd5b5512dd290e61361910672909a0..21295058e25c8d5a7b4867fc9f6120e9a6935b26 100644 +index a111987658a6d89fc3fe970b1db37a7f3517b9bd..b1157195cf00a05d3417bccf781fdf58ff9919b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -137,6 +137,14 @@ public class Main { diff --git a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch index 9f2a59742a..e709a14824 100644 --- a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch @@ -38,10 +38,10 @@ index f7f76bca254dc7bc5792e449feeaa113a96c93e4..d0b04707e830fbaf3a6bfe92637e4432 entitywitch.prepare(this.world, this.world.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 28f2b741ca972c72c97f313171c2aed8c65c20ed..5368833da677d43e891517839ff9e4e2106db07b 100644 +index f4abad0c0e7e2a57965311ee0a82224154f752aa..47f8c995025f26607baf3b80b8465f6df78a08ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1068,6 +1068,14 @@ public class CraftEventFactory { +@@ -1080,6 +1080,14 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch index 5393bd84ef..765101384d 100644 --- a/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch @@ -18,7 +18,7 @@ index 2e25aba27993608ed7ee1cfb7ae8ee60bc74feda..c13a47382d0a7456fa5035a64f42a6ed 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 5368833da677d43e891517839ff9e4e2106db07b..d72cbc0b0f9cc4f412122deda163764dc3908396 100644 +index 47f8c995025f26607baf3b80b8465f6df78a08ff..9a4d74f6e241dd4e1785ed5bad0eac74b3130fca 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -120,6 +120,7 @@ import org.bukkit.entity.ThrownPotion; @@ -29,7 +29,7 @@ index 5368833da677d43e891517839ff9e4e2106db07b..d72cbc0b0f9cc4f412122deda163764d import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -1027,6 +1028,17 @@ public class CraftEventFactory { +@@ -1039,6 +1040,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 55bf229701..540f7cb9aa 100644 --- a/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch @@ -71,10 +71,10 @@ index 5cc122fc0e80bd67160c8b4a7a469edfb6e24808..795685f1eed489b8323c7a8528b2bbd4 Vec3D vec3d = this.getMot(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d72cbc0b0f9cc4f412122deda163764dc3908396..6620d92d73bc54a99a0a583db880682d9ed26ea2 100644 +index 9a4d74f6e241dd4e1785ed5bad0eac74b3130fca..ac5f492fd0d837da150e415bc007c10fe7ee3714 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1172,6 +1172,16 @@ public class CraftEventFactory { +@@ -1184,6 +1184,16 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } diff --git a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch index 3dc2d2164c..a7acfc5233 100644 --- a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch @@ -18,7 +18,7 @@ index 275c1d2d1eb2649de9a9b5aece6e88c21362efba..d72ba7f76c42fd525a5b59a999a0c08e public static Collector, ?, Map> a() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f8e141190c43bf9be1a7d782e8a22d74c5dedd95..bcf855b549e24929865ce4ca32ce15975b06f951 100644 +index 9e9d054ed9d345eb7ab76ad9c3526889aeb220e3..e7c42fb4fd1235a934c16f4cccc1b1a66b3672a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -221,6 +221,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch index 8e1da02a97..d98c82248d 100644 --- a/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b7982bbff805b7bc73c9ce74007f32cf05eac5b1..cc5fea8bce240e0585a334eeb311ce040b9ca040 100644 +index 7fb344d9ef8f5c7a6c6ed5e7256d55860726c6f2..bfe7848655498287e357593259e188f161292d3e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -961,11 +961,13 @@ public abstract class PlayerList { 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 b57da83a46..ecce73596d 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 @@ -73,7 +73,7 @@ index 793d4d928bac4febf090291eb773871b492cdc6d..28478370fc182751178f7dd6c2043521 // Spigot Start private static double calcTps(double avg, double exp, double tps) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index cc5fea8bce240e0585a334eeb311ce040b9ca040..753efa30bdb0af9ac2b0ad11dfb7a6b052f91a09 100644 +index bfe7848655498287e357593259e188f161292d3e..27a79ee13dc65f389136dc1cc1546259d9a89f9c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1072,10 +1072,15 @@ public abstract class PlayerList { 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 ddace6af6c..cf1139180d 100644 --- a/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -245,7 +245,7 @@ index 28478370fc182751178f7dd6c20435218174c700..737159212c5139ba07dca2484c6cce89 public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 753efa30bdb0af9ac2b0ad11dfb7a6b052f91a09..a17cae9d7f9c18b7f9a3d7970e902f4a8cbb7d7b 100644 +index 27a79ee13dc65f389136dc1cc1546259d9a89f9c..b680c6c7d8f2349928b9eebfd62f4312ec8d1180 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -79,8 +79,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch index dc7dcc48af..93a0d5cd39 100644 --- a/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 17bbeeefa3fc4eeea3df25833d1a6afc00f4be7a..fda97db7227bc9aeb89a3b3b9feed1ee5b8f5a5f 100644 +index 89a3617068421bb86baf4e8bfd9df2d0626adff7..bee1de72de76738d5eed2e0ca5ae8c0a65be7595 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -330,4 +330,10 @@ public final class CraftItemFactory implements ItemFactory { +@@ -334,4 +334,10 @@ public final class CraftItemFactory implements ItemFactory { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { return ((CraftMetaItem) meta).updateMaterial(material); } diff --git a/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch index 5dc388de6c..52f768cc48 100644 --- a/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch @@ -34,10 +34,10 @@ index ea7cb9943dc6da7a05e0841985eb1be4b6bc5169..c83ba9d9869f8ba51df17963d530536d public abstract boolean b(String s); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index fda97db7227bc9aeb89a3b3b9feed1ee5b8f5a5f..c28691ae6b5c66772577003789a25d27678aa4c0 100644 +index bee1de72de76738d5eed2e0ca5ae8c0a65be7595..1c3e6e0c9abe681bf9e7305a74a68c1506ad8d0c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -335,5 +335,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -339,5 +339,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch index 51f95ad5c9..cff4971987 100644 --- a/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a17cae9d7f9c18b7f9a3d7970e902f4a8cbb7d7b..d5e7a41b39cb384cf9b52303bcbe11ae09b4162b 100644 +index b680c6c7d8f2349928b9eebfd62f4312ec8d1180..9d05320b132679ccd511422c2c187b0d5fa89c2c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -540,9 +540,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch index 2a7b2b25b5..82bfcbb451 100644 --- a/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0173-Expose-client-protocol-version-and-virtual-host.patch @@ -103,7 +103,7 @@ index 4f008e4723d2cb0bcabb2d5621203d63c40c4923..8545146fb1f093f821e3b966d9337049 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bcf855b549e24929865ce4ca32ce15975b06f951..30f15491e6b18f51df9ccfc9b140251ba9ece400 100644 +index e7c42fb4fd1235a934c16f4cccc1b1a66b3672a0..758981757996a8c9aa5066640e5b6c293bb7fc64 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -188,6 +188,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch index 5866a6ee33..dc2b8d99a5 100644 --- a/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0176-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -20,10 +20,10 @@ index e30f48caf2ce4f48f371b2594b765c27bc9e9778..2d8b354d707e8b5b0e7cd644fb93bc8f + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6620d92d73bc54a99a0a583db880682d9ed26ea2..531987a9adf21bf870b88f38bf6c2061fbc3ea80 100644 +index ac5f492fd0d837da150e415bc007c10fe7ee3714..3e0b51db3d90b0039eee3375ac0fa4f96712b922 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -565,16 +565,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/0184-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0184-ExperienceOrbMergeEvent.patch index c228b0e161..8278777442 100644 --- a/Spigot-Server-Patches/0184-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0184-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 531987a9adf21bf870b88f38bf6c2061fbc3ea80..3354c320978ac7f99ecec1f928b31536f6621e20 100644 +index 3e0b51db3d90b0039eee3375ac0fa4f96712b922..7cadd8d55d0537b31969f421370c830e8925bed2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -575,7 +575,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/0185-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch index 5783731251..4930edc643 100644 --- a/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0185-Ability-to-apply-mending-to-XP-API.patch @@ -43,7 +43,7 @@ index e7fb982913f391bafd608c4626086cd9cab7fad7..7f2d8de12473c5413bbfc10ea0947d6a return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 30f15491e6b18f51df9ccfc9b140251ba9ece400..7374bd398e89cbaa6670e726a11aec9be78ba1c3 100644 +index 758981757996a8c9aa5066640e5b6c293bb7fc64..e2f707e461e2e13f240a30a94c9acf191828219b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1073,8 +1073,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch index 8e064b2844..d5e982e37f 100644 --- a/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0192-Add-ArmorStand-Item-Meta.patch @@ -13,10 +13,10 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java -index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed44303875fe31f2 100644 +index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82519250e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java -@@ -8,13 +8,39 @@ import org.bukkit.Material; +@@ -8,9 +8,22 @@ import org.bukkit.Material; import org.bukkit.configuration.serialization.DelegateDeserialization; @DelegateDeserialization(CraftMetaItem.SerializableMeta.class) @@ -40,24 +40,21 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed443038 NBTTagCompound entityTag; CraftMetaArmorStand(CraftMetaItem meta) { - super(meta); -+ +@@ -21,6 +34,13 @@ public class CraftMetaArmorStand extends CraftMetaItem { + } + + CraftMetaArmorStand armorStand = (CraftMetaArmorStand) meta; + // Paper start -+ if (!(meta instanceof CraftMetaArmorStand)) { -+ return; -+ } -+ -+ CraftMetaArmorStand standMeta = (CraftMetaArmorStand) meta; -+ this.invisible = standMeta.invisible; -+ this.noBasePlate = standMeta.noBasePlate; -+ this.showArms = standMeta.showArms; -+ this.small = standMeta.small; -+ this.marker = standMeta.marker; ++ this.invisible = armorStand.invisible; ++ this.noBasePlate = armorStand.noBasePlate; ++ this.showArms = armorStand.showArms; ++ this.small = armorStand.small; ++ this.marker = armorStand.marker; + // Paper end + this.entityTag = armorStand.entityTag; } - CraftMetaArmorStand(NBTTagCompound tag) { -@@ -22,11 +48,47 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -29,11 +49,47 @@ public class CraftMetaArmorStand extends CraftMetaItem { if (tag.hasKey(ENTITY_TAG.NBT)) { entityTag = tag.getCompound(ENTITY_TAG.NBT); @@ -105,7 +102,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed443038 } @Override -@@ -49,6 +111,32 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -56,6 +112,32 @@ public class CraftMetaArmorStand extends CraftMetaItem { void applyToItem(NBTTagCompound tag) { super.applyToItem(tag); @@ -138,7 +135,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed443038 if (entityTag != null) { tag.set(ENTITY_TAG.NBT, entityTag); } -@@ -70,7 +158,7 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -77,7 +159,7 @@ public class CraftMetaArmorStand extends CraftMetaItem { } boolean isArmorStandEmpty() { @@ -147,7 +144,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed443038 } @Override -@@ -81,7 +169,13 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -88,7 +170,13 @@ public class CraftMetaArmorStand extends CraftMetaItem { if (meta instanceof CraftMetaArmorStand) { CraftMetaArmorStand that = (CraftMetaArmorStand) meta; @@ -162,7 +159,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed443038 } return true; } -@@ -96,9 +190,14 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -103,9 +191,14 @@ public class CraftMetaArmorStand extends CraftMetaItem { final int original; int hash = original = super.applyHash(); @@ -180,7 +177,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed443038 return original != hash ? CraftMetaArmorStand.class.hashCode() ^ hash : hash; } -@@ -107,6 +206,28 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -114,6 +207,28 @@ public class CraftMetaArmorStand extends CraftMetaItem { Builder serialize(Builder builder) { super.serialize(builder); @@ -209,7 +206,7 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..16fbee27b01cac4772cd5fe4ed443038 return builder; } -@@ -120,4 +241,56 @@ public class CraftMetaArmorStand extends CraftMetaItem { +@@ -127,4 +242,56 @@ public class CraftMetaArmorStand extends CraftMetaItem { return clone; } diff --git a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch index 051495afeb..f39292e3b2 100644 --- a/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0202-Player.setPlayerProfile-API.patch @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7374bd398e89cbaa6670e726a11aec9be78ba1c3..816325719eb6150a300bb0d9193928cddf530ecd 100644 +index e2f707e461e2e13f240a30a94c9acf191828219b..13c19f2a779caa9ff27b135fdf4ad720e5c9cce7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ diff --git a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch index 78c11a8d05..84b589d045 100644 --- a/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0208-Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 816325719eb6150a300bb0d9193928cddf530ecd..3d1c26cd9a8917b223736bcc9c8000b0f8b46a64 100644 +index 13c19f2a779caa9ff27b135fdf4ad720e5c9cce7..b19072c26a37d577888cfefce612487d61aadd61 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -144,6 +144,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch index 3c9607ce52..d96b867b61 100644 --- a/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/0221-ItemStack-getMaxItemUseDuration.patch @@ -18,7 +18,7 @@ index c4d034c6a6ff176bc954c00c328512bdf67455a6..7b2010ec4955fb5788c60178c6e306ea return this.getItem().e_(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 5f968e8988c3bd20c0f0c078c8f4038630098c8c..1c96af7b25f5ba4eae3df53663ee9bebb6f190fe 100644 +index 9913d0136841dac35b6649cb1afbe1e93b36bf4c..d315a102a5ae2a79189b39c3b534b8fd733cc9e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -174,6 +174,13 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index d0e2624b4c..794dd655eb 100644 --- a/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/0228-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -72,10 +72,10 @@ index 1592e94c78611a4b968bfb24daf68570e778fadd..31c80bb0a2e403c34fb9cd4b3ee4e903 event.getProjectile().remove(); return; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3354c320978ac7f99ecec1f928b31536f6621e20..d75ad03bbae557fb37e4b6bd4b85b1b3b1bceeae 100644 +index 7cadd8d55d0537b31969f421370c830e8925bed2..5bcf38d3fcfa569c50d66ed67ad22db7e7d36207 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -493,16 +493,16 @@ public class CraftEventFactory { +@@ -505,16 +505,16 @@ public class CraftEventFactory { /** * EntityShootBowEvent */ diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index 62f5d5c85c..40722aa0a7 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -101,7 +101,7 @@ index 411e6ff17ac50a410da038ad538ad56ba3aef8a8..201b2b0dcbaf6765390c18052f3b3450 this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d5e7a41b39cb384cf9b52303bcbe11ae09b4162b..3a2ab5a5745e2c698042357321bcfe7b1bd92154 100644 +index 9d05320b132679ccd511422c2c187b0d5fa89c2c..4c11aa13b725b2bb502701f2d5fb3878ff162f05 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -420,7 +420,7 @@ public abstract class PlayerList { @@ -155,7 +155,7 @@ index fe8a21202340c5892f5166ec294212c6e44ed3a5..00d67c9911c52ddcdf48fda7998bcd2a @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3d1c26cd9a8917b223736bcc9c8000b0f8b46a64..d494f8d7695249b43cd28ac2684e35bd8faaeea0 100644 +index b19072c26a37d577888cfefce612487d61aadd61..c7e43f5015851d44870986c6cd6c43b3332cf9be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -791,7 +791,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -168,10 +168,10 @@ index 3d1c26cd9a8917b223736bcc9c8000b0f8b46a64..d494f8d7695249b43cd28ac2684e35bd // 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 d75ad03bbae557fb37e4b6bd4b85b1b3b1bceeae..bed1d3f460be8af3378d0ab1d8ff53c0885021f9 100644 +index 5bcf38d3fcfa569c50d66ed67ad22db7e7d36207..72f495327fe56e7d7ba41e39e99a69622a6861b2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1322,12 +1322,22 @@ public class CraftEventFactory { +@@ -1334,12 +1334,22 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch index 6662d05029..f6c122f542 100644 --- a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch @@ -159,10 +159,10 @@ index 2e19fbddb6ede4abf02c79b4e72d11f89db05433..ca3e831e3191dd8ffe7f2b6ab9ecc05a 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 bed1d3f460be8af3378d0ab1d8ff53c0885021f9..bfa9fd738159d2517c2ec16323a856c5850c0534 100644 +index 72f495327fe56e7d7ba41e39e99a69622a6861b2..cf25906786e246cb8dfdb5f2cb39f6dc08c4d7ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1193,6 +1193,14 @@ public class CraftEventFactory { +@@ -1205,6 +1205,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/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch index 47fbd66565..69fb6e318b 100644 --- a/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/Spigot-Server-Patches/0258-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 1c96af7b25f5ba4eae3df53663ee9bebb6f190fe..b64bbe750717330e3b81028e6efacf15afc70b28 100644 +index d315a102a5ae2a79189b39c3b534b8fd733cc9e4..addb8ef990de3dfbf74969ef4c22276d2fa2614a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -566,7 +566,7 @@ public final class CraftItemStack extends ItemStack { +@@ -570,7 +570,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { diff --git a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch index 6ecb605d08..5db5c21d1f 100644 --- a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch @@ -126,10 +126,10 @@ index 1a103dd830109e119acc1a371b37386e228586b5..a343cba51850bb7214c241a92db0694d public LongSet getForceLoadedChunks() { ForcedChunk forcedchunk = (ForcedChunk) this.getWorldPersistentData().b(ForcedChunk::new, "chunks"); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index bfa9fd738159d2517c2ec16323a856c5850c0534..fac306391872457a6b60a7fc69dfe7d85da6b23f 100644 +index cf25906786e246cb8dfdb5f2cb39f6dc08c4d7ca..f6c8c371e22272983f80268dab8009ee029bed2a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -227,7 +227,7 @@ public class CraftEventFactory { +@@ -228,7 +228,7 @@ public class CraftEventFactory { public static Entity entityDamage; // For use in EntityDamageByEntityEvent // helper methods @@ -138,7 +138,7 @@ index bfa9fd738159d2517c2ec16323a856c5850c0534..fac306391872457a6b60a7fc69dfe7d8 int spawnSize = Bukkit.getServer().getSpawnRadius(); if (world.getDimensionKey() != World.OVERWORLD) return true; -@@ -395,6 +395,20 @@ public class CraftEventFactory { +@@ -407,6 +407,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 bfa9fd738159d2517c2ec16323a856c5850c0534..fac306391872457a6b60a7fc69dfe7d8 Player player = (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item); Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem()); -@@ -407,10 +421,10 @@ public class CraftEventFactory { +@@ -419,10 +433,10 @@ public class CraftEventFactory { PlayerEvent event; if (isFilling) { diff --git a/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch index 0a9888288a..4db56b72bf 100644 --- a/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0269-Use-ConcurrentHashMap-in-JsonList.patch @@ -122,7 +122,7 @@ index 5b01e4edb3c0f8bc785b70128cbe31b14356e4fb..9213bfb78e92b838189161045e394558 this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3a2ab5a5745e2c698042357321bcfe7b1bd92154..c3acd5e610301de924eb1f49f00f9a3ae85eefb3 100644 +index 4c11aa13b725b2bb502701f2d5fb3878ff162f05..50fbf3e3fb82c25ab5f3b258206f324c8616dae7 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -543,7 +543,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index 75067bdcbf..3eebcabb19 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -378,10 +378,10 @@ index 21aa19081ca3d9c20ea8e401c2a4b830ba667a51..1398d911456b6e685bf7292687c5f5a4 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 fac306391872457a6b60a7fc69dfe7d85da6b23f..1dd3c871316b246210ef05d93e949f363deb322f 100644 +index f6c8c371e22272983f80268dab8009ee029bed2a..37f6fdf1be6d0f8a4ec4b9998fa710876b5515c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -771,9 +771,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()); @@ -398,7 +398,7 @@ index fac306391872457a6b60a7fc69dfe7d85da6b23f..1dd3c871316b246210ef05d93e949f36 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -789,8 +796,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); @@ -414,7 +414,7 @@ index fac306391872457a6b60a7fc69dfe7d85da6b23f..1dd3c871316b246210ef05d93e949f36 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -807,6 +821,31 @@ public class CraftEventFactory { +@@ -819,6 +833,31 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index d2c414c57d..12d9d4d358 100644 --- a/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -28,7 +28,7 @@ index fa975d4788281b66e63b4e8b9ad05c8a0f78c40a..b9125ca724c60026f0dcff40f570f6a5 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c3acd5e610301de924eb1f49f00f9a3ae85eefb3..e48184b87b2c98cc2f103204ba62ed22a6fd3694 100644 +index 50fbf3e3fb82c25ab5f3b258206f324c8616dae7..2b5dda81b467cf1d813359faaa5c81d4aeb6ee1c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -97,6 +97,7 @@ public abstract class PlayerList { @@ -106,7 +106,7 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9e808c70a8e9762e912b693027d5fbed85f85823..8a251bb55c79c34880599a490efd271a36a09a04 100644 +index 1398d911456b6e685bf7292687c5f5a4dcea5b7e..305deccc0343563ba6080ad75d7397c7c8dd7435 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -145,6 +145,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index de697b0ca6..8555f4b014 100644 --- a/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -11,7 +11,7 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e48184b87b2c98cc2f103204ba62ed22a6fd3694..29e026f6f4106da029f9596201167c08078f4a45 100644 +index 2b5dda81b467cf1d813359faaa5c81d4aeb6ee1c..2c90e1d04447f0d34fe500a78449435c295c88e3 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -930,9 +930,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index f0863a85dc..dcb1f88c73 100644 --- a/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 29e026f6f4106da029f9596201167c08078f4a45..5ee209074e44a1a1988641098b9376e4f0c04b45 100644 +index 2c90e1d04447f0d34fe500a78449435c295c88e3..61d29dabf6ae8be8f8b5b6da9b801e84adda7dfb 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1048,6 +1048,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch index 899756c226..54596e5238 100644 --- a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch @@ -59,7 +59,7 @@ index c5abac3eb3f98a948ff7a3423cfcad70abae86ff..4502ea222d98872a4c33714a8c3149c6 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5ee209074e44a1a1988641098b9376e4f0c04b45..b00825156f12fabab0fc740f909363846cee168e 100644 +index 61d29dabf6ae8be8f8b5b6da9b801e84adda7dfb..6a00d1dcd62034c595723547afb4637e9d7c18a0 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -262,7 +262,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch index a7062e5cc6..608650cf08 100644 --- a/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b00825156f12fabab0fc740f909363846cee168e..43cb1e5ecc753f431666f326ada590581e930339 100644 +index 6a00d1dcd62034c595723547afb4637e9d7c18a0..dd05e753942d2f50ba0af41d59b4cb962df4cd1b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -664,9 +664,14 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0382-Fix-MC-158900.patch b/Spigot-Server-Patches/0382-Fix-MC-158900.patch index b590037691..dbd58cddbf 100644 --- a/Spigot-Server-Patches/0382-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0382-Fix-MC-158900.patch @@ -7,7 +7,7 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 43cb1e5ecc753f431666f326ada590581e930339..dadb3e4aa670d3e3a7a6672da55ebc26a86bb666 100644 +index dd05e753942d2f50ba0af41d59b4cb962df4cd1b..62b9c1f23fcc9df1ba49823a45b54b4e547813d0 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -531,8 +531,10 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index c2bb99d3c5..ed16ef1555 100644 --- a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -18,7 +18,7 @@ index 6787b467f18bb03a8d45dc254988b5084c74f499..bb60ce14f6c13bc3f123893150129edb PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index dadb3e4aa670d3e3a7a6672da55ebc26a86bb666..82259e8404d350cb9578e8a55d9c11b1e5b9a629 100644 +index 62b9c1f23fcc9df1ba49823a45b54b4e547813d0..a047375a231e49485a053903713b6ee5cbc9971f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -759,6 +759,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch index 76023ba347..d326950c38 100644 --- a/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch +++ b/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow overriding the java version check -DPaper.IgnoreJavaVersion=true diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c05432b2319da2ab8ff18a47ebbf11efa70a36b7..438e86595760be233e89c49224963e5e8ce335e3 100644 +index 05b647fbb360910b2961c9276c2928fe71dad90c..5ec16547a20271074d034f7fbcb43e86cb1597e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -175,7 +175,7 @@ public class Main { diff --git a/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch index d1c1e21a28..669c3d1bbc 100644 --- a/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch +++ b/Spigot-Server-Patches/0421-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 1dd3c871316b246210ef05d93e949f363deb322f..a44fa04f312d812f5593df90ebf7fe1483f73376 100644 +index 37f6fdf1be6d0f8a4ec4b9998fa710876b5515c9..36afa821dc5f04d77b6f44fe7282444ec6a7b842 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -318,13 +318,18 @@ public class CraftEventFactory { +@@ -330,13 +330,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch index deb0f581d3..38b00fc9b4 100644 --- a/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch @@ -40,7 +40,7 @@ index b27260270de80de371a5a71fa0516aa43c44c83e..1cc40b1f0af9e617b2a71bcc442543e1 Stream c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 82259e8404d350cb9578e8a55d9c11b1e5b9a629..a9dc7807508e5227b59a750f982bf7a0740fa493 100644 +index a047375a231e49485a053903713b6ee5cbc9971f..31f33e8de4b976b6a895568dd55dae35645e9a80 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -722,6 +722,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch index 716a39057c..6b1d1d031a 100644 --- a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch @@ -40,7 +40,7 @@ index c6f326787328ff6b2f974d653dc9e7932c3c0205..03e1b76a8b6850a26ed8a7b1992e0975 this.playerInteractManager.a((WorldServer) world); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a9dc7807508e5227b59a750f982bf7a0740fa493..6f6d1d4c733faa80045fb63269b16ba127c2b616 100644 +index 31f33e8de4b976b6a895568dd55dae35645e9a80..502f4b93e04c78f4681459abfb160c6fc2279c72 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -134,6 +134,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch index a74ab39e8c..0c1ba4bd46 100644 --- a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch @@ -283,7 +283,7 @@ index bb4d54ebee573964cf3026888da108584b12972f..09f94bd242318155dbb46e12224ad3e4 list.stream().map((playerchunk) -> { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6f6d1d4c733faa80045fb63269b16ba127c2b616..2602c326cf8d3516162fcc08f0f40ba4ee5f6a16 100644 +index 502f4b93e04c78f4681459abfb160c6fc2279c72..bbe41a108b424abd3b3acfdfee4d368467a2c52e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -429,7 +429,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch index c29cd22c28..038e379f20 100644 --- a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 2602c326cf8d3516162fcc08f0f40ba4ee5f6a16..00071913c0bb4deec7501a54818a2a1d6febc769 100644 +index bbe41a108b424abd3b3acfdfee4d368467a2c52e..45fce4f08eb6f3f67306d45be407b85b3fda604b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -211,9 +211,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 3076369002..5bd5b46a10 100644 --- a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -52,7 +52,7 @@ index 4ab719930f5b35c0ae221e9345f1e2eda7d9d719..8de86684dda275585826617b41d6792f if (!(entity instanceof EntityComplexPart)) { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 00071913c0bb4deec7501a54818a2a1d6febc769..18272d56bdac0ff76092d8d834c53474516732a8 100644 +index 45fce4f08eb6f3f67306d45be407b85b3fda604b..881265d9f3f5432c0f79142abc8d6ca2f5609243 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -200,6 +200,12 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch index 17450b3744..658675ac17 100644 --- a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch @@ -110,7 +110,7 @@ index 6faa8764d19f3e58808de9dc84145f765c8958a8..22ded747e9e8683faa17924149f9b279 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 18272d56bdac0ff76092d8d834c53474516732a8..045d85016edff8e1e8c775f8c701ac806fb3d4e1 100644 +index 881265d9f3f5432c0f79142abc8d6ca2f5609243..3d110c998f6b28e55055637bbfeff6f2ebdb2747 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -54,11 +54,12 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 31694c8e52..83264e8f0b 100644 --- a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -88,10 +88,10 @@ index 51e9f4a6e09474a7489d2872a800308ee3f02e46..250bccee4a27801b41c50d59e93396c6 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index a44fa04f312d812f5593df90ebf7fe1483f73376..521e204260e96c3010fdfb90e52f7170ad9a9fc4 100644 +index 36afa821dc5f04d77b6f44fe7282444ec6a7b842..6c5036b23a41769167fd53b8cc5454e5e747598e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -791,7 +791,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/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index 1a3341b74f..417fed7984 100644 --- a/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 894552adf119037e97c7de27d783920db580f62b..83151f3d7e9703f99391d24c41e90fc5ce1a80e7 100644 +index 3e4454a14fdf6305b262c15cf67203854debef28..a8cd55d3c288f2f1c0f7f9392f2f08f12f69f969 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -20,6 +20,7 @@ public class Main { diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index 2c4d00dddd..61869bc2a9 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -567,7 +567,7 @@ index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 045d85016edff8e1e8c775f8c701ac806fb3d4e1..0ad06509f26a7677e48f4bfb9c979a42fb6a4f74 100644 +index 3d110c998f6b28e55055637bbfeff6f2ebdb2747..59f00891ee2d1641678d4903a365cb94247bf08f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -175,7 +175,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 64473f8ce1..abf2be1158 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1144,7 +1144,7 @@ index 7fd991fd3994a18625c193aeb15ed521d3b6a447..6bb2b3520362d056d4d75c65764e4c8d } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0ad06509f26a7677e48f4bfb9c979a42fb6a4f74..3c238f7957d28f3edb6481a89ea96d6cbbbc96d8 100644 +index 59f00891ee2d1641678d4903a365cb94247bf08f..e55e11d5c97d656db8fed42c1581375077129906 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -196,8 +196,8 @@ public abstract class PlayerList { @@ -1223,7 +1223,7 @@ index 11559f9e4b3f5fda6bfe4f70f963ce4f7967f051..bf2f602bb07aa4c7c0a22ad9be9e77d7 net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 517a4b64e8e0a3237c349fa284d23b43039035f4..c7b4e5f2a26aaa83520b55ec5c917d63980c8041 100644 +index e3ae90aa7c2c067741540995fbb1c694b663f624..8f2b84a84a8249ae2b48d195eb8c1ffb4464fe0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -744,6 +744,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch index 5cfe7311cb..79e13aff50 100644 --- a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,7 +11,7 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3c238f7957d28f3edb6481a89ea96d6cbbbc96d8..3c5ba8f2fd59d37639f87ac888cc950e7cd628f7 100644 +index e55e11d5c97d656db8fed42c1581375077129906..f17399a73e0de49d2e7325747a2637f447df78f2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1059,16 +1059,40 @@ public abstract class PlayerList { diff --git a/work/Bukkit b/work/Bukkit index 1cb03826eb..0ca45a21b9 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 1cb03826ebde4ef887519ce37b0a2a341494a183 +Subproject commit 0ca45a21b94ba986a410ad495ad40b0ee2aa6de4 diff --git a/work/CraftBukkit b/work/CraftBukkit index dc7c3c61fa..145921e2a6 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit dc7c3c61fa061c87eca5d158f1f1c369620622b6 +Subproject commit 145921e2a6ca99081f6019321b63e80756f9cac9 diff --git a/work/Spigot b/work/Spigot index 4d9262cf9f..beb7d47c1d 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 4d9262cf9f7cf1a38525d21734708c3fe4a28bcb +Subproject commit beb7d47c1d386faa934fceb3b8bd914721074b59 From a12a6778592911a2cff28b353a294c66902ba8bf Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Jul 2020 02:16:51 -0400 Subject: [PATCH 92/95] Support String UUID's in old player skulls Should fix remaining skull issues for people with unconverted old skulls. Fixes #3734 --- .../0527-Support-old-UUID-format-for-NBT.patch | 16 ++++++++++++++++ ...an-up-duplicated-GameProfile-Properties.patch | 8 ++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch index 40a62a9605..dd0cf39941 100644 --- a/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch +++ b/Spigot-Server-Patches/0527-Support-old-UUID-format-for-NBT.patch @@ -7,6 +7,22 @@ We have stored UUID in plenty of places that did not get DFU'd So just look for old format and load it if it exists. +diff --git a/src/main/java/net/minecraft/server/GameProfileSerializer.java b/src/main/java/net/minecraft/server/GameProfileSerializer.java +index 66d503a91665952b98c8cdc06c9ad10782b0558b..dca47422816e0ff5cf56ee73d0aa7e2f74a48060 100644 +--- a/src/main/java/net/minecraft/server/GameProfileSerializer.java ++++ b/src/main/java/net/minecraft/server/GameProfileSerializer.java +@@ -28,6 +28,11 @@ public final class GameProfileSerializer { + s = nbttagcompound.getString("Name"); + } + ++ // Paper start - support string UUID's ++ if (nbttagcompound.hasKeyOfType("Id", 8)) { ++ uuid = UUID.fromString(nbttagcompound.getString("Id")); ++ } ++ // Paper end + if (nbttagcompound.b("Id")) { + uuid = nbttagcompound.a("Id"); + } diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java index f608b35502890650adfc1df35e0794471f57ecbc..436f40bcd7817bedde4f6570c7c47dba7ff7034f 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java diff --git a/Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch b/Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch index 8b8ff37292..5d2c684b69 100644 --- a/Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch +++ b/Spigot-Server-Patches/0528-Clean-up-duplicated-GameProfile-Properties.patch @@ -9,10 +9,10 @@ growing to large sizes and preventing login. This now automatically cleans up the extra properties. diff --git a/src/main/java/net/minecraft/server/GameProfileSerializer.java b/src/main/java/net/minecraft/server/GameProfileSerializer.java -index 66d503a91665952b98c8cdc06c9ad10782b0558b..488c3473c9e56913d382c2d9957582634f3f3d85 100644 +index dca47422816e0ff5cf56ee73d0aa7e2f74a48060..1fe44d4a1a1895f5715c720f9d7d7acb10e50f61 100644 --- a/src/main/java/net/minecraft/server/GameProfileSerializer.java +++ b/src/main/java/net/minecraft/server/GameProfileSerializer.java -@@ -42,8 +42,8 @@ public final class GameProfileSerializer { +@@ -47,8 +47,8 @@ public final class GameProfileSerializer { while (iterator.hasNext()) { String s1 = (String) iterator.next(); NBTTagList nbttaglist = nbttagcompound1.getList(s1, 10); @@ -23,7 +23,7 @@ index 66d503a91665952b98c8cdc06c9ad10782b0558b..488c3473c9e56913d382c2d995758263 NBTTagCompound nbttagcompound2 = nbttaglist.getCompound(i); String s2 = nbttagcompound2.getString("Value"); -@@ -229,7 +229,7 @@ public final class GameProfileSerializer { +@@ -234,7 +234,7 @@ public final class GameProfileSerializer { Optional optional = iblockstate.b(nbttagcompound.getString(s)); if (optional.isPresent()) { @@ -32,7 +32,7 @@ index 66d503a91665952b98c8cdc06c9ad10782b0558b..488c3473c9e56913d382c2d995758263 } else { GameProfileSerializer.LOGGER.warn("Unable to read property: {} with value: {} for blockstate: {}", s, nbttagcompound.getString(s), nbttagcompound1.toString()); return s0; -@@ -259,8 +259,8 @@ public final class GameProfileSerializer { +@@ -264,8 +264,8 @@ public final class GameProfileSerializer { return nbttagcompound; } From b25236f0b7f3164d3528089bb79496d5c845f962 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Jul 2020 19:12:08 -0400 Subject: [PATCH 93/95] [Auto] Updated Upstream (CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: b6a876bc3 SPIGOT-5936: BlockPlaceEvent does not fire for lily_pad --- .../0252-Vanished-players-don-t-have-rights.patch | 4 ++-- work/CraftBukkit | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch index f6c122f542..adb94d4d03 100644 --- a/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0252-Vanished-players-don-t-have-rights.patch @@ -62,10 +62,10 @@ index cdf80e50de0840002f62f4c1df4fbcc4e13675d7..ea5f5845a8d202e62da3ae1bfb1e4dbd return false; } diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java -index 6c7f677f68d89d7e08c07a0f24268c5a638b4076..33d38a9a8a55c7a26d9a584e8058f42556b6ed59 100644 +index d83bd0169bb4b8c25f44ae3582e58b8fea97ecbd..63d2294da4f0da628e62b782b71e34cb3eb959b5 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java -@@ -139,7 +139,8 @@ public class ItemBlock extends Item { +@@ -154,7 +154,8 @@ public class ItemBlock extends Item { EntityHuman entityhuman = blockactioncontext.getEntity(); VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.a() : VoxelShapeCollision.a((Entity) entityhuman); // CraftBukkit start - store default return diff --git a/work/CraftBukkit b/work/CraftBukkit index 145921e2a6..b6a876bc34 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 145921e2a6ca99081f6019321b63e80756f9cac9 +Subproject commit b6a876bc34a0cccbfccb890029a44a61b9853285 From 43eb073db5520ad5f15f7dd3d2115866d8adbbed Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Jul 2020 20:02:02 -0400 Subject: [PATCH 94/95] [Auto] Updated Upstream (Bukkit/Spigot) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: a3e22325 Improve javadocs by adding links to dependency docs Spigot Changes: ccb012a2 Improve javadocs by adding links to dependency docs --- work/Bukkit | 2 +- work/Spigot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/work/Bukkit b/work/Bukkit index 0ca45a21b9..a3e2232545 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 0ca45a21b94ba986a410ad495ad40b0ee2aa6de4 +Subproject commit a3e223254511014327bf59c76e71b7dfe3b4b850 diff --git a/work/Spigot b/work/Spigot index beb7d47c1d..ccb012a27a 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit beb7d47c1d386faa934fceb3b8bd914721074b59 +Subproject commit ccb012a27ac070ee5e2f924743bbbd8d29931e93 From 4fd17445297b41e7121303bf886b32192346e715 Mon Sep 17 00:00:00 2001 From: Wyatt Childers Date: Fri, 3 Jul 2020 14:57:28 -0400 Subject: [PATCH 95/95] Spawn player in correct world on login --- ...awn-player-in-correct-world-on-login.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Spigot-Server-Patches/0532-Spawn-player-in-correct-world-on-login.patch diff --git a/Spigot-Server-Patches/0532-Spawn-player-in-correct-world-on-login.patch b/Spigot-Server-Patches/0532-Spawn-player-in-correct-world-on-login.patch new file mode 100644 index 0000000000..588f4781c6 --- /dev/null +++ b/Spigot-Server-Patches/0532-Spawn-player-in-correct-world-on-login.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Wyatt Childers +Date: Fri, 3 Jul 2020 14:57:05 -0400 +Subject: [PATCH] Spawn player in correct world on login + + +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index f17399a73e0de49d2e7325747a2637f447df78f2..3c2f1f140c3991195bb8147bd65d9cd16a8fd3da 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -119,7 +119,18 @@ public abstract class PlayerList { + }String lastKnownName = s; // Paper + // CraftBukkit end + +- if (nbttagcompound != null) { ++ // Paper start - move logic in Entity to here, to use bukkit supplied world UUID. ++ if (nbttagcompound != null && nbttagcompound.hasKey("WorldUUIDMost") && nbttagcompound.hasKey("WorldUUIDLeast")) { ++ UUID uid = new UUID(nbttagcompound.getLong("WorldUUIDMost"), nbttagcompound.getLong("WorldUUIDLeast")); ++ org.bukkit.World bWorld = Bukkit.getServer().getWorld(uid); ++ if (bWorld != null) { ++ resourcekey = ((CraftWorld) bWorld).getHandle().getDimensionKey(); ++ } else { ++ resourcekey = World.OVERWORLD; ++ } ++ } else if (nbttagcompound != null) { ++ // Vanilla migration support ++ // Paper end + DataResult dataresult = DimensionManager.a(new Dynamic(DynamicOpsNBT.a, nbttagcompound.get("Dimension"))); + Logger logger = PlayerList.LOGGER; +