diff --git a/patches/unapplied/server/Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/Ability-to-control-player-s-insomnia-and-phantoms.patch similarity index 100% rename from patches/unapplied/server/Ability-to-control-player-s-insomnia-and-phantoms.patch rename to patches/server/Ability-to-control-player-s-insomnia-and-phantoms.patch diff --git a/patches/unapplied/server/Add-BlockLockCheckEvent.patch b/patches/server/Add-BlockLockCheckEvent.patch similarity index 100% rename from patches/unapplied/server/Add-BlockLockCheckEvent.patch rename to patches/server/Add-BlockLockCheckEvent.patch diff --git a/patches/unapplied/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/unapplied/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/server/Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/unapplied/server/Add-Entity-Body-Yaw-API.patch b/patches/server/Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/unapplied/server/Add-Entity-Body-Yaw-API.patch rename to patches/server/Add-Entity-Body-Yaw-API.patch diff --git a/patches/unapplied/server/Add-EntityFertilizeEggEvent.patch b/patches/server/Add-EntityFertilizeEggEvent.patch similarity index 100% rename from patches/unapplied/server/Add-EntityFertilizeEggEvent.patch rename to patches/server/Add-EntityFertilizeEggEvent.patch diff --git a/patches/unapplied/server/Add-Shearable-API.patch b/patches/server/Add-Shearable-API.patch similarity index 100% rename from patches/unapplied/server/Add-Shearable-API.patch rename to patches/server/Add-Shearable-API.patch diff --git a/patches/unapplied/server/Add-Sneaking-API-for-Entities.patch b/patches/server/Add-Sneaking-API-for-Entities.patch similarity index 100% rename from patches/unapplied/server/Add-Sneaking-API-for-Entities.patch rename to patches/server/Add-Sneaking-API-for-Entities.patch diff --git a/patches/unapplied/server/Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/Add-config-option-for-spider-worldborder-climbing.patch similarity index 100% rename from patches/unapplied/server/Add-config-option-for-spider-worldborder-climbing.patch rename to patches/server/Add-config-option-for-spider-worldborder-climbing.patch diff --git a/patches/unapplied/server/Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/Add-missing-SpigotConfig-logCommands-check.patch similarity index 100% rename from patches/unapplied/server/Add-missing-SpigotConfig-logCommands-check.patch rename to patches/server/Add-missing-SpigotConfig-logCommands-check.patch diff --git a/patches/unapplied/server/Correctly-handle-ArmorStand-invisibility.patch b/patches/server/Correctly-handle-ArmorStand-invisibility.patch similarity index 100% rename from patches/unapplied/server/Correctly-handle-ArmorStand-invisibility.patch rename to patches/server/Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/unapplied/server/Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/Correctly-shrink-items-during-EntityResurrectEvent.patch similarity index 100% rename from patches/unapplied/server/Correctly-shrink-items-during-EntityResurrectEvent.patch rename to patches/server/Correctly-shrink-items-during-EntityResurrectEvent.patch diff --git a/patches/unapplied/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch similarity index 100% rename from patches/unapplied/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to patches/server/Expose-pre-collision-moving-velocity-to-VehicleBlock.patch diff --git a/patches/unapplied/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch similarity index 100% rename from patches/unapplied/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to patches/server/Fix-HumanEntity-drop-not-updating-the-client-inv.patch diff --git a/patches/unapplied/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch similarity index 100% rename from patches/unapplied/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch rename to patches/server/Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch diff --git a/patches/unapplied/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch similarity index 100% rename from patches/unapplied/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch rename to patches/server/Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch diff --git a/patches/unapplied/server/Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/unapplied/server/Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/server/Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/unapplied/server/Fix-advancement-triggers-for-entity-damage.patch b/patches/server/Fix-advancement-triggers-for-entity-damage.patch similarity index 100% rename from patches/unapplied/server/Fix-advancement-triggers-for-entity-damage.patch rename to patches/server/Fix-advancement-triggers-for-entity-damage.patch diff --git a/patches/unapplied/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch similarity index 100% rename from patches/unapplied/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to patches/server/Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch diff --git a/patches/unapplied/server/Fix-force-opening-enchantment-tables.patch b/patches/server/Fix-force-opening-enchantment-tables.patch similarity index 100% rename from patches/unapplied/server/Fix-force-opening-enchantment-tables.patch rename to patches/server/Fix-force-opening-enchantment-tables.patch diff --git a/patches/unapplied/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch b/patches/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch similarity index 98% rename from patches/unapplied/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch rename to patches/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch index fdf8cfe6c0..858eef8af9 100644 --- a/patches/unapplied/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch +++ b/patches/server/Fix-inconsistencies-in-dispense-events-regarding-sta.patch @@ -146,9 +146,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); @@ -0,0 +0,0 @@ public interface DispenseItemBehavior { } + ((Saddleable) list.get(0)).equipSaddle(itemstack1, SoundSource.BLOCKS); // CraftBukkit end - ((Saddleable) list.get(0)).equipSaddle(SoundSource.BLOCKS, CraftItemStack.asNMSCopy(event.getItem())); // Paper - Fix saddles losing nbt data - MC-191591 -- // itemstack.shrink(1); // CraftBukkit - handled above + if (shrink) stack.shrink(1); // Paper - actually handle here this.setSuccess(true); return stack; @@ -386,7 +385,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ArmorItem extends Item implements Equipable { } else { LivingEntity entityliving = (LivingEntity) list.get(0); - EquipmentSlot enumitemslot = Mob.getEquipmentSlotForItem(armor); + EquipmentSlot enumitemslot = entityliving.getEquipmentSlotForItem(armor); - ItemStack itemstack1 = armor.split(1); + ItemStack itemstack1 = armor.copyWithCount(1); // Paper - shrink below and single item in event // CraftBukkit start diff --git a/patches/unapplied/server/Fix-inventories-returning-null-Locations.patch b/patches/server/Fix-inventories-returning-null-Locations.patch similarity index 100% rename from patches/unapplied/server/Fix-inventories-returning-null-Locations.patch rename to patches/server/Fix-inventories-returning-null-Locations.patch diff --git a/patches/unapplied/server/Fix-premature-player-kicks-on-shutdown.patch b/patches/server/Fix-premature-player-kicks-on-shutdown.patch similarity index 96% rename from patches/unapplied/server/Fix-premature-player-kicks-on-shutdown.patch rename to patches/server/Fix-premature-player-kicks-on-shutdown.patch index 20d95b984c..c1cab33b17 100644 --- a/patches/unapplied/server/Fix-premature-player-kicks-on-shutdown.patch +++ b/patches/server/Fix-premature-player-kicks-on-shutdown.patch @@ -44,7 +44,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ; + } catch (io.papermc.paper.util.ServerStopRejectedExecutionException ignored) { // Paper - do not prematurely disconnect players on stop } catch (RejectedExecutionException rejectedexecutionexception) { - this.disconnect(Component.translatable("multiplayer.disconnect.server_shutdown")); + 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/unapplied/server/Fix-text-display-error-on-spawn.patch b/patches/server/Fix-text-display-error-on-spawn.patch similarity index 100% rename from patches/unapplied/server/Fix-text-display-error-on-spawn.patch rename to patches/server/Fix-text-display-error-on-spawn.patch diff --git a/patches/unapplied/server/Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/Fixes-and-additions-to-the-SpawnReason-API.patch similarity index 100% rename from patches/unapplied/server/Fixes-and-additions-to-the-SpawnReason-API.patch rename to patches/server/Fixes-and-additions-to-the-SpawnReason-API.patch diff --git a/patches/unapplied/server/Flying-Fall-Damage.patch b/patches/server/Flying-Fall-Damage.patch similarity index 95% rename from patches/unapplied/server/Flying-Fall-Damage.patch rename to patches/server/Flying-Fall-Damage.patch index 6c8b2884d3..4fc1d8e311 100644 --- a/patches/unapplied/server/Flying-Fall-Damage.patch +++ b/patches/server/Flying-Fall-Damage.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity { - public Entity currentExplosionCause; - public boolean ignoreFallDamageFromCurrentImpulse; + private boolean ignoreFallDamageFromCurrentImpulse; + private int currentImpulseContextResetGraceTime; public boolean affectsSpawning = true; // Paper - Affects Spawning API + public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage diff --git a/patches/unapplied/server/Friction-API.patch b/patches/server/Friction-API.patch similarity index 97% rename from patches/unapplied/server/Friction-API.patch rename to patches/server/Friction-API.patch index f452441c23..c03834d2f1 100644 --- a/patches/unapplied/server/Friction-API.patch +++ b/patches/server/Friction-API.patch @@ -51,8 +51,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + // Paper end - Friction API - if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { - this.getAttributes().load(nbt.getList("Attributes", 10)); + if (nbt.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) { + 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -137,10 +137,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - nmsStack.hurtAndBreakWithoutChecks(amount, this.getHandle(), slot); + nmsStack.hurtAndBreak(amount, this.getHandle(), slot, true); } // Paper end - ItemStack damage API -+ + // Paper start - friction API + @org.jetbrains.annotations.NotNull + @Override diff --git a/patches/unapplied/server/Improve-PortalEvents.patch b/patches/server/Improve-PortalEvents.patch similarity index 93% rename from patches/unapplied/server/Improve-PortalEvents.patch rename to patches/server/Improve-PortalEvents.patch index af29395d34..394de3b175 100644 --- a/patches/unapplied/server/Improve-PortalEvents.patch +++ b/patches/server/Improve-PortalEvents.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity(); Location enter = bukkitEntity.getLocation(); - Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld()); - EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius); + // Paper start diff --git a/patches/unapplied/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch similarity index 100% rename from patches/unapplied/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch rename to patches/server/Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch diff --git a/patches/unapplied/server/Improve-logging-and-errors.patch b/patches/server/Improve-logging-and-errors.patch similarity index 100% rename from patches/unapplied/server/Improve-logging-and-errors.patch rename to patches/server/Improve-logging-and-errors.patch diff --git a/patches/unapplied/server/Limit-pet-look-distance.patch b/patches/server/Limit-pet-look-distance.patch similarity index 61% rename from patches/unapplied/server/Limit-pet-look-distance.patch rename to patches/server/Limit-pet-look-distance.patch index 3e96c748b0..a9757e8621 100644 --- a/patches/unapplied/server/Limit-pet-look-distance.patch +++ b/patches/server/Limit-pet-look-distance.patch @@ -9,11 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java @@ -0,0 +0,0 @@ public class FollowOwnerGoal extends Goal { - - @Override public void tick() { -- this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float) this.tamable.getMaxHeadXRot()); -+ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float) this.tamable.getMaxHeadXRot()); // Paper - Limit pet look distance + boolean bl = this.tamable.shouldTryTeleportToOwner(); + if (!bl) { +- this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot()); ++ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot()); // Paper - Limit pet look distance + } + if (--this.timeToRecalcPath <= 0) { - this.timeToRecalcPath = this.adjustedTickDelay(10); - if (this.tamable.distanceToSqr((Entity) this.owner) >= 144.0D) { diff --git a/patches/unapplied/server/Player-Entity-Tracking-Events.patch b/patches/server/Player-Entity-Tracking-Events.patch similarity index 100% rename from patches/unapplied/server/Player-Entity-Tracking-Events.patch rename to patches/server/Player-Entity-Tracking-Events.patch diff --git a/patches/unapplied/server/Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/Remove-CraftItemStack-setAmount-null-assignment.patch similarity index 100% rename from patches/unapplied/server/Remove-CraftItemStack-setAmount-null-assignment.patch rename to patches/server/Remove-CraftItemStack-setAmount-null-assignment.patch diff --git a/patches/unapplied/server/Sync-offhand-slot-in-menus.patch b/patches/server/Sync-offhand-slot-in-menus.patch similarity index 97% rename from patches/unapplied/server/Sync-offhand-slot-in-menus.patch rename to patches/server/Sync-offhand-slot-in-menus.patch index 43a306598d..b14f879bd7 100644 --- a/patches/unapplied/server/Sync-offhand-slot-in-menus.patch +++ b/patches/server/Sync-offhand-slot-in-menus.patch @@ -11,7 +11,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } diff --git a/patches/unapplied/server/Treat-sequence-violations-like-they-should-be.patch b/patches/server/Treat-sequence-violations-like-they-should-be.patch similarity index 100% rename from patches/unapplied/server/Treat-sequence-violations-like-they-should-be.patch rename to patches/server/Treat-sequence-violations-like-they-should-be.patch diff --git a/patches/unapplied/server/Use-single-player-info-update-packet-on-join.patch b/patches/server/Use-single-player-info-update-packet-on-join.patch similarity index 100% rename from patches/unapplied/server/Use-single-player-info-update-packet-on-join.patch rename to patches/server/Use-single-player-info-update-packet-on-join.patch diff --git a/patches/unapplied/server/Win-Screen-API.patch b/patches/server/Win-Screen-API.patch similarity index 100% rename from patches/unapplied/server/Win-Screen-API.patch rename to patches/server/Win-Screen-API.patch diff --git a/patches/unapplied/server/config-for-disabling-entity-tag-tags.patch b/patches/server/config-for-disabling-entity-tag-tags.patch similarity index 100% rename from patches/unapplied/server/config-for-disabling-entity-tag-tags.patch rename to patches/server/config-for-disabling-entity-tag-tags.patch diff --git a/patches/unapplied/server/fix-Instruments.patch b/patches/server/fix-Instruments.patch similarity index 100% rename from patches/unapplied/server/fix-Instruments.patch rename to patches/server/fix-Instruments.patch