Interface IEnchantmentExtension
- All Known Implementing Classes:
ArrowInfiniteEnchantment
,ArrowPiercingEnchantment
,BindingCurseEnchantment
,BreachEnchantment
,DamageEnchantment
,DensityEnchantment
,DigDurabilityEnchantment
,Enchantment
,FrostWalkerEnchantment
,LootBonusEnchantment
,MendingEnchantment
,MultiShotEnchantment
,ProtectionEnchantment
,SoulSpeedEnchantment
,SwiftSneakEnchantment
,ThornsEnchantment
,TridentRiptideEnchantment
,UntouchingEnchantment
,VanishingCurseEnchantment
,WaterWalkerEnchantment
,WindBurstEnchantment
public interface IEnchantmentExtension
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
allowedInCreativeTab
(Item book, Set<TagKey<Item>> allowedCategories) Determines whether item variants of this enchantment can be added to a given creative tab with the allowed categories.default float
getDamageBonus
(int level, EntityType<?> entityType, ItemStack enchantedItem) ItemStack aware version ofEnchantment.getDamageBonus(int, EntityType)
private Enchantment
self()
-
Method Details
-
self
-
getDamageBonus
ItemStack aware version ofEnchantment.getDamageBonus(int, EntityType)
- Parameters:
level
- the level of the enchantmententityType
- the entity type being attackedenchantedItem
- the item used for the attack- Returns:
- the damage bonus
-
allowedInCreativeTab
Determines whether item variants of this enchantment can be added to a given creative tab with the allowed categories.- Parameters:
book
- the item being added to the creative taballowedCategories
- the enchantment categories allowed in the creative tab- Returns:
- whether item variants of this enchantment can be added to a given creative tab with the allowed categories
-