mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-1541: Fix firework launching
By: md_5 <git@md-5.net>
This commit is contained in:
parent
343d04f7cd
commit
aedd9af144
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import net.minecraft.server.EntityFireworks;
|
||||
import net.minecraft.server.ItemStack;
|
||||
import net.minecraft.server.Items;
|
||||
|
@ -14,7 +15,6 @@ import org.bukkit.inventory.meta.FireworkMeta;
|
|||
import java.util.Random;
|
||||
|
||||
public class CraftFirework extends CraftEntity implements Firework {
|
||||
private static final int FIREWORK_ITEM_INDEX = 8;
|
||||
|
||||
private final Random random = new Random();
|
||||
private final CraftItemStack item;
|
||||
|
@ -26,7 +26,7 @@ public class CraftFirework extends CraftEntity implements Firework {
|
|||
|
||||
if (item == null) {
|
||||
item = new ItemStack(Items.FIREWORKS);
|
||||
getHandle().getDataWatcher().register(EntityFireworks.FIREWORK_ITEM, item);
|
||||
getHandle().getDataWatcher().set(EntityFireworks.FIREWORK_ITEM, Optional.of(item));
|
||||
}
|
||||
|
||||
this.item = CraftItemStack.asCraftMirror(item);
|
||||
|
|
Loading…
Add table
Reference in a new issue