From 65dcb5348e333226ba1d76910ca4851e1c8527e0 Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Fri, 11 Jun 2021 08:29:15 +0200 Subject: [PATCH] hacked build changes, api applies cleanly --- Spigot-API-Patches/0001-POM-changes.patch | 4 +- Spigot-API-Patches/0005-Adventure.patch | 12 +- .../0008-Entity-Origin-API.patch | 4 +- .../0059-Entity-fromMobSpawner.patch | 4 +- ...low-plugins-to-use-SLF4J-for-logging.patch | 4 +- ...ld.spawnParticle-API-and-add-Builder.patch | 6 +- .../0118-Entity-getChunk-API.patch | 4 +- .../0153-Material-API-additions.patch | 6 +- .../0172-Entity-getEntitySpawnReason.patch | 4 +- .../0213-Add-entity-liquid-API.patch | 4 +- ...-translation-keys-for-blocks-entitie.patch | 10 +- .../0227-Entity-isTicking.patch | 4 +- ...docs-for-Entity.getEntitySpawnReason.patch | 4 +- .../0263-Added-Vanilla-Entity-Tags.patch | 4 +- ...Cache-the-result-of-Material-isBlock.patch | 8 +- Spigot-API-Patches/0282-Item-Rarity-API.patch | 6 +- ...309-Attributes-API-for-item-defaults.patch | 4 +- .../0002-Paper-config-files.patch | 2 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 2 +- Spigot-Server-Patches/0004-MC-Utils.patch | 6 +- .../0005-Paper-Metrics.patch | 2 +- Spigot-Server-Patches/0010-Adventure.patch | 406 +- ...013-Configurable-fishing-time-ranges.patch | 2 +- ...d-mobs-to-jump-and-take-water-damage.patch | 2 +- ...ck-and-tnt-entities-at-the-specified.patch | 2 +- ...ient-crashes-server-lists-and-Mojang.patch | 4 +- .../0021-Player-affects-spawning-API.patch | 2 +- ...nfigurable-top-of-nether-void-damage.patch | 2 +- .../0033-Optimize-explosions.patch | 2 +- .../0034-Disable-explosion-knockback.patch | 2 +- .../0035-Disable-thunder.patch | 2 +- .../0036-Disable-ice-and-snow.patch | 2 +- .../0041-Use-UserCache-for-player-heads.patch | 2 +- .../0043-Add-PlayerInitialSpawnEvent.patch | 4 +- ...e-informative-in-maxHealth-exception.patch | 2 +- .../0049-Player-Tab-List-and-Title-APIs.patch | 41 +- .../0053-Add-velocity-warnings.patch | 2 +- ...working-with-arrows-stuck-in-living-.patch | 2 +- ...ading-permissions.yml-before-plugins.patch | 2 +- ...064-Handle-Item-Meta-Inconsistencies.patch | 2 +- ...urable-Non-Player-Arrow-Despawn-Rate.patch | 2 +- .../0066-Add-World-Util-Methods.patch | 4 +- ...7-Custom-replacement-for-eaten-items.patch | 2 +- ...th-absorb-values-and-repair-bad-data.patch | 2 +- ...069-Use-a-Shared-Random-for-Entities.patch | 2 +- ...le-spawn-chances-for-skeleton-horses.patch | 2 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 4 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 2 +- ...dDebugInfo-not-initialized-on-client.patch | 2 +- ...g-BlockPlaceEvent-triggering-physics.patch | 2 +- ...nilla-per-world-scoreboard-coloring-.patch | 2 +- ...ityRegainHealthEvent-isFastRegen-API.patch | 2 +- ...-possibility-for-getServer-singleton.patch | 2 +- ...item-frames-performance-and-bug-fixe.patch | 2 +- ...-API-Replenishable-Lootables-Feature.patch | 2 +- ...tem-property-for-disabling-watchdoge.patch | 2 +- .../0099-Optimize-UserCache-Thread-Safe.patch | 2 +- .../0103-Add-server-name-parameter.patch | 2 +- .../0105-Fix-Double-World-Add-issues.patch | 2 +- ...11-Configurable-flying-kick-messages.patch | 2 +- .../0112-Chunk-registration-fixes.patch | 2 +- ...ok-reference-on-Craft-Entity-removal.patch | 2 +- .../0116-Add-EntityZapEvent.patch | 2 +- ...2-Don-t-let-fishinghooks-use-portals.patch | 2 +- .../0128-Optimize-ItemStack.isEmpty.patch | 2 +- ...to-control-if-armour-stands-can-move.patch | 2 +- .../0131-String-based-Action-Bar-API.patch | 2 +- .../0132-Firework-API-s.patch | 2 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- .../0135-Enforce-Sync-Player-Saves.patch | 2 +- ...PI-for-Reason-Source-Triggering-play.patch | 12 +- .../0138-Cap-Entity-Collisions.patch | 4 +- ...more-aggressive-in-the-chunk-unload-.patch | 2 +- .../0141-Do-not-let-armorstands-drown.patch | 2 +- ...le-async-calls-to-restart-the-server.patch | 2 +- ...property-to-disable-book-size-limits.patch | 2 +- ...urable-option-to-disable-creeper-lin.patch | 2 +- .../0148-Item-canEntityPickup.patch | 2 +- ...player-logins-during-server-shutdown.patch | 2 +- .../0160-ProfileWhitelistVerifyEvent.patch | 2 +- .../0161-Fix-this-stupid-bullshit.patch | 2 +- .../0166-LivingEntity-setKiller.patch | 2 +- ...n-prefixes-using-Log4J-configuration.patch | 2 +- .../0169-Add-PlayerJumpEvent.patch | 2 +- ...nt-protocol-version-and-virtual-host.patch | 4 +- ...rt-serverside-behavior-of-keepalives.patch | 2 +- .../0175-Add-PlayerArmorChangeEvent.patch | 2 +- .../0185-PreCreatureSpawnEvent.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 2 +- ...plement-EntityKnockbackByEntityEvent.patch | 4 +- ...239-Use-asynchronous-Log4j-2-loggers.patch | 2 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 2 +- ...7-Vanished-players-don-t-have-rights.patch | 2 +- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 2 +- ...ead-Entities-in-entityList-iteration.patch | 2 +- ...nd-make-tab-spam-limits-configurable.patch | 2 +- ...-ray-tracing-methods-to-LivingEntity.patch | 2 +- ...ble-connection-throttle-kick-message.patch | 2 +- .../0294-Add-sun-related-API.patch | 2 +- ...tator-target-events-and-improve-impl.patch | 2 +- ...event-players-from-moving-into-unloa.patch | 2 +- ...er-Thread-Pool-and-Thread-Priorities.patch | 2 +- .../0306-Optimize-World-Time-Updates.patch | 2 +- .../0311-Book-Size-Limits.patch | 2 +- .../0317-Add-PlayerConnectionCloseEvent.patch | 2 +- .../0340-Server-Tick-Events.patch | 2 +- ...l-to-changed-postToMainThread-method.patch | 2 +- .../0356-Chunk-debug-command.patch | 2 +- .../0361-incremental-chunk-saving.patch | 4 +- Spigot-Server-Patches/0362-Anti-Xray.patch | 2 +- ...-being-ticked-when-notifying-navigat.patch | 2 +- ...etChunkIfLoadedImmediately-in-places.patch | 4 +- .../0370-Reduce-sync-loads.patch | 4 +- ...if-we-have-a-custom-Bukkit-generator.patch | 2 +- ...ement-optional-per-player-mob-spawns.patch | 2 +- ...revent-consuming-the-wrong-itemstack.patch | 2 +- .../0388-Optimize-Hoppers.patch | 2 +- ...timise-IEntityAccess-getPlayerByUUID.patch | 2 +- .../0395-Lag-compensate-eating.patch | 2 +- .../0400-Entity-Activation-Range-2.0.patch | 2 +- ...e-getChunkAt-calls-for-loaded-chunks.patch | 2 +- ...ow-overriding-the-java-version-check.patch | 2 +- .../0406-Optimise-random-block-ticking.patch | 2 +- .../0409-Make-the-GUI-graph-fancier.patch | 2 +- ...imise-TickListServer-by-rewriting-it.patch | 4 +- ...re-Entity-is-never-double-registered.patch | 4 +- ...ering-entities-from-unloading-chunks.patch | 2 +- ...-PlayerChunkMap-adds-crashing-server.patch | 2 +- ...ptimize-Collision-to-not-load-chunks.patch | 2 +- .../0427-Increase-Light-Queue-Size.patch | 2 +- ...-Add-tick-times-API-and-mspt-command.patch | 2 +- ...ions-until-after-entity-ticking-is-d.patch | 2 +- .../0436-Improved-Watchdog-Support.patch | 4 +- ...-entity-collision-code-if-not-needed.patch | 2 +- ...oviderServer-s-chunk-level-checking-.patch | 2 +- ...Load-Chunks-for-Login-Asynchronously.patch | 8 +- ...PlayerAttackEntityCooldownResetEvent.patch | 2 +- .../0458-Implement-Brigadier-Mojang-API.patch | 2 +- .../0459-Villager-Restocks-API.patch | 2 +- ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- .../0461-Expose-game-version.patch | 2 +- ...-per-thread-native-byte-buffer-cache.patch | 2 +- ...tance-map-to-optimise-entity-tracker.patch | 4 +- .../0469-Add-villager-reputation-API.patch | 2 +- ...1-Fix-PotionEffect-ignores-icon-flag.patch | 2 +- ...Wait-for-Async-Tasks-during-shutdown.patch | 2 +- ...k-Priority-Urgency-System-for-Chunks.patch | 2 +- ...ookup-for-Treasure-Maps-Fixes-lag-fr.patch | 2 +- ...-desync-in-playerconnection-causing-.patch | 2 +- ...05-Add-permission-for-command-blocks.patch | 2 +- ...WorldBorder-collision-checks-and-air.patch | 2 +- ...ld-Difficulty-Remembering-Difficulty.patch | 4 +- .../0519-Add-entity-liquid-API.patch | 2 +- ...k-for-portal-on-world-gen-entity-add.patch | 2 +- ...ix-Concurrency-issue-in-WeightedList.patch | 44 +- .../0538-Incremental-player-saving.patch | 2 +- ...geEvent-not-firing-for-all-use-cases.patch | 2 +- .../0557-Buffer-joins-to-world.patch | 2 +- ...rs-not-working-in-some-kick-messages.patch | 4 +- .../0565-Cache-block-data-strings.patch | 2 +- ...ortation-and-cancel-velocity-if-tele.patch | 2 +- ...p-capture-to-capture-all-items-added.patch | 2 +- ...-non-whitelisted-player-when-white-l.patch | 2 +- ...r-large-move-vectors-crashing-server.patch | 2 +- .../0590-Add-ignore-discounts-API.patch | 2 +- .../0595-Add-API-for-quit-reason.patch | 2 +- ...602-Add-LivingEntity-clearActiveItem.patch | 2 +- ...-should-not-bypass-cramming-gamerule.patch | 2 +- ...g-for-servers-not-running-on-Java-16.patch | 2 +- ...ing-zombie-villager-discount-exploit.patch | 2 +- .../0619-added-PlayerTradeEvent.patch | 2 +- ...4-Added-ServerResourcesReloadedEvent.patch | 2 +- ...pty-commands-shall-not-be-dispatched.patch | 2 +- .../0643-Remove-stale-POIs.patch | 2 +- ...n-for-requiring-a-player-participant.patch | 2 +- ...0652-Configurable-max-leash-distance.patch | 2 +- ...Leash-variable-to-EntityUnleashEvent.patch | 2 +- ...ce-map-update-when-spawning-disabled.patch | 2 +- .../0664-EntityMoveEvent.patch | 2 +- ...-entity-allow-attribute-registration.patch | 2 +- .../0672-misc-debugging-dumps.patch | 2 +- .../0675-Expose-Tracked-Players.patch | 2 +- ...Fix-Wither-hostility-towards-players.patch | 2 +- ...0682-fix-converting-txt-to-json-file.patch | 2 +- ...telist-use-configurable-kick-message.patch | 2 +- ...ignore-result-of-PlayerEditBookEvent.patch | 2 +- ...ent-suggestion-tooltips-in-AsyncTabC.patch | 2 +- ...ItemConsumeEvent-cancelling-properly.patch | 2 +- .../0703-Add-bypass-host-check.patch | 2 +- .../0714-More-World-API.patch | 2 +- ...s-to-convert-between-Component-and-B.patch | 2 +- ...eacon-activation-deactivation-events.patch | 2 +- ...-address-to-AsyncPlayerPreLoginEvent.patch | 2 +- ...-option-to-load-extra-plugin-jars-no.patch | 4 +- ...x-and-optimise-world-force-upgrading.patch | 2 +- .../0739-Add-Mob-lookAt-API.patch | 2 +- .../0740-Add-Unix-domain-socket-support.patch | 2 +- .../0746-Add-PlayerKickEvent-causes.patch | 2 +- bukkit-e3c5450d-combined.csrg | 5198 +++++++++++++++++ .../0049-Player-Tab-List-and-Title-APIs.patch | 31 + scripts/remap.sh | 38 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 205 files changed, 5721 insertions(+), 547 deletions(-) create mode 100644 bukkit-e3c5450d-combined.csrg create mode 100644 removed/1.17/0049-Player-Tab-List-and-Title-APIs.patch diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 2cd563eaf..b6c98e0a0 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 0223e94c1243a58955f858c8bf6d5df4ca8cf0ec..fd663f5471516c3ebbab07c27197e5df48c481e6 100644 +index debe5bd7adb1f41e8a6878a8545de4bfcad1a590..d7cf64f05d0a2f5b186ca13b2b88e390abe84226 100644 --- a/pom.xml +++ b/pom.xml @@ -2,33 +2,34 @@ @@ -22,7 +22,7 @@ index 0223e94c1243a58955f858c8bf6d5df4ca8cf0ec..fd663f5471516c3ebbab07c27197e5df - spigot-api + com.destroystokyo.paper + paper-api - 1.16.5-R0.1-SNAPSHOT + 1.17-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-API-Patches/0005-Adventure.patch b/Spigot-API-Patches/0005-Adventure.patch index 4e1baf14f..bbfafdf46 100644 --- a/Spigot-API-Patches/0005-Adventure.patch +++ b/Spigot-API-Patches/0005-Adventure.patch @@ -7,7 +7,7 @@ Co-authored-by: zml Co-authored-by: Jake Potrebic diff --git a/pom.xml b/pom.xml -index 9aafdcc49ed83b403abb96891008103e6d6a69fa..1ced7a212684cee8faf07fa9a083adcd47be7fcb 100644 +index 1ebc4c096638128194cea9c2a4131f901e7d6896..cae43ce5c1287a4cd117fd069d34ebc1b64b7fdb 100644 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,7 @@ @@ -1328,7 +1328,7 @@ index a6b9e4f158583e5932bf8ca210d531857e9f5360..7abdbf43e2f52e8e9e0f7bd7c7a58baf throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java -index 768f35c19c4557236bded5f4a85f48a2b2b2a9e6..d0ce64412276512cde133937a85a3340a70eea6d 100644 +index 2c8cc0c2af4741df9ae594ab9c436dea5347167c..445b6bf18e6ee26fe6cafca8cf5f1775bcd72d1e 100644 --- a/src/main/java/org/bukkit/Sound.java +++ b/src/main/java/org/bukkit/Sound.java @@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull; @@ -1340,7 +1340,7 @@ index 768f35c19c4557236bded5f4a85f48a2b2b2a9e6..d0ce64412276512cde133937a85a3340 AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"), AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"), -@@ -1016,4 +1016,12 @@ public enum Sound implements Keyed { +@@ -1214,4 +1214,12 @@ public enum Sound implements Keyed { public NamespacedKey getKey() { return key; } @@ -1412,7 +1412,7 @@ index bc4417d8ffa92a78f690bfa5705d3e42cdc11fd2..d3519fa5b99e2888a194c63824155377 * Returns a list of entities within a bounding box centered around a * Location. diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java -index 7e3cf00e49c66023bf46c298ef46c00e8c3c2caf..6ea9b54d95d80070c01a612c0ce2ab37f0b4ad41 100644 +index a52dff9ef1c1cd7d3705e66510dfa2c91119539c..cdcf02ff9e80f5908a8fa22e82701445d5e2d298 100644 --- a/src/main/java/org/bukkit/block/Sign.java +++ b/src/main/java/org/bukkit/block/Sign.java @@ -7,13 +7,48 @@ import org.jetbrains.annotations.NotNull; @@ -1651,7 +1651,7 @@ index 9566e4306ada5e82dede0f002aa06da12c44996b..4d5f0837bd0e02a30c943d8969fb6b13 + // Paper end } diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index b71530e94569f8ade829e655e3a89ec70215ea39..b21fe6c631d5a6cd52f133786270c8f5ad0dafc4 100644 +index 0831f2519a32cf1c5c7d5b72864bcb1c22c52eda..03e12de470f983e89a473c4e42c21941085b1d37 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable; @@ -1663,7 +1663,7 @@ index b71530e94569f8ade829e655e3a89ec70215ea39..b21fe6c631d5a6cd52f133786270c8f5 /** * Gets the entity's current position -@@ -602,4 +602,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -648,4 +648,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @Override Spigot spigot(); // Spigot end diff --git a/Spigot-API-Patches/0008-Entity-Origin-API.patch b/Spigot-API-Patches/0008-Entity-Origin-API.patch index b26d5933f..626916f4f 100644 --- a/Spigot-API-Patches/0008-Entity-Origin-API.patch +++ b/Spigot-API-Patches/0008-Entity-Origin-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 41a1bc45cc5eb7f19374115ade7f5328c7fc1dae..e9d0d507b47b0347b975b1a83f5ae70dca5587b8 100644 +index 03e12de470f983e89a473c4e42c21941085b1d37..fdce246aecac775c3ff4a028c307b09762505258 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -609,5 +609,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -655,5 +655,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent default net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull java.util.function.UnaryOperator op) { return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName()))); } diff --git a/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch b/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch index 6912236f7..73b4016c9 100644 --- a/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch +++ b/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index e9d0d507b47b0347b975b1a83f5ae70dca5587b8..feb9507a972bf797144a01adeeaac83ec2bd165a 100644 +index fdce246aecac775c3ff4a028c307b09762505258..fdc95c87a6020bdcaee5b0b8ab5a996c0e241b33 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -619,5 +619,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -665,5 +665,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @Nullable Location getOrigin(); 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 1f987148b..58225ea7b 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 @@ -14,11 +14,11 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index 7ec7e6047193a6b390d24f6d2722e35d1d36830d..6b71d9a397dd5b72320402a47b8e7197d24e061c 100644 +index 2c757ffb2253748c6a81f9b373290108209b6ff2..8cf6e1f78d4c1ae388bb478700d5dceaab65c4e7 100644 --- a/pom.xml +++ b/pom.xml @@ -144,6 +144,13 @@ - 20.1.0 + 21.0.1 provided + diff --git a/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch index ee5d06483..da01d6d5c 100644 --- a/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -493,10 +493,10 @@ index 0000000000000000000000000000000000000000..06f1602f5b327705f726d0a99dd6b95e + } +} diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java -index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c521751bf13a7 100644 +index c5315ee1ed435c39a3ae298e248b67c5dc291497..687a62707c8021f87e03d6bc358b3b4e6da331e7 100644 --- a/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java -@@ -106,6 +106,17 @@ public enum Particle { +@@ -123,6 +123,17 @@ public enum Particle { return dataType; } @@ -515,7 +515,7 @@ index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c5217 * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 27bbddac946879149ec43d428417c4707f6a9a8c..fe125ae7bbd7c9dde9db7838169e4819416e148d 100644 +index 6cc9c7fc913f229c4869a976e73253acb74fcda3..ca2b1cbff153c53ec9182e44a1979350bacd695b 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -2592,7 +2592,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad diff --git a/Spigot-API-Patches/0118-Entity-getChunk-API.patch b/Spigot-API-Patches/0118-Entity-getChunk-API.patch index 8eaf47d2a..1a598ac53 100644 --- a/Spigot-API-Patches/0118-Entity-getChunk-API.patch +++ b/Spigot-API-Patches/0118-Entity-getChunk-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API Get the chunk the entity is currently registered to diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index feb9507a972bf797144a01adeeaac83ec2bd165a..9b8823279524d1c1566176c589aa5794eb8aafbc 100644 +index fdc95c87a6020bdcaee5b0b8ab5a996c0e241b33..76c20d84fee011af4f1850d0cab8ac00a69f2b34 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -17,7 +17,7 @@ index feb9507a972bf797144a01adeeaac83ec2bd165a..9b8823279524d1c1566176c589aa5794 import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.Nameable; -@@ -626,5 +627,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -672,5 +673,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent * @return True if entity spawned from a mob spawner */ boolean fromMobSpawner(); diff --git a/Spigot-API-Patches/0153-Material-API-additions.patch b/Spigot-API-Patches/0153-Material-API-additions.patch index d19f497e7..629bed442 100644 --- a/Spigot-API-Patches/0153-Material-API-additions.patch +++ b/Spigot-API-Patches/0153-Material-API-additions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index e4d0dc26fb2f2c4435e11b3460d8c93d6a6fc47f..2b53e68e96ea346a6f2b5cadcf9f81b2c231c408 100644 +index a9769ae0bad61d200c70331eba0b655da4ba03b2..9c28351c7c3f60c6a3b4020329344f91efeedae1 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -87,6 +87,7 @@ import org.jetbrains.annotations.Nullable; +@@ -98,6 +98,7 @@ import org.jetbrains.annotations.Nullable; /** * An enum of all material IDs accepted by the official server and client */ @@ -16,7 +16,7 @@ index e4d0dc26fb2f2c4435e11b3460d8c93d6a6fc47f..2b53e68e96ea346a6f2b5cadcf9f81b2 public enum Material implements Keyed { // AIR(9648, 0), -@@ -3563,6 +3564,22 @@ public enum Material implements Keyed { +@@ -3976,6 +3977,22 @@ public enum Material implements Keyed { } } diff --git a/Spigot-API-Patches/0172-Entity-getEntitySpawnReason.patch b/Spigot-API-Patches/0172-Entity-getEntitySpawnReason.patch index cf940ce2f..080a5c318 100644 --- a/Spigot-API-Patches/0172-Entity-getEntitySpawnReason.patch +++ b/Spigot-API-Patches/0172-Entity-getEntitySpawnReason.patch @@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index c137199ed0537874010f1abf311a9cbee56831ac..2622a2f5c9e2cb43aff7ef9eac2dcdb3fd8fad04 100644 +index 4b1f9b0ad5dc9ad6f33fddafc376b6f983a556ef..5b382091b1466b25ad42325d5808785a8e948552 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -662,5 +662,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -708,5 +708,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @NotNull Chunk getChunk(); diff --git a/Spigot-API-Patches/0213-Add-entity-liquid-API.patch b/Spigot-API-Patches/0213-Add-entity-liquid-API.patch index c13d4c2cb..c38113b71 100644 --- a/Spigot-API-Patches/0213-Add-entity-liquid-API.patch +++ b/Spigot-API-Patches/0213-Add-entity-liquid-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 2622a2f5c9e2cb43aff7ef9eac2dcdb3fd8fad04..75cebfca7b436ef30b718bba7e0566d047e5c61a 100644 +index 5b382091b1466b25ad42325d5808785a8e948552..ecb5595332ab493224d06a75904e142ab541aad9 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -668,5 +668,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -714,5 +714,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason(); diff --git a/Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch index b6751c5ef..bfa151e84 100644 --- a/Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch +++ b/Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add a way to get translation keys for blocks, entities and diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 2b53e68e96ea346a6f2b5cadcf9f81b2c231c408..e453e5eb7245aad3ecbb19652ebb34abe030c0a9 100644 +index 9c28351c7c3f60c6a3b4020329344f91efeedae1..69c85c3a1f45476f7de0a9399852d82eeb4f9c86 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -3578,6 +3578,16 @@ public enum Material implements Keyed { +@@ -3991,6 +3991,16 @@ public enum Material implements Keyed { } return false; } @@ -84,10 +84,10 @@ index e1cc36fbe808973227c0e8ca7166453235c90279..e6647c45f65bae916759cd899256f813 // Paper end } diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java -index 774363a8186b3861f10c0452ac63726cae365169..692b75eb78405874077c850bfc72e247ccc80860 100644 +index 9be5371c7f398d0ec8241403661415ff40661067..f415b61b0d4b57e1557aaf240a0f2ad5915035fc 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java -@@ -414,4 +414,15 @@ public enum EntityType implements Keyed { +@@ -419,4 +419,15 @@ public enum EntityType implements Keyed { public boolean isAlive() { return living; } @@ -104,7 +104,7 @@ index 774363a8186b3861f10c0452ac63726cae365169..692b75eb78405874077c850bfc72e247 + } } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 15b48ad1ba5bcf7394fb3f52ce2cc6baa6632f66..c236cb81b7ec7993b63da929c0492564e75581ee 100644 +index 9a878e4fde31c015e2f3fdf365d5d16c30198685..bd96c06aca1fc18807e65c34f399ce2ebe891816 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -851,5 +851,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor diff --git a/Spigot-API-Patches/0227-Entity-isTicking.patch b/Spigot-API-Patches/0227-Entity-isTicking.patch index 3856ba234..315c89bf3 100644 --- a/Spigot-API-Patches/0227-Entity-isTicking.patch +++ b/Spigot-API-Patches/0227-Entity-isTicking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 75cebfca7b436ef30b718bba7e0566d047e5c61a..2cc501b74741bdbdc40d1b135725f18c4d36dc2b 100644 +index ecb5595332ab493224d06a75904e142ab541aad9..4ed8c74f874dbd1017764d7592acfdafbc5d5fe1 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -698,5 +698,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -744,5 +744,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent * Check if entity is in lava */ public boolean isInLava(); diff --git a/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch b/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch index 7798b89d2..2947f7829 100644 --- a/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch +++ b/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Clarify the Javadocs for Entity.getEntitySpawnReason() diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 2cc501b74741bdbdc40d1b135725f18c4d36dc2b..428daeb04d0a35a443467e2f657d2356bcfdd7d7 100644 +index 4ed8c74f874dbd1017764d7592acfdafbc5d5fe1..14470b23f7b4102cf2dca777bc832ebcbcd5edc6 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -664,7 +664,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -710,7 +710,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent Chunk getChunk(); /** diff --git a/Spigot-API-Patches/0263-Added-Vanilla-Entity-Tags.patch b/Spigot-API-Patches/0263-Added-Vanilla-Entity-Tags.patch index 9916b1726..53c933017 100644 --- a/Spigot-API-Patches/0263-Added-Vanilla-Entity-Tags.patch +++ b/Spigot-API-Patches/0263-Added-Vanilla-Entity-Tags.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added Vanilla Entity Tags diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java -index 3c2a6a2167eab43097f5d6ccf1550e12795fc0b6..c1ec099448d57f2a5f973ac5b4e4a25b79ea2112 100644 +index 88ea8b6c5c2c4d2116f646341de62590718bc28c..a2da2cbef6c09b9defbdf97e79cfb3efd742d439 100644 --- a/src/main/java/org/bukkit/Tag.java +++ b/src/main/java/org/bukkit/Tag.java -@@ -425,6 +425,32 @@ public interface Tag extends Keyed { +@@ -589,6 +589,32 @@ public interface Tag extends Keyed { * Vanilla fluid tag representing water and flowing water. */ Tag FLUIDS_WATER = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("water"), Fluid.class); diff --git a/Spigot-API-Patches/0275-Cache-the-result-of-Material-isBlock.patch b/Spigot-API-Patches/0275-Cache-the-result-of-Material-isBlock.patch index eaa498bae..7eca03bdf 100644 --- a/Spigot-API-Patches/0275-Cache-the-result-of-Material-isBlock.patch +++ b/Spigot-API-Patches/0275-Cache-the-result-of-Material-isBlock.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache the result of Material#isBlock diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index e453e5eb7245aad3ecbb19652ebb34abe030c0a9..112c3f035ec7e7a7cae939264e0af4c6f4450abd 100644 +index 69c85c3a1f45476f7de0a9399852d82eeb4f9c86..0f081835c0484e15fca4fadaa27e90cadd394276 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -3522,6 +3522,7 @@ public enum Material implements Keyed { +@@ -3935,6 +3935,7 @@ public enum Material implements Keyed { public final Class data; private final boolean legacy; private final NamespacedKey key; @@ -16,7 +16,7 @@ index e453e5eb7245aad3ecbb19652ebb34abe030c0a9..112c3f035ec7e7a7cae939264e0af4c6 private Material(final int id) { this(id, 64); -@@ -3719,6 +3720,11 @@ public enum Material implements Keyed { +@@ -4132,6 +4133,11 @@ public enum Material implements Keyed { * @return true if this material is a block */ public boolean isBlock() { @@ -28,7 +28,7 @@ index e453e5eb7245aad3ecbb19652ebb34abe030c0a9..112c3f035ec7e7a7cae939264e0af4c6 switch (this) { // case ACACIA_BUTTON: -@@ -4664,6 +4670,7 @@ public enum Material implements Keyed { +@@ -5213,6 +5219,7 @@ public enum Material implements Keyed { static { for (Material material : values()) { BY_NAME.put(material.name(), material); diff --git a/Spigot-API-Patches/0282-Item-Rarity-API.patch b/Spigot-API-Patches/0282-Item-Rarity-API.patch index 1d73fff91..8f0f4fc97 100644 --- a/Spigot-API-Patches/0282-Item-Rarity-API.patch +++ b/Spigot-API-Patches/0282-Item-Rarity-API.patch @@ -39,10 +39,10 @@ index 0000000000000000000000000000000000000000..74ef8395cc040ce488c2acaa416db202 + } +} diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 112c3f035ec7e7a7cae939264e0af4c6f4450abd..9b1c9e60dba9ea3ef8d8e164f13dd76daf57db8e 100644 +index 0f081835c0484e15fca4fadaa27e90cadd394276..07b8b913434bb575df8670230d693b2d4cec2571 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -3589,6 +3589,17 @@ public enum Material implements Keyed { +@@ -4002,6 +4002,17 @@ public enum Material implements Keyed { public String getTranslationKey() { return Bukkit.getUnsafe().getTranslationKey(this); } @@ -88,7 +88,7 @@ index 84eda68281c6c6968d95b1313a33696c3a9980d4..bcd10b2c9255d778b678310febf19373 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index c236cb81b7ec7993b63da929c0492564e75581ee..7929a00a3e93e0b6a4df99013e0da5bcfecd678b 100644 +index bd96c06aca1fc18807e65c34f399ce2ebe891816..f72d3d62d61755bbaf1950ebcb228ce95d1faf58 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -863,5 +863,15 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor diff --git a/Spigot-API-Patches/0309-Attributes-API-for-item-defaults.patch b/Spigot-API-Patches/0309-Attributes-API-for-item-defaults.patch index 2ca00f578..fa1b8ce93 100644 --- a/Spigot-API-Patches/0309-Attributes-API-for-item-defaults.patch +++ b/Spigot-API-Patches/0309-Attributes-API-for-item-defaults.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 9b1c9e60dba9ea3ef8d8e164f13dd76daf57db8e..e2b3470e3c9a97671723f5a67f722fb86fb07fbf 100644 +index 07b8b913434bb575df8670230d693b2d4cec2571..397591da25fbb0e4d3012431df70d661d9bc9188 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -3600,6 +3600,19 @@ public enum Material implements Keyed { +@@ -4013,6 +4013,19 @@ public enum Material implements Keyed { public io.papermc.paper.inventory.ItemRarity getItemRarity() { return Bukkit.getUnsafe().getItemRarity(this); } diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 674e55cfd..59424f228 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -753,7 +753,7 @@ index f03d83440291a329f5a1922c8710ed975025fdbb..82f5b3387f9e71ae258111b719698662 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c6417a0594ffe2d3650ec54d44e575e347a1f724..3b48799d084f14722f815cb35cbd48b618380fca 100644 +index 46a16e31775b28c44f95a8ac5545ebcb656c74b6..05aedca561919a12ced1925c5cc9af585bb04523 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -129,6 +129,14 @@ public class Main { diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index b8a1a2f44..1f1f3bab6 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -236,7 +236,7 @@ index ab08336043d4f558434ed1f38d25cc555ace1ac0..a892521db1197369bf6363bd2f5da24b }); this.b = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a95c52035177cb86c7e3a580d5c26a5dd20a17e2..81cff54c93bc04d19e3cc0f5307799c62d139ab2 100644 +index 6977255868dbc0a96973095fff2eb935ecf4f4fc..6d843bb69b1848ae77098dc3f45d85f405fc24cd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1675,9 +1675,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant clazz, Object instance) { diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index f08110a22646716bcdf6a8d25ec44df8d78e85a4..23c1ba33903f8913a33332d06b2fd1aa3c90f1a1 100644 +index c04d912adf0da8f7a5b75dd2f58739a11ca31601..3c93a497a790b8d800852db2ac48feca41f45cef 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -83,6 +83,7 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/0010-Adventure.patch b/Spigot-Server-Patches/0010-Adventure.patch index d871f43df..51208a551 100644 --- a/Spigot-Server-Patches/0010-Adventure.patch +++ b/Spigot-Server-Patches/0010-Adventure.patch @@ -945,7 +945,7 @@ index 75e38f05c10713f773a8763100dfc0777521dba6..cd93f99e939438c572a4258d299a6038 @@ -61,6 +61,7 @@ public enum EnumChatFormat { return !this.A && this != EnumChatFormat.RESET; } - + + @Nullable public Integer getHexValue() { return this.e(); } // Paper - OBFHELPER @Nullable public Integer e() { @@ -953,7 +953,7 @@ index 75e38f05c10713f773a8763100dfc0777521dba6..cd93f99e939438c572a4258d299a6038 @@ -84,6 +85,18 @@ public enum EnumChatFormat { return s == null ? null : (EnumChatFormat) EnumChatFormat.w.get(c(s)); } - + + // Paper start + @Nullable public static EnumChatFormat getByHexValue(int i) { + for (EnumChatFormat value : values()) { @@ -976,7 +976,7 @@ index e26ef49d9dde8ed0fb4267b48cb597563967f313..0e41fdb6ba711fbd2240d62e2030b3a1 @@ -43,6 +43,7 @@ public class NBTTagString implements NBTBase { this.data = s; } - + + public static NBTTagString create(final String value) { return a(value); } // Paper - OBFHELPER public static NBTTagString a(String s) { return s.isEmpty() ? NBTTagString.b : new NBTTagString(s); @@ -995,16 +995,16 @@ index 5413bf93f7f0f4491fca1f07c47a925fdace7751..5f1c5dd7902f6cff5acae05e8c6bf58a import java.io.IOException; @@ -44,6 +45,7 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack; // CraftBukkit public class PacketDataSerializer extends ByteBuf { - + private final ByteBuf a; + public java.util.Locale adventure$locale; // Paper - + public PacketDataSerializer(ByteBuf bytebuf) { this.a = bytebuf; @@ -165,8 +167,15 @@ public class PacketDataSerializer extends ByteBuf { return IChatBaseComponent.ChatSerializer.a(this.e(262144)); } - + + // Paper start + public PacketDataSerializer writeComponent(final net.kyori.adventure.text.Component component) { + return this.writeUtf(PaperAdventure.asJsonString(component, this.adventure$locale), 262144); @@ -1016,16 +1016,16 @@ index 5413bf93f7f0f4491fca1f07c47a925fdace7751..5f1c5dd7902f6cff5acae05e8c6bf58a + //return this.a(IChatBaseComponent.ChatSerializer.a(ichatbasecomponent), 262144); // Paper - comment + return this.writeUtf(PaperAdventure.asJsonString(ichatbasecomponent, this.adventure$locale), 262144); // Paper } - + public > T a(Class oclass) { @@ -349,6 +358,7 @@ public class PacketDataSerializer extends ByteBuf { return this.a(s, 32767); } - + + public PacketDataSerializer writeUtf(final String string, final int maxLength) { return this.a(string, maxLength); } // Paper - OBFHELPER public PacketDataSerializer a(String s, int i) { byte[] abyte = s.getBytes(StandardCharsets.UTF_8); - + diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java index dc8cc8d6c00176c8562086282f726dc1b24b2c65..2f6da89d6b25ba5144ec15b1bf0e8ed13278e85e 100644 --- a/src/main/java/net/minecraft/network/PacketEncoder.java @@ -1043,23 +1043,23 @@ index dc8cc8d6c00176c8562086282f726dc1b24b2c65..2f6da89d6b25ba5144ec15b1bf0e8ed1 } else { PacketDataSerializer packetdataserializer = new PacketDataSerializer(bytebuf); + packetdataserializer.adventure$locale = channelhandlercontext.channel().attr(PaperAdventure.LOCALE_ATTRIBUTE).get(); // Paper - + packetdataserializer.d(integer); - + diff --git a/src/main/java/net/minecraft/network/chat/IChatBaseComponent.java b/src/main/java/net/minecraft/network/chat/IChatBaseComponent.java index 85140d961722e86abfe7006a0ad752751e73c721..e96fa348a37a39c381b6659f612232933686c2a7 100644 --- a/src/main/java/net/minecraft/network/chat/IChatBaseComponent.java +++ b/src/main/java/net/minecraft/network/chat/IChatBaseComponent.java @@ -1,5 +1,6 @@ package net.minecraft.network.chat; - + +import io.papermc.paper.adventure.AdventureComponent; // Paper import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; @@ -111,6 +112,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable { - + private IChatBaseComponent a; + public net.kyori.adventure.text.Component adventure$message; // Paper public net.md_5.bungee.api.chat.BaseComponent[] components; // Spigot private ChatMessageType b; private UUID c; @@ -32,6 +33,11 @@ public class PacketPlayOutChat implements Packet { - + @Override public void b(PacketDataSerializer packetdataserializer) throws IOException { + // Paper start @@ -1123,18 +1123,18 @@ index 0268b8e6595ee919bcd55a74ba872a2b7d2a17d8..4ff73a4fc5e8a8739e57d2bac6507681 --- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutPlayerListHeaderFooter.java +++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutPlayerListHeaderFooter.java @@ -9,6 +9,10 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet { - - private PacketPlayOutTitle.EnumTitleAction a; - private IChatBaseComponent b; -+ public net.kyori.adventure.text.Component adventure$text; // Paper - private int c; - private int d; - private int e; -@@ -51,6 +52,11 @@ public class PacketPlayOutTitle implements Packet { - public void b(PacketDataSerializer packetdataserializer) throws IOException { - packetdataserializer.a((Enum) this.a); - if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) { -+ // Paper start -+ if (this.adventure$text != null) { -+ packetdataserializer.writeComponent(this.adventure$text); -+ } else -+ // Paper end - packetdataserializer.a(this.b); - } - diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java index 3fa2e077912949f6ca7b14da93c2206215ebcc7e..5ef8b66cf266488df75ce7399596f75273b90761 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java @@ -1184,7 +1160,7 @@ index 3fa2e077912949f6ca7b14da93c2206215ebcc7e..5ef8b66cf266488df75ce7399596f752 import org.bukkit.GameMode; import org.bukkit.Location; @@ -212,6 +213,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - + // CraftBukkit start public String displayName; + public net.kyori.adventure.text.Component adventure$displayName; // Paper @@ -1192,7 +1168,7 @@ index 3fa2e077912949f6ca7b14da93c2206215ebcc7e..5ef8b66cf266488df75ce7399596f752 public org.bukkit.Location compassTarget; public int newExp = 0; @@ -242,6 +244,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - + // CraftBukkit start this.displayName = this.getName(); + this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getName()); // Paper @@ -1200,21 +1176,21 @@ index 3fa2e077912949f6ca7b14da93c2206215ebcc7e..5ef8b66cf266488df75ce7399596f752 this.maxHealthCache = this.getMaxHealth(); } @@ -695,23 +698,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - + IChatBaseComponent defaultMessage = this.getCombatTracker().getDeathMessage(); - + - String deathmessage = defaultMessage.getString(); - org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); + org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), defaultMessage.getString(), keepInventory); // Paper - Adventure - + // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { this.closeInventory(); } - + - String deathMessage = event.getDeathMessage(); + net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure - + - if (deathMessage != null && deathMessage.length() > 0 && flag) { // TODO: allow plugins to override? - IChatBaseComponent ichatbasecomponent; - if (deathMessage.equals(deathmessage)) { @@ -1224,20 +1200,20 @@ index 3fa2e077912949f6ca7b14da93c2206215ebcc7e..5ef8b66cf266488df75ce7399596f752 - } + if (deathMessage != null && deathMessage != net.kyori.adventure.text.Component.empty() && flag) { // Paper - Adventure // TODO: allow plugins to override? + IChatBaseComponent ichatbasecomponent = PaperAdventure.asVanilla(deathMessage); // Paper - Adventure - + this.playerConnection.a((Packet) (new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, ichatbasecomponent)), (future) -> { if (!future.isSuccess()) { @@ -1669,6 +1666,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.a(ichatbasecomponent, ChatMessageType.SYSTEM, uuid); } - + + public void sendMessage(final IChatBaseComponent message, final ChatMessageType type, final UUID sender) { this.a(message, type, sender); } // Paper - OBFHELPER public void a(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype, UUID uuid) { this.playerConnection.a((Packet) (new PacketPlayOutChat(ichatbasecomponent, chatmessagetype, uuid)), (future) -> { if (!future.isSuccess() && (chatmessagetype == ChatMessageType.GAME_INFO || chatmessagetype == ChatMessageType.SYSTEM)) { @@ -1691,6 +1689,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } - + public String locale = "en_us"; // CraftBukkit - add, lowercase + public java.util.Locale adventure$locale = java.util.Locale.US; // Paper public void a(PacketPlayInSettings packetplayinsettings) { @@ -1259,7 +1235,7 @@ index 16275208954bfc008115aa169c5bfc149f6a4eeb..49a0aefc7f9544b36175fdf3161b255e --- a/src/main/java/net/minecraft/server/network/LoginListener.java +++ b/src/main/java/net/minecraft/server/network/LoginListener.java @@ -37,6 +37,7 @@ import org.apache.logging.log4j.Logger; - + // CraftBukkit start import net.minecraft.network.chat.ChatComponentText; +import io.papermc.paper.adventure.PaperAdventure; // Paper @@ -1276,7 +1252,7 @@ index 16275208954bfc008115aa169c5bfc149f6a4eeb..49a0aefc7f9544b36175fdf3161b255e Waitable waitable = new Waitable() { @Override @@ -312,12 +313,12 @@ public class LoginListener implements PacketLoginInListener { - + LoginListener.this.server.processQueue.add(waitable); if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) { - disconnect(event.getKickMessage()); @@ -1296,12 +1272,12 @@ index 2a96564c1656d42a74c331a6178e511cd5347a66..d219eda271a71f786808a6958b829fca +++ b/src/main/java/net/minecraft/server/network/PacketStatusListener.java @@ -56,7 +56,7 @@ public class PacketStatusListener implements PacketStatusInListener { CraftIconCache icon = minecraftServer.server.getServerIcon(); - + ServerListPingEvent() { - super(((InetSocketAddress) networkManager.getSocketAddress()).getAddress(), minecraftServer.getMotd(), minecraftServer.getPlayerList().getMaxPlayers()); + super(((InetSocketAddress) networkManager.getSocketAddress()).getAddress(), minecraftServer.server.motd(), minecraftServer.getPlayerList().getMaxPlayers()); // Paper - Adventure } - + @Override diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896ccae7c58a3 100644 @@ -1309,7 +1285,7 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -159,6 +159,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - + // CraftBukkit start +import io.papermc.paper.adventure.ChatProcessor; // Paper +import io.papermc.paper.adventure.PaperAdventure; // Paper @@ -1319,7 +1295,7 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc @@ -390,21 +392,24 @@ public class PlayerConnection implements PacketListenerPlayIn { return this.minecraftServer.a(this.player.getProfile()); } - + - // CraftBukkit start - @Deprecated - public void disconnect(IChatBaseComponent ichatbasecomponent) { @@ -1329,7 +1305,7 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc + this.disconnect(PaperAdventure.LEGACY_SECTION_UXRC.deserialize(s)); } - // CraftBukkit end - + - public void disconnect(String s) { + public void disconnect(final IChatBaseComponent reason) { + this.disconnect(PaperAdventure.asAdventure(reason)); @@ -1343,10 +1319,10 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc } - String leaveMessage = EnumChatFormat.YELLOW + this.player.getName() + " left the game."; + net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, this.player.getBukkitEntity().displayName()); // Paper - Adventure - + - PlayerKickEvent event = new PlayerKickEvent(this.server.getPlayer(this.player), s, leaveMessage); + PlayerKickEvent event = new PlayerKickEvent(this.server.getPlayer(this.player), reason, leaveMessage); // Paper - Adventure - + if (this.server.getServer().isRunning()) { this.server.getPluginManager().callEvent(event); @@ -415,8 +420,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1357,11 +1333,11 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc - final IChatBaseComponent ichatbasecomponent = CraftChatMessage.fromString(s, true)[0]; + final IChatBaseComponent ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end - + this.networkManager.sendPacket(new PacketPlayOutKickDisconnect(ichatbasecomponent), (future) -> { @@ -1633,9 +1637,11 @@ public class PlayerConnection implements PacketListenerPlayIn { */ - + this.player.p(); - String quitMessage = this.minecraftServer.getPlayerList().disconnect(this.player); - if ((quitMessage != null) && (quitMessage.length() > 0)) { @@ -1389,11 +1365,11 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc + Player player = this.getPlayer(); // Paper AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(minecraftServer)); this.server.getPluginManager().callEvent(event); - + @@ -2670,21 +2681,20 @@ public class PlayerConnection implements PacketListenerPlayIn { return; } - + - // CraftBukkit start - Player player = this.server.getPlayer(this.player); - int x = packetplayinupdatesign.b().getX(); @@ -1402,7 +1378,7 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc - String[] lines = new String[4]; + // CraftBukkit start // Paper start - Adventure + List lines = new java.util.ArrayList<>(); - + for (int i = 0; i < list.size(); ++i) { - lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a((String) list.get(i))).getString()); + lines.add(net.kyori.adventure.text.Component.text(list.get(i))); @@ -1410,7 +1386,7 @@ index 536a351e1879fcb8066546d1179ad1af034b95da..5db09e60c2ac1f4cb0da3190e57896cc - SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); + SignChangeEvent event = new SignChangeEvent(org.bukkit.craftbukkit.block.CraftBlock.at(worldserver, blockposition), this.getPlayer(), lines); this.server.getPluginManager().callEvent(event); - + if (!event.isCancelled()) { - System.arraycopy(org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines()), 0, tileentitysign.lines, 0, 4); + for (int i = 0; i < 4; i++) { @@ -1434,36 +1410,36 @@ index c601a5c577e438a3fa8dd4c5f36dbe9494b03d52..6ebd4ec781aa215c2b941261250c15c8 import java.text.SimpleDateFormat; @@ -92,6 +93,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - + // CraftBukkit start +import io.papermc.paper.adventure.PaperAdventure; // Paper import com.google.common.base.Predicate; import com.google.common.collect.Iterables; - + @@ -255,7 +257,7 @@ public abstract class PlayerList { } // CraftBukkit start chatmessage.a(EnumChatFormat.YELLOW); - String joinMessage = CraftChatMessage.fromComponent(chatmessage); + IChatBaseComponent joinMessage = chatmessage; // Paper - Adventure - + playerconnection.a(entityplayer.locX(), entityplayer.locY(), entityplayer.locZ(), entityplayer.yaw, entityplayer.pitch); this.players.add(entityplayer); @@ -264,19 +266,18 @@ public abstract class PlayerList { // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below - + // CraftBukkit start - PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); + PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(cserver.getPlayer(entityplayer), PaperAdventure.asAdventure(chatmessage)); // Paper - Adventure cserver.getPluginManager().callEvent(playerJoinEvent); - + if (!entityplayer.playerConnection.networkManager.isConnected()) { return; } - + - joinMessage = playerJoinEvent.getJoinMessage(); + final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); - + - if (joinMessage != null && joinMessage.length() > 0) { - for (IChatBaseComponent line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) { - server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b)); @@ -1473,37 +1449,37 @@ index c601a5c577e438a3fa8dd4c5f36dbe9494b03d52..6ebd4ec781aa215c2b941261250c15c8 + server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure } // CraftBukkit end - + @@ -473,7 +474,7 @@ public abstract class PlayerList { - + } - + - public String disconnect(EntityPlayer entityplayer) { // CraftBukkit - return string + public net.kyori.adventure.text.Component disconnect(EntityPlayer entityplayer) { // Paper - return Component WorldServer worldserver = entityplayer.getWorldServer(); - + entityplayer.a(StatisticList.LEAVE_GAME); @@ -484,7 +485,7 @@ public abstract class PlayerList { entityplayer.closeInventory(); } - + - PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); + PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getName()))); cserver.getPluginManager().callEvent(playerQuitEvent); entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); - + @@ -545,7 +546,7 @@ public abstract class PlayerList { cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end - + - return playerQuitEvent.getQuitMessage(); // CraftBukkit + return playerQuitEvent.quitMessage(); // Paper - Adventure } - + // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer @@ -591,10 +592,10 @@ public abstract class PlayerList { } - + // return chatmessage; - if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot + if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Spigot // Paper - Adventure @@ -1513,10 +1489,10 @@ index c601a5c577e438a3fa8dd4c5f36dbe9494b03d52..6ebd4ec781aa215c2b941261250c15c8 + event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, PaperAdventure.LEGACY_SECTION_UXRC.deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { IpBanEntry ipbanentry = this.l.get(socketaddress); - + @@ -604,17 +605,17 @@ public abstract class PlayerList { } - + // return chatmessage; - event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); + event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Paper - Adventure @@ -1527,7 +1503,7 @@ index c601a5c577e438a3fa8dd4c5f36dbe9494b03d52..6ebd4ec781aa215c2b941261250c15c8 + event.disallow(PlayerLoginEvent.Result.KICK_FULL, PaperAdventure.LEGACY_SECTION_UXRC.deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure } } - + cserver.getPluginManager().callEvent(event); if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) { - loginlistener.disconnect(event.getKickMessage()); @@ -1543,14 +1519,14 @@ index c601a5c577e438a3fa8dd4c5f36dbe9494b03d52..6ebd4ec781aa215c2b941261250c15c8 + player.playerConnection.disconnect(this.server.server.shutdownMessage()); // CraftBukkit - add custom shutdown message // Paper - Adventure } // CraftBukkit end - + diff --git a/src/main/java/net/minecraft/world/BossBattle.java b/src/main/java/net/minecraft/world/BossBattle.java index f9154b306379c45f15fe55406aaa00351b0471e8..1fb9fea7683075f427edfa411c7747d60928d537 100644 --- a/src/main/java/net/minecraft/world/BossBattle.java +++ b/src/main/java/net/minecraft/world/BossBattle.java @@ -1,5 +1,6 @@ package net.minecraft.world; - + +import io.papermc.paper.adventure.PaperAdventure; import java.util.UUID; import net.minecraft.EnumChatFormat; @@ -1560,85 +1536,85 @@ index f9154b306379c45f15fe55406aaa00351b0471e8..1fb9fea7683075f427edfa411c7747d6 protected boolean f; protected boolean g; + public net.kyori.adventure.bossbar.BossBar adventure; // Paper - + public BossBattle(UUID uuid, IChatBaseComponent ichatbasecomponent, BossBattle.BarColor bossbattle_barcolor, BossBattle.BarStyle bossbattle_barstyle) { this.h = uuid; @@ -28,61 +30,75 @@ public abstract class BossBattle { } - + public IChatBaseComponent j() { + if(this.adventure != null) return PaperAdventure.asVanilla(this.adventure.name()); // Paper return this.title; } - + public void a(IChatBaseComponent ichatbasecomponent) { + if (this.adventure != null) this.adventure.name(PaperAdventure.asAdventure(ichatbasecomponent)); // Paper this.title = ichatbasecomponent; } - + public float getProgress() { + if (this.adventure != null) return this.adventure.progress(); // Paper return this.b; } - + public void a(float f) { + if (this.adventure != null) this.adventure.progress(f); // Paper this.b = f; } - + public BossBattle.BarColor l() { + if (this.adventure != null) return PaperAdventure.asVanilla(this.adventure.color()); // Paper return this.color; } - + public void a(BossBattle.BarColor bossbattle_barcolor) { + if(this.adventure != null) this.adventure.color(PaperAdventure.asAdventure(bossbattle_barcolor)); // Paper this.color = bossbattle_barcolor; } - + public BossBattle.BarStyle m() { + if(this.adventure != null) return PaperAdventure.asVanilla(this.adventure.overlay()); // Paper return this.style; } - + public void a(BossBattle.BarStyle bossbattle_barstyle) { + if(this.adventure != null) this.adventure.overlay(PaperAdventure.asAdventure(bossbattle_barstyle)); // Paper this.style = bossbattle_barstyle; } - + public boolean isDarkenSky() { + if(this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.DARKEN_SCREEN); // Paper return this.e; } - + public BossBattle a(boolean flag) { + if(this.adventure != null) PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.DARKEN_SCREEN, flag); // Paper this.e = flag; return this; } - + public boolean isPlayMusic() { + if(this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.PLAY_BOSS_MUSIC); // Paper return this.f; } - + public BossBattle b(boolean flag) { + if(this.adventure != null) PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.PLAY_BOSS_MUSIC, flag); // Paper this.f = flag; return this; } - + public BossBattle c(boolean flag) { + if(this.adventure != null) PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.CREATE_WORLD_FOG, flag); // Paper this.g = flag; return this; } - + public boolean isCreateFog() { + if(this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.CREATE_WORLD_FOG); // Paper return this.g; } - + diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java index 4010152dccc93019f2e7f284d80b92bae0d91c34..f1a780768e3f4bdb43a7ca6d7850befefb71bf57 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java @@ -1646,11 +1622,11 @@ index 4010152dccc93019f2e7f284d80b92bae0d91c34..f1a780768e3f4bdb43a7ca6d7850befe @@ -867,6 +867,7 @@ public final class ItemStack { } // CraftBukkit end - + + public IChatBaseComponent displayName() { return this.C(); } // Paper - OBFHELPER public IChatBaseComponent C() { IChatMutableComponent ichatmutablecomponent = (new ChatComponentText("")).addSibling(this.getName()); - + diff --git a/src/main/java/net/minecraft/world/item/enchantment/Enchantment.java b/src/main/java/net/minecraft/world/item/enchantment/Enchantment.java index 0134bbda9e6fc900b7eefa05442e25539bab3431..b76ef55145336cc8dc4857b79767f5a738ad5144 100644 --- a/src/main/java/net/minecraft/world/item/enchantment/Enchantment.java @@ -1658,39 +1634,39 @@ index 0134bbda9e6fc900b7eefa05442e25539bab3431..b76ef55145336cc8dc4857b79767f5a7 @@ -94,6 +94,7 @@ public abstract class Enchantment { return this.f(); } - + + public final IChatBaseComponent getTranslationComponentForLevel(int level) { return this.d(level); } // Paper - OBFHELPER public IChatBaseComponent d(int i) { ChatMessage chatmessage = new ChatMessage(this.g()); - + diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/WorldMap.java b/src/main/java/net/minecraft/world/level/saveddata/maps/WorldMap.java index 7ec93ddd7e7c9dc54e3e4dcfe0d1654c0b0a8536..3f057f0bd23bc1c693c8f04ee8acd6626c620008 100644 --- a/src/main/java/net/minecraft/world/level/saveddata/maps/WorldMap.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/WorldMap.java @@ -32,6 +32,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - + // CraftBukkit start +import io.papermc.paper.adventure.PaperAdventure; // Paper import java.util.UUID; - + import org.bukkit.craftbukkit.CraftServer; @@ -473,7 +474,7 @@ public class WorldMap extends PersistentBase { for ( org.bukkit.map.MapCursor cursor : render.cursors) { - + if (cursor.isVisible()) { - icons.add(new MapIcon(MapIcon.Type.a(cursor.getRawType()), cursor.getX(), cursor.getY(), cursor.getDirection(), CraftChatMessage.fromStringOrNull(cursor.getCaption()))); + icons.add(new MapIcon(MapIcon.Type.a(cursor.getRawType()), cursor.getX(), cursor.getY(), cursor.getDirection(), PaperAdventure.asVanilla(cursor.caption()))); // Paper - Adventure } } - + diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e25910341aa6b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -562,8 +562,10 @@ public final class CraftServer implements Server { } - + @Override + @Deprecated // Paper start public int broadcastMessage(String message) { @@ -1698,12 +1674,12 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591 + return this.broadcast(message, BROADCAST_CHANNEL_USERS); + // Paper end } - + public Player getPlayer(final EntityPlayer entity) { @@ -1307,7 +1309,15 @@ public final class CraftServer implements Server { return configuration.getInt("settings.spawn-radius", -1); } - + + // Paper start @Override + public net.kyori.adventure.text.Component shutdownMessage() { @@ -1718,7 +1694,7 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591 } @@ -1423,7 +1433,20 @@ public final class CraftServer implements Server { } - + @Override + @Deprecated // Paper public int broadcast(String message, String permission) { @@ -1740,24 +1716,24 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591 @@ -1431,14 +1454,14 @@ public final class CraftServer implements Server { } } - + - BroadcastMessageEvent broadcastMessageEvent = new BroadcastMessageEvent(!Bukkit.isPrimaryThread(), message, recipients); + BroadcastMessageEvent broadcastMessageEvent = new BroadcastMessageEvent(!Bukkit.isPrimaryThread(), message, recipients); // Paper - Adventure getPluginManager().callEvent(broadcastMessageEvent); - + if (broadcastMessageEvent.isCancelled()) { return 0; } - + - message = broadcastMessageEvent.getMessage(); + message = broadcastMessageEvent.message(); // Paper - Adventure - + for (CommandSender recipient : recipients) { recipient.sendMessage(message); @@ -1664,6 +1687,14 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, type); } - + + // Paper start + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { @@ -1772,7 +1748,7 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591 @@ -1676,13 +1707,28 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, size); } - + + // Paper start + @Override + public Inventory createInventory(InventoryHolder owner, int size, net.kyori.adventure.text.Component title) throws IllegalArgumentException { @@ -1786,7 +1762,7 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591 Validate.isTrue(9 <= size && size <= 54 && size % 9 == 0, "Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got " + size + ")"); return CraftInventoryCreator.INSTANCE.createInventory(owner, size, title); } - + + // Paper start + @Override + public Merchant createMerchant(net.kyori.adventure.text.Component title) { @@ -1801,7 +1777,7 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591 @@ -1726,6 +1772,12 @@ public final class CraftServer implements Server { return Thread.currentThread().equals(console.serverThread) || console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog) } - + + // Paper start + @Override + public net.kyori.adventure.text.Component motd() { @@ -1828,12 +1804,12 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 3b48799d084f14722f815cb35cbd48b618380fca..cf6d350e6afc46bb58678192fe0b24b7d923412e 100644 +index 05aedca561919a12ced1925c5cc9af585bb04523..ce9f10f890a5866ab6208c7253b15b09fe323a81 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -19,6 +19,12 @@ public class Main { public static boolean useConsole = true; - + public static void main(String[] args) { + // Paper start + final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected"); @@ -1851,7 +1827,7 @@ index ae735836accc6bf6f0831f72ff882720b69df792..d3ae5cadd88f9012203d2c04cbe38af9 @@ -70,6 +70,19 @@ public class CraftBeacon extends CraftBlockEntityState impleme this.getSnapshot().secondaryEffect = (effect != null) ? MobEffectList.fromId(effect.getId()) : null; } - + + // Paper start + @Override + public net.kyori.adventure.text.Component customName() { @@ -1875,7 +1851,7 @@ index e8ce890c551c9b809e8ba3f7449dc33f3a3a6b80..c99a59573653ee5d14e780137c769116 @@ -32,6 +32,19 @@ public abstract class CraftContainer extends Craf this.getSnapshot().chestLock = (key == null) ? ChestLock.a : new ChestLock(key); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component customName() { @@ -1899,7 +1875,7 @@ index a559a77aae870988f4dd5e6f5f1f08feb3fad054..75ee5cc96c0e54f99e2ce820289bb74f @@ -16,6 +16,19 @@ public class CraftEnchantingTable extends CraftBlockEntityState implements Sign { - + // Lazily initialized only if requested: - private String[] originalLines = null; - private String[] lines = null; @@ -1930,13 +1906,13 @@ index 50d3f9ea1e905522096ef930c144589a1f0d539e..f4b601277ef75e5bc39d541a0d13c6ee + private java.util.ArrayList originalLines = null; // ArrayList for RandomAccess + private java.util.ArrayList lines = null; // ArrayList for RandomAccess + // Paper end - + public CraftSign(final Block block) { super(block, TileEntitySign.class); @@ -24,27 +26,52 @@ public class CraftSign extends CraftBlockEntityState implements super(material, te); } - + + // Paper start @Override - public String[] getLines() { @@ -1981,25 +1957,25 @@ index 50d3f9ea1e905522096ef930c144589a1f0d539e..f4b601277ef75e5bc39d541a0d13c6ee + this.loadLines(); + return this.lines.stream().map(io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC::serialize).toArray(String[]::new); // Paper } - + @Override public String getLine(int index) throws IndexOutOfBoundsException { - return getLines()[index]; + this.loadLines(); + return io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.serialize(this.lines.get(index)); // Paper } - + @Override public void setLine(int index, String line) throws IndexOutOfBoundsException { - getLines()[index] = line; + this.loadLines(); + this.lines.set(index, line != null ? io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(line) : net.kyori.adventure.text.Component.empty()); // Paper } - + @Override @@ -72,16 +99,32 @@ public class CraftSign extends CraftBlockEntityState implements super.applyTo(sign); - + if (lines != null) { - for (int i = 0; i < lines.length; i++) { - String line = (lines[i] == null) ? "" : lines[i]; @@ -2017,7 +1993,7 @@ index 50d3f9ea1e905522096ef930c144589a1f0d539e..f4b601277ef75e5bc39d541a0d13c6ee + // Paper end } } - + + // Paper start + public static IChatBaseComponent[] sanitizeLines(java.util.List lines) { + IChatBaseComponent[] components = new IChatBaseComponent[4]; @@ -2033,7 +2009,7 @@ index 50d3f9ea1e905522096ef930c144589a1f0d539e..f4b601277ef75e5bc39d541a0d13c6ee + // Paper end public static IChatBaseComponent[] sanitizeLines(String[] lines) { IChatBaseComponent[] components = new IChatBaseComponent[4]; - + diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..af986adfdb547cb61fbd52f0f89858f1a9e52cc3 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java @@ -2064,7 +2040,7 @@ index 8f694de2fb3827b9be0dd768ad90eb72c7d708e4..5a14430f63894bbe9daa42900cf5a651 + return io.papermc.paper.adventure.PaperAdventure.asAdventure(getHandle().getTranslationComponentForLevel(level)); + } + // Paper end - + public net.minecraft.world.item.enchantment.Enchantment getHandle() { return target; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -2074,7 +2050,7 @@ index eea242af23825ad29ada6e997205e87edffb6bb9..3cf81734c8580f4d88ea97b6ac737a37 @@ -768,6 +768,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return getHandle().getVehicle().getBukkitEntity(); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component customName() { @@ -2098,12 +2074,12 @@ index 816f2cbebe849a9d9533f985298bcd5d36f660eb..24e856473a0050c0b097c17977635037 @@ -318,9 +318,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { container = CraftEventFactory.callInventoryOpenEvent(player, container); if (container == null) return; - + - String title = container.getBukkitView().getTitle(); + //String title = container.getBukkitView().getTitle(); // Paper - comment + net.kyori.adventure.text.Component adventure$title = container.getBukkitView().title(); // Paper + if (adventure$title == null) adventure$title = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(container.getBukkitView().getTitle()); // Paper - + - player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); + //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper // Paper - comment + player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper @@ -2111,7 +2087,7 @@ index 816f2cbebe849a9d9533f985298bcd5d36f660eb..24e856473a0050c0b097c17977635037 getHandle().activeContainer.addSlotListener(player); } @@ -389,8 +392,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { - + // Now open the window Containers windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); - String title = inventory.getTitle(); @@ -2130,19 +2106,19 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -240,14 +240,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - + @Override public String getDisplayName() { + if(true) return io.papermc.paper.adventure.DisplayNames.getLegacy(this); // Paper return getHandle().displayName; } - + @Override public void setDisplayName(final String name) { + this.getHandle().adventure$displayName = name != null ? io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(name) : net.kyori.adventure.text.Component.text(this.getName()); // Paper getHandle().displayName = name == null ? getName() : name; } - + + // Paper start + @Override + public void playerListName(net.kyori.adventure.text.Component name) { @@ -2172,38 +2148,38 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6 @@ -266,35 +291,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } - + - private IChatBaseComponent playerListHeader; - private IChatBaseComponent playerListFooter; + private net.kyori.adventure.text.Component playerListHeader; // Paper - Adventure + private net.kyori.adventure.text.Component playerListFooter; // Paper - Adventure - + @Override public String getPlayerListHeader() { - return (playerListHeader == null) ? null : CraftChatMessage.fromComponent(playerListHeader); + return (playerListHeader == null) ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.serialize(playerListHeader); // Paper - Adventure } - + @Override public String getPlayerListFooter() { - return (playerListFooter == null) ? null : CraftChatMessage.fromComponent(playerListFooter); + return (playerListFooter == null) ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.serialize(playerListFooter); // Paper - Adventure } - + @Override public void setPlayerListHeader(String header) { - this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true); + this.playerListHeader = header == null ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(header); // Paper - Adventure updatePlayerListHeaderFooter(); } - + @Override public void setPlayerListFooter(String footer) { - this.playerListFooter = CraftChatMessage.fromStringOrNull(footer, true); + this.playerListFooter = footer == null ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(footer); // Paper - Adventure updatePlayerListHeaderFooter(); } - + @Override public void setPlayerListHeaderFooter(String header, String footer) { - this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true); @@ -2212,10 +2188,10 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6 + this.playerListFooter = footer == null ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(footer); // Paper - Adventure updatePlayerListHeaderFooter(); } - + @@ -302,8 +327,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (getHandle().playerConnection == null) return; - + PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter(); - packet.header = (this.playerListHeader == null) ? new ChatComponentText("") : this.playerListHeader; - packet.footer = (this.playerListFooter == null) ? new ChatComponentText("") : this.playerListFooter; @@ -2223,11 +2199,11 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6 + packet.footer = (this.playerListFooter == null) ? new ChatComponentText("") : io.papermc.paper.adventure.PaperAdventure.asVanilla(this.playerListFooter); // Paper - Adventure getHandle().playerConnection.sendPacket(packet); } - + @@ -335,6 +360,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().playerConnection.disconnect(message == null ? "" : message); } - + + // Paper start + @Override + public void kick(final net.kyori.adventure.text.Component message) { @@ -2245,7 +2221,7 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6 @@ -561,6 +597,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().playerConnection.sendPacket(packet); } - + + // Paper start + @Override + public void sendSignChange(Location loc, List lines) { @@ -2282,24 +2258,24 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6 sendSignChange(loc, lines, DyeColor.BLACK); @@ -583,12 +650,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } - + IChatBaseComponent[] components = CraftSign.sanitizeLines(lines); - TileEntitySign sign = new TileEntitySign(); + /*TileEntitySign sign = new TileEntitySign(); // Paper sign.setPosition(new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); sign.setColor(EnumColor.fromColorIndex(dyeColor.getWoolData())); System.arraycopy(components, 0, sign.lines, 0, sign.lines.length); - + - getHandle().playerConnection.sendPacket(sign.getUpdatePacket()); + getHandle().playerConnection.sendPacket(sign.getUpdatePacket());*/ // Paper + this.sendSignChange0(components, loc, dyeColor); // Paper } - + @Override @@ -1688,6 +1756,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return (getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : getHandle().clientViewDistance; } - + + // Paper start + @Override + public java.util.Locale locale() { @@ -2312,7 +2288,7 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6 @@ -1716,6 +1790,138 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component displayName() { @@ -2455,7 +2431,7 @@ index 5df71cbc9d5b7a481fd087623a0d02c98e5fefc4..8a7511fc1876dc6761826dd2636bce19 @@ -788,9 +788,9 @@ public class CraftEventFactory { return event; } - + - public static PlayerDeathEvent callPlayerDeathEvent(EntityPlayer victim, List drops, String deathMessage, boolean keepInventory) { + public static PlayerDeathEvent callPlayerDeathEvent(EntityPlayer victim, List drops, net.kyori.adventure.text.Component deathMessage, String stringDeathMessage, boolean keepInventory) { // Paper - Adventure CraftPlayer entity = victim.getBukkitEntity(); @@ -2478,7 +2454,7 @@ index 384520dd734449d4e4f5243fbaad5f666b0c965c..614ab2d73db2293116f2272f6cd5c16d --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java @@ -39,6 +39,7 @@ public class CraftContainer extends Container { - + private final InventoryView view; private InventoryType cachedType; + private net.kyori.adventure.text.Component adventure$title; // Paper @@ -2499,7 +2475,7 @@ index 384520dd734449d4e4f5243fbaad5f666b0c965c..614ab2d73db2293116f2272f6cd5c16d @@ -77,6 +80,13 @@ public class CraftContainer extends Container { return inventory.getType(); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component title() { @@ -2511,7 +2487,7 @@ index 384520dd734449d4e4f5243fbaad5f666b0c965c..614ab2d73db2293116f2272f6cd5c16d public String getTitle() { return inventory instanceof CraftInventoryCustom ? ((CraftInventoryCustom.MinecraftInventory) ((CraftInventory) inventory).getInventory()).getTitle() : inventory.getType().getDefaultTitle(); @@ -95,7 +105,8 @@ public class CraftContainer extends Container { - + @Override public boolean c(EntityHuman entityhuman) { - if (cachedType == view.getType() && cachedSize == getSize() && cachedTitle.equals(view.getTitle())) { @@ -2548,7 +2524,7 @@ index a537cc4ac5d052168f96a1ae73b6b17a380436ab..21347cf02cc01c90a81e7dd8264ef119 @@ -19,6 +19,12 @@ public class CraftInventoryCustom extends CraftInventory { super(new MinecraftInventory(owner, type)); } - + + // Paper start + public CraftInventoryCustom(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { + super(new MinecraftInventory(owner, type, title)); @@ -2561,7 +2537,7 @@ index a537cc4ac5d052168f96a1ae73b6b17a380436ab..21347cf02cc01c90a81e7dd8264ef119 @@ -27,6 +33,12 @@ public class CraftInventoryCustom extends CraftInventory { super(new MinecraftInventory(owner, size)); } - + + // Paper start + public CraftInventoryCustom(InventoryHolder owner, int size, net.kyori.adventure.text.Component title) { + super(new MinecraftInventory(owner, size, title)); @@ -2578,7 +2554,7 @@ index a537cc4ac5d052168f96a1ae73b6b17a380436ab..21347cf02cc01c90a81e7dd8264ef119 + private final net.kyori.adventure.text.Component adventure$title; // Paper private InventoryType type; private final InventoryHolder owner; - + + // Paper start + public MinecraftInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { + this(owner, type.getDefaultSize(), title); @@ -2598,7 +2574,7 @@ index a537cc4ac5d052168f96a1ae73b6b17a380436ab..21347cf02cc01c90a81e7dd8264ef119 this.owner = owner; this.type = InventoryType.CHEST; } - + + // Paper start + public MinecraftInventory(final InventoryHolder owner, final int size, final net.kyori.adventure.text.Component title) { + Validate.notNull(title, "Title cannot be null"); @@ -2617,7 +2593,7 @@ index a537cc4ac5d052168f96a1ae73b6b17a380436ab..21347cf02cc01c90a81e7dd8264ef119 @@ -183,6 +216,12 @@ public class CraftInventoryCustom extends CraftInventory { return null; } - + + // Paper start + public net.kyori.adventure.text.Component title() { + return this.adventure$title; @@ -2634,7 +2610,7 @@ index 04073ed45f8068d80e58d3927b5ebc3160c6a8c6..9949bb8cac73b2f1f02b51079c0e244f @@ -64,6 +64,13 @@ public class CraftInventoryView extends InventoryView { return CraftItemStack.asCraftMirror(container.getSlot(slot).getItem()); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component title() { @@ -2672,9 +2648,9 @@ index ef10c7ab1d615cdba182eca63eb14309339a5314..206c133ebc6c44038585236b0628543b --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java @@ -14,10 +14,17 @@ import org.apache.commons.lang.Validate; - + public class CraftMerchantCustom extends CraftMerchant { - + + @Deprecated // Paper - Adventure public CraftMerchantCustom(String title) { super(new MinecraftMerchant(title)); @@ -2686,13 +2662,13 @@ index ef10c7ab1d615cdba182eca63eb14309339a5314..206c133ebc6c44038585236b0628543b + getMerchant().craftMerchant = this; + } + // Paper end - + @Override public String toString() { @@ -37,10 +44,17 @@ public class CraftMerchantCustom extends CraftMerchant { private World tradingWorld; protected CraftMerchant craftMerchant; - + + @Deprecated // Paper - Adventure public MinecraftMerchant(String title) { Validate.notNull(title, "Title cannot be null"); @@ -2704,7 +2680,7 @@ index ef10c7ab1d615cdba182eca63eb14309339a5314..206c133ebc6c44038585236b0628543b + this.title = io.papermc.paper.adventure.PaperAdventure.asVanilla(title); + } + // Paper end - + @Override public CraftMerchant getCraftMerchant() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -2713,7 +2689,7 @@ index 4cdc504df4cad6f7725f6d18482e88433523943a..65b6d32e3e1130a64df33082f3292cb1 +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -1,8 +1,9 @@ package org.bukkit.craftbukkit.inventory; - + import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap.Builder; import com.google.common.collect.Lists; @@ -2727,13 +2703,13 @@ index 4cdc504df4cad6f7725f6d18482e88433523943a..65b6d32e3e1130a64df33082f3292cb1 import org.bukkit.inventory.meta.BookMeta; import org.bukkit.inventory.meta.BookMeta.Generation; +import org.checkerframework.checker.nullness.qual.NonNull; - + // Spigot start import static org.spigotmc.ValidateUtils.*; @@ -269,6 +271,141 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { this.generation = (generation == null) ? null : generation.ordinal(); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component title() { @@ -2874,12 +2850,12 @@ index 4cdc504df4cad6f7725f6d18482e88433523943a..65b6d32e3e1130a64df33082f3292cb1 Validate.isTrue(isValidPage(page), "Invalid page number"); @@ -413,7 +550,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { } - + @Override - Builder serialize(Builder builder) { + ImmutableMap.Builder serialize(ImmutableMap.Builder builder) { super.serialize(builder); - + if (hasTitle()) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java index 0835541f51e643ae824c197be7100d5849b5e92a..0d58ec9834797ad7b9acaae6353dcf0385c53fd4 100644 @@ -2887,7 +2863,7 @@ index 0835541f51e643ae824c197be7100d5849b5e92a..0d58ec9834797ad7b9acaae6353dcf03 +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -1,6 +1,6 @@ package org.bukkit.craftbukkit.inventory; - + -import com.google.common.collect.ImmutableMap.Builder; +import com.google.common.collect.ImmutableMap; // Paper import java.util.Map; @@ -2895,7 +2871,7 @@ index 0835541f51e643ae824c197be7100d5849b5e92a..0d58ec9834797ad7b9acaae6353dcf03 import org.bukkit.Material; @@ -84,7 +84,7 @@ class CraftMetaBookSigned extends CraftMetaBook implements BookMeta { } - + @Override - Builder serialize(Builder builder) { + ImmutableMap.Builder serialize(ImmutableMap.Builder builder) { @@ -2909,7 +2885,7 @@ index 928328c292a1322cab478bc748761baf8608e4b0..7a11b2ddfa4244459253c918315aaab7 @@ -745,6 +745,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return !(hasDisplayName() || hasLocalizedName() || hasEnchants() || (lore != null) || hasCustomModelData() || hasBlockData() || hasRepairCost() || !unhandledTags.isEmpty() || !persistentDataContainer.isEmpty() || hideFlag != 0 || isUnbreakable() || hasDamage() || hasAttributeModifiers()); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component displayName() { @@ -2928,7 +2904,7 @@ index 928328c292a1322cab478bc748761baf8608e4b0..7a11b2ddfa4244459253c918315aaab7 @@ -780,6 +792,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore != null && !this.lore.isEmpty(); } - + + // Paper start + @Override + public List lore() { @@ -2951,7 +2927,7 @@ index ed4415f6dd588c08c922efd5beebb3b124beb9d6..78a7ac47f20e84ccd67ff44d0bc7a2f2 @@ -12,6 +12,13 @@ public class CraftCustomInventoryConverter implements CraftInventoryCreator.Inve return new CraftInventoryCustom(holder, type); } - + + // Paper start + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { @@ -2965,7 +2941,7 @@ index ed4415f6dd588c08c922efd5beebb3b124beb9d6..78a7ac47f20e84ccd67ff44d0bc7a2f2 @@ -21,6 +28,12 @@ public class CraftCustomInventoryConverter implements CraftInventoryCreator.Inve return new CraftInventoryCustom(owner, size); } - + + // Paper start + public Inventory createInventory(InventoryHolder owner, int size, net.kyori.adventure.text.Component title) { + return new CraftInventoryCustom(owner, size, title); @@ -2982,7 +2958,7 @@ index b51321c8dd70a90ab149f456c7ffb4587c4fbd34..94d807c5d09f165c6eedd0a1c4026c2b @@ -43,6 +43,17 @@ public final class CraftInventoryCreator { return converterMap.get(type).createInventory(holder, type); } - + + // Paper start + public Inventory createInventory(InventoryHolder holder, InventoryType type, net.kyori.adventure.text.Component title) { + // Paper start @@ -3000,7 +2976,7 @@ index b51321c8dd70a90ab149f456c7ffb4587c4fbd34..94d807c5d09f165c6eedd0a1c4026c2b @@ -51,6 +62,12 @@ public final class CraftInventoryCreator { return DEFAULT_CONVERTER.createInventory(holder, size); } - + + // Paper start + public Inventory createInventory(InventoryHolder holder, int size, net.kyori.adventure.text.Component title) { + return DEFAULT_CONVERTER.createInventory(holder, size, title); @@ -3011,9 +2987,9 @@ index b51321c8dd70a90ab149f456c7ffb4587c4fbd34..94d807c5d09f165c6eedd0a1c4026c2b return DEFAULT_CONVERTER.createInventory(holder, size, title); } @@ -59,6 +76,10 @@ public final class CraftInventoryCreator { - + Inventory createInventory(InventoryHolder holder, InventoryType type); - + + // Paper start + Inventory createInventory(InventoryHolder holder, InventoryType type, net.kyori.adventure.text.Component title); + // Paper end @@ -3028,7 +3004,7 @@ index f35e66dab9ff63ca05d7e303c71106c0e9971309..2bd4e644ffbde2e1133b25824a2829bc @@ -31,6 +31,18 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat return getInventory(getTileEntity()); } - + + // Paper start + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { @@ -3047,7 +3023,7 @@ index f35e66dab9ff63ca05d7e303c71106c0e9971309..2bd4e644ffbde2e1133b25824a2829bc @@ -54,6 +66,15 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat return furnace; } - + + // Paper start + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { @@ -3063,7 +3039,7 @@ index f35e66dab9ff63ca05d7e303c71106c0e9971309..2bd4e644ffbde2e1133b25824a2829bc @@ -74,6 +95,18 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat return new TileEntityBrewingStand(); } - + + // Paper start + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { @@ -3086,7 +3062,7 @@ index 8fedca656af0783f3d97a7ccde3a113f97911084..df3deee12b11508b76c5f8f927fac8db @@ -31,6 +31,21 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective return objective.getName(); } - + + // Paper start + @Override + public net.kyori.adventure.text.Component displayName() throws IllegalStateException { @@ -3134,11 +3110,11 @@ index 954389b818de93cf0ab046edc5dc032fceea391b..6ea491f6308317059c4bc6735abbdce3 + return new CraftObjective(this, objective); + } + // Paper end - + @Override public CraftObjective registerNewObjective(String name, String criteria, String displayName) throws IllegalArgumentException { @@ -36,7 +57,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { - + @Override public CraftObjective registerNewObjective(String name, String criteria, String displayName, RenderType renderType) throws IllegalArgumentException { - Validate.notNull(name, "Objective name cannot be null"); @@ -3147,21 +3123,21 @@ index 954389b818de93cf0ab046edc5dc032fceea391b..6ea491f6308317059c4bc6735abbdce3 Validate.notNull(displayName, "Display name cannot be null"); Validate.notNull(renderType, "RenderType cannot be null"); @@ -46,7 +67,8 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { - + CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria); ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, CraftChatMessage.fromStringOrNull(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); - return new CraftObjective(this, objective); + return new CraftObjective(this, objective);*/ // Paper + return registerNewObjective(name, criteria, io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(displayName), renderType); // Paper } - + @Override diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java index a213c2e3b2680c6d1bd38853580cbdb52ae7779e..c631934fe9d205a06956c900d5b58a1d8a781c19 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -29,6 +29,55 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { - + return team.getName(); } + // Paper start @@ -3213,7 +3189,7 @@ index a213c2e3b2680c6d1bd38853580cbdb52ae7779e..c631934fe9d205a06956c900d5b58a1d + team.setColor(io.papermc.paper.adventure.PaperAdventure.asVanilla(color)); + } + // Paper end - + @Override public String getDisplayName() throws IllegalStateException { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -3221,21 +3197,21 @@ index 6a0b4cd36ac54df41642e8499c50e59f2b347b48..666af6cc91bd12ba5d5a846d663a5aab --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -290,6 +290,7 @@ public final class CraftChatMessage { - + public static String fromComponent(IChatBaseComponent component) { if (component == null) return ""; + if (component instanceof io.papermc.paper.adventure.AdventureComponent) component = ((io.papermc.paper.adventure.AdventureComponent) component).deepConverted(); StringBuilder out = new StringBuilder(); - + boolean hadFormat = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java index 65131f0977fa55c4761c34ce52720170feb61a72..8f737f63f280c00c1276bd1dc3ecf60448732ca8 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -59,6 +59,33 @@ public final class CraftMagicNumbers implements UnsafeValues { - + private CraftMagicNumbers() {} - + + // Paper start + @Override + public net.kyori.adventure.text.flattener.ComponentFlattener componentFlattener() { @@ -3273,10 +3249,10 @@ index f194cf2663919ea18309a0501ddfab5e2ed639dd..4b110d6c6f22ff7c2fa0fd4b45982079 @@ -80,7 +80,7 @@ public abstract class LazyHashSet implements Set { return this.reference = makeReference(); } - + - abstract Set makeReference(); + protected abstract Set makeReference(); // Paper - protected - + public boolean isLazy() { return reference == null; diff --git a/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java @@ -3285,7 +3261,7 @@ index e7b9250ebdd0d9034ef18a96a6cacc83e6db69c2..20ee8468bcf305139a51da61f5f90267 +++ b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java @@ -15,10 +15,15 @@ public class LazyPlayerSet extends LazyHashSet { } - + @Override - HashSet makeReference() { + protected HashSet makeReference() { // Paper - protected diff --git a/Spigot-Server-Patches/0013-Configurable-fishing-time-ranges.patch b/Spigot-Server-Patches/0013-Configurable-fishing-time-ranges.patch index 7d7162311..b516f276e 100644 --- a/Spigot-Server-Patches/0013-Configurable-fishing-time-ranges.patch +++ b/Spigot-Server-Patches/0013-Configurable-fishing-time-ranges.patch @@ -22,7 +22,7 @@ index 796c17e0941922a9716212c6eae91643d8360418..78948c42b13194005bdbbbc69c2b7ae0 + } } diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java -index 2b75eab985b0f39e1624e5f4cab7e5b5bde6ae14..bcc411107d531529dbce9d1d43896a3c70e63012 100644 +index 382b40a2a030993e1e98f34bc91befdd45c16895..7402e3b305d9bb7b27b97ff2078c26dd578232a1 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java @@ -85,6 +85,10 @@ public class EntityFishingHook extends IProjectile { diff --git a/Spigot-Server-Patches/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/Spigot-Server-Patches/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index cbf2e1e52..3c4047985 100644 --- a/Spigot-Server-Patches/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/Spigot-Server-Patches/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -19,7 +19,7 @@ index 78948c42b13194005bdbbbc69c2b7ae0732a78c5..b41e7922dd96c3358eb849ab39982a75 + } } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index db8970539f7f69c9087abe43286bca008cb4594d..0b86c697541e3ee6083b3c10ab3618ef740b1904 100644 +index 306f6c0db2333cce5dfc4bf1c09bfef05119a28b..f823763a2f7f40d0be8d058a1bd61386bcd951e6 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1105,6 +1105,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0017-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0017-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 26dfa439b..ec9ba5059 100644 --- a/Spigot-Server-Patches/0017-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0017-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -25,7 +25,7 @@ index 89e76dd73811fd0f6f8c8e7e5af804d5a4bb5a75..d16ae924bcbe31c964f7fb448757c748 + } } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0b86c697541e3ee6083b3c10ab3618ef740b1904..d7dfb89faa47817c51257bb124cfb3806c5e27da 100644 +index f823763a2f7f40d0be8d058a1bd61386bcd951e6..20e4ff812960a54872f2fea8fe6baf7bb1ef077d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1850,6 +1850,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index d217c0a5b..6ff3ad51f 100644 --- a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -32,7 +32,7 @@ index 85c96e3f70a3ffecb6195a1d83053412eb180d78..c21790b4de698aa6f7fc4dadab64d791 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2c2e87d96f61e7ef88847df70e1c6153bca9fcd3..a9449a62f678ec6dc5e923c64e89140bb96fb697 100644 +index 2ad09749f3005c3eff143d83580e25910341aa6b..462633df2af43959fddf5b7a8ec43063abf7b14b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -225,7 +225,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -45,7 +45,7 @@ index 2c2e87d96f61e7ef88847df70e1c6153bca9fcd3..a9449a62f678ec6dc5e923c64e89140b private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index cf6d350e6afc46bb58678192fe0b24b7d923412e..2819c734fb6b8ed82df143e90c24316f3e8c551e 100644 +index ce9f10f890a5866ab6208c7253b15b09fe323a81..e8c225fcd1a3fa5a7e1971683b1876dd6462a1e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -206,12 +206,25 @@ public class Main { diff --git a/Spigot-Server-Patches/0021-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0021-Player-affects-spawning-API.patch index aaedffd84..0ccd83d4e 100644 --- a/Spigot-Server-Patches/0021-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0021-Player-affects-spawning-API.patch @@ -17,7 +17,7 @@ index 20e4ff812960a54872f2fea8fe6baf7bb1ef077d..cae9da158f54438d2a397665c7ce964f double d3 = this.locX() - d0; double d4 = this.locY() - d1; diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index f93af56f68d5fd27eca38d333ca429ce22fc397b..0631cd531647239858b2a7298f58cc770720f69a 100644 +index 6e30fc88fa7a3ff00c9b4b78842c3a533649bd50..31bb5df7bc63c993230bf595bd9b66bfaadb4d50 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -756,7 +756,7 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch index 69c169294..a06ff56c4 100644 --- a/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch @@ -29,7 +29,7 @@ index d16ae924bcbe31c964f7fb448757c748e5c4418c..4bba6977a0287837b8927718c040ac61 + } } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index dce47ec1fc186d12ffa30bfd3d71870aecb95d40..cf92de7c138ef9cbbc1263bee29b9d0017b45827 100644 +index f6f0d551e22ff085935c1543bf84392de0368214..df2582c3b00977d799b189214d7d4f30ded5b66d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -500,9 +500,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0033-Optimize-explosions.patch b/Spigot-Server-Patches/0033-Optimize-explosions.patch index 78ab38797..d53944272 100644 --- a/Spigot-Server-Patches/0033-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0033-Optimize-explosions.patch @@ -25,7 +25,7 @@ index e6e18f309dc09ea9416ea37dcc697ddc2b571a96..4881b03d470646843bad1bc343eb6a6a + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index add4f149fd31d1420d825b646b3e088808e5896b..06071e15851d5d27f1c9a0d60a764a6214e0ba0f 100644 +index fb0d985b5c977a7c63701484678b75928d9ee382..ed71de473d461528d74ca5b95c33b97e98128aff 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1326,6 +1326,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { - } - - } -+ // Paper start -+ public net.md_5.bungee.api.chat.BaseComponent[] components; -+ -+ public PacketPlayOutTitle(EnumTitleAction action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) { -+ this.a = action; -+ this.components = components; -+ this.c = fadeIn; -+ this.d = stay; -+ this.e = fadeOut; -+ } -+ // Paper end - - @Override - public void b(PacketDataSerializer packetdataserializer) throws IOException { -@@ -55,6 +66,8 @@ public class PacketPlayOutTitle implements Packet { - // Paper start - if (this.adventure$text != null) { - packetdataserializer.writeComponent(this.adventure$text); -+ } else if (this.components != null) { -+ packetdataserializer.writeComponent(this.components); - } else - // Paper end - packetdataserializer.a(this.b); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 62f8d96f996ece87b7ab8d5d05d1dc214d10dbfa..9837f7364f3efd0aa22d33058bec369c41cd03ef 100644 +index fb792de46ff80a6bad77a47954861cddfd17f2d9..1ad5863dc12b2288a38efed71b7fa4b84296d96d 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 @@ package org.bukkit.craftbukkit.entity; - + +import com.destroystokyo.paper.Title; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; @@ -77,7 +46,7 @@ index 62f8d96f996ece87b7ab8d5d05d1dc214d10dbfa..9837f7364f3efd0aa22d33058bec369c @@ -238,6 +239,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } - + + // Paper start + @Override + public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) { diff --git a/Spigot-Server-Patches/0053-Add-velocity-warnings.patch b/Spigot-Server-Patches/0053-Add-velocity-warnings.patch index 16e9a2747..41c25af3b 100644 --- a/Spigot-Server-Patches/0053-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0053-Add-velocity-warnings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bfd78c41757c73736371811aab97ca05a01667c9..c952b193618c58335172117dfe475047a1178ac5 100644 +index f78f5e4f2c04b64dff1d2229a137c600f18e7051..22b4dec4944b7f823996645af95fbef2d1d8a83b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -261,6 +261,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0058-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0058-Add-methods-for-working-with-arrows-stuck-in-living-.patch index a2f353ae1..688500282 100644 --- a/Spigot-Server-Patches/0058-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/0058-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 9f7334ae769438cdd77508000e7721f57b30e225..a81afaf47214dcb4452642a7e8f295eb94ca6501 100644 +index d863fc9fa6b932b76a89871a09378a9c0697c108..c654026587bc9bf77b39f59a0c89991ac581da1e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -689,4 +689,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch index 61421fdb4..6ae4874a0 100644 --- a/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch @@ -30,7 +30,7 @@ index 429b74474ced04d8dd8f038b8590b8dfe178bf4d..716f285e67019b8a62922d09c15883c9 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c952b193618c58335172117dfe475047a1178ac5..ac10067e924cfbfe0a528cad62293686c0c24562 100644 +index 22b4dec4944b7f823996645af95fbef2d1d8a83b..6eec60b5739edb8f7278608e525b38bdac15bba8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -398,6 +398,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch index e87ee15fe..777dfb501 100644 --- a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 4010152dccc93019f2e7f284d80b92bae0d91c34..d7c5065457d910f3e5481fda046d368d5f66f67b 100644 +index f1a780768e3f4bdb43a7ca6d7850befefb71bf57..201ba7250b298f4a91bc45f5954f54ae557305f2 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -9,6 +9,8 @@ import com.mojang.serialization.Codec; diff --git a/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch index 0cc21d37c..1aea311bf 100644 --- a/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -30,7 +30,7 @@ index 3ac2ac3db9b1c271b3c21930bb13716669ff64d3..3c78d3234054ce2dc46ef77decb6adb0 + } } diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java b/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java -index a05ee898bd360f49ea2807d06f93e27ada11ef63..9bd4a283a99f86c9a26f73e0bad0c3414d66ad55 100644 +index 04af85e0ccb7a98e0796afcdcce33f8595b1db8c..7868259a94766a6100d7b278c4296dde0a7f9397 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java @@ -283,7 +283,7 @@ public abstract class EntityArrow extends IProjectile { diff --git a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch index e8f87bb7d..ff0b627ec 100644 --- a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index eddfbd25953e8ef410f1617a1edecbc7d07696c0..b04a6cd626fceed26aec6121e20fb1b6dd1c716d 100644 +index a1769df6a3f6150d322f145199caba3839871dff..3ea4ec748c229031a5f0d973988bb20e55679971 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -197,7 +197,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -19,7 +19,7 @@ index eddfbd25953e8ef410f1617a1edecbc7d07696c0..b04a6cd626fceed26aec6121e20fb1b6 } diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index b0ad55f35285cc1bc339859a8deae65e930082b8..067f5e46ad2f28ab119db77b19c4897bed9b3d80 100644 +index 01cb0c8dd9875986e0c08371e876f0dba3f0cf5a..a570998e4ef6c3ff83403881bf1d24c8cbcfcf67 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java @@ -297,11 +297,27 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch index defeebd3f..bf2af97bf 100644 --- a/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 318c96ee92fc8c6f5926aeadaa597d32ad590974..9b12e15a6c377ae90193596a35114dd452cf6e0c 100644 +index 70211129e6ab2f7cdb975adcb532be595bc3834f..759592fc6a4654c0760ff8a1d7f3b87c364b045a 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -3205,9 +3205,10 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 7560b3467..a64c157fc 100644 --- a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 082a3efb8c03e6a0a35411107f3cf3776dee14bf..c7b40800343edb2c2a68786afb828c9dc3e3627f 100644 +index 759592fc6a4654c0760ff8a1d7f3b87c364b045a..375284b7e321cb03a7a30aedea165ca7a2fd1091 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -702,7 +702,13 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch index 1579a0057..23a114a45 100644 --- a/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b7df4d8eb3ccb9e8dc85898352f41c5c20abcb34..6cbb797cb0de4b26d8ddd7f0bf567f49bd36f9c0 100644 +index bfced192c1e8fd3fa0250a0f93adfc061d7e71e5..415935739716df3b8b3319aac19519d29aaa5776 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -143,6 +143,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch index a0c1e7b12..768d4bc95 100644 --- a/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch @@ -22,7 +22,7 @@ index 3c78d3234054ce2dc46ef77decb6adb0cbd10620..cd64fb9d0c6d123e1c86cb33f12cd9ce + } } diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 045183ab75bac68b1da5e0899a15fa34cd9e956f..a5ee8bf7904444ff6fd82260a66a81c9af479f9e 100644 +index 3ea4ec748c229031a5f0d973988bb20e55679971..5cd864e58b85fa163489557437f5c2eec9f008b7 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -590,7 +590,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 357ba81b5..b10153a49 100644 --- a/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 06071e15851d5d27f1c9a0d60a764a6214e0ba0f..33139f9dc6a9c6030f565b01c9b6fd411cafa710 100644 +index ed71de473d461528d74ca5b95c33b97e98128aff..b141c744b8ffbc37b09cb4347c4051a77bb7049e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1292,6 +1292,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index a5ee8bf7904444ff6fd82260a66a81c9af479f9e..c5baf9c448761f24c4fd49d7c4bade7dee43edf4 100644 +index 5cd864e58b85fa163489557437f5c2eec9f008b7..a82affb9ffd0b2a513dcbf29402e99b49ed95d63 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -196,6 +196,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch index e910aa110..61e53caa2 100644 --- a/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index c5baf9c448761f24c4fd49d7c4bade7dee43edf4..b40089319329a0843c4d74ebd6189fc4089e319a 100644 +index a82affb9ffd0b2a513dcbf29402e99b49ed95d63..24a45e5ac9b17feb528e9a047d1ad1761569ebfa 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1214,7 +1214,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch index 063b7e7b4..c5364da58 100644 --- a/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index cfd0af520dd3dcf364a3ffd03a74e3b9ee6045af..152aa38788a21638aab7cfe2dc187671f1143bde 100644 +index 46c516b9ff089a3c885d635244942fd5a6ecf132..9d327f1255dd9d6b11840f7bb8ffc302bc33dbcf 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -246,6 +246,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index d3f898437..d855eabdf 100644 --- a/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 70db5312ac556ea53247efdbc7759910ba0c9a95..7611481db980a230d42b3cec1d81fae2622ca634 100644 +index 9236e480d21340d4295caa16dae34363e182f483..8da8141c2320c0c1a9b95826a9be2dbe22e11c14 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java @@ -518,6 +518,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 1d55264b2..1cdc8fed9 100644 --- a/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -26,7 +26,7 @@ index db2dddd12f54e6d15916c4cee623676541de37fb..1942f5224aaebb18adb591d6f70a419c + } } diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java -index f4d0c4ed270769de7a9ed35643a6cc649c482ed5..294b8ac155c77ae84732c7aeeef9ee6269ff85b1 100644 +index 909968952a7ae2aa0196f12d1b3177cade380db2..1fcb01abc93c3c6ad172f209f55421d8b98629d5 100644 --- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java @@ -17,7 +17,11 @@ import net.kyori.adventure.text.event.ClickEvent; diff --git a/Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch index 99e9b4058..43f4080f0 100644 --- a/Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index acbd10432b09172f7541b2f4081d1aa9812194ac..ecb07130be80b484e0f2241a368db967775148e8 100644 +index 375284b7e321cb03a7a30aedea165ca7a2fd1091..db5c0d2da9ed9993ee83adccfa74e77f4e364f2a 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -1130,10 +1130,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch index f215104b5..a59d0ec3f 100644 --- a/Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ 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 026ddfba26439a00685f3962084aa6194086c9b7..f990f242a8d812a93b454b065a17fd4e8170355a 100644 +index 8df60cedc1198916dfce8fcea7ca4a49f98429ba..ed00ee8e56e6ca38a1ac689458c4675eff6e3eea 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -180,6 +180,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot diff --git a/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 73619accb..583690ace 100644 --- a/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -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/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 2412c2fa22abe171254f7fe49d319bcd6cc533ff..c4bbc4e97ee1871ed6e4364c1fe9204b0dd2fdae 100644 +index 75424a5dd6db57dded3b6d895e6b5b102e91c77e..c7652d6bff7630e2eefbb4c3b0deb6e17b9c98d0 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1170,6 +1170,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch index 7d27f2066..52eb70b9d 100644 --- a/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch @@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..9dae34370d014a291f025f83b55e18bf + } +} diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6cbb797cb0de4b26d8ddd7f0bf567f49bd36f9c0..2b1b46bda48c0b137fe914c47a387e6e72a1be40 100644 +index 415935739716df3b8b3319aac19519d29aaa5776..092ee75f9527af25a48ab052659e3304986b50e0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -158,6 +158,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch b/Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch index e05a8f815..1cbedf26c 100644 --- a/Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch +++ b/Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch @@ -5,7 +5,7 @@ Subject: [PATCH] System property for disabling watchdoge diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 0cb3028872041ce9f75e57fdd84b79636d8809f3..882cd398ee6babc3088ea0bb442d61fb46d8bf08 100644 +index 69e5054886b5858664fed333aca8c25a76e5cb11..4e0291be4bd5876bb5b5f62ebfa156635d4c758f 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -61,7 +61,7 @@ public class WatchdogThread extends Thread diff --git a/Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch index 3f1918cdd..a7c61c285 100644 --- a/Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch @@ -10,7 +10,7 @@ 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 f990f242a8d812a93b454b065a17fd4e8170355a..283c1111d99b6ae09b6db0c0079eeb0f1cbb7b2b 100644 +index ed00ee8e56e6ca38a1ac689458c4675eff6e3eea..20dffd9dc4cb3868638151b70535f353a3bf1a44 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -907,7 +907,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index e008ef98d6902f5e1000da99870b12ae9d61bddb..6137a88e1dc8d19a4e35ad97500dabeddba008a8 100644 +index 811e80ebb65715b7cdd1443aa33186c3ce2ec70c..744ec6f09a1b3ccdf0d74fe50f1e1c913ee2df86 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -847,7 +847,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch index ece37f932..ea0d507b6 100644 --- a/Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch +++ b/Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove FishingHook reference on Craft Entity removal diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index f8e897f0bc4e5d0a432d20983fd37998bb00ae0f..b480ca876687991685b5e070181721da8192a5b6 100644 +index 4dd3deaabfdb383ded92920e1a313b61a1b9262b..4805bce05f2856289608f45df4fca322de161b31 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -119,4 +119,14 @@ public class CraftFishHook extends CraftProjectile implements FishHook { diff --git a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch index 732e5f79a..40404fd39 100644 --- a/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch @@ -21,7 +21,7 @@ index cc31c8f31a385f3a8bfe334e75c3553689397750..d6e1697f64e60f2a567288c604a16901 if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { return; diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index 651ee45431c22b944fac640f936608ae587c055d..6df58fe8084d866de1697ef3fdbfe6648fe42b5f 100644 +index ef838bbcc23145ebd5203963923030a8f971cd6e..72ed4de72c87e9c241507838ddb42eaa4c05ef32 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -787,6 +787,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation diff --git a/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch index 304934ac4..34efb26a3 100644 --- a/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java -index bcc411107d531529dbce9d1d43896a3c70e63012..57e7b9c7f7f43666d442648120cda3b4b3e5bfb2 100644 +index 7402e3b305d9bb7b27b97ff2078c26dd578232a1..2067af9b13c7ce28cd8ad6c785e2d0a7ff013430 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java @@ -240,6 +240,11 @@ public class EntityFishingHook extends IProjectile { diff --git a/Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch index 61881f07d..011e094dc 100644 --- a/Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index d7c5065457d910f3e5481fda046d368d5f66f67b..58045d500a6fbb7eb568f48c7d8ce7730d357577 100644 +index 201ba7250b298f4a91bc45f5954f54ae557305f2..cac92ccacc9d5ff17c70ee266cf12bacce6242ea 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -208,7 +208,7 @@ public final class ItemStack { diff --git a/Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch index 6b9000b82..8d198833b 100644 --- a/Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 0631cd531647239858b2a7298f58cc770720f69a..6ee5e1b0bb34ba490a130fbcbdb7a2706c5ecf86 100644 +index 31bb5df7bc63c993230bf595bd9b66bfaadb4d50..ccdfc8068a8205d6e66ab9458764b1440f8c4b97 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -38,6 +38,7 @@ import net.minecraft.world.entity.ai.control.ControllerLook; diff --git a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch index 20f702475..08c66ad7f 100644 --- a/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch @@ -18,7 +18,7 @@ index c8bb06a31242089ad950713bd5f94abbfe12adc8..68ce7605bd63ea280b96db8230463d2a public static Collector, ?, Map> a() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6d7f1dee9ae2fb0b9620d85969de86eee09020cc..c3058d6fca2fd58aea5001e4310592aa8bd20640 100644 +index 5698ef90bfeceec37eaf7f23361246ef125b3cd1..3ab71629699f4978cd2dab36ec7e3b32a1681f91 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -244,6 +244,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0132-Firework-API-s.patch b/Spigot-Server-Patches/0132-Firework-API-s.patch index e42242de5..c220b785a 100644 --- a/Spigot-Server-Patches/0132-Firework-API-s.patch +++ b/Spigot-Server-Patches/0132-Firework-API-s.patch @@ -17,7 +17,7 @@ index bf4826e90976fed2ae95e84cadc7f29433af1ddf..d5508deff819309034554abc7b36aac4 NBTBase nbtbase = this.get(s); diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFireworks.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFireworks.java -index 2df84b56ef35a18648e74a134ac7ab97c518e481..9cc59439ae2c4e758c44b2a92b78bc328efdfa1b 100644 +index 6ca5c8a4308c56d35bddbabc0be724325a8a73e3..ca7a10c4b04766d7eb55be9252e96ef939e76df3 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EntityFireworks.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EntityFireworks.java @@ -38,7 +38,8 @@ public class EntityFireworks extends IProjectile { diff --git a/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch index 6618bb4dd..753735eca 100644 --- a/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5c488c8a40c648c5c432d38d95d3e00fde2cdb75..642efd930dc6cfad1d9436df97f151ea69b24b0c 100644 +index b50ed67714fea93fc6708f2680ae909f403deb00..29f5311260d0d5ee321db94031ffc3ed528d6b02 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -282,6 +282,48 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch index cde18f247..92ee3f933 100644 --- a/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 95ff827b1d5704d279d258bdfb43fd33ec7a9187..d7cf89f4603779ce9a2e9a6f837a81684f209826 100644 +index 49f1aed92fd5fa46b74a979f317a2eb0672991e9..f0928684f2bb56b490bea7cd80eb9300d2647f0c 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1047,11 +1047,13 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 1bdda8112..1fd6d1e43 100644 --- a/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -101,7 +101,7 @@ index a17812943b5402684c68ddeac5408dc939e42cf6..f4da22b33c704e675510b4b1a3aa7c18 @Override diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index dc715a0275b148c3c66610d6fb873626180c82d5..b66b340fdef9423ad8dce290065e028a0c135ea8 100644 +index db5c0d2da9ed9993ee83adccfa74e77f4e364f2a..f26f02856e7cca0ca62325adf992619dd15b3885 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -1594,7 +1594,8 @@ public abstract class EntityLiving extends Entity { @@ -115,7 +115,7 @@ index dc715a0275b148c3c66610d6fb873626180c82d5..b66b340fdef9423ad8dce290065e028a this.expToDrop = 0; } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java b/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java -index 8d0c7469999bb6d75debf427ff4d7fa5d2d5c505..28dd42921961c6a47f2d85a5f93b8298f2c228d3 100644 +index b9a681c2f7435c38dda074fbabbf53974ebbc705..4de0a733819d408e8b9a55b604f455281d7732c5 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java @@ -262,7 +262,7 @@ public abstract class EntityAnimal extends EntityAgeable { @@ -128,7 +128,7 @@ index 8d0c7469999bb6d75debf427ff4d7fa5d2d5c505..28dd42921961c6a47f2d85a5f93b8298 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -index 7941a083353bb1d9ba81c41d7a566b72bdc955d9..459b7727e946679989477f4a7e99c5ca47ac0b30 100644 +index c1e3b90098605cf809aa2ecfb5edc0ad78f2257c..77de0706aaa32b565cb1e14754e93a1c4a6e15bd 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java @@ -1306,7 +1306,7 @@ public class EntityFox extends EntityAnimal { @@ -167,7 +167,7 @@ index 74802de01dba30e38e09f6fc1f61e7bb64cf5f09..97ef4c65c8cc569a99d9697f56bd44d3 } diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index 3604fffb9ba13a019e98e0a1a0ef7ba81c8dc329..adce6f17a5dd33004f8a67cd55d195de029e0263 100644 +index 72ed4de72c87e9c241507838ddb42eaa4c05ef32..881bca30d2271560e2f2063f7d50753ec67a23f6 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -600,7 +600,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -193,7 +193,7 @@ index 46da22aeef6132a96e413301935c4fef7a96e0ee..4f81a97b1451fec0bb5fd1479acad978 } diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java -index 57e7b9c7f7f43666d442648120cda3b4b3e5bfb2..d40b056b2ff14033113bd7108a3295f8783b8bdf 100644 +index 2067af9b13c7ce28cd8ad6c785e2d0a7ff013430..38bcc5a4435c4018b3233cc5e4c9142259e4396d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EntityFishingHook.java @@ -503,7 +503,7 @@ public class EntityFishingHook extends IProjectile { @@ -278,7 +278,7 @@ index 9744d51a52c5eb99c4cf9e36d9380c49674dd136..deaa4c136c23dc6c258cc1ce68523b3c } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ccd110c4bfaa263e04154dcc2a5bdbff1f3a7ec2..2513e9a5b66598337f5d380a036ee10fdbab38c3 100644 +index 29f5311260d0d5ee321db94031ffc3ed528d6b02..d7d58a0feac2d0b4303c625b7952103613e8c33e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1835,7 +1835,7 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch index 5f443dacf..d620a0772 100644 --- a/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index 2dc58b9f769ea43b737804456aafab47ecc143b8..c611b5a63498f5ad1f50a75ccd5d7299 + } } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 49da1525cfc46743013bbac0528ec58501cab6eb..b798190628c1d83b5bf9e5497b515ef1e9f26707 100644 +index 00e79363b3f961111595c50758332f6c1c1b31bb..dcaf5c107bb77b63333f924a33961f9e5cad7082 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -268,6 +268,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -39,7 +39,7 @@ index 49da1525cfc46743013bbac0528ec58501cab6eb..b798190628c1d83b5bf9e5497b515ef1 // Spigot end diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 6fa269cec002fcffd6d02125c20efa9314148243..2eee92f74a7c82ec7df05db6df79743b4345cc86 100644 +index f26f02856e7cca0ca62325adf992619dd15b3885..dd9c51b28e32389429887e9c9cef0a554eff8a40 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2903,8 +2903,11 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index a382dd419..3d1bc3912 100644 --- a/Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index e8150c456efe72a561d6a6a7647eca05fbc8bd94..56f83a930c3dad1a1de366bff530131d92b4893c 100644 +index 2511fbe7aa5ff1ace71b513d2938975e388295c6..1d71a19a7bbe463f537861531113dd1ed3e5b977 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -121,7 +121,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch index 31754281a..4141d9b9b 100644 --- a/Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 2eee92f74a7c82ec7df05db6df79743b4345cc86..3d6b8fd09c07e78c0d786dff9658eb0089f853cf 100644 +index dd9c51b28e32389429887e9c9cef0a554eff8a40..036577b0237e9c8a7ab22ede7477eefa1abecf96 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -338,6 +338,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch index 4db53e833..108fec708 100644 --- a/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 283c1111d99b6ae09b6db0c0079eeb0f1cbb7b2b..d92ca78e483b3f085e3bad1d1250cac2f9031fa7 100644 +index 20dffd9dc4cb3868638151b70535f353a3bf1a44..fae7e4a7adcc930a7252634dc535339b5a5bd3b9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -201,6 +201,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java -index f2d48659fdb9f030dbeec12ed820062d4d066e48..5122afbd51c87c27efa82d7d9393f252efa848d4 100644 +index 34b68443ff300f8626e9f7a8335cff75580bebfc..8c497da1a4bde904e234a8fa00bf04a12787c7ed 100644 --- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java @@ -557,6 +557,15 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/Spigot-Server-Patches/0362-Anti-Xray.patch b/Spigot-Server-Patches/0362-Anti-Xray.patch index ff640d6ee..ddd0aa546 100644 --- a/Spigot-Server-Patches/0362-Anti-Xray.patch +++ b/Spigot-Server-Patches/0362-Anti-Xray.patch @@ -1173,7 +1173,7 @@ index d86b1e528b53db809ac993aa2f1d2799d4f1a574..fbd8a6985a261396789c87e4b687140b public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype, String s) { diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index d7fe6f00b352dad9e9f579f9af86cb8b90ef83ae..e2c0d30c5b25f9c44025f0619ba254c89402d9f9 100644 +index 12e34e1514f060ffef96cdd3ac57d0495dd37321..024e0bf39b73076fba5c4187c4ff5066e663cf7e 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -210,7 +210,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0365-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0365-Mark-entities-as-being-ticked-when-notifying-navigat.patch index ff018b922..63ff602a8 100644 --- a/Spigot-Server-Patches/0365-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0365-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Mark entities as being ticked when notifying navigation diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index e2c0d30c5b25f9c44025f0619ba254c89402d9f9..9012c837c2f284e9f2f11462e6dc7e2f6e190939 100644 +index 024e0bf39b73076fba5c4187c4ff5066e663cf7e..3eb337d42f0292ed7b85a5fdbf6b450bc446b81a 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1475,6 +1475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch index 797e054aa..7b764afb8 100644 --- a/Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index bb6c59237702bf82d2c344c864f233c606fd429f..96723cac5723ea97780dd3b8697c4ba598788afc 100644 +index 52d22da115212eae6c380bb5012398e3df92f5f3..13c99bdb8894d08f297f84ee1f98f50c811f7f4b 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -207,7 +207,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -21,7 +21,7 @@ index bb6c59237702bf82d2c344c864f233c606fd429f..96723cac5723ea97780dd3b8697c4ba5 // Paper start - Asynchronous IO diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index fa0b7edf42243d53d9dc897903b9b9e902b33cf7..eee5b3e4645ae41f63aba8898c58f43402d31b73 100644 +index d74d6abfff647c148e524905cd733c4b7fc6591f..24dfdb3807dbf6e9acc59d35d7c76f7ac0185219 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -1244,7 +1244,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0370-Reduce-sync-loads.patch b/Spigot-Server-Patches/0370-Reduce-sync-loads.patch index 5bdc3d95e..7b195978a 100644 --- a/Spigot-Server-Patches/0370-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0370-Reduce-sync-loads.patch @@ -281,7 +281,7 @@ index 0000000000000000000000000000000000000000..d381f91cf105bfc01846ada90da8971a + } +} diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java -index 1e74299bb3a368dcbc813408804d25cf58a75b0b..662d7f418e8acc9503ebf43e09410e7bd50f6bb3 100644 +index 2a5df37a94b4b609a2d1b045f8e6a7f08d3f8eaa..24201665f8e7fb635839334308a1bad8fc4ac7b9 100644 --- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java @@ -494,6 +494,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -293,7 +293,7 @@ index 1e74299bb3a368dcbc813408804d25cf58a75b0b..662d7f418e8acc9503ebf43e09410e7b this.serverThreadQueue.awaitTasks(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 96723cac5723ea97780dd3b8697c4ba598788afc..02a64a132502fff19a41d4fa5ffafd61992865a4 100644 +index 13c99bdb8894d08f297f84ee1f98f50c811f7f4b..fbb550cce96e7e5539c69bae1459326090d0c508 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -282,6 +282,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0372-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0372-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index be87abbaf..4968b9eb2 100644 --- a/Spigot-Server-Patches/0372-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0372-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,7 +7,7 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ef13e310a8a452d2ba1d9c8bac72f9baf2693de0..a118187e86238fd4019ba5c25269d5ee80fc56f2 100644 +index e6e8ab0b39a11b0aed247b9b80a6c1f97505546b..eb134ccb68dc135ab6db4c5a1d29edb321cf3f59 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -630,12 +630,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant entitytypes = entity.getEntityType(); int i = entitytypes.getChunkRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index a71531d6d329b11b9ad535786d26c4c2327bcbb9..8159baec6e862580dc340d8fd7c16013ec8f0e66 100644 +index 2e45f9006eba3b52916d2fccf8f2bebe7b8b8a9c..35fc51ac93a62f6dc4b141dc94a3cda0399f0ce1 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1531,7 +1531,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0423-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0423-Optimize-Collision-to-not-load-chunks.patch index b289eb015..c69af5d66 100644 --- a/Spigot-Server-Patches/0423-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0423-Optimize-Collision-to-not-load-chunks.patch @@ -42,7 +42,7 @@ index 9af1d81475d2def60a682ed23e88f1afbbc4c7e6..0a99ee6221c46043ecdf9e9df7a064aa entityplayer1.setPosition(entityplayer1.locX(), entityplayer1.locY() + 1.0D, entityplayer1.locZ()); } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f95aa9b4cc53c1e3258b7b32249ec1c3ef4ae2f1..7bce3722fb00194f5a913c0b9866b73cfc74611d 100644 +index a9d8baef5db0655742e85482604db6f6208eb9b6..6c368921f76fb6eb99dd20dd49d6ba5ac80cdfad 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -169,6 +169,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0427-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0427-Increase-Light-Queue-Size.patch index 4590de931..2b28126ee 100644 --- a/Spigot-Server-Patches/0427-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0427-Increase-Light-Queue-Size.patch @@ -28,7 +28,7 @@ index 6c8e9d498c9a30a1aa88494ba09c3cae012a8fa1..cd248eb6be663e8be33f2c3c6b06b77b + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c86c3cdea77369e3297548c8d5f10674c1100f76..54738ef346b1fe4c45ea95db2f236d10f8525a20 100644 +index b4e058794c3f8a827f3aabab5b98239a4c79c42c..34c273178e711466ec6638f24e0371554e26e134 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -777,7 +777,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant UNKNOWN = a("unknown", Comparator.comparingLong(ChunkCoordIntPair::pair), 1); public static final TicketType PLUGIN = a("plugin", (a, b) -> 0); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src/main/java/net/minecraft/server/network/LoginListener.java -index 09ceac61f873ee0cb689c66a403c42677961011d..06e2b48ed6d6d52d0eb17301254ed07fb69cb8af 100644 +index 2e995103fba15c21dbe89321896c7df03ae5e67b..ef2aa000932c222e358789fcd2629dd8a46cfe80 100644 --- a/src/main/java/net/minecraft/server/network/LoginListener.java +++ b/src/main/java/net/minecraft/server/network/LoginListener.java @@ -88,7 +88,7 @@ public class LoginListener implements PacketLoginInListener { @@ -93,7 +93,7 @@ index 09ceac61f873ee0cb689c66a403c42677961011d..06e2b48ed6d6d52d0eb17301254ed07f if (entityplayer != null) { this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT; diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index f02ddd53df4674a2b5e0bb142db756d1f153d69b..443247b03b8352c4dd453270dccdbd7eb5f0944b 100644 +index 8a8f75acdd55e00ac2e7b5c621d1f522208df2c2..7c1d25feab71c325ce2379afa6c61732eebd74f9 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -222,6 +222,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -292,7 +292,7 @@ index 66c1a9ca392b29fe2191577d32c70b214fa7293d..c7e78d0626fa0dd18021c1a0827a10c0 Iterator iterator = list.iterator(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7bce3722fb00194f5a913c0b9866b73cfc74611d..8ca7012264528f17ac2e4f15ced96c774fa566d7 100644 +index 6c368921f76fb6eb99dd20dd49d6ba5ac80cdfad..896b4d016de78e98276d7cdf9328d8951572e3be 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1372,7 +1372,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0453-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0453-Add-PlayerAttackEntityCooldownResetEvent.patch index 325aa1c5a..c5cfc7c62 100644 --- a/Spigot-Server-Patches/0453-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/Spigot-Server-Patches/0453-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index dc9e12c38d1682f6c4558ca07b781de2226c0621..850225509a5398ddcc9335bf88e99bde662bfc91 100644 +index 40fb7e96af7bbbe6c5586fa4d2a629b5a8f7b07a..13896da2194cab683782504291ede6f135ca7279 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -1931,7 +1931,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0458-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0458-Implement-Brigadier-Mojang-API.patch index a9be98b32..16614706f 100644 --- a/Spigot-Server-Patches/0458-Implement-Brigadier-Mojang-API.patch +++ b/Spigot-Server-Patches/0458-Implement-Brigadier-Mojang-API.patch @@ -69,7 +69,7 @@ index eb2c9d2248a8647beee9960c5016a83f35aa1247..b5ee789c8dfb7f413ab60902ff3d2ef0 public boolean hasPermission(int i) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 443247b03b8352c4dd453270dccdbd7eb5f0944b..b6d326ea30a806240e4a87c277b3cd73a04c805c 100644 +index 7c1d25feab71c325ce2379afa6c61732eebd74f9..358d1acf7ca9ce510325fedf31e18a27c3a784d5 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -770,8 +770,12 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0459-Villager-Restocks-API.patch b/Spigot-Server-Patches/0459-Villager-Restocks-API.patch index d136893c4..55095b2a0 100644 --- a/Spigot-Server-Patches/0459-Villager-Restocks-API.patch +++ b/Spigot-Server-Patches/0459-Villager-Restocks-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Villager Restocks API diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index d7e152f7147bb599ce21dc605ebbd76e82eced26..d2850b003f8672122e70da0d52da1de59b2b01dd 100644 +index 596450d3cdb3be4abca3e75bed743abd071fb0b0..fb97325e8df33c0edabb81053877ad4a326a3d34 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -113,7 +113,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation diff --git a/Spigot-Server-Patches/0460-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0460-Validate-PickItem-Packet-and-kick-for-invalid.patch index 37c6dde53..2c474587a 100644 --- a/Spigot-Server-Patches/0460-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/Spigot-Server-Patches/0460-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index b6d326ea30a806240e4a87c277b3cd73a04c805c..6db70005ebc99b19185b8efca550a0783ea05cad 100644 +index 358d1acf7ca9ce510325fedf31e18a27c3a784d5..b491a3563bf457bcb631e05cf41b661712134966 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -883,7 +883,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0461-Expose-game-version.patch b/Spigot-Server-Patches/0461-Expose-game-version.patch index 9bfccda9b..24b6d2653 100644 --- a/Spigot-Server-Patches/0461-Expose-game-version.patch +++ b/Spigot-Server-Patches/0461-Expose-game-version.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1ec08b8d1f8104dcdfa00bc0c53c26b7796c514d..7d19942373523f18eb9420d0873f2309895b34d7 100644 +index 63f89916d9982caa99525e01bd0e3f153af74d0f..f6e2e54b5a1b8c2df41a0593fa15112c5195c49c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -515,6 +515,13 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0463-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0463-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index 8676a856f..52eb1dbca 100644 --- a/Spigot-Server-Patches/0463-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/Spigot-Server-Patches/0463-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 777116a0a0be6a5a00b1443204d6c53803af8051..6cae7454f3cf5b246300bac489b38ea65e2185c9 100644 +index 5c54ecf6b1cf5531e51ae4d0a318aa64b837b574..6459ec144fa54a1e6ad1f0c40776321e95b41197 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -28,6 +28,7 @@ public class Main { diff --git a/Spigot-Server-Patches/0465-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0465-Use-distance-map-to-optimise-entity-tracker.patch index 3af6a3cc2..0eecb7f13 100644 --- a/Spigot-Server-Patches/0465-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0465-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 11a412b1df98dea2826330b0b246655844a4f4ea..1d77d6254b024c286781be8dc74680bc1e8f1238 100644 +index 7f67773686a2d55153f7b2bfbe24df84fe1198be..1eb1da61ee2aa2cc5d28a46fd364a182cd16983b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1654,6 +1654,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> e = new WeightedList<>(); + private final WeightedList> e = new WeightedList<>(false); // Paper - don't use a clone - + public BehaviorGate(Map, MemoryStatus> map, Set> set, BehaviorGate.Order behaviorgate_order, BehaviorGate.Execution behaviorgate_execution, List, Integer>> list) { super(map); @@ -65,10 +65,9 @@ public class BehaviorGate extends Behavior { @@ -25,25 +25,25 @@ index dc926f7e59fa350902d4a24aefc3df3eac7d75db..2d4345de154fb2d31f34695672ebdb4d }); - Set set = this.b; BehaviorController behaviorcontroller = e0.getBehaviorController(); - + - set.forEach(behaviorcontroller::removeMemory); + this.b.forEach(behaviorcontroller::removeMemory); // Paper - decomp fix } - + @Override @@ -115,7 +114,7 @@ public class BehaviorGate extends Behavior { - + private final Consumer> c; - + - private Order(Consumer consumer) { + private Order(Consumer> consumer) { // Paper - decomp fix this.c = consumer; } - -diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java + +diff --git a/src/main/java/net/minecraft/util/random/WeightedRandomList.java b/src/main/java/net/minecraft/util/random/WeightedRandomList.java index f6f8c68ff3642e28901094e8b501fcf8ec2cecd7..1ca9b0595ae9d914d23590ec0b0c2e857c39b250 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java -+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java +--- a/src/main/java/net/minecraft/util/random/WeightedRandomList.java ++++ b/src/main/java/net/minecraft/util/random/WeightedRandomList.java @@ -6,7 +6,7 @@ import com.mojang.serialization.Codec; import com.mojang.serialization.DataResult; import com.mojang.serialization.Dynamic; @@ -54,14 +54,14 @@ index f6f8c68ff3642e28901094e8b501fcf8ec2cecd7..1ca9b0595ae9d914d23590ec0b0c2e85 import java.util.List; import java.util.Random; @@ -14,26 +14,32 @@ import java.util.stream.Stream; - + public class WeightedList { - + - protected final List> a; + protected final List> list; // Paper - decompile conflict private final Random b; + private final boolean isUnsafe; // Paper - + - public WeightedList() { - this(Lists.newArrayList()); + // Paper start - add useClone option @@ -69,7 +69,7 @@ index f6f8c68ff3642e28901094e8b501fcf8ec2cecd7..1ca9b0595ae9d914d23590ec0b0c2e85 + public WeightedList(boolean isUnsafe) { + this(Lists.newArrayList(), isUnsafe); } - + - private WeightedList(List> list) { + private WeightedList(List> list) { this(list, true); } + private WeightedList(List> list, boolean isUnsafe) { @@ -79,7 +79,7 @@ index f6f8c68ff3642e28901094e8b501fcf8ec2cecd7..1ca9b0595ae9d914d23590ec0b0c2e85 - this.a = Lists.newArrayList(list); + this.list = Lists.newArrayList(list); // Paper - decompile conflict } - + public static Codec> a(Codec codec) { - return WeightedList.a.a(codec).listOf().xmap(WeightedList::new, (weightedlist) -> { - return weightedlist.a; @@ -87,16 +87,16 @@ index f6f8c68ff3642e28901094e8b501fcf8ec2cecd7..1ca9b0595ae9d914d23590ec0b0c2e85 + return weightedlist.list; // Paper - decompile conflict }); } - + public WeightedList a(U u0, int i) { - this.a.add(new WeightedList.a<>(u0, i)); + this.list.add(new WeightedList.a<>(u0, i)); // Paper - decompile conflict return this; } - + @@ -42,21 +48,20 @@ public class WeightedList { } - + public WeightedList a(Random random) { - this.a.forEach((weightedlist_a) -> { - weightedlist_a.a(random.nextFloat()); @@ -112,26 +112,26 @@ index f6f8c68ff3642e28901094e8b501fcf8ec2cecd7..1ca9b0595ae9d914d23590ec0b0c2e85 + return isUnsafe ? new WeightedList<>(list, isUnsafe) : this; + // Paper end } - + public boolean b() { - return this.a.isEmpty(); + return this.list.isEmpty(); // Paper - decompile conflict } - + public Stream c() { - return this.a.stream().map(WeightedList.a::a); + return this.list.stream().map(WeightedList.a::a); // Paper - decompile conflict } - + public U b(Random random) { @@ -64,7 +69,7 @@ public class WeightedList { } - + public String toString() { - return "WeightedList[" + this.a + "]"; + return "WeightedList[" + this.list + "]"; // Paper - decompile conflict } - + public static class a { @@ -98,11 +103,7 @@ public class WeightedList { return new Codec>() { diff --git a/Spigot-Server-Patches/0538-Incremental-player-saving.patch b/Spigot-Server-Patches/0538-Incremental-player-saving.patch index 34068fff0..a7deadb44 100644 --- a/Spigot-Server-Patches/0538-Incremental-player-saving.patch +++ b/Spigot-Server-Patches/0538-Incremental-player-saving.patch @@ -25,7 +25,7 @@ index b67ba8f75e4a3358d7c2462918b85b0bf9b5a922..fdbd8b89bb8bf3b61f60b812b90483c9 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f26a17228f724906bfcaeba5a28daf7d9cc3d2b0..f2b1d15479bf1a0e510c3416a4d520149d439085 100644 +index afdbbe62eba7b4f0ad63c5126c6d21488c4e9a7a..5acc6cfa96084728f45cfbec0ff9571e5dd0b844 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1349,9 +1349,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 6.0F) { double d0 = (entity.locX() - this.locX()) / (double) f; diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index ff482e3774f580d8ba7028f6c5141888d3bd907a..a246edd09854dabf095da75c9d200f5cf26e7138 100644 +index 969e5fa3080a98850f03ba64c5662c32a8d501a6..5c7fafeb7fab584eded30ebe415584132f4ab8af 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -88,6 +88,7 @@ import org.bukkit.event.entity.EntityTargetEvent; diff --git a/Spigot-Server-Patches/0661-Skip-distance-map-update-when-spawning-disabled.patch b/Spigot-Server-Patches/0661-Skip-distance-map-update-when-spawning-disabled.patch index dc1879278..091e48b00 100644 --- a/Spigot-Server-Patches/0661-Skip-distance-map-update-when-spawning-disabled.patch +++ b/Spigot-Server-Patches/0661-Skip-distance-map-update-when-spawning-disabled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Skip distance map update when spawning disabled. diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java -index 326c52f9f2cc729fd52162aeae18ec9dae3a4eaf..c5e54c519e1f686761faa53b5e9579c514a65332 100644 +index 6770307d69c6b3934bfa804fd713cade22f0fb5c..4a71f9a8a57ed123b31c725a8bd5f94ab0e2174d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java @@ -825,7 +825,7 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/Spigot-Server-Patches/0664-EntityMoveEvent.patch b/Spigot-Server-Patches/0664-EntityMoveEvent.patch index 4cca37da2..27ba6bd59 100644 --- a/Spigot-Server-Patches/0664-EntityMoveEvent.patch +++ b/Spigot-Server-Patches/0664-EntityMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EntityMoveEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c2a2a14164d2431413c773fb5944ad68a8f6ad6b..f8446fd716a891a0b71675ccee6a6eac55fba87c 100644 +index fe02a46df9c652acf4a4bc0ed194522f400cda34..454bc4c7b2e54a75dd0510263165e41cf26b1751 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -13,6 +13,7 @@ import io.netty.buffer.ByteBuf; diff --git a/Spigot-Server-Patches/0669-living-entity-allow-attribute-registration.patch b/Spigot-Server-Patches/0669-living-entity-allow-attribute-registration.patch index 73c28af9b..d30fda385 100644 --- a/Spigot-Server-Patches/0669-living-entity-allow-attribute-registration.patch +++ b/Spigot-Server-Patches/0669-living-entity-allow-attribute-registration.patch @@ -50,7 +50,7 @@ index 673948947bd918c1dbb6c4c99486b4200e3c09fe..2e83b8855070077e90e5ab2c4beae819 return IRegistry.ATTRIBUTE.get(CraftNamespacedKey.toMinecraft(attribute.getKey())); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index e574e2453c7bc848168ff24372d6772bd423b672..3d497f69f89455b88fba423de8effb3db83e7af4 100644 +index 278a1c886f15b75e62bfe4c872fc779eda83c988..9865eee8ec5e43f291968bfb2c4473260e5baf7c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -675,6 +675,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/0672-misc-debugging-dumps.patch b/Spigot-Server-Patches/0672-misc-debugging-dumps.patch index 5ba0cb2fa..da0840fc4 100644 --- a/Spigot-Server-Patches/0672-misc-debugging-dumps.patch +++ b/Spigot-Server-Patches/0672-misc-debugging-dumps.patch @@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f8446fd716a891a0b71675ccee6a6eac55fba87c..176a17582cb3b29a2ed430914ba8c0582bffe541 100644 +index 454bc4c7b2e54a75dd0510263165e41cf26b1751..879074df54e56a9275957a83c92b467094e95cd4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -14,6 +14,7 @@ import io.netty.buffer.ByteBufOutputStream; diff --git a/Spigot-Server-Patches/0675-Expose-Tracked-Players.patch b/Spigot-Server-Patches/0675-Expose-Tracked-Players.patch index 5bb7b3c9e..2ee6abd64 100644 --- a/Spigot-Server-Patches/0675-Expose-Tracked-Players.patch +++ b/Spigot-Server-Patches/0675-Expose-Tracked-Players.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose Tracked Players diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f7223f214f911dd25abcf3a52745588ec630241d..7abeeefeb579a43bc9ee85fd4150afacfb11c802 100644 +index 881db84a1afe2da5d30732c282f36b294c721c41..d62179765f93738e8444b507238b4fd79a1e9443 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -172,7 +172,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/Spigot-Server-Patches/0678-MC-29274-Fix-Wither-hostility-towards-players.patch b/Spigot-Server-Patches/0678-MC-29274-Fix-Wither-hostility-towards-players.patch index 68805931e..78875ff58 100644 --- a/Spigot-Server-Patches/0678-MC-29274-Fix-Wither-hostility-towards-players.patch +++ b/Spigot-Server-Patches/0678-MC-29274-Fix-Wither-hostility-towards-players.patch @@ -20,7 +20,7 @@ index f1d384d2e235c52a00f4b6d5643ef3c1d163e94b..7ddeecc6496926350d59d9b8725a4b16 + } } diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -index 891905712903bf3ba241187791cfa995375430d5..229eabe0510e6c3660236ed0fb3e80d41074642c 100644 +index 170b085c76e092f6d7b14095c66c84fa9a96a1fc..635b1493eeb6c13cc5ef489bd747ac557bc131d8 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java @@ -104,6 +104,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { diff --git a/Spigot-Server-Patches/0682-fix-converting-txt-to-json-file.patch b/Spigot-Server-Patches/0682-fix-converting-txt-to-json-file.patch index 8ef92016d..ef2fcdd89 100644 --- a/Spigot-Server-Patches/0682-fix-converting-txt-to-json-file.patch +++ b/Spigot-Server-Patches/0682-fix-converting-txt-to-json-file.patch @@ -21,7 +21,7 @@ index b13e6f9923a9c5703f4eaeab2d0c112e4726b496..a762cf4c4a52bcbc8dbfd60b3ad7fef5 this.w(); this.x(); diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index c4df472050622eb2469b2ddb4d2ed917994f6e95..52bb528e75eb43156ee2bf19877bc051a35bb6e3 100644 +index a5b1f33473e8c82511fdd0c218f4fe744f584de8..cac3df2ca054b3b2fb5b6437ab2950afc3ace8fb 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -198,6 +198,12 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/0695-forced-whitelist-use-configurable-kick-message.patch b/Spigot-Server-Patches/0695-forced-whitelist-use-configurable-kick-message.patch index 76154e688..70f01cbb4 100644 --- a/Spigot-Server-Patches/0695-forced-whitelist-use-configurable-kick-message.patch +++ b/Spigot-Server-Patches/0695-forced-whitelist-use-configurable-kick-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] forced whitelist: use configurable kick message diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 176a17582cb3b29a2ed430914ba8c0582bffe541..d9ea784758fe52782042ce4b61faa915f895b3f8 100644 +index 879074df54e56a9275957a83c92b467094e95cd4..b3ebf5cd59c827b7426069eda0cb3d47b4386792 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2042,7 +2042,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { + } + + } ++ // Paper start ++ public net.md_5.bungee.api.chat.BaseComponent[] components; ++ ++ public PacketPlayOutTitle(EnumTitleAction action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) { ++ this.a = action; ++ this.components = components; ++ this.c = fadeIn; ++ this.d = stay; ++ this.e = fadeOut; ++ } ++ // Paper end + + @Override + public void b(PacketDataSerializer packetdataserializer) throws IOException { +@@ -55,6 +66,8 @@ public class PacketPlayOutTitle implements Packet { + // Paper start + if (this.adventure$text != null) { + packetdataserializer.writeComponent(this.adventure$text); ++ } else if (this.components != null) { ++ packetdataserializer.writeComponent(this.components); + } else + // Paper end + packetdataserializer.a(this.b); diff --git a/scripts/remap.sh b/scripts/remap.sh index 745807012..e47992e17 100755 --- a/scripts/remap.sh +++ b/scripts/remap.sh @@ -11,7 +11,7 @@ minecrafthash=$(cat "${workdir}/BuildData/info.json" | grep minecraftHash | cut accesstransforms="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep accessTransforms | cut -d '"' -f 4) classmappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep classMappings | cut -d '"' -f 4) membermappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep memberMappings | cut -d '"' -f 4) -packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4) +#packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4) decompiledir="$workdir/Minecraft/$minecraftversion" jarpath="$decompiledir/$minecraftversion" mkdir -p "$decompiledir" @@ -26,22 +26,22 @@ if [ ! -f "$jarpath.jar" ]; then fi # OS X & FreeBSD don't have md5sum, just md5 -r -command -v md5sum >/dev/null 2>&1 || { - command -v md5 >/dev/null 2>&1 && { - shopt -s expand_aliases - alias md5sum='md5 -r' - echo "md5sum command not found, using an alias instead" - } || { - echo >&2 "No md5sum or md5 command found" - exit 1 - } -} - -checksum=$(md5sum "$jarpath.jar" | cut -d ' ' -f 1) -if [ "$checksum" != "$minecrafthash" ]; then - echo "The MD5 checksum of the downloaded server jar does not match the BuildData hash." - exit 1 -fi +#command -v md5sum >/dev/null 2>&1 || { +# command -v md5 >/dev/null 2>&1 && { +# shopt -s expand_aliases +# alias md5sum='md5 -r' +# echo "md5sum command not found, using an alias instead" +# } || { +# echo >&2 "No md5sum or md5 command found" +# exit 1 +# } +#} +# +#checksum=$(md5sum "$jarpath.jar" | cut -d ' ' -f 1) +#if [ "$checksum" != "$minecrafthash" ]; then +# echo "The MD5 checksum of the downloaded server jar does not match the BuildData hash." +# exit 1 +#fi # These specialsource commands are from https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/browse/info.json echo "Applying class mappings..." @@ -55,7 +55,7 @@ fi echo "Applying member mappings..." if [ ! -f "$jarpath-m.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --only com/mojang/math --auto-member LOGGER --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only com/mojang/math --only net/minecraft --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to apply member mappings." exit 1 @@ -64,7 +64,7 @@ fi echo "Creating remapped jar..." if [ ! -f "$jarpath-mapped.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only net/minecraft --only com/mojang/math -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "$packagemappings" -o "$jarpath-mapped.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only com/mojang/math --only net/minecraft -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "/home/martin/Projects/Paper/bukkit-e3c5450d-fields.csrg" -o "$jarpath-mapped.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to create remapped jar." exit 1 diff --git a/work/BuildData b/work/BuildData index f0a5ed1ae..3cec511b1 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit f0a5ed1aeff8156ba4afa504e190c838dd1af50c +Subproject commit 3cec511b16ffa31cb414997a14be313716882e12 diff --git a/work/Bukkit b/work/Bukkit index 7e29f7654..5b94881a0 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 7e29f7654411f0a17ebbcc2c3f6a7dfe93bff39e +Subproject commit 5b94881a0b4383f901c1c65db10767e42446760e diff --git a/work/CraftBukkit b/work/CraftBukkit index 296df5667..e2f5ea34e 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 296df56673771692593156995684ab8041925d9d +Subproject commit e2f5ea34e9c7f9eb3eb2be422b169679922b2770 diff --git a/work/Spigot b/work/Spigot index 9fb885e86..c9cea6000 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 9fb885e86def1d9d86e25233c9b5a4de45b7a09d +Subproject commit c9cea600043b1dc6fa306b4baee307d064c65eac