Java 类org.bukkit.potion.PotionBrewer 实例源码

项目:CraftBukkit    文件:CraftPotionBrewer.java   
public Collection<PotionEffect> getEffectsFromDamage(int damage) {
    if (cache.containsKey(damage))
        return cache.get(damage);

    List<?> mcEffects = net.minecraft.server.PotionBrewer.getEffects(damage, false);
    List<PotionEffect> effects = new ArrayList<PotionEffect>();
    if (mcEffects == null)
        return effects;

    for (Object raw : mcEffects) {
        if (raw == null || !(raw instanceof MobEffect))
            continue;
        MobEffect mcEffect = (MobEffect) raw;
        PotionEffect effect = new PotionEffect(PotionEffectType.getById(mcEffect.getEffectId()),
                mcEffect.getDuration(), mcEffect.getAmplifier());
        // Minecraft PotionBrewer applies duration modifiers automatically.
        effects.add(effect);
    }

    cache.put(damage, effects);

    return effects;
}
项目:Craftbukkit    文件:CraftPotionBrewer.java   
public Collection<PotionEffect> getEffectsFromDamage(int damage) {
    if (cache.containsKey(damage))
        return cache.get(damage);

    List<?> mcEffects = net.minecraft.server.PotionBrewer.getEffects(damage, false);
    List<PotionEffect> effects = new ArrayList<PotionEffect>();
    if (mcEffects == null)
        return effects;

    for (Object raw : mcEffects) {
        if (raw == null || !(raw instanceof MobEffect))
            continue;
        MobEffect mcEffect = (MobEffect) raw;
        PotionEffect effect = new PotionEffect(PotionEffectType.getById(mcEffect.getEffectId()),
                mcEffect.getDuration(), mcEffect.getAmplifier());
        // Minecraft PotionBrewer applies duration modifiers automatically.
        effects.add(effect);
    }

    cache.put(damage, effects);

    return effects;
}
项目:Almura-Server    文件:CraftPotionBrewer.java   
public Collection<PotionEffect> getEffectsFromDamage(int damage) {
    if (cache.containsKey(damage))
        return cache.get(damage);

    List<?> mcEffects = net.minecraft.server.PotionBrewer.getEffects(damage, false);
    List<PotionEffect> effects = new ArrayList<PotionEffect>();
    if (mcEffects == null)
        return effects;

    for (Object raw : mcEffects) {
        if (raw == null || !(raw instanceof MobEffect))
            continue;
        MobEffect mcEffect = (MobEffect) raw;
        PotionEffect effect = new PotionEffect(PotionEffectType.getById(mcEffect.getEffectId()),
                mcEffect.getDuration(), mcEffect.getAmplifier());
        // Minecraft PotionBrewer applies duration modifiers automatically.
        effects.add(effect);
    }

    cache.put(damage, effects);

    return effects;
}
项目:Tweakkit-Server    文件:CraftPotionBrewer.java   
public Collection<PotionEffect> getEffectsFromDamage(int damage) {
    if (cache.containsKey(damage))
        return cache.get(damage);

    List<?> mcEffects = net.minecraft.server.PotionBrewer.getEffects(damage, false);
    List<PotionEffect> effects = new ArrayList<PotionEffect>();
    if (mcEffects == null)
        return effects;

    for (Object raw : mcEffects) {
        if (raw == null || !(raw instanceof MobEffect))
            continue;
        MobEffect mcEffect = (MobEffect) raw;
        PotionEffect effect = new PotionEffect(PotionEffectType.getById(mcEffect.getEffectId()),
                mcEffect.getDuration(), mcEffect.getAmplifier());
        // Minecraft PotionBrewer applies duration modifiers automatically.
        effects.add(effect);
    }

    cache.put(damage, effects);

    return effects;
}
项目:Craft-city    文件:CraftPotionBrewer.java   
public Collection<PotionEffect> getEffectsFromDamage(int damage) {
    if (cache.containsKey(damage))
        return cache.get(damage);

    List<?> mcEffects = net.minecraft.server.PotionBrewer.getEffects(damage, false);
    List<PotionEffect> effects = new ArrayList<PotionEffect>();
    if (mcEffects == null)
        return effects;

    for (Object raw : mcEffects) {
        if (raw == null || !(raw instanceof MobEffect))
            continue;
        MobEffect mcEffect = (MobEffect) raw;
        PotionEffect effect = new PotionEffect(PotionEffectType.getById(mcEffect.getEffectId()),
                mcEffect.getDuration(), mcEffect.getAmplifier());
        // Minecraft PotionBrewer applies duration modifiers automatically.
        effects.add(effect);
    }

    cache.put(damage, effects);

    return effects;
}
项目:BedrockAPI    文件:Potion.java   
public static PotionBrewer getBrewer() {
    return null;
}
项目:BedrockAPI    文件:Potion.java   
public static void setPotionBrewer(PotionBrewer other) {
}