下面列出了org.bukkit.FireworkEffect#hasFlicker ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
static NBTTagCompound getExplosion(FireworkEffect effect) {
NBTTagCompound explosion = new NBTTagCompound();
if (effect.hasFlicker()) {
explosion.setBoolean(EXPLOSION_FLICKER.NBT, true);
}
if (effect.hasTrail()) {
explosion.setBoolean(EXPLOSION_TRAIL.NBT, true);
}
addColors(explosion, EXPLOSION_COLORS, effect.getColors());
addColors(explosion, EXPLOSION_FADE, effect.getFadeColors());
explosion.setByte(EXPLOSION_TYPE.NBT, (byte) getNBT(effect.getType()));
return explosion;
}
static net.minecraft.nbt.NBTTagCompound getExplosion(FireworkEffect effect) {
net.minecraft.nbt.NBTTagCompound explosion = new net.minecraft.nbt.NBTTagCompound();
if (effect.hasFlicker()) {
explosion.setBoolean(EXPLOSION_FLICKER.NBT, true);
}
if (effect.hasTrail()) {
explosion.setBoolean(EXPLOSION_TRAIL.NBT, true);
}
addColors(explosion, EXPLOSION_COLORS, effect.getColors());
addColors(explosion, EXPLOSION_FADE, effect.getFadeColors());
explosion.setByte(EXPLOSION_TYPE.NBT, (byte) getNBT(effect.getType()));
return explosion;
}