public class DamageEnchantment extends Enchantment
Enchantment.Rarity
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
DAMAGE_NAMES |
int |
damageType |
private static int[] |
LEVEL_COST |
private static int[] |
LEVEL_COST_SPAN |
private static int[] |
MIN_COST |
name, type
delegate
Constructor and Description |
---|
DamageEnchantment(Enchantment.Rarity rarityIn,
int damageTypeIn,
EquipmentSlotType... slots) |
Modifier and Type | Method and Description |
---|---|
float |
calcDamageByCreature(int level,
CreatureAttribute creatureType) |
boolean |
canApply(ItemStack stack) |
boolean |
canApplyTogether(Enchantment ench) |
int |
getMaxEnchantability(int enchantmentLevel) |
int |
getMaxLevel() |
int |
getMinEnchantability(int enchantmentLevel) |
void |
onEntityDamaged(LivingEntity user,
Entity target,
int level) |
calcModifierDamage, canApplyAtEnchantingTable, getDefaultTranslationKey, getDisplayName, getEnchantmentByID, getEntityEquipment, getMinLevel, getName, getRarity, isAllowedOnBooks, isCompatibleWith, isCurse, isTreasureEnchantment, onUserHurt
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
private static final java.lang.String[] DAMAGE_NAMES
private static final int[] MIN_COST
private static final int[] LEVEL_COST
private static final int[] LEVEL_COST_SPAN
public final int damageType
public DamageEnchantment(Enchantment.Rarity rarityIn, int damageTypeIn, EquipmentSlotType... slots)
public int getMinEnchantability(int enchantmentLevel)
getMinEnchantability
in class Enchantment
public int getMaxEnchantability(int enchantmentLevel)
getMaxEnchantability
in class Enchantment
public int getMaxLevel()
getMaxLevel
in class Enchantment
public float calcDamageByCreature(int level, CreatureAttribute creatureType)
calcDamageByCreature
in class Enchantment
public boolean canApplyTogether(Enchantment ench)
canApplyTogether
in class Enchantment
public boolean canApply(ItemStack stack)
canApply
in class Enchantment
public void onEntityDamaged(LivingEntity user, Entity target, int level)
onEntityDamaged
in class Enchantment