From 40748b3c8d93b2b843f2443dd3da985fe85bad3b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 25 Jun 2019 02:47:58 +0100 Subject: [PATCH] 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: 3dc4cdcd Update to Minecraft 1.14.3-pre4 88b25a8c SPIGOT-5098: Add a method to allow colored sign changes 6d913552 Update to Minecraft 1.14.3-pre4 CraftBukkit Changes: f1f33559 Update to Minecraft 1.14.3 8a3d3f49 SPIGOT-5098: Add a method to allow colored sign changes 533290e2 SPIGOT-5100: Console warning from pig zombie targeting 6dde4b9f SPIGOT-5094: Allow opening merchant for wandering traders and hide the xp bar for custom merchants 9af90077 SPIGOT-5097: Bukkit.clearRecipes() no longer working 38fa220f Fix setting game rules via the API fe3930ce Update to Minecraft 1.14.3-pre4 da071ec5 Remove outdated build delay. Spigot Changes: 4d2f30f1 Update to Minecraft 1.14.3 f16400e3 Update to Minecraft 1.14.3-pre4 --- .../Ability-to-apply-mending-to-XP-API.patch | 2 +- .../Add-Ban-Methods-to-Player-Objects.patch | 15 +- .../Add-FastUtil-to-Bukkit.patch | 2 +- .../Add-String-based-Action-Bar-API.patch | 2 +- .../Add-player-view-distance-API.patch | 2 +- ...low-plugins-to-use-SLF4J-for-logging.patch | 4 +- .../Complete-resource-pack-API.patch | 4 +- ...e-attack-cooldown-methods-for-Player.patch | 2 +- ...nt-protocol-version-and-virtual-host.patch | 4 +- ...upstream-javadoc-warnings-and-errors.patch | 8 +- ...cord-chat-API-from-spigot-subclasses.patch | 6 +- Spigot-API-Patches/POM-changes.patch | 5 +- .../Player-Tab-List-and-Title-APIs.patch | 6 +- .../Player-affects-spawning-API.patch | 2 +- .../Player.setPlayerProfile-API.patch | 4 +- Spigot-API-Patches/Timings-v2.patch | 70 ++++----- .../Use-ASM-for-event-executors.patch | 18 +-- .../Ability-to-apply-mending-to-XP-API.patch | 6 +- ...tually-Limit-Natural-Spawns-To-Limit.patch | 6 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 6 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 8 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 6 +- .../Add-EntityZapEvent.patch | 4 +- Spigot-Server-Patches/Add-Heightmap-API.patch | 4 +- .../Add-LivingEntity-getTargetEntity.patch | 10 +- ...-MinecraftKey-Information-to-Objects.patch | 8 +- .../Add-More-Creeper-API.patch | 25 +-- ...-despawn-distances-for-living-entiti.patch | 2 +- .../Add-exception-reporting-event.patch | 14 +- ...d-method-to-open-already-placed-sign.patch | 2 +- .../Add-more-Zombie-API.patch | 10 +- ...event-players-from-moving-into-unloa.patch | 9 +- .../Add-sun-related-API.patch | 14 +- ...d-version-history-to-version-command.patch | 2 +- ...chunks-are-slime-spawn-chunks-toggle.patch | 10 +- ...ts-to-fire-only-after-the-server-plu.patch | 2 +- .../Allow-nerfed-mobs-to-jump.patch | 6 +- ...Item-entities-with-World.spawnEntity.patch | 2 +- .../Async-Chunk-placeholder.patch | 2 +- ...uto-fix-bad-Y-levels-on-player-login.patch | 2 +- .../Basic-PlayerProfile-API.patch | 20 +-- ...-remove-from-being-called-on-Players.patch | 2 +- .../Call-player-spectator-target-events.patch | 2 +- ...arseException-in-Entity-and-TE-names.patch | 4 +- .../Chunk-debug-command.patch | 18 +-- .../ChunkMapDistance-CME.patch | 28 ++-- .../Complete-resource-pack-API.patch | 4 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 6 +- .../Configurable-Player-Collision.patch | 4 +- ...figurable-container-update-tick-rate.patch | 2 +- .../Configurable-end-credits.patch | 2 +- ...ble-inter-world-teleportation-safety.patch | 2 +- ...le-spawn-chances-for-skeleton-horses.patch | 6 +- ...nfigurable-top-of-nether-void-damage.patch | 12 +- .../Custom-replacement-for-eaten-items.patch | 4 +- ...oreboards-for-non-players-by-default.patch | 4 +- .../Do-not-let-armorstands-drown.patch | 14 +- ...t-allow-digging-into-unloaded-chunks.patch | 2 +- ...llow-entities-to-ride-themselves-572.patch | 2 +- ...ge-the-Entity-Random-seed-for-squids.patch | 2 +- ...ck-and-tnt-entities-at-the-specified.patch | 8 +- .../Duplicate-UUID-Resolve-Option.patch | 13 +- .../EndermanEscapeEvent.patch | 4 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 2 +- Spigot-Server-Patches/Entity-Origin-API.patch | 8 +- .../Entity-fromMobSpawner.patch | 4 +- .../Entity-getEntitySpawnReason.patch | 6 +- .../EntityPathfindEvent.patch | 6 +- .../EntityTransformedEvent.patch | 8 +- .../Expand-Explosions-API.patch | 2 +- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +- ...PI-for-Reason-Source-Triggering-play.patch | 32 ++-- ...e-attack-cooldown-methods-for-Player.patch | 14 +- ...nt-protocol-version-and-virtual-host.patch | 2 +- ...isPrimaryThread-and-MinecraftServer-.patch | 4 +- .../Fix-Double-World-Add-issues.patch | 2 +- Spigot-Server-Patches/Fix-MC-154214.patch | 8 +- .../Fix-World-isChunkGenerated-calls.patch | 10 +- ...h-entity-loss-due-to-unloaded-chunks.patch | 6 +- ...dDebugInfo-not-initialized-on-client.patch | 4 +- .../Fix-sign-edit-memory-leak.patch | 2 +- .../Fix-tracker-desync-issue.patch | 8 +- .../Flag-to-disable-the-channel-limit.patch | 2 +- .../Further-improve-server-tick-loop.patch | 8 +- ...ead-Entities-in-entityList-iteration.patch | 10 +- ...ecipes-in-RecipeBook-to-avoid-data-e.patch | 2 +- .../Implement-CraftBlockSoundGroup.patch | 8 +- .../Implement-PlayerLocaleChangeEvent.patch | 4 +- .../Implement-World.getEntity-UUID-API.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 13 +- .../Implement-getI18NDisplayName.patch | 2 +- ...item-frames-performance-and-bug-fixe.patch | 14 +- .../Improve-death-events.patch | 70 ++++----- .../InventoryCloseEvent-Reason-API.patch | 16 +- .../Item-canEntityPickup.patch | 4 +- .../Limit-Client-Sign-length-more.patch | 2 +- ...mit-lightning-strike-effect-distance.patch | 4 +- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 12 +- Spigot-Server-Patches/MC-Dev-fixes.patch | 135 ++++++++-------- Spigot-Server-Patches/MC-Utils.patch | 28 ++-- ...loadChunk-int-int-false-load-unconve.patch | 2 +- ...-max-squid-spawn-height-configurable.patch | 12 +- ...more-aggressive-in-the-chunk-unload-.patch | 2 +- .../Mob-Spawner-API-Enhancements.patch | 2 +- ...awns-should-honor-nametags-and-leash.patch | 2 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 14 +- .../Only-refresh-abilities-if-needed.patch | 2 +- .../Optimise-removeQueue.patch | 2 +- ...imize-GameRules-to-use-LinkedHashMap.patch | 61 ++------ Spigot-Server-Patches/Optimize-Hoppers.patch | 12 +- .../Optimize-Persistent-Data-Loading.patch | 34 ++-- .../Optimize-Server-World-Map.patch | 2 +- .../Optimize-UserCache-Thread-Safe.patch | 2 +- .../Optimize-World-Time-Updates.patch | 8 +- .../Optimize-explosions.patch | 6 +- .../Optional-TNT-doesn-t-move-in-water.patch | 10 +- Spigot-Server-Patches/POM-Changes.patch | 6 +- ...layer-View-Distance-API-placeholders.patch | 6 +- .../Player-Tab-List-and-Title-APIs.patch | 2 +- .../Player-affects-spawning-API.patch | 12 +- .../Player.setPlayerProfile-API.patch | 4 +- .../PlayerDeathEvent-getItemsToKeep.patch | 4 +- .../PlayerNaturallySpawnCreaturesEvent.patch | 5 +- .../PreCreatureSpawnEvent.patch | 13 +- .../PreSpawnerSpawnEvent.patch | 6 +- ...ent-Mob-AI-Rules-from-Loading-Chunks.patch | 10 +- ...revent-Saving-Bad-entities-to-chunks.patch | 2 +- .../ProfileWhitelistVerifyEvent.patch | 4 +- .../Properly-fix-item-duplication-bug.patch | 4 +- ...le-async-calls-to-restart-the-server.patch | 4 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- ...nilla-entity-warnings-for-duplicates.patch | 2 +- ...ers-that-dismount-from-other-players.patch | 2 +- .../Reset-players-airTicks-on-respawn.patch | 9 +- ...sition-the-first-time-an-entity-is-s.patch | 4 +- ...dEffects-only-to-players-who-can-see.patch | 8 +- ...ets-from-world-player-list-not-serve.patch | 8 +- .../Server-Tick-Events.patch | 2 +- .../Shoulder-Entities-Release-API.patch | 4 +- ...ient-crashes-server-lists-and-Mojang.patch | 4 +- .../SkeletonHorse-Additions.patch | 20 +-- .../Slime-Pathfinder-Events.patch | 16 +- .../Speedup-BlockPos-by-fixing-inlining.patch | 12 +- ...to-current-Chunk-for-Entity-and-Bloc.patch | 6 +- .../String-based-Action-Bar-API.patch | 2 +- .../Support-Overriding-World-Seeds.patch | 8 +- Spigot-Server-Patches/Timings-v2.patch | 146 +++++++++++------- Spigot-Server-Patches/Turtle-API.patch | 50 +++--- ...ity-Metadata-for-all-tracked-players.patch | 4 +- ...Status-cache-when-saving-protochunks.patch | 2 +- ...ams-to-redirect-System.out-err-to-lo.patch | 4 +- ...oleAppender-for-console-improvements.patch | 12 +- .../Use-a-Queue-for-Queueing-Commands.patch | 6 +- .../Vanished-players-don-t-have-rights.patch | 10 +- ...nd-for-setting-passengers-on-players.patch | 2 +- ...vehicle-tracking-issue-on-disconnect.patch | 2 +- ...-more-information-to-Entity.toString.patch | 2 +- ...entity-dismount-during-teleportation.patch | 8 +- ...th-absorb-values-and-repair-bad-data.patch | 4 +- .../improve-CraftWorld-isChunkLoaded.patch | 2 +- .../incremental-chunk-saving.patch | 20 ++- ...-possibility-for-getServer-singleton.patch | 8 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 166 files changed, 783 insertions(+), 820 deletions(-) diff --git a/Spigot-API-Patches/Ability-to-apply-mending-to-XP-API.patch b/Spigot-API-Patches/Ability-to-apply-mending-to-XP-API.patch index a6b56e972..9cd52660d 100644 --- a/Spigot-API-Patches/Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-API-Patches/Ability-to-apply-mending-to-XP-API.patch @@ -10,7 +10,7 @@ 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 f0aee351d..1e7bbd0e6 100644 +index ce4ea22c..d069a84c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/Spigot-API-Patches/Add-Ban-Methods-to-Player-Objects.patch b/Spigot-API-Patches/Add-Ban-Methods-to-Player-Objects.patch index 50b8c3db0..4b196899e 100644 --- a/Spigot-API-Patches/Add-Ban-Methods-to-Player-Objects.patch +++ b/Spigot-API-Patches/Add-Ban-Methods-to-Player-Objects.patch @@ -8,7 +8,7 @@ Allows a more logical API for banning players. player.banPlayer("Breaking the rules"); diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java -index ffc8ad373..222a9a7bf 100644 +index ffc8ad37..222a9a7b 100644 --- a/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java @@ -0,0 +0,0 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio @@ -74,25 +74,24 @@ index ffc8ad373..222a9a7bf 100644 /** * 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 759d42109..203200ec5 100644 +index f89b6c6b..7ae67786 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ package org.bukkit.entity; import java.net.InetSocketAddress; -+import java.util.Date; ++import java.util.Date; // Paper import com.destroystokyo.paper.Title; import com.destroystokyo.paper.profile.PlayerProfile; import org.bukkit.Achievement; -+import org.bukkit.BanEntry; -+import org.bukkit.BanList; -+import org.bukkit.Bukkit; -+import org.bukkit.ChatColor; ++import org.bukkit.BanEntry; // Paper ++import org.bukkit.BanList; // Paper ++import org.bukkit.Bukkit; // Paper + import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; - import org.bukkit.Instrument; @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); diff --git a/Spigot-API-Patches/Add-FastUtil-to-Bukkit.patch b/Spigot-API-Patches/Add-FastUtil-to-Bukkit.patch index 72fa1200c..0469abfe7 100644 --- a/Spigot-API-Patches/Add-FastUtil-to-Bukkit.patch +++ b/Spigot-API-Patches/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 2a2abac96..81851a293 100644 +index 41708a2b..3b650cbc 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch index dda3f636f..2c2712d4b 100644 --- a/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch +++ b/Spigot-API-Patches/Add-String-based-Action-Bar-API.patch @@ -5,7 +5,7 @@ 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 495d43e78..62fe51ab1 100644 +index aaa74125..f41545c5 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/Spigot-API-Patches/Add-player-view-distance-API.patch b/Spigot-API-Patches/Add-player-view-distance-API.patch index 69b8c3190..5771770a7 100644 --- a/Spigot-API-Patches/Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/Add-player-view-distance-API.patch @@ -5,7 +5,7 @@ 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 f5d31648f..a9b11322b 100644 +index b0ead72d..abd119dd 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch index c4db8fc47..4da5c8dd9 100644 --- a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/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 94173d328..4b8334d62 100644 +index baefc0ff..5dc31841 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -32,7 +32,7 @@ index 94173d328..4b8334d62 100644 junit diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java -index febfec6ef..79890c68f 100644 +index febfec6e..79890c68 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java +++ b/src/main/java/org/bukkit/plugin/Plugin.java @@ -0,0 +0,0 @@ public interface Plugin extends TabExecutor { diff --git a/Spigot-API-Patches/Complete-resource-pack-API.patch b/Spigot-API-Patches/Complete-resource-pack-API.patch index 1366eff73..4fe38e6ee 100644 --- a/Spigot-API-Patches/Complete-resource-pack-API.patch +++ b/Spigot-API-Patches/Complete-resource-pack-API.patch @@ -5,7 +5,7 @@ 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 40246fb99..495d43e78 100644 +index 4d6b06da..aaa74125 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -82,7 +82,7 @@ index 40246fb99..495d43e78 100644 public class Spigot extends Entity.Spigot { diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java -index b98195650..4c2102a11 100644 +index b9819565..4c2102a1 100644 --- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java @@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull; diff --git a/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch b/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch index c40833f98..61acb2b6b 100644 --- a/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-API-Patches/Expose-attack-cooldown-methods-for-Player.patch @@ -5,7 +5,7 @@ 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 203200ec5..39a7440ed 100644 +index 7ae67786..8d8d8957 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/Spigot-API-Patches/Expose-client-protocol-version-and-virtual-host.patch b/Spigot-API-Patches/Expose-client-protocol-version-and-virtual-host.patch index 06170eee2..83f7809aa 100644 --- a/Spigot-API-Patches/Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-API-Patches/Expose-client-protocol-version-and-virtual-host.patch @@ -11,7 +11,7 @@ Add a NetworkClient interface that provides access to: diff --git a/src/main/java/com/destroystokyo/paper/network/NetworkClient.java b/src/main/java/com/destroystokyo/paper/network/NetworkClient.java new file mode 100644 -index 000000000..7b2af1bd7 +index 00000000..7b2af1bd --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/NetworkClient.java @@ -0,0 +0,0 @@ @@ -57,7 +57,7 @@ index 000000000..7b2af1bd7 + +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index f14bdd22f..f0aee351d 100644 +index 576ad2c6..ce4ea22c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable; diff --git a/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch index 0ececf6cd..ea88f43fd 100644 --- a/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/Fix-upstream-javadoc-warnings-and-errors.patch @@ -6,7 +6,7 @@ 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 d1d64fb60..2fe46faf0 100644 +index d1d64fb6..2fe46faf 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable { @@ -74,7 +74,7 @@ index d1d64fb60..2fe46faf0 100644 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, boolean force); diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java -index c2096b534..bca9d3659 100644 +index c2096b53..bca9d365 100644 --- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java +++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java @@ -0,0 +0,0 @@ public interface AreaEffectCloud extends Entity { @@ -86,7 +86,7 @@ index c2096b534..bca9d3659 100644 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 62fe51ab1..f14bdd22f 100644 +index f41545c5..576ad2c6 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -179,7 +179,7 @@ index 62fe51ab1..f14bdd22f 100644 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); diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java -index 1b2267f4e..1a58734d9 100644 +index 1b2267f4..1a58734d 100644 --- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java @@ -0,0 +0,0 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable { diff --git a/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 975ccf638..f0a4bcf72 100644 --- a/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/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 63e48ef3f..b92304e9b 100644 +index 63e48ef3..b92304e9 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { @@ -37,7 +37,7 @@ index 63e48ef3f..b92304e9b 100644 * 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 87300a5df..d35d2deff 100644 +index 87300a5d..d35d2def 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { @@ -68,7 +68,7 @@ index 87300a5df..d35d2deff 100644 * 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 a9b11322b..de1b1512f 100644 +index abd119dd..8bf46516 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/Spigot-API-Patches/POM-changes.patch b/Spigot-API-Patches/POM-changes.patch index ec85de83c..1b9ea5379 100644 --- a/Spigot-API-Patches/POM-changes.patch +++ b/Spigot-API-Patches/POM-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 5ddf33938..2a2abac96 100644 +index 83eb5a39..41708a2b 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -22,7 +22,7 @@ index 5ddf33938..2a2abac96 100644 - spigot-api + com.destroystokyo.paper + paper-api - 1.14.2-R0.1-SNAPSHOT + 1.14.3-SNAPSHOT jar - Spigot-API @@ -34,7 +34,6 @@ index 5ddf33938..2a2abac96 100644 - true + -+ 1.8 1.8 UTF-8 diff --git a/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch index b4f5af37b..666339439 100644 --- a/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/com/destroystokyo/paper/Title.java b/src/main/java/com/destroystokyo/paper/Title.java new file mode 100644 -index 000000000..4fe18540f +index 00000000..4fe18540 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/Title.java @@ -0,0 +0,0 @@ @@ -384,7 +384,7 @@ index 000000000..4fe18540f + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index de1b1512f..40246fb99 100644 +index 8bf46516..4d6b06da 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ @@ -394,8 +394,8 @@ index de1b1512f..40246fb99 100644 + +import com.destroystokyo.paper.Title; import org.bukkit.Achievement; + import org.bukkit.DyeColor; import org.bukkit.Effect; - import org.bukkit.GameMode; @@ -0,0 +0,0 @@ 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/Player-affects-spawning-API.patch b/Spigot-API-Patches/Player-affects-spawning-API.patch index 4f2f4c16d..e4e212d12 100644 --- a/Spigot-API-Patches/Player-affects-spawning-API.patch +++ b/Spigot-API-Patches/Player-affects-spawning-API.patch @@ -5,7 +5,7 @@ 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 72b08e73a..f5d31648f 100644 +index bf0b8bf1..b0ead72d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/Spigot-API-Patches/Player.setPlayerProfile-API.patch b/Spigot-API-Patches/Player.setPlayerProfile-API.patch index 926e6324b..851a32a0b 100644 --- a/Spigot-API-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/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 1e7bbd0e6..759d42109 100644 +index d069a84c..f89b6c6b 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ package org.bukkit.entity; @@ -15,8 +15,8 @@ index 1e7bbd0e6..759d42109 100644 import com.destroystokyo.paper.Title; +import com.destroystokyo.paper.profile.PlayerProfile; import org.bukkit.Achievement; + import org.bukkit.DyeColor; import org.bukkit.Effect; - import org.bukkit.GameMode; @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} */ diff --git a/Spigot-API-Patches/Timings-v2.patch b/Spigot-API-Patches/Timings-v2.patch index 0b19ef1f3..4241ca130 100644 --- a/Spigot-API-Patches/Timings-v2.patch +++ b/Spigot-API-Patches/Timings-v2.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java new file mode 100644 -index 000000000..64531fcce +index 00000000..64531fcc --- /dev/null +++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java @@ -0,0 +0,0 @@ @@ -96,7 +96,7 @@ index 000000000..64531fcce +} diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java new file mode 100644 -index 000000000..9b45ce887 +index 00000000..9b45ce88 --- /dev/null +++ b/src/main/java/co/aikar/timings/NullTimingHandler.java @@ -0,0 +0,0 @@ @@ -170,7 +170,7 @@ index 000000000..9b45ce887 +} diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java new file mode 100644 -index 000000000..933ecf9bd +index 00000000..933ecf9b --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java @@ -0,0 +0,0 @@ @@ -259,7 +259,7 @@ index 000000000..933ecf9bd +} diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java new file mode 100644 -index 000000000..a21e5ead5 +index 00000000..a21e5ead --- /dev/null +++ b/src/main/java/co/aikar/timings/Timing.java @@ -0,0 +0,0 @@ @@ -348,7 +348,7 @@ index 000000000..a21e5ead5 +} diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java new file mode 100644 -index 000000000..a5d13a1e4 +index 00000000..a5d13a1e --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingData.java @@ -0,0 +0,0 @@ @@ -476,7 +476,7 @@ index 000000000..a5d13a1e4 +} diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java new file mode 100644 -index 000000000..cc0390c06 +index 00000000..cc0390c0 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHandler.java @@ -0,0 +0,0 @@ @@ -709,7 +709,7 @@ index 000000000..cc0390c06 +} diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java new file mode 100644 -index 000000000..ddaed8127 +index 00000000..ddaed812 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistory.java @@ -0,0 +0,0 @@ @@ -1069,7 +1069,7 @@ index 000000000..ddaed8127 +} diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java new file mode 100644 -index 000000000..86d5ac6bd +index 00000000..86d5ac6b --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java @@ -0,0 +0,0 @@ @@ -1133,7 +1133,7 @@ index 000000000..86d5ac6bd +} diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java new file mode 100644 -index 000000000..df142a89b +index 00000000..df142a89 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingIdentifier.java @@ -0,0 +0,0 @@ @@ -1255,7 +1255,7 @@ index 000000000..df142a89b +} diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java new file mode 100644 -index 000000000..0b34e0d01 +index 00000000..0b34e0d0 --- /dev/null +++ b/src/main/java/co/aikar/timings/Timings.java @@ -0,0 +0,0 @@ @@ -1554,7 +1554,7 @@ index 000000000..0b34e0d01 +} diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java new file mode 100644 -index 000000000..c0d8f2016 +index 00000000..c0d8f201 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsCommand.java @@ -0,0 +0,0 @@ @@ -1682,7 +1682,7 @@ index 000000000..c0d8f2016 +} diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java new file mode 100644 -index 000000000..5923adfe6 +index 00000000..5923adfe --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsExport.java @@ -0,0 +0,0 @@ @@ -2043,7 +2043,7 @@ index 000000000..5923adfe6 +} diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java new file mode 100644 -index 000000000..ef824d701 +index 00000000..ef824d70 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsManager.java @@ -0,0 +0,0 @@ @@ -2237,7 +2237,7 @@ index 000000000..ef824d701 +} diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java new file mode 100644 -index 000000000..bf3e059fe +index 00000000..bf3e059f --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsReportListener.java @@ -0,0 +0,0 @@ @@ -2318,7 +2318,7 @@ index 000000000..bf3e059fe +} diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java new file mode 100644 -index 000000000..632c49615 +index 00000000..632c4961 --- /dev/null +++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java @@ -0,0 +0,0 @@ @@ -2377,7 +2377,7 @@ index 000000000..632c49615 +} diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java new file mode 100644 -index 000000000..80155072d +index 00000000..80155072 --- /dev/null +++ b/src/main/java/co/aikar/util/Counter.java @@ -0,0 +0,0 @@ @@ -2421,7 +2421,7 @@ index 000000000..80155072d +} diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java new file mode 100644 -index 000000000..190bf0598 +index 00000000..190bf059 --- /dev/null +++ b/src/main/java/co/aikar/util/JSONUtil.java @@ -0,0 +0,0 @@ @@ -2567,7 +2567,7 @@ index 000000000..190bf0598 +} diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java new file mode 100644 -index 000000000..63a899c7d +index 00000000..63a899c7 --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingIntMap.java @@ -0,0 +0,0 @@ @@ -2649,7 +2649,7 @@ index 000000000..63a899c7d +} diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java new file mode 100644 -index 000000000..aedbb0332 +index 00000000..aedbb033 --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingMap.java @@ -0,0 +0,0 @@ @@ -3023,7 +3023,7 @@ index 000000000..aedbb0332 +} diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java new file mode 100644 -index 000000000..5989ee212 +index 00000000..5989ee21 --- /dev/null +++ b/src/main/java/co/aikar/util/MRUMapCache.java @@ -0,0 +0,0 @@ @@ -3139,7 +3139,7 @@ index 000000000..5989ee212 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 0822b8e53..940c643df 100644 +index 0822b8e5..940c643d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { @@ -3151,7 +3151,7 @@ index 0822b8e53..940c643df 100644 /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 11c5c2054..c197e3811 100644 +index 11c5c205..c197e381 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { @@ -3182,7 +3182,7 @@ index 11c5c2054..c197e3811 100644 * Sends the component to the player * diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 247d194f8..72c5501e8 100644 +index 247d194f..72c5501e 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -0,0 +0,0 @@ public interface UnsafeValues { @@ -3200,7 +3200,7 @@ index 247d194f8..72c5501e8 100644 } diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java new file mode 100644 -index 000000000..f9a00aecc +index 00000000..f9a00aec --- /dev/null +++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java @@ -0,0 +0,0 @@ @@ -3226,7 +3226,7 @@ index 000000000..f9a00aecc + } +} diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index 4bfc21468..03bdc1622 100644 +index 4bfc2146..03bdc162 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -0,0 +0,0 @@ public abstract class Command { @@ -3256,7 +3256,7 @@ index 4bfc21468..03bdc1622 100644 return true; } diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java -index d6c8938b1..a6ad94ef9 100644 +index d6c8938b..a6ad94ef 100644 --- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java +++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java @@ -0,0 +0,0 @@ public class FormattedCommandAlias extends Command { @@ -3280,7 +3280,7 @@ index d6c8938b1..a6ad94ef9 100644 } diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java new file mode 100644 -index 000000000..ca1893e9f +index 00000000..ca1893e9 --- /dev/null +++ b/src/main/java/org/bukkit/command/MessageCommandSender.java @@ -0,0 +0,0 @@ @@ -3399,7 +3399,7 @@ index 000000000..ca1893e9f + +} diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index 81e4fa573..f020cb04e 100644 +index 81e4fa57..f020cb04 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -0,0 +0,0 @@ import org.bukkit.command.defaults.BukkitCommand; @@ -3456,7 +3456,7 @@ index 81e4fa573..f020cb04e 100644 diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java deleted file mode 100644 -index 6023e4f61..000000000 +index 6023e4f6..00000000 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -3714,7 +3714,7 @@ index 6023e4f61..000000000 - // Spigot end -} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 766c724be..72b08e73a 100644 +index ae6274d7..bf0b8bf1 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3730,7 +3730,7 @@ index 766c724be..72b08e73a 100644 @NotNull diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index f648c5989..78a2d2f8d 100644 +index f648c598..78a2d2f8 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager { @@ -3787,7 +3787,7 @@ index f648c5989..78a2d2f8d 100644 } } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 1173e433a..82e379d16 100644 +index 1173e433..82e379d1 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader { @@ -3830,7 +3830,7 @@ index 1173e433a..82e379d16 100644 eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); } else { diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 0ffc1dfdb..b859796b4 100644 +index 0ffc1dfd..b859796b 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable; @@ -3844,7 +3844,7 @@ index 0ffc1dfdb..b859796b4 100644 private final Map> classes = new ConcurrentHashMap>(); private final PluginDescriptionFile description; diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java -index 5ca863b36..612958a33 100644 +index 5ca863b3..612958a3 100644 --- a/src/main/java/org/bukkit/util/CachedServerIcon.java +++ b/src/main/java/org/bukkit/util/CachedServerIcon.java @@ -0,0 +0,0 @@ package org.bukkit.util; @@ -3867,7 +3867,7 @@ index 5ca863b36..612958a33 100644 + +} diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java -index b71235f69..3cbe5c2bb 100644 +index b71235f6..3cbe5c2b 100644 --- a/src/main/java/org/spigotmc/CustomTimingsHandler.java +++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java @@ -0,0 +0,0 @@ diff --git a/Spigot-API-Patches/Use-ASM-for-event-executors.patch b/Spigot-API-Patches/Use-ASM-for-event-executors.patch index 783709381..0f4fe7299 100644 --- a/Spigot-API-Patches/Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/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 81851a293..94173d328 100644 +index 3b650cbc..baefc0ff 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -29,7 +29,7 @@ index 81851a293..94173d328 100644 diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java new file mode 100644 -index 000000000..5b28e9b1d +index 00000000..5b28e9b1 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java @@ -0,0 +0,0 @@ @@ -77,7 +77,7 @@ index 000000000..5b28e9b1d +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java new file mode 100644 -index 000000000..c83672427 +index 00000000..c8367242 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java @@ -0,0 +0,0 @@ @@ -126,7 +126,7 @@ index 000000000..c83672427 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java new file mode 100644 -index 000000000..b6e7d8ee8 +index 00000000..b6e7d8ee --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java @@ -0,0 +0,0 @@ @@ -179,7 +179,7 @@ index 000000000..b6e7d8ee8 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java new file mode 100644 -index 000000000..beed9e6e0 +index 00000000..beed9e6e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java @@ -0,0 +0,0 @@ @@ -220,7 +220,7 @@ index 000000000..beed9e6e0 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java new file mode 100644 -index 000000000..ac99477e9 +index 00000000..ac99477e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java @@ -0,0 +0,0 @@ @@ -292,7 +292,7 @@ index 000000000..ac99477e9 +} diff --git a/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java new file mode 100644 -index 000000000..72e48e8ef +index 00000000..72e48e8e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java @@ -0,0 +0,0 @@ @@ -332,7 +332,7 @@ index 000000000..72e48e8ef + } +} diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java -index a850f0780..9026e108c 100644 +index a850f078..9026e108 100644 --- a/src/main/java/org/bukkit/plugin/EventExecutor.java +++ b/src/main/java/org/bukkit/plugin/EventExecutor.java @@ -0,0 +0,0 @@ import org.bukkit.event.EventException; @@ -412,7 +412,7 @@ index a850f0780..9026e108c 100644 + // 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 12601db68..06b6724fa 100644 +index 12601db6..06b6724f 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch index 801e8bf97..58724da87 100644 --- a/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch @@ -10,7 +10,7 @@ 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 6f64b8db3a..b6a40e22a8 100644 +index 8c658079f7..16e6d95cf1 100644 --- a/src/main/java/net/minecraft/server/EnchantmentManager.java +++ b/src/main/java/net/minecraft/server/EnchantmentManager.java @@ -0,0 +0,0 @@ public class EnchantmentManager { @@ -26,7 +26,7 @@ index 6f64b8db3a..b6a40e22a8 100644 public static Entry b(Enchantment enchantment, EntityLiving entityliving) { Map map = enchantment.a(entityliving); diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 704a48c8ea..64d71a9a2a 100644 +index 8c25695669..6a5954889e 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @@ -43,7 +43,7 @@ index 704a48c8ea..64d71a9a2a 100644 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 d4fed1a512..7f1138cbbf 100644 +index 9d2a8a2da0..d8ce699e3e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Actually-Limit-Natural-Spawns-To-Limit.patch b/Spigot-Server-Patches/Actually-Limit-Natural-Spawns-To-Limit.patch index 241f7d305..b26b88bfd 100644 --- a/Spigot-Server-Patches/Actually-Limit-Natural-Spawns-To-Limit.patch +++ b/Spigot-Server-Patches/Actually-Limit-Natural-Spawns-To-Limit.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Actually-Limit-Natural-Spawns-To-Limit diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index cdc35b912f..10604cf24d 100644 +index 3da7e10a92..4c3bcb63d9 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { @@ -24,7 +24,7 @@ index cdc35b912f..10604cf24d 100644 } } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 94d7bca09d..93fec1685b 100644 +index 09f1b9d762..b442e09eb4 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -79,7 +79,7 @@ index 94d7bca09d..93fec1685b 100644 } + // Paper end // CraftBukkit end - if (i >= entityinsentient.dC()) { + if (i >= entityinsentient.dD()) { - return; + return amountSpawned; // Paper } diff --git a/Spigot-Server-Patches/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 3e50c0c84..0bdd23816 100644 --- a/Spigot-Server-Patches/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/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 ee77ad79db..60cc81ef77 100644 +index 8d21731aab..ce4ffe01ba 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -28,7 +28,7 @@ index ee77ad79db..60cc81ef77 100644 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 e1799a05fd..58ee7b30c0 100644 +index 049d702cb9..52aa83f51f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -106,7 +106,7 @@ index c1ef1c950d..3824180ee5 100644 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 bd87a1cf2c..b701e43681 100644 +index 3dd0ae0ca8..de1b874f3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index fdee1e580..1cd5d92b9 100644 --- a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/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 ddfa88bac5..291a8029ed 100644 +index bd3e610786..20b6ad48a9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -19,7 +19,7 @@ index ddfa88bac5..291a8029ed 100644 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 6c0a1eb413..8fcd721eeb 100644 +index 1212f3f67d..b38bc77c93 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -40,7 +40,7 @@ index 6c0a1eb413..8fcd721eeb 100644 protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0fc24f2076..299a316a4b 100644 +index 985b459efe..f476f326f1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -52,7 +52,7 @@ index 0fc24f2076..299a316a4b 100644 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 8cffbabfb6..f6ba51d14a 100644 +index 4efc310d93..54b4d649d1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch index d1a027903..be07df141 100644 --- a/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,7 +9,7 @@ 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 d773ef5b0d..833659bbb2 100644 +index 207e5d3e23..a13c8c68b6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import org.bukkit.configuration.file.YamlConfiguration; @@ -36,7 +36,7 @@ index d773ef5b0d..833659bbb2 100644 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 7e27f10790..3f2a3dd178 100644 +index f21b825719..5daee73a84 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ 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 93ddf7eed..5531000a8 100644 +index 8ae1b506f1..02098b9cc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch index d77e5d990..e28844d56 100644 --- a/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch @@ -46,7 +46,7 @@ index 4f60b931a1..c950139c0f 100644 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 73bd0c278a..6bd88e1d3e 100644 +index fa8d382191..74eb6f0606 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -61,12 +61,12 @@ index 73bd0c278a..6bd88e1d3e 100644 return this.getPassengers().size() < 1; } -+ public final float getCollisionBorderSize() { return aR(); } // Paper - OBFHELPER - public float aR() { ++ public final float getCollisionBorderSize() { return aS(); } // Paper - OBFHELPER + public float aS() { return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2806808328..09a58fb2af 100644 +index a8769548fe..d44ea9ec5d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -108,7 +108,7 @@ index 2806808328..09a58fb2af 100644 public int getShieldBlockingDelay() { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 9bf1919451..56488b78dd 100644 +index d207e787aa..467efdfc85 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -0,0 +0,0 @@ public final class IEntitySelector { diff --git a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch index 18d1722b1..699933aab 100644 --- a/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/Add-MinecraftKey-Information-to-Objects.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add MinecraftKey Information to Objects Stores the reference to the objects respective MinecraftKey diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index b5f318c00d..ce190d88d6 100644 +index 5626ae4e3a..360abc05e4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +0,0 @@ public class PaperCommand extends Command { @@ -19,7 +19,7 @@ index b5f318c00d..ce190d88d6 100644 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 45e2ce618a..7af4771681 100644 +index 3d03fb1b87..7e347c7c99 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.event.player.PlayerTeleportEvent; @@ -65,7 +65,7 @@ index 45e2ce618a..7af4771681 100644 protected abstract void a(NBTTagCompound nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 56a2d7df5e..98eb0d24cc 100644 +index f603950b2e..eaacc9bff8 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ public class EntityTypes { @@ -92,7 +92,7 @@ index 0000000000..743142d030 + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index fa6ec71061..4ccdd7583e 100644 +index 5b0153352f..8f9820f492 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder; diff --git a/Spigot-Server-Patches/Add-More-Creeper-API.patch b/Spigot-Server-Patches/Add-More-Creeper-API.patch index 57593450b..12230ec09 100644 --- a/Spigot-Server-Patches/Add-More-Creeper-API.patch +++ b/Spigot-Server-Patches/Add-More-Creeper-API.patch @@ -5,7 +5,7 @@ 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 7181c663ae..165b07e142 100644 +index 1bb318e549..6bb63b9f90 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { @@ -18,18 +18,14 @@ index 7181c663ae..165b07e142 100644 public int explosionRadius = 3; private int bD; @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { - return super.a(entityhuman, enumhand); } -+ public void explode() { this.eb(); } // Paper - OBFHELPER - public void eb() { // PAIL rename explode, private -> public - if (!this.world.isClientSide) { - Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean("mobGriefing") ? Explosion.Effect.DESTROY : Explosion.Effect.NONE; -@@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { - return (Boolean) this.datawatcher.get(EntityCreeper.d); - } - -+ // Paper start + public void ignite() { +- this.datawatcher.set(EntityCreeper.d, true); ++ // Paper start ++ setIgnited(true); ++ } ++ + public void setIgnited(boolean ignited) { + if (isIgnited() != ignited) { + com.destroystokyo.paper.event.entity.CreeperIgniteEvent event = new com.destroystokyo.paper.event.entity.CreeperIgniteEvent((org.bukkit.entity.Creeper) getBukkitEntity(), ignited); @@ -37,17 +33,12 @@ index 7181c663ae..165b07e142 100644 + this.datawatcher.set(EntityCreeper.d, event.isIgnited()); + } + } -+ } -+ - public void dY() { -- this.datawatcher.set(EntityCreeper.d, true); -+ setIgnited(true); + // Paper end } public boolean canCauseHeadDrop() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java -index 95b3a7acc9..b6fb2b3458 100644 +index 896405148c..075a5e77e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java @@ -0,0 +0,0 @@ public class CraftCreeper extends CraftMonster implements Creeper { diff --git a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch index 9a8a514ae..3b3bb3629 100644 --- a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch @@ -30,7 +30,7 @@ index 341038fc4d..3e1f4be10f 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 679dda76e4..d020414f98 100644 +index 3a96f70d89..a2247fa1dd 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/Add-exception-reporting-event.patch b/Spigot-Server-Patches/Add-exception-reporting-event.patch index d8bd9ab04..414fe65c7 100644 --- a/Spigot-Server-Patches/Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/Add-exception-reporting-event.patch @@ -49,7 +49,7 @@ index 0000000000..f699ce18ca + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index e990445196..9b65972569 100644 +index f6f5b72de3..ec64391a4a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ @@ -80,7 +80,7 @@ index e990445196..9b65972569 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 5b6b533055..4c2cdcf160 100644 +index 22aba06270..3da7e10a92 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ import java.util.function.BooleanSupplier; @@ -121,7 +121,7 @@ index 2cb0962ff1..21a8ed3231 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index d9d253ea09..e0e11b6f2e 100644 +index 07a1796c77..808c178157 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -168,7 +168,7 @@ index d4a9af975d..88b5aa3a51 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 82f9ad7f0c..f4f842b863 100644 +index a54d653372..4aa65c1934 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager; @@ -196,7 +196,7 @@ index 82f9ad7f0c..f4f842b863 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index beeb9ccb8d..bb3aa4a376 100644 +index 0a1d342c13..347608531f 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -0,0 +0,0 @@ @@ -216,7 +216,7 @@ index beeb9ccb8d..bb3aa4a376 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c4d476eb61..b4ed1e4435 100644 +index 17d1dc93bc..f3f10ca60e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -255,7 +255,7 @@ index c4d476eb61..b4ed1e4435 100644 return; // Paper end diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index 3c5b3fe101..47a4ea9985 100644 +index f5f540032f..00e9a17355 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -0,0 +0,0 @@ public class WorldPersistentData { diff --git a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch index 0a401de88..99152a5b6 100644 --- a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch @@ -5,7 +5,7 @@ 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 e37e08c37e..300826a0f2 100644 +index e4d9300be2..6acb15043e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/Spigot-Server-Patches/Add-more-Zombie-API.patch b/Spigot-Server-Patches/Add-more-Zombie-API.patch index 89dac9cb0..791ad1a10 100644 --- a/Spigot-Server-Patches/Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/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 c81e530902..48ce154848 100644 +index 5e88367d3c..c73d2ff5da 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -18,7 +18,7 @@ index c81e530902..48ce154848 100644 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 171c1ae4ad..b20fe8e521 100644 +index 76cf1d8bfc..6e265467b0 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { @@ -55,8 +55,8 @@ index 171c1ae4ad..b20fe8e521 100644 } } -+ public boolean shouldBurnInDay() { return J_(); } // Paper - OBFHELPER - protected boolean J_() { ++ public boolean shouldBurnInDay() { return I_(); } // Paper - OBFHELPER + protected boolean I_() { - return true; + return shouldBurnInDay; } @@ -71,7 +71,7 @@ index 171c1ae4ad..b20fe8e521 100644 public boolean damageEntity(DamageSource damagesource, float f) { if (super.damageEntity(damagesource, f)) { @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { - nbttagcompound.setBoolean("CanBreakDoors", this.ef()); + nbttagcompound.setBoolean("CanBreakDoors", this.ee()); nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bF : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); + nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper diff --git a/Spigot-Server-Patches/Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/Add-option-to-prevent-players-from-moving-into-unloa.patch index 2d133e93f..a876b6612 100644 --- a/Spigot-Server-Patches/Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -20,7 +20,7 @@ index fb44fccc92..ad793ffa38 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0aa1e2a057..ce0e93fffa 100644 +index c43b1aca1e..806eb626cb 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -50,17 +50,16 @@ index 0aa1e2a057..ce0e93fffa 100644 float f1 = packetplayinflying.b(this.player.pitch); double d7 = d4 - this.l; @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { + } else { speed = player.abilities.walkSpeed * 10f; } - + // Paper start - Prevent moving into unloaded chunks + if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4)) { + this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet()); + return; + } + // Paper end -+ - if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.isGliding())) { - float f2 = this.player.isGliding() ? 300.0F : 100.0F; + if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean(GameRules.DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isGliding())) { + float f2 = this.player.isGliding() ? 300.0F : 100.0F; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Add-sun-related-API.patch b/Spigot-Server-Patches/Add-sun-related-API.patch index 25ae92ff5..284763a26 100644 --- a/Spigot-Server-Patches/Add-sun-related-API.patch +++ b/Spigot-Server-Patches/Add-sun-related-API.patch @@ -5,19 +5,19 @@ 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 c2771c5d9..c81e53090 100644 +index c20374d77b..5e88367d3c 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { return flag; } -+ public boolean isInDaylight() { return dS(); } // Paper - OBFHELPER - protected boolean dS() { ++ public boolean isInDaylight() { return dT(); } // Paper - OBFHELPER + protected boolean dT() { if (this.world.J() && !this.world.isClientSide) { - float f = this.aE(); + float f = this.aF(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 05c7a49a4..83e7a65a2 100644 +index 7c39846c16..26f3b47208 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -29,7 +29,7 @@ index 05c7a49a4..83e7a65a2 100644 return this.d < 4; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4b3ea756e..93ddf7eed 100644 +index d74b3c42da..8ae1b506f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { @@ -47,7 +47,7 @@ index 4b3ea756e..93ddf7eed 100644 public boolean createExplosion(double x, double y, double z, float power) { return createExplosion(x, y, z, power, false, true); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -index 53c2d154e..56c233872 100644 +index 53c2d154ed..56c233872b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java @@ -0,0 +0,0 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { diff --git a/Spigot-Server-Patches/Add-version-history-to-version-command.patch b/Spigot-Server-Patches/Add-version-history-to-version-command.patch index 4a82a819b..5441d17be 100644 --- a/Spigot-Server-Patches/Add-version-history-to-version-command.patch +++ b/Spigot-Server-Patches/Add-version-history-to-version-command.patch @@ -192,7 +192,7 @@ index 0000000000..aac3f66cb2 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 19e2df3098..f0e2250cd8 100644 +index c7ea4ec4fe..6e1509c2c1 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch index f4f4519eb..5a3c58938 100644 --- a/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/All-chunks-are-slime-spawn-chunks-toggle.patch @@ -19,16 +19,16 @@ index 2782970393..be91b11242 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index 30bc933c21..96cf4bccea 100644 +index c3d4d00483..039050f634 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster { } ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition); -- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot -+ boolean flag = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper +- 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 - if (this.random.nextInt(10) == 0 && flag && this.locY < 40.0D) { - return super.a(generatoraccess, enummobspawn); + if (random.nextInt(10) == 0 && flag && blockposition.getY() < 40) { + return a(entitytypes, generatoraccess, enummobspawn, blockposition, random); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Allow-login-events-to-fire-only-after-the-server-plu.patch b/Spigot-Server-Patches/Allow-login-events-to-fire-only-after-the-server-plu.patch index 88580505b..5f70ad3e9 100644 --- a/Spigot-Server-Patches/Allow-login-events-to-fire-only-after-the-server-plu.patch +++ b/Spigot-Server-Patches/Allow-login-events-to-fire-only-after-the-server-plu.patch @@ -56,7 +56,7 @@ index 9e4bc24058..028c23dbe6 100644 java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); java.util.UUID uniqueId = i.getId(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cbb4280631..ba68d7f833 100644 +index c20d9aab38..56951b44f9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant d0 || this.a.aC(); + return this.a.isInWater() && this.a.cf() > d0 || this.a.aD(); } + public void update() { this.e(); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch index 041205569..06264cacd 100644 --- a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/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 1323358b2e..11d64203f2 100644 +index 284699cfe9..3ce366ab80 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Async-Chunk-placeholder.patch b/Spigot-Server-Patches/Async-Chunk-placeholder.patch index 6e1b4ae2a..2d5af933c 100644 --- a/Spigot-Server-Patches/Async-Chunk-placeholder.patch +++ b/Spigot-Server-Patches/Async-Chunk-placeholder.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Async Chunk placeholder Until we figure out Mojang's ticket system. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5531000a83..6532ffe8a8 100644 +index 02098b9cc2..af1f1c2d62 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ import java.util.Objects; diff --git a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch index a95ac380b..d5bc15261 100644 --- a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/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 5db5e15ac8..a7bf433a7f 100644 +index 2d29e9d866..7b0c89ce7a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index d97e60bc4..2e0b7122f 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -7,7 +7,7 @@ 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 000000000..b151a13c1 +index 0000000000..b151a13c1b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java @@ -0,0 +0,0 @@ @@ -293,7 +293,7 @@ index 000000000..b151a13c1 +} 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 000000000..25836b975 +index 0000000000..25836b975b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java @@ -0,0 +0,0 @@ @@ -329,7 +329,7 @@ index 000000000..25836b975 +} 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 000000000..3bcdb8f93 +index 0000000000..3bcdb8f93f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java @@ -0,0 +0,0 @@ @@ -352,7 +352,7 @@ index 000000000..3bcdb8f93 +} 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 000000000..4b2a67423 +index 0000000000..4b2a67423f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java @@ -0,0 +0,0 @@ @@ -387,7 +387,7 @@ index 000000000..4b2a67423 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java new file mode 100644 -index 000000000..3aceb0ea8 +index 0000000000..3aceb0ea8a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java @@ -0,0 +0,0 @@ @@ -403,7 +403,7 @@ index 000000000..3aceb0ea8 + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 1f6a12632..6d278a0da 100644 +index 1f6a126329..6d278a0da5 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -429,7 +429,7 @@ index 1f6a12632..6d278a0da 100644 * 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 6b83f9769..5817e9452 100644 +index 4cf05e56fb..bf63e9ff33 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant - License: LGPLv2.1 */ diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index d3c2ad3c40..705ca68798 100644 +index cd18150488..0c562a5f34 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { + private static final Logger LOGGER = LogManager.getLogger(); private static final int b = 33 + ChunkStatus.a(ChunkStatus.FULL) - 2; private final Long2ObjectMap> c = new Long2ObjectOpenHashMap(); - private final Long2ObjectMap> d = new Long2ObjectOpenHashMap(); - private final Long2ObjectOpenHashMap>> tickets = new Long2ObjectOpenHashMap(); + final Long2ObjectOpenHashMap>> tickets = new Long2ObjectOpenHashMap(); // Paper -> private -> package - private final ChunkMapDistance.a f = new ChunkMapDistance.a(); - private final ChunkMapDistance.c g = new ChunkMapDistance.c(); - private int entitydistance; + private final ChunkMapDistance.a e = new ChunkMapDistance.a(); + private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); + private final ChunkMapDistance.c g = new ChunkMapDistance.c(33); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index ca1e4b90ba..d83eec0d76 100644 +index 4c3bcb63d9..630feec163 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -412,7 +412,7 @@ index ec3732193f..23d1935dd5 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 78dca8932f..806d225aaa 100644 +index 5599d0e71f..0daf5f99e3 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -425,7 +425,7 @@ index 78dca8932f..806d225aaa 100644 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 34db8c8247..7d48b580ac 100644 +index 9102bf8b60..d85220b66c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/ChunkMapDistance-CME.patch b/Spigot-Server-Patches/ChunkMapDistance-CME.patch index bcf0ae3e5..a022123ca 100644 --- a/Spigot-Server-Patches/ChunkMapDistance-CME.patch +++ b/Spigot-Server-Patches/ChunkMapDistance-CME.patch @@ -5,31 +5,31 @@ Subject: [PATCH] ChunkMapDistance CME diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index ba4b9fa59c..d3c2ad3c40 100644 +index ed4e8d69ca..cd18150488 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { - private int entitydistance; - private final ChunkMapDistance.b i = new ChunkMapDistance.b(8); - private final ChunkMapDistance.d j = new ChunkMapDistance.d(33); -- private final Set k = Sets.newHashSet(); -+ private Set k = Sets.newHashSet(); // Paper - -final - private final PlayerChunk.c l; - private final Mailbox> m; - private final Mailbox n; + private final ChunkMapDistance.a e = new ChunkMapDistance.a(); + private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); + private final ChunkMapDistance.c g = new ChunkMapDistance.c(33); +- private final Set h = Sets.newHashSet(); ++ private Set h = Sets.newHashSet(); // Paper - -final + private final PlayerChunk.c i; + private final Mailbox> j; + private final Mailbox k; @@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { ; } -- if (!this.k.isEmpty()) { -- this.k.forEach((playerchunk) -> { +- if (!this.h.isEmpty()) { +- this.h.forEach((playerchunk) -> { + // Paper start -+ Set currentPending = this.k; -+ this.k = Sets.newHashSet(); ++ Set currentPending = this.h; ++ this.h = Sets.newHashSet(); + if (!currentPending.isEmpty()) { + currentPending.forEach((playerchunk) -> { + // Paper end playerchunk.a(playerchunkmap); }); - this.k.clear(); + this.h.clear(); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Complete-resource-pack-API.patch b/Spigot-Server-Patches/Complete-resource-pack-API.patch index 193007443..4dc92f85f 100644 --- a/Spigot-Server-Patches/Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/Complete-resource-pack-API.patch @@ -5,7 +5,7 @@ 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 def713f495..f8aa8b1405 100644 +index 4ca45743d0..e4a273dbe2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -22,7 +22,7 @@ index def713f495..f8aa8b1405 100644 // 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 a338b0f09b..8f80582a78 100644 +index f4b3b7ff0b..2e0621b889 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch index c06a3aefd..06ca77b2e 100644 --- a/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -21,7 +21,7 @@ index 385b3ac0ce..b854061983 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f1cd38d421..184f1b00f0 100644 +index 5f62ffe182..b401ff7695 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant this.world.paperConfig.fallingBlockHeightNerf) { -+ if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) { ++ if (this.dropItem && this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) { + this.a(block); + } + @@ -57,7 +57,7 @@ index c9c903367f..fee5e67877 100644 blockposition = new BlockPosition(this); 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 ba86a07344..e3001570f9 100644 +index 775192a598..e988abd67c 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index cc8d968d0..b0da54d2b 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -81,7 +81,7 @@ index ef882b897f..385b3ac0ce 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 197c0fe169..ef07f665b7 100644 +index 099f0ad78b..5bf781bb63 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -93,7 +93,7 @@ index 197c0fe169..ef07f665b7 100644 int k = MathHelper.floor(entity.locY / 16.0D); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 658c493cd3..fae57a0998 100644 +index a5f80de34e..69bfa19274 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -105,16 +105,17 @@ index 658c493cd3..fae57a0998 100644 this.uniqueID = uuid; this.ap = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 8fcd721eeb..34db8c8247 100644 +index b38bc77c93..9102bf8b60 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ package net.minecraft.server; + import co.aikar.timings.Timing; // Paper +import com.destroystokyo.paper.PaperWorldConfig; // Paper import com.google.common.collect.ImmutableList; - import co.aikar.timings.Timing; - import com.google.common.collect.ComparisonChain; + import com.google.common.collect.Iterables; + import com.google.common.collect.ComparisonChain; // Paper @@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.objects.ObjectIterator; import java.io.File; import java.io.IOException; @@ -194,7 +195,7 @@ index 8fcd721eeb..34db8c8247 100644 if (list != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e61381221f..e9e5ecf747 100644 +index 9a353b0482..47731c56dc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ package net.minecraft.server; diff --git a/Spigot-Server-Patches/EndermanEscapeEvent.patch b/Spigot-Server-Patches/EndermanEscapeEvent.patch index c01b9df9a..cc724db07 100644 --- a/Spigot-Server-Patches/EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/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 9d7c16dbfc..93f66181bf 100644 +index 0fb7793bdb..db351a2494 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -34,7 +34,7 @@ index 9d7c16dbfc..93f66181bf 100644 if (!super.setGoalTarget(entityliving, reason, fireEvent)) { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { if (this.world.J() && this.ticksLived >= this.bC + 600) { - float f = this.aE(); + float f = this.aF(); - 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 diff --git a/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch index 3ac95b83a..f4ff32c7d 100644 --- a/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,7 +5,7 @@ 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 4568336f11..9f7258ad62 100644 +index 513892aa85..7bfe2b047b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/Entity-Origin-API.patch b/Spigot-Server-Patches/Entity-Origin-API.patch index a4c47c644..cd2c41bae 100644 --- a/Spigot-Server-Patches/Entity-Origin-API.patch +++ b/Spigot-Server-Patches/Entity-Origin-API.patch @@ -5,7 +5,7 @@ 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 f5647a171d..205376f6af 100644 +index 187374666b..0bfa78bd22 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -51,7 +51,7 @@ index f5647a171d..205376f6af 100644 NBTTagList nbttaglist = new NBTTagList(); double[] adouble1 = adouble; diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index a4984aa9a8..23a1f8c77c 100644 +index 7fb0c0e068..9d86beda9e 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { @@ -70,7 +70,7 @@ index a4984aa9a8..23a1f8c77c 100644 public void a(boolean flag) { diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index e3001570f9..e0535604b6 100644 +index e988abd67c..f2ee53ab90 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { @@ -101,7 +101,7 @@ index ce510c4867..b7c94fe238 100644 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 089468835b..fc582fead6 100644 +index 09560368fd..8e2f34ded7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/Entity-fromMobSpawner.patch b/Spigot-Server-Patches/Entity-fromMobSpawner.patch index f5119bb68..4e137d118 100644 --- a/Spigot-Server-Patches/Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/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 e15fd1dc72..0915dede9a 100644 +index 187441e87d..83b6bfeb43 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -37,7 +37,7 @@ index e15fd1dc72..0915dede9a 100644 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index b3af4ba233..7d140a6f5a 100644 +index 13e62e3d7f..4bd511dd7c 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/Entity-getEntitySpawnReason.patch index 1468a32ef..d4b7eebee 100644 --- a/Spigot-Server-Patches/Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/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 6bd88e1d3e..658c493cd3 100644 +index 74eb6f0606..a5f80de34e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -59,7 +59,7 @@ index 6bd88e1d3e..658c493cd3 100644 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8733232759..1de251d217 100644 +index 65df0e7c8c..abddc8895e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -72,7 +72,7 @@ index 8733232759..1de251d217 100644 }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3c986857b2..c93bf8e8b5 100644 +index cce69d555d..c4d2d9c1c8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/EntityPathfindEvent.patch b/Spigot-Server-Patches/EntityPathfindEvent.patch index c5ec17bc4..477f783c6 100644 --- a/Spigot-Server-Patches/EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/EntityPathfindEvent.patch @@ -6,7 +6,7 @@ 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 aacaecd82d..bc30e3f339 100644 +index 04ccf141ce..e15728668e 100644 --- a/src/main/java/net/minecraft/server/Navigation.java +++ b/src/main/java/net/minecraft/server/Navigation.java @@ -0,0 +0,0 @@ public class Navigation extends NavigationAbstract { @@ -17,9 +17,9 @@ index aacaecd82d..bc30e3f339 100644 + return this.b(new BlockPosition(entity), entity); // Paper - Forward target entity } - private int s() { + private int t() { diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 75e01c2420..d04eb1bbfe 100644 +index 81dd8e4e89..130367099b 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/EntityTransformedEvent.patch b/Spigot-Server-Patches/EntityTransformedEvent.patch index f92b42467..3982a27d1 100644 --- a/Spigot-Server-Patches/EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/EntityTransformedEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EntityTransformedEvent diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java -index bb3493c14f..de787d8614 100644 +index 89e2bde040..d1059355ad 100644 --- a/src/main/java/net/minecraft/server/EntityMushroomCow.java +++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java @@ -0,0 +0,0 @@ public class EntityMushroomCow extends EntityCow { @@ -17,7 +17,7 @@ index bb3493c14f..de787d8614 100644 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 b25f3d1592..fe9efa9da1 100644 +index 9311cc5bd6..07f7b90f58 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -29,7 +29,7 @@ index b25f3d1592..fe9efa9da1 100644 // 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 4cb305ff28..171c1ae4ad 100644 +index 0f4e50c3fe..76cf1d8bfc 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { @@ -49,7 +49,7 @@ index 4cb305ff28..171c1ae4ad 100644 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 2fe7fb7889..5cfda3160b 100644 +index 042ee18cb1..4d475d9633 100644 --- a/src/main/java/net/minecraft/server/EntityZombieVillager.java +++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java @@ -0,0 +0,0 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo diff --git a/Spigot-Server-Patches/Expand-Explosions-API.patch b/Spigot-Server-Patches/Expand-Explosions-API.patch index 37b9a08ff..4609e1173 100644 --- a/Spigot-Server-Patches/Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/Expand-Explosions-API.patch @@ -6,7 +6,7 @@ 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 11ab222c54..10c91699c1 100644 +index 3ce366ab80..2bb01dd9c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch index 74f1f4aee..b8a363d81 100644 --- a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/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 ebd1ff1d50..5172ff53d3 100644 +index 1fddc5fda2..4ebc9b50fb 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { @@ -43,7 +43,7 @@ index ebd1ff1d50..5172ff53d3 100644 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 9f449d1d3b..1323358b2e 100644 +index 47a54102a1..284699cfe9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 22990b616..f6d063d03 100644 --- a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -8,7 +8,7 @@ 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 78b0e78474..03d3090b3f 100644 +index 4b9e51b30f..c72ae7e251 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -0,0 +0,0 @@ public class Block implements IMaterial { @@ -17,7 +17,7 @@ index 78b0e78474..03d3090b3f 100644 - protected void dropExperience(World world, BlockPosition blockposition, int i) { + protected void dropExperience(World world, BlockPosition blockposition, int i, EntityPlayer player) { // Paper - if (!world.isClientSide && world.getGameRules().getBoolean("doTileDrops")) { + if (!world.isClientSide && world.getGameRules().getBoolean(GameRules.DO_TILE_DROPS)) { while (i > 0) { int j = EntityExperienceOrb.getOrbValue(i); @@ -41,7 +41,7 @@ index 2d2cd09ad1..ed88e208d0 100644 world.triggerEffect(1042, blockposition, 0); diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 6ac0546029..0baec5e119 100644 +index 0421052d21..f015c023e2 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { @@ -54,7 +54,7 @@ index 6ac0546029..0baec5e119 100644 } diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index bfba08fb24..49668f2c21 100644 +index a4cd502bca..214ecdb884 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @@ -134,7 +134,7 @@ index bfba08fb24..49668f2c21 100644 @Override diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 758559d35d..2a351701b4 100644 +index 05fa5cd6af..d9767de12e 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { @@ -147,7 +147,7 @@ index 758559d35d..2a351701b4 100644 // 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 5622c08f19..b402818008 100644 +index 45c024ca24..cb2f3eb458 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -174,20 +174,20 @@ index 4ac5cce062..05970c5644 100644 this.die(); diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index a18bd29fe8..89792eec45 100644 +index dc1ba69f68..013b3a1ca8 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -0,0 +0,0 @@ public class EntityTurtle extends EntityAnimal { Random random = this.animal.getRandom(); - if (this.b.getGameRules().getBoolean("doMobLoot")) { + if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { - this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, random.nextInt(7) + 1)); -+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, random.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper ++ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, random.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper; } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 4119709cb8..b25f3d1592 100644 +index 5e56447e7d..9311cc5bd6 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -200,7 +200,7 @@ index 4119709cb8..b25f3d1592 100644 } diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -index f39de1131f..46a349e73a 100644 +index b9aa512952..c179e11e4c 100644 --- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java +++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java @@ -0,0 +0,0 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { @@ -213,11 +213,11 @@ index f39de1131f..46a349e73a 100644 } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java -index d25a05736e..9d0b1ffefa 100644 +index 363a98bece..0cc34400be 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -0,0 +0,0 @@ public class PathfinderGoalBreed extends PathfinderGoal { - if (this.b.getGameRules().getBoolean("doMobLoot")) { + 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)); @@ -226,7 +226,7 @@ index d25a05736e..9d0b1ffefa 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 23f64ad001..ff8b11e7ea 100644 +index 4ccc77e4f6..e306b138db 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -0,0 +0,0 @@ public class PlayerInteractManager { @@ -252,7 +252,7 @@ index d2698e847c..edc4a5c34e 100644 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 d68826aa7b..0f6cd246ae 100644 +index 0cb2e6d874..2bbd3663a7 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java @@ -0,0 +0,0 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I @@ -265,7 +265,7 @@ index d68826aa7b..0f6cd246ae 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index cd93ad3e05..9f449d1d3b 100644 +index b8e16e1870..47a54102a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch index 508b785b9..45b9b93a7 100644 --- a/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch @@ -5,29 +5,29 @@ 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 e316e2af7d..87c4902f83 100644 +index 8b0094d1d3..e003f1c20c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { this.datawatcher.set(EntityHuman.bw, nbttagcompound); } -+ public float getCooldownPeriod() { return dY(); } // Paper - OBFHELPER - public float dY() { ++ public float getCooldownPeriod() { return dZ(); } // Paper - OBFHELPER + public float dZ() { return (float) (1.0D / this.getAttributeInstance(GenericAttributes.ATTACK_SPEED).getValue() * 20.0D); } + public float getCooledAttackStrength(float adjustTicks) { return s(adjustTicks); } // Paper - OBFHELPER public float s(float f) { - return MathHelper.a(((float) this.aD + f) / this.dY(), 0.0F, 1.0F); + return MathHelper.a(((float) this.aD + f) / this.dZ(), 0.0F, 1.0F); } -+ public void resetCooldown() { dZ(); } // Paper - OBFHELPER - public void dZ() { ++ public void resetCooldown() { ea(); } // Paper - OBFHELPER + public void ea() { this.aD = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a22bb25ff7..7e2d4f4527 100644 +index 36f6766a68..672f92f85a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch index 3ff027f57..402a1768e 100644 --- a/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch @@ -111,7 +111,7 @@ index 4f008e4723..8545146fb1 100644 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 b584432639..d4fed1a512 100644 +index d064153829..9d2a8a2da0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 45aa015f9..d83f2b23c 100644 --- a/Spigot-Server-Patches/Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -16,7 +16,7 @@ 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 ba68d7f833..f1cd38d421 100644 +index 56951b44f9..5f62ffe182 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant ticket = new Ticket<>(TicketType.PLAYER, ChunkMapDistance.b, new ChunkCoordIntPair(i), ChunkMapDistance.this.currentTick); if (flag1) { - ChunkMapDistance.this.m.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix - ChunkMapDistance.this.p.execute(() -> { + ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix + ChunkMapDistance.this.m.execute(() -> { + // Paper start - Fix MC-154214 + if (!this.inRange(this.getNearestDistanceFromPlayerMap().get(chunkPosition))) { + return; + } + // Paper end ChunkMapDistance.this.a(i, ticket); - ChunkMapDistance.this.o.add(i); + ChunkMapDistance.this.l.add(i); }); @@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { diff --git a/Spigot-Server-Patches/Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/Fix-World-isChunkGenerated-calls.patch index 4edbdef29..be54c1ea7 100644 --- a/Spigot-Server-Patches/Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/Fix-World-isChunkGenerated-calls.patch @@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that its only purpose is to cache the status on DISK) diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index d83eec0d76..459bd619ee 100644 +index 630feec163..42b97ba86b 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { @@ -58,7 +58,7 @@ index d83eec0d76..459bd619ee 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 2f749fe26a..4906530d83 100644 +index cf33965082..287f113581 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader { @@ -110,7 +110,7 @@ index dd1822d6ff..e324989b46 100644 return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s)); } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 806d225aaa..97040528a0 100644 +index 0daf5f99e3..761cd1355b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -134,7 +134,7 @@ index 806d225aaa..97040528a0 100644 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 b71f98b0c5..e89738a08d 100644 +index c4ad039ffd..3f41072f72 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -265,7 +265,7 @@ index 6f34d8aea0..d2b3289450 100644 printOversizedLog("ChunkTooLarge even after reduction. Trying in overzealous mode.", regionfile.file, chunkX, chunkZ); // Eek, major fail. We have retry logic, so reduce threshholds and fall back diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e0d89cc533..9bb1ad077a 100644 +index 3444c19b0f..3e55033d3c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch index 8494264d9..12c41bcfc 100644 --- a/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch +++ b/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch @@ -19,15 +19,15 @@ This change ensures the chunks are always loaded when entities are added to the world, or a valid entity moves between chunks. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c93bf8e8b5..e61381221f 100644 +index c4d2d9c1c8..9a353b0482 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY); } -- if (!entity.bT() && !this.isChunkLoaded(i, k)) { -+ if (!entity.valid && !entity.bT() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location +- if (!entity.bU() && !this.isChunkLoaded(i, k)) { ++ if (!entity.valid && !entity.bU() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location entity.inChunk = false; } else { this.getChunkAt(i, k).a(entity); diff --git a/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch index d9216a952..350cdcf6e 100644 --- a/Spigot-Server-Patches/Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/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 00bab3f758..66f4691918 100644 +index 35bda2e1d6..cce5305fbe 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ 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("reducedDebugInfo") ? 22 : 23))); // Paper - fix this rule not being initialized on the client ++ 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 this.d(entityplayer); entityplayer.getStatisticManager().c(); entityplayer.B().a(entityplayer); diff --git a/Spigot-Server-Patches/Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/Fix-sign-edit-memory-leak.patch index b3d53f695..a5cb63eb8 100644 --- a/Spigot-Server-Patches/Fix-sign-edit-memory-leak.patch +++ b/Spigot-Server-Patches/Fix-sign-edit-memory-leak.patch @@ -6,7 +6,7 @@ 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 9b895269a5..ec4b693730 100644 +index cad75ff9b6..e502e53659 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Fix-tracker-desync-issue.patch b/Spigot-Server-Patches/Fix-tracker-desync-issue.patch index 8552b5f71..ae58b5b55 100644 --- a/Spigot-Server-Patches/Fix-tracker-desync-issue.patch +++ b/Spigot-Server-Patches/Fix-tracker-desync-issue.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Fix tracker desync issue diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fae57a0998..3804d0a949 100644 +index 69bfa19274..c5198af94b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.f.j(); } -+ public Vec3D getPositionVector() { return this.ch(); } // Paper - OBFHELPER - public Vec3D ch() { ++ public Vec3D getPositionVector() { return this.ci(); } // Paper - OBFHELPER + public Vec3D ci() { return new Vec3D(this.locX, this.locY, this.locZ); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 89649e73e5..fba1639a85 100644 +index f34d7d0dad..8e16d6ac87 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch index 661ac3795..07b987191 100644 --- a/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/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 e6d2a40b6a..b49c3029fc 100644 +index 28f97f9b0b..9ff2281c15 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index a03b9e9bb..0dc587de4 100644 --- a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch @@ -12,7 +12,7 @@ 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 2fc8c192b3..cf7a75b2e2 100644 +index 5e0f28b3fe..0a6a8c372d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ 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/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 5d1947f826..197c0fe169 100644 +index ebc00f355e..099f0ad78b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -51,7 +51,7 @@ index 5d1947f826..197c0fe169 100644 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 32162003ab..50b6765a55 100644 +index e1cd5e72a5..b02b084556 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -63,7 +63,7 @@ index 32162003ab..50b6765a55 100644 private float av; private float aw; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f6ba51d14a..168e19b206 100644 +index 54b4d649d1..6456f21d7b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { @@ -91,7 +91,7 @@ index f6ba51d14a..168e19b206 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 09e6abdae2..73e0e47a61 100644 +index 3dd9bec548..6918f77b79 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch b/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch index 3bcc795fa..8ccabaa24 100644 --- a/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch +++ b/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors This code was causing NPE's in saving player data, potentially related to reloads. diff --git a/src/main/java/net/minecraft/server/RecipeBookServer.java b/src/main/java/net/minecraft/server/RecipeBookServer.java -index 440e8f1342..091c4abbd1 100644 +index 121e1fd538..0e66bdda8c 100644 --- a/src/main/java/net/minecraft/server/RecipeBookServer.java +++ b/src/main/java/net/minecraft/server/RecipeBookServer.java @@ -0,0 +0,0 @@ public class RecipeBookServer extends RecipeBook { diff --git a/Spigot-Server-Patches/Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/Implement-CraftBlockSoundGroup.patch index ff1b4245e..4586c6c2a 100644 --- a/Spigot-Server-Patches/Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/Implement-CraftBlockSoundGroup.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement CraftBlockSoundGroup diff --git a/src/main/java/com/destroystokyo/paper/block/CraftBlockSoundGroup.java b/src/main/java/com/destroystokyo/paper/block/CraftBlockSoundGroup.java new file mode 100644 -index 000000000..99f99330d +index 0000000000..99f99330d0 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/block/CraftBlockSoundGroup.java @@ -0,0 +0,0 @@ @@ -49,7 +49,7 @@ index 000000000..99f99330d + } +} diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index c0ba80d7b..3ae1b7df5 100644 +index d25989d514..b8efff8774 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java @@ -0,0 +0,0 @@ public class IBlockData extends BlockDataAbstract implements @@ -61,7 +61,7 @@ index c0ba80d7b..3ae1b7df5 100644 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 5460d409b..ccd5b0529 100644 +index 5460d409b7..ccd5b0529a 100644 --- a/src/main/java/net/minecraft/server/SoundEffectType.java +++ b/src/main/java/net/minecraft/server/SoundEffectType.java @@ -0,0 +0,0 @@ public class SoundEffectType { @@ -96,7 +96,7 @@ index 5460d409b..ccd5b0529 100644 return this.C; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 166c918d7..5296c6d9b 100644 +index 166c918d73..5296c6d9bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -0,0 +0,0 @@ public class CraftBlock implements Block { diff --git a/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch index 6a3677646..5191a56db 100644 --- a/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/Implement-PlayerLocaleChangeEvent.patch @@ -5,7 +5,7 @@ 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 73af650c0c..ee5f2f0afa 100644 +index 462c666735..c5dbcbe590 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.MainHand; @@ -40,7 +40,7 @@ index 73af650c0c..ee5f2f0afa 100644 this.cl = packetplayinsettings.e(); this.getDataWatcher().set(EntityPlayer.bt, (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 cc31b8d4ac..397349963d 100644 +index 57f2499cad..d854d48446 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch index 16e7f4b9f..c38b17814 100644 --- a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ 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 4153dfe488..eef3b46e40 100644 +index 2bb01dd9c2..3dd9bec548 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index 5be88ad48..96fa3351b 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -177,24 +177,25 @@ index 0000000000..a85466bc7e + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5817e94525..7e27f10790 100644 +index bf63e9ff33..f21b825719 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ package net.minecraft.server; - import co.aikar.timings.Timings; ++import co.aikar.timings.Timings; +import com.destroystokyo.paper.event.server.PaperServerListPingEvent; - import com.google.common.base.Stopwatch; ++import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; import com.google.common.collect.Maps; + import com.google.gson.JsonElement; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { - this.Z = i; + if (i - this.Y >= 5000000000L) { + this.Y = 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.p, 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 diff --git a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch index 3d6734e84..3d4612d8c 100644 --- a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch @@ -8,7 +8,7 @@ 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 8fe8e28aa3..295c01b281 100644 +index c0c13798f8..6012739331 100644 --- a/src/main/java/net/minecraft/server/LocaleLanguage.java +++ b/src/main/java/net/minecraft/server/LocaleLanguage.java @@ -0,0 +0,0 @@ public class LocaleLanguage { diff --git a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index c5557bbbf..d686fc8c8 100644 --- a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -13,7 +13,7 @@ custom renderers are in use, defaulting to the much simpler Vanilla system. Additionally, numerous issues to player position tracking on maps has been fixed. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 418e2fccdc..892922ca63 100644 +index 1a41a9c1d9..1a1b1dd1e8 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -30,7 +30,7 @@ index 418e2fccdc..892922ca63 100644 return entityitem; } diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index 61892fec98..acbd381c8c 100644 +index fc08158937..090d3dbd31 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java @@ -0,0 +0,0 @@ public class WorldMap extends PersistentBase { @@ -50,12 +50,12 @@ index 61892fec98..acbd381c8c 100644 } @@ -0,0 +0,0 @@ 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()); - } + 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 - NBTTagList nbttaglist1 = nbttagcompound.getList("frames", 10); + NBTTagList nbttaglist1 = nbttagcompound.getList("frames", 10); @@ -0,0 +0,0 @@ public class WorldMap extends PersistentBase { this.b(); @@ -102,7 +102,7 @@ index 61892fec98..acbd381c8c 100644 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 9f7258ad62..d69ad6820b 100644 +index 7bfe2b047b..7b19d74597 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/Improve-death-events.patch b/Spigot-Server-Patches/Improve-death-events.patch index f86fa0b6f..efdfb8f52 100644 --- a/Spigot-Server-Patches/Improve-death-events.patch +++ b/Spigot-Server-Patches/Improve-death-events.patch @@ -27,7 +27,7 @@ index 84c3ea9d00..f563a7b630 100644 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 8a95e0f117..3a41137298 100644 +index c32ed855bd..a92489e62a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -47,7 +47,7 @@ index 8a95e0f117..3a41137298 100644 protected void i(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 9157dace14..235ca47e16 100644 +index 19eb40db93..ac56217227 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -61,7 +61,7 @@ index 9157dace14..235ca47e16 100644 } diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java -index 5184e52626..b363e9ce99 100644 +index 301659d9bf..f9ba3b8561 100644 --- a/src/main/java/net/minecraft/server/EntityFox.java +++ b/src/main/java/net/minecraft/server/EntityFox.java @@ -0,0 +0,0 @@ public class EntityFox extends EntityAnimal { @@ -94,7 +94,7 @@ index 5184e52626..b363e9ce99 100644 public static boolean a(EntityFox entityfox, EntityLiving entityliving) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 19e7114cbb..c357339c26 100644 +index c80278ede0..86d3c516ba 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -123,10 +123,10 @@ index 19e7114cbb..c357339c26 100644 + //SoundEffect soundeffect = this.getSoundDeath(); - if (flag1 && soundeffect != null) { -- this.a(soundeffect, this.getSoundVolume(), this.cU()); +- this.a(soundeffect, this.getSoundVolume(), this.cV()); - } + //if (flag1 && soundeffect != null) { -+ // this.a(soundeffect, this.getSoundVolume(), this.cU()); ++ // this.a(soundeffect, this.getSoundVolume(), this.cV()); + //} + this.silentDeath = !flag1; // mark entity as dying silently + // Paper end @@ -140,31 +140,16 @@ index 19e7114cbb..c357339c26 100644 Entity entity = damagesource.getEntity(); EntityLiving entityliving = this.getKillingEntity(); -- if (this.aY >= 0 && entityliving != null) { -- entityliving.a(this, this.aY, damagesource); -- } -- -- if (entity != null) { -- entity.b(this); -- } -- -- if (this.isSleeping()) { -- this.dy(); -- } -- -+ // Paper start - move down to make death event cancellable -+ //if (this.aY >= 0 && entityliving != null) { -+ // entityliving.a(this, this.aY, damagesource); -+ //} -+ // -+ //if (entity != null) { -+ // entity.b(this); -+ //} -+ // -+ //if (this.isSleeping()) { -+ // this.dy(); -+ //} -+ // ++ /* // Paper - move down to make death event cancellable + if (this.aY >= 0 && entityliving != null) { + entityliving.a(this, this.aY, damagesource); + } +@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { + if (this.isSleeping()) { + this.dz(); + } ++ */ // Paper + this.killed = true; - this.getCombatTracker().g(); + //this.getCombatTracker().g(); @@ -179,7 +164,7 @@ index 19e7114cbb..c357339c26 100644 + entity.onKill(this); + } + if (this.isSleeping()) { -+ this.dy(); ++ this.dz(); + } + this.getCombatTracker().reset(); + } else { @@ -196,18 +181,17 @@ index 19e7114cbb..c357339c26 100644 } - protected void d(DamageSource damagesource) { -+ protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); } ++ protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); } // Paper - OBFHELPER + protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper Entity entity = damagesource.getEntity(); int i; @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - } boolean flag = this.lastDamageByPlayerTime > 0; -- + + org.bukkit.event.entity.EntityDeathEvent deathEvent = null; // Paper - if (this.isDropExperience() && this.world.getGameRules().getBoolean("doMobLoot")) { + if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { this.a(damagesource, flag); this.dropDeathLoot(damagesource, i, flag); // CraftBukkit start - Call death event @@ -221,12 +205,12 @@ index 19e7114cbb..c357339c26 100644 // CraftBukkit end } -- this.cE(); -+ if (!deathEvent.isCancelled()) this.cE(); // Paper +- this.cF(); ++ if (!deathEvent.isCancelled()) this.cF();; // Paper + return deathEvent; // Paper } - protected void cE() {} + protected void cF() {} @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { return SoundEffects.ENTITY_GENERIC_HURT; } @@ -244,12 +228,12 @@ index 19e7114cbb..c357339c26 100644 return 1.0F; } -+ public float getSoundPitch() { return cU();} // Paper - OBFHELPER - protected float cU() { ++ public float getSoundPitch() { return cV();} // Paper - OBFHELPER + protected float cV() { 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 7519827a88..a0f27f1bcb 100644 +index 2ce6063221..418a2cf0f4 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -327,7 +311,7 @@ index 73cb64e09d..9f317ff2e8 100644 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 7e2d4f4527..bd87a1cf2c 100644 +index 672f92f85a..3dd0ae0ca8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 43361025e..7891b2f14 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/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 fc25b3c749..e316e2af7d 100644 +index ed1ba110c2..8b0094d1d3 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - this.dA(); + this.dB(); super.tick(); if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) { - this.closeInventory(); @@ -34,7 +34,7 @@ index fc25b3c749..e316e2af7d 100644 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 14ea4641dc..7519827a88 100644 +index 18c71640f5..2ce6063221 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -88,7 +88,7 @@ index 14ea4641dc..7519827a88 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 498483930e..088873515c 100644 +index 7ee0a88234..13f406f507 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -101,7 +101,7 @@ index 498483930e..088873515c 100644 this.player.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 90fd7d96b3..132a2ceb78 100644 +index a167843bfb..9e5cd22d7d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -114,7 +114,7 @@ index 90fd7d96b3..132a2ceb78 100644 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 5172ff53d3..139168291a 100644 +index 4ebc9b50fb..af947df472 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { @@ -136,7 +136,7 @@ index 5172ff53d3..139168291a 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 300826a0f2..4a941801b6 100644 +index 6acb15043e..cccc1be137 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -155,7 +155,7 @@ index 300826a0f2..4a941801b6 100644 @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 b49c3029fc..a22bb25ff7 100644 +index 9ff2281c15..36f6766a68 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Item-canEntityPickup.patch b/Spigot-Server-Patches/Item-canEntityPickup.patch index 0780747fd..8126cad14 100644 --- a/Spigot-Server-Patches/Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/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 0ecbf873bf..c2771c5d94 100644 +index 4fa345db65..c20374d77b 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -21,7 +21,7 @@ index 0ecbf873bf..c2771c5d94 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 18b12f319b..d9c7a21504 100644 +index 0569ad9af8..c0b81223f1 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { diff --git a/Spigot-Server-Patches/Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/Limit-Client-Sign-length-more.patch index 9ac5eac51..0c99744c1 100644 --- a/Spigot-Server-Patches/Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/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 ec4b693730..69d39a47ba 100644 +index e502e53659..c4ac559f3f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch index 593b2f87b..e3a45b9cc 100644 --- a/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/Limit-lightning-strike-effect-distance.patch @@ -38,7 +38,7 @@ index 2c27be63ea..fb44fccc92 100644 public boolean firePhysicsEventForRedstone = false; private void firePhysicsEventForRedstone() { diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index adf68d1650..fbcda86b38 100644 +index 0169f261c6..da85786046 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -0,0 +0,0 @@ public class EntityLightning extends Entity { @@ -69,7 +69,7 @@ index adf68d1650..fbcda86b38 100644 --this.lifeTicks; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d11d01d739..3c986857b2 100644 +index e7e6c3e949..cce69d555d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch index 65ff1cbd9..3aba3ca3b 100644 --- a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/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 90099c814a..d2dddf1c72 100644 +index ca266029e4..1500e43eee 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -22,14 +22,14 @@ index 90099c814a..d2dddf1c72 100644 return this.activeItem; } -+ public int getItemUseRemainingTime() { return dm(); } // Paper - OBFHELPER - public int dm() { ++ public int getItemUseRemainingTime() { return dn(); } // Paper - OBFHELPER + public int dn() { return this.bo; } -+ public int getHandRaisedTime() { return dn(); } // Paper - OBFHELPER - public int dn() { - return this.isHandRaised() ? this.activeItem.k() - this.dm() : 0; ++ public int getHandRaisedTime() { return do_(); } // Paper - OBFHELPER + public int do_() { + return this.isHandRaised() ? this.activeItem.k() - this.dn() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 513b3fac7f..8dea7d36b6 100644 diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index 65eee9df8..c28640ed8 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -72,7 +72,7 @@ index adc9981868..b370316574 100644 S s0 = this.f.get(iblockstate, v0); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 123a9bb210..70d9342422 100644 +index 6a8e8f7a67..daf406637c 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -109,7 +109,7 @@ index b4c8722f04..59d86fc66e 100644 if (this.b.containsKey(s1)) { diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index ebfc588539..ba4b9fa59c 100644 +index 958354a31d..ed4e8d69ca 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { @@ -120,13 +120,13 @@ index ebfc588539..ba4b9fa59c 100644 + if ((entry.getValue()).removeIf((ticket) -> { // Paper - decompile fix return ticket.a(this.currentTick); })) { - this.f.b(entry.getLongKey(), this.a((ObjectSortedSet) entry.getValue()), false); + this.e.b(entry.getLongKey(), this.a((ObjectSortedSet) entry.getValue()), false); @@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { completablefuture.thenAccept((either) -> { - this.p.execute(() -> { -- this.n.a((Object) ChunkTaskQueueSorter.a(() -> { -+ this.n.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix + this.m.execute(() -> { +- this.k.a((Object) ChunkTaskQueueSorter.a(() -> { ++ this.k.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix }, j, false)); }); }); @@ -134,22 +134,22 @@ index ebfc588539..ba4b9fa59c 100644 Ticket ticket = new Ticket<>(TicketType.PLAYER, ChunkMapDistance.b, new ChunkCoordIntPair(i), ChunkMapDistance.this.currentTick); if (flag1) { -- ChunkMapDistance.this.m.a((Object) ChunkTaskQueueSorter.a(() -> { -+ ChunkMapDistance.this.m.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix - ChunkMapDistance.this.p.execute(() -> { +- ChunkMapDistance.this.j.a((Object) ChunkTaskQueueSorter.a(() -> { ++ ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix + ChunkMapDistance.this.m.execute(() -> { ChunkMapDistance.this.a(i, ticket); - ChunkMapDistance.this.o.add(i); + ChunkMapDistance.this.l.add(i); @@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { return j; })); } else { -- ChunkMapDistance.this.n.a((Object) ChunkTaskQueueSorter.a(() -> { -+ ChunkMapDistance.this.n.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix - ChunkMapDistance.this.p.execute(() -> { +- ChunkMapDistance.this.k.a((Object) ChunkTaskQueueSorter.a(() -> { ++ ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix + ChunkMapDistance.this.m.execute(() -> { ChunkMapDistance.this.b(i, ticket); }); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index c973ab6076..30701fd7f3 100644 +index d4b7074ca1..f4605e3937 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java @@ -0,0 +0,0 @@ public class ChunkSection { @@ -173,21 +173,21 @@ index 26db8f135f..dd1822d6ff 100644 int i = 0; for (int j = a().size() - 1; j >= 0; --j) { -diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java -index a79262631c..5184e52626 100644 ---- a/src/main/java/net/minecraft/server/EntityFox.java -+++ b/src/main/java/net/minecraft/server/EntityFox.java -@@ -0,0 +0,0 @@ public class EntityFox extends EntityAnimal { - this.goalSelector.a(11, new EntityFox.j(this, EntityHuman.class, 24.0F)); - this.goalSelector.a(12, new EntityFox.r()); - this.targetSelector.a(3, new EntityFox.a(EntityLiving.class, false, false, (entityliving) -> { -- return EntityFox.bF.test(entityliving) && !this.c(entityliving.getUniqueID()); -+ return EntityFox.bF.test((EntityLiving) entityliving) && !this.c(((EntityLiving) entityliving).getUniqueID()); // Paper - decompile fix - })); - } +diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java +index d0b4bf8b7e..6fb734c64f 100644 +--- a/src/main/java/net/minecraft/server/CraftingManager.java ++++ b/src/main/java/net/minecraft/server/CraftingManager.java +@@ -0,0 +0,0 @@ public class CraftingManager extends ResourceDataJson { + } + this.recipes = (Map) map1.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry1) -> { +- return (entry1.getValue()); // CraftBukkit ++ return entry1.getValue(); // CraftBukkit // Paper - decompile fix - *shrugs internally* + })); + 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 219bc2e741..54c1b7c878 100644 +index 85af024c9c..daa7bf330f 100644 --- a/src/main/java/net/minecraft/server/EntityVindicator.java +++ b/src/main/java/net/minecraft/server/EntityVindicator.java @@ -0,0 +0,0 @@ public class EntityVindicator extends EntityIllagerAbstract { @@ -199,28 +199,6 @@ index 219bc2e741..54c1b7c878 100644 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/GameRules.java b/src/main/java/net/minecraft/server/GameRules.java -index d8d2267084..3de9d264db 100644 ---- a/src/main/java/net/minecraft/server/GameRules.java -+++ b/src/main/java/net/minecraft/server/GameRules.java -@@ -0,0 +0,0 @@ import javax.annotation.Nullable; - - public class GameRules { - -- private static final TreeMap a = (TreeMap) SystemUtils.a((Object) (new TreeMap()), (treemap) -> { -+ private static final TreeMap a = SystemUtils.a(new TreeMap(), (treemap) -> { // Paper - decompile fix - treemap.put("doFireTick", new GameRules.GameRuleDefinition("true", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); - treemap.put("mobGriefing", new GameRules.GameRuleDefinition("true", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); - treemap.put("keepInventory", new GameRules.GameRuleDefinition("false", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); -@@ -0,0 +0,0 @@ public class GameRules { - private final Supplier> d; - private final BiFunction, String, String> e; - -- private EnumGameRuleType(Supplier supplier, BiFunction bifunction) { -+ private EnumGameRuleType(Supplier supplier, BiFunction, String, String> bifunction) { // Paper - decompile fix - this.d = supplier; - this.e = bifunction; - } diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java index 053d408d36..4510018d6f 100644 --- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java @@ -265,7 +243,7 @@ index 2ed6119804..6e365f402c 100644 do { if (d12 > 1.0D && d13 > 1.0D && d14 > 1.0D) { diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index e8ae4b5e44..0f4aa698aa 100644 +index 21321805ee..452602d43e 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java @@ -0,0 +0,0 @@ public class IBlockData extends BlockDataAbstract implements @@ -289,27 +267,33 @@ index e8ae4b5e44..0f4aa698aa 100644 } else { - this.f = new VoxelShape[IBlockData.a.a.length]; + this.f = new VoxelShape[a.length]; // Paper - decompile fix - voxelshape = block.h(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO); + VoxelShape voxelshape = block.h(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO); - EnumDirection[] aenumdirection = IBlockData.a.a; + EnumDirection[] aenumdirection = a; // Paper - decompile fix int i = aenumdirection.length; for (int j = 0; j < i; ++j) { -@@ -0,0 +0,0 @@ public class IBlockData extends BlockDataAbstract implements - } - - voxelshape = block.b(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO, VoxelShapeCollision.a()); -+ final VoxelShape final_voxelshape = voxelshape; // Paper - decompile fix - this.g = Arrays.stream(EnumDirection.EnumAxis.values()).anyMatch((enumdirection_enumaxis) -> { -- return voxelshape.b(enumdirection_enumaxis) < 0.0D || voxelshape.c(enumdirection_enumaxis) > 1.0D; -+ return final_voxelshape.b(enumdirection_enumaxis) < 0.0D || final_voxelshape.c(enumdirection_enumaxis) > 1.0D; // Paper - decompile fix - }); - } - } diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java -index bf7e0d17ef..ee22bb0387 100644 +index b4b73e5f04..3a86c519c0 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java +++ b/src/main/java/net/minecraft/server/IEntityAccess.java +@@ -0,0 +0,0 @@ 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.x(entity1); +@@ -0,0 +0,0 @@ public interface IEntityAccess { + return Stream.of(entity1.aq(), entity == null ? null : entity.j(entity1)); + }).filter(Objects::nonNull); + +- axisalignedbb1.getClass(); + return stream.filter(axisalignedbb1::c).map(VoxelShapes::a); + } + } @@ -0,0 +0,0 @@ public interface IEntityAccess { @Nullable @@ -440,7 +424,7 @@ index 4cb78c6a3f..e15d286710 100644 this.f = 0; diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 41a5d1dc29..b3799ab564 100644 +index 62c39f9baa..376219a1cd 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java @@ -0,0 +0,0 @@ public class SystemUtils { @@ -517,7 +501,7 @@ index 73f9da1fdb..2a4e4f7859 100644 hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 8, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 6, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 6, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 6, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 6, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 6, 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, 8, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 6, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 6, 10), new VillagerTrades.h(new ItemStack(Items.pP), 36, 1, 6, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 6, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 6, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 6, 20), new VillagerTrades.b(Items.DIAMOND, 1, 6, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 6, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 6, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 6, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 2, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 2, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 2, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 2, 30, 0.2F)}))); diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index b251a1d7d9..3c5b3fe101 100644 +index 0b950aae63..f5f540032f 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -0,0 +0,0 @@ public class WorldPersistentData { @@ -530,12 +514,21 @@ index b251a1d7d9..3c5b3fe101 100644 this.a(t1); return t1; @@ -0,0 +0,0 @@ public class WorldPersistentData { - } - } -- return persistentbase; -+ return (T) persistentbase; // Paper - decompile fix - } + @Nullable + public T b(Supplier supplier, String s) { +- PersistentBase persistentbase = (PersistentBase) this.data.get(s); ++ T persistentbase = (T) this.data.get(s); // Paper - decompile fix - public void a(PersistentBase persistentbase) { + if (persistentbase == null && !this.data.containsKey(s)) { + persistentbase = this.c(supplier, s); +@@ -0,0 +0,0 @@ public class WorldPersistentData { + File file = this.a(s); + + if (file.exists()) { +- T t0 = (PersistentBase) supplier.get(); ++ T t0 = supplier.get(); // Paper - decompile fix + NBTTagCompound nbttagcompound = this.a(s, SharedConstants.a().getWorldVersion()); + + t0.a(nbttagcompound.getCompound("data")); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 0fa43a7af..345ffc02a 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -55,7 +55,7 @@ index b370316574..841c7d1904 100644 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 70d9342422..b56a044b3a 100644 +index daf406637c..2613de6624 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -92,7 +92,7 @@ index 70d9342422..b56a044b3a 100644 return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index bdda2e63ae..0905fbdc41 100644 +index 5005643853..2a6ae10a11 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; @@ -182,7 +182,7 @@ index 857b2f8868..bbf136614c 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index dcf2d38df5..95356b82ff 100644 +index f1e807296c..710d40b43a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { @@ -316,7 +316,7 @@ index 4411d5640a..28a6be7ab0 100644 this.a(); packetdataserializer.writeByte(this.i); diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java -index 4f69e23271..8f5f61f602 100644 +index c2ec2c2823..54a05cdb86 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -329,7 +329,7 @@ index 4f69e23271..8f5f61f602 100644 super(entitytypes, world); } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index d4fff5b72e..ec1da887c6 100644 +index 01ce810683..6d7b313aeb 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -341,7 +341,7 @@ index d4fff5b72e..ec1da887c6 100644 // 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 61319d6c20..40173aa35b 100644 +index f115d0b931..e0b12e1fd7 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -353,7 +353,7 @@ index 61319d6c20..40173aa35b 100644 @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 6ab4c78b35..76142d5dc2 100644 +index 9895124579..f97958652a 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -0,0 +0,0 @@ import java.util.function.Predicate; @@ -365,7 +365,7 @@ index 6ab4c78b35..76142d5dc2 100644 super(entitytypes, world); this.f = 5; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 8c918d0d68..56a2d7df5e 100644 +index 0c712f77de..f603950b2e 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -0,0 +0,0 @@ import com.mojang.datafixers.types.Type; @@ -437,7 +437,7 @@ index 6e365f402c..577b227758 100644 return this.getType(blockposition).h(); } diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java -index 729bac3ab5..7308c0c319 100644 +index b3725f15e3..233399e8bb 100644 --- a/src/main/java/net/minecraft/server/IWorldReader.java +++ b/src/main/java/net/minecraft/server/IWorldReader.java @@ -0,0 +0,0 @@ public interface IWorldReader extends IIBlockAccess { @@ -449,7 +449,7 @@ index 729bac3ab5..7308c0c319 100644 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 e975265a28..aa6a58dd88 100644 +index 91168181b2..7bcc723998 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ import org.bukkit.event.world.StructureGrowEvent; @@ -945,7 +945,7 @@ index 4e20cfba41..363ab5da12 100644 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 67c8a5efc7..78dca8932f 100644 +index 62387f5099..5599d0e71f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -964,7 +964,7 @@ index 67c8a5efc7..78dca8932f 100644 public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { CompletableFuture> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c()); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 58f9946455..ae194b981f 100644 +index 9062767efa..d40600c103 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1072,7 +1072,7 @@ index 4efcb8b595..60948afa4e 100644 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 b3799ab564..5fae5a1233 100644 +index 376219a1cd..59164684e0 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java @@ -0,0 +0,0 @@ public class SystemUtils { @@ -1085,7 +1085,7 @@ index b3799ab564..5fae5a1233 100644 public static long getTimeMillis() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 91e50ccea1..a2b1aba49f 100644 +index e9d65c9275..32981c4422 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose diff --git a/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index d9c9daca1..588c81f4f 100644 --- a/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,7 +6,7 @@ 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 8499bad15b..d4bad21560 100644 +index 8fa52fd630..d74b3c42da 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch index beacfcbbe..76687b984 100644 --- a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch @@ -21,16 +21,16 @@ index 2a50d6babf..c3e61bdfe3 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 815844dab2..d5dff4b88c 100644 +index 338c203b33..aafb7df0c8 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { + } - @Override - public boolean a(GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn) { -- return this.locY > this.world.spigotConfig.squidSpawnRangeMin && this.locY < (double) generatoraccess.getSeaLevel(); // Spigot -+ final double maxHeight = world.paperConfig.squidMaxSpawnHeight > 0 ? world.paperConfig.squidMaxSpawnHeight : world.getSeaLevel(); -+ return this.locY > this.world.spigotConfig.squidSpawnRangeMin && this.locY < maxHeight; // Spigot // Paper + public static boolean b(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { +- return blockposition.getY() > generatoraccess.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && blockposition.getY() < generatoraccess.getSeaLevel(); // Spigot ++ final double maxHeight = generatoraccess.getMinecraftWorld().paperConfig.squidMaxSpawnHeight > 0 ? generatoraccess.getMinecraftWorld().paperConfig.squidMaxSpawnHeight : generatoraccess.getSeaLevel(); // Paper ++ return blockposition.getY() > generatoraccess.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && blockposition.getY() < maxHeight; // Spigot // Paper } public void a(float f, float f1, float f2) { diff --git a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 1d5e95158..49f62db50 100644 --- a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/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 e0e11b6f2e..fba9f4b8a1 100644 +index 808c178157..6960e46ec6 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/Mob-Spawner-API-Enhancements.patch index a6072f16a..9f0e3160f 100644 --- a/Spigot-Server-Patches/Mob-Spawner-API-Enhancements.patch +++ b/Spigot-Server-Patches/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 dbb8098d6c..e9bcb5abaa 100644 +index 079099e308..b05f6c2f2b 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { diff --git a/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch index 04c48d548..b3e34a3a3 100644 --- a/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/Spigot-Server-Patches/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 af1ff95182..1713bead27 100644 +index f50efe782a..0f1c259595 100644 --- a/src/main/java/net/minecraft/server/EntityOcelot.java +++ b/src/main/java/net/minecraft/server/EntityOcelot.java @@ -0,0 +0,0 @@ public class EntityOcelot extends EntityAnimal { diff --git a/Spigot-Server-Patches/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index e5fea7be5..63c8b1e49 100644 --- a/Spigot-Server-Patches/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -19,7 +19,7 @@ index 9bf42bb5ef..0526af776d 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockTallPlant.java b/src/main/java/net/minecraft/server/BlockTallPlant.java -index 469a3be057..f2c429f22e 100644 +index ef392f5fe8..227fe073fd 100644 --- a/src/main/java/net/minecraft/server/BlockTallPlant.java +++ b/src/main/java/net/minecraft/server/BlockTallPlant.java @@ -0,0 +0,0 @@ public class BlockTallPlant extends BlockPlant { @@ -32,19 +32,19 @@ index 469a3be057..f2c429f22e 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 454e28fc47..40b9bff98f 100644 +index 52c0d52046..4e1c03a78c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper - i = SystemUtils.getMonotonicNanos(); if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit 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 4ec6a860d5..c8a859d7ba 100644 +index 822db5d4c0..93a061b6b2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -66,7 +66,7 @@ index 4ec6a860d5..c8a859d7ba 100644 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 6328558975..4568336f11 100644 +index cefe8340d4..513892aa85 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/Only-refresh-abilities-if-needed.patch index 0c31e8c89..6b0db5075 100644 --- a/Spigot-Server-Patches/Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/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 76728b1785..e180655989 100644 +index 00d6fc4b32..3d14319b75 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Optimise-removeQueue.patch b/Spigot-Server-Patches/Optimise-removeQueue.patch index 13bfe7ca8..caf5a57f3 100644 --- a/Spigot-Server-Patches/Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/Optimise-removeQueue.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimise removeQueue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0e0faef89e..8254b8d68d 100644 +index 7b0c89ce7a..fc4b3945d6 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ import com.google.common.collect.Lists; diff --git a/Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch b/Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch index 35b1ed9bf..f7f4b48bf 100644 --- a/Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch +++ b/Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch @@ -6,59 +6,18 @@ Subject: [PATCH] Optimize GameRules to use LinkedHashMap Previously TreeMap was used which has poor get(K) performance. diff --git a/src/main/java/net/minecraft/server/GameRules.java b/src/main/java/net/minecraft/server/GameRules.java -index 3de9d264db..c6a8004745 100644 +index 2880de7c58..d567f35bde 100644 --- a/src/main/java/net/minecraft/server/GameRules.java +++ b/src/main/java/net/minecraft/server/GameRules.java -@@ -0,0 +0,0 @@ import javax.annotation.Nullable; - +@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; public class GameRules { -- private static final TreeMap a = SystemUtils.a(new TreeMap(), (treemap) -> { // Paper - decompile fix -+ // Paper start - Optimize GameRules -+ private static final int RULES_SIZE = 256; -+ -+ private static java.util.LinkedHashMap linkedMapOf(final int capacity, final TreeMap map) { -+ final java.util.LinkedHashMap ret = new java.util.LinkedHashMap<>(capacity); -+ ret.putAll(map); -+ return ret; -+ } -+ -+ private static final java.util.LinkedHashMap a = GameRules.linkedMapOf(RULES_SIZE, SystemUtils.a(new TreeMap(), (treemap) -> { // Paper - decompile fix -+ // Paper end - treemap.put("doFireTick", new GameRules.GameRuleDefinition("true", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); - treemap.put("mobGriefing", new GameRules.GameRuleDefinition("true", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); - treemap.put("keepInventory", new GameRules.GameRuleDefinition("false", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); -@@ -0,0 +0,0 @@ public class GameRules { - treemap.put("doLimitedCrafting", new GameRules.GameRuleDefinition("false", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); - treemap.put("maxCommandChainLength", new GameRules.GameRuleDefinition("65536", GameRules.EnumGameRuleType.NUMERICAL_VALUE)); - treemap.put("announceAdvancements", new GameRules.GameRuleDefinition("true", GameRules.EnumGameRuleType.BOOLEAN_VALUE)); -- }); -- private final TreeMap b = new TreeMap(); -+ })); // Paper - Optimize GameRules -+ private final java.util.LinkedHashMap b = new java.util.LinkedHashMap<>(RULES_SIZE); // Paper - Optimize GameRules - - public GameRules() { - Iterator iterator = GameRules.a.entrySet().iterator(); -@@ -0,0 +0,0 @@ public class GameRules { - return (GameRules.GameRuleValue) this.b.get(s); - } - -- public static TreeMap getGameRules() { -+ public static java.util.LinkedHashMap getGameRules() { // Paper - Optimize GameRules - return GameRules.a; - } - -diff --git a/src/test/java/org/bukkit/GameRuleTest.java b/src/test/java/org/bukkit/GameRuleTest.java -index 1ed0f4cf2b..40edb8d668 100644 ---- a/src/test/java/org/bukkit/GameRuleTest.java -+++ b/src/test/java/org/bukkit/GameRuleTest.java -@@ -0,0 +0,0 @@ public class GameRuleTest { - - @Test - public void testMinecraftRules() { -- TreeMap minecraftRules = GameRules.getGameRules(); -+ Map minecraftRules = GameRules.getGameRules(); // Paper - Optimize GameRules - - for (Map.Entry entry : minecraftRules.entrySet()) { - GameRule bukkitRule = GameRule.getByName(entry.getKey()); + private static final Logger LOGGER = LogManager.getLogger(); +- private static final Map, GameRules.GameRuleDefinition> z = Maps.newTreeMap(Comparator.comparing((gamerules_gamerulekey) -> { +- return gamerules_gamerulekey.a; +- })); ++ private static final Map, GameRules.GameRuleDefinition> z = Maps.newLinkedHashMap(); // Paper + public static final GameRules.GameRuleKey DO_FIRE_TICK = a("doFireTick", GameRules.GameRuleBoolean.b(true)); + public static final GameRules.GameRuleKey MOB_GRIEFING = a("mobGriefing", GameRules.GameRuleBoolean.b(true)); + public static final GameRules.GameRuleKey KEEP_INVENTORY = a("keepInventory", GameRules.GameRuleBoolean.b(false)); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-Hoppers.patch b/Spigot-Server-Patches/Optimize-Hoppers.patch index c0c4cdce0..ad348ab38 100644 --- a/Spigot-Server-Patches/Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/Optimize-Hoppers.patch @@ -31,7 +31,7 @@ index a5b4f99901..2b5402b009 100644 private void disableSprintInterruptionOnAttack() { disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index ca1bd02995..2d83c9e79c 100644 +index b9c5af51f5..ab66dbf885 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { @@ -47,19 +47,19 @@ index ca1bd02995..2d83c9e79c 100644 itemstack.d(this.C()); 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 3f2a3dd178..e5c148c481 100644 +index 5daee73a84..d100200518 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper + TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - i = SystemUtils.getMonotonicNanos(); if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit this.methodProfiler.a(() -> { + return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager()); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index acce1788db..5188689fbb 100644 +index 90cc57b46e..f5ef368cf8 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -79,7 +79,7 @@ index acce1788db..5188689fbb 100644 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 d2833f8842..72b4b19d7a 100644 +index 1ba98bf736..6f6519f6c5 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi diff --git a/Spigot-Server-Patches/Optimize-Persistent-Data-Loading.patch b/Spigot-Server-Patches/Optimize-Persistent-Data-Loading.patch index 339785450..f289cec6f 100644 --- a/Spigot-Server-Patches/Optimize-Persistent-Data-Loading.patch +++ b/Spigot-Server-Patches/Optimize-Persistent-Data-Loading.patch @@ -14,7 +14,7 @@ These files take a long time to convert on large worlds and crashes the server. Additionally, cache the result of a file being missing so we don't keep spam checking it. diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index 47a4ea9985..62081349f1 100644 +index 00e9a17355..153809432c 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -0,0 +0,0 @@ public class WorldPersistentData { @@ -30,25 +30,29 @@ index 47a4ea9985..62081349f1 100644 @Nullable public T b(Supplier supplier, String s) { + if ("Mineshaft_index".equals(s) || "Mineshaft".equals(s)) return null; // Paper - mineshaft is useless data - PersistentBase persistentbase = (PersistentBase) this.data.get(s); + T persistentbase = (T) this.data.get(s); // Paper - decompile fix - if (persistentbase == null) { -@@ -0,0 +0,0 @@ public class WorldPersistentData { - - persistentbase.a(nbttagcompound.getCompound("data")); - this.data.put(s, persistentbase); -- } -+ } else this.data.put(s, NO_RESULT); // Paper - } catch (Exception exception) { - WorldPersistentData.LOGGER.error("Error loading saved data: {}", s, exception); - } + if (persistentbase == null && !this.data.containsKey(s)) { + persistentbase = this.c(supplier, s); + this.data.put(s, persistentbase); ++ } else { // Paper ++ this.data.put(s, NO_RESULT); // Paper } -- return (T) persistentbase; // Paper - decompile fix -+ return (T) persistentbase == NO_RESULT ? null : (T) persistentbase; // Paper - decompile fix // Paper +- return persistentbase; ++ return persistentbase == NO_RESULT ? null : persistentbase; // Paper } - public void a(PersistentBase persistentbase) { + @Nullable +@@ -0,0 +0,0 @@ public class WorldPersistentData { + NBTTagCompound nbttagcompound = this.a(s, SharedConstants.a().getWorldVersion()); + + t0.a(nbttagcompound.getCompound("data")); +- return t0; ++ return t0 == NO_RESULT ? null : t0; // Paper + } + } catch (Exception exception) { + WorldPersistentData.LOGGER.error("Error loading saved data: {}", s, exception); @@ -0,0 +0,0 @@ public class WorldPersistentData { } diff --git a/Spigot-Server-Patches/Optimize-Server-World-Map.patch b/Spigot-Server-Patches/Optimize-Server-World-Map.patch index 169e8b35c..3e0f66286 100644 --- a/Spigot-Server-Patches/Optimize-Server-World-Map.patch +++ b/Spigot-Server-Patches/Optimize-Server-World-Map.patch @@ -217,7 +217,7 @@ index 0000000000..6bb2f98b45 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 74cdf4945f..2bd1e73702 100644 +index 3f1d8905a4..2198b4fbc9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrantspigot + paper jar - 1.14.2-R0.1-SNAPSHOT + 1.14.3-SNAPSHOT - Spigot - https://www.spigotmc.org/ + Paper @@ -27,7 +27,7 @@ index 4a2d58d574..251fa0bc36 100644 + UTF-8 unknown - 1.14.2 + 1.14.3 @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/Per-Player-View-Distance-API-placeholders.patch index a8d45ded9..2c6ded2a1 100644 --- a/Spigot-Server-Patches/Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/Per-Player-View-Distance-API-placeholders.patch @@ -7,7 +7,7 @@ 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 9b2ac3c63a..29fa1d1df1 100644 +index 8dc849ca14..bec173e411 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { @@ -23,7 +23,7 @@ index 9b2ac3c63a..29fa1d1df1 100644 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 e3feb39ad0..5609fcfe00 100644 +index ee1b0a8846..b3c7f8814c 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -0,0 +0,0 @@ public class EntityWither extends EntityMonster implements IRangedEntity { @@ -39,7 +39,7 @@ index e3feb39ad0..5609fcfe00 100644 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 484b21f453..651ca31948 100644 +index 9cf6330ab6..c94944dfe0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch index 100a8ba64..d34004e70 100644 --- a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch @@ -52,7 +52,7 @@ index 3a6e780007..535056c64e 100644 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 e180655989..b87971e6dd 100644 +index 3d14319b75..982b06b840 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Player-affects-spawning-API.patch b/Spigot-Server-Patches/Player-affects-spawning-API.patch index 8ad613745..bee42cd12 100644 --- a/Spigot-Server-Patches/Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/Player-affects-spawning-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 28791cca90..418e2fccdc 100644 +index 4735f6e673..1a41a9c1d9 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -19,7 +19,7 @@ index 28791cca90..418e2fccdc 100644 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index d020414f98..0ecbf873bf 100644 +index a2247fa1dd..4fa345db65 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -32,12 +32,12 @@ index d020414f98..0ecbf873bf 100644 if (d0 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java -index dbbc34d91b..d823c6b6d9 100644 +index e66cdc49ca..2979cc8b66 100644 --- a/src/main/java/net/minecraft/server/EntitySilverfish.java +++ b/src/main/java/net/minecraft/server/EntitySilverfish.java @@ -0,0 +0,0 @@ public class EntitySilverfish extends EntityMonster { - if (super.a(generatoraccess, enummobspawn)) { - EntityHuman entityhuman = this.world.a(EntitySilverfish.b, (EntityLiving) this); + if (d(entitytypes, generatoraccess, enummobspawn, blockposition, random)) { + EntityHuman entityhuman = generatoraccess.a(EntitySilverfish.b, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D); - return entityhuman == null; + return !(entityhuman != null && !entityhuman.affectsSpawning) && entityhuman == null; // Paper - Affects Spawning API @@ -45,7 +45,7 @@ index dbbc34d91b..d823c6b6d9 100644 return false; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 037b0bc685..76728b1785 100644 +index c6daf693c5..00d6fc4b32 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index 90bb4c245..b215a5946 100644 --- a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/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 cc9b265182..f4f1037b3d 100644 +index 3a01cbe014..1c73572c40 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -48,7 +48,7 @@ index 7c3b9c0b97..d4d752ddb4 100644 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 7f1138cbbf..e6d2a40b6a 100644 +index d8ce699e3e..28f97f9b0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/PlayerDeathEvent-getItemsToKeep.patch b/Spigot-Server-Patches/PlayerDeathEvent-getItemsToKeep.patch index bba6f6718..21ce3ab37 100644 --- a/Spigot-Server-Patches/PlayerDeathEvent-getItemsToKeep.patch +++ b/Spigot-Server-Patches/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 06ca6cbf05..d273546676 100644 +index 7c8774d228..633fe836dd 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -57,7 +57,7 @@ index 06ca6cbf05..d273546676 100644 + @Override public void die(DamageSource damagesource) { - boolean flag = this.world.getGameRules().getBoolean("showDeathMessages"); + boolean flag = this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES); @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.releaseShoulderEntities(); // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory. diff --git a/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch index 8dbf859db..881065f36 100644 --- a/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch @@ -9,7 +9,7 @@ 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/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index fba9f4b8a1..6c0a1eb413 100644 +index 6960e46ec6..1212f3f67d 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -20,8 +20,9 @@ index fba9f4b8a1..6c0a1eb413 100644 + final int finalChunkRange = chunkRange; // Paper for lambda below + //double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; // Paper - use from event // Spigot end + long i = chunkcoordintpair.pair(); - return this.playerMap.a(chunkcoordintpair.pair()).noneMatch((entityplayer) -> { + return !this.u.d(i) ? true : this.playerMap.a(i).noneMatch((entityplayer) -> { - return !entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange; // Spigot + // Paper start - + com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event; diff --git a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch index 2499495e1..c49bb7716 100644 --- a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch @@ -15,16 +15,17 @@ 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 93fad14d3..55764deec 100644 +index 59bd9ccd70..6f5d8b0315 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { - double d4 = j >= 2 ? nbttaglist.h(1) : (double) (blockposition.getY() + world.random.nextInt(3) - 1); double d5 = j >= 3 ? nbttaglist.h(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; + if (world.c(((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 = entityType.getKey().getKey(); ++ 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; @@ -43,11 +44,11 @@ index 93fad14d3..55764deec 100644 + } + // Paper end + - if (world.c(((EntityTypes) optional.get()).a(d3, d4, d5))) { 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 f4f842b86..d25c7231d 100644 +index 4aa65c1934..4458b48ee8 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -60,7 +61,7 @@ index f4f842b86..d25c7231d 100644 while (true) { @@ -0,0 +0,0 @@ public final class SpawnerCreature { - if (entitypositiontypes_surface != null && a(entitypositiontypes_surface, (IWorldReader) world, (BlockPosition) blockposition_mutableblockposition, entitytypes) && world.c(entitytypes.a((double) f, (double) k, (double) f1))) { + if (a(entitypositiontypes_surface, (IWorldReader) world, (BlockPosition) blockposition_mutableblockposition, entitytypes) && EntityPositionTypes.a(entitytypes, world, EnumMobSpawn.NATURAL, blockposition_mutableblockposition, world.random) && world.c(entitytypes.a((double) f, (double) k, (double) f1))) { EntityInsentient entityinsentient; + // Paper start diff --git a/Spigot-Server-Patches/PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/PreSpawnerSpawnEvent.patch index 2cd3f77c1..0b8d9d2f0 100644 --- a/Spigot-Server-Patches/PreSpawnerSpawnEvent.patch +++ b/Spigot-Server-Patches/PreSpawnerSpawnEvent.patch @@ -9,15 +9,11 @@ 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 55764dee..b2e6e2a7 100644 +index 6f5d8b0315..079099e308 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { - // Paper start - EntityTypes entityType = optional.get(); -- String key = entityType.getKey().getKey(); -+ 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; diff --git a/Spigot-Server-Patches/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index 312aedd0b..1da1b06b8 100644 --- a/Spigot-Server-Patches/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/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 706be9a736..b1457526ec 100644 +index 4199c154eb..31c4412012 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java @@ -0,0 +0,0 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget { @@ -53,17 +53,17 @@ index 706be9a736..b1457526ec 100644 return block == this.g && iworldreader.getType(blockposition.up()).isAir() && iworldreader.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 b286934aa8..c7e25e2be8 100644 +index dd6a8fe3dd..8ba69380b7 100644 --- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java +++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java @@ -0,0 +0,0 @@ public class RandomPositionGenerator { } - blockposition1 = new BlockPosition((double) k1 + entitycreature.locX, (double) l1 + entitycreature.locY, (double) i2 + entitycreature.locZ); + blockposition2 = new BlockPosition((double) l + entitycreature.locX, (double) i1 + entitycreature.locY, (double) j1 + entitycreature.locZ); + if (!entitycreature.world.isLoaded(blockposition1)) continue; // Paper - if ((!flag1 || entitycreature.a(blockposition1)) && navigationabstract.a(blockposition1)) { + if ((!flag1 || entitycreature.a(blockposition2)) && navigationabstract.a(blockposition2)) { if (!flag) { - blockposition1 = a(blockposition1, entitycreature); + blockposition2 = a(blockposition2, entitycreature); @@ -0,0 +0,0 @@ public class RandomPositionGenerator { } diff --git a/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch index c3cc2d0a1..999d2e362 100644 --- a/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Saving-Bad-entities-to-chunks.patch @@ -18,7 +18,7 @@ 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 1ebb16f0f6..2f749fe26a 100644 +index ad3ade3c5c..cf33965082 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ public class ChunkRegionLoader { diff --git a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch index b39e110a8..6e6ed4bf5 100644 --- a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/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 f169e7edcd..90fd7d96b3 100644 +index 6a77707983..a167843bfb 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -46,5 +46,5 @@ index f169e7edcd..90fd7d96b3 100644 + // Paper end public boolean isOp(GameProfile gameprofile) { - return this.operators.d(gameprofile) || this.server.b(gameprofile) && this.server.getWorldServer(DimensionManager.OVERWORLD).getWorldData().u() || this.u; + return this.operators.d(gameprofile) || this.server.b(gameprofile) && this.server.getWorldServer(DimensionManager.OVERWORLD).getWorldData().t() || this.u; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch index 9e8c50ec4..2822720b9 100644 --- a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch @@ -6,7 +6,7 @@ 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 8254b8d68d..14ea4641dc 100644 +index fc4b3945d6..18c71640f5 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -19,7 +19,7 @@ index 8254b8d68d..14ea4641dc 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d2c178429d..f88ec07835 100644 +index 49d2299eff..6632b80d2a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch index cd4cc9571..bd6c87422 100644 --- a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/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 f142ed9a3b..e7b89b3206 100644 +index ff879d9bd0..302a015790 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 1.0F ? 16.0F * volume : 16.0D, this.world, packet); // Paper - this.world.dimension -> this.world } - @Override + private static Map> gamerules; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Server-Tick-Events.patch b/Spigot-Server-Patches/Server-Tick-Events.patch index 1a903ccb7..eb856b352 100644 --- a/Spigot-Server-Patches/Server-Tick-Events.patch +++ b/Spigot-Server-Patches/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 99306781f7..cbb4280631 100644 +index 252c50bb72..c20d9aab38 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant entitytypes, World world) { super(entitytypes, world); @@ -21,15 +21,15 @@ index 9ac34dfa8c..b967264562 100644 return 0.96F; } -+ public boolean isTrap() { return this.dV(); } // Paper - OBFHELPER - public boolean dV() { - return this.bK; ++ public boolean isTrap() { return this.dW(); } // Paper - OBFHELPER + public boolean dW() { + return this.bJ; } + public void setTrap(boolean trap) { this.r(trap); } // Paper - OBFHELPER public void r(boolean flag) { - if (flag != this.bK) { - this.bK = flag; + if (flag != this.bJ) { + this.bJ = flag; diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java index 7b0a6f82fb..f093744136 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java diff --git a/Spigot-Server-Patches/Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/Slime-Pathfinder-Events.patch index 0095b6334..ea9275fd6 100644 --- a/Spigot-Server-Patches/Slime-Pathfinder-Events.patch +++ b/Spigot-Server-Patches/Slime-Pathfinder-Events.patch @@ -5,12 +5,12 @@ 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 96cf4bccea..e28c0673dd 100644 +index 039050f634..a59b66e663 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -0,0 +0,0 @@ package net.minecraft.server; - import java.util.EnumSet; + import java.util.Random; import javax.annotation.Nullable; +// Paper start +import com.destroystokyo.paper.event.entity.SlimeChangeDirectionEvent; @@ -42,7 +42,7 @@ index 96cf4bccea..e28c0673dd 100644 + // Paper end } - public boolean ea() { + public boolean eb() { @@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster { @Override @@ -56,8 +56,8 @@ index 96cf4bccea..e28c0673dd 100644 @Override public boolean a() { -- return (this.a.isInWater() || this.a.aC()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; -+ return (this.a.isInWater() || this.a.aC()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper +- return (this.a.isInWater() || this.a.aD()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; ++ return (this.a.isInWater() || this.a.aD()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper } @Override @@ -65,8 +65,8 @@ index 96cf4bccea..e28c0673dd 100644 @Override public boolean a() { -- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aC() || 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.aC() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; // Paper +- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aD() || 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.aD() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; } @Override @@ -118,7 +118,7 @@ index 96cf4bccea..e28c0673dd 100644 @Override @@ -0,0 +0,0 @@ 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.dV()); + ((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.dW()); } + + // Paper start - clear timer and target when goal resets diff --git a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch index 9e9d776b6..f484d1566 100644 --- a/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/Speedup-BlockPos-by-fixing-inlining.patch @@ -101,7 +101,7 @@ index 7cb46d7a9c..e96428bb2b 100644 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 edd60a3d7f..93c3fa78f6 100644 +index 2eabaaeba2..04f754d2c1 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -187,10 +187,20 @@ index edd60a3d7f..93c3fa78f6 100644 + return this.d(this.x + i, this.y + j, this.z + k); } + public void o(int i) { +- this.b = i; ++ this.x = i; // Paper change to x + } + public void p(int i) { - this.c = i; + this.y = i; // Paper change to y } + public void q(int i) { +- this.d = i; ++ this.z = i; // Paper change to z + } + @Override -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index d59b18866..9cf525dc3 100644 --- a/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0905fbdc41..dbe7e5c013 100644 +index 2a6ae10a11..24d69778f0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -90,7 +90,7 @@ index 0905fbdc41..dbe7e5c013 100644 @Override diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7af4771681..708f6c97c6 100644 +index 7e347c7c99..0c7bf3ae3f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -143,7 +143,7 @@ index 7af4771681..708f6c97c6 100644 private String entityKeyString; diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 4ccdd7583e..382498d193 100644 +index 8f9820f492..e8a90e01f5 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { // Paper diff --git a/Spigot-Server-Patches/String-based-Action-Bar-API.patch b/Spigot-Server-Patches/String-based-Action-Bar-API.patch index cd4e8edca..57b238830 100644 --- a/Spigot-Server-Patches/String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/String-based-Action-Bar-API.patch @@ -42,7 +42,7 @@ index c96f3ed176..1f6a126329 100644 public static boolean isMainThread() { return MinecraftServer.getServer().isMainThread(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 397349963d..b584432639 100644 +index d854d48446..d064153829 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Support-Overriding-World-Seeds.patch b/Spigot-Server-Patches/Support-Overriding-World-Seeds.patch index f7298f3a5..0b3b92e7b 100644 --- a/Spigot-Server-Patches/Support-Overriding-World-Seeds.patch +++ b/Spigot-Server-Patches/Support-Overriding-World-Seeds.patch @@ -15,7 +15,7 @@ This seed will end up being saved to the world data file, so it is a permanent change in that it won't go back if you remove it from paper.yml diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 833659bbb2..ffb18902ff 100644 +index a13c8c68b6..ea3695b021 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import java.lang.reflect.Modifier; @@ -59,7 +59,7 @@ index 833659bbb2..ffb18902ff 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e5c148c481..74cdf4945f 100644 +index d100200518..3f1d8905a4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant blockStateList; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8075cc4827..3de0f69758 100644 +index f3c5c729ff..ab9b7bbd31 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -342,7 +342,7 @@ index 8075cc4827..3de0f69758 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 24222fa1f8..bef6618d8f 100644 +index 710d40b43a..22aba06270 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { @@ -366,7 +366,7 @@ index 24222fa1f8..bef6618d8f 100644 + this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper } } - } + }); @@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); } @@ -378,7 +378,7 @@ index 24222fa1f8..bef6618d8f 100644 @Override diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 2e09900f45..1ebb16f0f6 100644 +index 1894509df8..ad3ade3c5c 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -0,0 +0,0 @@ @@ -416,7 +416,7 @@ index 2e09900f45..1ebb16f0f6 100644 } diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java -index 46e7737ca3..a3ef943066 100644 +index 12885cbd60..49de6e997a 100644 --- a/src/main/java/net/minecraft/server/CustomFunction.java +++ b/src/main/java/net/minecraft/server/CustomFunction.java @@ -0,0 +0,0 @@ public class CustomFunction { @@ -443,7 +443,7 @@ index 46e7737ca3..a3ef943066 100644 return this.b; } diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java -index 9c9eef0ad9..b42fbf2c65 100644 +index 8346778383..8bc74add6d 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java @@ -0,0 +0,0 @@ public class CustomFunctionData implements IResourcePackListener { @@ -456,9 +456,18 @@ index 9c9eef0ad9..b42fbf2c65 100644 int j = 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 b60956218d..19e2df3098 100644 +index c088ff9692..c7ea4ec4fe 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java +@@ -0,0 +0,0 @@ import java.util.Collections; + import java.util.List; + import java.util.Locale; + 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; @@ -0,0 +0,0 @@ import org.apache.logging.log4j.Level; import org.bukkit.command.CommandSender; @@ -487,29 +496,55 @@ index b60956218d..19e2df3098 100644 @Override @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - return remoteControlCommandListener.getMessages(); + + @Override + public String executeRemoteCommand(String s) { ++ Waitable[] waitableArray = new Waitable[1]; + this.remoteControlCommandListener.clearMessages(); + this.executeSync(() -> { + // CraftBukkit start - fire RemoteServerCommandEvent +@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + if (event.isCancelled()) { + return; } - }; -- processQueue.add(waitable); ++ // Paper start ++ if (s.toLowerCase().startsWith("timings") && s.toLowerCase().matches("timings (report|paste|get|merged|seperate)")) { ++ org.bukkit.command.BufferedCommandSender sender = new org.bukkit.command.BufferedCommandSender(); ++ Waitable waitable = new Waitable() { ++ @Override ++ protected String evaluate() { ++ return sender.getBuffer(); ++ } ++ }; ++ waitableArray[0] = waitable; ++ co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable)); ++ } else { ++ // Paper end + ServerCommand serverCommand = new ServerCommand(event.getCommand(), remoteControlCommandListener.f()); + server.dispatchServerCommand(remoteConsole, serverCommand); ++ } // Paper + // CraftBukkit end + }); + // Paper start -+ if (s.toLowerCase().startsWith("timings") && s.toLowerCase().matches("timings (report|paste|get|merged|seperate)")) { -+ org.bukkit.command.BufferedCommandSender sender = new org.bukkit.command.BufferedCommandSender(); -+ waitable = new Waitable() { -+ @Override -+ protected String evaluate() { -+ return sender.getBuffer(); -+ } -+ }; -+ co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable)); -+ } else { -+ processQueue.add(waitable); ++ if (waitableArray[0] != null) { ++ //noinspection unchecked ++ Waitable waitable = waitableArray[0]; ++ try { ++ return waitable.get(); ++ } catch (java.util.concurrent.ExecutionException e) { ++ throw new RuntimeException("Exception processing rcon command " + s, e.getCause()); ++ } catch (InterruptedException e) { ++ Thread.currentThread().interrupt(); // Maintain interrupted state ++ throw new RuntimeException("Interrupted processing rcon command " + s, e); ++ } ++ + } + // Paper end - try { - return waitable.get(); - } catch (java.util.concurrent.ExecutionException e) { + return this.remoteControlCommandListener.getMessages(); + } + diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 708f6c97c6..c348d6bec3 100644 +index 0c7bf3ae3f..49f64e1507 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender; @@ -548,7 +583,7 @@ index 708f6c97c6..c348d6bec3 100644 protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 40173aa35b..678dae6dae 100644 +index e0b12e1fd7..30aa4f56d3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -566,7 +601,7 @@ index 40173aa35b..678dae6dae 100644 public void tick() { - SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot super.tick(); - this.dk(); + this.dl(); this.o(); @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { } @@ -624,27 +659,18 @@ index 40173aa35b..678dae6dae 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 64318e6e78..c76620f2b3 100644 +index 41638b680d..73b1041c8c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ - package net.minecraft.server; - -+import co.aikar.timings.Timings; -+import com.google.common.base.Stopwatch; - import com.google.common.collect.Lists; - import com.google.common.collect.Maps; - import com.google.gson.JsonElement; @@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.Main; import org.bukkit.event.server.ServerLoadEvent; // CraftBukkit end -import org.bukkit.craftbukkit.SpigotTimings; // Spigot - import org.spigotmc.SlackActivityAccountant; // Spigot +import co.aikar.timings.MinecraftTimings; // Paper + import org.spigotmc.SlackActivityAccountant; // Spigot public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { - @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 200) { + } else if (this.g.bG > 200) { World world = this.g.world; // CraftBukkit start @@ -98,8 +98,8 @@ index 89792eec45..e4eecf5688 100644 @Override public boolean a() { -- return this.a.isBaby() ? false : (this.a.dV() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dX().a((IPosition) this.a.ch(), 64.0D))); -+ return this.a.isBaby() ? false : (this.a.dV() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dX().a((IPosition) this.a.ch(), 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.dW() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dY().a((IPosition) this.a.ci(), 64.0D))); ++ return this.a.isBaby() ? false : (this.a.dW() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dY().a((IPosition) this.a.ci(), 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/Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/Update-entity-Metadata-for-all-tracked-players.patch index 8195ad754..5d3558125 100644 --- a/Spigot-Server-Patches/Update-entity-Metadata-for-all-tracked-players.patch +++ b/Spigot-Server-Patches/Update-entity-Metadata-for-all-tracked-players.patch @@ -5,7 +5,7 @@ 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 afd8748da8..17b6ab57c2 100644 +index cd7e0299ac..460c687d3e 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -0,0 +0,0 @@ public class EntityTrackerEntry { @@ -22,7 +22,7 @@ index afd8748da8..17b6ab57c2 100644 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 69d39a47ba..4e8b8f49c4 100644 +index c4ac559f3f..dda8196702 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Use-ChunkStatus-cache-when-saving-protochunks.patch b/Spigot-Server-Patches/Use-ChunkStatus-cache-when-saving-protochunks.patch index 4e7ebb227..51918ca63 100644 --- a/Spigot-Server-Patches/Use-ChunkStatus-cache-when-saving-protochunks.patch +++ b/Spigot-Server-Patches/Use-ChunkStatus-cache-when-saving-protochunks.patch @@ -7,7 +7,7 @@ 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 e89738a08d..89649e73e5 100644 +index 3f41072f72..f34d7d0dad 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index 461bb534b..bd9ea13d9 100644 --- a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/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 d379d33d15..80359d1bf5 100644 +index ef508bbd71..5c401a71c5 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -28,7 +28,7 @@ index d379d33d15..80359d1bf5 100644 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 37020dcba5..c2c676e3bb 100644 +index 26b35855e1..c093747bb2 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index 85214b0b2..ce86b6d9f 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -19,7 +19,7 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 251fa0bc36..d379d33d15 100644 +index e8134bf0eb..ef508bbd71 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -143,7 +143,7 @@ index 0000000000..685deaa0e5 + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index f0e2250cd8..37020dcba5 100644 +index 6e1509c2c1..26b35855e1 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -185,7 +185,7 @@ index f0e2250cd8..37020dcba5 100644 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 e7b89b3206..6b83f9769a 100644 +index 302a015790..4cf05e56fb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; @@ -207,7 +207,7 @@ index e7b89b3206..6b83f9769a 100644 public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant serverCommandQueue = Collections.synchronizedList(Lists.newArrayList()); + private final java.util.Queue serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue(); // Paper - use a proper queue - private RemoteStatusListener l; + private RemoteStatusListener remoteStatusListener; public final RemoteControlCommandListener remoteControlCommandListener; private RemoteControlListener remoteControlListener; @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch index 964506654..dd305d7c1 100644 --- a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/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/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 291a8029ed..fe9881fdf2 100644 +index 20b6ad48a9..8bc3e0464d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -18,11 +18,11 @@ index 291a8029ed..fe9881fdf2 100644 protected int j; private Entity vehicle; diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 0f4aa698aa..1f78993375 100644 +index 452602d43e..862ae25544 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java @@ -0,0 +0,0 @@ public class IBlockData extends BlockDataAbstract implements - return this.b(iblockaccess, blockposition, VoxelShapeCollision.a()); + 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 @@ -56,7 +56,7 @@ index 6bfbc3616e..7bed2d208f 100644 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 811841d110..5c393f11d7 100644 +index b8659f703c..c8bd4b7034 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java @@ -0,0 +0,0 @@ public final class VoxelShapes { @@ -76,7 +76,7 @@ index 811841d110..5c393f11d7 100644 if (operatorboolean.apply(false, false)) { throw new IllegalArgumentException(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d205ec01ac..05c7a49a4a 100644 +index d08bd6d963..7c39846c16 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose diff --git a/Spigot-Server-Patches/Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/Workaround-for-setting-passengers-on-players.patch index 61987405f..859b0e876 100644 --- a/Spigot-Server-Patches/Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/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 34ae747004..cc31b8d4ac 100644 +index d0d61fd290..57f2499cad 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/Workaround-for-vehicle-tracking-issue-on-disconnect.patch index 40cd3745e..7c1903e44 100644 --- a/Spigot-Server-Patches/Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/Spigot-Server-Patches/Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,7 +5,7 @@ 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 3d0400d828..06ca6cbf05 100644 +index ce4ffe01ba..7c8774d228 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index 93c6c565c..14afa2221 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/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 0915dede9a..ddfa88bac5 100644 +index 83b6bfeb43..bd3e610786 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch index f5b4a0d00..50e30dabb 100644 --- a/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch @@ -20,7 +20,7 @@ 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 85106e601c..73bd0c278a 100644 +index 6a2a4576e9..fa8d382191 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -72,7 +72,7 @@ index 85106e601c..73bd0c278a 100644 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 87c4902f83..f709e7d87a 100644 +index e003f1c20c..61da5d365d 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -91,7 +91,7 @@ index 87c4902f83..f709e7d87a 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c357339c26..2806808328 100644 +index 86d3c516ba..a8769548fe 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -112,7 +112,7 @@ index c357339c26..2806808328 100644 this.B(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index e8bc1634ef..e4b121c218 100644 +index b190515f73..8d21731aab 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch index 0982808c0..02dcd3e5b 100644 --- a/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,7 +5,7 @@ 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 4409588fbb..d202d3d65f 100644 +index 645b7f605c..18e152b8fb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -44,7 +44,7 @@ index 4409588fbb..d202d3d65f 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8f80582a78..34ae747004 100644 +index 2e0621b889..d0d61fd290 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/improve-CraftWorld-isChunkLoaded.patch index d2ccccf4c..f5246ed4c 100644 --- a/Spigot-Server-Patches/improve-CraftWorld-isChunkLoaded.patch +++ b/Spigot-Server-Patches/improve-CraftWorld-isChunkLoaded.patch @@ -9,7 +9,7 @@ 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 0328eadf27..d976b08e5e 100644 +index af1f1c2d62..57071e84fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/incremental-chunk-saving.patch b/Spigot-Server-Patches/incremental-chunk-saving.patch index 2aafcc2bd..4ca7ccdb3 100644 --- a/Spigot-Server-Patches/incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/incremental-chunk-saving.patch @@ -29,7 +29,7 @@ index b854061983..58109e1308 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ef07f665b7..d89ad4e390 100644 +index 5bf781bb63..e2a48695df 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { @@ -42,7 +42,7 @@ index ef07f665b7..d89ad4e390 100644 private long t; @Nullable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 184f1b00f0..3dbe83c7ea 100644 +index b401ff7695..485725c0ae 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 7d48b580ac..b71f98b0c5 100644 +index d85220b66c..c4ad039ffd 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -103,21 +103,19 @@ index 7d48b580ac..b71f98b0c5 100644 if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { - this.saveChunk(ichunkaccess); -- playerchunk.l(); -- } + // paper start + boolean shouldSave = true; - -- }); ++ + if (ichunkaccess instanceof Chunk) { + shouldSave = ((Chunk) ichunkaccess).lastSaved + world.paperConfig.autoSavePeriod <= world.getTime(); + } + + if (shouldSave && this.saveChunk(ichunkaccess)) { + ++savedThisTick; -+ playerchunk.l(); -+ } -+ + playerchunk.m(); + } + +- }); + if (savedThisTick >= world.paperConfig.maxAutoSaveChunksPerTick) { + return; + } @@ -128,7 +126,7 @@ index 7d48b580ac..b71f98b0c5 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 40b3d96edd..135ec94c6f 100644 +index d086af67f9..52523789b2 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index f1f5a0208..e699a7db5 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -6,10 +6,10 @@ 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 7a860231e4..d3d8fffeb0 100644 +index f88e42423d..f489d47c60 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ import co.aikar.timings.MinecraftTimings; // Paper +@@ -0,0 +0,0 @@ import org.spigotmc.SlackActivityAccountant; // Spigot public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { @@ -22,9 +22,9 @@ index 7a860231e4..d3d8fffeb0 100644 public MinecraftServer(OptionSet options, Proxy proxy, DataFixer datafixer, CommandDispatcher commanddispatcher, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory, String s) { super("Server"); + SERVER = this; // Paper - better singleton - this.ae = new ResourceManager(EnumResourcePackType.SERVER_DATA, this.serverThread); + this.ad = new ResourceManager(EnumResourcePackType.SERVER_DATA, this.serverThread); this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new); - this.ai = new CraftingManager(); + this.ah = new CraftingManager(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant