diff --git a/patches/unapplied/server/0311-Expose-the-internal-current-tick.patch b/patches/server/0302-Expose-the-internal-current-tick.patch similarity index 83% rename from patches/unapplied/server/0311-Expose-the-internal-current-tick.patch rename to patches/server/0302-Expose-the-internal-current-tick.patch index 21d86ae357..a3c9a6ac95 100644 --- a/patches/unapplied/server/0311-Expose-the-internal-current-tick.patch +++ b/patches/server/0302-Expose-the-internal-current-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 43c69ec522a2c91d47b5cea05aaf86f979c5fcb2..fd038c105d12c76c9e2645ad146e77b4a9cc1079 100644 +index 8254a5d2a72bf12b2f2600a99eb3058c6e76042a..d61aa8acdcbc08d131ecf1d385084e6c82663feb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2861,5 +2861,10 @@ public final class CraftServer implements Server { +@@ -2880,5 +2880,10 @@ public final class CraftServer implements Server { profile.getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties()); return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile); } diff --git a/patches/unapplied/server/0312-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0303-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 85% rename from patches/unapplied/server/0312-Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/0303-Show-blockstate-location-if-we-failed-to-read-it.patch index 2c9fef1cf5..c135681989 100644 --- a/patches/unapplied/server/0312-Show-blockstate-location-if-we-failed-to-read-it.patch +++ b/patches/server/0303-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Show blockstate location if we failed to read it diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index e7fd9ebd47af277d6dbced0f17e954722c202776..ff3f88f107a4c059688566b69dcdf48bc01210ab 100644 +index fdd6f9e8164efedb3e8f29857ad35ed69e7b299d..52fe7315fa838e3b6b236127c293ac0e8528ee7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -@@ -25,6 +25,7 @@ public class CraftBlockEntityState extends CraftBlockStat +@@ -30,6 +30,7 @@ public class CraftBlockEntityState extends CraftBlockStat this.tileEntity = tileEntity; @@ -16,7 +16,7 @@ index e7fd9ebd47af277d6dbced0f17e954722c202776..ff3f88f107a4c059688566b69dcdf48b // Paper start this.snapshotDisabled = DISABLE_SNAPSHOT; if (DISABLE_SNAPSHOT) { -@@ -37,6 +38,14 @@ public class CraftBlockEntityState extends CraftBlockStat +@@ -42,6 +43,14 @@ public class CraftBlockEntityState extends CraftBlockStat this.load(this.snapshot); } // Paper end @@ -30,4 +30,4 @@ index e7fd9ebd47af277d6dbced0f17e954722c202776..ff3f88f107a4c059688566b69dcdf48b + // Paper end - Show blockstate location if we failed to read it } - protected CraftBlockEntityState(CraftBlockEntityState state) { + protected CraftBlockEntityState(CraftBlockEntityState state, Location location) { diff --git a/patches/unapplied/server/0313-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0304-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 91% rename from patches/unapplied/server/0313-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/0304-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index a310ad9f1a..cb2e502f71 100644 --- a/patches/unapplied/server/0313-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/patches/server/0304-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index d5ada3301429e7fec0d157d7a33d4937e0f82fbb..5247782edc426107fb4b3ade5d92f148c0b6e681 100644 +index 41eef8bfd1572aecaf086bfbec300abeae2df794..58ea6a1f95a09c22125a8262b1b221004ebce0e4 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -88,6 +88,13 @@ public final class NaturalSpawner { +@@ -83,6 +83,13 @@ public final class NaturalSpawner { MobCategory enumcreaturetype = entity.getType().getCategory(); if (enumcreaturetype != MobCategory.MISC) { diff --git a/patches/unapplied/server/0314-Configurable-projectile-relative-velocity.patch b/patches/server/0305-Configurable-projectile-relative-velocity.patch similarity index 93% rename from patches/unapplied/server/0314-Configurable-projectile-relative-velocity.patch rename to patches/server/0305-Configurable-projectile-relative-velocity.patch index 5c75a20f54..c96f031ef6 100644 --- a/patches/unapplied/server/0314-Configurable-projectile-relative-velocity.patch +++ b/patches/server/0305-Configurable-projectile-relative-velocity.patch @@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 4ebc38d0666d01c67c2728355fbbef296a0672e3..20842ed5b730dda88efd0cda9292a37f879a4017 100644 +index 516999dc425d23c570dabfe4f3c829650a6d205d..40348e45b02be9a0b397a883940a476fb6738ef4 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -173,7 +173,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -176,7 +176,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { this.shoot((double) f5, (double) f6, (double) f7, speed, divergence); Vec3 vec3d = shooter.getDeltaMovement(); diff --git a/patches/unapplied/server/0315-offset-item-frame-ticking.patch b/patches/server/0306-offset-item-frame-ticking.patch similarity index 84% rename from patches/unapplied/server/0315-offset-item-frame-ticking.patch rename to patches/server/0306-offset-item-frame-ticking.patch index cb15ef5dd8..e5be0eb235 100644 --- a/patches/unapplied/server/0315-offset-item-frame-ticking.patch +++ b/patches/server/0306-offset-item-frame-ticking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] offset item frame ticking diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -index aaa579ba04445aa350a439610d460a2415320cfc..4dea85a8ab8ae16d02e35d226fd155891ce2319a 100644 +index 47a62680279f15ac93eb521f7ec93c3b8d52c602..0ffff5329fa2c7833f9ec71528cb7f951cf78109 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java +++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -@@ -39,7 +39,7 @@ public abstract class HangingEntity extends Entity { +@@ -40,7 +40,7 @@ public abstract class HangingEntity extends Entity { protected static final Predicate HANGING_ENTITY = (entity) -> { return entity instanceof HangingEntity; }; diff --git a/patches/unapplied/server/0316-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0307-Prevent-consuming-the-wrong-itemstack.patch similarity index 88% rename from patches/unapplied/server/0316-Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/0307-Prevent-consuming-the-wrong-itemstack.patch index 397c7c692d..b3336ee24c 100644 --- a/patches/unapplied/server/0316-Prevent-consuming-the-wrong-itemstack.patch +++ b/patches/server/0307-Prevent-consuming-the-wrong-itemstack.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4be7b136dd2b35b0637a1455985ab99bbd3af0a5..b4a817e047a78723d746740c88503441625ac8e7 100644 +index 709bcc209299fcc5a593c1b4c93a179af2b5eff1..ba18e2decde409b40ac73c66b015419e219c759a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3730,9 +3730,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3815,9 +3815,14 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void startUsingItem(InteractionHand hand) { @@ -24,7 +24,7 @@ index 4be7b136dd2b35b0637a1455985ab99bbd3af0a5..b4a817e047a78723d746740c88503441 this.useItem = itemstack; this.useItemRemaining = itemstack.getUseDuration(); if (!this.level().isClientSide) { -@@ -3812,6 +3817,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3897,6 +3902,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.releaseUsingItem(); } else { if (!this.useItem.isEmpty() && this.isUsingItem()) { @@ -32,7 +32,7 @@ index 4be7b136dd2b35b0637a1455985ab99bbd3af0a5..b4a817e047a78723d746740c88503441 this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; -@@ -3846,8 +3852,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3931,8 +3937,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.stopUsingItem(); diff --git a/patches/unapplied/server/0317-Dont-send-unnecessary-sign-update.patch b/patches/server/0308-Dont-send-unnecessary-sign-update.patch similarity index 87% rename from patches/unapplied/server/0317-Dont-send-unnecessary-sign-update.patch rename to patches/server/0308-Dont-send-unnecessary-sign-update.patch index 6d4799456e..dd38fa947e 100644 --- a/patches/unapplied/server/0317-Dont-send-unnecessary-sign-update.patch +++ b/patches/server/0308-Dont-send-unnecessary-sign-update.patch @@ -5,10 +5,10 @@ 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 a822b190aeee1d644c3509bb75106fa4dfdd963f..9939cad5af2d7873f188f18978029663a8d785de 100644 +index 2e5fc484d26b5468dfb8f49d62f4518e83169618..ddf101fd613c854f77971d97a5b0f9319f21242a 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 -@@ -184,6 +184,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C +@@ -185,6 +185,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3); } else { SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString()); diff --git a/patches/unapplied/server/0318-Add-option-to-disable-pillager-patrols.patch b/patches/server/0309-Add-option-to-disable-pillager-patrols.patch similarity index 85% rename from patches/unapplied/server/0318-Add-option-to-disable-pillager-patrols.patch rename to patches/server/0309-Add-option-to-disable-pillager-patrols.patch index e648d66623..3021a1f6c8 100644 --- a/patches/unapplied/server/0318-Add-option-to-disable-pillager-patrols.patch +++ b/patches/server/0309-Add-option-to-disable-pillager-patrols.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable pillager patrols diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java -index 65d9211b812995869e58900a2873583658122312..c7aea059de151cf8ae6e660785e176586bc23ff3 100644 +index 7522c40ab352d3b3ce1540f043b4b5f0d411060b..7b5db53d4cf97e41175896de47303526198fb8f6 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java -@@ -25,6 +25,7 @@ public class PatrolSpawner implements CustomSpawner { +@@ -24,6 +24,7 @@ public class PatrolSpawner implements CustomSpawner { @Override public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) { diff --git a/patches/unapplied/server/0319-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/0310-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from patches/unapplied/server/0319-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/0310-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/patches/unapplied/server/0320-MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/0311-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/unapplied/server/0320-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/0311-MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/unapplied/server/0321-Duplicate-UUID-Resolve-Option.patch b/patches/server/0312-Duplicate-UUID-Resolve-Option.patch similarity index 89% rename from patches/unapplied/server/0321-Duplicate-UUID-Resolve-Option.patch rename to patches/server/0312-Duplicate-UUID-Resolve-Option.patch index fd0e3d51f3..a8fd0cc85e 100644 --- a/patches/unapplied/server/0321-Duplicate-UUID-Resolve-Option.patch +++ b/patches/server/0312-Duplicate-UUID-Resolve-Option.patch @@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 05b838f7008d5d031b18e161bbde7e72b8205b90..8805fd57e7198aa9afaafe45fab13fd343e2a545 100644 +index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f026ce66d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -880,6 +880,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -906,6 +906,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.discard(null); // CraftBukkit - add Bukkit remove cause needsRemoval = true; } @@ -44,7 +44,7 @@ index 05b838f7008d5d031b18e161bbde7e72b8205b90..8805fd57e7198aa9afaafe45fab13fd3 return !needsRemoval; })); // CraftBukkit end -@@ -930,6 +931,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -948,6 +949,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); } @@ -87,6 +87,7 @@ index 05b838f7008d5d031b18e161bbde7e72b8205b90..8805fd57e7198aa9afaafe45fab13fd3 + return false; + } + // Paper end - duplicate uuid resolving - public CompletableFuture> prepareTickingChunk(ChunkHolder holder) { - CompletableFuture, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> { ++ + public CompletableFuture> prepareTickingChunk(ChunkHolder holder) { + CompletableFuture>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> { return ChunkStatus.FULL; diff --git a/patches/unapplied/server/0322-PlayerDeathEvent-shouldDropExperience.patch b/patches/server/0313-PlayerDeathEvent-shouldDropExperience.patch similarity index 85% rename from patches/unapplied/server/0322-PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/0313-PlayerDeathEvent-shouldDropExperience.patch index c7a6d1afba..4a5a9b4d6c 100644 --- a/patches/unapplied/server/0322-PlayerDeathEvent-shouldDropExperience.patch +++ b/patches/server/0313-PlayerDeathEvent-shouldDropExperience.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index eb9668f94dbc36f3abc7d5c47c9b1b657aa94ced..79a0accd8230c76d792ed3f7558e8b3ea6d2f6d1 100644 +index 209d9f294a387e63b725be76cb645ca8925fa5a4..9d08ff6024c6036dce57c833c1413033c8b2ef2c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -934,7 +934,7 @@ public class ServerPlayer extends Player { +@@ -1001,7 +1001,7 @@ public class ServerPlayer extends Player { this.tellNeutralMobsThatIDied(); } // SPIGOT-5478 must be called manually now diff --git a/patches/unapplied/server/0323-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0314-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 86% rename from patches/unapplied/server/0323-Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/0314-Prevent-bees-loading-chunks-checking-hive-position.patch index b0582f28fa..9e8924d226 100644 --- a/patches/unapplied/server/0323-Prevent-bees-loading-chunks-checking-hive-position.patch +++ b/patches/server/0314-Prevent-bees-loading-chunks-checking-hive-position.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index d3ef1bf0be4584dbe41576fa7036b11ff405b9d8..0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7 100644 +index 8b0d13513656752a0b40e25c5041d41491b9eef0..5ecf8a87a31a0243c281e2a69823f5f79be69ca5 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -509,6 +509,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -499,6 +499,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } else if (this.isTooFarAway(this.hivePos)) { return false; } else { diff --git a/patches/unapplied/server/0324-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/0315-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/unapplied/server/0324-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/0315-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/unapplied/server/0325-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0316-Optimise-EntityGetter-getPlayerByUUID.patch similarity index 91% rename from patches/unapplied/server/0325-Optimise-EntityGetter-getPlayerByUUID.patch rename to patches/server/0316-Optimise-EntityGetter-getPlayerByUUID.patch index 01113bf72e..ea994ce30b 100644 --- a/patches/unapplied/server/0325-Optimise-EntityGetter-getPlayerByUUID.patch +++ b/patches/server/0316-Optimise-EntityGetter-getPlayerByUUID.patch @@ -6,10 +6,10 @@ 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 20de3be232ccc7ec7bbc3c6aee9acf66fd396af1..54c0aa440cd8e7e1cedc6ef9ae963c68558b6080 100644 +index e008b0b1b04dd8da118be6ee0bdd05c146a97532..0abba132f2ce4cab0fd26e1ee17442b22471b6aa 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -324,6 +324,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -329,6 +329,15 @@ public class ServerLevel extends Level implements WorldGenLevel { } // Paper end diff --git a/patches/unapplied/server/0326-Fix-items-not-falling-correctly.patch b/patches/server/0317-Fix-items-not-falling-correctly.patch similarity index 92% rename from patches/unapplied/server/0326-Fix-items-not-falling-correctly.patch rename to patches/server/0317-Fix-items-not-falling-correctly.patch index 785cf5a8ff..a9746d7d4e 100644 --- a/patches/unapplied/server/0326-Fix-items-not-falling-correctly.patch +++ b/patches/server/0317-Fix-items-not-falling-correctly.patch @@ -15,17 +15,17 @@ This patch resolves the conflict by offsetting checking Spigot's entity activation range check from an item's move method. diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index bfbbb9382cf483a23acf35c17250f6f9223f7507..5994cb69575d365f435f5ef6da5fa61ee9298fe1 100644 +index f0e6375236d61f32235ed23c3bae49db1545d1a2..5782033cbe408f60340833ddb49dbca3623aaa83 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -169,7 +169,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -175,7 +175,7 @@ public class ItemEntity extends Entity implements TraceableEntity { } } - if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) { + if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) { // Paper - Diff on change this.move(MoverType.SELF, this.getDeltaMovement()); - float f1 = 0.98F; + float f = 0.98F; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java index 6d51464f6368151e8acc532414ee223714584e96..9fb9fa62c32445ac3c3883a6433759c86dcfc428 100644 diff --git a/patches/unapplied/server/0327-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0318-Optimize-call-to-getFluid-for-explosions.patch similarity index 88% rename from patches/unapplied/server/0327-Optimize-call-to-getFluid-for-explosions.patch rename to patches/server/0318-Optimize-call-to-getFluid-for-explosions.patch index a63134d6ec..311cde37d6 100644 --- a/patches/unapplied/server/0327-Optimize-call-to-getFluid-for-explosions.patch +++ b/patches/server/0318-Optimize-call-to-getFluid-for-explosions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize call to getFluid for explosions diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index ade10a9fd93f4c0f04cd56ce5e1da06af4a05060..b057a67a416928ae30bd407b3da982b73ae3be03 100644 +index 146f5a33e1d538e46e4f7034a498d30f742a96f7..b54a5c496ea7f1999c1b10219e72e9ce79921c99 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -191,7 +191,7 @@ public class Explosion { +@@ -192,7 +192,7 @@ public class Explosion { for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) { BlockPos blockposition = BlockPos.containing(d4, d5, d6); BlockState iblockdata = this.level.getBlockState(blockposition); diff --git a/patches/unapplied/server/0329-Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/0319-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 85% rename from patches/unapplied/server/0329-Guard-against-serializing-mismatching-chunk-coordina.patch rename to patches/server/0319-Guard-against-serializing-mismatching-chunk-coordina.patch index 4a4b6f7faf..98e6fa59a3 100644 --- a/patches/unapplied/server/0329-Guard-against-serializing-mismatching-chunk-coordina.patch +++ b/patches/server/0319-Guard-against-serializing-mismatching-chunk-coordina.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate Should help if something dumb happens diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index ba7a816bd9dd4aec79e2560f0968374dbb28442c..cbc8e95c8f890f0c0eb717d4d2ae3f427dc260d8 100644 +index b0518725a2e145d29bd5bc0aa7e6998a47dcb511..b3f8df13e97cbde7dd914b42004d186f90b78646 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -86,8 +86,20 @@ public class ChunkSerializer { +@@ -88,8 +88,20 @@ public class ChunkSerializer { public ChunkSerializer() {} @@ -32,13 +32,13 @@ index ba7a816bd9dd4aec79e2560f0968374dbb28442c..cbc8e95c8f890f0c0eb717d4d2ae3f42 if (!Objects.equals(chunkPos, chunkcoordintpair1)) { ChunkSerializer.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", new Object[]{chunkPos, chunkPos, chunkcoordintpair1}); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -index 25623dcd44edc475c5dce2756bf99fc18e142b63..eaf978d15618b80d23c443acbd42db926d570d01 100644 +index 5ed1b824978c3805e91aeed8e172206ada9fb720..09a73383867d1ffadababd24428ee7a61ab98959 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -@@ -157,6 +157,13 @@ public class ChunkStorage implements AutoCloseable { +@@ -168,6 +168,13 @@ public class ChunkStorage implements AutoCloseable { } - public void write(ChunkPos chunkPos, CompoundTag nbt) { + public CompletableFuture write(ChunkPos chunkPos, CompoundTag nbt) { + // Paper start - guard against serializing mismatching coordinates + if (nbt != null && !chunkPos.equals(ChunkSerializer.getChunkCoordinate(nbt))) { + final String world = (this instanceof net.minecraft.server.level.ChunkMap) ? ((net.minecraft.server.level.ChunkMap) this).level.getWorld().getName() : null; @@ -46,6 +46,6 @@ index 25623dcd44edc475c5dce2756bf99fc18e142b63..eaf978d15618b80d23c443acbd42db92 + + " but compound says coordinate is " + ChunkSerializer.getChunkCoordinate(nbt) + (world == null ? " for an unknown world" : (" for world: " + world))); + } + // Paper end - guard against serializing mismatching coordinates - this.worker.store(chunkPos, nbt); - if (this.legacyStructureHandler != null) { - this.legacyStructureHandler.removeIndex(chunkPos.toLong()); + this.handleLegacyStructureIndex(chunkPos); + return this.worker.store(chunkPos, nbt); + } diff --git a/patches/unapplied/server/0330-Alternative-item-despawn-rate.patch b/patches/server/0320-Alternative-item-despawn-rate.patch similarity index 87% rename from patches/unapplied/server/0330-Alternative-item-despawn-rate.patch rename to patches/server/0320-Alternative-item-despawn-rate.patch index 86340551c0..a3a719c954 100644 --- a/patches/unapplied/server/0330-Alternative-item-despawn-rate.patch +++ b/patches/server/0320-Alternative-item-despawn-rate.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Alternative item-despawn-rate Co-authored-by: Noah van der Aa diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea589ab337 100644 +index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a1619238cff94c 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -57,6 +57,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -61,6 +61,7 @@ public class ItemEntity extends Entity implements TraceableEntity { public final float bobOffs; private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit public boolean canMobPickup = true; // Paper - Item#canEntityPickup @@ -17,7 +17,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea public ItemEntity(EntityType type, Level world) { super(type, world); -@@ -209,7 +210,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -215,7 +216,7 @@ public class ItemEntity extends Entity implements TraceableEntity { } } @@ -26,7 +26,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea // CraftBukkit start - fire ItemDespawnEvent if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -233,7 +234,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -239,7 +240,7 @@ public class ItemEntity extends Entity implements TraceableEntity { this.lastTick = MinecraftServer.currentTick; // CraftBukkit end @@ -35,7 +35,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -289,7 +290,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -295,7 +296,7 @@ public class ItemEntity extends Entity implements TraceableEntity { private boolean isMergable() { ItemStack itemstack = this.getItem(); @@ -44,7 +44,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea } private void tryToMerge(ItemEntity other) { -@@ -532,6 +533,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -543,6 +544,7 @@ public class ItemEntity extends Entity implements TraceableEntity { public void setItem(ItemStack stack) { this.getEntityData().set(ItemEntity.DATA_ITEM, stack); @@ -52,7 +52,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea } @Override -@@ -586,7 +588,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -597,7 +599,7 @@ public class ItemEntity extends Entity implements TraceableEntity { public void makeFakeItem() { this.setNeverPickUp(); diff --git a/patches/unapplied/server/0331-Tracking-Range-Improvements.patch b/patches/server/0321-Tracking-Range-Improvements.patch similarity index 95% rename from patches/unapplied/server/0331-Tracking-Range-Improvements.patch rename to patches/server/0321-Tracking-Range-Improvements.patch index 2daaa84425..0c63932883 100644 --- a/patches/unapplied/server/0331-Tracking-Range-Improvements.patch +++ b/patches/server/0321-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 8805fd57e7198aa9afaafe45fab13fd343e2a545..c69f1d970e1014f1be601e34bdd8b5fd749da339 100644 +index 6fa52a83d343ff151667cd9ade0ec60f026ce66d..f13f8119cf43711b96b4dc5834fceaa0282d632d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1761,6 +1761,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1774,6 +1774,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getType().clientTrackingRange() * 16; diff --git a/patches/unapplied/server/0333-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0322-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 83% rename from patches/unapplied/server/0333-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/0322-Bees-get-gravity-in-void.-Fixes-MC-167279.patch index 7959db9a16..19d4ba5fa9 100644 --- a/patches/unapplied/server/0333-Bees-get-gravity-in-void.-Fixes-MC-167279.patch +++ b/patches/server/0322-Bees-get-gravity-in-void.-Fixes-MC-167279.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279 diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index 0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7..06e990b6957a4ef48c8778bbd175d3afddf52ca3 100644 +index 5ecf8a87a31a0243c281e2a69823f5f79be69ca5..210e65919082205ea9227520e9cccc064cd94369 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -147,7 +147,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { public Bee(EntityType type, Level world) { super(type, world); this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60); @@ -30,5 +30,5 @@ index 0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7..06e990b6957a4ef48c8778bbd175d3af + this.moveControl = new BeeFlyingMoveControl(this, 20, true); + // Paper end - Fix MC-167279 this.lookControl = new Bee.BeeLookControl(this); - this.setPathfindingMalus(BlockPathTypes.DANGER_FIRE, -1.0F); - this.setPathfindingMalus(BlockPathTypes.WATER, -1.0F); + this.setPathfindingMalus(PathType.DANGER_FIRE, -1.0F); + this.setPathfindingMalus(PathType.WATER, -1.0F); diff --git a/patches/unapplied/server/0334-Improve-Block-breakNaturally-API.patch b/patches/server/0323-Improve-Block-breakNaturally-API.patch similarity index 98% rename from patches/unapplied/server/0334-Improve-Block-breakNaturally-API.patch rename to patches/server/0323-Improve-Block-breakNaturally-API.patch index 90192e4785..59270e660a 100644 --- a/patches/unapplied/server/0334-Improve-Block-breakNaturally-API.patch +++ b/patches/server/0323-Improve-Block-breakNaturally-API.patch @@ -18,7 +18,7 @@ public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraf Co-authored-by: William Blake Galbreath diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java -index c919b5a382b1bfcafd938ff926d9146cc5cf0cdc..52c6c26a300cfd19c478afba411a17c8d5ea0c3c 100644 +index 46ee66d06c727a3ad6638f09ac97cd0f07676a7b..4bfe53e3a231a7bec461759e78c7a6cbcb8bb625 100644 --- a/src/main/java/net/minecraft/world/level/block/IceBlock.java +++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java @@ -35,6 +35,11 @@ public class IceBlock extends HalfTransparentBlock { diff --git a/patches/unapplied/server/0335-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0324-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 81% rename from patches/unapplied/server/0335-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/0324-Optimise-getChunkAt-calls-for-loaded-chunks.patch index bb08aebe5a..a96e5d4769 100644 --- a/patches/unapplied/server/0335-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/patches/server/0324-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 369e4bf5ff52cb774f1acaf760b8bd276a0745f5..326b67c15ee3df162bf4468729c49dd98b582f02 100644 +index bc81649b09c39188697b8851abedafca0dde9d99..d41c0e4474d057c7b13427bfd896c50f24232615 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -254,6 +254,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -252,6 +252,12 @@ public class ServerChunkCache extends ChunkSource { return this.getChunk(x, z, leastStatus, create); }, this.mainThreadProcessor).join(); } else { @@ -23,7 +23,7 @@ index 369e4bf5ff52cb774f1acaf760b8bd276a0745f5..326b67c15ee3df162bf4468729c49dd9 ProfilerFiller gameprofilerfiller = this.level.getProfiler(); gameprofilerfiller.incrementCounter("getChunk"); -@@ -300,39 +306,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -295,39 +301,7 @@ public class ServerChunkCache extends ChunkSource { if (Thread.currentThread() != this.mainThread) { return null; } else { @@ -43,12 +43,12 @@ index 369e4bf5ff52cb774f1acaf760b8bd276a0745f5..326b67c15ee3df162bf4468729c49dd9 - if (playerchunk == null) { - return null; - } else { -- Either either = (Either) playerchunk.getFutureIfPresent(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error +- ChunkResult chunkresult = (ChunkResult) playerchunk.getFutureIfPresent(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error - -- if (either == null) { +- if (chunkresult == null) { - return null; - } else { -- ChunkAccess ichunkaccess1 = (ChunkAccess) either.left().orElse(null); // CraftBukkit - decompile error +- ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error - - if (ichunkaccess1 != null) { - this.storeInCache(k, ichunkaccess1, ChunkStatus.FULL); diff --git a/patches/unapplied/server/0336-Add-debug-for-sync-chunk-loads.patch b/patches/server/0325-Add-debug-for-sync-chunk-loads.patch similarity index 97% rename from patches/unapplied/server/0336-Add-debug-for-sync-chunk-loads.patch rename to patches/server/0325-Add-debug-for-sync-chunk-loads.patch index 57fda6ab95..3c8e616e06 100644 --- a/patches/unapplied/server/0336-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0325-Add-debug-for-sync-chunk-loads.patch @@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 326b67c15ee3df162bf4468729c49dd98b582f02..8a118a7b2878d3c99dadfa97e2ae58fda2b3f93b 100644 +index d41c0e4474d057c7b13427bfd896c50f24232615..2d9d4d06b75873f888ef4d8f5779a52706f821a8 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -282,6 +282,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -279,6 +279,7 @@ public class ServerChunkCache extends ChunkSource { Objects.requireNonNull(completablefuture); if (!completablefuture.isDone()) { // Paper @@ -312,10 +312,10 @@ index 326b67c15ee3df162bf4468729c49dd98b582f02..8a118a7b2878d3c99dadfa97e2ae58fd 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 54c0aa440cd8e7e1cedc6ef9ae963c68558b6080..4d1d84383c11ef1e83edb50be62173533b7a641b 100644 +index 0abba132f2ce4cab0fd26e1ee17442b22471b6aa..6c09cc91bc0d229761a4af1f1a1ec46f56ce1d65 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -415,6 +415,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -421,6 +421,13 @@ public class ServerLevel extends Level implements WorldGenLevel { this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit } diff --git a/patches/unapplied/server/0337-Improve-java-version-check.patch b/patches/server/0326-Improve-java-version-check.patch similarity index 95% rename from patches/unapplied/server/0337-Improve-java-version-check.patch rename to patches/server/0326-Improve-java-version-check.patch index 4a7b655dd8..b923a87862 100644 --- a/patches/unapplied/server/0337-Improve-java-version-check.patch +++ b/patches/server/0326-Improve-java-version-check.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Improve java version check Co-Authored-By: MiniDigger diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index d8a7287849407c4756d4ebe4b55c358970320ce3..f21bff10aa56b418b1c3c3f1a40b88c4e992c26d 100644 +index caa7fefab037a24713e9f7f15a541d47bc7655ee..cc4f7f5bdb6b930af4130dc775e4ed754be87783 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -201,23 +201,27 @@ public class Main { +@@ -202,23 +202,27 @@ public class Main { return; } diff --git a/patches/unapplied/server/0338-Add-ThrownEggHatchEvent.patch b/patches/server/0327-Add-ThrownEggHatchEvent.patch similarity index 100% rename from patches/unapplied/server/0338-Add-ThrownEggHatchEvent.patch rename to patches/server/0327-Add-ThrownEggHatchEvent.patch diff --git a/patches/unapplied/server/0339-Entity-Jump-API.patch b/patches/server/0328-Entity-Jump-API.patch similarity index 85% rename from patches/unapplied/server/0339-Entity-Jump-API.patch rename to patches/server/0328-Entity-Jump-API.patch index d1a852319f..6debbbab6a 100644 --- a/patches/unapplied/server/0339-Entity-Jump-API.patch +++ b/patches/server/0328-Entity-Jump-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API public net.minecraft.world.entity.LivingEntity jumping diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b4a817e047a78723d746740c88503441625ac8e7..2a417145d9fe4d029cf3738f3320c0bcd3e025a9 100644 +index ba18e2decde409b40ac73c66b015419e219c759a..67aa02a223345a91fe0b30b36966995e304c82bb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3304,8 +3304,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3395,8 +3395,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } else if (this.isInLava() && (!this.onGround() || d3 > d4)) { this.jumpInLiquid(FluidTags.LAVA); } else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) { @@ -22,10 +22,10 @@ index b4a817e047a78723d746740c88503441625ac8e7..2a417145d9fe4d029cf3738f3320c0bc } else { this.noJumpDelay = 0; diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java -index 9c70f3bf7cc37a7df9d1b8c5d5f0f6264680e421..4224e8e75613b6ec0228b2757cb98140d83bc2e2 100644 +index 4a1b25bb8a3d342400cb657781e9eab68decd479..fb4c7220c4edad54813036d62db7e3eefeda92a3 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java -@@ -528,7 +528,9 @@ public class Panda extends Animal { +@@ -536,7 +536,9 @@ public class Panda extends Animal { Panda entitypanda = (Panda) iterator.next(); if (!entitypanda.isBaby() && entitypanda.onGround() && !entitypanda.isInWater() && entitypanda.canPerformAction()) { @@ -36,10 +36,10 @@ index 9c70f3bf7cc37a7df9d1b8c5d5f0f6264680e421..4224e8e75613b6ec0228b2757cb98140 } diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -index aba20a4352d8983b01ab5d329187588f68d3e405..aac60e85cd6dba7d87f4a1663c2c62952521d112 100644 +index 1264fb03d2dcab088fc4a7c2788c9f9df53cba5d..cec801ba14bed8b043b2375f1bf9e7811a63e995 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java +++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -@@ -167,7 +167,9 @@ public class Ravager extends Raider { +@@ -159,7 +159,9 @@ public class Ravager extends Raider { } if (!flag && this.onGround()) { @@ -50,10 +50,10 @@ index aba20a4352d8983b01ab5d329187588f68d3e405..aac60e85cd6dba7d87f4a1663c2c6295 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 5def5bccd8fce86ce015567e65fefae329819c18..29fa2231cc5d9c3ac36d508f14408d6077b6594c 100644 +index b2172a8c70ab77ba7c98b6b2b27595765d7eba11..539280a0265a4746ebc9ede6667df3699dfb8125 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -976,4 +976,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -961,4 +961,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand()); } // Paper end - active item API diff --git a/patches/unapplied/server/0340-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 82% rename from patches/unapplied/server/0340-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch index d5d6d0d4ca..21df90e99e 100644 --- a/patches/unapplied/server/0340-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8b7009b39 100644 +index ce2594baa8eb5cfff75a2fb9f3277676a7b08e18..f1b8e3f06db9bef44319c6d53574b1e7188c5931 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -399,6 +399,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void inactiveTick() { } // Spigot end protected int numCollisions = 0; // Paper - Cap entity collisions @@ -16,7 +16,7 @@ index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8 public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one // Paper start - Entity origin API @javax.annotation.Nullable -@@ -2186,6 +2187,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2214,6 +2215,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (spawnedViaMobSpawner) { nbttagcompound.putBoolean("Paper.FromMobSpawner", true); } @@ -26,7 +26,7 @@ index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -2328,6 +2332,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2356,6 +2360,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -35,7 +35,7 @@ index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8 String spawnReasonName = nbt.getString("Paper.SpawnReason"); try { diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -index c9ff8a3fd8d65033ce5a476e8ceaf9d1b8e2d887..2a8f97d97ae7f268da920b5e3b9719743fa9a8e0 100644 +index f0d4c16fffe7af7e913f4bb300c72f7bdf91e0e8..d3f2c0e3107a781b462a2b67c10cd1e5f05feefb 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java @@ -71,6 +71,8 @@ public class NetherPortalBlock extends Block { diff --git a/patches/unapplied/server/0341-Make-the-GUI-graph-fancier.patch b/patches/server/0330-Make-the-GUI-graph-fancier.patch similarity index 99% rename from patches/unapplied/server/0341-Make-the-GUI-graph-fancier.patch rename to patches/server/0330-Make-the-GUI-graph-fancier.patch index a997709470..9e79ca7b91 100644 --- a/patches/unapplied/server/0341-Make-the-GUI-graph-fancier.patch +++ b/patches/server/0330-Make-the-GUI-graph-fancier.patch @@ -385,7 +385,7 @@ index 0000000000000000000000000000000000000000..c3e54da4ab6440811aab2f9dd1e21880 + } +} diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java -index d292fdb165436f0b9b46b32110f5e09ad0e517a1..2bbc57b4869caf690f53618d60359c5133ec62a8 100644 +index 84a2c6c397604279ba821286f5c3c855e6041400..8b570b0c3967a22c085f390110cb29cbd9c8feff 100644 --- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java +++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java @@ -95,7 +95,7 @@ public class MinecraftServerGui extends JComponent { diff --git a/patches/unapplied/server/0342-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch similarity index 89% rename from patches/unapplied/server/0342-add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch index fe9e4dc449..17fa73f9af 100644 --- a/patches/unapplied/server/0342-add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 449dab3d6e16b2b0fcc78c9e1b7173c822be9c53..15c9150b7e48781268babe5915dc0e906645b341 100644 +index e2d74bf7e888b5161b210393e72c484058a3657b..fae07957147ee22a91d5da925e834a0495021958 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -402,13 +402,18 @@ public class CraftEventFactory { +@@ -401,13 +401,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/patches/unapplied/server/0343-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0332-Validate-tripwire-hook-placement-before-update.patch similarity index 86% rename from patches/unapplied/server/0343-Validate-tripwire-hook-placement-before-update.patch rename to patches/server/0332-Validate-tripwire-hook-placement-before-update.patch index 67e04f717c..bc1125b169 100644 --- a/patches/unapplied/server/0343-Validate-tripwire-hook-placement-before-update.patch +++ b/patches/server/0332-Validate-tripwire-hook-placement-before-update.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Validate tripwire hook placement before update diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -index eed36b6736a4f971022fdbce989da03f42794bb5..d9b3877257b31ca1b5acc4a47fbf5b993de69ae0 100644 +index bc4d324f086d815c139408629a561ea4d94c839b..8614fad5b3df7a6030384b108b1689bf6b9f1209 100644 --- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -@@ -188,6 +188,7 @@ public class TripWireHookBlock extends Block { +@@ -189,6 +189,7 @@ public class TripWireHookBlock extends Block { TripWireHookBlock.emitState(world, pos, flag4, flag5, flag2, flag3); if (!flag) { diff --git a/patches/unapplied/server/0344-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0333-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 86% rename from patches/unapplied/server/0344-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/0333-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index a422731e0f..e09ab64290 100644 --- a/patches/unapplied/server/0344-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/patches/server/0333-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -index ce83fe0b68fcb229dd37fe07e5f21b52a60c32de..6cfe0d6c46caa122db107c607d27a2bdcd82f7a8 100644 +index 3a51d3722ef8dba0e4b3ebcff0de8cede3bf3371..932fae98c551052cadba4c6fc6e575fc30a25d58 100644 --- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -@@ -325,7 +325,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -317,7 +317,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { BlockPos blockposition1 = blockposition.below(); BlockState iblockdata = world.getBlockState(blockposition1); diff --git a/patches/unapplied/server/0345-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0334-Configurable-chance-of-villager-zombie-infection.patch similarity index 88% rename from patches/unapplied/server/0345-Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/0334-Configurable-chance-of-villager-zombie-infection.patch index 66e2a4f6d4..b92d25bfea 100644 --- a/patches/unapplied/server/0345-Configurable-chance-of-villager-zombie-infection.patch +++ b/patches/server/0334-Configurable-chance-of-villager-zombie-infection.patch @@ -8,16 +8,14 @@ This allows you to solve an issue in vanilla behavior where: * On normal difficulty they will have a 50% of getting infected or dying. diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 2c8529540bf3644896f3c05d5f544bd848647807..408cbb80df72cf67e5228a76b7f267281e1752ab 100644 +index 7c206dc6f8db4b21d6d068eccc768203d041f51b..a2816b5334e962aee4beeac116e1c8543fa89808 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -452,12 +452,8 @@ public class Zombie extends Monster { +@@ -443,10 +443,8 @@ public class Zombie extends Monster { public boolean killedEntity(ServerLevel world, LivingEntity other) { boolean flag = super.killedEntity(world, other); -- if ((world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager) { -- Villager entityvillager = (Villager) other; -- +- if ((world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager entityvillager) { - if (world.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) { - return flag; - } diff --git a/patches/unapplied/server/0346-Optimise-Chunk-getFluid.patch b/patches/server/0335-Optimise-Chunk-getFluid.patch similarity index 93% rename from patches/unapplied/server/0346-Optimise-Chunk-getFluid.patch rename to patches/server/0335-Optimise-Chunk-getFluid.patch index 58ba0e4e5d..211f2b345f 100644 --- a/patches/unapplied/server/0346-Optimise-Chunk-getFluid.patch +++ b/patches/server/0335-Optimise-Chunk-getFluid.patch @@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it easier to inline due to code size diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 82b59b7c791216aaaaaaf2972f47bd21dac7a202..5403fc4fa2ed2526d2e67c230a46dd2a75e017be 100644 +index 963d86e7505e4d9c3854d35d9b59aed3369e8a57..744db9eec4f7bdeb32f83300960a7fce63b393d8 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -370,18 +370,20 @@ public class LevelChunk extends ChunkAccess { @@ -47,7 +47,7 @@ index 82b59b7c791216aaaaaaf2972f47bd21dac7a202..5403fc4fa2ed2526d2e67c230a46dd2a // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index 2d6daf76a56574c9727b404feb4f86347f04cbae..b606e33f8b64eaba28c008cc353d88aa45549e31 100644 +index 2c153af611399e884752f8256bee4fe32de5c572..90d1c3e23e753c29660f7d993b3c90ac022941c3 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -43,7 +43,7 @@ public class LevelChunkSection { diff --git a/patches/unapplied/server/0347-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0336-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/unapplied/server/0347-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/0336-Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/unapplied/server/0348-Add-tick-times-API-and-mspt-command.patch b/patches/server/0337-Add-tick-times-API-and-mspt-command.patch similarity index 91% rename from patches/unapplied/server/0348-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0337-Add-tick-times-API-and-mspt-command.patch index 0dd8f2ca3e..d73a4169a9 100644 --- a/patches/unapplied/server/0348-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0337-Add-tick-times-API-and-mspt-command.patch @@ -125,10 +125,10 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7 public static void registerCommands(final MinecraftServer server) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6342b7a3c4ccad528f026384da64e973e630f030..746eeb22127d8633f1eeef1bb9c20edb7fd23e5a 100644 +index fbe459664f93ec9d314cd305f1e3857710191cfd..a39753296a70a404b45dcb668ff42c1d88429e8e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 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 4d1d84383c11ef1e83edb50be62173533b7a641b..9af1877321356348ad96b92ae8c5f4811bef50ac 100644 +index 6c09cc91bc0d229761a4af1f1a1ec46f56ce1d65..6a30ae257158267918c7114494005be528ac05dc 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2224,7 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2181,7 +2181,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTrackingStart(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot - ServerLevel.this.getChunkSource().addEntity(entity); + // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true - if (entity instanceof ServerPlayer) { - ServerPlayer entityplayer = (ServerPlayer) entity; - -@@ -2259,6 +2259,7 @@ public class ServerLevel extends Level implements WorldGenLevel { + if (entity instanceof ServerPlayer entityplayer) { + ServerLevel.this.players.add(entityplayer); + ServerLevel.this.updateSleepingPlayerList(); +@@ -2211,6 +2211,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.inWorld = true; // CraftBukkit - Mark entity as in world entity.valid = true; // CraftBukkit diff --git a/patches/unapplied/server/0355-Don-t-tick-dead-players.patch b/patches/server/0344-Don-t-tick-dead-players.patch similarity index 85% rename from patches/unapplied/server/0355-Don-t-tick-dead-players.patch rename to patches/server/0344-Don-t-tick-dead-players.patch index ed79ba1216..742fc27e78 100644 --- a/patches/unapplied/server/0355-Don-t-tick-dead-players.patch +++ b/patches/server/0344-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 9f0d42256d1b41242bd08939f88583e2d337ede3..ca75d22e90fd879d464733813939f877ec875905 100644 +index 9f88d1771cefc4700911f1cd9841eb80fc7278a4..74e8aef45702eef0dcabc7841a7c7125cc066cbe 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -684,7 +684,7 @@ public class ServerPlayer extends Player { +@@ -748,7 +748,7 @@ public class ServerPlayer extends Player { public void doTick() { try { diff --git a/patches/unapplied/server/0356-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 84% rename from patches/unapplied/server/0356-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch index 78095e6dba..91235fa7aa 100644 --- a/patches/unapplied/server/0356-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 3c3c953f05c18279d3245fe6bc8afef83cd62cd1..603e003fbd39870a0e249151885b3b8f3e120afe 100644 +index 42911a87a9028a7ba8c3f63f498e4f15bcd07f24..8fe41d4291736fd8c45d73429062a597d54ac30b 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1153,7 +1153,7 @@ public abstract class Player extends LivingEntity { +@@ -1162,7 +1162,7 @@ public abstract class Player extends LivingEntity { @Override protected boolean isImmobile() { diff --git a/patches/unapplied/server/0357-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch similarity index 80% rename from patches/unapplied/server/0357-Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch index 58204fae45..39d7d103e4 100644 --- a/patches/unapplied/server/0357-Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch @@ -13,19 +13,19 @@ By skipping this, we avoid potential for a large spike on server start. public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ca75d22e90fd879d464733813939f877ec875905..04e54d2214d0ae0202490aceab54b8b10ef38229 100644 +index 74e8aef45702eef0dcabc7841a7c7125cc066cbe..618efe10752c968142fcc0f28a533d3515ef3367 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -337,7 +337,7 @@ public class ServerPlayer extends Player { +@@ -352,7 +352,7 @@ public class ServerPlayer extends Player { + this.server = server; this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); - this.setMaxUpStep(1.0F); - this.fudgeSpawnLocation(world); + // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn this.updateOptions(clientOptions); + this.object = null; - this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -571,7 +571,7 @@ public class ServerPlayer extends Player { +@@ -611,7 +611,7 @@ public class ServerPlayer extends Player { position = Vec3.atCenterOf(world.getSharedSpawnPos()); } this.setLevel(world); @@ -35,10 +35,10 @@ index ca75d22e90fd879d464733813939f877ec875905..04e54d2214d0ae0202490aceab54b8b1 this.gameMode.setLevel((ServerLevel) world); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6bd83549e2ff84b1bc993ef2be79a336ced28f67..8f23597eee06e721a25f7be3a5a65dff6a59ee55 100644 +index 03051e2252d7b871adc06dbbe48d2a90854c7adf..86d518f7c7b638802c08c896d758541ac6ab6176 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -227,6 +227,7 @@ public abstract class PlayerList { +@@ -226,6 +226,7 @@ public abstract class PlayerList { // Paper start - Entity#getEntitySpawnReason if (nbttagcompound == null) { player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login diff --git a/patches/unapplied/server/0358-Optimize-Pathfinding.patch b/patches/server/0347-Optimize-Pathfinding.patch similarity index 84% rename from patches/unapplied/server/0358-Optimize-Pathfinding.patch rename to patches/server/0347-Optimize-Pathfinding.patch index c4d6cafff0..281988ce37 100644 --- a/patches/unapplied/server/0358-Optimize-Pathfinding.patch +++ b/patches/server/0347-Optimize-Pathfinding.patch @@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 25a9f1fd69fbafab5129740e26e9741e35885ce0..e3a7eaf31ab19cc9f23a0c87649b74bb42976cb4 100644 +index 188904c9f0f81db1d63eec953d6746f2dc23dc81..2e9991e6b3c05584002744a2ee2579b1dba218b2 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -@@ -192,9 +192,29 @@ public abstract class PathNavigation { +@@ -192,13 +192,33 @@ public abstract class PathNavigation { return this.moveTo(this.createPath(x, y, z, 1), speed); } @@ -19,6 +19,10 @@ index 25a9f1fd69fbafab5129740e26e9741e35885ce0..e3a7eaf31ab19cc9f23a0c87649b74bb + private int pathfindFailures = 0; + // Paper end - Perf: Optimise pathfinding + + public boolean moveTo(double x, double y, double z, int distance, double speed) { + return this.moveTo(this.createPath(x, y, z, distance), speed); + } + public boolean moveTo(Entity entity, double speed) { + // Paper start - Perf: Optimise pathfinding + if (this.pathfindFailures > 10 && this.path == null && net.minecraft.server.MinecraftServer.currentTick < this.lastFailure + 40) { diff --git a/patches/unapplied/server/0359-Reduce-Either-Optional-allocation.patch b/patches/server/0348-Reduce-Either-Optional-allocation.patch similarity index 95% rename from patches/unapplied/server/0359-Reduce-Either-Optional-allocation.patch rename to patches/server/0348-Reduce-Either-Optional-allocation.patch index cafe54198d..d42e0ac184 100644 --- a/patches/unapplied/server/0359-Reduce-Either-Optional-allocation.patch +++ b/patches/server/0348-Reduce-Either-Optional-allocation.patch @@ -7,7 +7,7 @@ In order to get chunk values, we shouldn't need to create an optional each time. diff --git a/src/main/java/com/mojang/datafixers/util/Either.java b/src/main/java/com/mojang/datafixers/util/Either.java -index de524d485fada3c3cca8c2fe6c63db0e0b33dad8..a51e8e3eafff17f4f2ff790bf96a2f0e89abca2a 100644 +index 698ff6caf5924ce5c731254acd466c381c55c9b3..d54e617fc583ae7a045ebba8fde6bc5a486d73d5 100644 --- a/src/main/java/com/mojang/datafixers/util/Either.java +++ b/src/main/java/com/mojang/datafixers/util/Either.java @@ -22,7 +22,7 @@ public abstract class Either implements App, L> { diff --git a/patches/unapplied/server/0360-Reduce-memory-footprint-of-CompoundTag.patch b/patches/server/0349-Reduce-memory-footprint-of-CompoundTag.patch similarity index 93% rename from patches/unapplied/server/0360-Reduce-memory-footprint-of-CompoundTag.patch rename to patches/server/0349-Reduce-memory-footprint-of-CompoundTag.patch index 56beb848eb..55111ab6e8 100644 --- a/patches/unapplied/server/0360-Reduce-memory-footprint-of-CompoundTag.patch +++ b/patches/server/0349-Reduce-memory-footprint-of-CompoundTag.patch @@ -8,7 +8,7 @@ is important because we clone chunk data after reading it for safety. So, reduce the impact of the clone on GC. diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java -index 1e2f58f2f95c558ce28706c405050c4c5701dd40..c7945686a4ee50d7a9d5f1173aa90e456f68b410 100644 +index 1cbc42c44911b71dfadebc2d60e0e5cb9b6cafe6..df246d69591e1a5822a0109c99b0f67996da71fa 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java @@ -49,7 +49,7 @@ public class CompoundTag implements Tag { @@ -29,7 +29,7 @@ index 1e2f58f2f95c558ce28706c405050c4c5701dd40..c7945686a4ee50d7a9d5f1173aa90e45 } @Override -@@ -477,8 +477,16 @@ public class CompoundTag implements Tag { +@@ -481,8 +481,16 @@ public class CompoundTag implements Tag { @Override public CompoundTag copy() { diff --git a/patches/unapplied/server/0361-Prevent-opening-inventories-when-frozen.patch b/patches/server/0350-Prevent-opening-inventories-when-frozen.patch similarity index 89% rename from patches/unapplied/server/0361-Prevent-opening-inventories-when-frozen.patch rename to patches/server/0350-Prevent-opening-inventories-when-frozen.patch index f1f9ea6812..3cd9a7bd13 100644 --- a/patches/unapplied/server/0361-Prevent-opening-inventories-when-frozen.patch +++ b/patches/server/0350-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 04e54d2214d0ae0202490aceab54b8b10ef38229..3a856f28237246660665aef983e5e9fe2bac8c37 100644 +index 618efe10752c968142fcc0f28a533d3515ef3367..f6e4172f1c7ad38128e77e53f099e67a4c4be620 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -653,7 +653,7 @@ public class ServerPlayer extends Player { +@@ -693,7 +693,7 @@ public class ServerPlayer extends Player { containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate; } // Paper end - Configurable container update tick rate @@ -17,7 +17,7 @@ index 04e54d2214d0ae0202490aceab54b8b10ef38229..3a856f28237246660665aef983e5e9fe this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason this.containerMenu = this.inventoryMenu; } -@@ -1508,7 +1508,7 @@ public class ServerPlayer extends Player { +@@ -1592,7 +1592,7 @@ public class ServerPlayer extends Player { } else { // CraftBukkit start this.containerMenu = container; @@ -27,10 +27,10 @@ index 04e54d2214d0ae0202490aceab54b8b10ef38229..3a856f28237246660665aef983e5e9fe this.initMenu(container); return OptionalInt.of(this.containerCounter); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 0886cb3367022c4ab7e4dbebafb70fc651bcb9aa..35f03bea2b1206b420ac46dfd77811fb485c5319 100644 +index c79607a2f45b7a487a95cf98b9b0eb6b36501410..eb2d39d408e7f46a8f047a2b0d76981f24e1320a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -328,7 +328,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -326,7 +326,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(container.getBukkitView().getTitle()); // Paper //player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment @@ -39,7 +39,7 @@ index 0886cb3367022c4ab7e4dbebafb70fc651bcb9aa..35f03bea2b1206b420ac46dfd77811fb player.containerMenu = container; player.initMenu(container); } -@@ -402,7 +402,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -400,7 +400,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper //player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment diff --git a/patches/unapplied/server/0362-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 93% rename from patches/unapplied/server/0362-Don-t-run-entity-collision-code-if-not-needed.patch rename to patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch index 4fb9ce321f..9b172946c6 100644 --- a/patches/unapplied/server/0362-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch @@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide. Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 2a417145d9fe4d029cf3738f3320c0bcd3e025a9..e8410acb2f4be966177a0ec62fc93b8fe2cc0af3 100644 +index 67aa02a223345a91fe0b30b36966995e304c82bb..bca65fe3b38da83ce5f8fe67867b7cf19d02adbb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3419,10 +3419,24 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3506,10 +3506,24 @@ public abstract class LivingEntity extends Entity implements Attackable { if (this.level().isClientSide()) { this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush); } else { diff --git a/patches/unapplied/server/0363-Implement-Player-Client-Options-API.patch b/patches/server/0352-Implement-Player-Client-Options-API.patch similarity index 94% rename from patches/unapplied/server/0363-Implement-Player-Client-Options-API.patch rename to patches/server/0352-Implement-Player-Client-Options-API.patch index 7c7cf9b485..e321a0daa9 100644 --- a/patches/unapplied/server/0363-Implement-Player-Client-Options-API.patch +++ b/patches/server/0352-Implement-Player-Client-Options-API.patch @@ -87,19 +87,19 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3a856f28237246660665aef983e5e9fe2bac8c37..3d7a938f72424a4f30f75563393a953cf9f11933 100644 +index f6e4172f1c7ad38128e77e53f099e67a4c4be620..62bdc3016120271da2ca3a1f6ac46757e2e1dab4 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -338,7 +338,7 @@ public class ServerPlayer extends Player { +@@ -353,7 +353,7 @@ public class ServerPlayer extends Player { + this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); - this.setMaxUpStep(1.0F); // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn - this.updateOptions(clientOptions); + this.updateOptionsNoEvents(clientOptions); // Paper - don't call options events on login + this.object = null; this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper - -@@ -2004,7 +2004,23 @@ public class ServerPlayer extends Player { +@@ -2086,7 +2086,23 @@ public class ServerPlayer extends Player { } } @@ -123,7 +123,7 @@ index 3a856f28237246660665aef983e5e9fe2bac8c37..3d7a938f72424a4f30f75563393a953c // CraftBukkit start if (this.getMainArm() != clientOptions.mainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); -@@ -2016,6 +2032,11 @@ public class ServerPlayer extends Player { +@@ -2098,6 +2114,11 @@ public class ServerPlayer extends Player { this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper } // CraftBukkit end @@ -136,10 +136,10 @@ index 3a856f28237246660665aef983e5e9fe2bac8c37..3d7a938f72424a4f30f75563393a953c this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // Paper this.requestedViewDistance = clientOptions.viewDistance(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 314e01920fe0302441d2cc08a0098ff8fee263e5..587689c5d4f24c3cb40218b0a1e62e7d10a94a7a 100644 +index 356d814e09c4804dc32e320c01c26f4a059693da..665ba6c4b2f6968b1311217dad9c3306c0895c07 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -575,6 +575,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -650,6 +650,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message); } } diff --git a/patches/unapplied/server/0364-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0353-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 88% rename from patches/unapplied/server/0364-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/0353-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch index 7fee0acf0f..0859eed952 100644 --- a/patches/unapplied/server/0364-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch +++ b/patches/server/0353-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from I suspect it deals with teleporting as it uses players current x/y/z diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java -index 76005b3c48bfa323a77781c20c63708eeaa66b2b..4e1618462840a1378dbe6492696c97544815edf2 100644 +index e8640bcbc1d4e2965049974385585f5060cb6a44..c473cb1888e9ab0e91ba44f1439b81742758304e 100644 --- a/src/main/java/net/minecraft/server/level/DistanceManager.java +++ b/src/main/java/net/minecraft/server/level/DistanceManager.java -@@ -285,8 +285,8 @@ public abstract class DistanceManager { +@@ -284,8 +284,8 @@ public abstract class DistanceManager { ObjectSet objectset = (ObjectSet) this.playersPerChunk.get(i); if (objectset == null) return; // CraftBukkit - SPIGOT-6208 diff --git a/patches/unapplied/server/0365-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch b/patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch similarity index 80% rename from patches/unapplied/server/0365-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch rename to patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch index 79298e93c2..a655bcfc24 100644 --- a/patches/unapplied/server/0365-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch +++ b/patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch @@ -31,10 +31,10 @@ delays anymore. public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 2fba58fd5c9b17512eadacb899c59a04df5d415f..4c1dd470ac561f61d7f49adf90d273b1f293d296 100644 +index 66936834a80ef6b645ab44f3439defcb90237bfa..406c78dcb97d954f16f05d379d4dbf74c61c8fd1 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1459,6 +1459,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1476,6 +1476,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return; } // Paper end - ignore and warn about illegal addEntity calls instead of crashing server @@ -43,10 +43,10 @@ index 2fba58fd5c9b17512eadacb899c59a04df5d415f..4c1dd470ac561f61d7f49adf90d273b1 EntityType entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3d7a938f72424a4f30f75563393a953cf9f11933..b64b20312396638b8fd596bca3794863601d2bb4 100644 +index 62bdc3016120271da2ca3a1f6ac46757e2e1dab4..e3f73ccbc2d62eef386adc6c66428c6081a68b8b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -267,6 +267,7 @@ public class ServerPlayer extends Player { +@@ -283,6 +283,7 @@ public class ServerPlayer extends Player { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -55,10 +55,10 @@ index 3d7a938f72424a4f30f75563393a953cf9f11933..b64b20312396638b8fd596bca3794863 // CraftBukkit end public boolean isRealPlayer; // Paper diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8f23597eee06e721a25f7be3a5a65dff6a59ee55..c5614cc12789fdfad3519434e115a50c12844b3b 100644 +index 86d518f7c7b638802c08c896d758541ac6ab6176..e2e1ed794e4601b93cffb4ff7cc7a538f2d56cc9 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -296,6 +296,12 @@ public abstract class PlayerList { +@@ -297,6 +297,12 @@ public abstract class PlayerList { this.playersByUUID.put(player.getUUID(), player); // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below @@ -66,12 +66,12 @@ index 8f23597eee06e721a25f7be3a5a65dff6a59ee55..c5614cc12789fdfad3519434e115a50c + player.supressTrackerForLogin = true; + worldserver1.addNewPlayer(player); + this.server.getCustomBossEvents().onPlayerConnect(player); // see commented out section below worldserver.addPlayerJoin(entityplayer); -+ mountSavedVehicle(player, worldserver1, nbttagcompound); ++ this.mountSavedVehicle(player, worldserver1, optional); + // Paper end - Fire PlayerJoinEvent when Player is actually ready // CraftBukkit start CraftPlayer bukkitPlayer = player.getBukkitEntity(); -@@ -334,6 +340,8 @@ public abstract class PlayerList { +@@ -335,6 +341,8 @@ public abstract class PlayerList { player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1))); } player.sentListPacket = true; @@ -79,20 +79,21 @@ index 8f23597eee06e721a25f7be3a5a65dff6a59ee55..c5614cc12789fdfad3519434e115a50c + ((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - Fire PlayerJoinEvent when Player is actually ready; track entity now // CraftBukkit end - player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -356,6 +364,11 @@ public abstract class PlayerList { - playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect)); - } + player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn +@@ -356,7 +364,11 @@ public abstract class PlayerList { + playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect, false)); + } +- + // Paper start - Fire PlayerJoinEvent when Player is actually ready; move vehicle into method so it can be called above - short circuit around that code -+ onPlayerJoinFinish(player, worldserver1, s1); ++ this.onPlayerJoinFinish(player, worldserver1, s1); + } -+ private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, CompoundTag nbttagcompound) { ++ private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, Optional optional) { + // Paper end - Fire PlayerJoinEvent when Player is actually ready - if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) { - CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); - // CraftBukkit start -@@ -404,6 +417,10 @@ public abstract class PlayerList { + if (optional.isPresent() && ((CompoundTag) optional.get()).contains("RootVehicle", 10)) { + CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle"); + ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error +@@ -403,6 +415,10 @@ public abstract class PlayerList { } } diff --git a/patches/unapplied/server/0328-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/patches/unapplied/server/0328-Fix-last-firework-in-stack-not-having-effects-when-d.patch deleted file mode 100644 index 9aec8e51d9..0000000000 --- a/patches/unapplied/server/0328-Fix-last-firework-in-stack-not-having-effects-when-d.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Fri, 17 Jan 2020 18:44:55 -0800 -Subject: [PATCH] Fix last firework in stack not having effects when dispensed - -CB used the resulting item in the dispenser rather than the item -dispensed. The resulting item would have size == 0 and therefore -be convertered to air, hence why the effects disappeared. - -diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 42f541c609c3d94bee9b40b8e5307ad41a39c619..8c8d2e81f0866dc1441e181f2580852d87263bcc 100644 ---- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -516,7 +516,7 @@ public interface DispenseItemBehavior { - - itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); - Vec3 vec3d = DispenseItemBehavior.getEntityPokingOutOfBlockPos(pointer, EntityType.FIREWORK_ROCKET, enumdirection); -- FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.level(), stack, vec3d.x(), vec3d.y(), vec3d.z(), true); -+ FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.level(), itemstack1, vec3d.x(), vec3d.y(), vec3d.z(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed - - entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F); - pointer.level().addFreshEntity(entityfireworks); diff --git a/patches/unapplied/server/0332-Fix-items-vanishing-through-end-portal.patch b/patches/unapplied/server/0332-Fix-items-vanishing-through-end-portal.patch deleted file mode 100644 index b2763538f5..0000000000 --- a/patches/unapplied/server/0332-Fix-items-vanishing-through-end-portal.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AJMFactsheets -Date: Wed, 22 Jan 2020 19:52:28 -0600 -Subject: [PATCH] Fix items vanishing through end portal - -If the Paper configuration option "keep-spawn-loaded" is set to false, -items entering the overworld from the end will spawn at Y = 0. - -This is due to logic in the getHighestBlockYAt method in World.java -only searching the heightmap if the chunk is loaded. - -Quickly loading the exact world spawn chunk before searching the -heightmap resolves the issue without having to load all spawn chunks. - -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 257be4dd3f38c089dd970b9ac6f292b4f010a01c..98db75a013905ddd38ffd26d615ad8d02d8ddd22 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3363,6 +3363,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - if (flag1) { - blockposition1 = ServerLevel.END_SPAWN_POINT; - } else { -+ destination.getChunkAt(destination.getSharedSpawnPos()); // Paper - Ensure spawn chunk is always loaded before calculating Y coordinate - blockposition1 = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, destination.getSharedSpawnPos()); - } - // CraftBukkit start