aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2022-10-26 17:44:28 -0700
committerGitHub <[email protected]>2022-10-26 17:44:28 -0700
commit32d95e9bab7ff60bdd738eb71adf3c11052c10d3 (patch)
tree68aa5a5bd65f211bf2294695ffc3890a3702fca8
parent954e6f00f3b144bcdc7520dd4693f0bda5b9469d (diff)
downloadPaper-32d95e9bab7ff60bdd738eb71adf3c11052c10d3.tar.gz
Paper-32d95e9bab7ff60bdd738eb71adf3c11052c10d3.zip
Track projectile source for fireworks from dispensers (#8044)
-rw-r--r--patches/server/0934-Track-projectile-source-for-fireworks-from-dispenser.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0934-Track-projectile-source-for-fireworks-from-dispenser.patch b/patches/server/0934-Track-projectile-source-for-fireworks-from-dispenser.patch
new file mode 100644
index 0000000000..79d456a58f
--- /dev/null
+++ b/patches/server/0934-Track-projectile-source-for-fireworks-from-dispenser.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Thu, 23 Jun 2022 19:25:51 -0700
+Subject: [PATCH] Track projectile source for fireworks from dispensers
+
+
+diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+index 3d2b5f040715a0e4fac0e6786bd11a4d715330ce..9d601bf258a6d209a889afa7ba7f839c01f83cd8 100644
+--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
++++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+@@ -511,6 +511,7 @@ public interface DispenseItemBehavior {
+
+ itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
+ FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.getLevel(), itemstack1, pointer.x(), pointer.y(), pointer.x(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed
++ entityfireworks.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(pointer.getEntity()); // Paper - track projectile source for fireworks
+
+ DispenseItemBehavior.setEntityPokingOutOfBlock(pointer, entityfireworks, enumdirection);
+ entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F);