geforkt von Mirrors/Paper
SPIGOT-1541: Fix firework launching
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
343d04f7cd
Commit
aedd9af144
@ -1,5 +1,6 @@
|
|||||||
package org.bukkit.craftbukkit.entity;
|
package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
|
import com.google.common.base.Optional;
|
||||||
import net.minecraft.server.EntityFireworks;
|
import net.minecraft.server.EntityFireworks;
|
||||||
import net.minecraft.server.ItemStack;
|
import net.minecraft.server.ItemStack;
|
||||||
import net.minecraft.server.Items;
|
import net.minecraft.server.Items;
|
||||||
@ -14,7 +15,6 @@ import org.bukkit.inventory.meta.FireworkMeta;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class CraftFirework extends CraftEntity implements Firework {
|
public class CraftFirework extends CraftEntity implements Firework {
|
||||||
private static final int FIREWORK_ITEM_INDEX = 8;
|
|
||||||
|
|
||||||
private final Random random = new Random();
|
private final Random random = new Random();
|
||||||
private final CraftItemStack item;
|
private final CraftItemStack item;
|
||||||
@ -26,7 +26,7 @@ public class CraftFirework extends CraftEntity implements Firework {
|
|||||||
|
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
item = new ItemStack(Items.FIREWORKS);
|
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);
|
this.item = CraftItemStack.asCraftMirror(item);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren