public class DamageEnchantment extends Enchantment
Enchantment.Rarity| 修飾子とタイプ | フィールドと説明 |
|---|---|
int |
damageType |
name, typedelegate| コンストラクタと説明 |
|---|
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, onUserHurtgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic DamageEnchantment(Enchantment.Rarity rarityIn, int damageTypeIn, EquipmentSlotType... slots)
public int getMinEnchantability(int enchantmentLevel)
getMinEnchantability クラス内 Enchantmentpublic int getMaxEnchantability(int enchantmentLevel)
getMaxEnchantability クラス内 Enchantmentpublic int getMaxLevel()
getMaxLevel クラス内 Enchantmentpublic float calcDamageByCreature(int level,
CreatureAttribute creatureType)
calcDamageByCreature クラス内 Enchantmentpublic boolean canApplyTogether(Enchantment ench)
canApplyTogether クラス内 Enchantmentpublic boolean canApply(ItemStack stack)
canApply クラス内 Enchantmentpublic void onEntityDamaged(LivingEntity user, Entity target, int level)
onEntityDamaged クラス内 Enchantment