org.bukkit.FireworkEffect#hasFlicker ( )源码实例Demo

下面列出了org.bukkit.FireworkEffect#hasFlicker ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Kettle   文件: CraftMetaFirework.java
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;
}
 
源代码2 项目: Thermos   文件: CraftMetaFirework.java
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;
}
 
 方法所在类
 同类方法