Class DamageEnchantment
java.lang.Object
net.minecraft.world.item.enchantment.Enchantment
net.minecraft.world.item.enchantment.DamageEnchantment
- All Implemented Interfaces:
IEnchantmentExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.enchantment.Enchantment
Enchantment.Rarity
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
private static final int[]
private static final int[]
private static final int[]
private static final String[]
final int
static final int
Fields inherited from class net.minecraft.world.item.enchantment.Enchantment
category, descriptionId
-
Constructor Summary
ConstructorDescriptionDamageEnchantment
(Enchantment.Rarity p_44628_, int p_44629_, EquipmentSlot... p_44630_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canEnchant
(ItemStack p_44642_) boolean
checkCompatibility
(Enchantment p_44644_) void
doPostAttack
(LivingEntity p_44638_, Entity p_44639_, int p_44640_) float
getDamageBonus
(int p_44635_, MobType p_44636_) int
getMaxCost
(int p_44646_) int
int
getMinCost
(int p_44633_) Methods inherited from class net.minecraft.world.item.enchantment.Enchantment
builtInRegistryHolder, byId, canApplyAtEnchantingTable, doPostHurt, getDamageProtection, getDescriptionId, getFullname, getMinLevel, getOrCreateDescriptionId, getRarity, getSlotItems, isAllowedOnBooks, isCompatibleWith, isCurse, isDiscoverable, isTradeable, isTreasureOnly
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.common.extensions.IEnchantmentExtension
allowedInCreativeTab, getDamageBonus
-
Field Details
-
ALL
public static final int ALL- See Also:
-
UNDEAD
public static final int UNDEAD- See Also:
-
ARTHROPODS
public static final int ARTHROPODS- See Also:
-
NAMES
-
MIN_COST
private static final int[] MIN_COST -
LEVEL_COST
private static final int[] LEVEL_COST -
LEVEL_COST_SPAN
private static final int[] LEVEL_COST_SPAN -
type
public final int type
-
-
Constructor Details
-
DamageEnchantment
-
-
Method Details
-
getMinCost
public int getMinCost(int p_44633_) - Overrides:
getMinCost
in classEnchantment
-
getMaxCost
public int getMaxCost(int p_44646_) - Overrides:
getMaxCost
in classEnchantment
-
getMaxLevel
public int getMaxLevel()- Overrides:
getMaxLevel
in classEnchantment
-
getDamageBonus
- Overrides:
getDamageBonus
in classEnchantment
-
checkCompatibility
- Overrides:
checkCompatibility
in classEnchantment
-
canEnchant
- Overrides:
canEnchant
in classEnchantment
-
doPostAttack
- Overrides:
doPostAttack
in classEnchantment
-