From 73983e4c16ce627caed4accbbf6f251a02512b15 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 --- Spigot-API-Patches/0001-POM-changes.patch | 19 +- .../0002-Add-FastUtil-to-Bukkit.patch | 8 +- Spigot-API-Patches/0004-Timings-v2.patch | 76 +++---- .../0005-Player-affects-spawning-API.patch | 8 +- .../0010-Add-player-view-distance-API.patch | 8 +- ...cord-chat-API-from-spigot-subclasses.patch | 12 +- .../0016-Player-Tab-List-and-Title-APIs.patch | 12 +- .../0021-Complete-resource-pack-API.patch | 12 +- .../0022-Use-ASM-for-event-executors.patch | 24 +-- ...0042-Add-String-based-Action-Bar-API.patch | 14 +- ...upstream-javadoc-warnings-and-errors.patch | 34 +-- ...low-plugins-to-use-SLF4J-for-logging.patch | 10 +- ...nt-protocol-version-and-virtual-host.patch | 10 +- ...7-Ability-to-apply-mending-to-XP-API.patch | 8 +- .../0088-Player.setPlayerProfile-API.patch | 10 +- ...92-Add-Ban-Methods-to-Player-Objects.patch | 23 +- ...e-attack-cooldown-methods-for-Player.patch | 8 +- Spigot-Server-Patches/0001-POM-Changes.patch | 10 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 163 +++++++-------- Spigot-Server-Patches/0004-MC-Utils.patch | 38 ++-- ...-MinecraftKey-Information-to-Objects.patch | 14 +- ...to-current-Chunk-for-Entity-and-Bloc.patch | 12 +- Spigot-Server-Patches/0009-Timings-v2.patch | 196 ++++++++++-------- .../0013-Allow-nerfed-mobs-to-jump.patch | 14 +- ...-despawn-distances-for-living-entiti.patch | 8 +- ...ck-and-tnt-entities-at-the-specified.patch | 12 +- ...ient-crashes-server-lists-and-Mojang.patch | 10 +- ...d-version-history-to-version-command.patch | 8 +- .../0020-Player-affects-spawning-API.patch | 22 +- ...023-Further-improve-server-tick-loop.patch | 20 +- ...024-Only-refresh-abilities-if-needed.patch | 8 +- .../0025-Entity-Origin-API.patch | 18 +- ...nfigurable-top-of-nether-void-damage.patch | 18 +- .../0030-Configurable-end-credits.patch | 6 +- .../0032-Optimize-explosions.patch | 12 +- ...sition-the-first-time-an-entity-is-s.patch | 12 +- ...figurable-container-update-tick-rate.patch | 8 +- ...chunks-are-slime-spawn-chunks-toggle.patch | 16 +- .../0049-Player-Tab-List-and-Title-APIs.patch | 8 +- ...ble-inter-world-teleportation-safety.patch | 8 +- .../0055-Add-exception-reporting-event.patch | 30 +-- ...oreboards-for-non-players-by-default.patch | 10 +- .../0059-Complete-resource-pack-API.patch | 12 +- ...8-Custom-replacement-for-eaten-items.patch | 8 +- ...th-absorb-values-and-repair-bad-data.patch | 10 +- ...le-spawn-chances-for-skeleton-horses.patch | 10 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 20 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 10 +- .../0078-EntityPathfindEvent.patch | 10 +- ...dDebugInfo-not-initialized-on-client.patch | 8 +- ...nd-for-setting-passengers-on-players.patch | 8 +- .../0093-Configurable-Player-Collision.patch | 10 +- ...97-Implement-PlayerLocaleChangeEvent.patch | 12 +- ...-possibility-for-getServer-singleton.patch | 16 +- ...item-frames-performance-and-bug-fixe.patch | 28 +-- .../0105-Optimize-UserCache-Thread-Safe.patch | 8 +- ...7-Optional-TNT-doesn-t-move-in-water.patch | 16 +- .../0111-Fix-Double-World-Add-issues.patch | 8 +- ...ers-that-dismount-from-other-players.patch | 6 +- ...uto-fix-bad-Y-levels-on-player-login.patch | 8 +- .../0124-Add-EntityZapEvent.patch | 8 +- .../0128-Optimise-removeQueue.patch | 8 +- ...39-Properly-fix-item-duplication-bug.patch | 8 +- .../0140-String-based-Action-Bar-API.patch | 8 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 8 +- ...llow-entities-to-ride-themselves-572.patch | 8 +- ...PI-for-Reason-Source-Triggering-play.patch | 40 ++-- ...more-aggressive-in-the-chunk-unload-.patch | 12 +- .../0151-Do-not-let-armorstands-drown.patch | 18 +- ...le-async-calls-to-restart-the-server.patch | 16 +- ...oleAppender-for-console-improvements.patch | 36 ++-- .../0158-Item-canEntityPickup.patch | 10 +- .../0162-Basic-PlayerProfile-API.patch | 26 +-- .../0163-Shoulder-Entities-Release-API.patch | 10 +- .../0166-Entity-fromMobSpawner.patch | 12 +- .../0169-Implement-getI18NDisplayName.patch | 8 +- .../0170-ProfileWhitelistVerifyEvent.patch | 8 +- ...awns-should-honor-nametags-and-leash.patch | 8 +- ...ams-to-redirect-System.out-err-to-lo.patch | 10 +- ...nt-protocol-version-and-virtual-host.patch | 8 +- ...dEffects-only-to-players-who-can-see.patch | 12 +- ...5-Ability-to-apply-mending-to-XP-API.patch | 12 +- ...-max-squid-spawn-height-configurable.patch | 18 +- .../0197-PreCreatureSpawnEvent.patch | 19 +- ...8-PlayerNaturallySpawnCreaturesEvent.patch | 11 +- ...nt-extended-PaperServerListPingEvent.patch | 21 +- .../0212-Player.setPlayerProfile-API.patch | 14 +- ...18-Flag-to-disable-the-channel-limit.patch | 10 +- ...d-method-to-open-already-placed-sign.patch | 8 +- .../0222-EndermanEscapeEvent.patch | 8 +- ...ld.spawnParticle-API-and-add-Builder.patch | 10 +- ...Item-entities-with-World.spawnEntity.patch | 6 +- ...ecipes-in-RecipeBook-to-avoid-data-e.patch | 10 +- .../0243-Expand-Explosions-API.patch | 8 +- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 16 +- ...7-Implement-World.getEntity-UUID-API.patch | 6 +- .../0248-InventoryCloseEvent-Reason-API.patch | 36 ++-- ...ge-the-Entity-Random-seed-for-squids.patch | 8 +- ...nilla-entity-warnings-for-duplicates.patch | 8 +- ...-more-information-to-Entity.toString.patch | 8 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 20 +- ...-Speedup-BlockPos-by-fixing-inlining.patch | 18 +- ...4-Vanished-players-don-t-have-rights.patch | 16 +- .../0267-EntityTransformedEvent.patch | 16 +- .../0268-SkeletonHorse-Additions.patch | 24 +-- ...revent-Saving-Bad-entities-to-chunks.patch | 10 +- ...ead-Entities-in-entityList-iteration.patch | 26 +-- ...dd-Early-Warning-Feature-to-WatchDog.patch | 12 +- ...85-Use-a-Queue-for-Queueing-Commands.patch | 14 +- ...ets-from-world-player-list-not-serve.patch | 16 +- .../0291-Optimize-Hoppers.patch | 18 +- .../0294-Slime-Pathfinder-Events.patch | 40 ++-- .../0298-Add-More-Creeper-API.patch | 29 +-- ...loadChunk-int-int-false-load-unconve.patch | 8 +- ...e-attack-cooldown-methods-for-Player.patch | 20 +- .../0303-Improve-death-events.patch | 92 ++++---- ...ent-Mob-AI-Rules-from-Loading-Chunks.patch | 18 +- .../0312-Support-Overriding-World-Seeds.patch | 16 +- .../0313-Optimize-Server-World-Map.patch | 10 +- .../0314-PreSpawnerSpawnEvent.patch | 12 +- ...arseException-in-Entity-and-TE-names.patch | 10 +- .../0321-Add-sun-related-API.patch | 20 +- Spigot-Server-Patches/0324-Turtle-API.patch | 60 +++--- ...mit-lightning-strike-effect-distance.patch | 10 +- ...-Call-player-spectator-target-events.patch | 6 +- ...event-players-from-moving-into-unloa.patch | 15 +- ...32-Reset-players-airTicks-on-respawn.patch | 15 +- .../0337-Optimize-World-Time-Updates.patch | 12 +- ...t-allow-digging-into-unloaded-chunks.patch | 8 +- ...entity-dismount-during-teleportation.patch | 22 +- .../0346-Add-more-Zombie-API.patch | 16 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 18 +- ...vehicle-tracking-issue-on-disconnect.patch | 6 +- ...-remove-from-being-called-on-Players.patch | 8 +- .../0360-Fix-sign-edit-memory-leak.patch | 8 +- .../0361-Limit-Client-Sign-length-more.patch | 8 +- ...367-Add-LivingEntity-getTargetEntity.patch | 20 +- .../0369-Entity-getEntitySpawnReason.patch | 16 +- ...ity-Metadata-for-all-tracked-players.patch | 10 +- .../0375-Server-Tick-Events.patch | 10 +- ...0376-PlayerDeathEvent-getItemsToKeep.patch | 10 +- ...377-Optimize-Persistent-Data-Loading.patch | 42 ++-- ...ts-to-fire-only-after-the-server-plu.patch | 8 +- ...imize-GameRules-to-use-LinkedHashMap.patch | 65 ++---- .../0382-Add-Heightmap-API.patch | 8 +- .../0384-Mob-Spawner-API-Enhancements.patch | 14 +- ...layer-View-Distance-API-placeholders.patch | 12 +- .../0386-Async-Chunk-placeholder.patch | 8 +- ...isPrimaryThread-and-MinecraftServer-.patch | 10 +- ...h-entity-loss-due-to-unloaded-chunks.patch | 12 +- .../0392-Duplicate-UUID-Resolve-Option.patch | 31 +-- ...393-improve-CraftWorld-isChunkLoaded.patch | 8 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 16 +- .../0397-ChunkMapDistance-CME.patch | 36 ++-- ...tually-Limit-Natural-Spawns-To-Limit.patch | 10 +- .../0399-Implement-CraftBlockSoundGroup.patch | 12 +- .../0400-Chunk-debug-command.patch | 30 +-- .../0401-incremental-chunk-saving.patch | 30 ++- ...403-Fix-World-isChunkGenerated-calls.patch | 28 +-- .../0405-Fix-MC-154214.patch | 18 +- ...Status-cache-when-saving-protochunks.patch | 8 +- .../0408-Fix-tracker-desync-issue.patch | 16 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 166 files changed, 1420 insertions(+), 1457 deletions(-) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index d020f7020..833062360 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,14 +1,14 @@ -From 4110bb0715fb2cd59da12c0b29d17b6d92065689 Mon Sep 17 00:00:00 2001 +From 614fd245b215d849e362c4d12e258a741ce94292 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 00:16:08 +0100 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 -@@ -2,34 +2,29 @@ +@@ -2,34 +2,28 @@ 4.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 @@ -54,7 +53,7 @@ index 5ddf33938..2a2abac96 100644 com.google.guava -@@ -113,15 +126,12 @@ +@@ -113,15 +125,12 @@ @@ -103,7 +102,7 @@ index 5ddf33938..2a2abac96 100644 -@@ -156,6 +166,7 @@ +@@ -156,6 +165,7 @@ @@ -112,5 +111,5 @@ index 5ddf33938..2a2abac96 100644 true -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch index 7edfc3c2a..4051217ac 100644 --- a/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch +++ b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch @@ -1,4 +1,4 @@ -From 807914ba1f9c48905a288418d8c30d15adb42c7c Mon Sep 17 00:00:00 2001 +From 4d727d07067bf90febccacc7c46b151e7a4dfc3f Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 1 Apr 2016 00:02:47 -0400 Subject: [PATCH] Add FastUtil to Bukkit @@ -6,10 +6,10 @@ 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 -@@ -50,6 +50,12 @@ +@@ -49,6 +49,12 @@ @@ -23,5 +23,5 @@ index 2a2abac96..81851a293 100644 commons-lang commons-lang -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0004-Timings-v2.patch b/Spigot-API-Patches/0004-Timings-v2.patch index 876776372..324e43862 100644 --- a/Spigot-API-Patches/0004-Timings-v2.patch +++ b/Spigot-API-Patches/0004-Timings-v2.patch @@ -1,4 +1,4 @@ -From abbdc3ccdc193cc48ec75f0ed89e031db717f5e6 Mon Sep 17 00:00:00 2001 +From 6b3f507c26cc2a553c087f4d936bf0574984f808 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 18:48:17 -0600 Subject: [PATCH] Timings v2 @@ -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 +1,84 @@ @@ -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 +1,68 @@ @@ -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 +1,83 @@ @@ -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 +1,83 @@ @@ -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 +1,122 @@ @@ -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 +1,227 @@ @@ -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 +1,354 @@ @@ -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 +1,58 @@ @@ -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 +1,116 @@ @@ -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 +1,293 @@ @@ -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 +1,122 @@ @@ -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 +1,355 @@ @@ -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 +1,188 @@ @@ -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 +1,75 @@ @@ -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 +1,53 @@ @@ -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 +1,38 @@ @@ -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 +1,140 @@ @@ -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 +1,76 @@ @@ -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 +1,368 @@ @@ -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 +1,111 @@ @@ -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 @@ -574,7 +574,6 @@ 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 @@ -1250,6 +1250,26 @@ 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 @@ -69,4 +69,12 @@ 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 +1,21 @@ @@ -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 @@ -33,7 +33,8 @@ 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 @@ -9,6 +9,7 @@ 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 +1,114 @@ @@ -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 @@ -15,7 +15,6 @@ 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 @@ -1,253 +0,0 @@ @@ -3714,10 +3714,10 @@ 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 -@@ -1580,6 +1580,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1601,6 +1601,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { throw new UnsupportedOperationException("Not supported yet."); } @@ -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 @@ -297,7 +297,6 @@ 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 @@ -53,7 +53,6 @@ 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 @@ -24,7 +24,8 @@ 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 @@ -2,6 +2,7 @@ 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 @@ -1,3 +1,26 @@ @@ -4114,5 +4114,5 @@ index b71235f69..3cbe5c2bb 100644 + } -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch b/Spigot-API-Patches/0005-Player-affects-spawning-API.patch index 9f220e6df..b9f2ed4f4 100644 --- a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch +++ b/Spigot-API-Patches/0005-Player-affects-spawning-API.patch @@ -1,14 +1,14 @@ -From b6532b8784860126e695a65abf433761e5385208 Mon Sep 17 00:00:00 2001 +From c7add24cf1bb4f0e68fa2581e86966c71be9d595 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Mon, 29 Feb 2016 17:22:34 -0600 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 -@@ -1463,6 +1463,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1484,6 +1484,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @NotNull public String getLocale(); @@ -32,5 +32,5 @@ index 72b08e73a..f5d31648f 100644 * Update the list of commands sent to the client. *
-- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch b/Spigot-API-Patches/0010-Add-player-view-distance-API.patch index c4e4ec490..21f3e5342 100644 --- a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/0010-Add-player-view-distance-API.patch @@ -1,14 +1,14 @@ -From 417fce30c787e11eb56818606ae27cd9b3b0f265 Mon Sep 17 00:00:00 2001 +From de62be87c34a6ebbe3a52fc8e59e2cd751c39f84 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Mon, 29 Feb 2016 18:05:37 -0600 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 -@@ -1477,6 +1477,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1498,6 +1498,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param affects Whether the player can affect mob spawning */ public void setAffectsSpawning(boolean affects); @@ -30,5 +30,5 @@ index f5d31648f..a9b11322b 100644 /** -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 9641f6f90..97b07ac45 100644 --- a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -1,4 +1,4 @@ -From e944d1d34899c180d6a165ddd4b79cef2b6a53c1 Mon Sep 17 00:00:00 2001 +From d8e1178f4ed95249e163c53d295a8bd726f419cf Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 19:54:32 -0600 Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses @@ -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 @@ -274,6 +274,26 @@ 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 @@ -225,6 +225,26 @@ public interface Server extends PluginMessageRecipient { @@ -68,10 +68,10 @@ 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 -@@ -422,6 +422,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -443,6 +443,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); @@ -111,5 +111,5 @@ index a9b11322b..de1b1512f 100644 * Forces an update of the player's entire inventory. * -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch index ad86523b3..3dc1403eb 100644 --- a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch @@ -1,4 +1,4 @@ -From c76bce420738f306b2c47f2714099d328d1338dd Mon Sep 17 00:00:00 2001 +From 30e1c5bf22a481e6c32a2c67fd5a67f6ebc33273 Mon Sep 17 00:00:00 2001 From: Techcable Date: Mon, 29 Feb 2016 20:02:40 -0600 Subject: [PATCH] Player Tab List and Title APIs @@ -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 +1,373 @@ @@ -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 @@ -1,6 +1,8 @@ @@ -394,9 +394,9 @@ 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; -@@ -452,6 +454,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -473,6 +475,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } @@ -514,5 +514,5 @@ index de1b1512f..40246fb99 100644 /** -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch b/Spigot-API-Patches/0021-Complete-resource-pack-API.patch index ed6c43617..a4d952a1a 100644 --- a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch +++ b/Spigot-API-Patches/0021-Complete-resource-pack-API.patch @@ -1,14 +1,14 @@ -From f8c9a0bd1f8a4bf5e8b808717dc641354e6e6e9b Mon Sep 17 00:00:00 2001 +From 63a712aa7eb94e803bc1ef1eb81c8827b5710169 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 4 Apr 2015 22:59:54 -0400 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 -@@ -1214,7 +1214,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1235,7 +1235,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the URL is null. * @throws IllegalArgumentException Thrown if the URL is too long. The * length restriction is an implementation specific arbitrary value. @@ -18,7 +18,7 @@ index 40246fb99..495d43e78 100644 public void setResourcePack(@NotNull String url); /** -@@ -1652,6 +1654,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1673,6 +1675,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void openBook(@NotNull ItemStack book); @@ -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 @@ -11,13 +11,32 @@ import org.jetbrains.annotations.NotNull; @@ -119,5 +119,5 @@ index b98195650..4c2102a11 100644 * Gets the status of this pack. * -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch index fb52fca86..0d2fd049e 100644 --- a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch @@ -1,4 +1,4 @@ -From 43ef8ec8dcd046b64b19d0c0ef223f3b22f611d2 Mon Sep 17 00:00:00 2001 +From 679dc954b994c687b3452e062e561111fefac478 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 13:20:33 -0700 Subject: [PATCH] Use ASM for event executors. @@ -6,10 +6,10 @@ 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 -@@ -129,6 +129,17 @@ +@@ -128,6 +128,17 @@ 7.1 test
@@ -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 +1,42 @@ @@ -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 +1,43 @@ @@ -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 +1,47 @@ @@ -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 +1,35 @@ @@ -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 +1,66 @@ @@ -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 +1,35 @@ @@ -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 @@ -5,9 +5,75 @@ 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 @@ -301,21 +301,7 @@ public final class JavaPluginLoader implements PluginLoader { @@ -439,5 +439,5 @@ index 12601db68..06b6724fa 100644 eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); } else { -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch index 1a0786c55..32d1c32ac 100644 --- a/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch +++ b/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch @@ -1,14 +1,14 @@ -From ede84c84ab6a9492dcc483ee3f8c320c09bfc946 Mon Sep 17 00:00:00 2001 +From 1e1122199e63c367ef06b4dc4dd05ab81197f123 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:55:55 -0500 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 -@@ -425,6 +425,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -446,6 +446,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start @@ -35,7 +35,7 @@ index 495d43e78..62fe51ab1 100644 /** * Sends the component to the player * -@@ -448,9 +468,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -469,9 +489,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * @@ -47,7 +47,7 @@ index 495d43e78..62fe51ab1 100644 public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } -@@ -1796,9 +1818,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1817,9 +1839,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends the component to the specified screen position of this player * @@ -59,7 +59,7 @@ index 495d43e78..62fe51ab1 100644 public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { throw new UnsupportedOperationException("Not supported yet."); } -@@ -1806,9 +1830,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1827,9 +1851,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * @@ -72,5 +72,5 @@ index 495d43e78..62fe51ab1 100644 throw new UnsupportedOperationException("Not supported yet."); } -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch index 1e0f6c4ce..9911a58ee 100644 --- a/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch +++ b/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch @@ -1,4 +1,4 @@ -From 66afc4fa6b46a600e21c2c3519b07870a4b00dcb Mon Sep 17 00:00:00 2001 +From 9ad73aaf9aa66daca16e4f2ae7482ef3f2c8fe07 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 10 Jun 2017 16:59:40 -0500 Subject: [PATCH] Fix upstream javadoc warnings and errors @@ -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 @@ -1657,6 +1657,7 @@ 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 @@ -142,6 +142,7 @@ public interface AreaEffectCloud extends Entity { @@ -86,10 +86,10 @@ 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 -@@ -440,7 +440,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -461,7 +461,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * * Use supplied alternative character to the section symbol to represent legacy color codes. * @@ -98,7 +98,7 @@ index 62fe51ab1..f14bdd22f 100644 * @param message The message to send */ public void sendActionBar(char alternateChar, @NotNull String message); -@@ -507,6 +507,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -528,6 +528,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Update the subtitle of titles displayed to the player * @@ -106,7 +106,7 @@ index 62fe51ab1..f14bdd22f 100644 * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated -@@ -515,6 +516,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -536,6 +537,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Update the subtitle of titles displayed to the player * @@ -114,7 +114,7 @@ index 62fe51ab1..f14bdd22f 100644 * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated -@@ -523,6 +525,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -544,6 +546,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Show the given title to the player, along with the last subtitle set, using the last set times * @@ -122,7 +122,7 @@ index 62fe51ab1..f14bdd22f 100644 * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated -@@ -531,6 +534,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -552,6 +555,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Show the given title to the player, along with the last subtitle set, using the last set times * @@ -130,7 +130,7 @@ index 62fe51ab1..f14bdd22f 100644 * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated -@@ -1431,6 +1435,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1452,6 +1456,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -138,7 +138,7 @@ index 62fe51ab1..f14bdd22f 100644 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); -@@ -1447,6 +1452,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1468,6 +1473,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param count the number of particles * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -146,7 +146,7 @@ index 62fe51ab1..f14bdd22f 100644 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); -@@ -1497,6 +1503,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1518,6 +1524,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -154,7 +154,7 @@ index 62fe51ab1..f14bdd22f 100644 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -1517,6 +1524,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1538,6 +1545,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetZ the maximum random offset on the Z axis * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -162,7 +162,7 @@ index 62fe51ab1..f14bdd22f 100644 */ public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); -@@ -1573,6 +1581,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1594,6 +1602,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -170,7 +170,7 @@ index 62fe51ab1..f14bdd22f 100644 */ public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); -@@ -1595,6 +1604,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1616,6 +1625,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * particle used (normally speed) * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} @@ -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 @@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable { @@ -192,5 +192,5 @@ index 1b2267f4e..1a58734d9 100644 return to; } -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch index 2659734d2..da92df337 100644 --- a/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -1,4 +1,4 @@ -From a18dfecbab6995fd71c294c4590871c1957b47e7 Mon Sep 17 00:00:00 2001 +From 69b0848c5c15e72438a938b8eb0c823b21f27129 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 16:33:12 +0200 Subject: [PATCH] Allow plugins to use SLF4J for logging @@ -14,10 +14,10 @@ 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 -@@ -110,6 +110,13 @@ +@@ -109,6 +109,13 @@ 17.0.0 provided
@@ -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 @@ -166,6 +166,13 @@ public interface Plugin extends TabExecutor { @@ -50,5 +50,5 @@ index febfec6ef..79890c68f 100644 * Returns the name of the plugin. *

-- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch index f45754f8c..f2f1ee78d 100644 --- a/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch @@ -1,4 +1,4 @@ -From 0157da796b632f929ed5fd607bbc657acf9fa8c1 Mon Sep 17 00:00:00 2001 +From a83294fb7e0bf05bb21e385dbf2812a3cfbf66ed Mon Sep 17 00:00:00 2001 From: Minecrell Date: Tue, 10 Oct 2017 18:44:42 +0200 Subject: [PATCH] Expose client protocol version and virtual host @@ -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 +1,41 @@ @@ -57,10 +57,10 @@ 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 -@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable; +@@ -33,7 +33,7 @@ import org.jetbrains.annotations.Nullable; /** * Represents a player, connected or not */ @@ -70,5 +70,5 @@ index f14bdd22f..f0aee351d 100644 /** * Gets the "friendly" name to display of this player. This may include -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch b/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch index 549044142..75bd9b4e4 100644 --- a/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch @@ -1,4 +1,4 @@ -From cbc98ebf7be85c560a382ee4d48cc3f578c2ff2f Mon Sep 17 00:00:00 2001 +From bd2a47a6ee4f1377158cdae2ce956b246ffaa488 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Dec 2017 17:38:07 -0500 Subject: [PATCH] Ability to apply mending to XP API @@ -10,10 +10,10 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 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 -@@ -948,12 +948,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -969,12 +969,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void resetPlayerWeather(); @@ -49,5 +49,5 @@ index f0aee351d..1e7bbd0e6 100644 /** * Gives the player the amount of experience levels specified. Levels can -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch b/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch index 8549d251a..0bf6cc162 100644 --- a/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From a204b6caee96110b7145497447e67b5c784b5f78 Mon Sep 17 00:00:00 2001 +From 1ffa1cfeb3a4e5911ce0d90cc9577ccd3b3f0de7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 12:28:55 -0400 Subject: [PATCH] Player.setPlayerProfile API @@ -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 @@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -15,9 +15,9 @@ 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; -@@ -1761,6 +1762,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1782,6 +1783,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} */ boolean hasResourcePack(); @@ -39,5 +39,5 @@ index 1e7bbd0e6..759d42109 100644 // Spigot start -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch b/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch index bd565eaa6..145cb11a7 100644 --- a/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch +++ b/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch @@ -1,4 +1,4 @@ -From 8aa7d64d1bca98c94d8170b50a4784b1d0c04b7f Mon Sep 17 00:00:00 2001 +From 17206f185f229b2098e02d880e53d1b5b4c50519 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Apr 2018 10:28:50 -0400 Subject: [PATCH] Add Ban Methods to Player Objects @@ -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 @@ -44,6 +44,61 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio @@ -74,26 +74,25 @@ 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 -@@ -1,10 +1,15 @@ +@@ -1,10 +1,14 @@ 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; -@@ -426,6 +431,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -447,6 +451,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start @@ -257,5 +256,5 @@ index 759d42109..203200ec5 100644 /** * Sends an Action Bar message to the client. -- -2.21.0 +2.22.0 diff --git a/Spigot-API-Patches/0147-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-API-Patches/0147-Expose-attack-cooldown-methods-for-Player.patch index df4faa8c0..7281f73ce 100644 --- a/Spigot-API-Patches/0147-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-API-Patches/0147-Expose-attack-cooldown-methods-for-Player.patch @@ -1,14 +1,14 @@ -From c1ece27602e0a141cd5c04e2adb8cbcd6d745f23 Mon Sep 17 00:00:00 2001 +From 69961ff56b5517f3eba960e3d0d2188d8e852338 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 4 Sep 2018 15:01:54 -0500 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 -@@ -1937,6 +1937,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1957,6 +1957,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param profile The new profile to use */ void setPlayerProfile(@NotNull PlayerProfile profile); @@ -36,5 +36,5 @@ index 203200ec5..39a7440ed 100644 // Spigot start -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index 7ec67bae6..df93f2579 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 0322a4d21697e22ea9eced8612906383ff319804 Mon Sep 17 00:00:00 2001 +From 08c853033acfa5e344cbc2b46ed4235af0f118a7 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:40:33 -0600 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 4a2d58d574..251fa0bc36 100644 +index 1dd649086b..e8134bf0eb 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,14 @@ @@ -16,7 +16,7 @@ index 4a2d58d574..251fa0bc36 100644 - spigot + 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 @@ -22,16 +21,16 @@ @@ -159,5 +159,5 @@ index 93046379d0..674096cab1 100644 if (stream != null) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 3cc47a34d..a1b555bc3 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -1,4 +1,4 @@ -From 7dd5454207eb940eb686d9179232938bfff3223b Mon Sep 17 00:00:00 2001 +From 2d1aec7e30853380405652873ea3b306ef965af3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 19:36:20 -0400 Subject: [PATCH] MC Dev fixes @@ -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 @@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -109,10 +109,10 @@ 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 -@@ -79,7 +79,7 @@ public abstract class ChunkMapDistance { +@@ -61,7 +61,7 @@ public abstract class ChunkMapDistance { while (objectiterator.hasNext()) { Entry>> entry = (Entry) objectiterator.next(); @@ -120,36 +120,36 @@ 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); -@@ -143,7 +143,7 @@ public abstract class ChunkMapDistance { + this.e.b(entry.getLongKey(), this.a((ObjectSortedSet) entry.getValue()), false); +@@ -124,7 +124,7 @@ 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)); }); }); -@@ -367,7 +367,7 @@ public abstract class ChunkMapDistance { +@@ -333,7 +333,7 @@ public abstract class ChunkMapDistance { 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); -@@ -376,7 +376,7 @@ public abstract class ChunkMapDistance { + ChunkMapDistance.this.l.add(i); +@@ -342,7 +342,7 @@ 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 @@ -148,6 +148,6 @@ 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 -@@ -97,7 +97,7 @@ 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 +@@ -58,7 +58,7 @@ 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 @@ -25,7 +25,7 @@ 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 -@@ -17,7 +17,7 @@ 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)); -@@ -133,7 +133,7 @@ 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,10 +243,10 @@ 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 -@@ -265,12 +265,12 @@ public class IBlockData extends BlockDataAbstract implements +@@ -269,12 +269,12 @@ public class IBlockData extends BlockDataAbstract implements public static Dynamic a(DynamicOps dynamicops, IBlockData iblockdata) { ImmutableMap, Comparable> immutablemap = iblockdata.getStateMap(); @@ -283,34 +261,40 @@ index e8ae4b5e44..0f4aa698aa 100644 return Pair.of(dynamicops.createString(((IBlockState) entry.getKey()).a()), dynamicops.createString(IBlockDataHolder.b((IBlockState) entry.getKey(), (Comparable) entry.getValue()))); }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond))))); } -@@ -329,9 +329,9 @@ public class IBlockData extends BlockDataAbstract implements +@@ -332,9 +332,9 @@ public class IBlockData extends BlockDataAbstract implements if (!iblockdata.o()) { this.f = null; } else { - this.f = new VoxelShape[IBlockData.a.a.length]; + this.f = new VoxelShape[a.length]; // Paper - decompile fix - voxelshape = 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) { -@@ -342,8 +342,9 @@ 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 -@@ -147,17 +147,17 @@ public interface IEntityAccess { +@@ -39,7 +39,7 @@ public interface IEntityAccess { + return Stream.empty(); + } else { + AxisAlignedBB axisalignedbb1 = axisalignedbb.g(1.0E-7D); +- Stream stream = this.getEntities(entity, axisalignedbb1).stream().filter((entity1) -> { ++ Stream stream = this.getEntities(entity, axisalignedbb1).stream().filter((entity1) -> { // Paper - decompile fix + return !set.contains(entity1); + }).filter((entity1) -> { + return entity == null || !entity.x(entity1); +@@ -47,7 +47,6 @@ 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); + } + } +@@ -149,17 +148,17 @@ public interface IEntityAccess { @Nullable default T a(Class oclass, PathfinderTargetCondition pathfindertargetcondition, @Nullable EntityLiving entityliving, double d0, double d1, double d2, AxisAlignedBB axisalignedbb) { @@ -331,7 +315,7 @@ index bf7e0d17ef..ee22bb0387 100644 if (pathfindertargetcondition.a(entityliving, t1)) { double d4 = t1.e(d0, d1, d2); -@@ -190,10 +190,10 @@ public interface IEntityAccess { +@@ -192,10 +191,10 @@ public interface IEntityAccess { default List a(Class oclass, PathfinderTargetCondition pathfindertargetcondition, EntityLiving entityliving, AxisAlignedBB axisalignedbb) { List list = this.a(oclass, axisalignedbb, (Predicate) null); List list1 = Lists.newArrayList(); @@ -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 @@ -45,8 +45,8 @@ public class SystemUtils { @@ -454,7 +438,7 @@ index 41a5d1dc29..b3799ab564 100644 } public static String a(String s, @Nullable MinecraftKey minecraftkey) { -@@ -154,8 +154,8 @@ public class SystemUtils { +@@ -158,8 +158,8 @@ public class SystemUtils { public static T b(Iterable iterable, @Nullable T t0) { Iterator iterator = iterable.iterator(); @@ -465,7 +449,7 @@ index 41a5d1dc29..b3799ab564 100644 for (object1 = null; iterator.hasNext(); object1 = object) { object = iterator.next(); -@@ -180,7 +180,7 @@ public class SystemUtils { +@@ -184,7 +184,7 @@ public class SystemUtils { } public static Strategy i() { @@ -474,7 +458,7 @@ index 41a5d1dc29..b3799ab564 100644 } public static CompletableFuture> b(List> list) { -@@ -191,7 +191,7 @@ public class SystemUtils { +@@ -195,7 +195,7 @@ public class SystemUtils { list.forEach((completablefuture1) -> { int i = list1.size(); @@ -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 @@ -37,7 +37,7 @@ public class WorldPersistentData { @@ -529,15 +513,24 @@ index b251a1d7d9..3c5b3fe101 100644 this.a(t1); return t1; -@@ -64,7 +64,7 @@ public class WorldPersistentData { - } - } +@@ -46,7 +46,7 @@ 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); +@@ -62,7 +62,7 @@ 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")); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 69a6ff73d..5e38f52fa 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,4 +1,4 @@ -From 1b856bff3ec4ae600d4f5f9339e68b2644a6da7f Mon Sep 17 00:00:00 2001 +From 7c5ce6c9fd1f84aad2ca77e5834685659027f8e1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils @@ -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 @@ -120,6 +120,7 @@ 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 @@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger; @@ -182,10 +182,10 @@ 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 -@@ -66,6 +66,58 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -64,6 +64,58 @@ public class ChunkProviderServer extends IChunkProvider { return this.playerChunkMap.c(); } @@ -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 @@ -6,6 +6,8 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -329,10 +329,10 @@ 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 -@@ -143,6 +143,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -144,6 +144,7 @@ public abstract class EntityInsentient extends EntityLiving { return this.goalTarget; } @@ -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 @@ -126,6 +126,7 @@ public abstract class EntityLiving extends Entity { @@ -353,10 +353,10 @@ 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 -@@ -4,6 +4,7 @@ import java.util.function.Predicate; +@@ -5,6 +5,7 @@ import java.util.function.Predicate; public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -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 @@ -5,6 +5,7 @@ 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 @@ -39,6 +39,7 @@ 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 @@ -37,10 +37,19 @@ 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 @@ -63,6 +63,14 @@ 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 @@ -67,9 +67,9 @@ 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 @@ -58,7 +58,7 @@ 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 @@ -210,6 +210,40 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -1181,5 +1181,5 @@ index 755f7f2649..cd910f3dcb 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch index 470b0cc3a..e30e86fbe 100644 --- a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch @@ -1,4 +1,4 @@ -From 67f4795e1c1691f3616728b83f6b3ee4d3c82704 Mon Sep 17 00:00:00 2001 +From 9288b14bdaf7935ff4fbfbdea3642072a8d737fa Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 01:40:13 -0400 Subject: [PATCH] Add MinecraftKey Information to Objects @@ -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 @@ -175,7 +175,7 @@ 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 @@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; @@ -31,7 +31,7 @@ index 45e2ce618a..7af4771681 100644 // CraftBukkit start private static final int CURRENT_LEVEL = 2; -@@ -1682,12 +1682,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1731,12 +1731,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return true; } @@ -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 @@ -238,6 +238,7 @@ 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 @@ -11,7 +11,7 @@ import org.bukkit.inventory.InventoryHolder; @@ -141,5 +141,5 @@ index fa6ec71061..4ccdd7583e 100644 public World getWorld() { return this.world; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index 52e350149..df378ab5c 100644 --- a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -1,4 +1,4 @@ -From 83b848b12d968842683048230efc851c676064af Mon Sep 17 00:00:00 2001 +From f6c6445c4fbbe78e58f0cdfb01cf9be18e04ce00 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 02:10:36 -0400 Subject: [PATCH] Store reference to current Chunk for Entity and Block @@ -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 @@ -29,7 +29,7 @@ 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 @@ -133,7 +133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -102,7 +102,7 @@ index 7af4771681..708f6c97c6 100644 public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER -@@ -1683,6 +1683,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1732,6 +1732,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start @@ -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 @@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -188,5 +188,5 @@ index f22959ee15..a98f6f3389 100644 /** * Order is *EXTREMELY* important -- keep it right! =D -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index fe7f5b90d..a0e3c0152 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 5a761ebfc0d56a6e7dedfb85960bbc03ed3aa68d Mon Sep 17 00:00:00 2001 +From 76dcdc64de5d833b1e1af35a33a9351fb39ddb68 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -302,7 +302,7 @@ index 5518ec1e54..0c65afccfd 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index b2e5bcf57c..78b0e78474 100644 +index ee9a571bf2..4b9e51b30f 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -31,6 +31,15 @@ public class Block implements IMaterial { @@ -322,7 +322,7 @@ index b2e5bcf57c..78b0e78474 100644 private final float frictionFactor; protected final BlockStateList 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 @@ -573,6 +573,7 @@ public class Chunk implements IChunkAccess { @@ -342,10 +342,10 @@ 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 -@@ -297,7 +297,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -301,7 +301,9 @@ public class ChunkProviderServer extends IChunkProvider { public void save(boolean flag) { this.tickDistanceManager(); @@ -366,8 +366,8 @@ index 24222fa1f8..bef6618d8f 100644 + this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper } } - } -@@ -433,9 +435,7 @@ public class ChunkProviderServer extends IChunkProvider { + }); +@@ -432,9 +434,7 @@ 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 @@ -1,5 +1,6 @@ @@ -388,7 +388,7 @@ index 2e09900f45..1ebb16f0f6 100644 import com.google.common.collect.Maps; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongSet; -@@ -406,7 +407,7 @@ public class ChunkRegionLoader { +@@ -407,7 +408,7 @@ public class ChunkRegionLoader { private static void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) { NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10); World world = chunk.getWorld(); @@ -397,7 +397,7 @@ index 2e09900f45..1ebb16f0f6 100644 for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i); -@@ -418,8 +419,6 @@ public class ChunkRegionLoader { +@@ -419,8 +420,6 @@ public class ChunkRegionLoader { chunk.d(true); } @@ -406,7 +406,7 @@ index 2e09900f45..1ebb16f0f6 100644 NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10); for (int j = 0; j < nbttaglist1.size(); ++j) { -@@ -436,7 +435,7 @@ public class ChunkRegionLoader { +@@ -437,7 +436,7 @@ public class ChunkRegionLoader { } } } @@ -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 @@ -13,12 +13,22 @@ 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 @@ -101,7 +101,7 @@ public class CustomFunctionData implements IResourcePackListener { @@ -456,10 +456,19 @@ 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 -@@ -31,7 +31,7 @@ import org.apache.logging.log4j.Level; +@@ -19,6 +19,8 @@ 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; +@@ -31,7 +33,7 @@ import org.apache.logging.log4j.Level; import org.bukkit.command.CommandSender; import org.bukkit.craftbukkit.LoggerOutputStream; @@ -468,7 +477,7 @@ index b60956218d..19e2df3098 100644 import org.bukkit.event.server.ServerCommandEvent; import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; -@@ -428,7 +428,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -428,7 +430,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } public void handleCommandQueue() { @@ -477,7 +486,7 @@ index b60956218d..19e2df3098 100644 while (!this.serverCommandQueue.isEmpty()) { ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0); -@@ -443,7 +443,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -443,7 +445,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer // CraftBukkit end } @@ -486,30 +495,56 @@ index b60956218d..19e2df3098 100644 } @Override -@@ -681,7 +681,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - return remoteControlCommandListener.getMessages(); +@@ -664,6 +666,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + + @Override + public String executeRemoteCommand(String s) { ++ Waitable[] waitableArray = new Waitable[1]; + this.remoteControlCommandListener.clearMessages(); + this.executeSync(() -> { + // CraftBukkit start - fire RemoteServerCommandEvent +@@ -672,10 +675,39 @@ 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 @@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; @@ -531,7 +566,7 @@ index 708f6c97c6..c348d6bec3 100644 // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -487,7 +488,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -495,7 +496,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public void move(EnumMoveType enummovetype, Vec3D vec3d) { @@ -539,7 +574,7 @@ index 708f6c97c6..c348d6bec3 100644 if (this.noclip) { this.a(this.getBoundingBox().b(vec3d)); this.recalcPosition(); -@@ -652,7 +652,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -660,7 +660,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.getMethodProfiler().exit(); } @@ -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 @@ -35,7 +35,7 @@ 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(); @@ -2289,9 +2288,7 @@ public abstract class EntityLiving extends Entity { } @@ -624,28 +659,19 @@ 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 -@@ -1,5 +1,7 @@ - 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; -@@ -54,8 +56,8 @@ import org.bukkit.craftbukkit.CraftServer; +@@ -54,7 +54,7 @@ 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 { - -@@ -671,6 +673,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -677,7 +703,7 @@ index 64318e6e78..c76620f2b3 100644 } this.methodProfiler.enter("snooper"); -@@ -999,29 +1000,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { @@ -773,7 +801,7 @@ index 3d2436365f..db159baab2 100644 try { CompletableFuture> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> { return this.c(playerchunk); -@@ -965,6 +967,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -967,6 +969,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunkMap.EntityTracker playerchunkmap_entitytracker; ObjectIterator objectiterator; @@ -781,7 +809,7 @@ index 3d2436365f..db159baab2 100644 for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) { playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); -@@ -982,13 +985,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -984,13 +987,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { playerchunkmap_entitytracker.e = sectionposition1; } } @@ -799,7 +827,7 @@ index 3d2436365f..db159baab2 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ae194b981f..d20037bd00 100644 +index d40600c103..fa37c19c69 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -880,7 +908,7 @@ index cb6d50ea70..9ba03f8ed0 100644 throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 017db63a4c..fc3422cca3 100644 +index ee22d6c81a..fb6b48e3fe 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -954,7 +982,7 @@ index 061730c560..c5890f5dcc 100644 this.g.clear(); } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 382498d193..a833781e59 100644 +index e8a90e01f5..0956eff603 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; @@ -973,7 +1001,7 @@ index 382498d193..a833781e59 100644 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a2b1aba49f..2a0a7f2480 100644 +index 32981c4422..0e09adf7dc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,7 @@ @@ -1040,7 +1068,7 @@ index a2b1aba49f..2a0a7f2480 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 508cdc6a0c..089468835b 100644 +index 95eb36d15c..09560368fd 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1,5 +1,7 @@ @@ -1132,7 +1160,7 @@ index 508cdc6a0c..089468835b 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4413066eea..834c16172b 100644 +index 61ed2ff50a..75b7d3cca8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1926,12 +1926,31 @@ public final class CraftServer implements Server { @@ -1340,10 +1368,10 @@ index 38f211526b..0000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c94a41d029..037b0bc685 100644 +index 00aecdc472..c6daf693c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1740,6 +1740,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1749,6 +1749,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } @@ -1522,7 +1550,7 @@ index e52ef47b78..3d90b34268 100644 this.value = value; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index c88704f69e..f7fdd0727b 100644 +index 7ae4e7288b..fa32d4bb7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -271,6 +271,13 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -1601,5 +1629,5 @@ index 4c947a9352..106e9d7e2d 100644 } } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch index 05b7aa9ad..563da38fe 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump.patch @@ -1,4 +1,4 @@ -From 49d72c58219676d02bbbea2a263cbd0fb9719d44 Mon Sep 17 00:00:00 2001 +From 5b97ebeb6ed39563881aebabe1c14a2061b568dc Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:24:16 -0600 Subject: [PATCH] Allow nerfed mobs to jump @@ -31,10 +31,10 @@ index 2e869004c8..8a6856e0fd 100644 this.b.setJumping(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index ec1da887c6..679dda76e4 100644 +index 6d7b313aeb..3a96f70d89 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -31,6 +31,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving { private final EntityAIBodyControl c; protected NavigationAbstract navigation; public PathfinderGoalSelector goalSelector; @@ -42,7 +42,7 @@ index ec1da887c6..679dda76e4 100644 public PathfinderGoalSelector targetSelector; private EntityLiving goalTarget; private final EntitySenses bz; -@@ -636,6 +637,12 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -637,6 +638,12 @@ public abstract class EntityInsentient extends EntityLiving { // Spigot Start if ( this.fromMobSpawner ) { @@ -56,7 +56,7 @@ index ec1da887c6..679dda76e4 100644 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -index 040a64471f..a10532b0f8 100644 +index 71b399c65c..2e23b5de59 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java @@ -8,10 +8,12 @@ public class PathfinderGoalFloat extends PathfinderGoal { @@ -73,7 +73,7 @@ index 040a64471f..a10532b0f8 100644 public boolean a() { double d0 = (double) this.a.getHeadHeight() < 0.4D ? 0.2D : 0.4D; @@ -19,6 +21,7 @@ public class PathfinderGoalFloat extends PathfinderGoal { - return this.a.isInWater() && this.a.ce() > d0 || this.a.aC(); + return this.a.isInWater() && this.a.cf() > d0 || this.a.aD(); } + public void update() { this.e(); } // Paper - OBFHELPER @@ -81,5 +81,5 @@ index 040a64471f..a10532b0f8 100644 public void e() { if (this.a.getRandom().nextFloat() < 0.8F) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch index 98c08cd8a..3dc9ad69b 100644 --- a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch @@ -1,4 +1,4 @@ -From 25f87007f232a25b78220f21213e7bd43fa13920 Mon Sep 17 00:00:00 2001 +From 3518f124123b64cdd39895cc24b2abd9dfe98be3 Mon Sep 17 00:00:00 2001 From: Suddenly Date: Tue, 1 Mar 2016 13:51:54 -0600 Subject: [PATCH] Add configurable despawn distances for living entities @@ -30,10 +30,10 @@ 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 -@@ -612,11 +612,11 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -613,11 +613,11 @@ public abstract class EntityInsentient extends EntityLiving { if (entityhuman != null) { double d0 = entityhuman.h(this); @@ -48,5 +48,5 @@ index 679dda76e4..d020414f98 100644 } else if (d0 < 1024.0D) { this.ticksFarFromPlayer = 0; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 32895bf62..81237ba97 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -1,4 +1,4 @@ -From 72c9924c43d2d39544698b14e6332ce719556754 Mon Sep 17 00:00:00 2001 +From 124f2ebcda485739ff4e7772dc5dfc8bdb680d42 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 14:14:15 -0600 Subject: [PATCH] Drop falling block and tnt entities at the specified height @@ -24,10 +24,10 @@ index 3f734327c0..1ed58f4bba 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c348d6bec3..f5647a171d 100644 +index 49f64e1507..187374666b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1788,6 +1788,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1837,6 +1837,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(itemstack, 0.0F); } @@ -36,7 +36,7 @@ index c348d6bec3..f5647a171d 100644 public EntityItem a(ItemStack itemstack, float f) { if (itemstack.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index c9c903367f..fee5e67877 100644 +index 7b7048090d..7fb0c0e068 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -88,6 +88,16 @@ public class EntityFallingBlock extends Entity { @@ -46,7 +46,7 @@ index c9c903367f..fee5e67877 100644 + + // Paper start - Configurable EntityFallingBlock height nerf + if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > 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 @@ -57,6 +57,11 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 401a0059c..5c5fc8082 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,4 +1,4 @@ -From 381d17f1aafb8da42668e4afd391b97e50ab645c Mon Sep 17 00:00:00 2001 +From a764546cf091e3868032edb7d31b436787669e29 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -19,10 +19,10 @@ index 3f35a28ba1..cf00f35a5b 100644 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c76620f2b3..2fc8c192b3 100644 +index 73b1041c8c..5e0f28b3fe 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1287,7 +1287,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 1 Mar 2018 19:37:52 -0600 Subject: [PATCH] Add version history to version command @@ -192,10 +192,10 @@ 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 -@@ -160,6 +160,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -162,6 +162,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer return false; } com.destroystokyo.paper.PaperConfig.registerCommands(); @@ -204,5 +204,5 @@ index 19e2df3098..f0e2250cd8 100644 this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch index 1d13e93ab..0359788d3 100644 --- a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch @@ -1,11 +1,11 @@ -From 02a1ec99a67ce0478e09e67f050ae89309517b33 Mon Sep 17 00:00:00 2001 +From fe2a4b3a0eb87faf8512700171147012ded647c5 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 1 Mar 2016 14:47:52 -0600 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 @@ -70,6 +70,9 @@ public abstract class EntityHuman extends EntityLiving { @@ -19,10 +19,10 @@ 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 -@@ -609,7 +609,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -610,7 +610,7 @@ public abstract class EntityInsentient extends EntityLiving { if (!this.isPersistent() && !this.I()) { EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D); @@ -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 -@@ -106,7 +106,7 @@ public class EntitySilverfish extends EntityMonster { - if (super.a(generatoraccess, enummobspawn)) { - EntityHuman entityhuman = this.world.a(EntitySilverfish.b, (EntityLiving) this); +@@ -100,7 +100,7 @@ public class EntitySilverfish extends EntityMonster { + 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,10 +45,10 @@ 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 -@@ -1642,7 +1642,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1651,7 +1651,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return getHandle().locale; @@ -69,5 +69,5 @@ index 037b0bc685..76728b1785 100644 @Override public void updateCommands() { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index 274930f4e..e4c875bea 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -1,4 +1,4 @@ -From 4112a8f586cfe8127c6637b52b8b2132498ffa42 Mon Sep 17 00:00:00 2001 +From c04a10fa0cfb08d11e768bdf75a7a329c5de7601 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:09:29 -0600 Subject: [PATCH] Further improve server tick loop @@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 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 -@@ -150,7 +150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public File bukkitDataPackFolder; -@@ -160,7 +160,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch index a1ae86375..27c9292eb 100644 --- a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch @@ -1,14 +1,14 @@ -From e86917c2c413b8457b81acd9a11bbd8fd704e08a Mon Sep 17 00:00:00 2001 +From 24913c949ff63f25778ed470bb31cc3c5c67180b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:12:03 -0600 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 -@@ -1331,12 +1331,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1340,12 +1340,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { @@ -24,5 +24,5 @@ index 76728b1785..e180655989 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0025-Entity-Origin-API.patch index 64742aea1..91817ceba 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0025-Entity-Origin-API.patch @@ -1,11 +1,11 @@ -From fcf34927ee0a09db8755a8bff558a72be6a2d624 Mon Sep 17 00:00:00 2001 +From 05d8b8cd1f57968af4eb878382bbd42dc5cd3087 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 23:45:08 -0600 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 @@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -16,7 +16,7 @@ index f5647a171d..205376f6af 100644 // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -1546,6 +1547,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1595,6 +1596,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.bukkitEntity.storeBukkitValues(nbttagcompound); } // CraftBukkit end @@ -28,7 +28,7 @@ index f5647a171d..205376f6af 100644 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); -@@ -1668,6 +1674,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1717,6 +1723,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.getBukkitEntity().readBukkitValues(nbttagcompound); // CraftBukkit end @@ -42,7 +42,7 @@ index f5647a171d..205376f6af 100644 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1745,6 +1758,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1794,6 +1807,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected abstract void b(NBTTagCompound nbttagcompound); @@ -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 @@ -253,6 +253,14 @@ 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 @@ -104,6 +104,14 @@ public class EntityTNTPrimed extends Entity { @@ -101,10 +101,10 @@ 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 -@@ -1095,6 +1095,11 @@ public class WorldServer extends World { +@@ -1093,6 +1093,11 @@ public class WorldServer extends World { this.I.add(((EntityInsentient) entity).getNavigation()); } entity.valid = true; // CraftBukkit diff --git a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch index f17a0b383..d6d1275c8 100644 --- a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch @@ -1,4 +1,4 @@ -From c3ea72d0ce6cbf68d57705e3b527a724c52a8f05 Mon Sep 17 00:00:00 2001 +From 07d9bf17efeb0de32a8d0d7ab72d6c139d1d51e8 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:58:50 -0600 Subject: [PATCH] Configurable top of nether void damage @@ -29,7 +29,7 @@ index 1ed58f4bba..a797a57671 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 205376f6af..8165655c31 100644 +index 0bfa78bd22..32ed5ac429 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -397,9 +397,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -40,7 +40,7 @@ index 205376f6af..8165655c31 100644 + // Extracted to own function + /* if (this.locY < -64.0D) { - this.ae(); + this.af(); } + */ + this.performVoidDamage(); @@ -66,16 +66,16 @@ index 205376f6af..8165655c31 100644 protected void E() { if (this.portalCooldown > 0) { --this.portalCooldown; -@@ -476,6 +493,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -484,6 +501,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fireTicks = 0; } -+ protected final void doVoidDamage() { this.ae(); } // Paper - OBFHELPER - protected void ae() { ++ protected final void doVoidDamage() { this.af(); } // Paper - OBFHELPER + protected void af() { this.die(); } diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index 9dcf8d7142..2a2105cbce 100644 +index ff5d128176..e1a684b370 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -182,9 +182,15 @@ public abstract class EntityMinecartAbstract extends Entity { @@ -86,7 +86,7 @@ index 9dcf8d7142..2a2105cbce 100644 + // Extracted to own function + /* if (this.locY < -64.0D) { - this.ae(); + this.af(); } + */ + this.performVoidDamage(); @@ -95,5 +95,5 @@ index 9dcf8d7142..2a2105cbce 100644 // this.doPortalTick(); // CraftBukkit - handled in postTick if (this.world.isClientSide) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0030-Configurable-end-credits.patch b/Spigot-Server-Patches/0030-Configurable-end-credits.patch index f328b3099..138aa3d76 100644 --- a/Spigot-Server-Patches/0030-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0030-Configurable-end-credits.patch @@ -1,4 +1,4 @@ -From 08f004e8c862bfb241bd86d5b5877b6416cd3eda Mon Sep 17 00:00:00 2001 +From 7cfb4c83487da77cd975787dbdb2a5bac003b3d1 Mon Sep 17 00:00:00 2001 From: DoctorDark Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits @@ -20,7 +20,7 @@ index a797a57671..c2b9690a0c 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f7cf02f588..e60ead5ecb 100644 +index 90bcb01e3a..b907600db9 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -32,7 +32,7 @@ index f7cf02f588..e60ead5ecb 100644 private final RecipeBookServer recipeBook; private Vec3D cr; private int cs; -@@ -704,6 +704,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -706,6 +706,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.getWorldServer().removePlayer(this); if (!this.viewingCredits) { this.viewingCredits = true; diff --git a/Spigot-Server-Patches/0032-Optimize-explosions.patch b/Spigot-Server-Patches/0032-Optimize-explosions.patch index df8d072af..4e70f1af0 100644 --- a/Spigot-Server-Patches/0032-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0032-Optimize-explosions.patch @@ -1,4 +1,4 @@ -From fcb8f0562a2ea393e6b63cc5a86e9ca0d16857ca Mon Sep 17 00:00:00 2001 +From d36da1b37c9f54484374dc44f57812a19bc59b86 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 11:59:48 -0600 Subject: [PATCH] Optimize explosions @@ -25,7 +25,7 @@ index c2b9690a0c..a5ec0bc0e0 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index e1c628f177..bcff117619 100644 +index 7c1305164d..594e7bd94c 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -172,7 +172,7 @@ public class Explosion { @@ -123,10 +123,10 @@ index e1c628f177..bcff117619 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cf7a75b2e2..454e28fc47 100644 +index 0a6a8c372d..52c0d52046 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1131,6 +1131,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 2 Mar 2016 23:13:07 -0600 Subject: [PATCH] Send absolute position the first time an entity is seen diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 315c3d9165..aaf3a54b08 100644 +index cf0e1a6a0c..f04a9d18c4 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -77,10 +77,10 @@ index 315c3d9165..aaf3a54b08 100644 this.c(); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index db159baab2..d9d253ea09 100644 +index ef31a269e4..07a1796c77 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1083,10 +1083,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1085,10 +1085,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final Entity tracker; private final int trackingDistance; private SectionPosition e; @@ -97,7 +97,7 @@ index db159baab2..d9d253ea09 100644 this.tracker = entity; this.trackingDistance = i; this.e = SectionPosition.a(entity); -@@ -1168,7 +1172,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1170,7 +1174,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); // CraftBukkit end @@ -107,5 +107,5 @@ index db159baab2..d9d253ea09 100644 } } else if (this.trackedPlayers.remove(entityplayer)) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch index 895fd8886..e11d5eff3 100644 --- a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch @@ -1,4 +1,4 @@ -From 1e6542580ad5efd8f40f15718f4600ea12491bd8 Mon Sep 17 00:00:00 2001 +From 91280bfceb4e92ed99055b27ca39f2493c82b7bd Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 23:34:44 -0600 Subject: [PATCH] Configurable container update tick rate @@ -19,7 +19,7 @@ index e4e00e2e1c..d663b15ceb 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 1dba939967..4603165280 100644 +index b907600db9..462c666735 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -72,6 +72,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -30,7 +30,7 @@ index 1dba939967..4603165280 100644 // CraftBukkit start public String displayName; -@@ -349,7 +350,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -351,7 +352,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { --this.noDamageTicks; } @@ -45,5 +45,5 @@ index 1dba939967..4603165280 100644 this.closeInventory(); this.activeContainer = this.defaultContainer; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch index b90f2afe1..cac0db991 100644 --- a/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -1,4 +1,4 @@ -From 20d1bce64066eaf1ebf9f057a9bd8362f1dea167 Mon Sep 17 00:00:00 2001 +From 0cd703d13d59f0b5200d1aeb1fc39cafeb96f13e Mon Sep 17 00:00:00 2001 From: vemacs Date: Thu, 3 Mar 2016 01:19:22 -0600 Subject: [PATCH] All chunks are slime spawn chunks toggle @@ -19,18 +19,18 @@ 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 -@@ -276,7 +276,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -274,7 +274,7 @@ 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); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0049-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0049-Player-Tab-List-and-Title-APIs.patch index db9a192f5..947382eaf 100644 --- a/Spigot-Server-Patches/0049-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0049-Player-Tab-List-and-Title-APIs.patch @@ -1,4 +1,4 @@ -From 4f9b2c61d849dfea7732bf99b9c53db523c7c357 Mon Sep 17 00:00:00 2001 +From d17dab532a462b6b3b0e9d27c213e61b4df54141 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 02:32:10 -0600 Subject: [PATCH] Player Tab List and Title APIs @@ -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 @@ -1,5 +1,6 @@ @@ -62,7 +62,7 @@ index e180655989..b87971e6dd 100644 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -209,6 +210,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -211,6 +212,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } @@ -160,5 +160,5 @@ index e180655989..b87971e6dd 100644 public String getDisplayName() { return getHandle().displayName; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0054-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0054-Configurable-inter-world-teleportation-safety.patch index 8e7353903..17f2866d0 100644 --- a/Spigot-Server-Patches/0054-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0054-Configurable-inter-world-teleportation-safety.patch @@ -1,4 +1,4 @@ -From ad67102bfd8df77af0ec58a81eccc6e2fcdfd81d Mon Sep 17 00:00:00 2001 +From 68f778350062b11e8bc9c8ed3d28dc510d10f129 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Thu, 3 Mar 2016 02:50:31 -0600 Subject: [PATCH] Configurable inter-world teleportation safety @@ -30,10 +30,10 @@ index 320fd07c62..94f5c90b3c 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b87971e6dd..a338b0f09b 100644 +index 982b06b840..f4b3b7ff0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -746,7 +746,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -755,7 +755,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.playerConnection.teleport(to); } else { @@ -43,5 +43,5 @@ index b87971e6dd..a338b0f09b 100644 return true; } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch index 070243578..49ed7a865 100644 --- a/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From 7e62a116dc2216f57c4523f24f8989162cbe1afe Mon Sep 17 00:00:00 2001 +From 3d3ad0b026a88bc8cb8403058596eeb4d9c482fe Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -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 @@ -1,5 +1,6 @@ @@ -80,10 +80,10 @@ 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 -@@ -16,6 +16,9 @@ import java.util.function.BooleanSupplier; +@@ -14,6 +14,9 @@ import java.util.function.BooleanSupplier; import java.util.function.Function; import java.util.function.Supplier; import javax.annotation.Nullable; @@ -121,10 +121,10 @@ 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 -@@ -646,6 +646,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -644,6 +644,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.world.checkSession(); } catch (ExceptionWorldConflict exceptionworldconflict) { PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict); @@ -132,7 +132,7 @@ index d9d253ea09..e0e11b6f2e 100644 return false; } -@@ -673,6 +674,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -671,6 +672,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return true; } catch (Exception exception) { PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception); @@ -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 @@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager; @@ -187,7 +187,7 @@ index 82f9ad7f0c..f4f842b863 100644 return; } -@@ -208,6 +210,7 @@ public final class SpawnerCreature { +@@ -210,6 +212,7 @@ public final class SpawnerCreature { entity = biomebase_biomemeta.b.a(generatoraccess.getMinecraftWorld()); } catch (Exception exception) { SpawnerCreature.LOGGER.warn("Failed to create mob", exception); @@ -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 @@ -1,5 +1,7 @@ @@ -207,7 +207,7 @@ index beeb9ccb8d..bb3aa4a376 100644 import java.util.Iterator; import javax.annotation.Nullable; -@@ -98,6 +100,7 @@ public class VillageSiege { +@@ -97,6 +99,7 @@ public class VillageSiege { entityzombie.prepare(this.a, this.a.getDamageScaler(new BlockPosition(entityzombie)), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null); } catch (Exception exception) { exception.printStackTrace(); @@ -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 @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -255,10 +255,10 @@ 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 -@@ -113,6 +113,7 @@ public class WorldPersistentData { +@@ -121,6 +121,7 @@ public class WorldPersistentData { nbttagcompound = GameProfileSerializer.a(this.c, DataFixTypes.SAVED_DATA, nbttagcompound1, j, i); } catch (Throwable throwable4) { throwable = throwable4; @@ -313,5 +313,5 @@ index 8823f94f7b..552daf4376 100644 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0057-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0057-Disable-Scoreboards-for-non-players-by-default.patch index 262c81629..8cc4fc783 100644 --- a/Spigot-Server-Patches/0057-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0057-Disable-Scoreboards-for-non-players-by-default.patch @@ -1,4 +1,4 @@ -From 880183aec51a5b5a20c61fb20be1c179c4fb0022 Mon Sep 17 00:00:00 2001 +From dde42087398f92114c7ae967d6caf403e0e0649a Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 8 Mar 2016 23:25:45 -0500 Subject: [PATCH] Disable Scoreboards for non players by default @@ -25,10 +25,10 @@ index 94f5c90b3c..30f0dcfd51 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8165655c31..3d739c4316 100644 +index 32ed5ac429..39ca7d5870 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2213,6 +2213,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2262,6 +2262,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public ScoreboardTeamBase getScoreboardTeam() { @@ -37,7 +37,7 @@ index 8165655c31..3d739c4316 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 061f708aea..d6475338b5 100644 +index 6cb95a6606..0b21c0b8dd 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -582,6 +582,7 @@ public abstract class EntityLiving extends Entity { @@ -49,5 +49,5 @@ index 061f708aea..d6475338b5 100644 if (!flag) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch index 71cdc4145..ef0cab526 100644 --- a/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch @@ -1,11 +1,11 @@ -From b3c61b17f49c297966866352c023fa16ba469bb8 Mon Sep 17 00:00:00 2001 +From 1d52cfde6af6ca1ad7481a70c38ef816cffedd8e Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 4 Apr 2015 23:17:52 -0400 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 @@ -1347,7 +1347,11 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -22,10 +22,10 @@ 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 -@@ -132,6 +132,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -134,6 +134,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double health = 20; private boolean scaledHealth = false; private double healthScale = 20; @@ -36,7 +36,7 @@ index a338b0f09b..8f80582a78 100644 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1746,6 +1750,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1755,6 +1759,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } @@ -70,5 +70,5 @@ index a338b0f09b..8f80582a78 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0068-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0068-Custom-replacement-for-eaten-items.patch index 2d0d6b025..c55d02f22 100644 --- a/Spigot-Server-Patches/0068-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0068-Custom-replacement-for-eaten-items.patch @@ -1,11 +1,11 @@ -From 8986c076e68f65f37e3e8fb065e471d9247f348a Mon Sep 17 00:00:00 2001 +From d5041d93476ed1f9f670c659ded86491a9527d7b Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 21 Jun 2015 15:07:20 -0400 Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d6475338b5..4409588fbb 100644 +index 0b21c0b8dd..645b7f605c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2817,12 +2817,13 @@ public abstract class EntityLiving extends Entity { @@ -35,7 +35,7 @@ index d6475338b5..4409588fbb 100644 + // Paper end this.a(this.getRaisedHand(), itemstack); // CraftBukkit end - this.dp(); + this.dq(); + // Paper start - if the replacement is anything but the default, update the client inventory + if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { + ((EntityPlayer) this).getBukkitEntity().updateInventory(); @@ -45,5 +45,5 @@ index d6475338b5..4409588fbb 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0069-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0069-handle-NaN-health-absorb-values-and-repair-bad-data.patch index c4e80cde1..722e43ad6 100644 --- a/Spigot-Server-Patches/0069-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0069-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -1,11 +1,11 @@ -From 25b39b5bf37a6abe1b22dd67b3cfb72ea427c597 Mon Sep 17 00:00:00 2001 +From 981ffa42e50a7095946db729a10e3245920bc903 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 27 Sep 2015 01:18:02 -0400 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 @@ -543,7 +543,13 @@ public abstract class EntityLiving extends Entity { @@ -44,10 +44,10 @@ 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 -@@ -1565,6 +1565,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1574,6 +1574,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { @@ -56,5 +56,5 @@ index 8f80582a78..34ae747004 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0072-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0072-Configurable-spawn-chances-for-skeleton-horses.patch index 149ea8d0f..766a21d78 100644 --- a/Spigot-Server-Patches/0072-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0072-Configurable-spawn-chances-for-skeleton-horses.patch @@ -1,4 +1,4 @@ -From e65746258a6e9c85f67eac3c8d98a3601d8adf00 Mon Sep 17 00:00:00 2001 +From 246374c9fd3be8f68807b6de904eb12e31ad53ee Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 22 Mar 2016 12:04:28 -0500 Subject: [PATCH] Configurable spawn chances for skeleton horses @@ -22,18 +22,18 @@ index 98049567f4..2a71381dae 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7b78946ece..6328558975 100644 +index 2ed2cb8935..cefe8340d4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -388,7 +388,7 @@ public class WorldServer extends World { blockposition = this.a(this.a(j, 0, k, 15)); if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); -- boolean flag1 = this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.01D; -+ boolean flag1 = this.getGameRules().getBoolean("doMobSpawning") && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper; +- boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * 0.01D; ++ boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper if (flag1) { EntityHorseSkeleton entityhorseskeleton = (EntityHorseSkeleton) EntityTypes.SKELETON_HORSE.a((World) this); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 278799c96..1d15d036b 100644 --- a/Spigot-Server-Patches/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -1,4 +1,4 @@ -From b59fad98a704c3befb5105a84f13bea0dc72fcf1 Mon Sep 17 00:00:00 2001 +From e3ab9802cf0972e1795420e3ca058095e95b082e Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 19:55:45 -0400 Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener @@ -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 @@ -55,7 +55,7 @@ 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 -@@ -1096,6 +1096,7 @@ 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 @@ -440,7 +440,7 @@ 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 @@ -68,6 +68,7 @@ public class WorldServer extends World { @@ -78,5 +78,5 @@ index 6328558975..4568336f11 100644 // Add env and gen to constructor public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0076-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0076-Entity-AddTo-RemoveFrom-World-Events.patch index 7d936a9f8..c781cbf22 100644 --- a/Spigot-Server-Patches/0076-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0076-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,14 +1,14 @@ -From a3d0b728b00a72793b20fe081d80ab77cb3aa149 Mon Sep 17 00:00:00 2001 +From ddb9473e7b3367cf7d4e3096db17b419289fac46 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:32:58 -0400 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 -@@ -1101,6 +1101,7 @@ public class WorldServer extends World { +@@ -1099,6 +1099,7 @@ public class WorldServer extends World { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -16,7 +16,7 @@ index 4568336f11..9f7258ad62 100644 } } -@@ -1110,6 +1111,7 @@ public class WorldServer extends World { +@@ -1108,6 +1109,7 @@ public class WorldServer extends World { if (this.tickingEntities) { throw new IllegalStateException("Removing entity while ticking!"); } else { @@ -25,5 +25,5 @@ index 4568336f11..9f7258ad62 100644 this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0078-EntityPathfindEvent.patch b/Spigot-Server-Patches/0078-EntityPathfindEvent.patch index 9077216ff..28770134b 100644 --- a/Spigot-Server-Patches/0078-EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/0078-EntityPathfindEvent.patch @@ -1,4 +1,4 @@ -From 9cc229d9a2b2e314802d77dd02a9183da09afff3 Mon Sep 17 00:00:00 2001 +From 3f79320ddf65e87431feaf8e92b1bb636425c970 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 21:22:26 -0400 Subject: [PATCH] EntityPathfindEvent @@ -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 @@ -60,7 +60,7 @@ 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 @@ -4,7 +4,7 @@ import javax.annotation.Nullable; @@ -92,5 +92,5 @@ index 9dfca6067f..551ff417bd 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0085-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0085-Fix-reducedDebugInfo-not-initialized-on-client.patch index 455ed7469..9cee8dd44 100644 --- a/Spigot-Server-Patches/0085-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0085-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -1,21 +1,21 @@ -From 91f40ee8e13da62895289b96f50dbf77eb84b89c Mon Sep 17 00:00:00 2001 +From 95ca52c5dcfff825afa02b18d9216d0db8ff4837 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 20:37:03 -0400 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 @@ -162,6 +162,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); -+ playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean("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); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0090-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0090-Workaround-for-setting-passengers-on-players.patch index 85bbdd565..e6315ccdb 100644 --- a/Spigot-Server-Patches/0090-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0090-Workaround-for-setting-passengers-on-players.patch @@ -1,4 +1,4 @@ -From 0ffc1dcaad7b97949787de5112efce7a69d8ffab Mon Sep 17 00:00:00 2001 +From f21f5724ba148e88b8e363592282ac48d8bdf0a0 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 10 Apr 2016 03:23:32 -0500 Subject: [PATCH] Workaround for setting passengers on players @@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 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 -@@ -755,6 +755,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -764,6 +764,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return true; } @@ -28,5 +28,5 @@ index 34ae747004..cc31b8d4ac 100644 public void setSneaking(boolean sneak) { getHandle().setSneaking(sneak); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0093-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0093-Configurable-Player-Collision.patch index a01636fcb..3f6b3b58f 100644 --- a/Spigot-Server-Patches/0093-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0093-Configurable-Player-Collision.patch @@ -1,4 +1,4 @@ -From 760971cf0af6bdafbafd20368498ac95094d3ada Mon Sep 17 00:00:00 2001 +From e74d304c76e68157f46252480a0f8fe71fbf2831 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 02:10:49 -0400 Subject: [PATCH] Configurable Player Collision @@ -19,10 +19,10 @@ index 0cef1853f5..dc3438890b 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 40b9bff98f..7a860231e4 100644 +index 4e1c03a78c..f88e42423d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -439,6 +439,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 19 Apr 2016 14:09:31 -0500 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 @@ -37,7 +37,7 @@ import org.bukkit.inventory.MainHand; @@ -17,7 +17,7 @@ index 73af650c0c..ee5f2f0afa 100644 public PlayerConnection playerConnection; public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; -@@ -1447,13 +1447,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1449,13 +1449,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT); this.server.server.getPluginManager().callEvent(event); } @@ -40,10 +40,10 @@ 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 -@@ -1749,8 +1749,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1758,8 +1758,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { @@ -56,7 +56,7 @@ index cc31b8d4ac..397349963d 100644 } // Paper start -@@ -1840,7 +1842,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1849,7 +1851,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { diff --git a/Spigot-Server-Patches/0100-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0100-remove-null-possibility-for-getServer-singleton.patch index ca443c6de..a63036f18 100644 --- a/Spigot-Server-Patches/0100-remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/0100-remove-null-possibility-for-getServer-singleton.patch @@ -1,4 +1,4 @@ -From 5c2318cc96c81ecb1bec910cd84762c20cbfb5b1 Mon Sep 17 00:00:00 2001 +From aa72827fd9ad7117a8a9fdeb5a4ef07fa6d5bed8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 Apr 2016 00:57:27 -0400 Subject: [PATCH] remove null possibility for getServer singleton @@ -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 -@@ -61,6 +61,7 @@ import co.aikar.timings.MinecraftTimings; // Paper +@@ -59,6 +59,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { @@ -17,15 +17,15 @@ index 7a860231e4..d3d8fffeb0 100644 public static final Logger LOGGER = LogManager.getLogger(); public static final File b = new File("usercache.json"); public static final WorldSettings c = (new WorldSettings((long) "North Carolina".hashCode(), EnumGamemode.SURVIVAL, true, false, WorldType.NORMAL)).a(); -@@ -167,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant(ResourcePackLoader::new); - this.ai = new CraftingManager(); -@@ -1906,7 +1908,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 29 Apr 2016 20:02:00 -0400 Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes @@ -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 @@ -590,6 +590,12 @@ 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 @@ -31,6 +31,7 @@ public class WorldMap extends PersistentBase { @@ -49,15 +49,15 @@ index 61892fec98..acbd381c8c 100644 // CraftBukkit end } -@@ -110,6 +112,7 @@ public class WorldMap extends PersistentBase { - this.l.put(mapiconbanner.f(), mapiconbanner); - this.a(mapiconbanner.c(), (GeneratorAccess) null, mapiconbanner.f(), (double) mapiconbanner.a().getX(), (double) mapiconbanner.a().getZ(), 180.0D, mapiconbanner.d()); - } +@@ -115,6 +117,7 @@ public class WorldMap extends PersistentBase { + this.l.put(mapiconbanner.f(), mapiconbanner); + this.a(mapiconbanner.c(), (GeneratorAccess) null, mapiconbanner.f(), (double) mapiconbanner.a().getX(), (double) mapiconbanner.a().getZ(), 180.0D, mapiconbanner.d()); + } + vanillaRender.buffer = colors; // Paper - NBTTagList nbttaglist1 = nbttagcompound.getList("frames", 10); + NBTTagList nbttaglist1 = nbttagcompound.getList("frames", 10); -@@ -184,6 +187,7 @@ public class WorldMap extends PersistentBase { +@@ -190,6 +193,7 @@ public class WorldMap extends PersistentBase { this.b(); } @@ -65,7 +65,7 @@ index 61892fec98..acbd381c8c 100644 public void a(EntityHuman entityhuman, ItemStack itemstack) { if (!this.humans.containsKey(entityhuman)) { WorldMap.WorldMapHumanTracker worldmap_worldmaphumantracker = new WorldMap.WorldMapHumanTracker(entityhuman); -@@ -419,6 +423,21 @@ public class WorldMap extends PersistentBase { +@@ -425,6 +429,21 @@ public class WorldMap extends PersistentBase { public class WorldMapHumanTracker { @@ -87,7 +87,7 @@ index 61892fec98..acbd381c8c 100644 public final EntityHuman trackee; private boolean d = true; private int e; -@@ -435,9 +454,12 @@ public class WorldMap extends PersistentBase { +@@ -441,9 +460,12 @@ public class WorldMap extends PersistentBase { @Nullable public Packet a(ItemStack itemstack) { // CraftBukkit start @@ -102,10 +102,10 @@ 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 -@@ -1038,6 +1038,7 @@ public class WorldServer extends World { +@@ -1036,6 +1036,7 @@ public class WorldServer extends World { { if ( iter.next().trackee == entity ) { @@ -127,5 +127,5 @@ index 256a131781..5768cd512e 100644 public RenderData() { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0105-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0105-Optimize-UserCache-Thread-Safe.patch index 8bccabf6b..65455367c 100644 --- a/Spigot-Server-Patches/0105-Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/0105-Optimize-UserCache-Thread-Safe.patch @@ -1,4 +1,4 @@ -From 06b292dd14d20731596c660752b2ac0d64971546 Mon Sep 17 00:00:00 2001 +From b9e60337d725ca6dfb42893d103124c0f0f68b36 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 16 May 2016 20:47:41 -0400 Subject: [PATCH] Optimize UserCache / Thread Safe @@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d3d8fffeb0..f142ed9a3b 100644 +index f489d47c60..ff879d9bd0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -739,7 +739,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sun, 22 May 2016 20:20:55 -0500 Subject: [PATCH] Optional TNT doesn't move in water @@ -32,13 +32,13 @@ index 805aa56999..92ab55182f 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1cc7b9f60e..4ef333ef12 100644 +index b91eaebc0e..44709d5d46 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2645,6 +2645,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2694,6 +2694,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } - public boolean bD() { + public boolean bE() { + // Paper start + return this.pushedByWater(); + } @@ -49,11 +49,11 @@ index 1cc7b9f60e..4ef333ef12 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index e0535604b6..baeb85142b 100644 +index f2ee53ab90..dc0d944ea0 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -80,7 +80,27 @@ public class EntityTNTPrimed extends Entity { - this.ax(); + this.ay(); this.world.addParticle(Particles.SMOKE, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); } - @@ -94,7 +94,7 @@ index e0535604b6..baeb85142b 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index aaf3a54b08..afd8748da8 100644 +index f04a9d18c4..cd7e0299ac 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -36,7 +36,7 @@ public class EntityTrackerEntry { @@ -107,5 +107,5 @@ index aaf3a54b08..afd8748da8 100644 private java.util.Map trackedPlayerMap = null; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0111-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0111-Fix-Double-World-Add-issues.patch index 708f929c9..f93e7c7ae 100644 --- a/Spigot-Server-Patches/0111-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0111-Fix-Double-World-Add-issues.patch @@ -1,4 +1,4 @@ -From 166a5a9e1a03057324fe82d5aa496a783c509bea Mon Sep 17 00:00:00 2001 +From 8409d78cc274cec36417a15ca55786b0ec91d791 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 21 Jun 2016 22:54:34 -0400 Subject: [PATCH] Fix Double World Add issues @@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d69ad6820b..f03804bfbb 100644 +index 7b19d74597..cb2b55de52 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -928,6 +928,7 @@ public class WorldServer extends World { +@@ -926,6 +926,7 @@ public class WorldServer extends World { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot @@ -20,5 +20,5 @@ index d69ad6820b..f03804bfbb 100644 // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit return false; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0115-Re-track-players-that-dismount-from-other-players.patch b/Spigot-Server-Patches/0115-Re-track-players-that-dismount-from-other-players.patch index 77520345c..3196bd68b 100644 --- a/Spigot-Server-Patches/0115-Re-track-players-that-dismount-from-other-players.patch +++ b/Spigot-Server-Patches/0115-Re-track-players-that-dismount-from-other-players.patch @@ -1,14 +1,14 @@ -From 919059f2d0e417cb86a796468ab611442c587181 Mon Sep 17 00:00:00 2001 +From 711bddf91f2f0f5faa884ddee9c23fc82c932cad Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 31 Jul 2016 16:33:03 -0500 Subject: [PATCH] Re-track players that dismount from other players diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ee5f2f0afa..55ec0bb14e 100644 +index c5dbcbe590..2d29e9d866 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -978,6 +978,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -980,6 +980,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (entity1 != entity && this.playerConnection != null) { this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch); } diff --git a/Spigot-Server-Patches/0122-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0122-Auto-fix-bad-Y-levels-on-player-login.patch index ab06b0043..ca1c72e0b 100644 --- a/Spigot-Server-Patches/0122-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0122-Auto-fix-bad-Y-levels-on-player-login.patch @@ -1,4 +1,4 @@ -From d146d1ef94f021d54ffa33ac26d6f21402122d18 Mon Sep 17 00:00:00 2001 +From 806c5048a46d06f9448db8d45fe6be4eabe4f911 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 23:48:39 -0400 Subject: [PATCH] Auto fix bad Y levels on player login @@ -6,10 +6,10 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 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 -@@ -191,6 +191,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -193,6 +193,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); @@ -18,5 +18,5 @@ index 5db5e15ac8..a7bf433a7f 100644 if (this.getMinecraftServer().getForceGamemode()) { this.playerInteractManager.setGameMode(this.getMinecraftServer().getGamemode()); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0124-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0124-Add-EntityZapEvent.patch index 70e247b12..8afc616d2 100644 --- a/Spigot-Server-Patches/0124-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0124-Add-EntityZapEvent.patch @@ -1,11 +1,11 @@ -From 0a6ae4866a84d4a1c9a948775e8adfd1736fcf6b Mon Sep 17 00:00:00 2001 +From 488f3c7f82abf9110bec823d81b0d5848a1eb2f8 Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Sun, 16 Oct 2016 23:19:30 -0700 Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index 01202e4d53..616075569f 100644 +index 23621a0dc9..0d099d2fd6 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -168,6 +168,12 @@ public class EntityPig extends EntityAnimal { @@ -22,10 +22,10 @@ index 01202e4d53..616075569f 100644 if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { return; diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 1400b3f44b..4119709cb8 100644 +index 14125f519d..5e56447e7d 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java -@@ -584,6 +584,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -618,6 +618,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation public void onLightningStrike(EntityLightning entitylightning) { EntityWitch entitywitch = (EntityWitch) EntityTypes.WITCH.a(this.world); diff --git a/Spigot-Server-Patches/0128-Optimise-removeQueue.patch b/Spigot-Server-Patches/0128-Optimise-removeQueue.patch index 3f61e78bb..f52f73b62 100644 --- a/Spigot-Server-Patches/0128-Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/0128-Optimise-removeQueue.patch @@ -1,11 +1,11 @@ -From 612c295c15b346d0b04a58b456f10b21a19353f6 Mon Sep 17 00:00:00 2001 +From 552c591c8c4d8848e81c63e8dc4e25433f43098f Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Fri, 25 Nov 2016 13:22:40 +0000 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 @@ -4,7 +4,9 @@ import com.google.common.collect.Lists; @@ -27,7 +27,7 @@ index 0e0faef89e..8254b8d68d 100644 private final AdvancementDataPlayer advancementDataPlayer; private final ServerStatisticManager serverStatisticManager; private float lastHealthScored = Float.MIN_VALUE; -@@ -365,13 +367,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -367,13 +369,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { while (!this.removeQueue.isEmpty()) { int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); int[] aint = new int[i]; @@ -50,7 +50,7 @@ index 0e0faef89e..8254b8d68d 100644 this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } -@@ -1321,7 +1330,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1323,7 +1332,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit diff --git a/Spigot-Server-Patches/0139-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0139-Properly-fix-item-duplication-bug.patch index 9e17d08b2..645b09b71 100644 --- a/Spigot-Server-Patches/0139-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0139-Properly-fix-item-duplication-bug.patch @@ -1,4 +1,4 @@ -From b4a1a1e7a6699bbd267a11f664b485f24d251b28 Mon Sep 17 00:00:00 2001 +From 25310ce37d460f67350b589d4c816932835d3bc8 Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Tue, 27 Dec 2016 01:57:57 +0000 Subject: [PATCH] Properly fix item duplication bug @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 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 -@@ -1794,7 +1794,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1796,7 +1796,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { @@ -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 @@ -2544,7 +2544,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0140-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0140-String-based-Action-Bar-API.patch index 8991e7223..264f7a0e7 100644 --- a/Spigot-Server-Patches/0140-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0140-String-based-Action-Bar-API.patch @@ -1,4 +1,4 @@ -From 62e87ec4fc7f367cea59ba5d18cdc0c0784ff7c9 Mon Sep 17 00:00:00 2001 +From f1d16cb1aee6052f8cce8e79053ce2ff6ef0e923 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Dec 2016 15:02:42 -0500 Subject: [PATCH] String based Action Bar API @@ -42,10 +42,10 @@ 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 -@@ -215,6 +215,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -217,6 +217,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper start @@ -65,5 +65,5 @@ index 397349963d..b584432639 100644 public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) { if (header != null) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0143-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0143-Provide-E-TE-Chunk-count-stat-methods.patch index 7cf4dc0ae..39da83f20 100644 --- a/Spigot-Server-Patches/0143-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0143-Provide-E-TE-Chunk-count-stat-methods.patch @@ -1,4 +1,4 @@ -From 900e8111d9cac68491c28375de1fe4b74aca4b74 Mon Sep 17 00:00:00 2001 +From c4c9bd77113a059d54e10603eb602a8454310e36 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 Jan 2017 15:24:46 -0500 Subject: [PATCH] Provide E/TE/Chunk count stat methods @@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index bddfc796db..6f8c2a1d2b 100644 +index 7c2eba8aa4..b8e16e1870 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -265,6 +265,35 @@ public class CraftWorld implements World { +@@ -264,6 +264,35 @@ public class CraftWorld implements World { private int waterAnimalSpawn = -1; private int ambientSpawn = -1; @@ -47,5 +47,5 @@ index bddfc796db..6f8c2a1d2b 100644 public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0145-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0145-Don-t-allow-entities-to-ride-themselves-572.patch index 2f565bb17..a719e09fc 100644 --- a/Spigot-Server-Patches/0145-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0145-Don-t-allow-entities-to-ride-themselves-572.patch @@ -1,14 +1,14 @@ -From cad06e39a8171eb2e160d68118cf82dd0a8ab356 Mon Sep 17 00:00:00 2001 +From f75ca265343834ec3ad756ba51d8c526b5b532e4 Mon Sep 17 00:00:00 2001 From: Alfie Cleveland Date: Sun, 8 Jan 2017 04:31:36 +0000 Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c5576e0325..e1ad87f2fe 100644 +index 58f7bb658f..f541011a34 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1993,6 +1993,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2042,6 +2042,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } protected boolean addPassenger(Entity entity) { // CraftBukkit @@ -17,5 +17,5 @@ index c5576e0325..e1ad87f2fe 100644 throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0147-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0147-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 93b977311..0c8897046 100644 --- a/Spigot-Server-Patches/0147-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0147-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -1,4 +1,4 @@ -From c9f38b6192671a5eca7f0220f100ed9dc534ada7 Mon Sep 17 00:00:00 2001 +From 674113294741991783d32f1717fe1f1cc111c56e Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 16:31:46 -0500 Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player @@ -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 @@ -511,13 +511,13 @@ 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 @@ -607,7 +607,7 @@ 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 @@ -16,9 +16,59 @@ 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 @@ -404,7 +404,7 @@ 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 @@ -385,7 +385,8 @@ public abstract class EntityLiving extends Entity { @@ -174,23 +174,23 @@ 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 -@@ -512,7 +512,7 @@ public class EntityTurtle extends EntityAnimal { +@@ -508,7 +508,7 @@ 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 -@@ -426,7 +426,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -429,7 +429,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation } if (merchantrecipe.isRewardExp()) { @@ -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 @@ -147,7 +147,7 @@ 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 @@ -117,7 +117,7 @@ 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 @@ -367,7 +367,7 @@ 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 @@ -554,7 +554,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I @@ -265,10 +265,10 @@ 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 -@@ -1610,7 +1610,7 @@ public class CraftWorld implements World { +@@ -1609,7 +1609,7 @@ public class CraftWorld implements World { } else if (TNTPrimed.class.isAssignableFrom(clazz)) { entity = new EntityTNTPrimed(world, x, y, z, null); } else if (ExperienceOrb.class.isAssignableFrom(clazz)) { diff --git a/Spigot-Server-Patches/0150-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0150-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index f67e5a940..218577f7b 100644 --- a/Spigot-Server-Patches/0150-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0150-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -1,14 +1,14 @@ -From cdc20e1375c0f46573a23d5c583bedf890432527 Mon Sep 17 00:00:00 2001 +From a8776e3e3d6d0fa4f7e873ecf5bf0613c035c811 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 7 Feb 2017 16:55:35 -0600 Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 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 -@@ -81,7 +81,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -79,7 +79,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.v = new AtomicInteger(); this.playerMap = new PlayerMap(); this.trackedEntities = new Int2ObjectOpenHashMap(); @@ -17,7 +17,7 @@ index e0e11b6f2e..fba9f4b8a1 100644 this.definedStructureManager = definedstructuremanager; this.x = worldserver.getWorldProvider().getDimensionManager().a(file); this.world = worldserver; -@@ -324,7 +324,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -322,7 +322,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Spigot start org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; activityAccountant.startActivity(0.5); @@ -26,7 +26,7 @@ index e0e11b6f2e..fba9f4b8a1 100644 // Spigot end while (longiterator.hasNext()) { // Spigot long j = longiterator.nextLong(); -@@ -346,7 +346,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -344,7 +344,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { Runnable runnable; @@ -38,5 +38,5 @@ index e0e11b6f2e..fba9f4b8a1 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0151-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0151-Do-not-let-armorstands-drown.patch index fae2c5974..d062e2c69 100644 --- a/Spigot-Server-Patches/0151-Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/0151-Do-not-let-armorstands-drown.patch @@ -1,11 +1,11 @@ -From c02767e8da2a6471be996d0edde117a2831755a1 Mon Sep 17 00:00:00 2001 +From bf168d4122dee870e39cb2350a42dd74d9dcff28 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 18 Feb 2017 19:29:58 -0600 Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 1ae3ffa666..81226d6042 100644 +index ccdd0d27e3..62a878d13d 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -798,5 +798,10 @@ public class EntityArmorStand extends EntityLiving { @@ -20,26 +20,26 @@ index 1ae3ffa666..81226d6042 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 5e58930e81..ed528faada 100644 +index 7695404790..3961ae1710 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -223,6 +223,7 @@ public abstract class EntityLiving extends Entity { super.a(d0, flag, iblockdata, blockposition); } -+ public boolean canBreatheUnderwater() { return this.cl(); } // Paper - OBFHELPER - public boolean cl() { ++ public boolean canBreatheUnderwater() { return this.cm(); } // Paper - OBFHELPER + public boolean cm() { return this.getMonsterType() == EnumMonsterType.UNDEAD; } @@ -262,7 +263,7 @@ public abstract class EntityLiving extends Entity { if (this.isAlive()) { if (this.a(TagsFluid.WATER) && this.world.getType(new BlockPosition(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ)).getBlock() != Blocks.BUBBLE_COLUMN) { -- if (!this.cl() && !MobEffectUtil.c(this) && !flag1) { -+ if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden - this.setAirTicks(this.k(this.getAirTicks())); +- if (!this.cm() && !MobEffectUtil.c(this) && !flag1) { ++ if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden + this.setAirTicks(this.l(this.getAirTicks())); if (this.getAirTicks() == -20) { this.setAirTicks(0); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0152-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0152-Properly-handle-async-calls-to-restart-the-server.patch index 75987c425..976161480 100644 --- a/Spigot-Server-Patches/0152-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0152-Properly-handle-async-calls-to-restart-the-server.patch @@ -1,4 +1,4 @@ -From c97f19e82e8c08078c80d80946a841db54bf6475 Mon Sep 17 00:00:00 2001 +From d32338b1651e63ce6cb2dc9caf8996f4001d8a92 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 12 May 2017 23:34:11 -0500 Subject: [PATCH] Properly handle async calls to restart the server @@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 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 -@@ -80,6 +80,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant worldServer = Maps.newLinkedHashMap(); // CraftBukkit - keep order, k+v already use identity methods private PlayerList playerList; private volatile boolean isRunning = true; @@ -41,7 +41,7 @@ index f142ed9a3b..e7b89b3206 100644 private boolean isStopped; private int ticks; protected final Proxy proxy; -@@ -702,7 +703,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 9 Jun 2017 19:03:43 +0200 Subject: [PATCH] Use TerminalConsoleAppender for console improvements @@ -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 @@ -41,10 +41,27 @@ @@ -143,10 +143,10 @@ 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 -@@ -83,6 +83,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -85,6 +85,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer if (!org.bukkit.craftbukkit.Main.useConsole) { return; } @@ -156,7 +156,7 @@ index f0e2250cd8..37020dcba5 100644 jline.console.ConsoleReader bufferedreader = reader; // CraftBukkit end -@@ -105,6 +108,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -107,6 +110,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer DedicatedServer.LOGGER.error("Exception handling console input", ioexception); } @@ -165,7 +165,7 @@ index f0e2250cd8..37020dcba5 100644 } }; -@@ -116,6 +121,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -118,6 +123,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler()); @@ -175,7 +175,7 @@ index f0e2250cd8..37020dcba5 100644 final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger()); for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) { if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) { -@@ -124,6 +132,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -126,6 +134,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start(); @@ -185,10 +185,10 @@ 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 -@@ -50,7 +50,7 @@ import org.apache.commons.lang3.Validate; +@@ -48,7 +48,7 @@ import org.apache.commons.lang3.Validate; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; // CraftBukkit start @@ -197,7 +197,7 @@ index e7b89b3206..6b83f9769a 100644 import org.bukkit.Bukkit; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.Main; -@@ -151,7 +151,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -200,7 +200,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0158-Item-canEntityPickup.patch b/Spigot-Server-Patches/0158-Item-canEntityPickup.patch index 644c66841..e87435a76 100644 --- a/Spigot-Server-Patches/0158-Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/0158-Item-canEntityPickup.patch @@ -1,14 +1,14 @@ -From 972de0128357ccf41238c727e4e7e2632a297cd1 Mon Sep 17 00:00:00 2001 +From 7624eca940fe78d29f514c7fa7b2a38222c4c287 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 5 May 2017 03:57:17 -0500 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 -@@ -510,6 +510,11 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -511,6 +511,11 @@ public abstract class EntityInsentient extends EntityLiving { EntityItem entityitem = (EntityItem) iterator.next(); if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.q()) { @@ -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 @@ -19,6 +19,7 @@ public class EntityItem extends Entity { @@ -54,5 +54,5 @@ index cc593fbc99..3f552b5905 100644 public String toString() { return "CraftItem"; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0162-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0162-Basic-PlayerProfile-API.patch index ccdf06e0d..822fa2f52 100644 --- a/Spigot-Server-Patches/0162-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0162-Basic-PlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 2cf4de6d996010167423ced2f51e557dace53588 Mon Sep 17 00:00:00 2001 +From 223f10e2086757e709798bb3d5c232c416812710 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 15 Jan 2018 22:11:48 -0500 Subject: [PATCH] Basic PlayerProfile API @@ -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 +1,280 @@ @@ -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 +1,30 @@ @@ -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 +1,17 @@ @@ -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 +1,29 @@ @@ -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 +1,11 @@ @@ -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 @@ -1,7 +1,10 @@ @@ -429,10 +429,10 @@ 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 -@@ -1246,7 +1246,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sat, 17 Jun 2017 15:18:30 -0400 Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index cfcbd1a2e5..b8fe15f1a1 100644 +index 0974135c65..d1f01bb640 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1781,20 +1781,45 @@ public abstract class EntityHuman extends EntityLiving { @@ -59,10 +59,10 @@ index cfcbd1a2e5..b8fe15f1a1 100644 @Override public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 93c8441f48..e37e08c37e 100644 +index 5cc5074a5e..e4d9300be2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -662,6 +662,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -664,6 +664,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { getHandle().getCooldownTracker().a(CraftMagicNumbers.getItem(material), ticks); } @@ -96,5 +96,5 @@ index 93c8441f48..e37e08c37e 100644 public boolean discoverRecipe(NamespacedKey recipe) { return discoverRecipes(Arrays.asList(recipe)) != 0; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0166-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0166-Entity-fromMobSpawner.patch index 69240cd46..8b2975125 100644 --- a/Spigot-Server-Patches/0166-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0166-Entity-fromMobSpawner.patch @@ -1,11 +1,11 @@ -From 8bfd88071a06c17ab2881e6fabd298099be816c1 Mon Sep 17 00:00:00 2001 +From d63672d137904d533b23538d91e2349181a48e02 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 18 Jun 2017 18:17:05 -0500 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 @@ -184,6 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -16,7 +16,7 @@ index e15fd1dc72..0915dede9a 100644 protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1585,6 +1586,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1634,6 +1635,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -27,7 +27,7 @@ index e15fd1dc72..0915dede9a 100644 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1713,6 +1718,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1762,6 +1767,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (!originTag.isEmpty()) { origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); } @@ -37,7 +37,7 @@ index 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 @@ -133,6 +133,7 @@ public abstract class MobSpawnerAbstract { @@ -64,5 +64,5 @@ index ed496d03ae..b000bc8c71 100644 // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0169-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0169-Implement-getI18NDisplayName.patch index 013555e62..1ddd18d20 100644 --- a/Spigot-Server-Patches/0169-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0169-Implement-getI18NDisplayName.patch @@ -1,4 +1,4 @@ -From 2e64dd84f1f9bb2eb6a69cfbc6f3447305b99d51 Mon Sep 17 00:00:00 2001 +From bb223cd0e09381cf7c62fc08b25013e5790b1a82 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 May 2016 23:59:38 -0400 Subject: [PATCH] Implement getI18NDisplayName @@ -8,10 +8,10 @@ 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 -@@ -44,10 +44,12 @@ public class LocaleLanguage { +@@ -65,10 +65,12 @@ public class LocaleLanguage { } @@ -48,5 +48,5 @@ index 1dc21e08db..7099eeda4e 100644 // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0170-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0170-ProfileWhitelistVerifyEvent.patch index 2469a9475..60c8afb16 100644 --- a/Spigot-Server-Patches/0170-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0170-ProfileWhitelistVerifyEvent.patch @@ -1,11 +1,11 @@ -From 8c5a1023a3d4569ad9de7a16bed9b9b3abb59e7b Mon Sep 17 00:00:00 2001 +From db62c709bbc0622ea837fdcd760c04366ac762a0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 3 Jul 2017 18:11:10 -0500 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 @@ -521,9 +521,9 @@ public abstract class PlayerList { @@ -46,7 +46,7 @@ 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; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0172-Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/0172-Ocelot-despawns-should-honor-nametags-and-leash.patch index 3cd3a0554..062367d53 100644 --- a/Spigot-Server-Patches/0172-Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/Spigot-Server-Patches/0172-Ocelot-despawns-should-honor-nametags-and-leash.patch @@ -1,14 +1,14 @@ -From dc46b1f8046fa3721f6b8c7bb5c617911c8915c9 Mon Sep 17 00:00:00 2001 +From f7877d26120925dbabe0977916bc73476426ac68 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 31 Jul 2017 01:54:40 -0500 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 -@@ -81,7 +81,7 @@ public class EntityOcelot extends EntityAnimal { +@@ -82,7 +82,7 @@ public class EntityOcelot extends EntityAnimal { @Override public boolean isTypeNotPersistent(double d0) { @@ -18,5 +18,5 @@ index af1ff95182..1713bead27 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0177-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/0177-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index eaccfd03c..1734c1202 100644 --- a/Spigot-Server-Patches/0177-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/0177-Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -1,4 +1,4 @@ -From 644a9462b31264d07fffbbd7898fa676dd0e9cd1 Mon Sep 17 00:00:00 2001 +From e231bdeb4f428f995d8de30ae00651cef191147b Mon Sep 17 00:00:00 2001 From: Minecrell Date: Mon, 18 Sep 2017 12:00:03 +0200 Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger @@ -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 @@ -63,6 +63,11 @@ @@ -28,10 +28,10 @@ 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 -@@ -135,8 +135,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -137,8 +137,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer */ // Paper end @@ -45,5 +45,5 @@ index 37020dcba5..c2c676e3bb 100644 thread.setDaemon(true); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0183-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0183-Expose-client-protocol-version-and-virtual-host.patch index e4d53c128..7facd0dd1 100644 --- a/Spigot-Server-Patches/0183-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0183-Expose-client-protocol-version-and-virtual-host.patch @@ -1,4 +1,4 @@ -From fae9bf2123e9e1de003d617d8df7747819290a5c Mon Sep 17 00:00:00 2001 +From 15855906cc02f96933838633a10a24733a24618a Mon Sep 17 00:00:00 2001 From: Minecrell Date: Tue, 10 Oct 2017 18:45:20 +0200 Subject: [PATCH] Expose client protocol version and virtual host @@ -111,10 +111,10 @@ 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 -@@ -182,6 +182,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -184,6 +184,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } @@ -136,5 +136,5 @@ index b584432639..d4fed1a512 100644 public double getEyeHeight(boolean ignorePose) { if (ignorePose) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0185-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0185-Send-attack-SoundEffects-only-to-players-who-can-see.patch index b1c292e93..c726fb911 100644 --- a/Spigot-Server-Patches/0185-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/0185-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -1,4 +1,4 @@ -From de1b242d8873695302a2ef6af149b7b1305971dd Mon Sep 17 00:00:00 2001 +From 492d1245c3a9cc3a18c95c4db09b6f44df606ed8 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 31 Oct 2017 03:26:18 +0100 Subject: [PATCH] Send attack SoundEffects only to players who can see the @@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index b8fe15f1a1..ec0982b587 100644 +index d1f01bb640..3b978528ba 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -941,6 +941,15 @@ public abstract class EntityHuman extends EntityLiving { @@ -23,7 +23,7 @@ index b8fe15f1a1..ec0982b587 100644 + // Paper end + public void attack(Entity entity) { - if (entity.br()) { + if (entity.bs()) { if (!entity.t(this)) { @@ -965,7 +974,7 @@ public abstract class EntityHuman extends EntityLiving { int i = b0 + EnchantmentManager.b((EntityLiving) this); @@ -40,7 +40,7 @@ index b8fe15f1a1..ec0982b587 100644 - this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); + sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility - this.dE(); + this.dF(); } @@ -1068,15 +1077,15 @@ public abstract class EntityHuman extends EntityLiving { @@ -72,7 +72,7 @@ index b8fe15f1a1..ec0982b587 100644 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 250767b94e..3d5b3892f1 100644 +index 4498a21073..ed78bba710 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -671,6 +671,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -87,5 +87,5 @@ index 250767b94e..3d5b3892f1 100644 public abstract void a(@Nullable EntityHuman entityhuman, Entity entity, SoundEffect soundeffect, SoundCategory soundcategory, float f, float f1); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0195-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0195-Ability-to-apply-mending-to-XP-API.patch index 41ccd7be9..cad0a9d39 100644 --- a/Spigot-Server-Patches/0195-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0195-Ability-to-apply-mending-to-XP-API.patch @@ -1,4 +1,4 @@ -From fa4cb878b8a7aedf524f2f17a1357215f99f6cb7 Mon Sep 17 00:00:00 2001 +From 3891a5f730f2b9b9b85b2e10d3caf2416244d591 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Dec 2017 17:36:49 -0500 Subject: [PATCH] Ability to apply mending to XP API @@ -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 @@ -241,6 +241,11 @@ 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 @@ -251,10 +251,12 @@ public class EntityExperienceOrb extends Entity { @@ -43,10 +43,10 @@ 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 -@@ -1054,8 +1054,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1063,8 +1063,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().getId()); } @@ -88,5 +88,5 @@ index d4fed1a512..7f1138cbbf 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0196-Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/0196-Make-max-squid-spawn-height-configurable.patch index f9e823495..7c17335ce 100644 --- a/Spigot-Server-Patches/0196-Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/0196-Make-max-squid-spawn-height-configurable.patch @@ -1,4 +1,4 @@ -From a7ab9844e754c48ee9feb8284079ae581329f5b2 Mon Sep 17 00:00:00 2001 +From d6c58af2097797188b9223dd7ab2fb2b428a59d8 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 11 Jan 2018 16:47:28 -0600 Subject: [PATCH] Make max squid spawn height configurable @@ -21,19 +21,19 @@ 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 -@@ -170,7 +170,8 @@ public class EntitySquid extends EntityWaterAnimal { +@@ -171,7 +171,8 @@ 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) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0197-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0197-PreCreatureSpawnEvent.patch index 807990b36..4806dd127 100644 --- a/Spigot-Server-Patches/0197-PreCreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/0197-PreCreatureSpawnEvent.patch @@ -1,4 +1,4 @@ -From 85440e9c1108aa2da61d7e8b3e9d1844b00a0b7d Mon Sep 17 00:00:00 2001 +From 5ec4e4eb79464575a464f37d17f6c282708019d9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:01:31 -0500 Subject: [PATCH] PreCreatureSpawnEvent @@ -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 -@@ -103,6 +103,27 @@ public abstract class MobSpawnerAbstract { - double d4 = j >= 2 ? nbttaglist.h(1) : (double) (blockposition.getY() + world.random.nextInt(3) - 1); +@@ -104,6 +104,28 @@ public abstract class MobSpawnerAbstract { double d5 = j >= 3 ? nbttaglist.h(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; + if (world.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 @@ -38,7 +38,7 @@ public final class SpawnerCreature { @@ -60,7 +61,7 @@ index f4f842b86..d25c7231d 100644 while (true) { @@ -74,6 +74,25 @@ 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 @@ -86,5 +87,5 @@ index f4f842b86..d25c7231d 100644 Entity entity = entitytypes.a(world); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0198-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0198-PlayerNaturallySpawnCreaturesEvent.patch index 1c4bb19e2..1c9e9fa6a 100644 --- a/Spigot-Server-Patches/0198-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0198-PlayerNaturallySpawnCreaturesEvent.patch @@ -1,4 +1,4 @@ -From 209546c8d53f63aff9bda7a065410f2a67700c62 Mon Sep 17 00:00:00 2001 +From 38ed795fadbf5334cbdca6de8d6e4c496ce3fa56 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:36:02 -0500 Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/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 -@@ -764,11 +764,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -755,12 +755,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; @@ -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; @@ -39,5 +40,5 @@ index fba9f4b8a1..6c0a1eb413 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0209-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0209-Implement-extended-PaperServerListPingEvent.patch index d5fddda0d..f1ca73fc7 100644 --- a/Spigot-Server-Patches/0209-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0209-Implement-extended-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From 6747ff7b9cae62d7ec93763bc7a3aa881522ccac Mon Sep 17 00:00:00 2001 +From 6652b707a44fa9f349b165c09cadc2e2d8f882b3 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 15:56:26 +0200 Subject: [PATCH] Implement extended PaperServerListPingEvent @@ -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 -@@ -1,6 +1,7 @@ +@@ -1,5 +1,8 @@ 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; -@@ -1046,7 +1047,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { - this.Z = i; + import com.google.gson.JsonElement; +@@ -1043,7 +1046,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 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 @@ -259,5 +260,5 @@ index bd601333ee..6c5430ff94 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0212-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0212-Player.setPlayerProfile-API.patch index e6bc0a847..ca8bb42f3 100644 --- a/Spigot-Server-Patches/0212-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0212-Player.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From 0cea2bb18bd8e45e4cf93be12818899450543aea Mon Sep 17 00:00:00 2001 +From 290b3fd4259af66943157d89e26bb8002ed8fe15 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 12:29:48 -0400 Subject: [PATCH] Player.setPlayerProfile API @@ -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 @@ -65,7 +65,7 @@ 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 @@ -1,6 +1,8 @@ @@ -60,7 +60,7 @@ index 7f1138cbbf..e6d2a40b6a 100644 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -1194,8 +1196,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1203,8 +1205,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -75,7 +75,7 @@ index 7f1138cbbf..e6d2a40b6a 100644 PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1236,8 +1243,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1245,8 +1252,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -90,7 +90,7 @@ index 7f1138cbbf..e6d2a40b6a 100644 getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1246,6 +1258,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1255,6 +1267,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } @@ -138,5 +138,5 @@ index 7f1138cbbf..e6d2a40b6a 100644 public void removeDisconnectingPlayer(Player player) { hiddenPlayers.remove(player.getUniqueId()); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0218-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0218-Flag-to-disable-the-channel-limit.patch index f4b448ae4..4a0e763b5 100644 --- a/Spigot-Server-Patches/0218-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0218-Flag-to-disable-the-channel-limit.patch @@ -1,4 +1,4 @@ -From 81be9a41aa804f639e0f8e065ef62ab7cc595dbd Mon Sep 17 00:00:00 2001 +From bcd066472315825b03e4b1c71f701ceff331e79e Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 31 Mar 2018 17:04:26 +0100 Subject: [PATCH] Flag to disable the channel limit @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 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 -@@ -137,6 +137,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -139,6 +139,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index e6d2a40b6a..b49c3029fc 100644 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1460,7 +1461,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1469,7 +1470,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { @@ -30,5 +30,5 @@ index e6d2a40b6a..b49c3029fc 100644 if (channels.add(channel)) { server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel)); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0219-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0219-Add-method-to-open-already-placed-sign.patch index 46e2566a9..2ec373661 100644 --- a/Spigot-Server-Patches/0219-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0219-Add-method-to-open-already-placed-sign.patch @@ -1,14 +1,14 @@ -From c381ed5d5e1001fc73bad1d0ead10ec81ce7848e Mon Sep 17 00:00:00 2001 +From 46f626578c1dca38ae56b655bc58d65623ba6be8 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 1 Apr 2018 02:29:37 +0300 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 -@@ -761,4 +761,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -763,4 +763,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { entity.remove(); } } @@ -27,5 +27,5 @@ index e37e08c37e..300826a0f2 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0222-EndermanEscapeEvent.patch b/Spigot-Server-Patches/0222-EndermanEscapeEvent.patch index 067b0be39..efa3e3345 100644 --- a/Spigot-Server-Patches/0222-EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/0222-EndermanEscapeEvent.patch @@ -1,4 +1,4 @@ -From 6b1dab7ac9e67f2f82456b264ad7f1fcb8d4bff9 Mon Sep 17 00:00:00 2001 +From 6bdfb8ccadb49bf6366901ad45a60a688ab58b32 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 30 Apr 2018 13:15:55 -0400 Subject: [PATCH] EndermanEscapeEvent @@ -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 @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -34,7 +34,7 @@ index 9d7c16dbfc..93f66181bf 100644 if (!super.setGoalTarget(entityliving, reason, fireEvent)) { @@ -174,7 +181,7 @@ 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 @@ -81,5 +81,5 @@ index 9d7c16dbfc..93f66181bf 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0225-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0225-Expand-World.spawnParticle-API-and-add-Builder.patch index f3f27a265..5eccf07d4 100644 --- a/Spigot-Server-Patches/0225-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0225-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -1,4 +1,4 @@ -From bfe328d4c5d86a9718b359e5b277e8790bb18f87 Mon Sep 17 00:00:00 2001 +From 280ecc1a95cda2a1b64c508670b900f902527210 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 15 Aug 2017 22:29:12 -0400 Subject: [PATCH] Expand World.spawnParticle API and add Builder @@ -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 @@ -48,7 +48,7 @@ public class WorldServer extends World { @@ -22,7 +22,7 @@ index ebd1ff1d50..5172ff53d3 100644 boolean tickingEntities; private final MinecraftServer server; private final WorldNBTStorage dataManager; -@@ -1323,12 +1323,17 @@ public class WorldServer extends World { +@@ -1321,12 +1321,17 @@ public class WorldServer extends World { } public int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -43,10 +43,10 @@ index 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 -@@ -2039,11 +2039,17 @@ public class CraftWorld implements World { +@@ -2075,11 +2075,17 @@ public class CraftWorld implements World { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/Spigot-Server-Patches/0229-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0229-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 199c50b98..ae8904e3d 100644 --- a/Spigot-Server-Patches/0229-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0229-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -1,4 +1,4 @@ -From 163fbf0ca0b8ea71f9b674bd0e63ae76e88f12b9 Mon Sep 17 00:00:00 2001 +From 0979593c9d81786c5bcfe1c41ee65385280e719b Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Jun 2018 20:39:20 -0400 Subject: [PATCH] Allow spawning Item entities with World.spawnEntity @@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 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 -@@ -1306,6 +1306,10 @@ public class CraftWorld implements World { +@@ -1305,6 +1305,10 @@ public class CraftWorld implements World { if (Boat.class.isAssignableFrom(clazz)) { entity = new EntityBoat(world, x, y, z); entity.setPositionRotation(x, y, z, yaw, pitch); diff --git a/Spigot-Server-Patches/0238-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch b/Spigot-Server-Patches/0238-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch index 520709bf9..a73c7624f 100644 --- a/Spigot-Server-Patches/0238-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch +++ b/Spigot-Server-Patches/0238-Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch @@ -1,4 +1,4 @@ -From e3e6332d5ba432794e0d4197dc20270135c22c5d Mon Sep 17 00:00:00 2001 +From e54cc15c485c0393d77dc5537e748586b42ddc8b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 16 Jun 2018 16:23:38 -0400 Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors @@ -6,10 +6,10 @@ 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 -@@ -78,6 +78,10 @@ public class RecipeBookServer extends RecipeBook { +@@ -79,6 +79,10 @@ public class RecipeBookServer extends RecipeBook { while (iterator.hasNext()) { MinecraftKey minecraftkey = (MinecraftKey) iterator.next(); @@ -20,7 +20,7 @@ index 440e8f1342..091c4abbd1 100644 nbttaglist.add(new NBTTagString(minecraftkey.toString())); } -@@ -88,6 +92,10 @@ public class RecipeBookServer extends RecipeBook { +@@ -89,6 +93,10 @@ public class RecipeBookServer extends RecipeBook { while (iterator1.hasNext()) { MinecraftKey minecraftkey1 = (MinecraftKey) iterator1.next(); @@ -32,5 +32,5 @@ index 440e8f1342..091c4abbd1 100644 nbttaglist1.add(new NBTTagString(minecraftkey1.toString())); } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0243-Expand-Explosions-API.patch b/Spigot-Server-Patches/0243-Expand-Explosions-API.patch index 04e05e0fb..c149e43d3 100644 --- a/Spigot-Server-Patches/0243-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0243-Expand-Explosions-API.patch @@ -1,4 +1,4 @@ -From 2b753cf3f3e6f495c2a3301e6ae1d468e1658c9a Mon Sep 17 00:00:00 2001 +From 6d7cf0c26050dcdd1d09bfc922a86afb81230752 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Jun 2018 23:17:24 -0400 Subject: [PATCH] Expand Explosions API @@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 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 -@@ -753,6 +753,11 @@ public class CraftWorld implements World { +@@ -752,6 +752,11 @@ public class CraftWorld implements World { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) { return !world.createExplosion(null, x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled; } @@ -22,5 +22,5 @@ index 11ab222c54..10c91699c1 100644 @Override public boolean createExplosion(Location loc, float power) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0244-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0244-LivingEntity-Hand-Raised-Item-Use-API.patch index caa2db24f..932940d67 100644 --- a/Spigot-Server-Patches/0244-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/0244-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -1,4 +1,4 @@ -From c4cb28da63f884c61844903fde1d1c60c12fcdc1 Mon Sep 17 00:00:00 2001 +From b109ad1fa20944732d072622bc680c04ca9c0168 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Jun 2018 00:21:28 -0400 Subject: [PATCH] LivingEntity Hand Raised/Item Use API @@ -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 @@ -109,7 +109,7 @@ 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 @@ -62,5 +62,5 @@ index 513b3fac7f..8dea7d36b6 100644 // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0247-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0247-Implement-World.getEntity-UUID-API.patch index 8129cf5d1..8159ca4cc 100644 --- a/Spigot-Server-Patches/0247-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0247-Implement-World.getEntity-UUID-API.patch @@ -1,14 +1,14 @@ -From 321b3eec743de39fea928a5d2293156fa470731d Mon Sep 17 00:00:00 2001 +From a6ea1dabbe73417ebaf2ed3a87fb21b5305c6aa3 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 3 Jul 2018 16:08:14 +0200 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 -@@ -1109,6 +1109,15 @@ public class CraftWorld implements World { +@@ -1108,6 +1108,15 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0248-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0248-InventoryCloseEvent-Reason-API.patch index c0a5d197d..ca7256063 100644 --- a/Spigot-Server-Patches/0248-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0248-InventoryCloseEvent-Reason-API.patch @@ -1,4 +1,4 @@ -From 0e039ed6ae2fe9550d288e94427b129bb48d12bb Mon Sep 17 00:00:00 2001 +From 58ba763c5947745c305f8c75eb447fd464f04162 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 3 Jul 2018 21:56:23 -0400 Subject: [PATCH] InventoryCloseEvent Reason API @@ -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 @@ -149,7 +149,7 @@ 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,10 +34,10 @@ 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 -@@ -360,7 +360,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -362,7 +362,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // Paper end if (!this.world.isClientSide && !this.activeContainer.canUse(this)) { @@ -46,7 +46,7 @@ index 14ea4641dc..7519827a88 100644 this.activeContainer = this.defaultContainer; } -@@ -534,7 +534,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -536,7 +536,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { @@ -55,7 +55,7 @@ index 14ea4641dc..7519827a88 100644 } String deathMessage = event.getDeathMessage(); -@@ -1056,7 +1056,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1058,7 +1058,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return OptionalInt.empty(); } else { if (this.activeContainer != this.defaultContainer) { @@ -64,7 +64,7 @@ index 14ea4641dc..7519827a88 100644 } this.nextContainerCounter(); -@@ -1109,7 +1109,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1111,7 +1111,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end if (this.activeContainer != this.defaultContainer) { @@ -73,7 +73,7 @@ index 14ea4641dc..7519827a88 100644 } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1173,7 +1173,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1175,7 +1175,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void closeInventory() { @@ -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 @@ -2056,7 +2056,7 @@ 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 @@ -402,7 +402,7 @@ public abstract class PlayerList { @@ -114,10 +114,10 @@ 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 -@@ -981,7 +981,7 @@ public class WorldServer extends World { +@@ -979,7 +979,7 @@ public class WorldServer extends World { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -126,7 +126,7 @@ index 5172ff53d3..139168291a 100644 } } } -@@ -1004,7 +1004,7 @@ public class WorldServer extends World { +@@ -1002,7 +1002,7 @@ public class WorldServer extends World { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -136,10 +136,10 @@ 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 -@@ -616,8 +616,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -618,8 +618,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { @@ -155,10 +155,10 @@ 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 -@@ -772,7 +772,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -781,7 +781,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { diff --git a/Spigot-Server-Patches/0252-Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/0252-Don-t-change-the-Entity-Random-seed-for-squids.patch index 749fb59b5..d8304e114 100644 --- a/Spigot-Server-Patches/0252-Don-t-change-the-Entity-Random-seed-for-squids.patch +++ b/Spigot-Server-Patches/0252-Don-t-change-the-Entity-Random-seed-for-squids.patch @@ -1,14 +1,14 @@ -From 798dadbf3dc752bca7033ab4aef3655df0f5460a Mon Sep 17 00:00:00 2001 +From 087c2d8c136a6e67b44483c56e4d75961a78e807 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:05:00 -0400 Subject: [PATCH] Don't change the Entity Random seed for squids diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index d5dff4b88c..77c0ed42f4 100644 +index aafb7df0c8..bcea73a40b 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java -@@ -19,7 +19,7 @@ public class EntitySquid extends EntityWaterAnimal { +@@ -21,7 +21,7 @@ public class EntitySquid extends EntityWaterAnimal { public EntitySquid(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -18,5 +18,5 @@ index d5dff4b88c..77c0ed42f4 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0253-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0253-Re-add-vanilla-entity-warnings-for-duplicates.patch index f2d02175a..56a243419 100644 --- a/Spigot-Server-Patches/0253-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0253-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -1,4 +1,4 @@ -From 81effc0fed2c976b2262086477b9693ed275de78 Mon Sep 17 00:00:00 2001 +From b2bae68a9c895972449ba774a74171469be8e13b Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:08:05 -0400 Subject: [PATCH] Re-add vanilla entity warnings for duplicates @@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 139168291a..8cffbabfb6 100644 +index af947df472..4efc310d93 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -966,7 +966,8 @@ public class WorldServer extends World { +@@ -964,7 +964,8 @@ public class WorldServer extends World { if (entity1 == null) { return false; } else { @@ -22,5 +22,5 @@ index 139168291a..8cffbabfb6 100644 } } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0256-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0256-add-more-information-to-Entity.toString.patch index f55313114..a89126c61 100644 --- a/Spigot-Server-Patches/0256-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0256-add-more-information-to-Entity.toString.patch @@ -1,4 +1,4 @@ -From d7c0f2fe52acd86d792d7f05e34a217d9694fc3d Mon Sep 17 00:00:00 2001 +From 93ae9c7de466e57d10430a20223b30b7ac1d350b Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:13:28 -0400 Subject: [PATCH] add more information to Entity.toString() @@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 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 -@@ -2442,7 +2442,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2491,7 +2491,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public String toString() { @@ -19,5 +19,5 @@ index 0915dede9a..ddfa88bac5 100644 public boolean isInvulnerable(DamageSource damagesource) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0257-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0257-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 5b599a4eb..46537501f 100644 --- a/Spigot-Server-Patches/0257-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0257-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -1,4 +1,4 @@ -From 542a2896ff0699e73e87b76dd2d11c56231f08e6 Mon Sep 17 00:00:00 2001 +From 12ee9e1a682177e3264cc0e1507ed00dd5048425 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 08:25:40 -0400 Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues @@ -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 @@ -75,6 +75,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -19,10 +19,10 @@ 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 -@@ -932,6 +932,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -934,6 +934,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } else { PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking()); @@ -30,7 +30,7 @@ index 6c0a1eb413..8fcd721eeb 100644 this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.track(this.world.getPlayers()); if (entity instanceof EntityPlayer) { -@@ -974,7 +975,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -976,7 +977,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.a(); } @@ -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 @@ -68,6 +68,7 @@ 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 @@ -69,6 +69,9 @@ public class WorldServer extends World { @@ -65,7 +65,7 @@ index 8cffbabfb6..f6ba51d14a 100644 // Add env and gen to constructor public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { -@@ -930,6 +933,12 @@ public class WorldServer extends World { +@@ -928,6 +931,12 @@ public class WorldServer extends World { org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper if (entity.dead) { @@ -78,7 +78,7 @@ index 8cffbabfb6..f6ba51d14a 100644 // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit return false; } else if (this.isUUIDTaken(entity)) { -@@ -1093,7 +1102,24 @@ public class WorldServer extends World { +@@ -1091,7 +1100,24 @@ public class WorldServer extends World { } } @@ -105,5 +105,5 @@ index 8cffbabfb6..f6ba51d14a 100644 if (entity instanceof EntityInsentient) { this.I.add(((EntityInsentient) entity).getNavigation()); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0261-Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/0261-Speedup-BlockPos-by-fixing-inlining.patch index 03235dcb4..4b5cc4100 100644 --- a/Spigot-Server-Patches/0261-Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/0261-Speedup-BlockPos-by-fixing-inlining.patch @@ -1,4 +1,4 @@ -From d74c3e215859a0f6db7250d03e4ef7d247c4731f Mon Sep 17 00:00:00 2001 +From e462313c5340c19f4b93debff49ea4b5e51d7427 Mon Sep 17 00:00:00 2001 From: Techcable Date: Wed, 30 Nov 2016 20:56:58 -0600 Subject: [PATCH] Speedup BlockPos by fixing inlining @@ -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 @@ -335,11 +335,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -174,7 +174,7 @@ index edd60a3d7f..93c3fa78f6 100644 return this; } -@@ -438,15 +449,15 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -438,23 +449,23 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali } public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { @@ -187,12 +187,22 @@ 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 -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0264-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0264-Vanished-players-don-t-have-rights.patch index 3abb0e547..12452027c 100644 --- a/Spigot-Server-Patches/0264-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0264-Vanished-players-don-t-have-rights.patch @@ -1,11 +1,11 @@ -From 6b6191a14bd3c49c0b53c276a8d47f635fa66d75 Mon Sep 17 00:00:00 2001 +From 6012ed43cb5d0b10b3490ed3ff459c84f0be2b77 Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Mon, 23 Jul 2018 14:22:26 +0200 Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/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 @@ -97,7 +97,7 @@ 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 -@@ -142,6 +142,7 @@ public class IBlockData extends BlockDataAbstract implements - return this.b(iblockaccess, blockposition, VoxelShapeCollision.a()); +@@ -146,6 +146,7 @@ public class IBlockData extends BlockDataAbstract implements + return this.c != null ? this.c.g : this.b(iblockaccess, blockposition, VoxelShapeCollision.a()); } + public final VoxelShape getCollisionShape(IBlockAccess iblockaccess, BlockPosition blockposition, VoxelShapeCollision voxelshapecollision) { return this.b(iblockaccess, blockposition, voxelshapecollision); } // Paper - OBFHELPER @@ -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 @@ -33,6 +33,7 @@ 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 @@ -164,6 +164,48 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -148,5 +148,5 @@ index 80b0fb8c11..dd25a8ad29 100644 return event; } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0267-EntityTransformedEvent.patch b/Spigot-Server-Patches/0267-EntityTransformedEvent.patch index 961977fd4..5caf14c7f 100644 --- a/Spigot-Server-Patches/0267-EntityTransformedEvent.patch +++ b/Spigot-Server-Patches/0267-EntityTransformedEvent.patch @@ -1,14 +1,14 @@ -From 3d1a246583f4f9a288776e9522bebc1a371c7aa6 Mon Sep 17 00:00:00 2001 +From 0ace783016fca6b139c0bcc9802d8f9782bda197 Mon Sep 17 00:00:00 2001 From: Anthony MacAllister Date: Thu, 26 Jul 2018 15:30:03 -0400 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 -@@ -101,6 +101,7 @@ public class EntityMushroomCow extends EntityCow { +@@ -110,6 +110,7 @@ public class EntityMushroomCow extends EntityCow { if (CraftEventFactory.callEntityTransformEvent(this, entitycow, EntityTransformEvent.TransformReason.SHEARED).isCancelled()) { return false; } @@ -17,10 +17,10 @@ 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 -@@ -602,6 +602,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -636,6 +636,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) { return; } @@ -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 @@ -247,6 +247,7 @@ 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 @@ -157,6 +157,7 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo @@ -61,5 +61,5 @@ index 2fe7fb7889..5cfda3160b 100644 worldserver.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED); // CraftBukkit - add SpawnReason // CraftBukkit end -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0268-SkeletonHorse-Additions.patch b/Spigot-Server-Patches/0268-SkeletonHorse-Additions.patch index d93c0dc09..1d86d60c4 100644 --- a/Spigot-Server-Patches/0268-SkeletonHorse-Additions.patch +++ b/Spigot-Server-Patches/0268-SkeletonHorse-Additions.patch @@ -1,19 +1,19 @@ -From 0e53901ac7363c319db5ff288406254193d82434 Mon Sep 17 00:00:00 2001 +From eedf0cb25f0dfa2d6ad2cd0205b03de7ad555a1f Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 27 Jul 2018 22:36:31 -0500 Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java -index 9ac34dfa8c..b967264562 100644 +index c9f0973031..d281195834 100644 --- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java +++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java @@ -6,7 +6,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract { - private final PathfinderGoalHorseTrap bJ = new PathfinderGoalHorseTrap(this); - private boolean bK; -- private int bL; -+ private int bL; public int getTrapTime() { return this.bL; } // Paper - OBFHELPER + private final PathfinderGoalHorseTrap bI = new PathfinderGoalHorseTrap(this); + private boolean bJ; +- private int bK; ++ private int bK;public int getTrapTime() { return this.bK; } // Paper - OBFHELPER public EntityHorseSkeleton(EntityTypes 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 @@ -74,5 +74,5 @@ index e822c2200d..2a7d1d4ec2 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0269-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0269-Prevent-Saving-Bad-entities-to-chunks.patch index 5722e9ab9..38abbec2a 100644 --- a/Spigot-Server-Patches/0269-Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/0269-Prevent-Saving-Bad-entities-to-chunks.patch @@ -1,4 +1,4 @@ -From 6106107cd428b364fc436b75aacb851dac9d6ad6 Mon Sep 17 00:00:00 2001 +From 46b21135bcded2c0f67837ada678ce4bbb866d7c Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 26 Jul 2018 00:11:12 -0400 Subject: [PATCH] Prevent Saving Bad entities to chunks @@ -18,10 +18,10 @@ an invalid entity. This should reduce log occurrences of dupe uuid messages. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 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 -@@ -318,6 +318,7 @@ public class ChunkRegionLoader { +@@ -319,6 +319,7 @@ public class ChunkRegionLoader { nbttagcompound1.set("TileEntities", nbttaglist1); NBTTagList nbttaglist2 = new NBTTagList(); @@ -29,7 +29,7 @@ index 1ebb16f0f6..2f749fe26a 100644 if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.LEVELCHUNK) { Chunk chunk = (Chunk) ichunkaccess; -@@ -329,13 +330,29 @@ public class ChunkRegionLoader { +@@ -330,13 +331,29 @@ public class ChunkRegionLoader { while (iterator1.hasNext()) { Entity entity = (Entity) iterator1.next(); NBTTagCompound nbttagcompound3 = new NBTTagCompound(); @@ -61,5 +61,5 @@ index 1ebb16f0f6..2f749fe26a 100644 ProtoChunk protochunk = (ProtoChunk) ichunkaccess; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0271-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0271-Ignore-Dead-Entities-in-entityList-iteration.patch index a738f1538..2360c6739 100644 --- a/Spigot-Server-Patches/0271-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0271-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -1,4 +1,4 @@ -From b5636c3e6c51d1824dda7314848a0fcb7b674da0 Mon Sep 17 00:00:00 2001 +From cce4586d627b67b551e8f3e63a58caec8168a792 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Jul 2018 12:18:27 -0400 Subject: [PATCH] Ignore Dead Entities in entityList iteration @@ -11,7 +11,7 @@ This will ensure that dead entities are skipped from iteration since they shouldn't of been in the list in the first place. diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index ce190d88d6..352a39dcb3 100644 +index 360abc05e4..391726d99c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -176,6 +176,7 @@ public class PaperCommand extends Command { @@ -23,7 +23,7 @@ index ce190d88d6..352a39dcb3 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/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 @@ -678,6 +678,7 @@ 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 @@ -126,6 +126,7 @@ 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 @@ -836,6 +836,7 @@ public class WorldServer extends World { @@ -74,7 +74,7 @@ index f6ba51d14a..168e19b206 100644 // CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs if (entity instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) entity; -@@ -1130,6 +1131,7 @@ public class WorldServer extends World { +@@ -1128,6 +1129,7 @@ public class WorldServer extends World { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -82,7 +82,7 @@ index f6ba51d14a..168e19b206 100644 new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1144,6 +1146,7 @@ public class WorldServer extends World { +@@ -1142,6 +1144,7 @@ public class WorldServer extends World { this.removeEntityFromChunk(entity); this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); @@ -91,10 +91,10 @@ 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 -@@ -846,6 +846,7 @@ public class CraftWorld implements World { +@@ -845,6 +845,7 @@ public class CraftWorld implements World { for (Object o : world.entitiesById.values()) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -102,7 +102,7 @@ index 09e6abdae2..73e0e47a61 100644 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -865,6 +866,7 @@ public class CraftWorld implements World { +@@ -864,6 +865,7 @@ public class CraftWorld implements World { for (Object o : world.entitiesById.values()) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -110,7 +110,7 @@ index 09e6abdae2..73e0e47a61 100644 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -891,6 +893,7 @@ public class CraftWorld implements World { +@@ -890,6 +892,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { @@ -118,7 +118,7 @@ index 09e6abdae2..73e0e47a61 100644 Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { -@@ -914,6 +917,7 @@ public class CraftWorld implements World { +@@ -913,6 +916,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { @@ -127,5 +127,5 @@ index 09e6abdae2..73e0e47a61 100644 if (bukkitEntity == null) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0281-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0281-Add-Early-Warning-Feature-to-WatchDog.patch index 5b072f33c..06bc37cb5 100644 --- a/Spigot-Server-Patches/0281-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0281-Add-Early-Warning-Feature-to-WatchDog.patch @@ -1,4 +1,4 @@ -From 50e490ebdc5b66293d76047c4e693b038cb1a308 Mon Sep 17 00:00:00 2001 +From 26ed76d068fb392061066468cf3cfed66e998760 Mon Sep 17 00:00:00 2001 From: miclebrick Date: Wed, 8 Aug 2018 15:30:52 -0400 Subject: [PATCH] Add Early Warning Feature to WatchDog @@ -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 @@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration; @@ -36,10 +36,10 @@ 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 -@@ -847,6 +847,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sun, 12 Aug 2018 02:33:39 -0400 Subject: [PATCH] Use a Queue for Queueing Commands @@ -6,19 +6,19 @@ Subject: [PATCH] Use a Queue for Queueing Commands Lists are bad as Queues mmmkay. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index c2c676e3bb..3d452fe0e3 100644 +index c093747bb2..c1473330fa 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -41,7 +41,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -43,7 +43,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer private static final Logger LOGGER = LogManager.getLogger(); - private static final Pattern j = Pattern.compile("^[a-fA-F0-9]{40}$"); + private static final Pattern i = Pattern.compile("^[a-fA-F0-9]{40}$"); - private final List serverCommandQueue = Collections.synchronizedList(Lists.newArrayList()); + private final java.util.Queue serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue(); // Paper - use a proper queue - private RemoteStatusListener l; + private RemoteStatusListener remoteStatusListener; public final RemoteControlCommandListener remoteControlCommandListener; private RemoteControlListener remoteControlListener; -@@ -442,8 +442,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -444,8 +444,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer public void handleCommandQueue() { MinecraftTimings.serverCommandTimer.startTiming(); // Spigot @@ -32,5 +32,5 @@ index c2c676e3bb..3d452fe0e3 100644 // CraftBukkit start - ServerCommand for preprocessing ServerCommandEvent event = new ServerCommandEvent(console, servercommand.command); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0289-Send-nearby-packets-from-world-player-list-not-serve.patch b/Spigot-Server-Patches/0289-Send-nearby-packets-from-world-player-list-not-serve.patch index 9286e8b31..c50674e21 100644 --- a/Spigot-Server-Patches/0289-Send-nearby-packets-from-world-player-list-not-serve.patch +++ b/Spigot-Server-Patches/0289-Send-nearby-packets-from-world-player-list-not-serve.patch @@ -1,11 +1,11 @@ -From 9d589cfdd87815a358293591fc32e3f2db7fb0e9 Mon Sep 17 00:00:00 2001 +From bcd425bdaac9fbe106367952d7bdd769666d014f Mon Sep 17 00:00:00 2001 From: Mystiflow Date: Fri, 6 Jul 2018 13:21:30 +0100 Subject: [PATCH] Send nearby packets from world player list not server list diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 132a2ceb78..e1799a05fd 100644 +index 9e5cd22d7d..049d702cb9 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -922,8 +922,25 @@ public abstract class PlayerList { @@ -46,10 +46,10 @@ index 132a2ceb78..e1799a05fd 100644 double d5 = d1 - entityplayer.locY; double d6 = d2 - entityplayer.locZ; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 168e19b206..d11d01d739 100644 +index 6456f21d7b..e7e6c3e949 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1179,7 +1179,7 @@ public class WorldServer extends World { +@@ -1177,7 +1177,7 @@ public class WorldServer extends World { } // CraftBukkit end this.globalEntityList.add(entitylightning); @@ -58,7 +58,7 @@ index 168e19b206..d11d01d739 100644 } @Override -@@ -1311,7 +1311,7 @@ public class WorldServer extends World { +@@ -1309,7 +1309,7 @@ public class WorldServer extends World { BlockActionData blockactiondata = (BlockActionData) this.J.removeFirst(); if (this.a(blockactiondata)) { @@ -68,10 +68,10 @@ index 168e19b206..d11d01d739 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0f4d55ad01..668bec0869 100644 +index 6918f77b79..8fa52fd630 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1911,7 +1911,7 @@ public class CraftWorld implements World { +@@ -1910,7 +1910,7 @@ public class CraftWorld implements World { double z = loc.getZ(); PacketPlayOutCustomSoundEffect packet = new PacketPlayOutCustomSoundEffect(new MinecraftKey(sound), SoundCategory.valueOf(category.name()), new Vec3D(x, y, z), volume, pitch); @@ -79,7 +79,7 @@ index 0f4d55ad01..668bec0869 100644 + world.getMinecraftServer().getPlayerList().sendPacketNearby(null, x, y, z, volume > 1.0F ? 16.0F * volume : 16.0D, this.world, packet); // Paper - this.world.dimension -> this.world } - @Override + private static Map> gamerules; -- 2.22.0 diff --git a/Spigot-Server-Patches/0291-Optimize-Hoppers.patch b/Spigot-Server-Patches/0291-Optimize-Hoppers.patch index 42c2039b6..24d4e70d2 100644 --- a/Spigot-Server-Patches/0291-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0291-Optimize-Hoppers.patch @@ -1,4 +1,4 @@ -From 61f3fd78a43d60270a91c422793b910112f56c47 Mon Sep 17 00:00:00 2001 +From f4bf1149c60116b9e9675959c53237ec0afbf000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Apr 2016 22:09:52 -0400 Subject: [PATCH] Optimize Hoppers @@ -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 @@ -482,8 +482,9 @@ 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 -@@ -1126,6 +1126,7 @@ 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 @@ -62,6 +62,7 @@ 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 @@ -189,6 +189,154 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @@ -299,5 +299,5 @@ index d2833f8842..72b4b19d7a 100644 flag = true; } else if (a(itemstack1, itemstack)) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0294-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0294-Slime-Pathfinder-Events.patch index 708775d12..51586230c 100644 --- a/Spigot-Server-Patches/0294-Slime-Pathfinder-Events.patch +++ b/Spigot-Server-Patches/0294-Slime-Pathfinder-Events.patch @@ -1,16 +1,16 @@ -From b92ac87aaa7dc9eb195df2af855c238950803372 Mon Sep 17 00:00:00 2001 +From 205a6705fadbbabd90b5db2d3cb8ef7028bb485e Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 08:18:42 -0500 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 -@@ -2,6 +2,14 @@ package net.minecraft.server; - +@@ -3,6 +3,14 @@ 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; @@ -23,7 +23,7 @@ index 96cf4bccea..e28c0673dd 100644 // CraftBukkit start import java.util.ArrayList; import java.util.List; -@@ -63,6 +71,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -64,6 +72,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { super.b(nbttagcompound); nbttagcompound.setInt("Size", this.getSize() - 1); nbttagcompound.setBoolean("wasOnGround", this.bA); @@ -31,7 +31,7 @@ index 96cf4bccea..e28c0673dd 100644 } @Override -@@ -76,6 +85,11 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -77,6 +86,11 @@ public class EntitySlime extends EntityInsentient implements IMonster { this.setSize(i + 1, false); this.bA = nbttagcompound.getBoolean("wasOnGround"); @@ -42,8 +42,8 @@ index 96cf4bccea..e28c0673dd 100644 + // Paper end } - public boolean ea() { -@@ -344,7 +358,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { + public boolean eb() { +@@ -342,7 +356,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { @Override public boolean a() { @@ -52,21 +52,21 @@ index 96cf4bccea..e28c0673dd 100644 } @Override -@@ -365,7 +379,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -363,7 +377,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { @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 -@@ -391,14 +405,18 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -389,14 +403,18 @@ public class EntitySlime extends EntityInsentient implements IMonster { @Override public boolean a() { -- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.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 @@ -82,7 +82,7 @@ index 96cf4bccea..e28c0673dd 100644 } ((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.b, false); -@@ -419,7 +437,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -417,7 +435,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { public boolean a() { EntityLiving entityliving = this.a.getGoalTarget(); @@ -99,7 +99,7 @@ index 96cf4bccea..e28c0673dd 100644 } @Override -@@ -432,7 +458,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -430,7 +456,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { public boolean b() { EntityLiving entityliving = this.a.getGoalTarget(); @@ -116,9 +116,9 @@ index 96cf4bccea..e28c0673dd 100644 } @Override -@@ -440,6 +474,13 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -438,6 +472,13 @@ public class EntitySlime extends EntityInsentient implements IMonster { this.a.a((Entity) this.a.getGoalTarget(), 10.0F, 10.0F); - ((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.dV()); + ((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.dW()); } + + // Paper start - clear timer and target when goal resets @@ -130,7 +130,7 @@ index 96cf4bccea..e28c0673dd 100644 } static class ControllerMoveSlime extends ControllerMove { -@@ -498,4 +539,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -496,4 +537,15 @@ public class EntitySlime extends EntityInsentient implements IMonster { } } } @@ -166,5 +166,5 @@ index ce6ed6e890..6e9f1b66df 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0298-Add-More-Creeper-API.patch b/Spigot-Server-Patches/0298-Add-More-Creeper-API.patch index ffa1b0e81..a3a74d9ac 100644 --- a/Spigot-Server-Patches/0298-Add-More-Creeper-API.patch +++ b/Spigot-Server-Patches/0298-Add-More-Creeper-API.patch @@ -1,11 +1,11 @@ -From 3ab6ffe1a1dafdc0ec4bd187ceae8a5b85a3a7f9 Mon Sep 17 00:00:00 2001 +From 189f599e1faf4412d64ea4b877a2a741d661f45f Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 11:50:26 -0500 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 @@ -13,7 +13,7 @@ public class EntityCreeper extends EntityMonster { @@ -17,19 +17,15 @@ index 7181c663ae..165b07e142 100644 public int maxFuseTicks = 30; public int explosionRadius = 3; private int bD; -@@ -201,6 +201,7 @@ public class EntityCreeper extends EntityMonster { - return super.a(entityhuman, enumhand); +@@ -253,7 +253,18 @@ public class EntityCreeper extends EntityMonster { } -+ 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; -@@ -252,8 +253,19 @@ 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 @@ -88,4 +88,18 @@ public class CraftCreeper extends CraftMonster implements Creeper { diff --git a/Spigot-Server-Patches/0300-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0300-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 2a10c13db..163afe5e2 100644 --- a/Spigot-Server-Patches/0300-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/0300-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -1,4 +1,4 @@ -From 4cf836c73e6caba2b0b87b893ba7e7c7981d79d0 Mon Sep 17 00:00:00 2001 +From 8c1c73a5a0258885c544039294c3636e512e5d5f Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 2 Sep 2018 19:34:33 -0700 Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 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 -@@ -477,7 +477,7 @@ public class CraftWorld implements World { +@@ -476,7 +476,7 @@ public class CraftWorld implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp( "chunk load"); // Spigot @@ -19,5 +19,5 @@ index 8499bad15b..d4bad21560 100644 // If generate = false, but the chunk already exists, we will get this back. if (chunk instanceof ProtoChunkExtension) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0302-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0302-Expose-attack-cooldown-methods-for-Player.patch index 7700919f6..55e6b74e3 100644 --- a/Spigot-Server-Patches/0302-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0302-Expose-attack-cooldown-methods-for-Player.patch @@ -1,36 +1,36 @@ -From 2c1af33908f362dcc06260910f368e13906c5155 Mon Sep 17 00:00:00 2001 +From d53e95e2836fe0a5f6c19430161a2d55ebdf76b4 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 4 Sep 2018 15:02:00 -0500 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 @@ -2004,14 +2004,17 @@ 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 -@@ -1920,6 +1920,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1929,6 +1929,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } @@ -52,5 +52,5 @@ index a22bb25ff7..7e2d4f4527 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0303-Improve-death-events.patch b/Spigot-Server-Patches/0303-Improve-death-events.patch index 8f1b125a4..d14b6f653 100644 --- a/Spigot-Server-Patches/0303-Improve-death-events.patch +++ b/Spigot-Server-Patches/0303-Improve-death-events.patch @@ -1,4 +1,4 @@ -From 8586cf5d11612c96160a4e2886412ee2f45da753 Mon Sep 17 00:00:00 2001 +From e258830906f96b0c910558963d98251753285c78 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 21 Aug 2018 01:39:35 +0100 Subject: [PATCH] Improve death events @@ -27,10 +27,10 @@ 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 -@@ -1467,6 +1467,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1516,6 +1516,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return false; } @@ -38,7 +38,7 @@ index 8a95e0f117..3a41137298 100644 public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -2360,6 +2361,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2409,6 +2410,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance = 0.0F; } @@ -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 @@ -676,7 +676,8 @@ 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 @@ -597,15 +597,25 @@ 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 @@ -85,7 +85,7 @@ 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 @@ -136,35 +136,20 @@ index 19e7114cbb..c357339c26 100644 } } else if (flag1) { this.c(damagesource); -@@ -1329,22 +1334,40 @@ public abstract class EntityLiving extends Entity { +@@ -1329,6 +1334,7 @@ public abstract class EntityLiving extends Entity { 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); + } +@@ -1340,11 +1346,29 @@ 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 { @@ -191,23 +176,22 @@ index 19e7114cbb..c357339c26 100644 boolean flag = false; if (entityliving instanceof EntityWither) { -@@ -1371,7 +1394,8 @@ public abstract class EntityLiving extends Entity { +@@ -1371,7 +1395,8 @@ public abstract class EntityLiving extends Entity { } } - 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; -@@ -1382,19 +1406,20 @@ public abstract class EntityLiving extends Entity { - } +@@ -1383,18 +1408,20 @@ 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,13 +205,13 @@ 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() {} -@@ -1448,6 +1473,7 @@ public abstract class EntityLiving extends Entity { + protected void cF() {} +@@ -1448,6 +1475,7 @@ public abstract class EntityLiving extends Entity { return SoundEffects.ENTITY_GENERIC_HURT; } @@ -235,7 +219,7 @@ index 19e7114cbb..c357339c26 100644 @Nullable protected SoundEffect getSoundDeath() { return SoundEffects.ENTITY_GENERIC_DEATH; -@@ -1897,10 +1923,12 @@ public abstract class EntityLiving extends Entity { +@@ -1897,10 +1925,12 @@ public abstract class EntityLiving extends Entity { } @@ -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 @@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -263,7 +247,7 @@ index 7519827a88..a0f27f1bcb 100644 // CraftBukkit start public String displayName; -@@ -531,6 +535,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -533,6 +537,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { String deathmessage = defaultMessage.getString(); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); @@ -279,7 +263,7 @@ index 7519827a88..a0f27f1bcb 100644 // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { -@@ -684,8 +697,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -686,8 +699,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } @@ -327,10 +311,10 @@ 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 -@@ -1713,7 +1713,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1722,7 +1722,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { diff --git a/Spigot-Server-Patches/0308-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0308-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index 87d713e7e..f5d8de260 100644 --- a/Spigot-Server-Patches/0308-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/0308-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -1,11 +1,11 @@ -From 66cbb8fdb84a9bfa90faa2381beddd06044eb30f Mon Sep 17 00:00:00 2001 +From 86cae0eb8c73217a6d7794e9ee45438295abdea5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:56:36 -0400 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 @@ -12,11 +12,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget { @@ -53,18 +53,18 @@ 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 -@@ -93,6 +93,7 @@ public class RandomPositionGenerator { +@@ -99,6 +99,7 @@ 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); -@@ -161,6 +162,7 @@ public class RandomPositionGenerator { + blockposition2 = a(blockposition2, entitycreature); +@@ -165,6 +166,7 @@ public class RandomPositionGenerator { } private static boolean b(BlockPosition blockposition, EntityCreature entitycreature) { @@ -74,5 +74,5 @@ index b286934aa8..c7e25e2be8 100644 } } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0312-Support-Overriding-World-Seeds.patch b/Spigot-Server-Patches/0312-Support-Overriding-World-Seeds.patch index 949475c5f..0b66870f5 100644 --- a/Spigot-Server-Patches/0312-Support-Overriding-World-Seeds.patch +++ b/Spigot-Server-Patches/0312-Support-Overriding-World-Seeds.patch @@ -1,4 +1,4 @@ -From d5e814c18e143aed265a482153e16b4d874af317 Mon Sep 17 00:00:00 2001 +From 5548bc55f2ee3c119aaafa5b98fce9ac6d640f0c Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Sep 2018 23:05:31 -0400 Subject: [PATCH] Support Overriding World Seeds @@ -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 @@ -11,6 +11,7 @@ import java.lang.reflect.Modifier; @@ -59,10 +59,10 @@ 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 -@@ -363,7 +363,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 17 Sep 2018 23:37:31 -0400 Subject: [PATCH] Optimize Server World Map @@ -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 @@ -78,7 +78,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 18 Sep 2018 23:53:23 +0100 Subject: [PATCH] PreSpawnerSpawnEvent @@ -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 -@@ -105,14 +105,14 @@ public abstract class MobSpawnerAbstract { +@@ -110,11 +110,11 @@ 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; @@ -32,5 +28,5 @@ index 55764dee..b2e6e2a7 100644 if (!event.callEvent()) { flag = true; -- -2.20.1 +2.22.0 diff --git a/Spigot-Server-Patches/0315-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0315-Catch-JsonParseException-in-Entity-and-TE-names.patch index 08df58b85..741771872 100644 --- a/Spigot-Server-Patches/0315-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/Spigot-Server-Patches/0315-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -1,4 +1,4 @@ -From b685fe9015afdcd0227b69d06a2a5a4275bf760b Mon Sep 17 00:00:00 2001 +From 67af7389de4a9e9b9888c17ae13ea44ce885f215 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 22 Sep 2018 15:56:59 -0400 Subject: [PATCH] Catch JsonParseException in Entity and TE names @@ -13,7 +13,7 @@ Shulkers) may need to be changed in order for it to re-save properly No more crashing though. diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -index 4b7aefb7a7..9e568d5d15 100644 +index 7f9030fa8a..9d8fc3aa96 100644 --- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java @@ -56,7 +56,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { @@ -26,10 +26,10 @@ index 4b7aefb7a7..9e568d5d15 100644 if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3a41137298..a6e5ac070c 100644 +index a92489e62a..97aa07398d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1651,7 +1651,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1700,7 +1700,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.setPosition(this.locX, this.locY, this.locZ); this.setYawPitch(this.yaw, this.pitch); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { @@ -89,5 +89,5 @@ index 473ec2cbde..ab6b86e4e9 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0321-Add-sun-related-API.patch b/Spigot-Server-Patches/0321-Add-sun-related-API.patch index c9223e2fd..17b00c2fa 100644 --- a/Spigot-Server-Patches/0321-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0321-Add-sun-related-API.patch @@ -1,23 +1,23 @@ -From de658a99cc0c2fd95317f1a9c12f394aa3dec85f Mon Sep 17 00:00:00 2001 +From 4125334677d5034e6a5e79ff4e99dc2ed79f616f Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 00:54:21 -0500 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 -@@ -1326,6 +1326,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1327,6 +1327,7 @@ 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 @@ -705,6 +705,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -29,10 +29,10 @@ 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 -@@ -739,6 +739,13 @@ public class CraftWorld implements World { +@@ -738,6 +738,13 @@ 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 @@ -68,4 +68,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { diff --git a/Spigot-Server-Patches/0324-Turtle-API.patch b/Spigot-Server-Patches/0324-Turtle-API.patch index d1be79068..a50b9c913 100644 --- a/Spigot-Server-Patches/0324-Turtle-API.patch +++ b/Spigot-Server-Patches/0324-Turtle-API.patch @@ -1,14 +1,14 @@ -From b141aec4c5d08b4a8cc141983d81356618ee6869 Mon Sep 17 00:00:00 2001 +From 0ad7b12ff33efd1c3f492027e1560f7ac5214a57 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 29 Sep 2018 16:08:23 -0500 Subject: [PATCH] Turtle API diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 89792eec45..e4eecf5688 100644 +index 013b3a1ca8..0037d13806 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java -@@ -27,51 +27,63 @@ public class EntityTurtle extends EntityAnimal { +@@ -26,51 +26,63 @@ public class EntityTurtle extends EntityAnimal { this.K = 1.0F; } @@ -17,23 +17,23 @@ index 89792eec45..e4eecf5688 100644 this.datawatcher.set(EntityTurtle.bA, blockposition); } -+ public BlockPosition getHome() { return dX(); } // Paper - OBFHELPER - private BlockPosition dX() { ++ public BlockPosition getHome() { return dY(); } // Paper - OBFHELPER + private BlockPosition dY() { return (BlockPosition) this.datawatcher.get(EntityTurtle.bA); } + public void setTravelPos(BlockPosition pos) { h(pos); } // Paper - OBFHELPER private void h(BlockPosition blockposition) { - this.datawatcher.set(EntityTurtle.bE, blockposition); + this.datawatcher.set(EntityTurtle.bD, blockposition); } -+ public BlockPosition getTravelPos() { return dY(); } // Paper - OBFHELPER - private BlockPosition dY() { - return (BlockPosition) this.datawatcher.get(EntityTurtle.bE); ++ public BlockPosition getTravelPos() { return dZ(); } // Paper - OBFHELPER + private BlockPosition dZ() { + return (BlockPosition) this.datawatcher.get(EntityTurtle.bD); } -+ public boolean hasEgg() { return dV(); } // Paper - OBFHELPER - public boolean dV() { ++ public boolean hasEgg() { return dW(); } // Paper - OBFHELPER + public boolean dW() { return (Boolean) this.datawatcher.get(EntityTurtle.bB); } @@ -43,42 +43,42 @@ index 89792eec45..e4eecf5688 100644 } + public boolean isDigging() { return dW(); } // Paper - OBFHELPER - public boolean dW() { - return (Boolean) this.datawatcher.get(EntityTurtle.bD); + public boolean dX() { + return (Boolean) this.datawatcher.get(EntityTurtle.bC); } + public void setDigging(boolean digging) { s(digging); } // Paper - OBFHELPER private void s(boolean flag) { - this.bH = flag ? 1 : 0; - this.datawatcher.set(EntityTurtle.bD, flag); + this.bG = flag ? 1 : 0; + this.datawatcher.set(EntityTurtle.bC, flag); } -+ public boolean isGoingHome() { return dZ(); } // Paper - OBFHELPER - private boolean dZ() { - return (Boolean) this.datawatcher.get(EntityTurtle.bF); ++ public boolean isGoingHome() { return ea(); } // Paper - OBFHELPER + private boolean ea() { + return (Boolean) this.datawatcher.get(EntityTurtle.bE); } + public void setGoingHome(boolean goingHome) { t(goingHome); } // Paper - OBFHELPER private void t(boolean flag) { - this.datawatcher.set(EntityTurtle.bF, flag); + this.datawatcher.set(EntityTurtle.bE, flag); } -+ public boolean isTravelling() { return ee(); } // Paper - OBFHELPER - private boolean ee() { - return (Boolean) this.datawatcher.get(EntityTurtle.bG); ++ public boolean isTravelling() { return ef(); } // Paper - OBFHELPER + private boolean ef() { + return (Boolean) this.datawatcher.get(EntityTurtle.bF); } + public void setTravelling(boolean travelling) { u(travelling); } // Paper - OBFHELPER private void u(boolean flag) { - this.datawatcher.set(EntityTurtle.bG, flag); + this.datawatcher.set(EntityTurtle.bF, flag); } -@@ -445,14 +457,18 @@ public class EntityTurtle extends EntityAnimal { +@@ -441,14 +453,18 @@ public class EntityTurtle extends EntityAnimal { if (!this.g.isInWater() && this.k()) { - if (this.g.bH < 1) { + if (this.g.bG < 1) { - this.g.s(true); + this.g.setDigging(new com.destroystokyo.paper.event.entity.TurtleStartDiggingEvent((org.bukkit.entity.Turtle) this.g.getBukkitEntity(), MCUtil.toLocation(this.g.world, this.e)).callEvent()); // Paper - } else if (this.g.bH > 200) { + } else if (this.g.bG > 200) { World world = this.g.world; // CraftBukkit start @@ -94,12 +94,12 @@ index 89792eec45..e4eecf5688 100644 } // CraftBukkit end this.g.r(false); -@@ -587,7 +603,7 @@ public class EntityTurtle extends EntityAnimal { +@@ -583,7 +599,7 @@ public class EntityTurtle extends EntityAnimal { @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 @@ -154,5 +154,5 @@ index 123a2c75ca..8edcf7af65 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0325-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0325-Limit-lightning-strike-effect-distance.patch index f76a4ca8f..6e9d86782 100644 --- a/Spigot-Server-Patches/0325-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0325-Limit-lightning-strike-effect-distance.patch @@ -1,4 +1,4 @@ -From a41e66f8e872a88baf4b2e94dd59cbf4156a2a42 Mon Sep 17 00:00:00 2001 +From 5707a4a4389fbc4341302f33aac2ea2d467ae792 Mon Sep 17 00:00:00 2001 From: Trigary Date: Fri, 14 Sep 2018 17:42:08 +0200 Subject: [PATCH] Limit lightning strike effect distance @@ -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 @@ -64,6 +64,17 @@ public class EntityLightning extends Entity { @@ -69,10 +69,10 @@ 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 -@@ -1179,7 +1179,7 @@ public class WorldServer extends World { +@@ -1177,7 +1177,7 @@ public class WorldServer extends World { } // CraftBukkit end this.globalEntityList.add(entitylightning); @@ -82,5 +82,5 @@ index d11d01d739..3c986857b2 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0327-Call-player-spectator-target-events.patch b/Spigot-Server-Patches/0327-Call-player-spectator-target-events.patch index 1afdb2d9b..13557d312 100644 --- a/Spigot-Server-Patches/0327-Call-player-spectator-target-events.patch +++ b/Spigot-Server-Patches/0327-Call-player-spectator-target-events.patch @@ -1,11 +1,11 @@ -From df37016c278c1503a09326889f4e1c1ba3f27004 Mon Sep 17 00:00:00 2001 +From 2425f20e4ff9199babe673896396a4a7ec8100ce Mon Sep 17 00:00:00 2001 From: Caleb Bassham Date: Fri, 28 Sep 2018 02:32:19 -0500 Subject: [PATCH] Call player spectator target events diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index a0f27f1bcb..314ff6aadb 100644 +index 418a2cf0f4..160f456e27 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -17,7 +17,7 @@ index a0f27f1bcb..314ff6aadb 100644 public boolean worldChangeInvuln; private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER private final RecipeBookServer recipeBook; -@@ -1572,15 +1572,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1574,15 +1574,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } diff --git a/Spigot-Server-Patches/0331-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0331-Add-option-to-prevent-players-from-moving-into-unloa.patch index 8c1328492..759fcd051 100644 --- a/Spigot-Server-Patches/0331-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0331-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -1,4 +1,4 @@ -From cf85ce0bc68ae3d516f2cf9ff996f0e62ad7ab9c Mon Sep 17 00:00:00 2001 +From 4a429a8d6840632e23bf6935b380161f2c4cd79f Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Mon, 22 Oct 2018 17:34:10 +0200 Subject: [PATCH] Add option to prevent players from moving into unloaded @@ -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 @@ -347,6 +347,13 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -49,20 +49,19 @@ index 0aa1e2a057..ce0e93fffa 100644 float f = packetplayinflying.a(this.player.yaw); float f1 = packetplayinflying.b(this.player.pitch); double d7 = d4 - this.l; -@@ -933,6 +940,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -932,6 +939,12 @@ 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; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0332-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0332-Reset-players-airTicks-on-respawn.patch index 923e064f7..a0fb32f27 100644 --- a/Spigot-Server-Patches/0332-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0332-Reset-players-airTicks-on-respawn.patch @@ -1,27 +1,26 @@ -From 2f2dbc48eecd5b2119a5a819dcb143a3383a8ffe Mon Sep 17 00:00:00 2001 +From fcfca6656d0e97778a35e40d5308be7b1b937a5b Mon Sep 17 00:00:00 2001 From: GreenMeanie Date: Sat, 20 Oct 2018 22:34:02 -0400 Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a6e5ac070c..85106e601c 100644 +index 97aa07398d..6a2a4576e9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2273,7 +2273,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2322,6 +2322,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } -- public int bo() { -+ public int getMaxAirTicks() { return bo(); } public int bo() { ++ public int getMaxAirTicks() { return bp(); } // Paper - OBFHELPER + public int bp() { return 300; } - diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 314ff6aadb..e8bc1634ef 100644 +index 160f456e27..b190515f73 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1860,6 +1860,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1862,6 +1862,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); diff --git a/Spigot-Server-Patches/0337-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0337-Optimize-World-Time-Updates.patch index c734edf2e..3dc9392bb 100644 --- a/Spigot-Server-Patches/0337-Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/0337-Optimize-World-Time-Updates.patch @@ -1,4 +1,4 @@ -From b897d9a8974a3012d302df916e4a374b7be1ae99 Mon Sep 17 00:00:00 2001 +From ab477a2841453fbb8110b45953360c08f760ae77 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 2 Nov 2018 23:11:51 -0400 Subject: [PATCH] Optimize World Time Updates @@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2bd1e73702..99306781f7 100644 +index 2198b4fbc9..252c50bb72 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1110,12 +1110,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sun, 11 Nov 2018 21:01:09 +0000 Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ce0e93fffa..b506215b29 100644 +index 806eb626cb..82c6d89a0c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1252,6 +1252,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1251,6 +1251,11 @@ public class PlayerConnection implements PacketListenerPlayIn { case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: @@ -21,5 +21,5 @@ index ce0e93fffa..b506215b29 100644 double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D; double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0343-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0343-force-entity-dismount-during-teleportation.patch index af82b278e..ad66af0f1 100644 --- a/Spigot-Server-Patches/0343-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0343-force-entity-dismount-during-teleportation.patch @@ -1,4 +1,4 @@ -From 66a76ef30f11e0d87fe4190a40a55eb61266015d Mon Sep 17 00:00:00 2001 +From e77f487b60e7b816cf7e5ea3c616ef9a9b2db490 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 15 Nov 2018 13:38:37 +0000 Subject: [PATCH] force entity dismount during teleportation @@ -20,10 +20,10 @@ 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 -@@ -1995,12 +1995,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2044,12 +2044,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -41,7 +41,7 @@ index 85106e601c..73bd0c278a 100644 } } -@@ -2051,7 +2054,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2100,7 +2103,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return true; // CraftBukkit } @@ -53,7 +53,7 @@ index 85106e601c..73bd0c278a 100644 if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2061,7 +2067,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2110,7 +2116,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) getBukkitEntity(), @@ -62,7 +62,7 @@ index 85106e601c..73bd0c278a 100644 ); Bukkit.getPluginManager().callEvent(event); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); -@@ -2072,7 +2078,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2121,7 +2127,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end // Spigot start @@ -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 @@ -937,9 +937,11 @@ public abstract class EntityHuman extends EntityLiving { @@ -91,10 +91,10 @@ 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 -@@ -2667,11 +2667,13 @@ public abstract class EntityLiving extends Entity { +@@ -2669,11 +2669,13 @@ public abstract class EntityLiving extends Entity { return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0; } @@ -112,10 +112,10 @@ 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 -@@ -1000,11 +1000,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1002,11 +1002,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } diff --git a/Spigot-Server-Patches/0346-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0346-Add-more-Zombie-API.patch index 47600904d..ea25781bc 100644 --- a/Spigot-Server-Patches/0346-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0346-Add-more-Zombie-API.patch @@ -1,14 +1,14 @@ -From cc47ad5f4d7d034bf30c6dd92d532560110005cf Mon Sep 17 00:00:00 2001 +From 578a5d0e5b5fa5d1f29dec8f145495703f1a8915 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 04:29:59 -0500 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 -@@ -1246,6 +1246,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1247,6 +1247,8 @@ public abstract class EntityInsentient extends EntityLiving { this.datawatcher.set(EntityInsentient.b, flag ? (byte) (b0 | 2) : (byte) (b0 & -3)); } @@ -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 @@ -31,6 +31,7 @@ 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)) { @@ -374,6 +390,7 @@ 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 @@ -138,5 +138,5 @@ index 0429cf020e..c4320dbb67 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0352-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0352-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 3ddc733c0..1c12247c0 100644 --- a/Spigot-Server-Patches/0352-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0352-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -1,4 +1,4 @@ -From 418c93f6a9f05c56fb481b7dde67560b2123114b Mon Sep 17 00:00:00 2001 +From c5e3444a1fddac8467db394d2347923750958228 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Jan 2019 00:35:43 -0600 Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed @@ -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 @@ -75,6 +75,7 @@ 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 @@ -94,6 +94,7 @@ public abstract class PlayerList { @@ -106,10 +106,10 @@ 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 -@@ -138,6 +138,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -140,6 +140,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index bd87a1cf2c..b701e43681 100644 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1364,6 +1365,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1373,6 +1374,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index bd87a1cf2c..b701e43681 100644 public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1386,6 +1399,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1395,6 +1408,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index bd87a1cf2c..b701e43681 100644 if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1400,6 +1415,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1409,6 +1424,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); @@ -163,5 +163,5 @@ index bd87a1cf2c..b701e43681 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0354-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0354-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index b3a403d6b..5b9e0b6e5 100644 --- a/Spigot-Server-Patches/0354-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/Spigot-Server-Patches/0354-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -1,14 +1,14 @@ -From 04d4e3a892ffbf7855ac3ffe7206acf2bf47044b Mon Sep 17 00:00:00 2001 +From 6f0a808e6ee8ae193b8132c09b0ed55f60d57d48 Mon Sep 17 00:00:00 2001 From: connorhartley Date: Mon, 7 Jan 2019 14:43:48 -0600 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 -@@ -1283,6 +1283,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1285,6 +1285,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void n() { this.ct = true; this.ejectPassengers(); diff --git a/Spigot-Server-Patches/0356-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0356-Block-Entity-remove-from-being-called-on-Players.patch index eb8f20a7b..589b239e8 100644 --- a/Spigot-Server-Patches/0356-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0356-Block-Entity-remove-from-being-called-on-Players.patch @@ -1,4 +1,4 @@ -From 064f738e3f6785dc74a03fa4e97cc0ed2bc72eb1 Mon Sep 17 00:00:00 2001 +From 809317fe833f2b9ee60205da6154299c8051ab5b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 4 Feb 2019 23:33:24 -0500 Subject: [PATCH] Block Entity#remove from being called on Players @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b701e43681..484b21f453 100644 +index de1b874f3d..9cf6330ab6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1965,6 +1965,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1974,6 +1974,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } @@ -32,5 +32,5 @@ index b701e43681..484b21f453 100644 // Spigot start -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0360-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0360-Fix-sign-edit-memory-leak.patch index 94efc4761..77b57afd6 100644 --- a/Spigot-Server-Patches/0360-Fix-sign-edit-memory-leak.patch +++ b/Spigot-Server-Patches/0360-Fix-sign-edit-memory-leak.patch @@ -1,4 +1,4 @@ -From 796f4f452a911215ff597a63f905aced025a0666 Mon Sep 17 00:00:00 2001 +From 8100dac0461c94d36fed58875296ea3437b63f76 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 Feb 2019 00:15:28 -0500 Subject: [PATCH] Fix sign edit memory leak @@ -6,10 +6,10 @@ Subject: [PATCH] Fix sign edit memory leak when a player edits a sign, a reference to their Entity is never cleand up. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 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 -@@ -2567,7 +2567,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2566,7 +2566,7 @@ public class PlayerConnection implements PacketListenerPlayIn { TileEntitySign tileentitysign = (TileEntitySign) tileentity; @@ -43,5 +43,5 @@ index 15b3add9ed..caeaca4c7a 100644 public EntityHuman f() { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0361-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0361-Limit-Client-Sign-length-more.patch index b3bbc983b..efdf60a72 100644 --- a/Spigot-Server-Patches/0361-Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/0361-Limit-Client-Sign-length-more.patch @@ -1,4 +1,4 @@ -From 492bb30aa18f1642b3d8109c8d6b9a941a49333d Mon Sep 17 00:00:00 2001 +From ed4d3806bd4c2dbb3bf90b730060219dedc26054 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Feb 2019 22:18:40 -0500 Subject: [PATCH] Limit Client Sign length more @@ -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 @@ -103,6 +103,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -33,7 +33,7 @@ index ec4b693730..69d39a47ba 100644 private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { -@@ -2583,6 +2584,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2582,6 +2583,15 @@ public class PlayerConnection implements PacketListenerPlayIn { String[] lines = new String[4]; for (int i = 0; i < astring.length; ++i) { @@ -50,5 +50,5 @@ index ec4b693730..69d39a47ba 100644 } SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0367-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0367-Add-LivingEntity-getTargetEntity.patch index ab45a027f..9295a937b 100644 --- a/Spigot-Server-Patches/0367-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0367-Add-LivingEntity-getTargetEntity.patch @@ -1,4 +1,4 @@ -From 2c5a38097a0651308b0c8497618afcf1336137a6 Mon Sep 17 00:00:00 2001 +From 91fef12ff0f535a111e89817d5ed4bba7433d569 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 22 Sep 2018 00:33:08 -0500 Subject: [PATCH] Add LivingEntity#getTargetEntity @@ -46,10 +46,10 @@ 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 -@@ -1447,6 +1447,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1496,6 +1496,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.c(f - 90.0F, f1); } @@ -57,19 +57,19 @@ index 73bd0c278a..6bd88e1d3e 100644 public Vec3D j(float f) { if (f == 1.0F) { return new Vec3D(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ); -@@ -2094,6 +2095,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2143,6 +2144,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke 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 -@@ -3223,6 +3223,37 @@ public abstract class EntityLiving extends Entity { +@@ -3225,6 +3225,37 @@ public abstract class EntityLiving extends Entity { return world.rayTrace(raytrace); } @@ -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 @@ -18,6 +18,7 @@ public final class IEntitySelector { @@ -158,5 +158,5 @@ index d5c4115a85..c4aa1945ff 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0369-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0369-Entity-getEntitySpawnReason.patch index 18daf27cb..893439721 100644 --- a/Spigot-Server-Patches/0369-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0369-Entity-getEntitySpawnReason.patch @@ -1,4 +1,4 @@ -From 61c89aa37a06c42868830eb0c65b2495630ba62f Mon Sep 17 00:00:00 2001 +From 14e3a8daeb331da5d5ad4e290970d76b045ff515 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 00:24:52 -0400 Subject: [PATCH] Entity#getEntitySpawnReason @@ -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 @@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -21,7 +21,7 @@ index 6bd88e1d3e..658c493cd3 100644 // Paper end static boolean isLevelAtLeast(NBTTagCompound tag, int level) { return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; -@@ -1592,6 +1593,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1641,6 +1642,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -31,7 +31,7 @@ index 6bd88e1d3e..658c493cd3 100644 // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); -@@ -1726,6 +1730,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1775,6 +1779,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -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 @@ -250,7 +250,7 @@ public abstract class PlayerList { @@ -72,10 +72,10 @@ 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 -@@ -932,6 +932,7 @@ public class WorldServer extends World { +@@ -930,6 +930,7 @@ public class WorldServer extends World { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot @@ -99,5 +99,5 @@ index 1cd3448e57..15042943c9 100644 // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0370-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0370-Update-entity-Metadata-for-all-tracked-players.patch index 508e51a59..5e09222e8 100644 --- a/Spigot-Server-Patches/0370-Update-entity-Metadata-for-all-tracked-players.patch +++ b/Spigot-Server-Patches/0370-Update-entity-Metadata-for-all-tracked-players.patch @@ -1,11 +1,11 @@ -From c8f5fe34c25b6b569a5ecc7408ffc112270a6d6e Mon Sep 17 00:00:00 2001 +From 71c33d54d04aa982d402132b281bf4ff734d3575 Mon Sep 17 00:00:00 2001 From: AgentTroll Date: Fri, 22 Mar 2019 22:24:03 -0700 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 @@ -379,6 +379,12 @@ public class EntityTrackerEntry { @@ -22,10 +22,10 @@ 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 -@@ -2027,7 +2027,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2026,7 +2026,7 @@ public class PlayerConnection implements PacketListenerPlayIn { if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) { // Refresh the current entity metadata @@ -35,5 +35,5 @@ index 69d39a47ba..4e8b8f49c4 100644 if (event.isCancelled()) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0375-Server-Tick-Events.patch b/Spigot-Server-Patches/0375-Server-Tick-Events.patch index 94a59191c..f957d7a62 100644 --- a/Spigot-Server-Patches/0375-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0375-Server-Tick-Events.patch @@ -1,4 +1,4 @@ -From 5c3096d7934771b69f783a5d6cf3c1a6bb682e93 Mon Sep 17 00:00:00 2001 +From 4410433c260bf8f18b5a7cbe2f4b0b3feb104254 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Mar 2019 22:48:45 -0400 Subject: [PATCH] Server Tick Events @@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 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 -@@ -1041,6 +1041,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 27 Mar 2019 23:01:33 -0400 Subject: [PATCH] PlayerDeathEvent#getItemsToKeep @@ -8,10 +8,10 @@ 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 -@@ -508,6 +508,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -510,6 +510,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting { }); } @@ -57,8 +57,8 @@ index 06ca6cbf05..d273546676 100644 + @Override public void die(DamageSource damagesource) { - boolean flag = this.world.getGameRules().getBoolean("showDeathMessages"); -@@ -592,7 +632,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + boolean flag = this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES); +@@ -594,7 +634,12 @@ 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. if (!event.getKeepInventory()) { diff --git a/Spigot-Server-Patches/0377-Optimize-Persistent-Data-Loading.patch b/Spigot-Server-Patches/0377-Optimize-Persistent-Data-Loading.patch index 972070584..4e78e4e53 100644 --- a/Spigot-Server-Patches/0377-Optimize-Persistent-Data-Loading.patch +++ b/Spigot-Server-Patches/0377-Optimize-Persistent-Data-Loading.patch @@ -1,4 +1,4 @@ -From 7650bdc00afbdf24bfd7808de478096637b56178 Mon Sep 17 00:00:00 2001 +From a576811cfbd84b86003b6d81569f8e4399447a10 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Mar 2019 01:25:11 -0400 Subject: [PATCH] Optimize Persistent Data Loading @@ -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 @@ -26,6 +26,7 @@ public class WorldPersistentData { @@ -25,31 +25,35 @@ index 47a4ea9985..62081349f1 100644 private File a(String s) { return new File(this.d, s + ".dat"); -@@ -46,6 +47,7 @@ public class WorldPersistentData { +@@ -46,14 +47,17 @@ public class WorldPersistentData { @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) { -@@ -58,13 +60,13 @@ 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) { -@@ -72,6 +74,7 @@ public class WorldPersistentData { + @Nullable +@@ -66,7 +70,7 @@ 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); +@@ -80,6 +84,7 @@ public class WorldPersistentData { } public NBTTagCompound a(String s, int i) throws IOException { @@ -58,5 +62,5 @@ index 47a4ea9985..62081349f1 100644 PushbackInputStream pushbackinputstream = new PushbackInputStream(new FileInputStream(file), 2); Throwable throwable = null; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0378-Allow-login-events-to-fire-only-after-the-server-plu.patch b/Spigot-Server-Patches/0378-Allow-login-events-to-fire-only-after-the-server-plu.patch index b5c3f3a6e..166710682 100644 --- a/Spigot-Server-Patches/0378-Allow-login-events-to-fire-only-after-the-server-plu.patch +++ b/Spigot-Server-Patches/0378-Allow-login-events-to-fire-only-after-the-server-plu.patch @@ -1,4 +1,4 @@ -From 2032fe6a3574b741622b9ff0f10d215fef097a43 Mon Sep 17 00:00:00 2001 +From ea6d715ab826c8709c7918f7975b7a8c1bcf92a4 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 31 Mar 2019 22:02:24 -0700 Subject: [PATCH] Allow login events to fire only after the server plugins are @@ -56,10 +56,10 @@ 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 -@@ -462,6 +462,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 4 Apr 2019 17:55:05 -0700 Subject: [PATCH] Optimize GameRules to use LinkedHashMap @@ -6,61 +6,20 @@ 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 -@@ -17,7 +17,17 @@ import javax.annotation.Nullable; - +@@ -21,9 +21,7 @@ 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)); -@@ -51,8 +61,8 @@ 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(); -@@ -116,7 +126,7 @@ 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 -@@ -21,7 +21,7 @@ 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)); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0382-Add-Heightmap-API.patch b/Spigot-Server-Patches/0382-Add-Heightmap-API.patch index 29437cf96..5ce307a34 100644 --- a/Spigot-Server-Patches/0382-Add-Heightmap-API.patch +++ b/Spigot-Server-Patches/0382-Add-Heightmap-API.patch @@ -1,11 +1,11 @@ -From ef721ff30a757fd89c12f4626722aa0d975c7cd1 Mon Sep 17 00:00:00 2001 +From d43430cb8341c10e61d274322abd2f2bf2f7e232 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 1 Jan 2019 02:22:01 -0800 Subject: [PATCH] Add Heightmap API diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a9c5ded5b..67b155c19 100644 +index ef080f9571..0acdb527d9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -663,8 +663,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -20,10 +20,10 @@ index a9c5ded5b..67b155c19 100644 if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 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 -@@ -317,6 +317,29 @@ public class CraftWorld implements World { +@@ -316,6 +316,29 @@ public class CraftWorld implements World { return world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(x, 0, z)).getY(); } diff --git a/Spigot-Server-Patches/0384-Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/0384-Mob-Spawner-API-Enhancements.patch index c5c49bde4..af27c0392 100644 --- a/Spigot-Server-Patches/0384-Mob-Spawner-API-Enhancements.patch +++ b/Spigot-Server-Patches/0384-Mob-Spawner-API-Enhancements.patch @@ -1,11 +1,11 @@ -From c91dc0dfd1f7ee8c55843eb67d03e2a0e465edbd Mon Sep 17 00:00:00 2001 +From 19b0039af57b4e43f2f1926fd0611b231021a67c Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Fri, 19 Apr 2019 12:41:13 -0500 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 @@ -46,6 +46,7 @@ public abstract class MobSpawnerAbstract { @@ -16,7 +16,7 @@ index dbb8098d6c..e9bcb5abaa 100644 private boolean h() { BlockPosition blockposition = this.b(); -@@ -205,6 +206,7 @@ public abstract class MobSpawnerAbstract { +@@ -206,6 +207,7 @@ public abstract class MobSpawnerAbstract { } } @@ -24,7 +24,7 @@ index dbb8098d6c..e9bcb5abaa 100644 private void i() { if (this.maxSpawnDelay <= this.minSpawnDelay) { this.spawnDelay = this.minSpawnDelay; -@@ -222,7 +224,13 @@ public abstract class MobSpawnerAbstract { +@@ -223,7 +225,13 @@ public abstract class MobSpawnerAbstract { } public void a(NBTTagCompound nbttagcompound) { @@ -38,7 +38,7 @@ index dbb8098d6c..e9bcb5abaa 100644 this.mobs.clear(); if (nbttagcompound.hasKeyOfType("SpawnPotentials", 9)) { NBTTagList nbttaglist = nbttagcompound.getList("SpawnPotentials", 10); -@@ -237,10 +245,15 @@ public abstract class MobSpawnerAbstract { +@@ -238,10 +246,15 @@ public abstract class MobSpawnerAbstract { } else if (!this.mobs.isEmpty()) { this.setSpawnData((MobSpawnerData) WeightedRandom.a(this.a().random, this.mobs)); } @@ -57,7 +57,7 @@ index dbb8098d6c..e9bcb5abaa 100644 this.spawnCount = nbttagcompound.getShort("SpawnCount"); } -@@ -265,9 +278,20 @@ public abstract class MobSpawnerAbstract { +@@ -266,9 +279,20 @@ public abstract class MobSpawnerAbstract { if (minecraftkey == null) { return nbttagcompound; } else { @@ -103,5 +103,5 @@ index 5c4c3c70c7..e78e3804ba 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0385-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0385-Per-Player-View-Distance-API-placeholders.patch index 15e313a32..0b16493b4 100644 --- a/Spigot-Server-Patches/0385-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0385-Per-Player-View-Distance-API-placeholders.patch @@ -1,4 +1,4 @@ -From dd28e265212bd87b4a1a4b9f226351f41912e495 Mon Sep 17 00:00:00 2001 +From 3816c9b43becef24731f8e19139f89fca0eac1b3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 6 May 2019 01:29:25 -0400 Subject: [PATCH] Per-Player View Distance API placeholders @@ -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 @@ -570,9 +570,9 @@ 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 @@ -208,9 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity { @@ -39,10 +39,10 @@ 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 -@@ -1974,6 +1974,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1983,6 +1983,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } @@ -60,5 +60,5 @@ index 484b21f453..651ca31948 100644 // Spigot start -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0386-Async-Chunk-placeholder.patch b/Spigot-Server-Patches/0386-Async-Chunk-placeholder.patch index 47789877d..3315d863c 100644 --- a/Spigot-Server-Patches/0386-Async-Chunk-placeholder.patch +++ b/Spigot-Server-Patches/0386-Async-Chunk-placeholder.patch @@ -1,4 +1,4 @@ -From 4bc01cc639689dcd46c522f4b0147352c867c7b5 Mon Sep 17 00:00:00 2001 +From 7e082ac626aa32df744ce2af177a0a497ee39d27 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 6 May 2019 12:29:24 -0700 Subject: [PATCH] Async Chunk placeholder @@ -6,10 +6,10 @@ 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 -@@ -14,6 +14,7 @@ import java.util.Objects; +@@ -16,6 +16,7 @@ import java.util.Objects; import java.util.Random; import java.util.Set; import java.util.UUID; @@ -17,7 +17,7 @@ index 5531000a83..6532ffe8a8 100644 import java.util.function.Predicate; import net.minecraft.server.AxisAlignedBB; import net.minecraft.server.BiomeBase; -@@ -2119,6 +2120,40 @@ public class CraftWorld implements World { +@@ -2155,6 +2156,40 @@ public class CraftWorld implements World { return (nearest == null) ? null : new Location(this, nearest.getX(), nearest.getY(), nearest.getZ()); } diff --git a/Spigot-Server-Patches/0389-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0389-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 1f96762f4..a4b6604b3 100644 --- a/Spigot-Server-Patches/0389-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0389-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -1,4 +1,4 @@ -From 4a64e02d83bd028c5a9b3729069bd596a3a758f8 Mon Sep 17 00:00:00 2001 +From 5dfb31ff51f6a38b8deff07e7ec50e461d10b6fb Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 13 May 2019 21:10:59 -0700 Subject: [PATCH] Fix CraftServer#isPrimaryThread and MinecraftServer @@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled synchronously when the server gets shut down. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 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 -@@ -1936,7 +1936,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 28 Sep 2018 21:49:53 -0400 Subject: [PATCH] Fix issues with entity loss due to unloaded chunks @@ -19,19 +19,19 @@ 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 @@ -635,7 +635,7 @@ 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); -@@ -950,7 +950,7 @@ public class WorldServer extends World { +@@ -948,7 +948,7 @@ public class WorldServer extends World { return false; } // CraftBukkit end @@ -41,5 +41,5 @@ index c93bf8e8b5..e61381221f 100644 if (!(ichunkaccess instanceof Chunk)) { return false; -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0392-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0392-Duplicate-UUID-Resolve-Option.patch index d2af6a942..21cf9804d 100644 --- a/Spigot-Server-Patches/0392-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0392-Duplicate-UUID-Resolve-Option.patch @@ -1,4 +1,4 @@ -From d39b091e6993517819763e6e209249e36aaca293 Mon Sep 17 00:00:00 2001 +From e511474d4f117352b964bbc3f9c2d033a822853a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:27:34 -0400 Subject: [PATCH] Duplicate UUID Resolve Option @@ -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 @@ -397,6 +397,7 @@ public class Chunk implements IChunkAccess { @@ -93,10 +93,10 @@ 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 -@@ -2674,6 +2674,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2724,6 +2724,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke }); } @@ -105,17 +105,18 @@ 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 -@@ -1,5 +1,6 @@ +@@ -1,6 +1,7 @@ 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; -@@ -20,12 +21,15 @@ import it.unimi.dsi.fastutil.objects.ObjectIterator; + import com.google.common.collect.Iterables; + import com.google.common.collect.ComparisonChain; // Paper +@@ -19,12 +20,15 @@ import it.unimi.dsi.fastutil.objects.ObjectIterator; import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -131,7 +132,7 @@ index 8fcd721eeb..34db8c8247 100644 import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicInteger; -@@ -559,12 +563,49 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -557,12 +561,49 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot @@ -185,7 +186,7 @@ index 8fcd721eeb..34db8c8247 100644 if (list == null) { list = Lists.newArrayList(new Entity[]{entity}); } else { -@@ -572,6 +613,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -570,6 +611,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } } @@ -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 @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -206,7 +207,7 @@ index e61381221f..e9e5ecf747 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -977,8 +979,23 @@ public class WorldServer extends World { +@@ -975,8 +977,23 @@ public class WorldServer extends World { if (entity1 == null) { return false; } else { @@ -232,7 +233,7 @@ index e61381221f..e9e5ecf747 100644 return true; } } -@@ -1109,7 +1126,7 @@ public class WorldServer extends World { +@@ -1107,7 +1124,7 @@ public class WorldServer extends World { } Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); @@ -242,5 +243,5 @@ index e61381221f..e9e5ecf747 100644 logger.error("Overwrote an existing entity " + old + " with " + entity); if (DEBUG_ENTITIES) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0393-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0393-improve-CraftWorld-isChunkLoaded.patch index abbd25ab1..258c58dd1 100644 --- a/Spigot-Server-Patches/0393-improve-CraftWorld-isChunkLoaded.patch +++ b/Spigot-Server-Patches/0393-improve-CraftWorld-isChunkLoaded.patch @@ -1,4 +1,4 @@ -From 52ef65718580b69ba875db22b43d3a03e014745b Mon Sep 17 00:00:00 2001 +From 4c1d1a6ace5eefae40ce157e50eefd6cb3ca32b5 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 21 May 2019 02:34:04 +0100 Subject: [PATCH] improve CraftWorld#isChunkLoaded @@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query the chunk status and get a response now, vs having to wait diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 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 -@@ -382,14 +382,13 @@ public class CraftWorld implements World { +@@ -381,14 +381,13 @@ public class CraftWorld implements World { @Override public boolean isChunkLoaded(int x, int z) { @@ -30,5 +30,5 @@ index 0328eadf27..d976b08e5e 100644 throw new RuntimeException(ex); } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0394-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0394-Configurable-Keep-Spawn-Loaded-range-per-world.patch index b9ac69efa..fcc8b55b0 100644 --- a/Spigot-Server-Patches/0394-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0394-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From cbae2eadd07209fe62d1a50bc49d49bb49ec58cb Mon Sep 17 00:00:00 2001 +From e7eb619ad88e384daf7e6b792d59c6ea96daa297 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Sep 2014 23:14:43 -0400 Subject: [PATCH] Configurable Keep Spawn Loaded range per world @@ -21,10 +21,10 @@ 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 -@@ -570,6 +570,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 29 May 2019 04:01:22 +0100 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 -@@ -39,7 +39,7 @@ 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; -@@ -117,8 +117,12 @@ public abstract class ChunkMapDistance { +@@ -36,7 +36,7 @@ public abstract class ChunkMapDistance { + 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; +@@ -98,8 +98,12 @@ 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(); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0398-Actually-Limit-Natural-Spawns-To-Limit.patch b/Spigot-Server-Patches/0398-Actually-Limit-Natural-Spawns-To-Limit.patch index eb544f20d..06d10b25b 100644 --- a/Spigot-Server-Patches/0398-Actually-Limit-Natural-Spawns-To-Limit.patch +++ b/Spigot-Server-Patches/0398-Actually-Limit-Natural-Spawns-To-Limit.patch @@ -1,11 +1,11 @@ -From effe9ef51b8e5e41276686710dac36c6b35f1c55 Mon Sep 17 00:00:00 2001 +From e62f02e098120bd54c0eeeefb9e153e70b428ef3 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sun, 2 Jun 2019 01:22:02 -0400 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 @@ -412,8 +412,12 @@ 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 @@ -16,13 +16,20 @@ 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 } @@ -94,5 +94,5 @@ index 94d7bca09d..93fec1685b 100644 @Nullable -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0399-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0399-Implement-CraftBlockSoundGroup.patch index bc7d64acd..c881378f4 100644 --- a/Spigot-Server-Patches/0399-Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/0399-Implement-CraftBlockSoundGroup.patch @@ -1,4 +1,4 @@ -From 9642d31817141f5aeef13d682b55163ceeafd935 Mon Sep 17 00:00:00 2001 +From cc4feaf72114fabe4037414d33ed88121133e819 Mon Sep 17 00:00:00 2001 From: simpleauthority Date: Tue, 28 May 2019 03:48:51 -0700 Subject: [PATCH] Implement CraftBlockSoundGroup @@ -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 +1,38 @@ @@ -49,10 +49,10 @@ 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 -@@ -267,6 +267,7 @@ public class IBlockData extends BlockDataAbstract implements +@@ -271,6 +271,7 @@ public class IBlockData extends BlockDataAbstract implements return this.getBlock().isTicking(this); } @@ -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 @@ -26,10 +26,10 @@ 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 @@ -689,4 +689,11 @@ public class CraftBlock implements Block { diff --git a/Spigot-Server-Patches/0400-Chunk-debug-command.patch b/Spigot-Server-Patches/0400-Chunk-debug-command.patch index 941f98341..408f4dc6b 100644 --- a/Spigot-Server-Patches/0400-Chunk-debug-command.patch +++ b/Spigot-Server-Patches/0400-Chunk-debug-command.patch @@ -1,4 +1,4 @@ -From cce4b2b070940e20ff814808cb6f0e0b986f2151 Mon Sep 17 00:00:00 2001 +From 8bdf16a1e8e2f90f430797eea471e538c21f8e09 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 1 Jun 2019 13:00:55 -0700 Subject: [PATCH] Chunk debug command @@ -32,7 +32,7 @@ https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528273&page=com.atlass https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528577&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-528577 diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index 352a39dcb3..97a5dbc4e2 100644 +index 391726d99c..8db92edc36 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -28,14 +28,14 @@ public class PaperCommand extends Command { @@ -185,23 +185,23 @@ index 352a39dcb3..97a5dbc4e2 100644 * Ported from MinecraftForge - author: LexManos - 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 -@@ -33,7 +33,7 @@ public abstract class ChunkMapDistance { +@@ -32,7 +32,7 @@ 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 -@@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; +@@ -21,7 +21,7 @@ import org.apache.logging.log4j.Logger; public class ChunkProviderServer extends IChunkProvider { private static final int b = (int) Math.pow(17.0D, 2.0D); @@ -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 @@ -26,7 +26,7 @@ public class PlayerChunk { @@ -425,10 +425,10 @@ 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 -@@ -53,7 +53,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -52,7 +52,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final Long2ObjectLinkedOpenHashMap updatingChunks = new Long2ObjectLinkedOpenHashMap(); public volatile Long2ObjectLinkedOpenHashMap visibleChunks; private final Long2ObjectLinkedOpenHashMap pendingUnload; @@ -437,7 +437,7 @@ index 34db8c8247..7d48b580ac 100644 public final WorldServer world; private final LightEngineThreaded lightEngine; private final IAsyncTaskHandler executor; -@@ -66,7 +66,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -65,7 +65,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final Mailbox> mailboxWorldGen; private final Mailbox> mailboxMain; public final WorldLoadListener worldLoadListener; @@ -470,5 +470,5 @@ index 74d6e3d2f5..4a1ba0dd80 100644 return this.b; } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0401-incremental-chunk-saving.patch b/Spigot-Server-Patches/0401-incremental-chunk-saving.patch index 43827e3e4..42f9a4afb 100644 --- a/Spigot-Server-Patches/0401-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0401-incremental-chunk-saving.patch @@ -1,4 +1,4 @@ -From 6a4af6a95a364d2804bdec0453be09cdc7590ad5 Mon Sep 17 00:00:00 2001 +From e5b657f6a3940622223dde4160f3e80066eba540 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 9 Jun 2019 03:53:22 +0100 Subject: [PATCH] incremental chunk saving @@ -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 @@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { @@ -42,10 +42,10 @@ 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 -@@ -156,6 +156,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; @@ -53,7 +53,7 @@ index 184f1b00f0..3dbe83c7ea 100644 public File bukkitDataPackFolder; public CommandDispatcher vanillaCommandDispatcher; private boolean forceTicks; -@@ -1072,14 +1073,28 @@ 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 -@@ -295,15 +295,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -293,15 +293,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }); PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.x.getName()); } else { @@ -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 @@ -755,8 +755,9 @@ public class WorldServer extends World { @@ -151,5 +149,5 @@ index 40b3d96edd..135ec94c6f 100644 timings.worldSaveChunks.startTiming(); // Paper chunkproviderserver.save(flag); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0403-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0403-Fix-World-isChunkGenerated-calls.patch index 9559cd62d..257bf2a86 100644 --- a/Spigot-Server-Patches/0403-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0403-Fix-World-isChunkGenerated-calls.patch @@ -1,4 +1,4 @@ -From 23a4b689721fa3621f748f7f49390748eb82cf15 Mon Sep 17 00:00:00 2001 +From b7ab62b17e1d6a232c8a792e16f26537e6abf4fc Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 15 Jun 2019 08:54:33 -0700 Subject: [PATCH] Fix World#isChunkGenerated calls @@ -8,10 +8,10 @@ This patch also adds a chunk status cache on region files (note that its only purpose is to cache the status on DISK) diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 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 -@@ -29,7 +29,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -27,7 +27,7 @@ public class ChunkProviderServer extends IChunkProvider { private final WorldServer world; private final Thread serverThread; private final LightEngineThreaded lightEngine; @@ -20,7 +20,7 @@ index d83eec0d76..459bd619ee 100644 public final PlayerChunkMap playerChunkMap; private final WorldPersistentData worldPersistentData; private long lastTickTime; -@@ -119,6 +119,36 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -117,6 +117,36 @@ public class ChunkProviderServer extends IChunkProvider { return playerChunk.getFullChunk(); } @@ -58,10 +58,10 @@ 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 -@@ -409,6 +409,17 @@ public class ChunkRegionLoader { +@@ -410,6 +410,17 @@ public class ChunkRegionLoader { return nbttagcompound; } @@ -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 @@ -70,6 +70,19 @@ public class PlayerChunk { @@ -134,10 +134,10 @@ 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 -@@ -811,10 +811,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -802,10 +802,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @Nullable @@ -265,10 +265,10 @@ 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 -@@ -387,8 +387,20 @@ public class CraftWorld implements World { +@@ -386,8 +386,20 @@ public class CraftWorld implements World { @Override public boolean isChunkGenerated(int x, int z) { @@ -290,7 +290,7 @@ index e0d89cc533..9bb1ad077a 100644 } catch (IOException ex) { throw new RuntimeException(ex); } -@@ -500,20 +512,24 @@ public class CraftWorld implements World { +@@ -499,20 +511,24 @@ public class CraftWorld implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp( "chunk load"); // Spigot @@ -327,7 +327,7 @@ index e0d89cc533..9bb1ad077a 100644 } @Override -@@ -2127,21 +2143,20 @@ public class CraftWorld implements World { +@@ -2163,21 +2179,20 @@ public class CraftWorld implements World { // Paper start private Chunk getChunkAtGen(int x, int z, boolean gen) { @@ -363,5 +363,5 @@ index e0d89cc533..9bb1ad077a 100644 @Override -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0405-Fix-MC-154214.patch b/Spigot-Server-Patches/0405-Fix-MC-154214.patch index c531a9588..a31a168e2 100644 --- a/Spigot-Server-Patches/0405-Fix-MC-154214.patch +++ b/Spigot-Server-Patches/0405-Fix-MC-154214.patch @@ -1,4 +1,4 @@ -From 12a8af6c9ac2c8c30a0723cc70b6435ae7f03d01 Mon Sep 17 00:00:00 2001 +From 09f840156671701b31ae0d7f3c9d8cf45146040e Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 16 Jun 2019 23:30:25 -0700 Subject: [PATCH] Fix MC-154214 @@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-154214 Avoid adding player tickets when they're out of range of the closest player diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 705ca68798..799c134e4b 100644 +index 0c562a5f34..7a76db08fc 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -367,12 +367,18 @@ public abstract class ChunkMapDistance { +@@ -333,12 +333,18 @@ public abstract class ChunkMapDistance { } private void a(long i, int j, boolean flag, boolean flag1) { @@ -18,17 +18,17 @@ index 705ca68798..799c134e4b 100644 Ticket 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); }); -@@ -416,6 +422,7 @@ public abstract class ChunkMapDistance { +@@ -382,6 +388,7 @@ public abstract class ChunkMapDistance { } @@ -36,7 +36,7 @@ index 705ca68798..799c134e4b 100644 private boolean c(int i) { return i <= this.e - 2; } -@@ -463,7 +470,7 @@ public abstract class ChunkMapDistance { +@@ -389,7 +396,7 @@ public abstract class ChunkMapDistance { class b extends ChunkMap { @@ -46,5 +46,5 @@ index 705ca68798..799c134e4b 100644 protected b(int i) { -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0407-Use-ChunkStatus-cache-when-saving-protochunks.patch b/Spigot-Server-Patches/0407-Use-ChunkStatus-cache-when-saving-protochunks.patch index 61b07a0f7..72b00df47 100644 --- a/Spigot-Server-Patches/0407-Use-ChunkStatus-cache-when-saving-protochunks.patch +++ b/Spigot-Server-Patches/0407-Use-ChunkStatus-cache-when-saving-protochunks.patch @@ -1,4 +1,4 @@ -From 567cbbf93b099dd1731db47de6ccafdfe60bf142 Mon Sep 17 00:00:00 2001 +From 3194cf4e96fa8e3fc8c3be972e3a78307052246b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 22 Jun 2019 04:20:47 -0700 Subject: [PATCH] Use ChunkStatus cache when saving protochunks @@ -7,10 +7,10 @@ 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 -@@ -720,8 +720,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -718,8 +718,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { NBTTagCompound nbttagcompound; if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { @@ -24,5 +24,5 @@ index e89738a08d..89649e73e5 100644 } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0408-Fix-tracker-desync-issue.patch b/Spigot-Server-Patches/0408-Fix-tracker-desync-issue.patch index 27207a208..832663e42 100644 --- a/Spigot-Server-Patches/0408-Fix-tracker-desync-issue.patch +++ b/Spigot-Server-Patches/0408-Fix-tracker-desync-issue.patch @@ -1,26 +1,26 @@ -From 78aa506dfa23255e89d4706f45086acc4d6eef89 Mon Sep 17 00:00:00 2001 +From e7c186d6eb5076f46ddf595ac0249ee937e25d02 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 23 Jun 2019 19:11:27 -0700 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 -@@ -3205,6 +3205,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3255,6 +3255,7 @@ 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 -@@ -1236,7 +1236,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1238,7 +1238,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public void updatePlayer(EntityPlayer entityplayer) { org.spigotmc.AsyncCatcher.catchOp( "player tracker update"); // Spigot if (entityplayer != this.tracker) { @@ -30,5 +30,5 @@ index 89649e73e5..fba1639a85 100644 boolean flag = vec3d.x >= (double) (-i) && vec3d.x <= (double) i && vec3d.z >= (double) (-i) && vec3d.z <= (double) i && this.tracker.a(entityplayer); -- -2.21.0 +2.22.0 diff --git a/work/BuildData b/work/BuildData index f0032df49..d526c9af5 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit f0032df4970a118cf9a33620733c5e06934aaf0f +Subproject commit d526c9af5ffd94a80fdb5994c05275b87ea67a53 diff --git a/work/Bukkit b/work/Bukkit index fd317e44b..3dc4cdcdb 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit fd317e44bce1e29244e9244331091734d0e233bc +Subproject commit 3dc4cdcdb1ccd3a21d3679bed5735fb4ecc23692 diff --git a/work/CraftBukkit b/work/CraftBukkit index efd8a2b50..f1f33559f 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit efd8a2b50ae4f82d27f4bcf4fcb5bf18ec02d322 +Subproject commit f1f33559fab04373c940fee1668c62933a9b4ab9 diff --git a/work/Spigot b/work/Spigot index df0eb250c..4d2f30f1b 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit df0eb250cebede4d3bd1ad607c13a2ccd071f679 +Subproject commit 4d2f30f1bea328b673c4d670504ff5c73d8d9579