public class DamageEnchantment extends Enchantment
Enchantment.Rarity
修飾子とタイプ | フィールドと説明 |
---|---|
int |
damageType |
name, type
delegate
コンストラクタと説明 |
---|
DamageEnchantment(Enchantment.Rarity rarityIn,
int damageTypeIn,
EquipmentSlotType... slots) |
修飾子とタイプ | メソッドと説明 |
---|---|
float |
calcDamageByCreature(int level,
CreatureAttribute creatureType)
Calculates the additional damage that will be dealt by an item with this enchantment.
|
boolean |
canApply(ItemStack stack)
Determines if this enchantment can be applied to a specific ItemStack.
|
boolean |
canApplyTogether(Enchantment ench)
Determines if the enchantment passed can be applyied together with this enchantment.
|
int |
getMaxEnchantability(int enchantmentLevel) |
int |
getMaxLevel()
Returns the maximum level that the enchantment can have.
|
int |
getMinEnchantability(int enchantmentLevel)
Returns the minimal value of enchantability needed on the enchantment level passed.
|
void |
onEntityDamaged(LivingEntity user,
Entity target,
int level)
Called whenever a mob is damaged with an item that has this enchantment on it.
|
calcModifierDamage, canApplyAtEnchantingTable, getDefaultTranslationKey, getDisplayName, getEnchantmentByID, getEntityEquipment, getMinLevel, getName, getRarity, isAllowedOnBooks, isCompatibleWith, isCurse, isTreasureEnchantment, onUserHurt
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public DamageEnchantment(Enchantment.Rarity rarityIn, int damageTypeIn, EquipmentSlotType... slots)
public int getMinEnchantability(int enchantmentLevel)
getMinEnchantability
クラス内 Enchantment
public int getMaxEnchantability(int enchantmentLevel)
getMaxEnchantability
クラス内 Enchantment
public int getMaxLevel()
getMaxLevel
クラス内 Enchantment
public float calcDamageByCreature(int level, CreatureAttribute creatureType)
calcDamageByCreature
クラス内 Enchantment
public boolean canApplyTogether(Enchantment ench)
canApplyTogether
クラス内 Enchantment
public boolean canApply(ItemStack stack)
canApply
クラス内 Enchantment
public void onEntityDamaged(LivingEntity user, Entity target, int level)
onEntityDamaged
クラス内 Enchantment