From 4cc7de6c51ea8dede78ce1d16a4ef583b0a5a01a Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sun, 23 Aug 2020 19:41:34 +0200 Subject: [PATCH] Add playPickupItemAnimation to LivingEntity --- ...yPickupItemAnimation-to-LivingEntity.patch | 39 +++++++++++++++++++ ...support.patch => 0221-Brand-support.patch} | 0 ...yPickupItemAnimation-to-LivingEntity.patch | 20 ++++++++++ ...h => 0560-Don-t-require-FACING-data.patch} | 0 ...eEvent-not-firing-for-all-use-cases.patch} | 0 ...PI.patch => 0562-Add-moon-phase-API.patch} | 0 ...headless-pistons-from-being-created.patch} | 0 ...support.patch => 0564-Brand-support.patch} | 0 ...patch => 0565-Buffer-joins-to-world.patch} | 0 9 files changed, 59 insertions(+) create mode 100644 Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch rename Spigot-API-Patches/{0220-Brand-support.patch => 0221-Brand-support.patch} (100%) create mode 100644 Spigot-Server-Patches/0559-Add-playPickupItemAnimation-to-LivingEntity.patch rename Spigot-Server-Patches/{0559-Don-t-require-FACING-data.patch => 0560-Don-t-require-FACING-data.patch} (100%) rename Spigot-Server-Patches/{0560-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch => 0561-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch} (100%) rename Spigot-Server-Patches/{0561-Add-moon-phase-API.patch => 0562-Add-moon-phase-API.patch} (100%) rename Spigot-Server-Patches/{0562-Prevent-headless-pistons-from-being-created.patch => 0563-Prevent-headless-pistons-from-being-created.patch} (100%) rename Spigot-Server-Patches/{0563-Brand-support.patch => 0564-Brand-support.patch} (100%) rename Spigot-Server-Patches/{0564-Buffer-joins-to-world.patch => 0565-Buffer-joins-to-world.patch} (100%) diff --git a/Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch b/Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch new file mode 100644 index 000000000..0c2373815 --- /dev/null +++ b/Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +Date: Sun, 23 Aug 2020 19:36:08 +0200 +Subject: [PATCH] Add playPickupItemAnimation to LivingEntity + + +diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java +index a60523cc9c05396ce5c3ebabd231f3ca374c3efe..bed428d1bae3d90da41531cf135b19f78cccb2db 100644 +--- a/src/main/java/org/bukkit/entity/LivingEntity.java ++++ b/src/main/java/org/bukkit/entity/LivingEntity.java +@@ -752,5 +752,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + * @param jumping entity jump state + */ + void setJumping(boolean jumping); ++ ++ /** ++ * Plays pickup item animation towards this entity. ++ *

++ * This will remove the item on the client. ++ *

++ * Quantity is inferred to be that of the {@link Item}. ++ * ++ * @param item item to pickup ++ */ ++ default void playPickupItemAnimation(@NotNull Item item) { ++ playPickupItemAnimation(item, item.getItemStack().getAmount()); ++ } ++ ++ /** ++ * Plays pickup item animation towards this entity. ++ *

++ * This will remove the item on the client. ++ * ++ * @param item item to pickup ++ * @param quantity quantity of item ++ */ ++ void playPickupItemAnimation(@NotNull Item item, int quantity); + // Paper end + } diff --git a/Spigot-API-Patches/0220-Brand-support.patch b/Spigot-API-Patches/0221-Brand-support.patch similarity index 100% rename from Spigot-API-Patches/0220-Brand-support.patch rename to Spigot-API-Patches/0221-Brand-support.patch diff --git a/Spigot-Server-Patches/0559-Add-playPickupItemAnimation-to-LivingEntity.patch b/Spigot-Server-Patches/0559-Add-playPickupItemAnimation-to-LivingEntity.patch new file mode 100644 index 000000000..927647be6 --- /dev/null +++ b/Spigot-Server-Patches/0559-Add-playPickupItemAnimation-to-LivingEntity.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +Date: Sun, 23 Aug 2020 19:36:22 +0200 +Subject: [PATCH] Add playPickupItemAnimation to LivingEntity + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +index 3777aba5f32f58f4620d4fe496af4e641ff8c858..e0ec715ef363867665ea14dc71e219c1023e0819 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +@@ -751,5 +751,9 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + } + } + ++ @Override ++ public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) { ++ getHandle().receive(((CraftItem) item).getHandle(), quantity); ++ } + // Paper end + } diff --git a/Spigot-Server-Patches/0559-Don-t-require-FACING-data.patch b/Spigot-Server-Patches/0560-Don-t-require-FACING-data.patch similarity index 100% rename from Spigot-Server-Patches/0559-Don-t-require-FACING-data.patch rename to Spigot-Server-Patches/0560-Don-t-require-FACING-data.patch diff --git a/Spigot-Server-Patches/0560-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/Spigot-Server-Patches/0561-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 100% rename from Spigot-Server-Patches/0560-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to Spigot-Server-Patches/0561-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch diff --git a/Spigot-Server-Patches/0561-Add-moon-phase-API.patch b/Spigot-Server-Patches/0562-Add-moon-phase-API.patch similarity index 100% rename from Spigot-Server-Patches/0561-Add-moon-phase-API.patch rename to Spigot-Server-Patches/0562-Add-moon-phase-API.patch diff --git a/Spigot-Server-Patches/0562-Prevent-headless-pistons-from-being-created.patch b/Spigot-Server-Patches/0563-Prevent-headless-pistons-from-being-created.patch similarity index 100% rename from Spigot-Server-Patches/0562-Prevent-headless-pistons-from-being-created.patch rename to Spigot-Server-Patches/0563-Prevent-headless-pistons-from-being-created.patch diff --git a/Spigot-Server-Patches/0563-Brand-support.patch b/Spigot-Server-Patches/0564-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0563-Brand-support.patch rename to Spigot-Server-Patches/0564-Brand-support.patch diff --git a/Spigot-Server-Patches/0564-Buffer-joins-to-world.patch b/Spigot-Server-Patches/0565-Buffer-joins-to-world.patch similarity index 100% rename from Spigot-Server-Patches/0564-Buffer-joins-to-world.patch rename to Spigot-Server-Patches/0565-Buffer-joins-to-world.patch