mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
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.
This commit is contained in:
parent
d6efbad797
commit
7bd813abb0
1 changed files with 24 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
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
|
||||||
|
index 9a8be1474..02d2e9a84 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
||||||
|
@@ -0,0 +0,0 @@ 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);
|
||||||
|
--
|
Loading…
Reference in a new issue