From ce0e78c103cf4f460572cf3e1b934635e17d5fb2 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:40:32 -0700 Subject: [PATCH] compile fixes compile fixes compile fixes --- patches/server/0009-MC-Utils.patch | 38 +++++++++---------- patches/server/0010-Adventure.patch | 4 +- patches/server/0025-Timings-v2.patch | 2 +- patches/server/0042-Entity-Origin-API.patch | 2 +- patches/server/0051-Disable-thunder.patch | 2 +- .../server/0052-Disable-ice-and-snow.patch | 2 +- ...le-spawn-chances-for-skeleton-horses.patch | 2 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 2 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 2 +- ...9-Do-not-load-chunks-for-Pathfinding.patch | 4 +- ...g-BlockPlaceEvent-triggering-physics.patch | 2 +- .../0108-Fix-global-sound-handling.patch | 2 +- .../server/0143-Basic-PlayerProfile-API.patch | 2 +- .../0150-ensureServerConversions-API.patch | 2 +- .../0151-Implement-getI18NDisplayName.patch | 2 +- ...0193-Block-Enderpearl-Travel-Exploit.patch | 2 +- ...ld.spawnParticle-API-and-add-Builder.patch | 2 +- ...-allowed-colored-signs-to-be-created.patch | 6 +-- ...ackByEntityEvent-and-EntityPushedByE.patch | 13 +++++++ .../0215-InventoryCloseEvent-Reason-API.patch | 2 +- patches/server/0230-Add-TNTPrimeEvent.patch | 4 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 2 +- ...xception-in-entity-and-block-entity-.patch | 2 +- patches/server/0279-Book-Size-Limits.patch | 4 +- .../server/0286-Brigadier-Mojang-API.patch | 2 +- .../0288-Limit-Client-Sign-length-more.patch | 2 +- .../0290-Entity-getEntitySpawnReason.patch | 2 +- ...08-Dont-send-unnecessary-sign-update.patch | 2 +- ...ptimise-EntityGetter-getPlayerByUUID.patch | 2 +- .../0325-Add-debug-for-sync-chunk-loads.patch | 2 +- ...-PlayerChunkMap-adds-crashing-server.patch | 2 +- ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- ...65-Prevent-teleporting-dead-entities.patch | 2 +- ...t-position-desync-causing-tp-exploit.patch | 2 +- .../0384-Add-PlayerRecipeBookClickEvent.patch | 2 +- ...86-Add-permission-for-command-blocks.patch | 2 +- ...ld-Difficulty-Remembering-Difficulty.patch | 2 +- ...o-not-accept-invalid-client-settings.patch | 2 +- ...geEvent-not-firing-for-all-use-cases.patch | 2 +- ...ate-HoverEvent-from-ItemStack-Entity.patch | 7 +++- ...ortation-and-cancel-velocity-if-tele.patch | 2 +- ...p-capture-to-capture-all-items-added.patch | 2 +- ...r-large-move-vectors-crashing-server.patch | 2 +- .../server/0450-Add-Destroy-Speed-API.patch | 4 +- .../server/0459-Limit-recipe-packets.patch | 2 +- ...act-event-not-being-called-sometimes.patch | 2 +- patches/server/0486-Remove-stale-POIs.patch | 2 +- patches/server/0503-Add-EntityMoveEvent.patch | 2 +- ...disable-pathfinding-updates-on-block.patch | 2 +- ...-using-signs-inside-spawn-protection.patch | 2 +- ...ignore-result-of-PlayerEditBookEvent.patch | 2 +- ...fix-PlayerItemHeldEvent-firing-twice.patch | 2 +- patches/server/0536-More-World-API.patch | 4 +- ...pawnEvent-fix-passed-parameter-issue.patch | 2 +- ...551-Expand-PlayerGameModeChangeEvent.patch | 2 +- ...ove-range-check-for-block-placing-up.patch | 2 +- .../0557-Add-Unix-domain-socket-support.patch | 2 +- ...cause-to-Weather-ThunderChangeEvents.patch | 4 +- .../0563-Add-PlayerKickEvent-causes.patch | 2 +- .../0574-add-per-world-spawn-limits.patch | 2 +- ...nect-for-book-edit-is-called-on-main.patch | 2 +- ...etChunkIfLoadedImmediately-in-places.patch | 2 +- ...from-signs-not-firing-command-events.patch | 2 +- .../server/0583-Add-PlayerArmSwingEvent.patch | 2 +- ...k-event-leave-message-not-being-sent.patch | 2 +- ...-AFK-kick-while-watching-end-credits.patch | 2 +- ...o-find-targets-for-lightning-strikes.patch | 4 +- ...0610-Add-ItemFactory-getSpawnEgg-API.patch | 4 +- ...-logic-for-inventories-on-chunk-unlo.patch | 2 +- ...0620-Improve-and-expand-AsyncCatcher.patch | 4 +- ...aper-mobcaps-and-paper-playermobcaps.patch | 2 +- ...entory-not-closing-on-entity-removal.patch | 2 +- ...-ServerboundCommandSuggestionPacket-.patch | 2 +- ...llow-delegation-to-vanilla-chunk-gen.patch | 30 +++++++-------- ...vanilla-BiomeProvider-from-WorldInfo.patch | 4 +- ...-command-sender-which-forwards-feedb.patch | 2 +- .../0684-Implement-regenerateChunk.patch | 2 +- ...date-calls-to-CraftServer-getSpawnLi.patch | 2 +- patches/server/0687-Add-GameEvent-tags.patch | 2 +- ...o-worldlist-before-initing-the-world.patch | 2 +- patches/server/0695-Custom-Potion-Mixes.patch | 4 +- ...0697-Fix-falling-block-spawn-methods.patch | 2 +- ...cle-movement-from-players-while-tele.patch | 2 +- ...0705-Implement-enchantWithLevels-API.patch | 16 +++++--- .../0706-Fix-saving-in-unloadWorld.patch | 2 +- ...lock-data-for-EntityChangeBlockEvent.patch | 2 +- ...nt-tile-entity-copies-loading-chunks.patch | 2 +- .../0718-WorldCreator-keepSpawnLoaded.patch | 2 +- patches/server/0725-Don-t-tick-markers.patch | 2 +- ...n-on-world-create-while-being-ticked.patch | 2 +- ...broadcast-messages-to-command-blocks.patch | 2 +- ...mpty-items-from-being-added-to-world.patch | 2 +- ...g-not-using-commands.spam-exclusions.patch | 2 +- patches/server/0747-More-Teleport-API.patch | 2 +- ...ck-entities-after-destroy-prediction.patch | 2 +- ...-on-plugins-accessing-faraway-chunks.patch | 2 +- patches/server/0756-Block-Ticking-API.patch | 2 +- ...7-Add-Velocity-IP-Forwarding-Support.patch | 2 +- .../0772-Fix-a-bunch-of-vanilla-bugs.patch | 2 +- ...ry-onTrackingStart-during-navigation.patch | 2 +- ...global-player-list-where-appropriate.patch | 2 +- .../server/0797-ItemStack-damage-API.patch | 10 ++--- patches/server/0798-Friction-API.patch | 6 +-- .../0810-Improve-logging-and-errors.patch | 2 +- ...ssing-SpigotConfig-logCommands-check.patch | 2 +- ...le-player-info-update-packet-on-join.patch | 2 +- .../server/0824-Add-Entity-Body-Yaw-API.patch | 4 +- ...uence-violations-like-they-should-be.patch | 2 +- ...expired-keys-from-impacting-new-join.patch | 2 +- ...nts-being-fired-from-unloaded-chunks.patch | 2 +- ...anhasbukkit-default-if-alias-block-e.patch | 2 +- ...-to-remove-all-active-potion-effects.patch | 2 +- ...0865-Add-Sign-getInteractableSideFor.patch | 2 +- ...66-fix-item-meta-for-tadpole-buckets.patch | 2 +- ...Timer-for-Wandering-Traders-spawned-.patch | 4 +- .../0874-Implement-PlayerFailMoveEvent.patch | 2 +- ...Folia-scheduler-and-owned-region-API.patch | 4 +- ...-API-for-updating-recipes-on-clients.patch | 2 +- ...2-Use-correct-seed-on-api-world-load.patch | 2 +- .../server/0886-Bandaid-fix-for-Effect.patch | 2 +- ...place-methods-with-old-StructureType.patch | 4 +- ...te-namespaced-commands-if-send-names.patch | 2 +- ...nfigurable-Region-Compression-Format.patch | 4 +- .../server/0900-Add-PlayerPickItemEvent.patch | 2 +- ...ot-sanity-checks-in-container-clicks.patch | 2 +- ...ix-missing-map-initialize-event-call.patch | 2 +- ...he-collision-shape-of-a-block-before.patch | 2 +- ...predicate-for-blocks-when-raytracing.patch | 2 +- ...ingEffect-powers-lightning-rods-and-.patch | 2 +- ...n-t-fire-sync-events-during-worldgen.patch | 2 +- .../server/0941-Add-Structure-check-API.patch | 2 +- .../0949-Add-drops-to-shear-events.patch | 10 ++--- .../0959-Add-Lifecycle-Event-system.patch | 2 +- .../server/0964-improve-BanList-types.patch | 2 +- ...66-Add-BlockBreakProgressUpdateEvent.patch | 2 +- .../0968-Add-CartographyItemEvent.patch | 2 +- patches/server/0969-More-Raid-API.patch | 2 +- 137 files changed, 222 insertions(+), 204 deletions(-) diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index edc3f7f3b3..8fc599c111 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -2663,7 +2663,7 @@ index 0000000000000000000000000000000000000000..a5f706d6f716b2a463ae58adcde69d9e +} diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java new file mode 100644 -index 0000000000000000000000000000000000000000..05bddc0697faa8d9d9955d89d76930c84ef7df0d +index 0000000000000000000000000000000000000000..cff2f04409fab9abca87ceec85a551e1d59f9e7d --- /dev/null +++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java @@ -0,0 +1,296 @@ @@ -2683,7 +2683,7 @@ index 0000000000000000000000000000000000000000..05bddc0697faa8d9d9955d89d76930c8 +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.chunk.ChunkAccess; -+import net.minecraft.world.level.chunk.ChunkStatus; ++import net.minecraft.world.level.chunk.status.ChunkStatus; +import net.minecraft.world.level.chunk.LevelChunk; +import org.bukkit.Bukkit; +import org.slf4j.Logger; @@ -3482,7 +3482,7 @@ index 0000000000000000000000000000000000000000..cea9c098ade00ee87b8efc8164ab72f5 +} diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java new file mode 100644 -index 0000000000000000000000000000000000000000..722dcae9ab65bcacb9fb89dfaa63715d87816476 +index 0000000000000000000000000000000000000000..9e21566fc4d76ae2e305f0e1d47d8c2f1c1f2c4c --- /dev/null +++ b/src/main/java/io/papermc/paper/util/MCUtil.java @@ -0,0 +1,554 @@ @@ -4013,8 +4013,8 @@ index 0000000000000000000000000000000000000000..722dcae9ab65bcacb9fb89dfaa63715d + } + } + -+ public static int getTicketLevelFor(net.minecraft.world.level.chunk.ChunkStatus status) { -+ return net.minecraft.server.level.ChunkMap.MAX_VIEW_DISTANCE + net.minecraft.world.level.chunk.ChunkStatus.getDistance(status); ++ public static int getTicketLevelFor(net.minecraft.world.level.chunk.status.ChunkStatus status) { ++ return net.minecraft.server.level.ChunkMap.MAX_VIEW_DISTANCE + net.minecraft.world.level.chunk.status.ChunkStatus.getDistance(status); + } + + @NotNull @@ -6125,7 +6125,7 @@ index a3d44867e6243f30640df91a0285ed735a9f1f34..be9fde876cb22296afd01fb5d55be1f1 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world"); diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 2119fc6f72461199ae8969ab0d9b8fab26d775a8..05f761913bc0c65f2b8ada5f90e322e139518173 100644 +index 2119fc6f72461199ae8969ab0d9b8fab26d775a8..7653d56ceb687a2784a4030412c1034fb02e0f8c 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java @@ -48,9 +48,9 @@ public class ChunkHolder { @@ -6262,13 +6262,13 @@ index 2119fc6f72461199ae8969ab0d9b8fab26d775a8..05f761913bc0c65f2b8ada5f90e322e1 this.fullChunkFuture = chunkStorage.prepareAccessibleChunk(this); this.scheduleFullChunkPromotion(chunkStorage, this.fullChunkFuture, executor, FullChunkStatus.FULL); + // Paper start - cache ticking ready status -+ this.fullChunkFuture.thenAccept(either -> { -+ final Optional left = either.left(); -+ if (left.isPresent() && ChunkHolder.this.fullChunkCreateCount == expectCreateCount) { -+ LevelChunk fullChunk = either.left().get(); -+ ChunkHolder.this.isFullChunkReady = true; -+ io.papermc.paper.chunk.system.ChunkSystem.onChunkBorder(fullChunk, this); -+ } ++ this.fullChunkFuture.thenAccept(chunkResult -> { ++ chunkResult.ifSuccess(chunk -> { ++ if (ChunkHolder.this.fullChunkCreateCount == expectCreateCount) { ++ ChunkHolder.this.isFullChunkReady = true; ++ io.papermc.paper.chunk.system.ChunkSystem.onChunkBorder(chunk, this); ++ } ++ }); + }); this.updateChunkToSave(this.fullChunkFuture, "full"); } @@ -6276,7 +6276,7 @@ index 2119fc6f72461199ae8969ab0d9b8fab26d775a8..05f761913bc0c65f2b8ada5f90e322e1 if (flag2 && !flag3) { + // Paper start + if (this.isFullChunkReady) { -+ io.papermc.paper.chunk.system.ChunkSystem.onChunkNotBorder(this.fullChunkFuture.join().left().get(), this); // Paper ++ io.papermc.paper.chunk.system.ChunkSystem.onChunkNotBorder(this.fullChunkFuture.join().orElseThrow(IllegalStateException::new), this); // Paper + } + // Paper end this.fullChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK); @@ -6318,8 +6318,8 @@ index 2119fc6f72461199ae8969ab0d9b8fab26d775a8..05f761913bc0c65f2b8ada5f90e322e1 this.entityTickingChunkFuture = chunkStorage.prepareEntityTickingChunk(this); this.scheduleFullChunkPromotion(chunkStorage, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING); + // Paper start - cache ticking ready status -+ this.entityTickingChunkFuture.thenAccept(either -> { -+ either.ifLeft(chunk -> { ++ this.entityTickingChunkFuture.thenAccept(chunkResult -> { ++ chunkResult.ifSuccess(chunk -> { + ChunkHolder.this.isEntityTickingReady = true; + io.papermc.paper.chunk.system.ChunkSystem.onChunkEntityTicking(chunk, this); + }); @@ -6332,7 +6332,7 @@ index 2119fc6f72461199ae8969ab0d9b8fab26d775a8..05f761913bc0c65f2b8ada5f90e322e1 - this.entityTickingChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK); + // Paper start + if (this.isEntityTickingReady) { -+ io.papermc.paper.chunk.system.ChunkSystem.onChunkNotEntityTicking(this.entityTickingChunkFuture.join().left().get(), this); ++ io.papermc.paper.chunk.system.ChunkSystem.onChunkNotEntityTicking(this.entityTickingChunkFuture.join().orElseThrow(IllegalStateException::new), this); + } + // Paper end + this.entityTickingChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK); this.isEntityTickingReady = false; // Paper - cache chunk ticking stage @@ -6847,7 +6847,7 @@ index 8661ed9962d07fb40390faf7f186b9cd8ce6bc62..23c39b78486b018e222af489c8edbf4e ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b3caf69f9627ba2114dc9d06551ccf182debfb04..2567f0d6060c29c75ba8d4331ec51ad0f3a51883 100644 +index b3caf69f9627ba2114dc9d06551ccf182debfb04..9332573e6948092ea1cda4efa7f3944729da91be 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -235,6 +235,98 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -6939,7 +6939,7 @@ index b3caf69f9627ba2114dc9d06551ccf182debfb04..2567f0d6060c29c75ba8d4331ec51ad0 + for (int cx = minChunkX; cx <= maxChunkX; ++cx) { + for (int cz = minChunkZ; cz <= maxChunkZ; ++cz) { + io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad( -+ this, cx, cz, net.minecraft.world.level.chunk.ChunkStatus.FULL, true, priority, consumer ++ this, cx, cz, net.minecraft.world.level.chunk.status.ChunkStatus.FULL, true, priority, consumer + ); + } + } diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 44e1de8caf..90744f14aa 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -4755,7 +4755,7 @@ index 4dd9a80af9901287ab6740b072f2b89678c3d0cb..b2586684295b295a3196a2a9cf724cec public String getTitle() { return this.title; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 01963ef944da9251c038208c20012939afc77830..3e7b4df19bc85f4d306b0915a310998c360dded1 100644 +index 01963ef944da9251c038208c20012939afc77830..cf9069d7b3607c190459ee47ab5f7ca4ff10d03b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -501,4 +501,16 @@ public final class CraftItemFactory implements ItemFactory { @@ -4766,7 +4766,7 @@ index 01963ef944da9251c038208c20012939afc77830..3e7b4df19bc85f4d306b0915a310998c + // Paper start - Adventure + @Override + public net.kyori.adventure.text.event.HoverEvent asHoverEvent(final ItemStack item, final java.util.function.UnaryOperator op) { -+ return net.kyori.adventure.text.event.HoverEvent.showItem(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowItem.showItem(item.getType().getKey(), item.getAmount(), io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(item))))); ++ return net.kyori.adventure.text.event.HoverEvent.showItem(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowItem.showItem(item.getType().getKey(), item.getAmount(), io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(item).getComponentsPatch())))); + } + + @Override diff --git a/patches/server/0025-Timings-v2.patch b/patches/server/0025-Timings-v2.patch index 36c2848467..b7fca0b15f 100644 --- a/patches/server/0025-Timings-v2.patch +++ b/patches/server/0025-Timings-v2.patch @@ -1111,7 +1111,7 @@ index 23c39b78486b018e222af489c8edbf4e749abff6..3f60a3289ec58d5eb3c0c5634ca62ef2 gameprofilerfiller.pop(); gameprofilerfiller.pop(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2567f0d6060c29c75ba8d4331ec51ad0f3a51883..bbc55b349c338d07646e1449804170799bfa434b 100644 +index 9332573e6948092ea1cda4efa7f3944729da91be..476b513e05a8ef099a17db44732ebc8eed8a595c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1,6 +1,8 @@ diff --git a/patches/server/0042-Entity-Origin-API.patch b/patches/server/0042-Entity-Origin-API.patch index e151966f10..29e20019ee 100644 --- a/patches/server/0042-Entity-Origin-API.patch +++ b/patches/server/0042-Entity-Origin-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index bbc55b349c338d07646e1449804170799bfa434b..6aac0121a833c860a4eec6a69d2710513fc98086 100644 +index 476b513e05a8ef099a17db44732ebc8eed8a595c..53a448b60168c0bcbb0979884a589a31baf9c841 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2173,6 +2173,15 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0051-Disable-thunder.patch b/patches/server/0051-Disable-thunder.patch index 9b74fd8654..4835c0aded 100644 --- a/patches/server/0051-Disable-thunder.patch +++ b/patches/server/0051-Disable-thunder.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable thunder diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6aac0121a833c860a4eec6a69d2710513fc98086..f25347b3b06a996aeb9690ea6120162545b0c8de 100644 +index 53a448b60168c0bcbb0979884a589a31baf9c841..057ae550d0cb3617f2f6c282d172f46be1c0b263 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -615,7 +615,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0052-Disable-ice-and-snow.patch b/patches/server/0052-Disable-ice-and-snow.patch index 56284a4a26..19ff204bd0 100644 --- a/patches/server/0052-Disable-ice-and-snow.patch +++ b/patches/server/0052-Disable-ice-and-snow.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable ice and snow diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f25347b3b06a996aeb9690ea6120162545b0c8de..a9d03ee785ca9bc593dce35a7dd681d06f58fb70 100644 +index 057ae550d0cb3617f2f6c282d172f46be1c0b263..de6601291b7f8a8e3ee37aceeccfca9083f9fb90 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -645,11 +645,13 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0083-Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/0083-Configurable-spawn-chances-for-skeleton-horses.patch index 2307dac98d..11d3e3395e 100644 --- a/patches/server/0083-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/patches/server/0083-Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a9d03ee785ca9bc593dce35a7dd681d06f58fb70..6ccc339b8a82c25ba382f1a5609b50cf68f03021 100644 +index de6601291b7f8a8e3ee37aceeccfca9083f9fb90..0dfcf5b2a0865f6f14a2a34622d27c9742af6948 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -620,7 +620,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0084-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0084-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index f69e8a86d5..03667aecf0 100644 --- a/patches/server/0084-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0084-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -18,7 +18,7 @@ index b5f305c7d0972438a686d9b3a022156e39b130a2..d5b5eb914278fbd85921c039a8da3492 this.profiler.push(() -> { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6ccc339b8a82c25ba382f1a5609b50cf68f03021..a1e187d2eef9a5dfa41657a90a95ed392c2a919c 100644 +index 0dfcf5b2a0865f6f14a2a34622d27c9742af6948..4badda17dd48bd6dbb8228774d8b1824de6d1d87 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -226,6 +226,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0085-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0085-Entity-AddTo-RemoveFrom-World-Events.patch index 669cb0f4a5..c5b1c01897 100644 --- a/patches/server/0085-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/0085-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/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a1e187d2eef9a5dfa41657a90a95ed392c2a919c..5fa72cda0a7f350082c6fb00cac49c94dcef59d4 100644 +index 4badda17dd48bd6dbb8228774d8b1824de6d1d87..ede5afa51818f3c36d40787ff3e6d0d45108cdf8 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2185,6 +2185,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0089-Do-not-load-chunks-for-Pathfinding.patch b/patches/server/0089-Do-not-load-chunks-for-Pathfinding.patch index 6e06398919..76cfe02b0f 100644 --- a/patches/server/0089-Do-not-load-chunks-for-Pathfinding.patch +++ b/patches/server/0089-Do-not-load-chunks-for-Pathfinding.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not load chunks for Pathfinding diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index 6a8f44600a426041e3974aa52bdec0cc35e26591..881f41899075be32237d508fc2c38998e61a5a25 100644 +index 6a8f44600a426041e3974aa52bdec0cc35e26591..d5004290e40a1ff5e0fcfe75f8da34ae15962359 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java @@ -478,7 +478,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { @@ -16,7 +16,7 @@ index 6a8f44600a426041e3974aa52bdec0cc35e26591..881f41899075be32237d508fc2c38998 + // Paper start - Do not load chunks during pathfinding + BlockState blockState = world.getBlockStateIfLoaded(pos); + if (blockState == null) { -+ return BlockPathTypes.BLOCKED; ++ return PathType.BLOCKED; + } + // Paper end Block block = blockState.getBlock(); diff --git a/patches/server/0092-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/0092-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index 6a8d3ae346..4d5901f228 100644 --- a/patches/server/0092-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/patches/server/0092-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5fa72cda0a7f350082c6fb00cac49c94dcef59d4..d23a2cfeddf7ef9d10b0b12e0425df759e1fd080 100644 +index ede5afa51818f3c36d40787ff3e6d0d45108cdf8..0d0a20d5ca09404d8be4d67fc4221c1fb0d24c1c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1391,6 +1391,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0108-Fix-global-sound-handling.patch b/patches/server/0108-Fix-global-sound-handling.patch index 5ee797e55c..e590dd6363 100644 --- a/patches/server/0108-Fix-global-sound-handling.patch +++ b/patches/server/0108-Fix-global-sound-handling.patch @@ -11,7 +11,7 @@ Co-authored-by: lexikiq Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d23a2cfeddf7ef9d10b0b12e0425df759e1fd080..66b21ba4b3206fb52570eb67faeb1161bd043545 100644 +index 0d0a20d5ca09404d8be4d67fc4221c1fb0d24c1c..6e16a95472922faf34c1743f6e082b631eac4257 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1324,7 +1324,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0143-Basic-PlayerProfile-API.patch b/patches/server/0143-Basic-PlayerProfile-API.patch index ee847afccd..81c8e55127 100644 --- a/patches/server/0143-Basic-PlayerProfile-API.patch +++ b/patches/server/0143-Basic-PlayerProfile-API.patch @@ -549,7 +549,7 @@ index 0000000000000000000000000000000000000000..7ac27392a8647ef7d0dc78efe78703e9 + @NotNull GameProfile buildGameProfile(); +} diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java -index 722dcae9ab65bcacb9fb89dfaa63715d87816476..c57e8b6458800fe9bb27050eecc42bd3e5cf5a15 100644 +index 9e21566fc4d76ae2e305f0e1d47d8c2f1c1f2c4c..c95a0af32178fe24448a5ae7a229c86ec883e8de 100644 --- a/src/main/java/io/papermc/paper/util/MCUtil.java +++ b/src/main/java/io/papermc/paper/util/MCUtil.java @@ -1,5 +1,7 @@ diff --git a/patches/server/0150-ensureServerConversions-API.patch b/patches/server/0150-ensureServerConversions-API.patch index d5306ec544..d468696353 100644 --- a/patches/server/0150-ensureServerConversions-API.patch +++ b/patches/server/0150-ensureServerConversions-API.patch @@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 3e7b4df19bc85f4d306b0915a310998c360dded1..3c8cbbe7ab954d98902adde7dcf5fc48511c73e7 100644 +index cf9069d7b3607c190459ee47ab5f7ca4ff10d03b..313b682ad4826cbe68dd66bd30e79a4101540cad 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -513,4 +513,12 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/patches/server/0151-Implement-getI18NDisplayName.patch b/patches/server/0151-Implement-getI18NDisplayName.patch index 6c27accb88..e2897ecc13 100644 --- a/patches/server/0151-Implement-getI18NDisplayName.patch +++ b/patches/server/0151-Implement-getI18NDisplayName.patch @@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 3c8cbbe7ab954d98902adde7dcf5fc48511c73e7..c7b45a835d219da0d0aa70835cdb432edfa3de19 100644 +index 313b682ad4826cbe68dd66bd30e79a4101540cad..31b43070e0c54a433f8429a548f90140c1f36cef 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -521,4 +521,19 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/patches/server/0193-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0193-Block-Enderpearl-Travel-Exploit.patch index 623878f155..dab23052ef 100644 --- a/patches/server/0193-Block-Enderpearl-Travel-Exploit.patch +++ b/patches/server/0193-Block-Enderpearl-Travel-Exploit.patch @@ -16,7 +16,7 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner public net.minecraft.world.entity.projectile.Projectile ownerUUID diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 66b21ba4b3206fb52570eb67faeb1161bd043545..c3b19ba06e8bd31d2819472bdac936502dae3488 100644 +index 6e16a95472922faf34c1743f6e082b631eac4257..2522c7a602338f515569cac42c71ae423daca6b3 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2143,6 +2143,12 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0194-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0194-Expand-World.spawnParticle-API-and-add-Builder.patch index 5bb85b74d8..a35dab6847 100644 --- a/patches/server/0194-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0194-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c3b19ba06e8bd31d2819472bdac936502dae3488..c25b6637355dbf856ca5b578edf51e6ebbdde7f8 100644 +index 2522c7a602338f515569cac42c71ae423daca6b3..a4369e73a8af5d2f0f216939685f6553433debd1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1510,12 +1510,17 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0195-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/patches/server/0195-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index f07bc16f1e..5f4980ec04 100644 --- a/patches/server/0195-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/patches/server/0195-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index e535fb3b5194b8412c0c26c0799340916c7542eb..2e5fc484d26b5468dfb8f49d62f4518e83169618 100644 +index e535fb3b5194b8412c0c26c0799340916c7542eb..394d0b03f18d55b43f091a9ae1a47e06a6fa4c0d 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java @@ -202,9 +202,9 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -13,10 +13,10 @@ index e535fb3b5194b8412c0c26c0799340916c7542eb..2e5fc484d26b5468dfb8f49d62f4518e if (entityhuman.isTextFilteringEnabled()) { - signtext = signtext.setMessage(i, Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier)); -+ signtext = signtext.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only ++ signtext = signtext.setMessage(i, Component.literal(net.minecraft.util.StringUtil.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only } else { - signtext = signtext.setMessage(i, Component.literal(filteredtext.raw()).setStyle(chatmodifier), Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier)); -+ signtext = signtext.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.raw())).setStyle(chatmodifier), Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only ++ signtext = signtext.setMessage(i, Component.literal(net.minecraft.util.StringUtil.filterText(filteredtext.raw())).setStyle(chatmodifier), Component.literal(net.minecraft.util.StringUtil.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only } } diff --git a/patches/server/0209-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch b/patches/server/0209-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch index 060df84ecc..fb37d7ab55 100644 --- a/patches/server/0209-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch +++ b/patches/server/0209-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch @@ -204,6 +204,19 @@ index efcfbcb3dc352c9015cc9121dc8d98e8deed8bfd..464ba41fd284e29374dbc81c984cf948 } } +diff --git a/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java b/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java +index 9f9b7373c9a714597858ddcd8932e31b902cf5a1..f7f26d595072372004143c4e26506ed505aff7d8 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java +@@ -89,7 +89,7 @@ public abstract class AbstractWindCharge extends AbstractHurtingProjectile imple + } + + @Override +- public void push(double deltaX, double deltaY, double deltaZ) {} ++ public void push(double deltaX, double deltaY, double deltaZ, @org.jetbrains.annotations.Nullable Entity pushingEntity) {} // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent + + public abstract void explode(); + diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java index 111e6a7ab25e5513154984545c1737d2f7fd7d5f..146f5a33e1d538e46e4f7034a498d30f742a96f7 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java diff --git a/patches/server/0215-InventoryCloseEvent-Reason-API.patch b/patches/server/0215-InventoryCloseEvent-Reason-API.patch index 02e4a12d2a..1d72a18b37 100644 --- a/patches/server/0215-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0215-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c25b6637355dbf856ca5b578edf51e6ebbdde7f8..75213d34740e512763a8eb4411ef2b48c6204434 100644 +index a4369e73a8af5d2f0f216939685f6553433debd1..542a940ec2ebf367920d9f96f99d703ee1b3351f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1241,7 +1241,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0230-Add-TNTPrimeEvent.patch b/patches/server/0230-Add-TNTPrimeEvent.patch index f658793bb4..20aea2bef7 100644 --- a/patches/server/0230-Add-TNTPrimeEvent.patch +++ b/patches/server/0230-Add-TNTPrimeEvent.patch @@ -46,7 +46,7 @@ index c7c4b04dede992991229b149b96ff6a81f499ae3..886b8d2284e3ae85184c842b24869029 } } diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java -index 21b83d4d5b58da22ba1fadb0ca376a0076f2e23c..58b8c3cc579a1d34af26c44d6a7413bd5cc9e4e7 100644 +index 21b83d4d5b58da22ba1fadb0ca376a0076f2e23c..ff872a91effaed7394848fe5c1ab4d2bbac0b5fc 100644 --- a/src/main/java/net/minecraft/world/level/block/TntBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java @@ -50,6 +50,12 @@ public class TntBlock extends Block { @@ -96,7 +96,7 @@ index 21b83d4d5b58da22ba1fadb0ca376a0076f2e23c..58b8c3cc579a1d34af26c44d6a7413bd + // Paper start - TNTPrimeEvent + org.bukkit.block.Block tntBlock = org.bukkit.craftbukkit.block.CraftBlock.at(world, pos); + if (!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.ITEM, player.getBukkitEntity()).callEvent()) { -+ return InteractionResult.FAIL; ++ return ItemInteractionResult.FAIL; + } + // Paper end - TNTPrimeEvent TntBlock.explode(world, pos, player); diff --git a/patches/server/0234-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0234-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index a79598c0fa..08aa8035d6 100644 --- a/patches/server/0234-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0234-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -26,7 +26,7 @@ index 46da628073e2bfb77b3deab623dba46228d92618..1c508d1f122d287cd8dc0a905de96436 protected void tick() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 75213d34740e512763a8eb4411ef2b48c6204434..ce89f04b74e579dedae05cfdf681827a92626f9a 100644 +index 542a940ec2ebf367920d9f96f99d703ee1b3351f..1beb2541cf799c7862685b5332ecbbfae1edc170 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1203,6 +1203,12 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0263-Catch-JsonParseException-in-entity-and-block-entity-.patch b/patches/server/0263-Catch-JsonParseException-in-entity-and-block-entity-.patch index bff4fb181b..0da0ac578a 100644 --- a/patches/server/0263-Catch-JsonParseException-in-entity-and-block-entity-.patch +++ b/patches/server/0263-Catch-JsonParseException-in-entity-and-block-entity-.patch @@ -13,7 +13,7 @@ Shulkers) may need to be changed in order for it to re-save properly No more crashing though. diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java -index c57e8b6458800fe9bb27050eecc42bd3e5cf5a15..cdb514137797f4265dea5edb094caada5cee46a3 100644 +index c95a0af32178fe24448a5ae7a229c86ec883e8de..5c401c7e30ed5f6f32b1ad6523537aa46173cff5 100644 --- a/src/main/java/io/papermc/paper/util/MCUtil.java +++ b/src/main/java/io/papermc/paper/util/MCUtil.java @@ -558,4 +558,19 @@ public final class MCUtil { diff --git a/patches/server/0279-Book-Size-Limits.patch b/patches/server/0279-Book-Size-Limits.patch index 1fc906f4f5..4ca01babd3 100644 --- a/patches/server/0279-Book-Size-Limits.patch +++ b/patches/server/0279-Book-Size-Limits.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5443a2713c957b23deb903baf7039b0220699095..a82a6e0381da86e5173a815e1a0160beb8927a1c 100644 +index 5443a2713c957b23deb903baf7039b0220699095..5bf5a205ed4049fadd67903bb1b2d2fac249ce20 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1046,6 +1046,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -15,7 +15,7 @@ index 5443a2713c957b23deb903baf7039b0220699095..a82a6e0381da86e5173a815e1a0160be public void handleEditBook(ServerboundEditBookPacket packet) { + // Paper start - Book size limits + if (!this.cserver.isPrimaryThread()) { -+ List pageList = packet.getPages(); ++ List pageList = packet.pages(); + long byteTotal = 0; + int maxBookPageSize = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax; + double multiplier = Math.max(0.3D, Math.min(1D, io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier)); diff --git a/patches/server/0286-Brigadier-Mojang-API.patch b/patches/server/0286-Brigadier-Mojang-API.patch index 6e752e5008..03ac3a81f6 100644 --- a/patches/server/0286-Brigadier-Mojang-API.patch +++ b/patches/server/0286-Brigadier-Mojang-API.patch @@ -131,7 +131,7 @@ index 6383cdfe3e2b61314fee7f7236dc7df1c1e8bfb6..3b59f3d92d781c16825f6f67b7252252 if (commandnode2.canUse(source)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a82a6e0381da86e5173a815e1a0160beb8927a1c..ba6944eb4602549ef139a427788f8175ce912677 100644 +index 5bf5a205ed4049fadd67903bb1b2d2fac249ce20..85e6ab0d4f49b9b4041a2e3d5ba1786dedd0846e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -772,19 +772,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0288-Limit-Client-Sign-length-more.patch b/patches/server/0288-Limit-Client-Sign-length-more.patch index 9449d59d41..6c95e236c8 100644 --- a/patches/server/0288-Limit-Client-Sign-length-more.patch +++ b/patches/server/0288-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ba6944eb4602549ef139a427788f8175ce912677..eae6e3aeaca1b567698eaa05ed02c6c45717d7f6 100644 +index 85e6ab0d4f49b9b4041a2e3d5ba1786dedd0846e..556a10d17acbd558cd4b23f729dc1644ecdd2fed 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -300,6 +300,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0290-Entity-getEntitySpawnReason.patch b/patches/server/0290-Entity-getEntitySpawnReason.patch index 7565d226a7..52481c50bc 100644 --- a/patches/server/0290-Entity-getEntitySpawnReason.patch +++ b/patches/server/0290-Entity-getEntitySpawnReason.patch @@ -22,7 +22,7 @@ index bf72cf288ade52ee8cc41ca978f368b3ad575951..798999be50d26be357ef3c6d5b9383ce }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ce89f04b74e579dedae05cfdf681827a92626f9a..e008b0b1b04dd8da118be6ee0bdd05c146a97532 100644 +index 1beb2541cf799c7862685b5332ecbbfae1edc170..81b6ae88c37b0876dc24b1d85a6aa20e242eae8b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1209,6 +1209,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0308-Dont-send-unnecessary-sign-update.patch b/patches/server/0308-Dont-send-unnecessary-sign-update.patch index dd38fa947e..afca8562db 100644 --- a/patches/server/0308-Dont-send-unnecessary-sign-update.patch +++ b/patches/server/0308-Dont-send-unnecessary-sign-update.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Dont send unnecessary sign update diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 2e5fc484d26b5468dfb8f49d62f4518e83169618..ddf101fd613c854f77971d97a5b0f9319f21242a 100644 +index 394d0b03f18d55b43f091a9ae1a47e06a6fa4c0d..87e272cfb145c37d26b0bf56f97ec784a9bfd98e 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java @@ -185,6 +185,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C diff --git a/patches/server/0316-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0316-Optimise-EntityGetter-getPlayerByUUID.patch index ea994ce30b..dac2a3c736 100644 --- a/patches/server/0316-Optimise-EntityGetter-getPlayerByUUID.patch +++ b/patches/server/0316-Optimise-EntityGetter-getPlayerByUUID.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID Use the PlayerList map instead of iterating over all players diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e008b0b1b04dd8da118be6ee0bdd05c146a97532..0abba132f2ce4cab0fd26e1ee17442b22471b6aa 100644 +index 81b6ae88c37b0876dc24b1d85a6aa20e242eae8b..705a05fb0c59160d728336461f564dd39c9fb4ac 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -329,6 +329,15 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0325-Add-debug-for-sync-chunk-loads.patch b/patches/server/0325-Add-debug-for-sync-chunk-loads.patch index 3c8e616e06..0dd9e9da94 100644 --- a/patches/server/0325-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0325-Add-debug-for-sync-chunk-loads.patch @@ -312,7 +312,7 @@ index d41c0e4474d057c7b13427bfd896c50f24232615..2d9d4d06b75873f888ef4d8f5779a527 chunkproviderserver_b.managedBlock(completablefuture::isDone); this.level.timings.syncChunkLoad.stopTiming(); // Paper diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0abba132f2ce4cab0fd26e1ee17442b22471b6aa..6c09cc91bc0d229761a4af1f1a1ec46f56ce1d65 100644 +index 705a05fb0c59160d728336461f564dd39c9fb4ac..fb43ccbe51510b1a2c599ecfc15d21ec29ff7c70 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -421,6 +421,13 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0343-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0343-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index c34d453e6a..23143dda89 100644 --- a/patches/server/0343-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/patches/server/0343-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -25,7 +25,7 @@ index f13f8119cf43711b96b4dc5834fceaa0282d632d..66936834a80ef6b645ab44f3439defcb EntityType entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6c09cc91bc0d229761a4af1f1a1ec46f56ce1d65..6a30ae257158267918c7114494005be528ac05dc 100644 +index fb43ccbe51510b1a2c599ecfc15d21ec29ff7c70..21ffa93f0e92f408dd30f16bb0ca0e22b1c27198 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2181,7 +2181,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0361-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0361-Validate-PickItem-Packet-and-kick-for-invalid.patch index 890d9ce3df..2ef957bfaf 100644 --- a/patches/server/0361-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/0361-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/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index eae6e3aeaca1b567698eaa05ed02c6c45717d7f6..6a490ba55e5af694b68bf6bf1677afc7f4f3679f 100644 +index 556a10d17acbd558cd4b23f729dc1644ecdd2fed..819ef697b3d88024310745014b4c2457de07db37 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -898,7 +898,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0365-Prevent-teleporting-dead-entities.patch b/patches/server/0365-Prevent-teleporting-dead-entities.patch index ce1fced103..ae70124f67 100644 --- a/patches/server/0365-Prevent-teleporting-dead-entities.patch +++ b/patches/server/0365-Prevent-teleporting-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleporting dead entities diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6a490ba55e5af694b68bf6bf1677afc7f4f3679f..fba8a57d96487f90ff6bc2f8090682d9dc163217 100644 +index 819ef697b3d88024310745014b4c2457de07db37..85386ef1e4bb4e97b13f9f2394071c5c62aa5f10 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1546,6 +1546,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0382-Prevent-position-desync-causing-tp-exploit.patch b/patches/server/0382-Prevent-position-desync-causing-tp-exploit.patch index 71bb5d041e..dc71f8a558 100644 --- a/patches/server/0382-Prevent-position-desync-causing-tp-exploit.patch +++ b/patches/server/0382-Prevent-position-desync-causing-tp-exploit.patch @@ -13,7 +13,7 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fba8a57d96487f90ff6bc2f8090682d9dc163217..445d9c9a2c42c49388736a0b9b683a18fa5e9353 100644 +index 85386ef1e4bb4e97b13f9f2394071c5c62aa5f10..5551fe83f1b27426c8d55754bb058703effa7ecd 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1361,6 +1361,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0384-Add-PlayerRecipeBookClickEvent.patch b/patches/server/0384-Add-PlayerRecipeBookClickEvent.patch index fb76b16567..407d50c8d6 100644 --- a/patches/server/0384-Add-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0384-Add-PlayerRecipeBookClickEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 445d9c9a2c42c49388736a0b9b683a18fa5e9353..d90b073294df56617febb6eb3edc65bf488e7e23 100644 +index 5551fe83f1b27426c8d55754bb058703effa7ecd..be496398916fc84abf7950a8613297413c2436bc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3051,16 +3051,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0386-Add-permission-for-command-blocks.patch b/patches/server/0386-Add-permission-for-command-blocks.patch index 82700c8964..35ded900dc 100644 --- a/patches/server/0386-Add-permission-for-command-blocks.patch +++ b/patches/server/0386-Add-permission-for-command-blocks.patch @@ -18,7 +18,7 @@ index cd6f34ee326228036f8c025e4e6d04e0c15ba06f..2f0d56c78584abe27ef050258827103f return false; } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d90b073294df56617febb6eb3edc65bf488e7e23..d8f1c46530f4fe52fa12fd9f876328aef39fc3eb 100644 +index be496398916fc84abf7950a8613297413c2436bc..2003c95bf5f25ff6f09dd3ae569b3aff8c24ab49 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -809,7 +809,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0388-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0388-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index b7b64ae5b0..64d4e669b0 100644 --- a/patches/server/0388-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0388-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -89,7 +89,7 @@ index e3f73ccbc2d62eef386adc6c66428c6081a68b8b..0019e5313523521b4f1607dfc391d47c playerlist.sendPlayerPermissionLevel(this); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d8f1c46530f4fe52fa12fd9f876328aef39fc3eb..daa07712fe5e85612c30fc9b60f89fcf244a36bc 100644 +index 2003c95bf5f25ff6f09dd3ae569b3aff8c24ab49..e89d2fe13d68100ea1cb11e9810ea940193c7049 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3254,7 +3254,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0394-Do-not-accept-invalid-client-settings.patch b/patches/server/0394-Do-not-accept-invalid-client-settings.patch index 9d306a4ea5..30d8554061 100644 --- a/patches/server/0394-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0394-Do-not-accept-invalid-client-settings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not accept invalid client settings diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index daa07712fe5e85612c30fc9b60f89fcf244a36bc..51e97ca80f25cd1e49033cfbc41b595f3fa54d66 100644 +index e89d2fe13d68100ea1cb11e9810ea940193c7049..5daa3798f118074d490246bd29804fbf8aed1e1e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3246,6 +3246,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0411-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0411-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 1155550f15..ac97c84e6b 100644 --- a/patches/server/0411-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0411-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6a30ae257158267918c7114494005be528ac05dc..ccc5e57bfaaa51b05c66349475212f2079a4428c 100644 +index 21ffa93f0e92f408dd30f16bb0ca0e22b1c27198..49bec03d5be3020b451092d8c36aae8c78085174 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1668,7 +1668,9 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0422-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0422-Create-HoverEvent-from-ItemStack-Entity.patch index ab4fa2abcc..5be1d3cefd 100644 --- a/patches/server/0422-Create-HoverEvent-from-ItemStack-Entity.patch +++ b/patches/server/0422-Create-HoverEvent-from-ItemStack-Entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index c7b45a835d219da0d0aa70835cdb432edfa3de19..f9c83ad7558754b571bfa60329a036b5f5220553 100644 +index 31b43070e0c54a433f8429a548f90140c1f36cef..943ef44ce17719170b71be0eae75c43426376459 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -536,4 +536,41 @@ public final class CraftItemFactory implements ItemFactory { +@@ -536,4 +536,44 @@ public final class CraftItemFactory implements ItemFactory { return nms != null ? net.minecraft.locale.Language.getInstance().getOrDefault(nms.getItem().getDescriptionId(nms)) : null; } // Paper end - add getI18NDisplayName @@ -16,11 +16,14 @@ index c7b45a835d219da0d0aa70835cdb432edfa3de19..f9c83ad7558754b571bfa60329a036b5 + // Paper start - bungee hover events + @Override + public net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(ItemStack itemStack) { ++ throw new UnsupportedOperationException("BungeeCord Chat API does not support data components"); ++ /* + net.md_5.bungee.api.chat.ItemTag itemTag = net.md_5.bungee.api.chat.ItemTag.ofNbt(CraftItemStack.asNMSCopy(itemStack).getOrCreateTag().toString()); + return new net.md_5.bungee.api.chat.hover.content.Item( + itemStack.getType().getKey().toString(), + itemStack.getAmount(), + itemTag); ++ */ + } + + @Override diff --git a/patches/server/0424-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0424-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index af952c7cb7..fed71b1d40 100644 --- a/patches/server/0424-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/patches/server/0424-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -9,7 +9,7 @@ as this is how Vanilla teleports entities. Cancel any pending motion when teleported. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 51e97ca80f25cd1e49033cfbc41b595f3fa54d66..5175475d75c393bfd5516d7dbede5200b7091b64 100644 +index 5daa3798f118074d490246bd29804fbf8aed1e1e..77140605ca66f7c8950ada65db2072b6e9621b53 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -682,7 +682,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0427-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0427-Extend-block-drop-capture-to-capture-all-items-added.patch index 49994b1316..303b0bae84 100644 --- a/patches/server/0427-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0427-Extend-block-drop-capture-to-capture-all-items-added.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ccc5e57bfaaa51b05c66349475212f2079a4428c..4e1027f00fba2084073aa926805753224aa8b153 100644 +index 49bec03d5be3020b451092d8c36aae8c78085174..7b129a3c34d82a43899179f2ab3b3fc4c283a989 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1230,6 +1230,12 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0434-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0434-Fix-for-large-move-vectors-crashing-server.patch index 5b4918596b..339642f6df 100644 --- a/patches/server/0434-Fix-for-large-move-vectors-crashing-server.patch +++ b/patches/server/0434-Fix-for-large-move-vectors-crashing-server.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix for large move vectors crashing server Check movement distance also based on current position. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5175475d75c393bfd5516d7dbede5200b7091b64..355b1726e90eb796fa2c1e21108bcf793637bf6c 100644 +index 77140605ca66f7c8950ada65db2072b6e9621b53..1fc1960b6ef6d1f8f79a831c7bcd8ed8ce68726b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -498,9 +498,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0450-Add-Destroy-Speed-API.patch b/patches/server/0450-Add-Destroy-Speed-API.patch index c7fb04f8fa..3d0806c67f 100644 --- a/patches/server/0450-Add-Destroy-Speed-API.patch +++ b/patches/server/0450-Add-Destroy-Speed-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Destroy Speed API Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 2303525542daa933a8de5978ac43d16223c6e5fd..48e8d0cc267706d3d8e29333d7fd6b89fdd88553 100644 +index 2303525542daa933a8de5978ac43d16223c6e5fd..3fe60f5ee38ecb704194a8c2dd6e40c5bb57d9cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -721,4 +721,19 @@ public class CraftBlockData implements BlockData { @@ -20,7 +20,7 @@ index 2303525542daa933a8de5978ac43d16223c6e5fd..48e8d0cc267706d3d8e29333d7fd6b89 + net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.unwrap(itemStack); + float speed = nmsItemStack.getDestroySpeed(this.state); + if (speed > 1.0F && considerEnchants) { -+ int enchantLevel = net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.BLOCK_EFFICIENCY, nmsItemStack); ++ int enchantLevel = net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.EFFICIENCY, nmsItemStack); + if (enchantLevel > 0) { + speed += enchantLevel * enchantLevel + 1; + } diff --git a/patches/server/0459-Limit-recipe-packets.patch b/patches/server/0459-Limit-recipe-packets.patch index 39191cbc5e..5df637122f 100644 --- a/patches/server/0459-Limit-recipe-packets.patch +++ b/patches/server/0459-Limit-recipe-packets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 355b1726e90eb796fa2c1e21108bcf793637bf6c..10f0a84c119826e52fac6ca8e1d3e6276cc72392 100644 +index 1fc1960b6ef6d1f8f79a831c7bcd8ed8ce68726b..db441e55bc07b3e1db51ecaf7cef8a3844494ebe 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -267,6 +267,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0474-Fix-interact-event-not-being-called-sometimes.patch b/patches/server/0474-Fix-interact-event-not-being-called-sometimes.patch index ea135ba0b1..1348bb2714 100644 --- a/patches/server/0474-Fix-interact-event-not-being-called-sometimes.patch +++ b/patches/server/0474-Fix-interact-event-not-being-called-sometimes.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Fix interact event not being called sometimes Co-authored-by: Moulberry diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 10f0a84c119826e52fac6ca8e1d3e6276cc72392..e0c11559295d00445d5ba0543a81f49dc2314266 100644 +index db441e55bc07b3e1db51ecaf7cef8a3844494ebe..6dfc35d2d5a76e317ff7f15c85a84b72d28c5d0f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1765,7 +1765,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0486-Remove-stale-POIs.patch b/patches/server/0486-Remove-stale-POIs.patch index f759c441c1..17912adc20 100644 --- a/patches/server/0486-Remove-stale-POIs.patch +++ b/patches/server/0486-Remove-stale-POIs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove stale POIs diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 4e1027f00fba2084073aa926805753224aa8b153..2c1ca55e1919c29956b3d95f65f8f08eb7529d1e 100644 +index 7b129a3c34d82a43899179f2ab3b3fc4c283a989..1dd53726a478817c7d7f7d5a2fb90acee434be98 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1743,6 +1743,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0503-Add-EntityMoveEvent.patch b/patches/server/0503-Add-EntityMoveEvent.patch index 1016baa882..d8b995bdda 100644 --- a/patches/server/0503-Add-EntityMoveEvent.patch +++ b/patches/server/0503-Add-EntityMoveEvent.patch @@ -17,7 +17,7 @@ index b083298d2bcf0d4c6213d6ac8645b8c084cfc6de..e9ea8ad5689c0e6edd2e7335ab9932b3 this.profiler.push(() -> { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2c1ca55e1919c29956b3d95f65f8f08eb7529d1e..35ccccfea9aec44a85e08b0e383b6650554b8bd3 100644 +index 1dd53726a478817c7d7f7d5a2fb90acee434be98..7add6c4a1b8ff4f1e607f1d0e7cb47a0cb750c8f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -227,6 +227,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0504-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0504-added-option-to-disable-pathfinding-updates-on-block.patch index 7ceefb961a..4852591c8a 100644 --- a/patches/server/0504-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0504-added-option-to-disable-pathfinding-updates-on-block.patch @@ -5,7 +5,7 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 35ccccfea9aec44a85e08b0e383b6650554b8bd3..93d66d85be2dcc52e8f3fa138561f2126d91c732 100644 +index 7add6c4a1b8ff4f1e607f1d0e7cb47a0cb750c8f..5eff010cd4169ba71edf6efe47f53edf9287ea8f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1375,6 +1375,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0518-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0518-Allow-using-signs-inside-spawn-protection.patch index bc14b789b0..789494c13d 100644 --- a/patches/server/0518-Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/0518-Allow-using-signs-inside-spawn-protection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow using signs inside spawn protection diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e0c11559295d00445d5ba0543a81f49dc2314266..9446d6c2b2f8e535588264af7e1c852005658a17 100644 +index 6dfc35d2d5a76e317ff7f15c85a84b72d28c5d0f..aca572c34e12618fa032344ce5b7d890d75120d0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1753,8 +1753,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0524-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0524-Don-t-ignore-result-of-PlayerEditBookEvent.patch index 40a839bcff..65fbf6884a 100644 --- a/patches/server/0524-Don-t-ignore-result-of-PlayerEditBookEvent.patch +++ b/patches/server/0524-Don-t-ignore-result-of-PlayerEditBookEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9446d6c2b2f8e535588264af7e1c852005658a17..f1bdea575fbc52929076e5adea94af51f1f603ec 100644 +index aca572c34e12618fa032344ce5b7d890d75120d0..5f4689c411b3f8e89a018b596fa75c3e8fee408d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1158,7 +1158,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0534-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0534-fix-PlayerItemHeldEvent-firing-twice.patch index 7f2cc5554a..78af9fb438 100644 --- a/patches/server/0534-fix-PlayerItemHeldEvent-firing-twice.patch +++ b/patches/server/0534-fix-PlayerItemHeldEvent-firing-twice.patch @@ -5,7 +5,7 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f1bdea575fbc52929076e5adea94af51f1f603ec..67727392a03cfad851f5092bbd4801c667a017f5 100644 +index 5f4689c411b3f8e89a018b596fa75c3e8fee408d..4371c93b31ca14e29c05d72487a41351e710db86 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1923,6 +1923,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0536-More-World-API.patch b/patches/server/0536-More-World-API.patch index e97d494494..082bdde443 100644 --- a/patches/server/0536-More-World-API.patch +++ b/patches/server/0536-More-World-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4a51d0125d59b1edd2da7aac1db1ca49374c008c..20c1e6f485a4067b04e39479ae2b122332c94c27 100644 +index 4a51d0125d59b1edd2da7aac1db1ca49374c008c..518b3d6a1d339817328ca1081a44ea4d976ecbb5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -2128,6 +2128,53 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -55,7 +55,7 @@ index 4a51d0125d59b1edd2da7aac1db1ca49374c008c..20c1e6f485a4067b04e39479ae2b1223 + + @Override + public void sendGameEvent(Entity sourceEntity, org.bukkit.GameEvent gameEvent, Vector position) { -+ getHandle().gameEvent(sourceEntity != null ? ((CraftEntity) sourceEntity).getHandle(): null, net.minecraft.core.registries.BuiltInRegistries.GAME_EVENT.get(org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(gameEvent.getKey())), org.bukkit.craftbukkit.util.CraftVector.toBlockPos(position)); ++ getHandle().gameEvent(sourceEntity != null ? ((CraftEntity) sourceEntity).getHandle(): null, net.minecraft.core.registries.BuiltInRegistries.GAME_EVENT.getHolder(org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(gameEvent.getKey())).orElseThrow(), org.bukkit.craftbukkit.util.CraftVector.toBlockPos(position)); + } + // Paper end + diff --git a/patches/server/0539-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch b/patches/server/0539-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch index d67b68a9ef..7eaaa18712 100644 --- a/patches/server/0539-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch +++ b/patches/server/0539-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expand PlayerRespawnEvent, fix passed parameter issues Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 67727392a03cfad851f5092bbd4801c667a017f5..801b0e027d1034bb343fb1c176cfa1174e4ff8b9 100644 +index 4371c93b31ca14e29c05d72487a41351e710db86..70d5f1202c38d2b73510a8e1fe0863492384cf20 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2716,7 +2716,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0551-Expand-PlayerGameModeChangeEvent.patch b/patches/server/0551-Expand-PlayerGameModeChangeEvent.patch index 6242e14495..215b8f50a3 100644 --- a/patches/server/0551-Expand-PlayerGameModeChangeEvent.patch +++ b/patches/server/0551-Expand-PlayerGameModeChangeEvent.patch @@ -132,7 +132,7 @@ index 486d9c4dbe3ee23198eba7f34ea8b5f4e9048c0b..f080322bc766361b9d2d8b1214c3dff1 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 801b0e027d1034bb343fb1c176cfa1174e4ff8b9..fadcba80fb2f852e1d8356127195648950615c65 100644 +index 70d5f1202c38d2b73510a8e1fe0863492384cf20..f34960b459b9dd7340fd0b8b19739f085f30bae1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2725,7 +2725,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0554-Move-range-check-for-block-placing-up.patch b/patches/server/0554-Move-range-check-for-block-placing-up.patch index ed2593c22a..8e2f6a1473 100644 --- a/patches/server/0554-Move-range-check-for-block-placing-up.patch +++ b/patches/server/0554-Move-range-check-for-block-placing-up.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fadcba80fb2f852e1d8356127195648950615c65..1b6d4b30c2cab1224fa3565ef12e9f9ab736053b 100644 +index f34960b459b9dd7340fd0b8b19739f085f30bae1..f5e0d9765dc92e886618d8180a598515c856b789 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1740,6 +1740,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0557-Add-Unix-domain-socket-support.patch b/patches/server/0557-Add-Unix-domain-socket-support.patch index 71ce648189..08ae4127ce 100644 --- a/patches/server/0557-Add-Unix-domain-socket-support.patch +++ b/patches/server/0557-Add-Unix-domain-socket-support.patch @@ -87,7 +87,7 @@ index d6d7f1c446ba5507f67038ff27775ba75156f4a7..c63c194c44646e6bc1a5942655278701 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1b6d4b30c2cab1224fa3565ef12e9f9ab736053b..bac22822c69c4e58d0010e7675dc0d8e957cdb18 100644 +index f5e0d9765dc92e886618d8180a598515c856b789..2c4360431135b665e7b95cd3d59bb38871bca68b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2544,6 +2544,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0560-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0560-Add-cause-to-Weather-ThunderChangeEvents.patch index d8e90df44c..1bd3b1c21e 100644 --- a/patches/server/0560-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0560-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 93d66d85be2dcc52e8f3fa138561f2126d91c732..f4b884a7c9e20823e626f7f5604cc4e0b2edd570 100644 +index 5eff010cd4169ba71edf6efe47f53edf9287ea8f..890e5f31d44c7a02f2591e7847378b981a96a363 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -440,8 +440,8 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -95,7 +95,7 @@ index e50ad48658193f889d65d37c57b1e30ce46758b7..efd0bcfebb3b4f63018d4e20a6a89f79 if (weather.isCancelled()) { return; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 20c1e6f485a4067b04e39479ae2b122332c94c27..ee2a685d8cb8754a6f5fbed0d43cfbc0b5f2bbb7 100644 +index 518b3d6a1d339817328ca1081a44ea4d976ecbb5..24ecb71a878106c1e45564d356affe03ba1d1367 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1206,7 +1206,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0563-Add-PlayerKickEvent-causes.patch b/patches/server/0563-Add-PlayerKickEvent-causes.patch index 466d6cfcbf..97d6695a99 100644 --- a/patches/server/0563-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0563-Add-PlayerKickEvent-causes.patch @@ -213,7 +213,7 @@ index d947eb533ba4dfd3b711e644d2a68238d1ec007a..b9767aff520d32d4615e3cb9e24a2945 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index bac22822c69c4e58d0010e7675dc0d8e957cdb18..9b2abc64556acf9547e5927847f0a02c4ff66001 100644 +index 2c4360431135b665e7b95cd3d59bb38871bca68b..5eb67dbeaa553b25d19e24b3bfb5e05aed4e8a65 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0574-add-per-world-spawn-limits.patch b/patches/server/0574-add-per-world-spawn-limits.patch index d45bb2f774..4bff2f79a8 100644 --- a/patches/server/0574-add-per-world-spawn-limits.patch +++ b/patches/server/0574-add-per-world-spawn-limits.patch @@ -5,7 +5,7 @@ Subject: [PATCH] add per world spawn limits diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ee2a685d8cb8754a6f5fbed0d43cfbc0b5f2bbb7..28c027db9f017c35bfc0407dd1bd46fa685f58fd 100644 +index 24ecb71a878106c1e45564d356affe03ba1d1367..a46275f0684437d1c99792ad61889fd047318028 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -222,6 +222,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0579-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0579-Ensure-disconnect-for-book-edit-is-called-on-main.patch index c39f604802..4738103d19 100644 --- a/patches/server/0579-Ensure-disconnect-for-book-edit-is-called-on-main.patch +++ b/patches/server/0579-Ensure-disconnect-for-book-edit-is-called-on-main.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9b2abc64556acf9547e5927847f0a02c4ff66001..fa36a68eb28ab9600cdbfe26a2661f76d4ccb743 100644 +index 5eb67dbeaa553b25d19e24b3bfb5e05aed4e8a65..dbc8ee99c44db2246e3353f14a5c6e04c8d0b826 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1121,7 +1121,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0581-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0581-Use-getChunkIfLoadedImmediately-in-places.patch index 877304dc2a..9b20042b10 100644 --- a/patches/server/0581-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/server/0581-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/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f4b884a7c9e20823e626f7f5604cc4e0b2edd570..e42d40654a2bb66c277daa36ee08b56696b8c6a4 100644 +index 890e5f31d44c7a02f2591e7847378b981a96a363..e0669492427faa3f53bce10b7d933969a3ecf9d8 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -230,7 +230,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0582-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0582-Fix-commands-from-signs-not-firing-command-events.patch index e474e1418c..b86e341359 100644 --- a/patches/server/0582-Fix-commands-from-signs-not-firing-command-events.patch +++ b/patches/server/0582-Fix-commands-from-signs-not-firing-command-events.patch @@ -58,7 +58,7 @@ index 0000000000000000000000000000000000000000..01a2bc1feec808790bb93618ce46adb9 + } +} diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index ddf101fd613c854f77971d97a5b0f9319f21242a..a55a2db66d8c8482c5b4107b21bb82d7e8ff4288 100644 +index 87e272cfb145c37d26b0bf56f97ec784a9bfd98e..bfe8029852385875af4ebe73c63e688f61042021 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java @@ -274,7 +274,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C diff --git a/patches/server/0583-Add-PlayerArmSwingEvent.patch b/patches/server/0583-Add-PlayerArmSwingEvent.patch index 861672a6a2..fc0f3e4ac3 100644 --- a/patches/server/0583-Add-PlayerArmSwingEvent.patch +++ b/patches/server/0583-Add-PlayerArmSwingEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmSwingEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fa36a68eb28ab9600cdbfe26a2661f76d4ccb743..89b4484154d25e8841e462982ca84f5025bfd016 100644 +index dbc8ee99c44db2246e3353f14a5c6e04c8d0b826..779a9d409323445c373a9f07b83de0f386ae82cc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2402,7 +2402,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0584-Fix-kick-event-leave-message-not-being-sent.patch b/patches/server/0584-Fix-kick-event-leave-message-not-being-sent.patch index a40b12dc0b..cfa74fdc4b 100644 --- a/patches/server/0584-Fix-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0584-Fix-kick-event-leave-message-not-being-sent.patch @@ -50,7 +50,7 @@ index b9767aff520d32d4615e3cb9e24a294553c70b97..86af1b4b860a144462d856b4ef1702f7 MinecraftServer minecraftserver = this.server; Connection networkmanager = this.connection; diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 89b4484154d25e8841e462982ca84f5025bfd016..cc45bb947fbd6f2b7a7bc11a2bc66336a7bf3c9e 100644 +index 779a9d409323445c373a9f07b83de0f386ae82cc..e1945778de55a75d483c890b2a59276e55a2a0f9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1884,6 +1884,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0590-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0590-Prevent-AFK-kick-while-watching-end-credits.patch index 3e4506bd49..e216bc6682 100644 --- a/patches/server/0590-Prevent-AFK-kick-while-watching-end-credits.patch +++ b/patches/server/0590-Prevent-AFK-kick-while-watching-end-credits.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent AFK kick while watching end credits diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cc45bb947fbd6f2b7a7bc11a2bc66336a7bf3c9e..0bb6b0b776f80040f901532fcf1052eeaed7bae4 100644 +index e1945778de55a75d483c890b2a59276e55a2a0f9..b908c2125fb3599cfbc227465e98dbaa40f72f9d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -403,7 +403,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0606-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0606-Add-methods-to-find-targets-for-lightning-strikes.patch index 78c8937ef3..8fb3904668 100644 --- a/patches/server/0606-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0606-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add methods to find targets for lightning strikes public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e42d40654a2bb66c277daa36ee08b56696b8c6a4..a2a0bbe77db3bba2da40236346a5700266b61e0c 100644 +index e0669492427faa3f53bce10b7d933969a3ecf9d8..6073817a9fd910fa3744ec910d312093192cbd84 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -763,6 +763,11 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -31,7 +31,7 @@ index e42d40654a2bb66c277daa36ee08b56696b8c6a4..a2a0bbe77db3bba2da40236346a57002 blockposition1 = blockposition1.above(2); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 28c027db9f017c35bfc0407dd1bd46fa685f58fd..8410d9ecc722475fceb248df1855841afd7cffc8 100644 +index a46275f0684437d1c99792ad61889fd047318028..321da9572b896b54ad961e1c7179929b145ae0ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -687,6 +687,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0610-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0610-Add-ItemFactory-getSpawnEgg-API.patch index ece6bb84f9..ee2541a030 100644 --- a/patches/server/0610-Add-ItemFactory-getSpawnEgg-API.patch +++ b/patches/server/0610-Add-ItemFactory-getSpawnEgg-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ItemFactory#getSpawnEgg API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index f9c83ad7558754b571bfa60329a036b5f5220553..992c6a354432023cd93fa654a6a911bee1af335a 100644 +index 943ef44ce17719170b71be0eae75c43426376459..db112344ef6cd6dc5c1fc5c222e23d481d161e73 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -573,4 +573,19 @@ public final class CraftItemFactory implements ItemFactory { +@@ -576,4 +576,19 @@ public final class CraftItemFactory implements ItemFactory { new net.md_5.bungee.api.chat.TextComponent(customName)); } // Paper end - bungee hover events diff --git a/patches/server/0618-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0618-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index bfc14c0720..3bf48e9620 100644 --- a/patches/server/0618-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0618-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -9,7 +9,7 @@ chunk through it. This should also be OK from a leak prevention/ state desync POV because the TE is getting unloaded anyways. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a2a0bbe77db3bba2da40236346a5700266b61e0c..6bcc1c873d0943378a9b065856cbd3de3ad1de7e 100644 +index 6073817a9fd910fa3744ec910d312093192cbd84..5504a0028d62c3fd543f446093dc8becc45d245e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1276,9 +1276,13 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0620-Improve-and-expand-AsyncCatcher.patch b/patches/server/0620-Improve-and-expand-AsyncCatcher.patch index 02bdd5d5fe..f79b8d5c98 100644 --- a/patches/server/0620-Improve-and-expand-AsyncCatcher.patch +++ b/patches/server/0620-Improve-and-expand-AsyncCatcher.patch @@ -17,7 +17,7 @@ Async catch modifications to critical entity state Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0bb6b0b776f80040f901532fcf1052eeaed7bae4..8e01958ddd2a8fd2994cf9f579adaf769381c8b4 100644 +index b908c2125fb3599cfbc227465e98dbaa40f72f9d..9a880774eaa71cef96619ff948ce432c57009fec 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1571,6 +1571,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -166,7 +166,7 @@ index 219062cff8a05c765b092f1525043d9d9a1153ae..1c6e8438219f355274db4e0fa849cdd9 PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason}); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8410d9ecc722475fceb248df1855841afd7cffc8..e3a45690210030be46751aa1704f1d59a3a78f01 100644 +index 321da9572b896b54ad961e1c7179929b145ae0ac..cbad6add9186a151e1994bb3ed0b11d611f6ca7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1756,6 +1756,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0621-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0621-Add-paper-mobcaps-and-paper-playermobcaps.patch index aac684d83f..638d7343ef 100644 --- a/patches/server/0621-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0621-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -294,7 +294,7 @@ index aab59a42af04971b5be4b6295700a1c50e1c964f..382c5a9ad23523b830edc7c81767b13a } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e3a45690210030be46751aa1704f1d59a3a78f01..268ce3e66ce85b1b7cf2378a32bf4fd3f0f4f268 100644 +index cbad6add9186a151e1994bb3ed0b11d611f6ca7f..c7881cdd8447a632cbb406b379c01b540d5d4152 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1714,9 +1714,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0632-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0632-Fix-merchant-inventory-not-closing-on-entity-removal.patch index 1e423953dc..8f3de2fdfc 100644 --- a/patches/server/0632-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0632-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6bcc1c873d0943378a9b065856cbd3de3ad1de7e..d4dc2e3a89b76009bb1ce2c3b03515fcf308efa0 100644 +index 5504a0028d62c3fd543f446093dc8becc45d245e..e7110eda41196c9b162185ae85e511a339ebbd94 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2277,6 +2277,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0634-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0634-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch index 31c8688b0e..f99de650d3 100644 --- a/patches/server/0634-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch +++ b/patches/server/0634-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8e01958ddd2a8fd2994cf9f579adaf769381c8b4..39ba1860b6c0384f04fa9219c976c144cc4027fe 100644 +index 9a880774eaa71cef96619ff948ce432c57009fec..bc7dbc66b5675b21f4aa3a4d1333a3782e3a43dd 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -751,6 +751,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0656-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0656-Allow-delegation-to-vanilla-chunk-gen.patch index 2e0aa3c00e..0348df0879 100644 --- a/patches/server/0656-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0656-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 382c5a9ad23523b830edc7c81767b13a49aca087..85ed4c0775bccf52e5d7d39ec70a315aff9e1c2d 100644 +index 382c5a9ad23523b830edc7c81767b13a49aca087..ce67394c7b4079af1880ee4fdd66186db0348e92 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2483,6 +2483,88 @@ public final class CraftServer implements Server { @@ -13,17 +13,17 @@ index 382c5a9ad23523b830edc7c81767b13a49aca087..85ed4c0775bccf52e5d7d39ec70a315a } + // Paper start - Allow delegation to vanilla chunk gen -+ private static final List VANILLA_GEN_STATUSES = List.of( -+ net.minecraft.world.level.chunk.ChunkStatus.EMPTY, -+ net.minecraft.world.level.chunk.ChunkStatus.STRUCTURE_STARTS, -+ net.minecraft.world.level.chunk.ChunkStatus.STRUCTURE_REFERENCES, -+ net.minecraft.world.level.chunk.ChunkStatus.BIOMES, -+ net.minecraft.world.level.chunk.ChunkStatus.NOISE, -+ net.minecraft.world.level.chunk.ChunkStatus.SURFACE, -+ net.minecraft.world.level.chunk.ChunkStatus.CARVERS, -+ net.minecraft.world.level.chunk.ChunkStatus.FEATURES, -+ net.minecraft.world.level.chunk.ChunkStatus.INITIALIZE_LIGHT, -+ net.minecraft.world.level.chunk.ChunkStatus.LIGHT ++ private static final List VANILLA_GEN_STATUSES = List.of( ++ net.minecraft.world.level.chunk.status.ChunkStatus.EMPTY, ++ net.minecraft.world.level.chunk.status.ChunkStatus.STRUCTURE_STARTS, ++ net.minecraft.world.level.chunk.status.ChunkStatus.STRUCTURE_REFERENCES, ++ net.minecraft.world.level.chunk.status.ChunkStatus.BIOMES, ++ net.minecraft.world.level.chunk.status.ChunkStatus.NOISE, ++ net.minecraft.world.level.chunk.status.ChunkStatus.SURFACE, ++ net.minecraft.world.level.chunk.status.ChunkStatus.CARVERS, ++ net.minecraft.world.level.chunk.status.ChunkStatus.FEATURES, ++ net.minecraft.world.level.chunk.status.ChunkStatus.INITIALIZE_LIGHT, ++ net.minecraft.world.level.chunk.status.ChunkStatus.LIGHT + ); + + @Override @@ -52,7 +52,7 @@ index 382c5a9ad23523b830edc7c81767b13a49aca087..85ed4c0775bccf52e5d7d39ec70a315a + net.minecraft.Util.backgroundExecutor(), + "CraftServer#createVanillaChunkData(worldName='" + world.getName() + "', x='" + x + "', z='" + z + "')" + ); -+ for (final net.minecraft.world.level.chunk.ChunkStatus chunkStatus : VANILLA_GEN_STATUSES) { ++ for (final net.minecraft.world.level.chunk.status.ChunkStatus chunkStatus : VANILLA_GEN_STATUSES) { + final List chunks = Lists.newArrayList(); + final int statusRange = Math.max(1, chunkStatus.getRange()); + @@ -79,8 +79,8 @@ index 382c5a9ad23523b830edc7c81767b13a49aca087..85ed4c0775bccf52e5d7d39ec70a315a + }, + chunks + ).thenAccept(either -> { -+ if (chunkStatus == net.minecraft.world.level.chunk.ChunkStatus.NOISE) { -+ either.left().ifPresent(chunk -> net.minecraft.world.level.levelgen.Heightmap.primeHeightmaps(chunk, net.minecraft.world.level.chunk.ChunkStatus.POST_FEATURES)); ++ if (chunkStatus == net.minecraft.world.level.chunk.status.ChunkStatus.NOISE) { ++ either.left().ifPresent(chunk -> net.minecraft.world.level.levelgen.Heightmap.primeHeightmaps(chunk, net.minecraft.world.level.chunk.status.ChunkStatus.POST_FEATURES)); + } + }).join(); + } diff --git a/patches/server/0670-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0670-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 83c8d06b75..2ea5df5849 100644 --- a/patches/server/0670-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0670-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -18,7 +18,7 @@ index 00a83b766f9e32b6403296901e806b07d4e4818e..3832033003dbf5f5b43b9786b5fd4c96 biomeProvider = gen.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 85ed4c0775bccf52e5d7d39ec70a315aff9e1c2d..6348f452a437c10f8291148e9bd4642b5fb09ec2 100644 +index ce67394c7b4079af1880ee4fdd66186db0348e92..21e17fffd0372bbf144315251493b46b9263ec85 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1275,7 +1275,7 @@ public final class CraftServer implements Server { @@ -31,7 +31,7 @@ index 85ed4c0775bccf52e5d7d39ec70a315aff9e1c2d..6348f452a437c10f8291148e9bd4642b biomeProvider = generator.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 268ce3e66ce85b1b7cf2378a32bf4fd3f0f4f268..5b404c9f923fd4f1822dbb2ff25b24157c0a8fe5 100644 +index c7881cdd8447a632cbb406b379c01b540d5d4152..98d87f29f111029b11409e6f4230e53119bd8711 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -212,6 +212,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0682-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0682-API-for-creating-command-sender-which-forwards-feedb.patch index 3d56f3f0f1..cbe76227dc 100644 --- a/patches/server/0682-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0682-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6348f452a437c10f8291148e9bd4642b5fb09ec2..ab031edcac3865b85637cc9d5b8a939acdc904e4 100644 +index 21e17fffd0372bbf144315251493b46b9263ec85..9d3148a1e426227e1d3d388cee81bd709abd0e81 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2129,6 +2129,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0684-Implement-regenerateChunk.patch b/patches/server/0684-Implement-regenerateChunk.patch index 7efa7c56a4..9067660fe1 100644 --- a/patches/server/0684-Implement-regenerateChunk.patch +++ b/patches/server/0684-Implement-regenerateChunk.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement regenerateChunk Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5b404c9f923fd4f1822dbb2ff25b24157c0a8fe5..2c7b94719fb815025f73e8cf98cb0323b9375923 100644 +index 98d87f29f111029b11409e6f4230e53119bd8711..377582da016ed510d1dfd53805b13456fe04b28f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -151,6 +151,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/patches/server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 3d8f51b269..0335259842 100644 --- a/patches/server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0686-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ab031edcac3865b85637cc9d5b8a939acdc904e4..09f2b0351e4a43ad6bf5a0fa94e092f5343c5eb3 100644 +index 9d3148a1e426227e1d3d388cee81bd709abd0e81..fd3ef107932f28189130e3ca4bd9fe6d22dd6f4a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2306,6 +2306,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0687-Add-GameEvent-tags.patch b/patches/server/0687-Add-GameEvent-tags.patch index 4996ff074c..da0e3bc4be 100644 --- a/patches/server/0687-Add-GameEvent-tags.patch +++ b/patches/server/0687-Add-GameEvent-tags.patch @@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 09f2b0351e4a43ad6bf5a0fa94e092f5343c5eb3..aa386074cf4ea6cc47e591d4611bfb1fbf9644b9 100644 +index fd3ef107932f28189130e3ca4bd9fe6d22dd6f4a..42fcb33478439239e30caee8ffafbd8bee37c5ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2732,6 +2732,15 @@ public final class CraftServer implements Server { diff --git a/patches/server/0693-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0693-Put-world-into-worldlist-before-initing-the-world.patch index 0567c0eb16..4534c3f53f 100644 --- a/patches/server/0693-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0693-Put-world-into-worldlist-before-initing-the-world.patch @@ -23,7 +23,7 @@ index 644f178438863295754c2b72339ce7f9066674b9..ea442883eda28e5673cef9470145d5c4 if (worlddata.getCustomBossEvents() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index aa386074cf4ea6cc47e591d4611bfb1fbf9644b9..489fe1078a954ae7dd7133938bfd338d5fdeea5b 100644 +index 42fcb33478439239e30caee8ffafbd8bee37c5ef..05c5b52a15be83b6b1043cd85872854696d66a4b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1301,10 +1301,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0695-Custom-Potion-Mixes.patch b/patches/server/0695-Custom-Potion-Mixes.patch index 71021d8421..ae39b997e9 100644 --- a/patches/server/0695-Custom-Potion-Mixes.patch +++ b/patches/server/0695-Custom-Potion-Mixes.patch @@ -172,14 +172,14 @@ index 3ebfd564d4bbf00da5919e966f3d047285845640..c1254088fc65fe46101c82cf2629cf02 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 489fe1078a954ae7dd7133938bfd338d5fdeea5b..a7545b824dcf38a7e5e743e639f54d0e4d9b78aa 100644 +index 05c5b52a15be83b6b1043cd85872854696d66a4b..0c8268a6b3079efd3387265dd9e2c0c3e2519b61 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -308,6 +308,7 @@ public final class CraftServer implements Server { private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper public static Exception excessiveVelEx; // Paper - Velocity warnings private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper -+ private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper - Custom Potion Mixes ++ private final org.bukkit.craftbukkit.potion.CraftPotionBrewer potionBrewer = new org.bukkit.craftbukkit.potion.CraftPotionBrewer(); // Paper - Custom Potion Mixes static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/patches/server/0697-Fix-falling-block-spawn-methods.patch b/patches/server/0697-Fix-falling-block-spawn-methods.patch index 13b83e45fa..c79cbcd947 100644 --- a/patches/server/0697-Fix-falling-block-spawn-methods.patch +++ b/patches/server/0697-Fix-falling-block-spawn-methods.patch @@ -11,7 +11,7 @@ Restores the API behavior from previous versions of the server public net.minecraft.world.entity.item.FallingBlockEntity (Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2c7b94719fb815025f73e8cf98cb0323b9375923..4efbda6521f36ceae3b5b32ad0c79fa53b48b5bd 100644 +index 377582da016ed510d1dfd53805b13456fe04b28f..9218a7a69d581c236f6ce798c890419d30327940 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1423,7 +1423,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0702-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0702-Don-t-allow-vehicle-movement-from-players-while-tele.patch index 584747535c..991fbed2fd 100644 --- a/patches/server/0702-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0702-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,7 +7,7 @@ Bring the vehicle move packet behavior in line with the regular player move packet. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 39ba1860b6c0384f04fa9219c976c144cc4027fe..21922416b68d6097c44749fc18fcf1f5634323f4 100644 +index bc7dbc66b5675b21f4aa3a4d1333a3782e3a43dd..2ab8a1082775ea3d00bd54b6089247da9a0d6941 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -490,6 +490,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0705-Implement-enchantWithLevels-API.patch b/patches/server/0705-Implement-enchantWithLevels-API.patch index c1c2db9b8f..fdd91be333 100644 --- a/patches/server/0705-Implement-enchantWithLevels-API.patch +++ b/patches/server/0705-Implement-enchantWithLevels-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement enchantWithLevels API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 992c6a354432023cd93fa654a6a911bee1af335a..4abf2373199654dec1a3780866e1d6c9f0742441 100644 +index db112344ef6cd6dc5c1fc5c222e23d481d161e73..da1b01c6489f96cfbded87e651e1d6df1dd0751a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -588,4 +588,20 @@ public final class CraftItemFactory implements ItemFactory { +@@ -591,4 +591,26 @@ public final class CraftItemFactory implements ItemFactory { return eggItem == null ? null : new net.minecraft.world.item.ItemStack(eggItem).asBukkitMirror(); } // Paper end - old getSpawnEgg API @@ -21,10 +21,16 @@ index 992c6a354432023cd93fa654a6a911bee1af335a..4abf2373199654dec1a3780866e1d6c9 + Preconditions.checkArgument(levels > 0 && levels <= 30, "Argument 'levels' must be in range [1, 30] (attempted " + levels + ")"); + Preconditions.checkArgument(random != null, "Argument 'random' must not be null"); + final net.minecraft.world.item.ItemStack internalStack = CraftItemStack.asNMSCopy(itemStack); -+ if (internalStack.getTag() != null) { -+ internalStack.getTag().remove(net.minecraft.world.item.ItemStack.TAG_ENCH); ++ if (internalStack.isEnchanted()) { ++ internalStack.applyComponents(net.minecraft.core.component.DataComponentPatch.builder().remove(net.minecraft.core.component.DataComponents.ENCHANTMENTS).build()); + } -+ final net.minecraft.world.item.ItemStack enchanted = net.minecraft.world.item.enchantment.EnchantmentHelper.enchantItem(new org.bukkit.craftbukkit.util.RandomSourceWrapper(random), internalStack, levels, allowTreasure); ++ final net.minecraft.world.item.ItemStack enchanted = net.minecraft.world.item.enchantment.EnchantmentHelper.enchantItem( ++ MinecraftServer.getServer().getWorldData().enabledFeatures(), ++ new org.bukkit.craftbukkit.util.RandomSourceWrapper(random), ++ internalStack, ++ levels, ++ allowTreasure ++ ); + return CraftItemStack.asCraftMirror(enchanted); + } + // Paper end - enchantWithLevels API diff --git a/patches/server/0706-Fix-saving-in-unloadWorld.patch b/patches/server/0706-Fix-saving-in-unloadWorld.patch index d1ed5fc656..26660a459f 100644 --- a/patches/server/0706-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0706-Fix-saving-in-unloadWorld.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a7545b824dcf38a7e5e743e639f54d0e4d9b78aa..27072040887df4ff117179cfa5e7a39ef27c7501 100644 +index 0c8268a6b3079efd3387265dd9e2c0c3e2519b61..c1e558c4c68d098f2e6e32c08044b092d6dda4cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1349,7 +1349,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0709-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0709-Fix-new-block-data-for-EntityChangeBlockEvent.patch index bcb92f2018..d811493fc4 100644 --- a/patches/server/0709-Fix-new-block-data-for-EntityChangeBlockEvent.patch +++ b/patches/server/0709-Fix-new-block-data-for-EntityChangeBlockEvent.patch @@ -170,7 +170,7 @@ index ec9190abe3edf7c3845156bb967dddf6ae7c30ff..95cb7492ac691a8e8aa9894f701b802a } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java -index 58b8c3cc579a1d34af26c44d6a7413bd5cc9e4e7..aef1638fe0b41eb04a55671ac1163753e9a8e70f 100644 +index ff872a91effaed7394848fe5c1ab4d2bbac0b5fc..a5e1813ba4fee55f469d5c4884124fccecd908d2 100644 --- a/src/main/java/net/minecraft/world/level/block/TntBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java @@ -160,7 +160,7 @@ public class TntBlock extends Block { diff --git a/patches/server/0715-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0715-Prevent-tile-entity-copies-loading-chunks.patch index 4002fa17f8..646b6cf0ad 100644 --- a/patches/server/0715-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0715-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 21922416b68d6097c44749fc18fcf1f5634323f4..ae440c8b7597d08ae62dfe301b20886f82c720ca 100644 +index 2ab8a1082775ea3d00bd54b6089247da9a0d6941..bd39281718199e3ce50acaec2d5f3887ab757d95 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3195,7 +3195,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0718-WorldCreator-keepSpawnLoaded.patch b/patches/server/0718-WorldCreator-keepSpawnLoaded.patch index 94686907f3..dcf6ccd945 100644 --- a/patches/server/0718-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0718-WorldCreator-keepSpawnLoaded.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 27072040887df4ff117179cfa5e7a39ef27c7501..70de655fd319863260bbfb0316fad892ba2f4af0 100644 +index c1e558c4c68d098f2e6e32c08044b092d6dda4cc..c95818aa6227985341236f2e735c46ea8742896b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1308,6 +1308,14 @@ public final class CraftServer implements Server { diff --git a/patches/server/0725-Don-t-tick-markers.patch b/patches/server/0725-Don-t-tick-markers.patch index 9b56cbe7ff..6d3e5d5286 100644 --- a/patches/server/0725-Don-t-tick-markers.patch +++ b/patches/server/0725-Don-t-tick-markers.patch @@ -23,7 +23,7 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5e5a018433414af76eaa1e781f61612d } }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d4dc2e3a89b76009bb1ce2c3b03515fcf308efa0..8aa6044a60e0148d2841e7618889fbefdc8b8f60 100644 +index e7110eda41196c9b162185ae85e511a339ebbd94..bac72f9444de0414bcec883209fd9d414856342b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2192,6 +2192,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0733-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0733-Throw-exception-on-world-create-while-being-ticked.patch index e241f9d3fc..1d79ec56fe 100644 --- a/patches/server/0733-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0733-Throw-exception-on-world-create-while-being-ticked.patch @@ -45,7 +45,7 @@ index 79f7e0fb2f1aa6af441c6e09d2c443d7d4bb47ef..00457548d43e1d2143d1f6027593a117 this.profiler.popPush("connection"); MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 70de655fd319863260bbfb0316fad892ba2f4af0..199cc5ff46a41cc15467444b3900d171803666bd 100644 +index c95818aa6227985341236f2e735c46ea8742896b..f4c03148751f563ad3e1bfdc06266509f8c92df8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -886,6 +886,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0739-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0739-Don-t-broadcast-messages-to-command-blocks.patch index 447d041847..6a79e03714 100644 --- a/patches/server/0739-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0739-Don-t-broadcast-messages-to-command-blocks.patch @@ -20,7 +20,7 @@ index e40069d937de5fd00741ae6873abeecc46b93732..552f7ab11dc09fa69034f009235cb224 Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 199cc5ff46a41cc15467444b3900d171803666bd..d2a02210553363fb87882904abcfbe2ccd95fa78 100644 +index f4c03148751f563ad3e1bfdc06266509f8c92df8..2bbb40a5c7a61fb51dfaea320724bdd60cf41d64 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1899,7 +1899,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0740-Prevent-empty-items-from-being-added-to-world.patch b/patches/server/0740-Prevent-empty-items-from-being-added-to-world.patch index 91b2222e8b..86b07410e8 100644 --- a/patches/server/0740-Prevent-empty-items-from-being-added-to-world.patch +++ b/patches/server/0740-Prevent-empty-items-from-being-added-to-world.patch @@ -7,7 +7,7 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca Just simply prevent them from being added to the world instead. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8aa6044a60e0148d2841e7618889fbefdc8b8f60..90500b6a5b3612c85a06660fe67e89351d4c0fd1 100644 +index bac72f9444de0414bcec883209fd9d414856342b..e701a1e024f0702c0c2232f5165eeeebb6f081bc 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1237,6 +1237,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0746-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0746-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index e706beffcd..ffeb0f7c6c 100644 --- a/patches/server/0746-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0746-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ae440c8b7597d08ae62dfe301b20886f82c720ca..31813e06e626455d72915683c7aaa7782b9b792d 100644 +index bd39281718199e3ce50acaec2d5f3887ab757d95..6111d7d3bda2626ea6e953d49351af25f8d3e556 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2373,7 +2373,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0747-More-Teleport-API.patch b/patches/server/0747-More-Teleport-API.patch index cf2a188ba2..5673811ca1 100644 --- a/patches/server/0747-More-Teleport-API.patch +++ b/patches/server/0747-More-Teleport-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More Teleport API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 31813e06e626455d72915683c7aaa7782b9b792d..3e641c26695cb1c40a6bde64ac090c4899538e80 100644 +index 6111d7d3bda2626ea6e953d49351af25f8d3e556..78b38aee5ab62597bd679b8c1d981d30a7a4a2bf 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1559,11 +1559,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0750-Send-block-entities-after-destroy-prediction.patch b/patches/server/0750-Send-block-entities-after-destroy-prediction.patch index f11ba32538..97d2264363 100644 --- a/patches/server/0750-Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/0750-Send-block-entities-after-destroy-prediction.patch @@ -57,7 +57,7 @@ index d8c5f8e584976a97bd909bfa20023993ab776952..77e78808171daac78502ef3fcc70f035 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3e641c26695cb1c40a6bde64ac090c4899538e80..d20baa57c5367861fb5b3b6ea746a6391b6115cc 100644 +index 78b38aee5ab62597bd679b8c1d981d30a7a4a2bf..c03ae6af07e611d963e60d4ed908e36fb0629621 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1706,8 +1706,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0751-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0751-Warn-on-plugins-accessing-faraway-chunks.patch index 1161fdc26e..6daaef9980 100644 --- a/patches/server/0751-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0751-Warn-on-plugins-accessing-faraway-chunks.patch @@ -18,7 +18,7 @@ index 12a104fd9aa6c02a4e983f9651e07804a8df606e..37c81d6c95efaab12a05075e6397ab25 private static boolean isOutsideSpawnableHeight(int y) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4efbda6521f36ceae3b5b32ad0c79fa53b48b5bd..6231bc770ea6eb6aba47abbc74b6380fd9360d8c 100644 +index 9218a7a69d581c236f6ce798c890419d30327940..334025d77ec9ff3f2afa8b69e9b62b6ed2415e67 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -319,9 +319,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0756-Block-Ticking-API.patch b/patches/server/0756-Block-Ticking-API.patch index 5a45bad712..f1b51ee5b1 100644 --- a/patches/server/0756-Block-Ticking-API.patch +++ b/patches/server/0756-Block-Ticking-API.patch @@ -46,7 +46,7 @@ index 6d10396347b69d9243ab902ecc68ede93fa17b7d..af219df5267589300f0ad1d30fa5c81a // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 48e8d0cc267706d3d8e29333d7fd6b89fdd88553..841b6cabd319229bff9f830c2fe4de102ad74906 100644 +index 3fe60f5ee38ecb704194a8c2dd6e40c5bb57d9cc..784daa5e6c9a940966a32b6251a810e6f9664936 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -736,4 +736,11 @@ public class CraftBlockData implements BlockData { diff --git a/patches/server/0757-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0757-Add-Velocity-IP-Forwarding-Support.patch index 31c9bd57a6..a3685dcb9a 100644 --- a/patches/server/0757-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0757-Add-Velocity-IP-Forwarding-Support.patch @@ -228,7 +228,7 @@ index 49627a02cb15e94e7c3ddfe65aa663d982a34408..21d97c2b533a6528dd73c4e514d49273 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d2a02210553363fb87882904abcfbe2ccd95fa78..d5575fcc1458fe3083821792f09f9ed53c12e825 100644 +index 2bbb40a5c7a61fb51dfaea320724bdd60cf41d64..1e6e27eff630c70775d9654181933c70e61b5c29 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -815,7 +815,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0772-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0772-Fix-a-bunch-of-vanilla-bugs.patch index 74462d10f9..4b79f3dd46 100644 --- a/patches/server/0772-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0772-Fix-a-bunch-of-vanilla-bugs.patch @@ -117,7 +117,7 @@ index 3532febc8e34c8436a69a4c4b472b1776f21ee48..de19a5ea96fa38621513e970e04d1535 return this.anyPlayerCloseEnoughForSpawning(pos, false); } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 90500b6a5b3612c85a06660fe67e89351d4c0fd1..78fc8689438d90eb792f7836f6b2ec03be0b407c 100644 +index e701a1e024f0702c0c2232f5165eeeebb6f081bc..ca1f19e5c76cf431e7b05111c85736acaf945e66 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -776,7 +776,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch index e9e2db2db1..e9a27e63bd 100644 --- a/patches/server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch +++ b/patches/server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 78fc8689438d90eb792f7836f6b2ec03be0b407c..79d91a4e54a20c0b3681eaeb7245acda0ab5bbc3 100644 +index ca1f19e5c76cf431e7b05111c85736acaf945e66..9f5a0d3ddf8df7e873dc73cf3eaccf243ef9553c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2216,7 +2216,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0795-check-global-player-list-where-appropriate.patch b/patches/server/0795-check-global-player-list-where-appropriate.patch index 19396a1d70..0b8c77538c 100644 --- a/patches/server/0795-check-global-player-list-where-appropriate.patch +++ b/patches/server/0795-check-global-player-list-where-appropriate.patch @@ -7,7 +7,7 @@ Makes certain entities check all players when searching for a player instead of just checking players in their world. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 79d91a4e54a20c0b3681eaeb7245acda0ab5bbc3..2eda55a09632a6c5668600251a8c491c501fbe2b 100644 +index 9f5a0d3ddf8df7e873dc73cf3eaccf243ef9553c..e7597b1a9e5f571d7f42ddd508bc63588b420723 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2332,4 +2332,12 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0797-ItemStack-damage-API.patch b/patches/server/0797-ItemStack-damage-API.patch index bddda0f769..10e5c51478 100644 --- a/patches/server/0797-ItemStack-damage-API.patch +++ b/patches/server/0797-ItemStack-damage-API.patch @@ -11,10 +11,10 @@ the logic associated with damaging them public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a188aefec543352b4e0d9ce03103ac842db61fc8..48505c6df9d5fdbd426127e306926fae9824d0a9 100644 +index a188aefec543352b4e0d9ce03103ac842db61fc8..e03cd68d6636dbd35249c0535072f22e3bd0d1ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1114,4 +1114,52 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1114,4 +1114,48 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().knockback(strength, directionX, directionZ); }; // Paper end - knockback API @@ -59,11 +59,7 @@ index a188aefec543352b4e0d9ce03103ac842db61fc8..48505c6df9d5fdbd426127e306926fae + } + + private void damageItemStack0(final net.minecraft.world.item.ItemStack nmsStack, final int amount, final net.minecraft.world.entity.EquipmentSlot slot) { -+ nmsStack.hurtAndBreak(amount, this.getHandle(), livingEntity -> { -+ if (slot != null) { -+ livingEntity.broadcastBreakEvent(slot); -+ } -+ }); ++ nmsStack.hurtAndBreak(amount, this.getHandle(), slot); + } + // Paper end - ItemStack damage API } diff --git a/patches/server/0798-Friction-API.patch b/patches/server/0798-Friction-API.patch index ef7cbe4bae..4a83941b0f 100644 --- a/patches/server/0798-Friction-API.patch +++ b/patches/server/0798-Friction-API.patch @@ -133,11 +133,11 @@ index 1a291dd8a287db30e71dcb315599fc4b038764c4..30d62ee4d5cd2ddacb8783b5bbbf475d public int getHealth() { return this.getHandle().health; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 48505c6df9d5fdbd426127e306926fae9824d0a9..51e9b9f7460ec4f8b14d570356026d433351806d 100644 +index e03cd68d6636dbd35249c0535072f22e3bd0d1ab..e9172aa5e3ff3ae0a507dcc059468416b9c475f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1162,4 +1162,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - }); +@@ -1158,4 +1158,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + nmsStack.hurtAndBreak(amount, this.getHandle(), slot); } // Paper end - ItemStack damage API + diff --git a/patches/server/0810-Improve-logging-and-errors.patch b/patches/server/0810-Improve-logging-and-errors.patch index e7e871ed2c..5d745cbff1 100644 --- a/patches/server/0810-Improve-logging-and-errors.patch +++ b/patches/server/0810-Improve-logging-and-errors.patch @@ -52,7 +52,7 @@ index fdff82ed5dbf5176d470b9b6c41acfe6b98c7039..00679b76715fde4b90a999fd11cca40d } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d20baa57c5367861fb5b3b6ea746a6391b6115cc..c9b4960d9818b71ca2af5e2e23755545ca7da55a 100644 +index c03ae6af07e611d963e60d4ed908e36fb0629621..672216f003fb82f8b77aad759a61e96d65e9fb9a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3393,7 +3393,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0813-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0813-Add-missing-SpigotConfig-logCommands-check.patch index 6a58073cea..2281ffc558 100644 --- a/patches/server/0813-Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/0813-Add-missing-SpigotConfig-logCommands-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c9b4960d9818b71ca2af5e2e23755545ca7da55a..6e6024d9c397894903130a4b91a621ae1844a4b5 100644 +index 672216f003fb82f8b77aad759a61e96d65e9fb9a..d23b96ba2db06e6d104e5c30aa9d38dfd552f304 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2087,7 +2087,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0819-Use-single-player-info-update-packet-on-join.patch b/patches/server/0819-Use-single-player-info-update-packet-on-join.patch index cd6bae445b..be75778180 100644 --- a/patches/server/0819-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0819-Use-single-player-info-update-packet-on-join.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use single player info update packet on join diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6e6024d9c397894903130a4b91a621ae1844a4b5..c3beef7d81e43466d99dbc6a42150a4ae9fa7f54 100644 +index d23b96ba2db06e6d104e5c30aa9d38dfd552f304..59853da5b728f98bf8ef412f4214205ec87b4c2f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3429,7 +3429,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0824-Add-Entity-Body-Yaw-API.patch b/patches/server/0824-Add-Entity-Body-Yaw-API.patch index e3035f51a5..ff77ac634a 100644 --- a/patches/server/0824-Add-Entity-Body-Yaw-API.patch +++ b/patches/server/0824-Add-Entity-Body-Yaw-API.patch @@ -43,10 +43,10 @@ index 365281dfc0308c5db0c72b56208d9b87be0e955e..991b94ff1186b1071a94b2662873dc07 @Override public boolean isInvisible() { // Paper - moved up from LivingEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 51e9b9f7460ec4f8b14d570356026d433351806d..4f31bf6f51a72b010b850e1e62a06b455eac906c 100644 +index e9172aa5e3ff3ae0a507dcc059468416b9c475f6..9440a10f060fce2f7dd78b9d99605022c7b7f000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1176,4 +1176,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1172,4 +1172,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().frictionState = state; } // Paper end - friction API diff --git a/patches/server/0836-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0836-Treat-sequence-violations-like-they-should-be.patch index 78ba284e63..5509efdf09 100644 --- a/patches/server/0836-Treat-sequence-violations-like-they-should-be.patch +++ b/patches/server/0836-Treat-sequence-violations-like-they-should-be.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Treat sequence violations like they should be diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c3beef7d81e43466d99dbc6a42150a4ae9fa7f54..e351ed77fbe1ea9de2dd5600d61524eb39c17899 100644 +index 59853da5b728f98bf8ef412f4214205ec87b4c2f..5b6ca40052e49e2955f1d3021238f0da9120dcf4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1966,6 +1966,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0838-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0838-Prevent-causing-expired-keys-from-impacting-new-join.patch index 6a02dff906..f50dad6450 100644 --- a/patches/server/0838-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0838-Prevent-causing-expired-keys-from-impacting-new-join.patch @@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593 UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())), UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())), diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e351ed77fbe1ea9de2dd5600d61524eb39c17899..1a0245c798107d2d4239e07262f5cc89490a3b08 100644 +index 5b6ca40052e49e2955f1d3021238f0da9120dcf4..a99be8bb56197067a7fdc6a8dc1ac9dfe25183e5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0839-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0839-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch index ac0b41b78d..189af599d9 100644 --- a/patches/server/0839-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch +++ b/patches/server/0839-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2eda55a09632a6c5668600251a8c491c501fbe2b..80c927c906d1b6119c1b32b8982d879fbbd4d257 100644 +index e7597b1a9e5f571d7f42ddd508bc63588b420723..edbbfd4b0cc7701a303e7f3b2bab76a531b3357c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1374,6 +1374,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0853-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0853-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch index a2763420af..93611a5d6c 100644 --- a/patches/server/0853-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch +++ b/patches/server/0853-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d5575fcc1458fe3083821792f09f9ed53c12e825..29a11dc69b64ddc6022812757b2839931e271ac2 100644 +index 1e6e27eff630c70775d9654181933c70e61b5c29..f7ec95f30700bb1a72c0ca75674908dd2752e82d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -354,7 +354,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0856-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0856-Add-method-to-remove-all-active-potion-effects.patch index cf3fcf9f02..519d993cb4 100644 --- a/patches/server/0856-Add-method-to-remove-all-active-potion-effects.patch +++ b/patches/server/0856-Add-method-to-remove-all-active-potion-effects.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add method to remove all active potion effects diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 4f31bf6f51a72b010b850e1e62a06b455eac906c..eca55d45e1529fffbfcf5d6b8fd23935385e8bcd 100644 +index 9440a10f060fce2f7dd78b9d99605022c7b7f000..22dabf38945c5ee2b5b66cf81e62a83fbca20b9e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -555,6 +555,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/server/0865-Add-Sign-getInteractableSideFor.patch b/patches/server/0865-Add-Sign-getInteractableSideFor.patch index a837a8e765..2833829ce4 100644 --- a/patches/server/0865-Add-Sign-getInteractableSideFor.patch +++ b/patches/server/0865-Add-Sign-getInteractableSideFor.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Sign#getInteractableSideFor diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index a55a2db66d8c8482c5b4107b21bb82d7e8ff4288..749b24cdc0cc2f04fe7fa29da7ea2ffd4ee153e5 100644 +index bfe8029852385875af4ebe73c63e688f61042021..a28be7a332659be655f419d969e0c64e659b6c21 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java @@ -68,12 +68,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C diff --git a/patches/server/0866-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0866-fix-item-meta-for-tadpole-buckets.patch index 704f3ce641..178a11c942 100644 --- a/patches/server/0866-fix-item-meta-for-tadpole-buckets.patch +++ b/patches/server/0866-fix-item-meta-for-tadpole-buckets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] fix item meta for tadpole buckets diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 4abf2373199654dec1a3780866e1d6c9f0742441..3cd23b8aadd82d1f1cbc791969f76d33c0422b76 100644 +index da1b01c6489f96cfbded87e651e1d6df1dd0751a..c7533d6c512fd61ca77c1e07f844e0dd47a5893e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -364,6 +364,7 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/patches/server/0870-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0870-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch index 0a756f54ae..32b71969c8 100644 --- a/patches/server/0870-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch +++ b/patches/server/0870-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch @@ -19,7 +19,7 @@ index 63189d6325173a42b619907b44a426848fbc6988..0854e9b7ee2e6b23b6c1ee6a324a5a25 @Override diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index d5d27b0d352ca3fd57a26605cb35c499e88b57fc..f4cdb97ed6c0850da980760c0c2df69480485940 100644 +index d5d27b0d352ca3fd57a26605cb35c499e88b57fc..c72b6ea5530e54fc373c701028e1c147cea34b59 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java @@ -120,7 +120,7 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -27,7 +27,7 @@ index d5d27b0d352ca3fd57a26605cb35c499e88b57fc..f4cdb97ed6c0850da980760c0c2df694 } - WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, blockposition2, MobSpawnType.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit -+ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, null, trader -> trader.setDespawnDelay(48000), blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit // Paper - set despawnTimer before spawn events called ++ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, trader -> trader.setDespawnDelay(48000), blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit // Paper - set despawnTimer before spawn events called if (entityvillagertrader != null) { for (int i = 0; i < 2; ++i) { diff --git a/patches/server/0874-Implement-PlayerFailMoveEvent.patch b/patches/server/0874-Implement-PlayerFailMoveEvent.patch index aa30ea473d..504f143bae 100644 --- a/patches/server/0874-Implement-PlayerFailMoveEvent.patch +++ b/patches/server/0874-Implement-PlayerFailMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1a0245c798107d2d4239e07262f5cc89490a3b08..8085e59bf16d3a5c85bd9d328126f226c026f163 100644 +index a99be8bb56197067a7fdc6a8dc1ac9dfe25183e5..46ad0471116267264dfc7c0dde0aee0676a0a334 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1272,8 +1272,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0875-Folia-scheduler-and-owned-region-API.patch b/patches/server/0875-Folia-scheduler-and-owned-region-API.patch index 4b4c8cc929..b2dfaf8d29 100644 --- a/patches/server/0875-Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/0875-Folia-scheduler-and-owned-region-API.patch @@ -1251,12 +1251,12 @@ index 16f36d1bfe6458f9aa935cdc63066c082bc83f8e..638aeef75dc5f7ab8b8e050118a7c709 public void setLevelCallback(EntityInLevelCallback changeListener) { this.levelCallback = changeListener; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 29a11dc69b64ddc6022812757b2839931e271ac2..233dc26b6698887e5b2ab179a67364eca389ed86 100644 +index f7ec95f30700bb1a72c0ca75674908dd2752e82d..8c3348b1265b16d159e19a48c4e2ee69a6523d72 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -310,6 +310,76 @@ public final class CraftServer implements Server { private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper - private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper - Custom Potion Mixes + private final org.bukkit.craftbukkit.potion.CraftPotionBrewer potionBrewer = new org.bukkit.craftbukkit.potion.CraftPotionBrewer(); // Paper - Custom Potion Mixes + // Paper start - Folia region threading API + private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler(); diff --git a/patches/server/0877-API-for-updating-recipes-on-clients.patch b/patches/server/0877-API-for-updating-recipes-on-clients.patch index 86521acbc6..7c780ca264 100644 --- a/patches/server/0877-API-for-updating-recipes-on-clients.patch +++ b/patches/server/0877-API-for-updating-recipes-on-clients.patch @@ -39,7 +39,7 @@ index b00da578cb4ba037a540584738b3f866acfa9f88..2f62af670441d422133b18d00d9e5e5e Iterator iterator1 = this.players.iterator(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 233dc26b6698887e5b2ab179a67364eca389ed86..810ffd7cd1a8a7facc63e10e9eb5fed0504737e3 100644 +index 8c3348b1265b16d159e19a48c4e2ee69a6523d72..5485c8d60db7db6eec2da49470230bba7ce4b766 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1142,6 +1142,18 @@ public final class CraftServer implements Server { diff --git a/patches/server/0882-Use-correct-seed-on-api-world-load.patch b/patches/server/0882-Use-correct-seed-on-api-world-load.patch index fa3c90d19c..40d7ca6f2e 100644 --- a/patches/server/0882-Use-correct-seed-on-api-world-load.patch +++ b/patches/server/0882-Use-correct-seed-on-api-world-load.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use correct seed on api world load diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 810ffd7cd1a8a7facc63e10e9eb5fed0504737e3..0daa352795a6533289370388c9c75c98c82396ca 100644 +index 5485c8d60db7db6eec2da49470230bba7ce4b766..c0fa5bb020ba5fa2a6fce98ec652eadb42237918 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1364,7 +1364,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0886-Bandaid-fix-for-Effect.patch b/patches/server/0886-Bandaid-fix-for-Effect.patch index 84a9cdb7de..14abf0354b 100644 --- a/patches/server/0886-Bandaid-fix-for-Effect.patch +++ b/patches/server/0886-Bandaid-fix-for-Effect.patch @@ -52,7 +52,7 @@ index 71733f918ed84b9879ac1b142ef6205c5e768a9c..7ee13c0a0cd12979c7f8cc2e403baf93 case COMPOSTER_FILL_ATTEMPT: datavalue = ((Boolean) data) ? 1 : 0; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6231bc770ea6eb6aba47abbc74b6380fd9360d8c..81e5768f556628f3f37dc8091193c0a1b853f1da 100644 +index 334025d77ec9ff3f2afa8b69e9b62b6ed2415e67..fa0e61503b35c227ad1216cbde3312942f04ae18 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1400,7 +1400,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0889-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/0889-Deprecate-and-replace-methods-with-old-StructureType.patch index 615e77dc22..6d41ef03ea 100644 --- a/patches/server/0889-Deprecate-and-replace-methods-with-old-StructureType.patch +++ b/patches/server/0889-Deprecate-and-replace-methods-with-old-StructureType.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0daa352795a6533289370388c9c75c98c82396ca..ca4cce36d462567f9fbab53dd904cad6db382f72 100644 +index c0fa5bb020ba5fa2a6fce98ec652eadb42237918..2f721887c6b7a212e441d61ef37c1f0da8c2681e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1977,6 +1977,11 @@ public final class CraftServer implements Server { @@ -44,7 +44,7 @@ index 0daa352795a6533289370388c9c75c98c82396ca..ca4cce36d462567f9fbab53dd904cad6 + net.minecraft.world.item.ItemStack stack = MapItem.create(worldServer, structurePosition.getX(), structurePosition.getZ(), MapView.Scale.NORMAL.getValue(), true, true); + MapItem.renderBiomePreviewMap(worldServer, stack); + // "+" map ID taken from VillagerTrades$TreasureMapForEmeralds -+ MapItem.getSavedData(stack, worldServer).addTargetDecoration(stack, structurePosition, "+", MapDecoration.Type.byIcon(mapIcon.getValue())); ++ MapItem.getSavedData(stack, worldServer).addTargetDecoration(stack, structurePosition, "+", CraftMapCursor.CraftType.bukkitToMinecraftHolder(mapIcon)); + + return CraftItemStack.asBukkitCopy(stack); + } diff --git a/patches/server/0890-Don-t-tab-complete-namespaced-commands-if-send-names.patch b/patches/server/0890-Don-t-tab-complete-namespaced-commands-if-send-names.patch index c5818504dc..7969dabce2 100644 --- a/patches/server/0890-Don-t-tab-complete-namespaced-commands-if-send-names.patch +++ b/patches/server/0890-Don-t-tab-complete-namespaced-commands-if-send-names.patch @@ -11,7 +11,7 @@ This patch prevents server from sending namespaced commands when player requests tab-complete only commands. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8085e59bf16d3a5c85bd9d328126f226c026f163..b88d6230172311d92844a9621f2eb3be644ac2aa 100644 +index 46ad0471116267264dfc7c0dde0aee0676a0a334..37268ba38f7c2e4cbc731227f82d55004da27ae6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -823,6 +823,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0895-Configurable-Region-Compression-Format.patch b/patches/server/0895-Configurable-Region-Compression-Format.patch index b3f767d905..64a52a4ea2 100644 --- a/patches/server/0895-Configurable-Region-Compression-Format.patch +++ b/patches/server/0895-Configurable-Region-Compression-Format.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable Region Compression Format diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index f1237f6fd6414900ffbad0caee31aa83310eeef4..e956bca0d06382b8dd63453a6eb111deae68b62e 100644 +index f1237f6fd6414900ffbad0caee31aa83310eeef4..e858436bcf1b234d4bc6e6a117f5224d5c2d9f90 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -50,7 +50,7 @@ public class RegionFile implements AutoCloseable { @@ -13,7 +13,7 @@ index f1237f6fd6414900ffbad0caee31aa83310eeef4..e956bca0d06382b8dd63453a6eb111de public RegionFile(RegionStorageInfo storageKey, Path directory, Path path, boolean dsync) throws IOException { - this(storageKey, directory, path, RegionFileVersion.getSelected(), dsync); -+ this(file, directory, RegionFileVersion.getCompressionFormat(), dsync); // Paper - Configurable region compression format ++ this(storageKey, directory, path, RegionFileVersion.getCompressionFormat(), dsync); // Paper - Configurable region compression format } public RegionFile(RegionStorageInfo storageKey, Path path, Path directory, RegionFileVersion compressionFormat, boolean dsync) throws IOException { diff --git a/patches/server/0900-Add-PlayerPickItemEvent.patch b/patches/server/0900-Add-PlayerPickItemEvent.patch index 8e18bf4d9b..014619f876 100644 --- a/patches/server/0900-Add-PlayerPickItemEvent.patch +++ b/patches/server/0900-Add-PlayerPickItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerPickItemEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b88d6230172311d92844a9621f2eb3be644ac2aa..88baa1235210553248a7fec765bd5ad660ad5295 100644 +index 37268ba38f7c2e4cbc731227f82d55004da27ae6..533cba358d5c3ab396002b7c3a68c4ea3c75e842 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -938,8 +938,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0910-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/0910-Add-slot-sanity-checks-in-container-clicks.patch index cb7ca8285f..0e40777c77 100644 --- a/patches/server/0910-Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/0910-Add-slot-sanity-checks-in-container-clicks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add slot sanity checks in container clicks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 88baa1235210553248a7fec765bd5ad660ad5295..f03cef6fffddcf3aea30c2c9033046c0b1f42aa5 100644 +index 533cba358d5c3ab396002b7c3a68c4ea3c75e842..43aa78291cc88de0060dc8ed7ff09b7e2628e294 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2978,6 +2978,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0921-Fix-missing-map-initialize-event-call.patch b/patches/server/0921-Fix-missing-map-initialize-event-call.patch index f190f7aa20..b204963c68 100644 --- a/patches/server/0921-Fix-missing-map-initialize-event-call.patch +++ b/patches/server/0921-Fix-missing-map-initialize-event-call.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Fix missing map initialize event call public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 80c927c906d1b6119c1b32b8982d879fbbd4d257..7662bcb0e622acadb31b78a670807149779395d9 100644 +index edbbfd4b0cc7701a303e7f3b2bab76a531b3357c..5e515cdf897de00284ac9f345a3496986146dee9 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1664,13 +1664,24 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0929-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/server/0929-Add-API-to-get-the-collision-shape-of-a-block-before.patch index e2e767fdfe..ac06d6fe4b 100644 --- a/patches/server/0929-Add-API-to-get-the-collision-shape-of-a-block-before.patch +++ b/patches/server/0929-Add-API-to-get-the-collision-shape-of-a-block-before.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add API to get the collision shape of a block before it's diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 841b6cabd319229bff9f830c2fe4de102ad74906..df1ae4a1c0c3bf7bfb3a83aa175ba237ccf2ab77 100644 +index 784daa5e6c9a940966a32b6251a810e6f9664936..d6c4ddd3a4a57c92380672336aa1146810cf892b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -679,6 +679,20 @@ public class CraftBlockData implements BlockData { diff --git a/patches/server/0930-Add-predicate-for-blocks-when-raytracing.patch b/patches/server/0930-Add-predicate-for-blocks-when-raytracing.patch index 56057f1ee2..58ba9e469b 100644 --- a/patches/server/0930-Add-predicate-for-blocks-when-raytracing.patch +++ b/patches/server/0930-Add-predicate-for-blocks-when-raytracing.patch @@ -47,7 +47,7 @@ index c978f3b2d42f512e982f289e76c2422e41b7eec6..bb8e962e63c7a2d931f9bd7f7c002aa3 Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 81e5768f556628f3f37dc8091193c0a1b853f1da..eb429b4f77f2f8efb6d2b1fc6a8a07690f0a320c 100644 +index fa0e61503b35c227ad1216cbde3312942f04ae18..e9ab753680cc1ef3f935200ca4a13fc7b8eb88ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1134,9 +1134,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0934-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0934-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch index 81f523b2fc..68f90abae7 100644 --- a/patches/server/0934-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch +++ b/patches/server/0934-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch @@ -45,7 +45,7 @@ index 0471d9c85af02133f99cca4e181b83b58a3f1abc..4f701788bd21b61cad251a3a88f9bc41 BlockState iblockdata = BaseFireBlock.getState(this.level(), blockposition); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index eb429b4f77f2f8efb6d2b1fc6a8a07690f0a320c..d50cd69b3c26605852a8b01efe768abfc43728b4 100644 +index e9ab753680cc1ef3f935200ca4a13fc7b8eb88ef..8bcac6699fdafaca0c077efe85ef8319bba63621 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -766,7 +766,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0940-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0940-Don-t-fire-sync-events-during-worldgen.patch index a0141d97ee..45110cd44a 100644 --- a/patches/server/0940-Don-t-fire-sync-events-during-worldgen.patch +++ b/patches/server/0940-Don-t-fire-sync-events-during-worldgen.patch @@ -19,7 +19,7 @@ where generation happened directly to a ServerLevel and the entity still has the flag set. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 7662bcb0e622acadb31b78a670807149779395d9..e7339dbd6a42b67eb65260200c5eba89c626a298 100644 +index 5e515cdf897de00284ac9f345a3496986146dee9..f2d7c9b56fb1ec80e74e23abe2635f8979fdaae6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1226,6 +1226,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0941-Add-Structure-check-API.patch b/patches/server/0941-Add-Structure-check-API.patch index a1ff274d21..970b7900ce 100644 --- a/patches/server/0941-Add-Structure-check-API.patch +++ b/patches/server/0941-Add-Structure-check-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Structure check API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d50cd69b3c26605852a8b01efe768abfc43728b4..9be7221d24f7036e2fe76bbea2c7585cc75f9854 100644 +index 8bcac6699fdafaca0c077efe85ef8319bba63621..ecd97223cdabe92dee0d43f8e02f2b084d6f981d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -237,6 +237,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0949-Add-drops-to-shear-events.patch b/patches/server/0949-Add-drops-to-shear-events.patch index c216d7236e..cf438dfbb5 100644 --- a/patches/server/0949-Add-drops-to-shear-events.patch +++ b/patches/server/0949-Add-drops-to-shear-events.patch @@ -44,7 +44,7 @@ index 5e8cc5cfac8888628c6d513148f41be09ca65a2c..2ee48ac3b665db2b02bcb1a30ec972d4 + // Paper end - custom shear drops } diff --git a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java -index aa125e3043b120935aaa015803f065f99eb8d050..7bcdbe173098ee0fcdcc34f97c7c87afdb3c28b3 100644 +index aa125e3043b120935aaa015803f065f99eb8d050..0c21959f57ae88fcd0a4d6dc911c1ce347c96528 100644 --- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java +++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java @@ -123,11 +123,18 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder drops = this.generateDefaultDrops(); ++ java.util.List drops = this.generateDefaultDrops(); + org.bukkit.event.player.PlayerShearEntityEvent event = CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemstack, hand, drops); + if (event != null) { + if (event.isCancelled()) { @@ -78,8 +78,8 @@ index aa125e3043b120935aaa015803f065f99eb8d050..7bcdbe173098ee0fcdcc34f97c7c87af + } + + @Override -+ public List generateDefaultDrops() { -+ List dropEntities = new java.util.ArrayList<>(5); ++ public java.util.List generateDefaultDrops() { ++ java.util.List dropEntities = new java.util.ArrayList<>(5); + for (int i = 0; i < 5; ++i) { + dropEntities.add(new ItemStack(this.getVariant().getBlockState().getBlock())); + } @@ -87,7 +87,7 @@ index aa125e3043b120935aaa015803f065f99eb8d050..7bcdbe173098ee0fcdcc34f97c7c87af + } + + @Override -+ public void shear(SoundSource shearedSoundCategory, List drops) { // If drops is null, need to generate drops ++ public void shear(SoundSource shearedSoundCategory, java.util.List drops) { // If drops is null, need to generate drops + // Paper end - custom shear drops this.level().playSound((Player) null, (Entity) this, SoundEvents.MOOSHROOM_SHEAR, shearedSoundCategory, 1.0F, 1.0F); if (!this.level().isClientSide()) { diff --git a/patches/server/0959-Add-Lifecycle-Event-system.patch b/patches/server/0959-Add-Lifecycle-Event-system.patch index 8250b844e5..90ec82612b 100644 --- a/patches/server/0959-Add-Lifecycle-Event-system.patch +++ b/patches/server/0959-Add-Lifecycle-Event-system.patch @@ -707,7 +707,7 @@ index 2e96308696e131f3f013469a395e5ddda2c5d529..65a66e484c1c39c5f41d97db52f31c67 } catch (Throwable e) { LOGGER.error("Failed to run bootstrapper for %s. This plugin will not be loaded.".formatted(provider.getSource()), e); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ca4cce36d462567f9fbab53dd904cad6db382f72..6d9a20fcd77b13e572fad03dd86c17404b3ae8c7 100644 +index 2f721887c6b7a212e441d61ef37c1f0da8c2681e..4cff20b3d5a8384f8311474bb606890dc41e1ce7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1017,6 +1017,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0964-improve-BanList-types.patch b/patches/server/0964-improve-BanList-types.patch index c40c336e4a..c03e9c9e45 100644 --- a/patches/server/0964-improve-BanList-types.patch +++ b/patches/server/0964-improve-BanList-types.patch @@ -5,7 +5,7 @@ Subject: [PATCH] improve BanList types diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6d9a20fcd77b13e572fad03dd86c17404b3ae8c7..e09288cbce63bcdc4243b7cf6e714cbe23913ed1 100644 +index 4cff20b3d5a8384f8311474bb606890dc41e1ce7..1baf861ba5a59d3413647331f19391968ac2e8db 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2230,6 +2230,21 @@ public final class CraftServer implements Server { diff --git a/patches/server/0966-Add-BlockBreakProgressUpdateEvent.patch b/patches/server/0966-Add-BlockBreakProgressUpdateEvent.patch index f02afee856..551f8ad87d 100644 --- a/patches/server/0966-Add-BlockBreakProgressUpdateEvent.patch +++ b/patches/server/0966-Add-BlockBreakProgressUpdateEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockBreakProgressUpdateEvent diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e7339dbd6a42b67eb65260200c5eba89c626a298..0b3b9ce294bb59fb71209de37f7a8d2519360768 100644 +index f2d7c9b56fb1ec80e74e23abe2635f8979fdaae6..06c185eae0063ff1b1714be0a5c7b0cdd538816b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1322,6 +1322,17 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0968-Add-CartographyItemEvent.patch b/patches/server/0968-Add-CartographyItemEvent.patch index a72a29d0dd..12d2f33df8 100644 --- a/patches/server/0968-Add-CartographyItemEvent.patch +++ b/patches/server/0968-Add-CartographyItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add CartographyItemEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f03cef6fffddcf3aea30c2c9033046c0b1f42aa5..06b4e0d93913f8348831debf18dd00a80b2ebec6 100644 +index 43aa78291cc88de0060dc8ed7ff09b7e2628e294..d6c767c8fee799e895058c8ef3dad96cc580675d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3100,6 +3100,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0969-More-Raid-API.patch b/patches/server/0969-More-Raid-API.patch index 3802319069..737124f720 100644 --- a/patches/server/0969-More-Raid-API.patch +++ b/patches/server/0969-More-Raid-API.patch @@ -86,7 +86,7 @@ index b8ce1c1c2447f9cff1717bfcfd6eb911ade0d4b3..51f21af9d75769abdcba713b9aa33392 + // Paper end - more Raid API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9be7221d24f7036e2fe76bbea2c7585cc75f9854..94bcfdf2892fe43267acb79592ceb5b2040fa290 100644 +index ecd97223cdabe92dee0d43f8e02f2b084d6f981d..461201fd6468be50eaa33889558ffd0514d910f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -2363,6 +2363,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {