From 3e4f7af5c8f59dcd37725e96fa8b483568981d08 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 23 Dec 2012 08:59:15 -0600 Subject: [PATCH] Properly update fireworks. Fixes BUKKIT-3289 By: feildmaster --- .../java/org/bukkit/craftbukkit/entity/CraftFirework.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java index 5c89ce7d71..1a576007d3 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -25,7 +25,7 @@ public class CraftFirework extends CraftEntity implements Firework { if (item == null) { item = new ItemStack(Item.FIREWORKS); - getHandle().getDataWatcher().watch(FIREWORK_ITEM_INDEX, item); + getHandle().getDataWatcher().a(FIREWORK_ITEM_INDEX, item); // register } this.item = CraftItemStack.asCraftMirror(item); @@ -60,5 +60,7 @@ public class CraftFirework extends CraftEntity implements Firework { // Copied from EntityFireworks constructor, update firework lifetime/power Random random = new Random(); getHandle().b = 10 * meta.getPower() + random.nextInt(6) + random.nextInt(7); + + getHandle().getDataWatcher().h(FIREWORK_ITEM_INDEX); // Update } }