diff --git a/patches/unapplied/server/0777-Fix-inconsistencies-in-dispense-events-regarding-sta.patch b/patches/later/0777-Fix-inconsistencies-in-dispense-events-regarding-sta.patch similarity index 100% rename from patches/unapplied/server/0777-Fix-inconsistencies-in-dispense-events-regarding-sta.patch rename to patches/later/0777-Fix-inconsistencies-in-dispense-events-regarding-sta.patch diff --git a/patches/unapplied/server/0766-check-global-player-list-where-appropriate.patch b/patches/server/0762-check-global-player-list-where-appropriate.patch similarity index 82% rename from patches/unapplied/server/0766-check-global-player-list-where-appropriate.patch rename to patches/server/0762-check-global-player-list-where-appropriate.patch index f777294a49..f64210126b 100644 --- a/patches/unapplied/server/0766-check-global-player-list-where-appropriate.patch +++ b/patches/server/0762-check-global-player-list-where-appropriate.patch @@ -7,10 +7,10 @@ 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 4bf6281a75597072b19658208e4447c4d1ee8ba2..688f9f13ae06337250e2e9ac2ddf9ad90d049f9b 100644 +index 4b2309d27867eddc50093e895503e02184e1b825..3eaeeb3ec715d92fe99e14c37e224cb1e80a467b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2302,4 +2302,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2383,4 +2383,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe entity.updateDynamicGameEventListener(DynamicGameEventListener::move); } } @@ -24,10 +24,10 @@ index 4bf6281a75597072b19658208e4447c4d1ee8ba2..688f9f13ae06337250e2e9ac2ddf9ad9 + // Paper end - check global player list where appropriate } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index e6d20887572817099cb863515978d3f06926be3d..f662a791e8cb045903a0de29778e5f30892fb766 100644 +index 16f349f8ce621c58f36f445016ea25d8af14910d..0a52f925b0ef28ca7cee067a40d5dc4d30c224b0 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3723,7 +3723,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3867,7 +3867,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void onItemPickup(ItemEntity item) { @@ -37,11 +37,11 @@ index e6d20887572817099cb863515978d3f06926be3d..f662a791e8cb045903a0de29778e5f30 if (entity instanceof ServerPlayer) { CriteriaTriggers.THROWN_ITEM_PICKED_UP_BY_ENTITY.trigger((ServerPlayer) entity, item.getItem(), this); diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -index f8c733961015ace508bfe14fd61d5188ca9d551b..e0dabbf6d7a87b8722769c78ef0d2ba4353ed2cb 100644 +index 533cb2eff3d56e7e8a70aba5e1047250e192bf2c..18c19e4b675000aacb74344909fc104964231008 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -269,7 +269,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { - entityvillager.finalizeSpawn(world, world.getCurrentDifficultyAt(entityvillager.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null); +@@ -262,7 +262,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + entityvillager.finalizeSpawn(world, world.getCurrentDifficultyAt(entityvillager.blockPosition()), EntitySpawnReason.CONVERSION, (SpawnGroupData) null); entityvillager.refreshBrain(world); if (this.conversionStarter != null) { - Player entityhuman = world.getPlayerByUUID(this.conversionStarter); @@ -50,10 +50,10 @@ index f8c733961015ace508bfe14fd61d5188ca9d551b..e0dabbf6d7a87b8722769c78ef0d2ba4 if (entityhuman instanceof ServerPlayer) { CriteriaTriggers.CURED_ZOMBIE_VILLAGER.trigger((ServerPlayer) entityhuman, this, entityvillager); diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java -index d465fb01af4c8610f83ecb9c68b83127cf7e95ae..bd20bea7f76a7307f1698fb2dfef37125032d166 100644 +index dac8305f1c897e6f82a2dde67c5b1b6b8b649b19..e185a33b5b1f8e8e0a0e666b24ba3e9186a8a7ff 100644 --- a/src/main/java/net/minecraft/world/level/EntityGetter.java +++ b/src/main/java/net/minecraft/world/level/EntityGetter.java -@@ -237,4 +237,11 @@ public interface EntityGetter { +@@ -165,4 +165,11 @@ public interface EntityGetter { return null; } @@ -66,7 +66,7 @@ index d465fb01af4c8610f83ecb9c68b83127cf7e95ae..bd20bea7f76a7307f1698fb2dfef3712 + // Paper end - check global player list where appropriate } diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java -index dd86f5ec5b2051aeea4e19ff97146362b1e8d019..0c6561e53db1b82f70dec00729d4d8a70c8fd4a1 100644 +index ea53c25c350c0cf8e0360ea409cd1f69a62054a8..275721d8b3d653b38af505dde30396c0b7b6a3da 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java @@ -105,6 +105,13 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi diff --git a/patches/unapplied/server/0767-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0763-Fix-async-entity-add-due-to-fungus-trees.patch similarity index 92% rename from patches/unapplied/server/0767-Fix-async-entity-add-due-to-fungus-trees.patch rename to patches/server/0763-Fix-async-entity-add-due-to-fungus-trees.patch index 2a7830d952..44c121394e 100644 --- a/patches/unapplied/server/0767-Fix-async-entity-add-due-to-fungus-trees.patch +++ b/patches/server/0763-Fix-async-entity-add-due-to-fungus-trees.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix async entity add due to fungus trees diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -index 13229388ddce668061a34c787ab9586d41854d8a..682c8cfbd917c086072f1756861a340800ea40da 100644 +index 5bf438bb58833c1df3620e82d3d2b90207366372..2e72e92762877b28dd908711671e1dfb933de9b0 100644 --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java @@ -237,6 +237,7 @@ public class WorldGenRegion implements WorldGenLevel { @@ -17,7 +17,7 @@ index 13229388ddce668061a34c787ab9586d41854d8a..682c8cfbd917c086072f1756861a3408 BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 3c1937b43b6834ae0ffdd8d22ac32a776bc7fb64..a14d3e6c43b94c543790571b13808713444a239f 100644 +index 6baa06dc0f102fe83b10015dbbe1410066961c82..29825ea687827c075b87e88c45672e7b0093ed17 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java @@ -261,10 +261,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { diff --git a/patches/unapplied/server/0768-ItemStack-damage-API.patch b/patches/server/0764-ItemStack-damage-API.patch similarity index 67% rename from patches/unapplied/server/0768-ItemStack-damage-API.patch rename to patches/server/0764-ItemStack-damage-API.patch index 1233d5fea9..f6d47719ca 100644 --- a/patches/unapplied/server/0768-ItemStack-damage-API.patch +++ b/patches/server/0764-ItemStack-damage-API.patch @@ -11,25 +11,36 @@ 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/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index bee59df6a8f30416f94c1a4fbd5e2629336e842f..e64cc91b416bbbefe6aadf1c6b685346cf258ab4 100644 +index bcb3a45166e5dd75dd727adf92304b3a75399c8d..d8dc3228f3cd8c9efc8359162edac601a87bf762 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -647,8 +647,13 @@ public final class ItemStack implements DataComponentHolder { +@@ -693,8 +693,13 @@ public final class ItemStack implements DataComponentHolder { } - public void hurtAndBreak(int amount, ServerLevel world, @Nullable LivingEntity player, Consumer breakCallback) { // Paper - Add EntityDamageItemEvent -+ // Paper start - add param to skip infinite mats check + public void hurtAndBreak(int amount, ServerLevel world, @Nullable LivingEntity player, Consumer breakCallback) { // Paper - Add EntityDamageItemEvent ++ // Paper start - add force boolean overload + this.hurtAndBreak(amount, world, player, breakCallback, false); + } -+ public void hurtAndBreak(int amount, ServerLevel world, @Nullable LivingEntity player, Consumer breakCallback, boolean force) { -+ // Paper end - add param to skip infinite mats check - if (this.isDamageableItem()) { -- if (player == null || !player.hasInfiniteMaterials()) { -+ if (player == null || !player.hasInfiniteMaterials() || force) { // Paper - if (amount > 0) { - int originalDamage = amount; // Paper - Expand PlayerItemDamageEvent - amount = EnchantmentHelper.processDurabilityChange(world, this, amount); -@@ -704,6 +709,11 @@ public final class ItemStack implements DataComponentHolder { ++ public void hurtAndBreak(int amount, ServerLevel world, @Nullable LivingEntity player, Consumer breakCallback, boolean force) { // Paper - Add EntityDamageItemEvent ++ // Paper end + int originalDamage = amount; // Paper - Expand PlayerItemDamageEvent +- int j = this.processDurabilityChange(amount, world, player); ++ int j = this.processDurabilityChange(amount, world, player, force); // Paper + // CraftBukkit start + if (player instanceof final ServerPlayer serverPlayer) { // Paper - Add EntityDamageItemEvent + PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), j, originalDamage); // Paper - Add EntityDamageItemEvent +@@ -725,8 +730,8 @@ public final class ItemStack implements DataComponentHolder { + + } + +- private int processDurabilityChange(int baseDamage, ServerLevel world, @Nullable LivingEntity player) { // Paper - Add EntityDamageItemEvent +- return !this.isDamageableItem() ? 0 : (player instanceof ServerPlayer && player.hasInfiniteMaterials() ? 0 : (baseDamage > 0 ? EnchantmentHelper.processDurabilityChange(world, this, baseDamage) : baseDamage)); // Paper - Add EntityDamageItemEvent ++ private int processDurabilityChange(int baseDamage, ServerLevel world, @Nullable LivingEntity player, boolean force) { // Paper - Add EntityDamageItemEvent ++ return !this.isDamageableItem() ? 0 : (player instanceof ServerPlayer && player.hasInfiniteMaterials() && !force ? 0 : (baseDamage > 0 ? EnchantmentHelper.processDurabilityChange(world, this, baseDamage) : baseDamage)); // Paper - Add EntityDamageItemEvent + } + + private void applyDamage(int damage, @Nullable LivingEntity player, Consumer breakCallback) { // Paper - Add EntityDamageItemEvent +@@ -766,6 +771,11 @@ public final class ItemStack implements DataComponentHolder { } public void hurtAndBreak(int amount, LivingEntity entity, EquipmentSlot slot) { @@ -41,7 +52,7 @@ index bee59df6a8f30416f94c1a4fbd5e2629336e842f..e64cc91b416bbbefe6aadf1c6b685346 Level world = entity.level(); if (world instanceof ServerLevel worldserver) { -@@ -716,8 +726,8 @@ public final class ItemStack implements DataComponentHolder { +@@ -778,8 +788,8 @@ public final class ItemStack implements DataComponentHolder { } this.hurtAndBreak(amount, worldserver, entity, (item) -> { // Paper - Add EntityDamageItemEvent @@ -53,10 +64,10 @@ index bee59df6a8f30416f94c1a4fbd5e2629336e842f..e64cc91b416bbbefe6aadf1c6b685346 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 2a7fffa71106327d0ffee632408d45faaec76702..2332f40fed84510741e63073aaf0a18aab85303e 100644 +index 4fa19ddb1414282020e118eea298d57d2bf42754..1ceaa081231a617bd87331b308c24d9c7a8dcf2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1135,4 +1135,48 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1154,4 +1154,48 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().knockback(strength, directionX, directionZ); }; // Paper end - knockback API diff --git a/patches/unapplied/server/0769-Friction-API.patch b/patches/server/0765-Friction-API.patch similarity index 89% rename from patches/unapplied/server/0769-Friction-API.patch rename to patches/server/0765-Friction-API.patch index dc735c46bb..ff71242367 100644 --- a/patches/unapplied/server/0769-Friction-API.patch +++ b/patches/server/0765-Friction-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Friction API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f662a791e8cb045903a0de29778e5f30892fb766..2bb61084b628582ded44926d7697ee26d0bb1e8e 100644 +index 0a52f925b0ef28ca7cee067a40d5dc4d30c224b0..abcb1065100597f66c9f76fdae5f873fa0d8f315 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -285,6 +285,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -298,6 +298,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public boolean bukkitPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event @@ -16,7 +16,7 @@ index f662a791e8cb045903a0de29778e5f30892fb766..2bb61084b628582ded44926d7697ee26 @Override public float getBukkitYaw() { -@@ -706,7 +707,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -724,7 +725,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public boolean shouldDiscardFriction() { @@ -25,7 +25,7 @@ index f662a791e8cb045903a0de29778e5f30892fb766..2bb61084b628582ded44926d7697ee26 } public void setDiscardFriction(boolean noDrag) { -@@ -774,6 +775,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -798,6 +799,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void addAdditionalSaveData(CompoundTag nbt) { @@ -37,7 +37,7 @@ index f662a791e8cb045903a0de29778e5f30892fb766..2bb61084b628582ded44926d7697ee26 nbt.putFloat("Health", this.getHealth()); nbt.putShort("HurtTime", (short) this.hurtTime); nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp); -@@ -817,6 +823,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -841,6 +847,16 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.internalSetAbsorptionAmount(absorptionAmount); // Paper end - Check for NaN @@ -55,7 +55,7 @@ index f662a791e8cb045903a0de29778e5f30892fb766..2bb61084b628582ded44926d7697ee26 this.getAttributes().load(nbt.getList("attributes", 10)); } 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 446c319524183d6a1b4d0e6f0613a8db690677da..cbfb07bdf8d5e2e5a462835184be2d47e59d506c 100644 +index aa41c4cf8d3ae291c4147118c96190ff0bb807b2..e83a705f54063a17fc69a22683333aacad5a43ce 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -63,6 +63,7 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -66,8 +66,8 @@ index 446c319524183d6a1b4d0e6f0613a8db690677da..cbfb07bdf8d5e2e5a462835184be2d47 public ItemEntity(EntityType type, Level world) { super(type, world); -@@ -185,7 +186,11 @@ public class ItemEntity extends Entity implements TraceableEntity { - this.move(MoverType.SELF, this.getDeltaMovement()); +@@ -186,7 +187,11 @@ public class ItemEntity extends Entity implements TraceableEntity { + this.applyEffectsFromBlocks(); float f = 0.98F; - if (this.onGround()) { @@ -79,7 +79,7 @@ index 446c319524183d6a1b4d0e6f0613a8db690677da..cbfb07bdf8d5e2e5a462835184be2d47 f = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F; } -@@ -393,6 +398,11 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -409,6 +414,11 @@ public class ItemEntity extends Entity implements TraceableEntity { @Override public void addAdditionalSaveData(CompoundTag nbt) { @@ -91,7 +91,7 @@ index 446c319524183d6a1b4d0e6f0613a8db690677da..cbfb07bdf8d5e2e5a462835184be2d47 nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); nbt.putShort("PickupDelay", (short) this.pickupDelay); -@@ -435,6 +445,17 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -451,6 +461,17 @@ public class ItemEntity extends Entity implements TraceableEntity { this.setItem(ItemStack.EMPTY); } @@ -133,10 +133,10 @@ 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 2332f40fed84510741e63073aaf0a18aab85303e..516ea1ec9ae5069c3c0e4708f62164a91960b627 100644 +index 1ceaa081231a617bd87331b308c24d9c7a8dcf2b..2fd4a3068d86a37cc18c9203448823c53d590ffb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1179,4 +1179,17 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1198,4 +1198,17 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { nmsStack.hurtAndBreak(amount, this.getHandle(), slot, true); } // Paper end - ItemStack damage API diff --git a/patches/unapplied/server/0770-Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/0766-Ability-to-control-player-s-insomnia-and-phantoms.patch similarity index 92% rename from patches/unapplied/server/0770-Ability-to-control-player-s-insomnia-and-phantoms.patch rename to patches/server/0766-Ability-to-control-player-s-insomnia-and-phantoms.patch index 03be2495a7..0b482955d5 100644 --- a/patches/unapplied/server/0770-Ability-to-control-player-s-insomnia-and-phantoms.patch +++ b/patches/server/0766-Ability-to-control-player-s-insomnia-and-phantoms.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Ability to control player's insomnia and phantoms diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java -index 302decdccd37c5579473c8fc33adda3956be7603..dca7b99e97f21bf6cfae6ee69eeac95d0bcf6863 100644 +index 721321a19ce056f82de2bef44a8791dc9d5b3418..6bf691fcc6486bde73bae30eff09142802c29eda 100644 --- a/src/main/java/net/minecraft/world/entity/EntitySelector.java +++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java -@@ -28,7 +28,18 @@ public final class EntitySelector { - return !entity.isSpectator(); +@@ -27,7 +27,18 @@ public final class EntitySelector { }; public static final Predicate CAN_BE_COLLIDED_WITH = EntitySelector.NO_SPECTATORS.and(Entity::canBeCollidedWith); + public static final Predicate CAN_BE_PICKED = EntitySelector.NO_SPECTATORS.and(Entity::isPickable); - public static Predicate IS_INSOMNIAC = (player) -> net.minecraft.util.Mth.clamp(((net.minecraft.server.level.ServerPlayer) player).getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= 72000; // Paper - Add phantom creative and insomniac controls + // Paper start - Ability to control player's insomnia and phantoms + public static Predicate IS_INSOMNIAC = (player) -> { @@ -29,7 +29,7 @@ index 302decdccd37c5579473c8fc33adda3956be7603..dca7b99e97f21bf6cfae6ee69eeac95d private EntitySelector() {} // Paper start - Affects Spawning API diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -index f74d41e57570a40cd5ce4da3076f3210b6594a63..1b1b475ca27e799e251d6f8a8c9fe1a4fd8bae83 100644 +index 7d407a7597f3ae576ac7e94bc2eb96d9dcd78dd3..021221da5d0315f6e371380a705ac6b3f6ac18d3 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java @@ -32,13 +32,22 @@ public class PhantomSpawner implements CustomSpawner { diff --git a/patches/unapplied/server/0771-Fix-premature-player-kicks-on-shutdown.patch b/patches/server/0767-Fix-premature-player-kicks-on-shutdown.patch similarity index 95% rename from patches/unapplied/server/0771-Fix-premature-player-kicks-on-shutdown.patch rename to patches/server/0767-Fix-premature-player-kicks-on-shutdown.patch index 034840341e..0eec1f8900 100644 --- a/patches/unapplied/server/0771-Fix-premature-player-kicks-on-shutdown.patch +++ b/patches/server/0767-Fix-premature-player-kicks-on-shutdown.patch @@ -47,10 +47,10 @@ index 4d9f1fc884050993287adfa4578a87da710623fb..a8dfe7a4b3d01bf75587be078f471d1e this.disconnect((Component) Component.translatable("multiplayer.disconnect.server_shutdown")); } catch (ClassCastException classcastexception) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bef05e09c654794405832ad75c3471f63399dfee..2cc22a9a5483c62cdf64870f5ce62b33018bef06 100644 +index 027d94dd08e7789b51c8779c65d4ddad4e62f21a..53c9be615a0f2939cd989e24e304e81e6e27f39d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2091,7 +2091,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { +@@ -26,9 +26,11 @@ public final class FluidState extends StateHolder { public static final Codec CODEC = codec(BuiltInRegistries.FLUID.byNameCodec(), Fluid::defaultFluidState).stable(); public static final int AMOUNT_MAX = 9; public static final int AMOUNT_FULL = 8; @@ -67,7 +67,7 @@ index 42370e5e6628ebf8216c01521af859706b08834b..14bb12d2a0066e8b020f2e0e670a7a5c } public Fluid getType() { -@@ -43,7 +45,7 @@ public final class FluidState extends StateHolder { +@@ -44,7 +46,7 @@ public final class FluidState extends StateHolder { } public boolean isEmpty() { diff --git a/patches/unapplied/server/0778-Add-BlockLockCheckEvent.patch b/patches/server/0773-Add-BlockLockCheckEvent.patch similarity index 96% rename from patches/unapplied/server/0778-Add-BlockLockCheckEvent.patch rename to patches/server/0773-Add-BlockLockCheckEvent.patch index 31fba739ae..b06f734eb2 100644 --- a/patches/unapplied/server/0778-Add-BlockLockCheckEvent.patch +++ b/patches/server/0773-Add-BlockLockCheckEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockLockCheckEvent diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -index bf9ae460bdfb247456b895f026f6a7a2e162c5f5..2ddf349fde5b310ec3f74baee1f3d33e09d5286c 100644 +index 4f397dd8e5d333cb2561d03d20511a9194314d1c..1f29b2419914ca9257db6553f01b7e7ec49bfc18 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java @@ -73,17 +73,44 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co @@ -56,7 +56,7 @@ index bf9ae460bdfb247456b895f026f6a7a2e162c5f5..2ddf349fde5b310ec3f74baee1f3d33e protected abstract NonNullList getItems(); diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index f8d432ef21e59796da4b11c9748ba151c54e5e04..b6633ca1ee73ef0f8a220992a2e0424e67dd9758 100644 +index edd6017937a7f20a1b43fa15204ec130b524b52b..2a7d896dd9a02acf6e3596e2e2e7ed50f4b88377 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -472,7 +472,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name diff --git a/patches/unapplied/server/0779-Add-Sneaking-API-for-Entities.patch b/patches/server/0774-Add-Sneaking-API-for-Entities.patch similarity index 85% rename from patches/unapplied/server/0779-Add-Sneaking-API-for-Entities.patch rename to patches/server/0774-Add-Sneaking-API-for-Entities.patch index aaee22c056..27bb5274f8 100644 --- a/patches/unapplied/server/0779-Add-Sneaking-API-for-Entities.patch +++ b/patches/server/0774-Add-Sneaking-API-for-Entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Sneaking API for Entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index f950102a324d07aeba260bfa82fe88728f2362e5..ac513d3162a0794f226abc80bff21c799fe5802c 100644 +index 775675483c1f90fbe8e9e5eadab7d791e81983f5..5e413803f9bdc898a9a644cb123363cbdf447ad8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -874,6 +874,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -875,6 +875,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return Pose.values()[this.getHandle().getPose().ordinal()]; } diff --git a/patches/unapplied/server/0780-Improve-logging-and-errors.patch b/patches/server/0775-Improve-logging-and-errors.patch similarity index 81% rename from patches/unapplied/server/0780-Improve-logging-and-errors.patch rename to patches/server/0775-Improve-logging-and-errors.patch index d2ccc7abed..4a5cccd9ae 100644 --- a/patches/unapplied/server/0780-Improve-logging-and-errors.patch +++ b/patches/server/0775-Improve-logging-and-errors.patch @@ -28,10 +28,10 @@ index 2665170b8391a77d6b3fb7ae7b5ccfc0be65acd7..e00d4e0896c0163c43d79af63338de67 private boolean tryInsert(AdvancementHolder advancement) { diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java -index 3255578c8c37d977bb6e89d27194a4dbff822014..2172e23b22b411fe79e930128bd43ac07becb620 100644 +index 0828deee077a08db8e3fe5c870f9c242b4c550cf..5c8cf225d936617b6c8d265527a19bdfa371a93b 100644 --- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java +++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java -@@ -69,6 +69,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener { +@@ -53,6 +53,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener { ++ // CraftBukkit end ++ ++ public static final DimensionTransition.PostDimensionTransition DO_NOTHING = (entity) -> { ++ }; ++ public static final DimensionTransition.PostDimensionTransition PLAY_PORTAL_SOUND = DimensionTransition::playPortalSound; ++ public static final DimensionTransition.PostDimensionTransition PLACE_PORTAL_TICKET = DimensionTransition::placePortalTicket; ++ ++ public DimensionTransition(ServerLevel world, Vec3 pos, Vec3 velocity, float yaw, float pitch, DimensionTransition.PostDimensionTransition postDimensionTransition) { ++ // CraftBukkit start ++ this(world, pos, velocity, yaw, pitch, postDimensionTransition, PlayerTeleportEvent.TeleportCause.UNKNOWN); ++ } ++ ++ public DimensionTransition(ServerLevel worldserver, Vec3 vec3d, Vec3 vec3d1, float f, float f1, DimensionTransition.PostDimensionTransition dimensiontransition_a, PlayerTeleportEvent.TeleportCause cause) { ++ this(worldserver, vec3d, vec3d1, f, f1, false, dimensiontransition_a, cause); ++ } ++ ++ public DimensionTransition(ServerLevel world, Entity entity, DimensionTransition.PostDimensionTransition postDimensionTransition) { ++ this(world, entity, postDimensionTransition, PlayerTeleportEvent.TeleportCause.UNKNOWN); ++ } ++ ++ public DimensionTransition(ServerLevel worldserver, Entity entity, DimensionTransition.PostDimensionTransition dimensiontransition_a, PlayerTeleportEvent.TeleportCause cause) { ++ this(worldserver, findAdjustedSharedSpawnPos(worldserver, entity), Vec3.ZERO, worldserver.getSharedSpawnAngle(), 0.0F, false, dimensiontransition_a, cause); // Paper - MC-200092 - fix spawn pos yaw being ignored ++ // CraftBukkit end ++ } ++ ++ private static void playPortalSound(Entity entity) { ++ if (entity instanceof ServerPlayer entityplayer) { ++ entityplayer.connection.send(new ClientboundLevelEventPacket(1032, BlockPos.ZERO, 0, false)); ++ } ++ ++ } ++ ++ private static void placePortalTicket(Entity entity) { ++ entity.placePortalTicket(BlockPos.containing(entity.position())); ++ } ++ ++ public static DimensionTransition missingRespawnBlock(ServerLevel world, Entity entity, DimensionTransition.PostDimensionTransition postDimensionTransition) { ++ return new DimensionTransition(world, findAdjustedSharedSpawnPos(world, entity), Vec3.ZERO, world.getSharedSpawnAngle(), 0.0F, true, postDimensionTransition); // Paper - MC-200092 - fix spawn pos yaw being ignored ++ } ++ ++ private static Vec3 findAdjustedSharedSpawnPos(ServerLevel world, Entity entity) { ++ return entity.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(); ++ } ++ ++ @FunctionalInterface ++ public interface PostDimensionTransition { ++ ++ void onTransition(Entity entity); ++ ++ default DimensionTransition.PostDimensionTransition then(DimensionTransition.PostDimensionTransition next) { ++ return (entity) -> { ++ this.onTransition(entity); ++ next.onTransition(entity); ++ }; ++ } ++ } ++} diff --git a/patches/unapplied/server/0782-Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/0777-Add-config-option-for-spider-worldborder-climbing.patch similarity index 93% rename from patches/unapplied/server/0782-Add-config-option-for-spider-worldborder-climbing.patch rename to patches/server/0777-Add-config-option-for-spider-worldborder-climbing.patch index 71e3939753..6d4efc38b6 100644 --- a/patches/unapplied/server/0782-Add-config-option-for-spider-worldborder-climbing.patch +++ b/patches/server/0777-Add-config-option-for-spider-worldborder-climbing.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add config option for spider worldborder climbing diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java -index c80019f0c9f814c5259b4d3ec2d8a85669dc728f..f91ea9ac5a0d0d3bae5d1eb0c409f4f9c4e5a62b 100644 +index ba4dfa26f4d54abe9ecbacfe1f409a34fb769579..6c2d4c2163cf299c0943af21d4dc367b5677c089 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Spider.java +++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java @@ -82,7 +82,7 @@ public class Spider extends Monster { diff --git a/patches/unapplied/server/0783-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0778-Add-missing-SpigotConfig-logCommands-check.patch similarity index 89% rename from patches/unapplied/server/0783-Add-missing-SpigotConfig-logCommands-check.patch rename to patches/server/0778-Add-missing-SpigotConfig-logCommands-check.patch index 9c86e0000a..2e59f69e05 100644 --- a/patches/unapplied/server/0783-Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/0778-Add-missing-SpigotConfig-logCommands-check.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check Co-authored-by: david diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6b869ff834af1e02f55683b3399d40bee0518bf1..a2a7d499a68841ecd76ba029298094993a82bf39 100644 +index 1a9003f703f6911e37a086f490d4d65ab9d27014..e29cae56ddeb019d2ffd8dad412fd32e4db67091 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2057,7 +2057,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2070,7 +2070,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private void performUnsignedChatCommand(String command) { // CraftBukkit start String command1 = "/" + command; @@ -19,7 +19,7 @@ index 6b869ff834af1e02f55683b3399d40bee0518bf1..a2a7d499a68841ecd76ba02929809499 PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command1, new LazyPlayerSet(this.server)); this.cserver.getPluginManager().callEvent(event); -@@ -2097,7 +2099,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2110,7 +2112,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) { // CraftBukkit start String command = "/" + packet.command(); diff --git a/patches/unapplied/server/0784-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/0779-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch similarity index 100% rename from patches/unapplied/server/0784-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch rename to patches/server/0779-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch diff --git a/patches/unapplied/server/0785-Flying-Fall-Damage.patch b/patches/server/0780-Flying-Fall-Damage.patch similarity index 87% rename from patches/unapplied/server/0785-Flying-Fall-Damage.patch rename to patches/server/0780-Flying-Fall-Damage.patch index cee20a07da..d3c19b0590 100644 --- a/patches/unapplied/server/0785-Flying-Fall-Damage.patch +++ b/patches/server/0780-Flying-Fall-Damage.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Flying Fall Damage 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 ad334f149fe1b44d4ebe48489dcd2811ff1b5cd0..950ce40d268d89ff3c503116081db6c9ccd65329 100644 +index 30e0a5fe3f9bd85d2b702c2c877c5682ed35d461..aca888c2f02b09ac6739bdc81b194c4527dd69f5 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -196,6 +196,7 @@ public abstract class Player extends LivingEntity { @@ -16,7 +16,7 @@ index ad334f149fe1b44d4ebe48489dcd2811ff1b5cd0..950ce40d268d89ff3c503116081db6c9 // CraftBukkit start public boolean fauxSleeping; -@@ -1693,7 +1694,7 @@ public abstract class Player extends LivingEntity { +@@ -1651,7 +1652,7 @@ public abstract class Player extends LivingEntity { @Override public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { @@ -26,10 +26,10 @@ index ad334f149fe1b44d4ebe48489dcd2811ff1b5cd0..950ce40d268d89ff3c503116081db6c9 } else { if (fallDistance >= 2.0F) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 111b90f97f631369acfb76278da26de94a4740bf..fdf6c3f1f8f79dd20e1363ef472f97fe98c9799e 100644 +index 2a0ca017130a76aff3f15064a334cc0be501d782..83a121331e3922ed8b90e530c2495bf19406c08d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2581,6 +2581,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2594,6 +2594,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().onUpdateAbilities(); } diff --git a/patches/unapplied/server/0786-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0781-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch similarity index 82% rename from patches/unapplied/server/0786-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to patches/server/0781-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch index 80118a6499..7da0a4ef65 100644 --- a/patches/unapplied/server/0786-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch +++ b/patches/server/0781-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Expose pre-collision moving velocity to diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 303f3656be5e9049cd195030c457df9a7c718b66..34e175b28f7c9120b58fc8e2b65ca978c7f301b5 100644 +index 960b3541140bfe36fda5cdb43e3408bbc9db5fde..2c959a99376ed479415354c481801643c5f6b1a1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -942,6 +942,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -968,6 +968,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } - public void move(MoverType movementType, Vec3 movement) { + public void move(MoverType type, Vec3 movement) { + final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity if (this.noPhysics) { this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); } else { -@@ -1026,7 +1027,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1059,7 +1060,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } if (!bl.getType().isAir()) { diff --git a/patches/unapplied/server/0787-config-for-disabling-entity-tag-tags.patch b/patches/server/0782-config-for-disabling-entity-tag-tags.patch similarity index 89% rename from patches/unapplied/server/0787-config-for-disabling-entity-tag-tags.patch rename to patches/server/0782-config-for-disabling-entity-tag-tags.patch index aabc1e1a31..c3be8a0eea 100644 --- a/patches/unapplied/server/0787-config-for-disabling-entity-tag-tags.patch +++ b/patches/server/0782-config-for-disabling-entity-tag-tags.patch @@ -5,10 +5,10 @@ Subject: [PATCH] config for disabling entity tag tags diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index c0062c8f83641ff30e79a309c0bb9930ba4b422a..5fb3279342506611882b5780cfbee0371919c93c 100644 +index ab02f4ca0bb8cd4939f167b410db208e38f7102b..6b2f0a4bc911888b72b796099760af38b1e28656 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -502,6 +502,16 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -579,6 +579,16 @@ public class EntityType implements FeatureElement, EntityTypeT if (minecraftserver != null && entity != null) { if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) { diff --git a/patches/unapplied/server/0788-Use-single-player-info-update-packet-on-join.patch b/patches/server/0783-Use-single-player-info-update-packet-on-join.patch similarity index 89% rename from patches/unapplied/server/0788-Use-single-player-info-update-packet-on-join.patch rename to patches/server/0783-Use-single-player-info-update-packet-on-join.patch index bbf8785310..14893c3080 100644 --- a/patches/unapplied/server/0788-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0783-Use-single-player-info-update-packet-on-join.patch @@ -5,10 +5,10 @@ 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 a2a7d499a68841ecd76ba029298094993a82bf39..a6f58438badb0bdeab67706f4a8e519b202623fe 100644 +index e29cae56ddeb019d2ffd8dad412fd32e4db67091..d77ab963802fcd7551058987a534ba54f080027a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3436,7 +3436,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3481,7 +3481,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID()); this.chatMessageChain.append(() -> { this.player.setChatSession(session); @@ -18,10 +18,10 @@ index a2a7d499a68841ecd76ba029298094993a82bf39..a6f58438badb0bdeab67706f4a8e519b } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 38b9ab369e25e4b718418375f76e782283b48411..bd67245393f512264db774e0b855db0ce925a3f4 100644 +index 8e71eeb5be2df1352447f3662a6d092a7db9e2d0..4fe3024e26b56c2d796acf703a1bc200ff309f09 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -361,6 +361,7 @@ public abstract class PlayerList { +@@ -365,6 +365,7 @@ public abstract class PlayerList { // CraftBukkit start - sendAll above replaced with this loop ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player)); @@ -29,7 +29,7 @@ index 38b9ab369e25e4b718418375f76e782283b48411..bd67245393f512264db774e0b855db0c for (int i = 0; i < this.players.size(); ++i) { ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i); -@@ -368,12 +369,17 @@ public abstract class PlayerList { +@@ -372,12 +373,17 @@ public abstract class PlayerList { entityplayer1.connection.send(packet); } diff --git a/patches/unapplied/server/0789-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0784-Correctly-shrink-items-during-EntityResurrectEvent.patch similarity index 92% rename from patches/unapplied/server/0789-Correctly-shrink-items-during-EntityResurrectEvent.patch rename to patches/server/0784-Correctly-shrink-items-during-EntityResurrectEvent.patch index e7b31c3642..48eae9b3ec 100644 --- a/patches/unapplied/server/0789-Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/0784-Correctly-shrink-items-during-EntityResurrectEvent.patch @@ -22,10 +22,10 @@ This patch corrects this behaviour by only shrinking the item if a totem of undying was found and the event was called uncancelled. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 2bb61084b628582ded44926d7697ee26d0bb1e8e..9e58a85a7de53b17fa149ae0b4951baa351d99db 100644 +index abcb1065100597f66c9f76fdae5f873fa0d8f315..447fb76a3eb1505b1ef1e1aed8a11239c0124f4f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1632,7 +1632,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1674,7 +1674,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.level().getCraftServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { diff --git a/patches/unapplied/server/0790-Win-Screen-API.patch b/patches/server/0785-Win-Screen-API.patch similarity index 88% rename from patches/unapplied/server/0790-Win-Screen-API.patch rename to patches/server/0785-Win-Screen-API.patch index 567b2236d9..330a77aa21 100644 --- a/patches/unapplied/server/0790-Win-Screen-API.patch +++ b/patches/server/0785-Win-Screen-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API public net.minecraft.server.level.ServerPlayer seenCredits diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fdf6c3f1f8f79dd20e1363ef472f97fe98c9799e..06a3ccb90f23fc357e5cbc6e9173baab4b218955 100644 +index 83a121331e3922ed8b90e530c2495bf19406c08d..76d8f0d390abf588886b42b6d2e3ed6f79a4d991 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1305,6 +1305,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1318,6 +1318,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } diff --git a/patches/unapplied/server/0791-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0786-Remove-CraftItemStack-setAmount-null-assignment.patch similarity index 88% rename from patches/unapplied/server/0791-Remove-CraftItemStack-setAmount-null-assignment.patch rename to patches/server/0786-Remove-CraftItemStack-setAmount-null-assignment.patch index 5b5c421ff2..aa0acd564f 100644 --- a/patches/unapplied/server/0791-Remove-CraftItemStack-setAmount-null-assignment.patch +++ b/patches/server/0786-Remove-CraftItemStack-setAmount-null-assignment.patch @@ -16,10 +16,10 @@ with less than zero amounts, so this code doesn't create a problem with operations on the vanilla ItemStack. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 08178a88ba7d0881a6c2843eef24a846cf07adb4..4d29c34e221b749b6972c7ed79ac1f86da999ed7 100644 +index 502be683e8b04a9966043c9bee9d9fe793b12ef5..134db8c2dd72d0651fc889cc8931e7c971f62deb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -186,7 +186,7 @@ public final class CraftItemStack extends ItemStack { +@@ -198,7 +198,7 @@ public final class CraftItemStack extends ItemStack { } this.handle.setCount(amount);