geforkt von Mirrors/Paper
57dd397155
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
27 Zeilen
1.3 KiB
Diff
27 Zeilen
1.3 KiB
Diff
From b967c96d5eaaf93c2d021e544619fad69145d61f 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 b6b7e3c6c9..3af686c7f1 100644
|
|
--- 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);
|
|
--
|
|
2.26.2
|
|
|