Class Enchantment
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Enchantment>
net.minecraft.world.item.enchantment.Enchantment
- All Implemented Interfaces:
IForgeRegistryEntry<Enchantment>
- Direct Known Subclasses:
ArrowDamageEnchantment
,ArrowFireEnchantment
,ArrowInfiniteEnchantment
,ArrowKnockbackEnchantment
,ArrowPiercingEnchantment
,BindingCurseEnchantment
,DamageEnchantment
,DigDurabilityEnchantment
,DiggingEnchantment
,FireAspectEnchantment
,FishingSpeedEnchantment
,FrostWalkerEnchantment
,GlobalLootModifiersTest.SmelterEnchantment
,KnockbackEnchantment
,LootBonusEnchantment
,MendingEnchantment
,MultiShotEnchantment
,OxygenEnchantment
,ProtectionEnchantment
,QuickChargeEnchantment
,SoulSpeedEnchantment
,SweepingEdgeEnchantment
,ThornsEnchantment
,TridentChannelingEnchantment
,TridentImpalerEnchantment
,TridentLoyaltyEnchantment
,TridentRiptideEnchantment
,UntouchingEnchantment
,VanishingCurseEnchantment
,WaterWalkerEnchantment
,WaterWorkerEnchantment
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
private Enchantment.Rarity
private ReverseTagWrapper<Enchantment>
private EquipmentSlot[]
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
ModifierConstructorDescriptionprotected
Enchantment(Enchantment.Rarity p_44676_, EnchantmentCategory p_44677_, EquipmentSlot[] p_44678_)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Enchantment
byId(int p_44698_)
boolean
canApplyAtEnchantingTable(ItemStack stack)
This applies specifically to applying at the enchanting table.boolean
canEnchant(ItemStack p_44689_)
protected boolean
checkCompatibility(Enchantment p_44690_)
void
doPostAttack(LivingEntity p_44686_, Entity p_44687_, int p_44688_)
void
doPostHurt(LivingEntity p_44692_, Entity p_44693_, int p_44694_)
float
getDamageBonus(int p_44682_, MobType p_44683_)
int
getDamageProtection(int p_44680_, DamageSource p_44681_)
getFullname(int p_44701_)
int
getMaxCost(int p_44691_)
int
int
getMinCost(int p_44679_)
int
protected String
getSlotItems(LivingEntity p_44685_)
getTags()
boolean
is(Tag<Enchantment> tag)
boolean
Is this enchantment allowed to be enchanted on books via Enchantment Tableboolean
isCompatibleWith(Enchantment p_44696_)
boolean
isCurse()
boolean
boolean
boolean
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Field Details
-
reverseTags
-
slots
-
rarity
-
category
-
descriptionId
-
-
Constructor Details
-
Enchantment
protected Enchantment(Enchantment.Rarity p_44676_, EnchantmentCategory p_44677_, EquipmentSlot[] p_44678_)
-
-
Method Details
-
byId
-
getTags
-
is
-
getSlotItems
-
getRarity
-
getMinLevel
public int getMinLevel() -
getMaxLevel
public int getMaxLevel() -
getMinCost
public int getMinCost(int p_44679_) -
getMaxCost
public int getMaxCost(int p_44691_) -
getDamageProtection
-
getDamageBonus
-
isCompatibleWith
-
checkCompatibility
-
getOrCreateDescriptionId
-
getDescriptionId
-
getFullname
-
canEnchant
-
doPostAttack
-
doPostHurt
-
isTreasureOnly
public boolean isTreasureOnly() -
isCurse
public boolean isCurse() -
isTradeable
public boolean isTradeable() -
isDiscoverable
public boolean isDiscoverable() -
canApplyAtEnchantingTable
This applies specifically to applying at the enchanting table. The other methodcanEnchant(ItemStack)
applies for all possible enchantments.- Parameters:
stack
-- Returns:
-
isAllowedOnBooks
public boolean isAllowedOnBooks()Is this enchantment allowed to be enchanted on books via Enchantment Table- Returns:
- false to disable the vanilla feature
-