diff options
author | maxcom1 <[email protected]> | 2024-03-23 22:26:17 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-23 17:26:17 -0400 |
commit | b6001403e9703cadaa6e8c8558e732b91c3c6d6e (patch) | |
tree | a8c57bbc334a8ad48d4ad2b43db335667b142bee /patches/server/0804-Track-projectile-source-for-fireworks-from-dispenser.patch | |
parent | 9ec7dfcbc41c6e625de0050b6997160a75df9f44 (diff) | |
download | Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.tar.gz Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.zip |
Add methods to change entity physics (#10334)
Diffstat (limited to 'patches/server/0804-Track-projectile-source-for-fireworks-from-dispenser.patch')
-rw-r--r-- | patches/server/0804-Track-projectile-source-for-fireworks-from-dispenser.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0804-Track-projectile-source-for-fireworks-from-dispenser.patch b/patches/server/0804-Track-projectile-source-for-fireworks-from-dispenser.patch new file mode 100644 index 0000000000..b78dda85fc --- /dev/null +++ b/patches/server/0804-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 b4f7e3ae855cbf48925f0db916501adf513ae08c..24b2d57ebe76ce825686a53c94ae994b418a1272 100644 +--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java ++++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +@@ -517,6 +517,7 @@ public interface DispenseItemBehavior { + itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); + Vec3 vec3d = DispenseItemBehavior.getEntityPokingOutOfBlockPos(pointer, EntityType.FIREWORK_ROCKET, enumdirection); + 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.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(pointer.blockEntity()); // Paper - Track projectile source for fireworks from dispensers + + entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F); + pointer.level().addFreshEntity(entityfireworks); |