summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-12-23 08:59:15 -0600
committerfeildmaster <admin@feildmaster.com>2012-12-23 08:59:15 -0600
commitedd90ccf16318ae3fd38eb7d02efd7f9424addae (patch)
tree25a9c4df62c4a3565ff4d803c71481a7d7147796 /src
parentced06463510e7836de72e259bcd17e8ab1629877 (diff)
downloadcraftbukkit-edd90ccf16318ae3fd38eb7d02efd7f9424addae.tar
craftbukkit-edd90ccf16318ae3fd38eb7d02efd7f9424addae.tar.gz
craftbukkit-edd90ccf16318ae3fd38eb7d02efd7f9424addae.tar.lz
craftbukkit-edd90ccf16318ae3fd38eb7d02efd7f9424addae.tar.xz
craftbukkit-edd90ccf16318ae3fd38eb7d02efd7f9424addae.zip
Properly update fireworks. Fixes BUKKIT-3289
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index 5c89ce7d..1a576007 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/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
}
}