Class ThornsEnchantment
java.lang.Object
net.minecraft.world.item.enchantment.Enchantment
net.minecraft.world.item.enchantment.ThornsEnchantment
- All Implemented Interfaces:
IEnchantmentExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.enchantment.Enchantment
Enchantment.Rarity
-
Field Summary
Fields inherited from class net.minecraft.world.item.enchantment.Enchantment
category, descriptionId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canEnchant
(ItemStack p_45205_) void
doPostHurt
(LivingEntity p_45215_, Entity p_45216_, int p_45217_) static int
getDamage
(int p_220320_, RandomSource p_220321_) int
getMaxCost
(int p_45210_) int
int
getMinCost
(int p_45200_) static boolean
shouldHit
(int p_220317_, RandomSource p_220318_) Methods inherited from class net.minecraft.world.item.enchantment.Enchantment
builtInRegistryHolder, byId, canApplyAtEnchantingTable, checkCompatibility, doPostAttack, getDamageBonus, 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
-
CHANCE_PER_LEVEL
private static final float CHANCE_PER_LEVEL- See Also:
-
-
Constructor Details
-
ThornsEnchantment
-
-
Method Details
-
getMinCost
public int getMinCost(int p_45200_) - Overrides:
getMinCost
in classEnchantment
-
getMaxCost
public int getMaxCost(int p_45210_) - Overrides:
getMaxCost
in classEnchantment
-
getMaxLevel
public int getMaxLevel()- Overrides:
getMaxLevel
in classEnchantment
-
canEnchant
- Overrides:
canEnchant
in classEnchantment
-
doPostHurt
- Overrides:
doPostHurt
in classEnchantment
-
shouldHit
-
getDamage
-