2020-02-07 04:07:34 +01:00
From 6a1b5bebc34a1721a9686b9bf5d8229e7c715201 Mon Sep 17 00:00:00 2001
2020-01-18 18:31:05 +01:00
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Fri, 17 Jan 2020 18:44:55 -0800
Subject: [PATCH] Fix last firework in stack not having effects when dispensed
- #2871
CB used the resulting item in the dispenser rather than the item
dispensed. The resulting item would have size == 0 and therefore
be convertered to air, hence why the effects disappeared.
diff --git a/src/main/java/net/minecraft/server/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java
2020-01-30 10:36:03 +01:00
index b6b7e3c6c..3af686c7f 100644
2020-01-18 18:31:05 +01:00
--- a/src/main/java/net/minecraft/server/IDispenseBehavior.java
+++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java
@@ -265,7 +265,7 @@ public interface IDispenseBehavior {
}
itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
- EntityFireworks entityfireworks = new EntityFireworks(isourceblock.getWorld(), itemstack, d3, d4, d5, true);
+ EntityFireworks entityfireworks = new EntityFireworks(isourceblock.getWorld(), itemstack1, d3, d4, d5, true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed
entityfireworks.shoot(d0, d1, d2, 0.5F, 1.0F);
isourceblock.getWorld().addEntity(entityfireworks);
--
2020-01-30 10:36:03 +01:00
2.25.0
2020-01-18 18:31:05 +01:00