All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.item.enchantment.crossbow.EnchantmentCrossbowPiercing Maven / Gradle / Ivy

Go to download

A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.

There is a newer version: 1.6.0.1-PN
Show newest version
package cn.nukkit.item.enchantment.crossbow;

import cn.nukkit.api.Since;
import cn.nukkit.item.enchantment.Enchantment;

@Since("1.4.0.0-PN")
public class EnchantmentCrossbowPiercing extends EnchantmentCrossbow {

    @Since("1.4.0.0-PN")
    public EnchantmentCrossbowPiercing() {
        super(Enchantment.ID_CROSSBOW_PIERCING, "crossbowPiercing", Rarity.COMMON);
    }

    @Override
    public int getMinEnchantAbility(int level) {
        return 1 + 10 * (level - 1);
    }

    @Override
    public int getMaxLevel() {
        return 4;
    }

    @Override
    public boolean checkCompatibility(Enchantment enchantment) {
        return super.checkCompatibility(enchantment) && enchantment.id != ID_CROSSBOW_MULTISHOT;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy